Loading quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +9 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BA import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_HOME; import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH; import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS; import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_SPACE; import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD; import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_SMALL_SCREEN; import static com.android.launcher3.util.FlagDebugUtils.appendFlag; Loading Loading @@ -79,6 +80,7 @@ import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Space; import androidx.annotation.Nullable; Loading Loading @@ -207,6 +209,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT this::onComputeInsetsForSeparateWindow; private final RecentsHitboxExtender mHitboxExtender = new RecentsHitboxExtender(); private ImageView mRecentsButton; private Space mSpace; public NavbarButtonsViewController(TaskbarActivityContext context, @Nullable Context navigationBarPanelContext, NearestTouchFrame navButtonsView) { Loading Loading @@ -432,6 +435,11 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT mPropertyHolders.add(new StatePropertyHolder(mA11yButton, flags -> (flags & FLAG_A11Y_VISIBLE) != 0 && (flags & FLAG_ROTATION_BUTTON_VISIBLE) == 0)); mSpace = new Space(mNavButtonsView.getContext()); mSpace.setOnClickListener(view -> navButtonController.onButtonClick(BUTTON_SPACE, view)); mSpace.setOnLongClickListener(view -> navButtonController.onButtonLongClick(BUTTON_SPACE, view)); } private void parseSystemUiFlags(int sysUiStateFlags) { Loading Loading @@ -760,7 +768,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT NavButtonLayoutFactory.Companion.getUiLayoutter( dp, mNavButtonsView, mImeSwitcherButton, mControllers.rotationButtonController.getRotationButton(), mA11yButton, res, isInKidsMode, isInSetup, isThreeButtonNav, mA11yButton, mSpace, res, isInKidsMode, isInSetup, isThreeButtonNav, mContext.isPhoneMode(), mWindowManagerProxy.getRotation(mContext)); navButtonLayoutter.layoutButtons(mContext, isA11yButtonPersistent()); updateButtonsBackground(); Loading quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java +7 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa static final int BUTTON_A11Y = BUTTON_IME_SWITCH << 1; static final int BUTTON_QUICK_SETTINGS = BUTTON_A11Y << 1; static final int BUTTON_NOTIFICATIONS = BUTTON_QUICK_SETTINGS << 1; static final int BUTTON_SPACE = BUTTON_NOTIFICATIONS << 1; private static final int SCREEN_UNPIN_COMBO = BUTTON_BACK | BUTTON_RECENTS; private int mLongPressedButtons = 0; Loading @@ -123,6 +124,9 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa } public void onButtonClick(@TaskbarButton int buttonType, View view) { if (buttonType == BUTTON_SPACE) { return; } // Provide the same haptic feedback that the system offers for virtual keys. view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); switch (buttonType) { Loading Loading @@ -156,6 +160,9 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa } public boolean onButtonLongClick(@TaskbarButton int buttonType, View view) { if (buttonType == BUTTON_SPACE) { return false; } // Provide the same haptic feedback that the system offers for virtual keys. view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); switch (buttonType) { Loading quickstep/src/com/android/launcher3/taskbar/navbutton/AbstractNavButtonLayoutter.kt +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.ViewGroup import android.widget.FrameLayout import android.widget.ImageView import android.widget.LinearLayout import android.widget.Space import com.android.launcher3.R import com.android.launcher3.Utilities import com.android.launcher3.taskbar.navbutton.NavButtonLayoutFactory.NavButtonLayoutter Loading @@ -46,7 +47,8 @@ abstract class AbstractNavButtonLayoutter( protected val startContextualContainer: ViewGroup, protected val imeSwitcher: ImageView?, protected val rotationButton: RotationButton?, protected val a11yButton: ImageView? protected val a11yButton: ImageView?, protected val space: Space ) : NavButtonLayoutter { protected val homeButton: ImageView? = navButtonContainer.findViewById(R.id.home) protected val recentsButton: ImageView? = navButtonContainer.findViewById(R.id.recent_apps) Loading quickstep/src/com/android/launcher3/taskbar/navbutton/KidsNavLayoutter.kt +5 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.view.ViewGroup.LayoutParams.WRAP_CONTENT import android.widget.FrameLayout import android.widget.ImageView import android.widget.LinearLayout import android.widget.Space import com.android.launcher3.R import com.android.launcher3.taskbar.TaskbarActivityContext import com.android.launcher3.taskbar.navbutton.LayoutResourceHelper.* Loading @@ -37,7 +38,8 @@ class KidsNavLayoutter( startContextualContainer: ViewGroup, imeSwitcher: ImageView?, rotationButton: RotationButton?, a11yButton: ImageView? a11yButton: ImageView?, space: Space, ) : AbstractNavButtonLayoutter( resources, Loading @@ -46,7 +48,8 @@ class KidsNavLayoutter( startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) { override fun layoutButtons(context: TaskbarActivityContext, isA11yButtonPersistent: Boolean) { Loading quickstep/src/com/android/launcher3/taskbar/navbutton/NavButtonLayoutFactory.kt +16 −7 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.ViewGroup import android.widget.FrameLayout import android.widget.ImageView import android.widget.LinearLayout import android.widget.Space import com.android.launcher3.DeviceProfile import com.android.launcher3.taskbar.TaskbarActivityContext import com.android.launcher3.taskbar.navbutton.LayoutResourceHelper.* Loading Loading @@ -60,6 +61,7 @@ class NavButtonLayoutFactory { imeSwitcher: ImageView?, rotationButton: RotationButton?, a11yButton: ImageView?, space: Space, resources: Resources, isKidsMode: Boolean, isInSetup: Boolean, Loading @@ -86,7 +88,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } else if (surfaceRotation == ROTATION_90) { navButtonsView.setIsVertical(true) Loading @@ -97,7 +100,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } else { navButtonsView.setIsVertical(true) Loading @@ -108,7 +112,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } } Loading @@ -120,7 +125,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } deviceProfile.isTaskbarPresent -> { Loading @@ -133,7 +139,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } isKidsMode -> { Loading @@ -144,7 +151,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } else -> Loading @@ -155,7 +163,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } } Loading Loading
quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +9 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BA import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_HOME; import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH; import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS; import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_SPACE; import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD; import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_SMALL_SCREEN; import static com.android.launcher3.util.FlagDebugUtils.appendFlag; Loading Loading @@ -79,6 +80,7 @@ import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Space; import androidx.annotation.Nullable; Loading Loading @@ -207,6 +209,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT this::onComputeInsetsForSeparateWindow; private final RecentsHitboxExtender mHitboxExtender = new RecentsHitboxExtender(); private ImageView mRecentsButton; private Space mSpace; public NavbarButtonsViewController(TaskbarActivityContext context, @Nullable Context navigationBarPanelContext, NearestTouchFrame navButtonsView) { Loading Loading @@ -432,6 +435,11 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT mPropertyHolders.add(new StatePropertyHolder(mA11yButton, flags -> (flags & FLAG_A11Y_VISIBLE) != 0 && (flags & FLAG_ROTATION_BUTTON_VISIBLE) == 0)); mSpace = new Space(mNavButtonsView.getContext()); mSpace.setOnClickListener(view -> navButtonController.onButtonClick(BUTTON_SPACE, view)); mSpace.setOnLongClickListener(view -> navButtonController.onButtonLongClick(BUTTON_SPACE, view)); } private void parseSystemUiFlags(int sysUiStateFlags) { Loading Loading @@ -760,7 +768,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT NavButtonLayoutFactory.Companion.getUiLayoutter( dp, mNavButtonsView, mImeSwitcherButton, mControllers.rotationButtonController.getRotationButton(), mA11yButton, res, isInKidsMode, isInSetup, isThreeButtonNav, mA11yButton, mSpace, res, isInKidsMode, isInSetup, isThreeButtonNav, mContext.isPhoneMode(), mWindowManagerProxy.getRotation(mContext)); navButtonLayoutter.layoutButtons(mContext, isA11yButtonPersistent()); updateButtonsBackground(); Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java +7 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa static final int BUTTON_A11Y = BUTTON_IME_SWITCH << 1; static final int BUTTON_QUICK_SETTINGS = BUTTON_A11Y << 1; static final int BUTTON_NOTIFICATIONS = BUTTON_QUICK_SETTINGS << 1; static final int BUTTON_SPACE = BUTTON_NOTIFICATIONS << 1; private static final int SCREEN_UNPIN_COMBO = BUTTON_BACK | BUTTON_RECENTS; private int mLongPressedButtons = 0; Loading @@ -123,6 +124,9 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa } public void onButtonClick(@TaskbarButton int buttonType, View view) { if (buttonType == BUTTON_SPACE) { return; } // Provide the same haptic feedback that the system offers for virtual keys. view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); switch (buttonType) { Loading Loading @@ -156,6 +160,9 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa } public boolean onButtonLongClick(@TaskbarButton int buttonType, View view) { if (buttonType == BUTTON_SPACE) { return false; } // Provide the same haptic feedback that the system offers for virtual keys. view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); switch (buttonType) { Loading
quickstep/src/com/android/launcher3/taskbar/navbutton/AbstractNavButtonLayoutter.kt +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.ViewGroup import android.widget.FrameLayout import android.widget.ImageView import android.widget.LinearLayout import android.widget.Space import com.android.launcher3.R import com.android.launcher3.Utilities import com.android.launcher3.taskbar.navbutton.NavButtonLayoutFactory.NavButtonLayoutter Loading @@ -46,7 +47,8 @@ abstract class AbstractNavButtonLayoutter( protected val startContextualContainer: ViewGroup, protected val imeSwitcher: ImageView?, protected val rotationButton: RotationButton?, protected val a11yButton: ImageView? protected val a11yButton: ImageView?, protected val space: Space ) : NavButtonLayoutter { protected val homeButton: ImageView? = navButtonContainer.findViewById(R.id.home) protected val recentsButton: ImageView? = navButtonContainer.findViewById(R.id.recent_apps) Loading
quickstep/src/com/android/launcher3/taskbar/navbutton/KidsNavLayoutter.kt +5 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.view.ViewGroup.LayoutParams.WRAP_CONTENT import android.widget.FrameLayout import android.widget.ImageView import android.widget.LinearLayout import android.widget.Space import com.android.launcher3.R import com.android.launcher3.taskbar.TaskbarActivityContext import com.android.launcher3.taskbar.navbutton.LayoutResourceHelper.* Loading @@ -37,7 +38,8 @@ class KidsNavLayoutter( startContextualContainer: ViewGroup, imeSwitcher: ImageView?, rotationButton: RotationButton?, a11yButton: ImageView? a11yButton: ImageView?, space: Space, ) : AbstractNavButtonLayoutter( resources, Loading @@ -46,7 +48,8 @@ class KidsNavLayoutter( startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) { override fun layoutButtons(context: TaskbarActivityContext, isA11yButtonPersistent: Boolean) { Loading
quickstep/src/com/android/launcher3/taskbar/navbutton/NavButtonLayoutFactory.kt +16 −7 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.ViewGroup import android.widget.FrameLayout import android.widget.ImageView import android.widget.LinearLayout import android.widget.Space import com.android.launcher3.DeviceProfile import com.android.launcher3.taskbar.TaskbarActivityContext import com.android.launcher3.taskbar.navbutton.LayoutResourceHelper.* Loading Loading @@ -60,6 +61,7 @@ class NavButtonLayoutFactory { imeSwitcher: ImageView?, rotationButton: RotationButton?, a11yButton: ImageView?, space: Space, resources: Resources, isKidsMode: Boolean, isInSetup: Boolean, Loading @@ -86,7 +88,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } else if (surfaceRotation == ROTATION_90) { navButtonsView.setIsVertical(true) Loading @@ -97,7 +100,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } else { navButtonsView.setIsVertical(true) Loading @@ -108,7 +112,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } } Loading @@ -120,7 +125,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } deviceProfile.isTaskbarPresent -> { Loading @@ -133,7 +139,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } isKidsMode -> { Loading @@ -144,7 +151,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } else -> Loading @@ -155,7 +163,8 @@ class NavButtonLayoutFactory { startContextualContainer, imeSwitcher, rotationButton, a11yButton a11yButton, space ) } } Loading