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

Commit 88ea7d6b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Just get VoiceInteractionManagerService once in Activity.java" into...

Merge "Just get VoiceInteractionManagerService once in Activity.java" into tm-qpr-dev am: 52a7497f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20514442



Change-Id: I287636660d19ba0268286eb087e05b37d372246a
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 086bba93 52a7497f
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -997,6 +997,8 @@ public class Activity extends ContextThemeWrapper

    private ComponentCallbacksController mCallbacksController;

    @Nullable private IVoiceInteractionManagerService mVoiceInteractionManagerService;

    private final WindowControllerCallback mWindowControllerCallback =
            new WindowControllerCallback() {
        /**
@@ -1606,18 +1608,17 @@ public class Activity extends ContextThemeWrapper

    private void notifyVoiceInteractionManagerServiceActivityEvent(
            @VoiceInteractionSession.VoiceInteractionActivityEventType int type) {

        final IVoiceInteractionManagerService service =
                IVoiceInteractionManagerService.Stub.asInterface(
        if (mVoiceInteractionManagerService == null) {
            mVoiceInteractionManagerService = IVoiceInteractionManagerService.Stub.asInterface(
                    ServiceManager.getService(Context.VOICE_INTERACTION_MANAGER_SERVICE));
        if (service == null) {
            if (mVoiceInteractionManagerService == null) {
                Log.w(TAG, "notifyVoiceInteractionManagerServiceActivityEvent: Can not get "
                        + "VoiceInteractionManagerService");
                return;
            }

        }
        try {
            service.notifyActivityEventChanged(mToken, type);
            mVoiceInteractionManagerService.notifyActivityEventChanged(mToken, type);
        } catch (RemoteException e) {
            // Empty
        }