Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e12d724d authored by sqian's avatar sqian Committed by Shuo Qian
Browse files

getRadioProxy and getOemHookProxy modification

- Remove hacky getRadioProxy() and getOemHookProxy()
in EVENT_RADIO_PROXY_DEAD due to sending message delay

- Add getOemHookProxy(null) in resetProxyAndRequestList

Since P and later devices does not support Oem Hook Service in hal,
log this information for the deprecated Oem Hook Apis when it is called
in P and its later devices (it already returns useless information when
service is null).

(verified with "Disable OEM Hook" in cuttlefish ag/3879465;
 verified with "remove oem hook" in P device ag/3958422/)

Bug: 34344851
Bug: 78570593
Bug: 77496810
Test: TH tests; cuttlefish tests;
Change-Id: If1c22cd3d5ae7a8b4d081fc1a56292f9ddfb1a32
Merged-In: If1c22cd3d5ae7a8b4d081fc1a56292f9ddfb1a32
(cherry picked from commit b8ed5811)
parent 7356a7f0
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -292,11 +292,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
                            " mRadioProxyCookie = " + mRadioProxyCookie.get());
                    if ((long) msg.obj == mRadioProxyCookie.get()) {
                        resetProxyAndRequestList();

                        // todo: rild should be back up since message was sent with a delay. this is
                        // a hack.
                        getRadioProxy(null);
                        getOemHookProxy(null);
                    }
                    break;
            }
@@ -349,6 +344,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
        clearRequestList(RADIO_NOT_AVAILABLE, false);

        getRadioProxy(null);
        getOemHookProxy(null);
    }

    /** Returns a {@link IRadio} instance or null if the service is not available. */
@@ -2004,6 +2000,10 @@ public class RIL extends BaseCommands implements CommandsInterface {
            } catch (RemoteException | RuntimeException e) {
                handleRadioProxyExceptionForRR(rr, "invokeOemRilRequestRaw", e);
            }
        } else {
            // OEM Hook service is disabled for P and later devices.
            // Deprecated OEM Hook APIs will perform dummy before being removed.
            if (RILJ_LOGD) riljLog("Radio Oem Hook Service is disabled for P and later devices. ");
        }
    }

@@ -2029,6 +2029,10 @@ public class RIL extends BaseCommands implements CommandsInterface {
            } catch (RemoteException | RuntimeException e) {
                handleRadioProxyExceptionForRR(rr, "invokeOemRilRequestStrings", e);
            }
        } else {
            // OEM Hook service is disabled for P and later devices.
            // Deprecated OEM Hook APIs will perform dummy before being removed.
            if (RILJ_LOGD) riljLog("Radio Oem Hook Service is disabled for P and later devices. ");
        }
    }