Loading core/java/android/os/ServiceManagerNative.java +10 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,16 @@ class ServiceManagerProxy implements IServiceManager { return mServiceManager.listServices(dumpPriority); } public void registerForNotifications(String name, IServiceCallback cb) throws RemoteException { throw new RemoteException(); } public void unregisterForNotifications(String name, IServiceCallback cb) throws RemoteException { throw new RemoteException(); } /** * Same as mServiceManager but used by apps. * Loading services/core/jni/com_android_server_power_PowerManagerService.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -201,13 +201,8 @@ sp<ISystemSuspend> getSuspendHal() { sp<ISuspendControlService> getSuspendControl() { static std::once_flag suspendControlFlag; std::call_once(suspendControlFlag, [](){ while(gSuspendControl == nullptr) { sp<IBinder> control = defaultServiceManager()->getService(String16("suspend_control")); if (control != nullptr) { gSuspendControl = interface_cast<ISuspendControlService>(control); } } gSuspendControl = waitForService<ISuspendControlService>(String16("suspend_control")); LOG_ALWAYS_FATAL_IF(gSuspendControl == nullptr); }); return gSuspendControl; } Loading Loading
core/java/android/os/ServiceManagerNative.java +10 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,16 @@ class ServiceManagerProxy implements IServiceManager { return mServiceManager.listServices(dumpPriority); } public void registerForNotifications(String name, IServiceCallback cb) throws RemoteException { throw new RemoteException(); } public void unregisterForNotifications(String name, IServiceCallback cb) throws RemoteException { throw new RemoteException(); } /** * Same as mServiceManager but used by apps. * Loading
services/core/jni/com_android_server_power_PowerManagerService.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -201,13 +201,8 @@ sp<ISystemSuspend> getSuspendHal() { sp<ISuspendControlService> getSuspendControl() { static std::once_flag suspendControlFlag; std::call_once(suspendControlFlag, [](){ while(gSuspendControl == nullptr) { sp<IBinder> control = defaultServiceManager()->getService(String16("suspend_control")); if (control != nullptr) { gSuspendControl = interface_cast<ISuspendControlService>(control); } } gSuspendControl = waitForService<ISuspendControlService>(String16("suspend_control")); LOG_ALWAYS_FATAL_IF(gSuspendControl == nullptr); }); return gSuspendControl; } Loading