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

Commit 8092cdae authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed NPE on VoiceInteractor.destroy()

Fixes: 131411751
Test: atest CtsVoiceInteractionTestCases # ran a few times on different devices, got no failures

Change-Id: I484db53772bf503f091f30f67ae92c8ae52d4105
parent 0d3acf62
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -79,10 +79,10 @@ public final class VoiceInteractor {
    /** @hide */
    public static final String KEY_KILL_SIGNAL = "key_kill_signal";

    IVoiceInteractor mInteractor;
    @Nullable IVoiceInteractor mInteractor;

    Context mContext;
    Activity mActivity;
    @Nullable Context mContext;
    @Nullable Activity mActivity;
    boolean mRetaining;

    final HandlerCaller mHandlerCaller;
@@ -999,8 +999,10 @@ public final class VoiceInteractor {

        // destroyed now
        mInteractor = null;
        if (mActivity != null) {
            mActivity.setVoiceInteractor(null);
        }
    }

    public boolean submitRequest(Request request) {
        return submitRequest(request, null);