Merge "Initial commit of TaskBar on keyguard" into sc-v2-dev

This commit is contained in:
Vinit Nayak
2021-06-15 23:05:17 +00:00
committed by Android (Google) Code Review
8 changed files with 163 additions and 15 deletions

View File

@@ -18,6 +18,7 @@ package com.android.launcher3.taskbar;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
import static com.android.systemui.shared.system.WindowManagerWrapper.ITYPE_BOTTOM_TAPPABLE_ELEMENT;
import static com.android.systemui.shared.system.WindowManagerWrapper.ITYPE_EXTRA_NAVIGATION_BAR;
@@ -123,7 +124,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
new RotationButtonController(this, R.color.popup_color_primary_light,
R.color.popup_color_primary_light),
new TaskbarDragLayerController(this, mDragLayer),
new TaskbarViewController(this, taskbarView));
new TaskbarViewController(this, taskbarView),
new TaskbarKeyguardController(this));
Display display = windowContext.getDisplay();
Context c = display.getDisplayId() == Display.DEFAULT_DISPLAY
@@ -137,7 +139,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
mWindowLayoutParams = new WindowManager.LayoutParams(
MATCH_PARENT,
mLastRequestedNonFullscreenHeight,
TYPE_APPLICATION_OVERLAY,
TYPE_NAVIGATION_BAR_PANEL,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT);
mWindowLayoutParams.setTitle(WINDOW_TITLE);
@@ -146,7 +148,6 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
mWindowLayoutParams.setFitInsetsTypes(0);
mWindowLayoutParams.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING;
mWindowLayoutParams.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
mWindowLayoutParams.setSystemApplicationOverlay(true);
WindowManagerWrapper wmWrapper = WindowManagerWrapper.getInstance();
wmWrapper.setProvidesInsetsTypes(
@@ -220,17 +221,19 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
systemUiStateFlags, forceUpdate);
mControllers.taskbarViewController.setImeIsVisible(
mControllers.navbarButtonsViewController.isImeVisible());
mControllers.taskbarKeyguardController.updateStateForSysuiFlags(systemUiStateFlags);
}
public void onRotationProposal(int rotation, boolean isValid) {
mControllers.rotationButtonController.onRotationProposal(rotation, isValid);
}
public void disable(int displayId, int state1, int state2, boolean animate) {
public void disableNavBarElements(int displayId, int state1, int state2, boolean animate) {
if (displayId != getDisplayId()) {
return;
}
mControllers.rotationButtonController.onDisable2FlagChanged(state2);
mControllers.taskbarKeyguardController.disableNavbarElements(state1, state2);
}
public void onSystemBarAttributesChanged(int displayId, int behavior) {