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

Commit 61620e75 authored by thiruram's avatar thiruram
Browse files

Fixes NPE with LAUNCHER_ALLAPPS_EXIT log event.

Bug: 179720471
Test: rnlt -until-error -t com.android.launcher3.ui.TaplTestsLauncher3
Change-Id: Ic8f91092aa060a2225c059a89a33b6877cf35f36
parent 823c5f8b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -157,7 +157,10 @@ public class LiveSearchManager implements StateListener<LauncherState> {
        if (finalState.equals(ALL_APPS)) {
            mLogInstanceId = new InstanceIdSequence().newInstanceId();
            logger.withInstanceId(mLogInstanceId).log(LAUNCHER_ALLAPPS_ENTRY);
        } else if (mPrevLauncherState.equals(ALL_APPS)) {
        } else if (mPrevLauncherState.equals(ALL_APPS)
                // Check if mLogInstanceId is not null; to avoid NPE when LAUNCHER_ALLAPPS_EXIT is
                // triggered multiple times
                && mLogInstanceId != null) {
            logger.withInstanceId(mLogInstanceId).log(LAUNCHER_ALLAPPS_EXIT);
            mLogInstanceId = null;
        }