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

Commit 9012515f authored by Thiru Ramasamy's avatar Thiru Ramasamy Committed by Android (Google) Code Review
Browse files

Merge "Fixes NPE with LAUNCHER_ALLAPPS_EXIT log event." into sc-dev

parents 1f6b7fcc 61620e75
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;
        }