mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Merge "Move back to end of screen on keyguard" into sc-v2-dev am: c5ae15b481
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15986998 Change-Id: I8d6381fecfddfebfc5d7a3e9f67a3901b97f1180
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y_LONG_CLICK;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BACK;
|
||||
@@ -194,6 +195,14 @@ public class NavbarButtonsViewController {
|
||||
flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 ||
|
||||
(flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 ||
|
||||
(flags & FLAG_KEYGUARD_OCCLUDED) != 0));
|
||||
// Translate back button to be at end/start of other buttons for keyguard
|
||||
int navButtonSize = mContext.getResources().getDimensionPixelSize(
|
||||
R.dimen.taskbar_nav_buttons_size);
|
||||
mPropertyHolders.add(new StatePropertyHolder(
|
||||
mBackButton, flags -> (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0
|
||||
|| (flags & FLAG_KEYGUARD_VISIBLE) != 0,
|
||||
VIEW_TRANSLATE_X, navButtonSize * (isRtl ? -2 : 2), 0));
|
||||
|
||||
|
||||
// home and recents buttons
|
||||
View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer,
|
||||
@@ -235,6 +244,7 @@ public class NavbarButtonsViewController {
|
||||
}
|
||||
mSysuiStateFlags = systemUiStateFlags;
|
||||
|
||||
// TODO(b/202218289) we're getting IME as not visible on lockscreen from system
|
||||
updateStateForFlag(FLAG_IME_VISIBLE, isImeVisible);
|
||||
updateStateForFlag(FLAG_SWITCHER_SUPPORTED, isImeSwitcherShowing);
|
||||
updateStateForFlag(FLAG_A11Y_VISIBLE, a11yVisible);
|
||||
@@ -337,6 +347,10 @@ public class NavbarButtonsViewController {
|
||||
return buttonView;
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
mPropertyHolders.clear();
|
||||
}
|
||||
|
||||
private class RotationButtonImpl implements RotationButton {
|
||||
|
||||
private final ImageView mButton;
|
||||
|
||||
@@ -89,6 +89,7 @@ public class TaskbarControllers {
|
||||
* Cleans up all controllers.
|
||||
*/
|
||||
public void onDestroy() {
|
||||
navbarButtonsViewController.onDestroy();
|
||||
uiController.onDestroy();
|
||||
rotationButtonController.onDestroy();
|
||||
taskbarDragLayerController.onDestroy();
|
||||
|
||||
@@ -96,7 +96,10 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
if ((mOldConfig.diff(newConfig) & ActivityInfo.CONFIG_ASSETS_PATHS) != 0) {
|
||||
int configDiff = mOldConfig.diff(newConfig);
|
||||
int configsRequiringRecreate = ActivityInfo.CONFIG_ASSETS_PATHS
|
||||
| ActivityInfo.CONFIG_LAYOUT_DIRECTION;
|
||||
if ((configDiff & configsRequiringRecreate) != 0) {
|
||||
// Color has changed, recreate taskbar to reload background color & icons.
|
||||
recreateTaskbar();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user