Create new DesktopNavbarButtonsViewController class.

This CL creates a new DesktopNavbarButtonsViewController class to allow
for taskbar buttons and status icons customization on desktop
environment.

Recall: http://recall/clips/e008d2de-36d3-47f6-954a-5ce18bac69a5

Bug: 213964564
Bug: 196757951
Test: Switch between different system navigation modes and verify the
desktop taskbar buttons stay on screen.

Change-Id: Ie7a9a044fad3b60cd37d910b8eb78c8734aadfd5
This commit is contained in:
Merissa Tan
2022-01-12 19:10:38 -08:00
parent e8f8cd2f53
commit d41ce4980d
5 changed files with 78 additions and 16 deletions

View File

@@ -15,6 +15,7 @@
*/
package com.android.launcher3.taskbar;
import static android.content.pm.PackageManager.FEATURE_PC;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
@@ -166,7 +167,9 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
mControllers = new TaskbarControllers(this,
new TaskbarDragController(this),
buttonController,
new NavbarButtonsViewController(this, navButtonsView),
getPackageManager().hasSystemFeature(FEATURE_PC)
? new DesktopNavbarButtonsViewController(this, navButtonsView) :
new NavbarButtonsViewController(this, navButtonsView),
new RotationButtonController(this,
c.getColor(R.color.taskbar_nav_icon_light_color),
c.getColor(R.color.taskbar_nav_icon_dark_color),