mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Reapply previous states when recreating the task bar" into tm-qpr-dev
This commit is contained in:
@@ -247,6 +247,12 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
// Initialize controllers after all are constructed.
|
||||
mControllers.init(sharedState);
|
||||
updateSysuiStateFlags(sharedState.sysuiStateFlags, true /* fromInit */);
|
||||
disableNavBarElements(sharedState.disableNavBarDisplayId, sharedState.disableNavBarState1,
|
||||
sharedState.disableNavBarState2, false /* animate */);
|
||||
onSystemBarAttributesChanged(sharedState.systemBarAttrsDisplayId,
|
||||
sharedState.systemBarAttrsBehavior);
|
||||
onNavButtonsDarkIntensityChanged(sharedState.navButtonsDarkIntensity);
|
||||
|
||||
|
||||
if (!mAddedWindow) {
|
||||
mWindowManager.addView(mDragLayer, mWindowLayoutParams);
|
||||
|
||||
@@ -362,18 +362,24 @@ public class TaskbarManager {
|
||||
}
|
||||
|
||||
public void disableNavBarElements(int displayId, int state1, int state2, boolean animate) {
|
||||
mSharedState.disableNavBarDisplayId = displayId;
|
||||
mSharedState.disableNavBarState1 = state1;
|
||||
mSharedState.disableNavBarState2 = state2;
|
||||
if (mTaskbarActivityContext != null) {
|
||||
mTaskbarActivityContext.disableNavBarElements(displayId, state1, state2, animate);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSystemBarAttributesChanged(int displayId, int behavior) {
|
||||
mSharedState.systemBarAttrsDisplayId = displayId;
|
||||
mSharedState.systemBarAttrsBehavior = behavior;
|
||||
if (mTaskbarActivityContext != null) {
|
||||
mTaskbarActivityContext.onSystemBarAttributesChanged(displayId, behavior);
|
||||
}
|
||||
}
|
||||
|
||||
public void onNavButtonsDarkIntensityChanged(float darkIntensity) {
|
||||
mSharedState.navButtonsDarkIntensity = darkIntensity;
|
||||
if (mTaskbarActivityContext != null) {
|
||||
mTaskbarActivityContext.onNavButtonsDarkIntensityChanged(darkIntensity);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,21 @@ package com.android.launcher3.taskbar;
|
||||
*/
|
||||
public class TaskbarSharedState {
|
||||
|
||||
// TaskbarManager#onSystemUiFlagsChanged
|
||||
public int sysuiStateFlags;
|
||||
|
||||
// TaskbarManager#disableNavBarElements()
|
||||
public int disableNavBarDisplayId;
|
||||
public int disableNavBarState1;
|
||||
public int disableNavBarState2;
|
||||
|
||||
// TaskbarManager#onSystemBarAttributesChanged()
|
||||
public int systemBarAttrsDisplayId;
|
||||
public int systemBarAttrsBehavior;
|
||||
|
||||
// TaskbarManager#onNavButtonsDarkIntensityChanged()
|
||||
public float navButtonsDarkIntensity;
|
||||
|
||||
public boolean setupUIVisible = false;
|
||||
|
||||
public boolean allAppsVisible = false;
|
||||
|
||||
Reference in New Issue
Block a user