Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +16 −5 Original line number Diff line number Diff line Loading @@ -98,11 +98,12 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ private static final String WINDOW_TITLE = "Taskbar"; private final DeviceProfile mDeviceProfile; private final LayoutInflater mLayoutInflater; private final TaskbarDragLayer mDragLayer; private final TaskbarControllers mControllers; private DeviceProfile mDeviceProfile; private final WindowManager mWindowManager; private final @Nullable RoundedCorner mLeftCorner, mRightCorner; private final int mTaskbarHeightForIme; Loading Loading @@ -138,10 +139,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), 0); final Resources resources = getResources(); float taskbarIconSize = resources.getDimension(R.dimen.taskbar_icon_size); mDeviceProfile.updateIconSize(1, resources); float iconScale = taskbarIconSize / mDeviceProfile.iconSizePx; mDeviceProfile.updateIconSize(iconScale, resources); updateIconSize(resources); mTaskbarHeightForIme = resources.getDimensionPixelSize(R.dimen.taskbar_ime_size); Loading Loading @@ -216,6 +214,19 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ mWindowManager.addView(mDragLayer, mWindowLayoutParams); } /** Updates the Device profile instance to the latest representation of the screen. */ public void updateDeviceProfile(DeviceProfile dp) { mDeviceProfile = dp; updateIconSize(getResources()); } private void updateIconSize(Resources resources) { float taskbarIconSize = resources.getDimension(R.dimen.taskbar_icon_size); mDeviceProfile.updateIconSize(1, resources); float iconScale = taskbarIconSize / mDeviceProfile.iconSizePx; mDeviceProfile.updateIconSize(iconScale, resources); } /** Creates LayoutParams for adding a view directly to WindowManager as a new window */ public WindowManager.LayoutParams createDefaultWindowLayoutParams() { WindowManager.LayoutParams windowLayoutParams = new WindowManager.LayoutParams( Loading quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class TaskbarDragController extends DragController<TaskbarActivityContext PopupContainerWithArrow<TaskbarActivityContext> popupContainer = mControllers.taskbarPopupController.showForIcon(btv); if (popupContainer != null) { dragOptions.preDragCondition = popupContainer.createPreDragCondition(); dragOptions.preDragCondition = popupContainer.createPreDragCondition(false); } } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,13 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen } else { // Config change might be handled without re-creating the taskbar if (mTaskbarActivityContext != null) { DeviceProfile dp = mUserUnlocked ? LauncherAppState.getIDP(mContext).getDeviceProfile(mContext) : null; if (dp != null && dp.isTaskbarPresent) { mTaskbarActivityContext.updateDeviceProfile(dp.copy(mContext)); } mTaskbarActivityContext.onConfigurationChanged(configDiff); } } Loading src/com/android/launcher3/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -1698,7 +1698,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator> PopupContainerWithArrow<Launcher> popupContainer = PopupContainerWithArrow .showForIcon((BubbleTextView) child); if (popupContainer != null) { dragOptions.preDragCondition = popupContainer.createPreDragCondition(); dragOptions.preDragCondition = popupContainer.createPreDragCondition(true); } } Loading src/com/android/launcher3/config/FeatureFlags.java +1 −1 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ public final class FeatureFlags { "Enables showing taskbar education the first time an app is opened."); public static final BooleanFlag ENABLE_TASKBAR_POPUP_MENU = getDebugFlag( "ENABLE_TASKBAR_POPUP_MENU", false, "Enables long pressing taskbar icons to show the" "ENABLE_TASKBAR_POPUP_MENU", true, "Enables long pressing taskbar icons to show the" + " popup menu."); public static final BooleanFlag ENABLE_OVERVIEW_GRID = getDebugFlag( Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +16 −5 Original line number Diff line number Diff line Loading @@ -98,11 +98,12 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ private static final String WINDOW_TITLE = "Taskbar"; private final DeviceProfile mDeviceProfile; private final LayoutInflater mLayoutInflater; private final TaskbarDragLayer mDragLayer; private final TaskbarControllers mControllers; private DeviceProfile mDeviceProfile; private final WindowManager mWindowManager; private final @Nullable RoundedCorner mLeftCorner, mRightCorner; private final int mTaskbarHeightForIme; Loading Loading @@ -138,10 +139,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), 0); final Resources resources = getResources(); float taskbarIconSize = resources.getDimension(R.dimen.taskbar_icon_size); mDeviceProfile.updateIconSize(1, resources); float iconScale = taskbarIconSize / mDeviceProfile.iconSizePx; mDeviceProfile.updateIconSize(iconScale, resources); updateIconSize(resources); mTaskbarHeightForIme = resources.getDimensionPixelSize(R.dimen.taskbar_ime_size); Loading Loading @@ -216,6 +214,19 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ mWindowManager.addView(mDragLayer, mWindowLayoutParams); } /** Updates the Device profile instance to the latest representation of the screen. */ public void updateDeviceProfile(DeviceProfile dp) { mDeviceProfile = dp; updateIconSize(getResources()); } private void updateIconSize(Resources resources) { float taskbarIconSize = resources.getDimension(R.dimen.taskbar_icon_size); mDeviceProfile.updateIconSize(1, resources); float iconScale = taskbarIconSize / mDeviceProfile.iconSizePx; mDeviceProfile.updateIconSize(iconScale, resources); } /** Creates LayoutParams for adding a view directly to WindowManager as a new window */ public WindowManager.LayoutParams createDefaultWindowLayoutParams() { WindowManager.LayoutParams windowLayoutParams = new WindowManager.LayoutParams( Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class TaskbarDragController extends DragController<TaskbarActivityContext PopupContainerWithArrow<TaskbarActivityContext> popupContainer = mControllers.taskbarPopupController.showForIcon(btv); if (popupContainer != null) { dragOptions.preDragCondition = popupContainer.createPreDragCondition(); dragOptions.preDragCondition = popupContainer.createPreDragCondition(false); } } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,13 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen } else { // Config change might be handled without re-creating the taskbar if (mTaskbarActivityContext != null) { DeviceProfile dp = mUserUnlocked ? LauncherAppState.getIDP(mContext).getDeviceProfile(mContext) : null; if (dp != null && dp.isTaskbarPresent) { mTaskbarActivityContext.updateDeviceProfile(dp.copy(mContext)); } mTaskbarActivityContext.onConfigurationChanged(configDiff); } } Loading
src/com/android/launcher3/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -1698,7 +1698,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator> PopupContainerWithArrow<Launcher> popupContainer = PopupContainerWithArrow .showForIcon((BubbleTextView) child); if (popupContainer != null) { dragOptions.preDragCondition = popupContainer.createPreDragCondition(); dragOptions.preDragCondition = popupContainer.createPreDragCondition(true); } } Loading
src/com/android/launcher3/config/FeatureFlags.java +1 −1 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ public final class FeatureFlags { "Enables showing taskbar education the first time an app is opened."); public static final BooleanFlag ENABLE_TASKBAR_POPUP_MENU = getDebugFlag( "ENABLE_TASKBAR_POPUP_MENU", false, "Enables long pressing taskbar icons to show the" "ENABLE_TASKBAR_POPUP_MENU", true, "Enables long pressing taskbar icons to show the" + " popup menu."); public static final BooleanFlag ENABLE_OVERVIEW_GRID = getDebugFlag( Loading