Skip to content
Snippets Groups Projects
Commit b540088d authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Fix the Lifecycle states.

Setting current state to DESTROYED effectively removes listeners. Change
to CREATED, which is equivalent to moving through onPause and onStop,
temporarily interrupting listening.

Fixes: 157437903
Test: manual, toggle ringer while QS is open
Change-Id: I7d5fd575795b51c0990374ab58abe9e6cd13718c
parent 12416fba
No related branches found
No related tags found
No related merge requests found
......@@ -1173,7 +1173,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
}
mUiEventLogger.log(GlobalActionsEvent.GA_POWER_MENU_CLOSE);
mWindowManagerFuncs.onGlobalActionsHidden();
mLifecycle.setCurrentState(Lifecycle.State.DESTROYED);
mLifecycle.setCurrentState(Lifecycle.State.CREATED);
}
/**
......
......@@ -17,7 +17,6 @@ package com.android.systemui.qs;
import static android.app.StatusBarManager.DISABLE2_QUICK_SETTINGS;
import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT;
import static com.android.systemui.util.Utils.useQsMediaPlayer;
import android.annotation.ColorInt;
import android.app.ActivityManager;
......@@ -42,7 +41,6 @@ import android.view.ContextThemeWrapper;
import android.view.DisplayCutout;
import android.view.View;
import android.view.WindowInsets;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
......@@ -477,7 +475,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements
} else {
mZenController.removeCallback(this);
mAlarmController.removeCallback(this);
mLifecycle.setCurrentState(Lifecycle.State.DESTROYED);
mLifecycle.setCurrentState(Lifecycle.State.CREATED);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment