Apparently isContextualButtonShowing is not the right signal. Checking on dp.isGestureMode instead
Fixes: 300849078
Test: manual
Change-Id: Iac44bb4adbbdd5faf52100c88c2a4a6d95d58b98
Also make sure the contextual buttons are centered in its respective orientation
Fixes: 300849078
Test: Rotate around, and make sure the rotation button stays in the same corner
Change-Id: Ibc40739eff050f258b938ccf94c2056ed1ee596b
DisplayInfo.rotation doesn't have the correct information sometimes. Switched to use WindowManagerProxy instead.
Fixes: 300528542
Test: rotate the screen between different orientations, make sure the 3 buttons have the right order
Change-Id: Ibafafa9cab8e3f87e20b080868417692b8808dc4
When FEATURE_PC is enabled on a device,
DesktopNavbarButtonsViewController is instantiated. Previously,
DesktopNavbarButtonsViewController saves an internal copy of
mControllers and the mControllers field in NavbarButtonsViewController
is left unset. This was not a problem because mControllers in
NavbarButtonsViewController was not used in any code that was not
overridden by DesktopNavbarButtonsViewController.
ag/17944073 added some code that accesses mControllers in
NavbarButtonsViewController. Even though the code would be skipped for
FEATURE_PC devices (due to the TaskbarUIController check, which is
overridden by DesktopTaskbarUIController) in the end, it still caused an
NPE.
DesktopNavbarButtonsViewController does not require most of the button
updates done in NavbarButtonsViewController. Regardless, this CL
provides a workaround to avoid the NPE by setting mControllers in
NavbarButtonsViewController in FEATURE_PC devices.
Bug: 296623609
Bug: 297260211
Test: Manual; build and launch sdk_gpc emulator. Ensure that no crash
occurs
Change-Id: Ica22359b96fd0a277c575a238abb194d762e81ea
- There are flows where the shared taskbar state is updated prior
to being destroyed, and not updated to the latest values when
the taskbar is recreated.
ie.
unfolded -> lock screen -> LauncherTaskbarUiController's
mTaskbarInAppDisplayProgress[SYSUI_SURFACE_PROGRESS_INDEX]
is set to 1 due to the notif shade (lockscreen) showing.
This is written into TaskbarSharedState's sysuiStateFlags
and inAppDisplayProgressMultiPropValues.
fold -> TaskbarActivityContext is destroyed
unlock -> TaskbarManager and TaskbarSharedState's
sysuiStateFlags are updated while the device is folded
unfold -> TaskbarActivityContext is recreated and initialized
which restores from the shared state's
inAppDisplayProgressMultiPropValues. It also tries to reapply
the shared state's sysuiStateFlags, but this doesn't update
inAppDisplayProgressMultiPropValues because the state's
"enabled" state is not updated (default is no flag set, and
lockscreen sysui state is not set anymore).
-> The restored inAppDisplayProgressMultiPropValues value
results in the wrong translation.
- Note that after the above, the NavbarButtonsViewController state
is actually correct and reflects the SysUI state, but the
LauncherTaskbarUiController state is wrong. This CL tries to
manually update the ui controller to the correct state when it
is recreated.
- CL also fixes a separate issue where LauncherTaskbarUIController
could potentially overwrite the saved state progresses while
restoring them due to the state callback being called
Bug: 283346744
Test: Unfold -> Lockscreen -> Fold -> Unlock -> Unfold and ensure
the buttons are translated correctly
Change-Id: I43e473faf4fa2a493b9705506e3755df8f6264e7
Signed-off-by: Winson Chung <winsonc@google.com>
* Ignore orientation check from ag/22709055 for now,
that will be reverted. This causes recreateTaskbar() to
not run when folding the device
Bug: 274517647
Test: Tested 3 button nav in portrait/landscape/seascape
Flag: persist.wm.debug.hide_navbar_window
Change-Id: Ied02ead677d496b465c748257e32b7db5eb9580c
Recently we did color token migration for Taskbar which included navigation icon also, but phones and foldable device can't really adapt to new color tokens because of contrast issue with underlying wallpapers.
As a result, now home screen which default back to balck and white nav icon colors while all apps and in app navigation icon color will be themed to new GM3 Color tokens.
Test: Manual
Bug: 284408922
Flag: Not needed
Change-Id: I8c8ea11ebb7237885ae4673fda0409ab463b37db
* Update code behind flag to work with transient taskbar
* We explicitly set the mDestroyed flag to false in
TaskbarActivityContext because it gets set to true when
the flag is on, but nothing resets it unless it gets
recreated normally.
Bug: 274517647
Flag: persist.wm.debug.hide_navbar_window
Test: Enable flag and verify no crash
Change-Id: I9a149ffb47a10efedfc9dff8399d12d4c1a31553
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
sizes
Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
Since mTaskbarInAppDisplayProgressMultiProp is set by various states
that are hard to query in init() (e.g. state of all apps, -1, widgets,
etc.), we store the last mTaskbarInAppDisplayProgressMultiProp in the
TaskbarSharedState and restore those values in init().
Also updated some debug logs in the dump.
Test: manual: from home screen, swipe down to quick settings and toggle
Dark theme, ensure nav buttons don't translate; do the same but over
launcher all apps
Flag: none
Fixes: 267325761
Change-Id: Ib8e6778582ed39c674cd3c1e95312e673659f6a7
FlagDebugUtils.formatFlagChange() utility to always write the set of
updated flags, with a list of actual changes applied. Examples:
[allow_gesture|device_dozing] +[device_dozing]
[] -[state_started]
Additionally, moved the appendFlag utility to the new FlagDebugUtils
Test: manually verifed the output in logcat
Bug: 261418621
Change-Id: Ie4f2cfcd4b34f0a816db7845e1df4331babed07a
Persistent, taskbar can be in light or dark modes. Since notification
tray has its own background color, we should hide ours to avoid clashing
with it.
Test: Manual
Fix: 270758899
Change-Id: Iedc6aae42aac30987af3259ccee11c5998e10517
NavbarButtonsViewController has been massaged to make sure the buttons
contrast well with the color of the Taskbar background that they are on,
if applicable.
Test: Manual
Fix: 268052229
Change-Id: I917a1a1be013c304910b0f674ae8a13abb8e47a1
Merged-In: I917a1a1be013c304910b0f674ae8a13abb8e47a1
Currently rotation for IME rotates the whole view, including the background.
Fix: 266874111
Test: manual.
Change-Id: Iea310c99d0714d98ce534a0170316a0fb351f57d
- Make temporary taskbar background behind assistant non-touchable
(fail-safe in case the window isn't removed for some reason)
- Give temporary taskbar background a different window title and
add a couple more dump statements to help debugging
- Only show the taskbar background for persistent taskbar; transient
taskbar can skip most of the special casing and just hide it
- Fix bug where we weren't drawing the separate taskbar background in 3
button mode
- Fix bug where we weren't actually synchronizing
separateWindowForTaskbarBackground with TaskbarDragLayer, since the
former wasn't attached to the window yet; now we wait until it is
attached before calling synchronizeNextDraw()
- Also added dump logs for TaskbarDragLayerController alpha channels
Test: manual in 3 button and gesture nav (with and without
FORCE_PERSISTENT_TASKBAR enabled)
Fixes: 243652789
Bug: 262664266
Change-Id: I865871e57dd4cb255a916317a7e5d35cfde97df5
Taskbar already stashes when IME is showing, which hides the taskbar
icons in 3 button mode. Hence this extra flag seems redundant and breaks
Transient Taskbar, which allows unstashing taskbar over IME
Test: Install 3P keyboard, swiping taskbar up over IME still shows icons
Test: Connect physical keyboard, icons still hide in 3 button nav when
the IME switcher is showing
Fixes: 264723145
Change-Id: Iafb89e765668d70a1bfad2e136957a2ef8924514
- Add option for the rotation button to be positioned to the right
when in ROTATION_0
Bug: 265197526
Test: atest FloatingRotationButtonPositionCalculatorTest
Test: foldable-folded (floating rot button in sysui, natural rot=rot_0)
foldable-unfolded (floating rot button in launcher, natural rot=rot_0)
tablet (floating rot in launcher, natural rot=rot_270)
Change-Id: I856a0be2e10fceb34254cd58ceb58dfa8a1819bd
We are moving AnimatedFloat to launcher to be able to use this in class in launcher. Having it in launcher will allow us to do restore icon treatment animations to do with scaling the icon size
Bug: 254858049
Test: verified that the device still works
Change-Id: I1c4c47ab436c389a94abf7c910c1a44724efc955
* There were two separate blocks of code for sending insets
for Taskbar during SUW, consolidate those
* We also weren't changing Taskbar window height corresponding
to the added insets/change of height for different
orientations in SUW
Fixes: 253538830
Test: Went through SUW and switched orientations,
no back button overlap
Change-Id: Ifb3bc1c20a793ef062bf338a3bdf933b8ae98c28
* During a merge conflict we prevented
updateButtonLayoutSpacing() from running if device was
in setup mode, however the code that does setup layout
is in there.
Fixes: 254589281
Test: Went through setup, back button shows up
where expected
Change-Id: Ib496bfc0e3ac9023a9fc5071867c3779721ab8ab
* navButtonsLayoutParams marginEnd was removed, and
SUW was relying on that value to add margins to
SUW back button, but was returning 0.
Fixes: 242999939
Test: Visually observed in SUW test activity
adb shell am start -n com.google.android.setupwizard/.SetupWizardTestActivity
Change-Id: I5ffc421e9b731b0d9c7b7c48eab807d4419721b1
* TODO: Landscape/seascape support,
Separate nav spacing out into
separate class/add tests
Bug: 219035565
Change-Id: I8f5c007f04ea4d6df15962772806356181d764ff
* Add additional margin on nav buttons if
there's overlap w/ contextual button
* End spacing is dependent on grid layout
Bug: 223724516
Test: Tested on unfolded with different
grid sizes.
Change-Id: Ie814f35cd1f35629744050ee3f7242c5a8599883
Bug: 231213105
Test: from home, opened recents, then went back home, then went back to recents, resumed an app, then went back to recents and resumed the same app (both in 3-button and gesture nav)
Change-Id: I83b1b33cafb95353f36a126b93fcaf3b536d3bf4
Bug: 226489759
Test: connect to a physical keyboard in 3 button nav and make sure the ime switcher shows; and doesn't show with virtual keyboard
Change-Id: Ib9a5880eb1bd6d5b877a9f3789ce858f399c4910
Bug: 226489759
Test: connect to a physical keyboard in 3 button nav and make sure the ime switcher shows
Change-Id: Iabde149e8bcd1edacff8e039f956628c69341ecb
- Fade out icons (or stashed handle if stashed)
- Move background to APPLICATION_OVERLAY layer (behind VIW)
- Only for gesture nav
- On home screen in 3 button mode, translate buttons down when assistant
is invoked
Test: Invoke assistant, ensure it draws above taskbar background and
taskbar stops drawing icons or stashed handle
Bug: 225200928
Change-Id: I7807d30df8f358295b8231d89217c7413f32c6f9
Merged-In: I7807d30df8f358295b8231d89217c7413f32c6f9
We want to scale down the DeviceProfile for taskbar, but the all apps
window should rely on the original DeviceProfile.
Test: Manual
Fix: 232907361
Change-Id: Ia09f674ada9e445c1d7278fa94c536ea9de13ef9
Merged-In: Ia09f674ada9e445c1d7278fa94c536ea9de13ef9