Skip to content
Snippets Groups Projects
Commit 91a71ded authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixing NPE before calling unbind" into main

parents 7225a890 95ebdf39
No related branches found
No related tags found
No related merge requests found
......@@ -539,10 +539,14 @@ public class OnDeviceIntelligenceManagerService extends SystemService {
Manifest.permission.USE_ON_DEVICE_INTELLIGENCE, TAG);
synchronized (mLock) {
mTemporaryServiceNames = componentNames;
mRemoteInferenceService.unbind();
mRemoteOnDeviceIntelligenceService.unbind();
mRemoteOnDeviceIntelligenceService = null;
mRemoteInferenceService = null;
if (mRemoteInferenceService != null) {
mRemoteInferenceService.unbind();
mRemoteInferenceService = null;
}
if (mRemoteOnDeviceIntelligenceService != null) {
mRemoteOnDeviceIntelligenceService.unbind();
mRemoteOnDeviceIntelligenceService = null;
}
if (mTemporaryHandler == null) {
mTemporaryHandler = new Handler(Looper.getMainLooper(), null, true) {
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment