Loading quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +6 −2 Original line number Diff line number Diff line Loading @@ -714,6 +714,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT * setup wizard, or normal 3 button nav. */ private void updateButtonLayoutSpacing() { boolean isThreeButtonNav = mContext.isThreeButtonNav(); DeviceProfile dp = mContext.getDeviceProfile(); Resources res = mContext.getResources(); boolean isInSetup = !mContext.isUserSetupComplete(); Loading @@ -721,7 +723,9 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT boolean isInKidsMode = mContext.isNavBarKidsModeActive(); if (TaskbarManager.FLAG_HIDE_NAVBAR_WINDOW) { boolean isThreeButtonNav = mContext.isThreeButtonNav(); if (!isThreeButtonNav) { return; } NavButtonLayoutter navButtonLayoutter = NavButtonLayoutFactory.Companion.getUiLayoutter( Loading Loading @@ -803,7 +807,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT mNavButtonContainer.requestLayout(); mHomeButton.setOnLongClickListener(null); } else if (mContext.isThreeButtonNav()) { } else if (isThreeButtonNav) { final RotateDrawable rotateDrawable = new RotateDrawable(); rotateDrawable.setDrawable(mContext.getDrawable(R.drawable.ic_sysbar_back)); rotateDrawable.setFromDegrees(0f); Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +9 −2 Original line number Diff line number Diff line Loading @@ -186,7 +186,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mRightCorner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT); // Inflate views. int taskbarLayout = DisplayController.isTransientTaskbar(this) boolean phoneMode = TaskbarManager.isPhoneMode(mDeviceProfile); int taskbarLayout = DisplayController.isTransientTaskbar(this) && !phoneMode ? R.layout.transient_taskbar : R.layout.taskbar; mDragLayer = (TaskbarDragLayer) mLayoutInflater.inflate(taskbarLayout, null, false); Loading Loading @@ -254,6 +255,12 @@ public class TaskbarActivityContext extends BaseTaskbarContext { sharedState.systemBarAttrsBehavior); onNavButtonsDarkIntensityChanged(sharedState.navButtonsDarkIntensity); if (FLAG_HIDE_NAVBAR_WINDOW) { // W/ the flag not set this entire class gets re-created, which resets the value of // mIsDestroyed. We re-use the class for small-screen, so we explicitly have to mark // this class as non-destroyed mIsDestroyed = false; } if (!mAddedWindow) { mWindowManager.addView(mDragLayer, mWindowLayoutParams); Loading Loading @@ -334,7 +341,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext { public WindowManager.LayoutParams createDefaultWindowLayoutParams(int type, String title) { DeviceProfile deviceProfile = getDeviceProfile(); // Taskbar is on the logical bottom of the screen boolean isVerticalBarLayout = TaskbarManager.isPhoneMode(deviceProfile) && boolean isVerticalBarLayout = TaskbarManager.isPhoneButtonNavMode(this) && deviceProfile.isLandscape; int windowFlags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE Loading quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt +10 −1 Original line number Diff line number Diff line Loading @@ -16,11 +16,13 @@ package com.android.launcher3.taskbar import android.content.res.Resources import android.graphics.Canvas import android.graphics.Color import android.graphics.Paint import android.graphics.Path import android.graphics.RectF import com.android.launcher3.DeviceProfile import com.android.launcher3.R import com.android.launcher3.Utilities import com.android.launcher3.Utilities.mapRange Loading Loading @@ -61,7 +63,7 @@ class TaskbarBackgroundRenderer(context: TaskbarActivityContext) { private val invertedLeftCornerPath: Path = Path() private val invertedRightCornerPath: Path = Path() private val stashedHandleWidth = private var stashedHandleWidth = context.resources.getDimensionPixelSize(R.dimen.taskbar_stashed_handle_width) private val stashedHandleHeight = Loading @@ -86,6 +88,13 @@ class TaskbarBackgroundRenderer(context: TaskbarActivityContext) { setCornerRoundness(DEFAULT_ROUNDNESS) } fun updateStashedHandleWidth(dp: DeviceProfile, res: Resources) { stashedHandleWidth = res.getDimensionPixelSize( if (TaskbarManager.isPhoneMode(dp)) R.dimen.taskbar_stashed_small_screen else R.dimen.taskbar_stashed_handle_width ) } /** * Sets the roundness of the round corner above Taskbar. No effect on transient Taskkbar. * Loading quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayer.java +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class TaskbarDragLayer extends BaseDragLayer<TaskbarActivityContext> { public void init(TaskbarDragLayerController.TaskbarDragLayerCallbacks callbacks) { mControllerCallbacks = callbacks; mBackgroundRenderer.updateStashedHandleWidth(mActivity.getDeviceProfile(), getResources()); recreateControllers(); } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarView.java +2 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,8 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar mActivityContext = ActivityContext.lookupContext(context); mIconLayoutBounds = mActivityContext.getTransientTaskbarBounds(); Resources resources = getResources(); boolean isTransientTaskbar = DisplayController.isTransientTaskbar(mActivityContext); boolean isTransientTaskbar = DisplayController.isTransientTaskbar(mActivityContext) && !TaskbarManager.isPhoneMode(mActivityContext.getDeviceProfile()); mIsRtl = Utilities.isRtl(resources); mTransientTaskbarMinWidth = mContext.getResources().getDimension( R.dimen.transient_taskbar_min_width); Loading Loading
quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +6 −2 Original line number Diff line number Diff line Loading @@ -714,6 +714,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT * setup wizard, or normal 3 button nav. */ private void updateButtonLayoutSpacing() { boolean isThreeButtonNav = mContext.isThreeButtonNav(); DeviceProfile dp = mContext.getDeviceProfile(); Resources res = mContext.getResources(); boolean isInSetup = !mContext.isUserSetupComplete(); Loading @@ -721,7 +723,9 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT boolean isInKidsMode = mContext.isNavBarKidsModeActive(); if (TaskbarManager.FLAG_HIDE_NAVBAR_WINDOW) { boolean isThreeButtonNav = mContext.isThreeButtonNav(); if (!isThreeButtonNav) { return; } NavButtonLayoutter navButtonLayoutter = NavButtonLayoutFactory.Companion.getUiLayoutter( Loading Loading @@ -803,7 +807,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT mNavButtonContainer.requestLayout(); mHomeButton.setOnLongClickListener(null); } else if (mContext.isThreeButtonNav()) { } else if (isThreeButtonNav) { final RotateDrawable rotateDrawable = new RotateDrawable(); rotateDrawable.setDrawable(mContext.getDrawable(R.drawable.ic_sysbar_back)); rotateDrawable.setFromDegrees(0f); Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +9 −2 Original line number Diff line number Diff line Loading @@ -186,7 +186,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mRightCorner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT); // Inflate views. int taskbarLayout = DisplayController.isTransientTaskbar(this) boolean phoneMode = TaskbarManager.isPhoneMode(mDeviceProfile); int taskbarLayout = DisplayController.isTransientTaskbar(this) && !phoneMode ? R.layout.transient_taskbar : R.layout.taskbar; mDragLayer = (TaskbarDragLayer) mLayoutInflater.inflate(taskbarLayout, null, false); Loading Loading @@ -254,6 +255,12 @@ public class TaskbarActivityContext extends BaseTaskbarContext { sharedState.systemBarAttrsBehavior); onNavButtonsDarkIntensityChanged(sharedState.navButtonsDarkIntensity); if (FLAG_HIDE_NAVBAR_WINDOW) { // W/ the flag not set this entire class gets re-created, which resets the value of // mIsDestroyed. We re-use the class for small-screen, so we explicitly have to mark // this class as non-destroyed mIsDestroyed = false; } if (!mAddedWindow) { mWindowManager.addView(mDragLayer, mWindowLayoutParams); Loading Loading @@ -334,7 +341,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext { public WindowManager.LayoutParams createDefaultWindowLayoutParams(int type, String title) { DeviceProfile deviceProfile = getDeviceProfile(); // Taskbar is on the logical bottom of the screen boolean isVerticalBarLayout = TaskbarManager.isPhoneMode(deviceProfile) && boolean isVerticalBarLayout = TaskbarManager.isPhoneButtonNavMode(this) && deviceProfile.isLandscape; int windowFlags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt +10 −1 Original line number Diff line number Diff line Loading @@ -16,11 +16,13 @@ package com.android.launcher3.taskbar import android.content.res.Resources import android.graphics.Canvas import android.graphics.Color import android.graphics.Paint import android.graphics.Path import android.graphics.RectF import com.android.launcher3.DeviceProfile import com.android.launcher3.R import com.android.launcher3.Utilities import com.android.launcher3.Utilities.mapRange Loading Loading @@ -61,7 +63,7 @@ class TaskbarBackgroundRenderer(context: TaskbarActivityContext) { private val invertedLeftCornerPath: Path = Path() private val invertedRightCornerPath: Path = Path() private val stashedHandleWidth = private var stashedHandleWidth = context.resources.getDimensionPixelSize(R.dimen.taskbar_stashed_handle_width) private val stashedHandleHeight = Loading @@ -86,6 +88,13 @@ class TaskbarBackgroundRenderer(context: TaskbarActivityContext) { setCornerRoundness(DEFAULT_ROUNDNESS) } fun updateStashedHandleWidth(dp: DeviceProfile, res: Resources) { stashedHandleWidth = res.getDimensionPixelSize( if (TaskbarManager.isPhoneMode(dp)) R.dimen.taskbar_stashed_small_screen else R.dimen.taskbar_stashed_handle_width ) } /** * Sets the roundness of the round corner above Taskbar. No effect on transient Taskkbar. * Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayer.java +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class TaskbarDragLayer extends BaseDragLayer<TaskbarActivityContext> { public void init(TaskbarDragLayerController.TaskbarDragLayerCallbacks callbacks) { mControllerCallbacks = callbacks; mBackgroundRenderer.updateStashedHandleWidth(mActivity.getDeviceProfile(), getResources()); recreateControllers(); } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarView.java +2 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,8 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar mActivityContext = ActivityContext.lookupContext(context); mIconLayoutBounds = mActivityContext.getTransientTaskbarBounds(); Resources resources = getResources(); boolean isTransientTaskbar = DisplayController.isTransientTaskbar(mActivityContext); boolean isTransientTaskbar = DisplayController.isTransientTaskbar(mActivityContext) && !TaskbarManager.isPhoneMode(mActivityContext.getDeviceProfile()); mIsRtl = Utilities.isRtl(resources); mTransientTaskbarMinWidth = mContext.getResources().getDimension( R.dimen.transient_taskbar_min_width); Loading