Merge "Remove SoundTriggerMiddleware death notification" into tm-qpr-dev am: ee9494914b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19668917 Change-Id: I16b18ee3086f1d249da3f490bef7899a2e81a5f8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1963,7 +1963,6 @@ public class SoundTrigger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Object mServiceLock = new Object();
|
private static Object mServiceLock = new Object();
|
||||||
private static ISoundTriggerMiddlewareService mService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translate an exception thrown from interaction with the underlying service to an error code.
|
* Translate an exception thrown from interaction with the underlying service to an error code.
|
||||||
@@ -2217,20 +2216,12 @@ public class SoundTrigger {
|
|||||||
binder =
|
binder =
|
||||||
ServiceManager.getServiceOrThrow(
|
ServiceManager.getServiceOrThrow(
|
||||||
Context.SOUND_TRIGGER_MIDDLEWARE_SERVICE);
|
Context.SOUND_TRIGGER_MIDDLEWARE_SERVICE);
|
||||||
binder.linkToDeath(() -> {
|
return ISoundTriggerMiddlewareService.Stub.asInterface(binder);
|
||||||
synchronized (mServiceLock) {
|
|
||||||
mService = null;
|
|
||||||
}
|
|
||||||
}, 0);
|
|
||||||
mService = ISoundTriggerMiddlewareService.Stub.asInterface(binder);
|
|
||||||
break;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Failed to bind to soundtrigger service", e);
|
Log.e(TAG, "Failed to bind to soundtrigger service", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user