Commit Graph

897 Commits

Author SHA1 Message Date
Tracy Zhou
aec791162f Consolidate isTablet logic across launcher and SysUI
Fixes: 197960261
Test: Change display size; nav bar and task bar don't show up at the same time`
Change-Id: I8e213dd0a77b2c694af10186ee301b7a03969ab0
2021-09-23 20:54:52 -07:00
Nick Chameyev
a58a7d6a43 Merge "Add statusbar unfold animation" into sc-v2-dev 2021-09-14 09:43:21 +00:00
Nick Chameyev
edbea0fc97 Add statusbar unfold animation
Adds move from center animation to statusbar elements
such as battery icon, notification icons, etc.
when unfolding the device

Bug: 193794564
Test: manual
Change-Id: Ibd4548ee4c33ed3f2dfe7909916f6f64026bb71f
2021-09-13 11:03:48 +01:00
Nick Chameyev
3dc9302627 Merge "Use hinge angle sensor based unfold animation by default" into sc-v2-dev 2021-09-13 09:29:02 +00:00
Dave Mankoff
886addc29d Merge changes from topics "b194781951-flags", "revert-15798157-revert-15560568-b194781951-flags-8-ZUNMWRYIZP-RBPLTLZZWW" into sc-v2-dev
* changes:
  Revert^2 "5/N Remove PluginInitializer entirely."
  Revert^2 "4/N Remove #handleWtfs from PluginInitializer."
  Revert "Revert "3/N Remove #getPrivilegedPlugins from PluginInit..."
  Revert "Revert "2/N Rename PluginInstanceManager to PluginAction..."
2021-09-10 19:25:08 +00:00
Dave Mankoff
570aa53d5a Revert^2 "5/N Remove PluginInitializer entirely."
12d8e155ab

Change-Id: I9b98d1e218d590f1c753a6c257e61c6f99a8e6d8
2021-09-10 14:04:59 +00:00
Dave Mankoff
2d1f3a7afa Revert^2 "4/N Remove #handleWtfs from PluginInitializer."
f3a62151d0

Change-Id: Id988d944dc028a2f24a42a26c7faa85cb6d078b9
2021-09-10 14:04:59 +00:00
Dave Mankoff
3b44249990 Revert "Revert "3/N Remove #getPrivilegedPlugins from PluginInit..."
Revert submission 15798157-revert-15560568-b194781951-flags-8-ZUNMWRYIZP

Reason for revert: Restoring with a fix.
Reverted Changes:
I417dd4edd:Revert "5/N Remove PluginInitializer entirely."
Ia5f864646:Revert "4/N Remove #handleWtfs from PluginInitiali...
I70f22b6a5:Revert "3/N Remove #getPrivilegedPlugins from Plug...
I07a26c9ff:Revert "2/N Rename PluginInstanceManager to Plugin...

Change-Id: I9719833fe3888636fc56ba741918f87804f10fd7
2021-09-10 14:04:59 +00:00
Dave Mankoff
cb33c243d8 Revert "Revert "2/N Rename PluginInstanceManager to PluginAction..."
Revert submission 15798157-revert-15560568-b194781951-flags-8-ZUNMWRYIZP

Reason for revert: Restoring with a fix.
Reverted Changes:
I417dd4edd:Revert "5/N Remove PluginInitializer entirely."
Ia5f864646:Revert "4/N Remove #handleWtfs from PluginInitiali...
I70f22b6a5:Revert "3/N Remove #getPrivilegedPlugins from Plug...
I07a26c9ff:Revert "2/N Rename PluginInstanceManager to Plugin...

Change-Id: I84f52b4222efc9bf406512e45a4ff523681ab77b
2021-09-10 14:04:59 +00:00
Dave Mankoff
be86cc2d0b Revert "2/N Rename PluginInstanceManager to PluginActionManager."
Revert submission 15560568-b194781951-flags-8

Reason for revert: Broken build.
Reverted Changes:
Ie522ae3cc:5/N Remove PluginInitializer entirely.
Icaeaaee28:4/N Remove #handleWtfs from PluginInitializer.
I1c86c246c:3/N Remove #getPrivilegedPlugins from PluginInitia...
Id525f27e3:2/N Rename PluginInstanceManager to PluginActionMa...

Change-Id: I07a26c9ff526d6c2af194d53282cc8133371efb1
2021-09-09 21:17:24 +00:00
Dave Mankoff
6ae34f5d60 Revert "3/N Remove #getPrivilegedPlugins from PluginInitializer."
Revert submission 15560568-b194781951-flags-8

Reason for revert: Broken build.
Reverted Changes:
Ie522ae3cc:5/N Remove PluginInitializer entirely.
Icaeaaee28:4/N Remove #handleWtfs from PluginInitializer.
I1c86c246c:3/N Remove #getPrivilegedPlugins from PluginInitia...
Id525f27e3:2/N Rename PluginInstanceManager to PluginActionMa...

Change-Id: I70f22b6a51a13f967f627e0b47c0f20c18fb4eb1
2021-09-09 21:17:24 +00:00
Dave Mankoff
f3a62151d0 Revert "4/N Remove #handleWtfs from PluginInitializer."
Revert submission 15560568-b194781951-flags-8

Reason for revert: Broken build.
Reverted Changes:
Ie522ae3cc:5/N Remove PluginInitializer entirely.
Icaeaaee28:4/N Remove #handleWtfs from PluginInitializer.
I1c86c246c:3/N Remove #getPrivilegedPlugins from PluginInitia...
Id525f27e3:2/N Rename PluginInstanceManager to PluginActionMa...

Change-Id: Ia5f864646ee8806ec4080349dda3d71c827c1e40
2021-09-09 21:17:24 +00:00
Dave Mankoff
12d8e155ab Revert "5/N Remove PluginInitializer entirely."
Revert submission 15560568-b194781951-flags-8

Reason for revert: Broken build.
Reverted Changes:
Ie522ae3cc:5/N Remove PluginInitializer entirely.
Icaeaaee28:4/N Remove #handleWtfs from PluginInitializer.
I1c86c246c:3/N Remove #getPrivilegedPlugins from PluginInitia...
Id525f27e3:2/N Rename PluginInstanceManager to PluginActionMa...

Change-Id: I417dd4eddb0216e351a4eb1870a35f3ebc84045a
2021-09-09 21:17:24 +00:00
Dave Mankoff
bfb3a7a831 5/N Remove PluginInitializer entirely.
This class no longer serves any purpose.

Bug: 194781951
Test: atest SystemUITests && manual
Change-Id: Ie522ae3cc493817d83824c19b642664ce8b57c9f
2021-09-09 13:41:06 -04:00
Dave Mankoff
b07994d29a 4/N Remove #handleWtfs from PluginInitializer.
This method never did anything because of the way its member
constants were set.

Bug: 194781951
Test: manual
Change-Id: Icaeaaee28ddcc046252f01e8a9c0442605a93219
2021-09-09 12:22:48 -04:00
Dave Mankoff
0b7ba4662a 3/N Remove #getPrivilegedPlugins from PluginInitializer.
First step along the path of removing PluginInitializer entirely.

Bug: 194781951
Test: manual
Change-Id: I1c86c246c3dea4ce08263ff16bc575d25feb17bc
2021-09-09 12:22:48 -04:00
Dave Mankoff
ecc3306fdc 2/N Rename PluginInstanceManager to PluginActionManager.
Introduce PluginInstance.

PluginManager is in charge of coordinating the whole plugin system.

PluginActionManager is in charge of querying for the PackageManager
for plugins matching a specific action.

PluginActionManager creates PluginInstances for each package it finds,
and the PluginInstance is in charge of loading in the actual plugin
into the system.

This is another step down the path of being able to manually load in
plugins into the code before the PluginManager is ready.

Bug: 194781951
Test: atest SystemUITests && manual
Change-Id: Id525f27e362c29625168b56dc55f2899cd3f8810
2021-09-09 12:22:48 -04:00
Nick Chameyev
a250b92ebc Use hinge angle sensor based unfold animation by default
Enables hinge angle driven unfold animation by default
on devices where hinge angle sensor is available,
uses fixed timing transition otherwise.

Bug: 195404647
Test: manual
Change-Id: I36e85a67664dcc579c18bfef870158e86aa921b9
2021-09-09 14:34:57 +01:00
Nick Chameyev
f9f94bb4a2 [Taskbar icons unfold animation issue] Do not take into account initial translation
Removes taking into account initial translation in
move from center animation. Initially it was done
because in StatusBar items are aligned using translations
but we decided to use different approach there so it is
not necessary anymore.

Now move from center animator can only set translations
from positive/negative value when progress is 0 and sets
it to 0 when progress is 1 (previously it was 'capturing'
the initial translation and animated the translation to
its original value).

Taskbar icons are pre-aligned using translations when
user is on launcher. After several folds/unfolds these
translations were accumulating that led to incorrect
positioning of the icons.

Found one more issue that we didn't clear the animated
views list after finishing the animation in taskbar unfold
animation controller but it didn't affect the animation
itself.

Test: atest com.android.systemui.shared.animation.UnfoldMoveFromCenterAnimatorTest
Test: unfold on launcher and use gesture nav to swipe to an app
Fixes: 199126683
Change-Id: I159313aae50a19bbef8c79f227dcae0d5463872d
2021-09-09 13:56:27 +01:00
Evan Rosky
ac3bddc1ce Merge "Wrap IRemoteTransition in a parcelable to enable extra properties" into sc-v2-dev 2021-09-03 19:53:10 +00:00
Evan Rosky
bc94c3d524 Wrap IRemoteTransition in a parcelable to enable extra properties
This is in preparation for attaching some extra meta information
to remote transitions (eg. process token). Most of this refactor
just replaces references to the raw interface with references
to the wrapper class.

There is also a small refactor in RemoteTransitionHandler to
better-manage death-recipients. It is possible to have >1 filter
and >1 pendings referencing the same remote simultaneously, so
this arrangement properly handles the 1-to-many possibility.

Bug: 183993977
Test: refactor, so existing tests pass
Change-Id: Icae8f2128e0ffdf7aee51284cba106963450e3e7
Merged-In: Icae8f2128e0ffdf7aee51284cba106963450e3e7
2021-09-03 17:19:44 +00:00
Shawn Lin
97b0de7326 Merge "[DO NOT MERGE]Support rounded corner for multi-display devices" into sc-v2-dev 2021-09-03 03:57:09 +00:00
Ben Lin
f596b7c8f0 Merge "Populate window configuration from TaskInfo." into sc-v2-dev 2021-09-02 17:11:09 +00:00
Lucas Dupin
29fcd49be9 Merge "Use a SC wrapper when running on background thread" into sc-v2-dev 2021-09-02 16:37:43 +00:00
Tiger Huang
a42a8d6bf3 Merge "Invoke insets animation callbacks when resizing system bars" into sc-v2-dev 2021-09-02 11:12:17 +00:00
Ben Lin
ceb064a7db Populate window configuration from TaskInfo.
Bug: 198352321
Test: Start a shell transition that converts to RemoteAnimation, see
windowConfiguration populated correctly

Change-Id: I14276dbb8e52e9c9b75587e5919793d3fab48b5d
2021-09-01 15:33:46 -07:00
Lucas Dupin
fea3fd475d Use a SC wrapper when running on background thread
The call that registers a sampling listener happens on the background,
to avoid blocking the main thread. This ca cause the SurfaceControl to
become invalid before we apply it.

Test: atest CompositionSamplingListenerTest
Test: manual
Fixes: 195405459
Change-Id: Iee599b14b905d03c59cb919f70bf2e35144f5a22
2021-09-01 09:34:30 -07:00
Nick Chameyev
8c88a0c34b Support hinge angle sensor in unfold animation
Allows to use real hinge angle sensor to drive
unfold animation. Adds starting folding animation
when reaching certain angle threshold.

Bug: 195404647
Test: manual
Change-Id: I94cdd5f8832eb6439408f8c2f8ff85da9788ee98
2021-08-25 13:39:35 +01:00
shawnlin
6603444a76 [DO NOT MERGE]Support rounded corner for multi-display devices
- Add new array configs for every rounded corner configs.
- Update rounded corner drawable when a display changes in
  ScreenDecorations.

Bug: 131221697
Test: atest DisplayCutoutTest RoundedCornersTest LocalDisplayAdapterTest
      ScreenDecorationsTest
Change-Id: I1f32ff680609267010b05a39a5b8e84511bf1243
2021-08-25 15:58:28 +08:00
Nick Chameyev
f8f5a07f1d Merge "Update unfold transition package name" into sc-v2-dev 2021-08-19 10:53:44 +00:00
Vinit Nayak
02a884cf9c Merge "Pass through home/back/recents disable flags via sysuiFlags" into sc-v2-dev 2021-08-18 20:54:09 +00:00
Nick Chameyev
caf226bfb0 Update unfold transition package name
These changes contain only updating of the package name.
Changing it to more specific package name in order to
not confuse with Android SDK classes.

Bug: 190818044
Test: manual
Change-Id: Id9d88b9d51c8033387f693fc96ed97651b535f6c
2021-08-18 17:22:18 +01:00
Vinit Nayak
54281a4fdf Merge "Pass RecentsAnimationTargets to shell to reparent" into sc-v2-dev 2021-08-17 23:26:52 +00:00
Vinit Nayak
a67edf7448 Pass through home/back/recents disable flags via sysuiFlags
* Create new SysUIFlag for back disabled, similar to
home/recents disabled

Bug: 194870114
Test: Locking screen w/ 3 button nav
w/ various keyguards

Change-Id: Ie9522fa2b893d98754be1b3ae5c17fb8bfe8ae57
2021-08-17 14:07:25 -07:00
Dave Mankoff
498d436d54 Merge "1/N Move plugin loading into PluginInstanceManager." into sc-v2-dev 2021-08-17 13:07:49 +00:00
Tracy Zhou
2e7147fcb9 Move RegionSamplingHelper to SysUI shared
Bug: 193938970
Test: N/A
Change-Id: I1d9024f5fa690187e8c32251153497a9ea8fe9f0
2021-08-16 18:24:46 -07:00
Dave Mankoff
67cf37f39b Merge "Remove custom PluginHandler from PluginInstanceManager" into sc-v2-dev 2021-08-16 15:05:20 +00:00
Dave Mankoff
b325b69f12 Merge "Remove custom MainHandler from PluginInstanceManager" into sc-v2-dev 2021-08-16 15:04:51 +00:00
Dave Mankoff
6b201d2575 Merge "Daggerize Plugin code." into sc-v2-dev 2021-08-13 21:12:40 +00:00
Vinit Nayak
2bf30747c7 Pass RecentsAnimationTargets to shell to reparent
Reparent activity windows to DefaultDisplayArea
so they can be animated across full screen

Bug: 192292305
Change-Id: I217c33f015fe87902abe45514b9b252bd3022239
2021-08-13 13:02:05 -07:00
Chris Li
a5e7ce9b16 Merge "Invoke keyguard going away when it is collecting for wake" into sc-v2-dev 2021-08-12 18:32:53 +00:00
Nick Chameyev
ef994701aa Merge "Add unfold animation to launcher icons and widgets" into sc-v2-dev 2021-08-11 18:04:03 +00:00
Nick Chameyev
ec1c14268c Add unfold animation to launcher icons and widgets
Adds unfold animation to launcher which translates
icons and widgets from the center to the sides on
foldable devices.

Bug: 193794541
Test: manual
Change-Id: I35ca08d0fa45d09e9104f4324f9879206e806caf
2021-08-11 13:49:41 +01:00
Chris Li
2c0834c5e5 Invoke keyguard going away when it is collecting for wake
Before, when KEYGUARD_GOING_AWAY is called before WAKE starts,it will
not be passed to the keyguard service to dimiss keyguard. Now, we
merge the flags and add check for that.

Bug: 193564917
Test: check with/without sEnableRemoteKeyguardAnimation
Change-Id: I28d40664b4fbdc0ea199baa32ccefba7dea473f8
2021-08-10 11:26:31 -07:00
Ben Lin
a50d29727a Pass AppOps result for PiP to Transition change.
Bug: 194272108
Test: Enable shell transitions, enter PIP
Change-Id: Ic39840615df9c270187f9f810a6755fa22b585b7
2021-08-09 14:32:54 -07:00
Dave Mankoff
e1878759dd 1/N Move plugin loading into PluginInstanceManager.
The PluginInstanceManager now manages plugin instances. It loads
them, when instructed to do so by the PluginManager.

This is an imperfect cl - the first of a few to come. Right now,
the PluginInstanceManager is not focused on only loading its specific
instance. This will change.

Bug: 194781951
Test: manual && atest SystemUITests
Change-Id: I2006d623c9d9d2d1020097c567fc7af56a06a83b
2021-08-09 12:44:34 -04:00
Dave Mankoff
bf2fd66e55 Remove custom PluginHandler from PluginInstanceManager
Use an executor instead.

Bug: 194781951
Test: manual && atest SystemUITests
Change-Id: Iab6bdae1802e9723c2206aabe31a08bd0a596dad
2021-08-09 11:46:10 -04:00
Dave Mankoff
33ce3e1f67 Remove custom MainHandler from PluginInstanceManager
Also removes the "one shot" related methods which weren't used
and complicated the MainHandler related code.

Bug: 194781951
Test: manual && atest SystemUiTests
Change-Id: Ie824442ce55fe09649373bd2fc4f6eb47988b244
2021-08-09 11:45:33 -04:00
Dave Mankoff
03262298bd Daggerize Plugin code.
Restructure the dependencies within all the plugin code
and make it suitable for injection.

There is still a lot of gnarly code in the plugin architecture,
and this is the first step towards cleaning it up.

This is also the first step towards being able to load plugins
(like the FlagReaderPlugin) _before_ the dagger graph is setup. With
this change, it is theoretically possible to directly construct
the plugin infrastructure, rather than relying on calls to
Dependency#get and other SystemUI idiosyncracies.

Bug: 194781951
Test: manual && atest SystemUITests
Change-Id: I04da3d12211d9f9d1a5c2c5cd27b6a2d81c3907e
2021-08-09 11:45:28 -04:00
Wu Ahan
d6d30bf7f6 Merge "Support surface only instrumentation" into sc-v2-dev 2021-08-02 10:06:03 +00:00