Merge changes from topic "wait-for-aidl" into stage-aosp-master am: d6b5bdf07d

am: 4955049ace

Change-Id: If720ddc218387369966a28f1c21c6f94ed75a74a
This commit is contained in:
Steven Moreland
2019-08-30 11:31:23 -07:00
committed by android-build-merger
2 changed files with 12 additions and 7 deletions

View File

@@ -76,6 +76,16 @@ class ServiceManagerProxy implements IServiceManager {
return mServiceManager.listServices(dumpPriority); 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. * Same as mServiceManager but used by apps.
* *

View File

@@ -201,13 +201,8 @@ sp<ISystemSuspend> getSuspendHal() {
sp<ISuspendControlService> getSuspendControl() { sp<ISuspendControlService> getSuspendControl() {
static std::once_flag suspendControlFlag; static std::once_flag suspendControlFlag;
std::call_once(suspendControlFlag, [](){ std::call_once(suspendControlFlag, [](){
while(gSuspendControl == nullptr) { gSuspendControl = waitForService<ISuspendControlService>(String16("suspend_control"));
sp<IBinder> control = LOG_ALWAYS_FATAL_IF(gSuspendControl == nullptr);
defaultServiceManager()->getService(String16("suspend_control"));
if (control != nullptr) {
gSuspendControl = interface_cast<ISuspendControlService>(control);
}
}
}); });
return gSuspendControl; return gSuspendControl;
} }