diff options
| author | 2022-07-18 11:05:57 -0700 | |
|---|---|---|
| committer | 2022-07-18 11:27:41 -0700 | |
| commit | 1d2aa14abd36a44c4633534afd44de6e3962a8df (patch) | |
| tree | 3e013d142e7c98db444966fc7009f4446ab244d6 | |
| parent | 3d8c880d4c4a09a5ac33c755ccdf1a337959e262 (diff) | |
Only clean the client if no pending intent exist.
Test: Presubmit
Bug: 239188851
Merged-In: I683ad404ffbd25359c795a72cc7620531d037197
Change-Id: If8b4e77182f49f322caf09da6dd7ea0d4aeb7de6
| -rw-r--r-- | services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java b/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java index 9fb1d8e744fb..625f1936e28e 100644 --- a/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java @@ -871,10 +871,9 @@ public class ContextHubClientBroker extends IContextHubClient.Stub if (!mPendingIntentRequest.hasPendingIntent() && mRegistered) { mClientManager.unregisterClient(mHostEndPointId); mRegistered = false; + mAppOpsManager.stopWatchingMode(this); + mContextHubProxy.onHostEndpointDisconnected(mHostEndPointId); } - mAppOpsManager.stopWatchingMode(this); - - mContextHubProxy.onHostEndpointDisconnected(mHostEndPointId); } private String authStateToString(@ContextHubManager.AuthorizationState int state) { |