Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -539,10 +539,14 @@ public class OnDeviceIntelligenceManagerService extends SystemService {
                Manifest.permission.USE_ON_DEVICE_INTELLIGENCE, TAG);
        synchronized (mLock) {
            mTemporaryServiceNames = componentNames;
            if (mRemoteInferenceService != null) {
                mRemoteInferenceService.unbind();
                mRemoteInferenceService = null;
            }
            if (mRemoteOnDeviceIntelligenceService != null) {
                mRemoteOnDeviceIntelligenceService.unbind();
                mRemoteOnDeviceIntelligenceService = null;
            mRemoteInferenceService = null;
            }
            if (mTemporaryHandler == null) {
                mTemporaryHandler = new Handler(Looper.getMainLooper(), null, true) {
                    @Override