Pulls appart UI, state, power, display and trigger management
into individual components controlled by a state machine.
Also adds tests.
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: I6ee7e79d58a5a3ebeb975775af44ad1e5aaccf93
Test: Enable in SysUI tuner, drag PIP. This is only experimental to help
figure out what UX we want to keep.
Change-Id: I0d6f2f0c5909d6a76aae4a8fb84c5076f6996fdd
Test: Enable SysUI tuner, tap once on PIP to interact with the activity.
This is only experimental behaviour, and
android.server.cts.ActivityManagerPinnedStackTests will be updated
accordingly if we keep this behavior.
Change-Id: I278ab8c360c44718cfcac0fd761f476a875f9b15
There was some window animation jank because we ran a layout during
the animation, as the SysUI animations are slightly faster, so we
collapsed the window already during the animation which caused
a layout which caused window animation jank.
Bug: 32057734
Change-Id: I296f961be8cfc39b08859b7d3d41f1e81b2eaaa3
- Unifying logic to ensure that the PIP is moved consistently as its
movement bounds are shifted. This is done by adding a snap fraction
which is a fraction relative to one set of movement bounds, and applied
to a new movement bounds. This is flexible to work with all of the
current snap modes being tested.
- Fixing issue where you can drag out of bounds when touching the PIP
before the IME shows.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackOffsetForIME
Change-Id: Ie68c1ca599f6196726b8224585974a0972b93701
Signed-off-by: Winson Chung <winsonc@google.com>
Window tokens can now only be on one display, so we now require clients
that want to add/remove window tokens to specify the display they would
like the token to be created on. This simplifies the token handling code
in WM and will be useful moving forward for clients that want to add
windows to external displays.
Test: Existing tests pass
Change-Id: I6b2d8d58a913b3624f1a9a7bebbb99315613f103
* changes:
The big keyguard transition refactor (6/n)
The big keyguard transition refactor (5/n)
The big keyguard transition refactor (4/n)
The big keyguard transition refactor (3/n)
The big keyguard transition refactor (2/n)
The big keyguard transition refactor (1/n)
Cleanup:
- Make sure all the state is nicely dumped.
- Remove some unused stuff.
- Fix a flicker when occluded -> unlocked
Bug: 32057734
Change-Id: Id87e26adccef740d608b325c2dc1f6db14dd4ec3
The heart of this change are two things:
1) Instead of using the force hide mechanism to hide windows behind
Keyguard, we actually make the activities invisible in activity manager.
2) When Keyguard is going away, we change the visibilities in activity
manager and run an app transition.
At the very core we move the responsibility of hiding activities to
ActivityStack, which checks whether Keyguard is showing, and then
hides all non-show-when-locked activities. For that, we need to check
whether any window of an activity has SHOW_WHEN_LOCKED set. We
introduce a callback from WM -> AM in case these Keyguard flags have
changed.
Furthermore, we decide whether to occlude Keyguard in KeyguardController,
which just checks whether the top activity has SHOW_WHEN_LOCKED set. When
this state changes, we prepare an occlude/unocclude app transition, and
in PWM we just inform the Keyguard about the animation so SysUI can play
along this animations in a mostly synchronized manner.
Since we now use an app transition when unlocking the phone, we get
lockscreen launch animations for free - window manager automatically
waits until the activity is drawn, or directly executes the transition
if there is nothing to animate. Thus, we can remove all the infrastructure
around "waitingForActivityDrawn".
The logic to show/hide non-app windows is moved to policy, and we add the
ability to run animations on non-app windows when executing an app
transition.
Test:
1) runtest frameworks-services -c com.android.server.wm.AppTransitionTests
2) Manually test unlocking Keyguard:
2a) Without security
2b) With security
2c) With security but trusted
2d) Portrait while activity behind is in landscape
3) Test launching things from Keyguard
3a) Without security
3b) With security
3c) Launch camera without security
3d) Launch camera with security
3e) Launch camera with securtiy and trusted
3f) Launch voice affordance
4) Set no notifications on lockscreen, drag down, make sure you get
the correct animation
5) Test clicking "emergency" on bouncer
5b) Test "Emergency info" on emergency dialer
5c) Test clicking edit button on emergency info, should show pattern on
Keyguard
Bug: 32057734
Change-Id: Icada03cca74d6a612c1f988845f4d4f601087558
- Apps cannot update their channel settings after creation.
- Importance is required when creating a channel.
- Some method name changes.
- Ranker can't modify fields a user has changed.
- High and Max importance mean the same thing.
- The default channel adopts app wide settings on creation.
- The default channel is limited to importance low once target api is post n mr1
unless the user changed it.
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/notification
Change-Id: I73c449a6abe6d709046de79c5c54339cb2edf0b8
Fixed by capturing the correct task algorithm margin sizes and
conducting a re-inflate on the TaskStackHeader upon configuration changes.
Bug: 30370789
Fixes: 30370789
Test: manual - changed display sizes and toggled rencents
Change-Id: Ia1b823433ea1920293cdeca6b7e48ffe15f78b61
- Creating a PinnedStackController to keep track of the state of the PIP
to prevent changes in the system (ie. IME showing) and user interaction
from clobbering each other.
- Refactoring calls in AM into WM/controller
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: Ie59dfd45d5c54764ba69a589b3b8148845e92cc3
Signed-off-by: Winson Chung <winsonc@google.com>
Refactor task change notification logic into a separate class
TaskChangeNotificationController.
Add ActivityManagerService.unregisterTaskStackChangedListener
Add a no-op implementation that clients can subclass to avoid
having to reimplement all new methods when they are added.
Add new methods:
onTaskAdded
onTaskRemoved
onTaskMovedToFront
onTaskDescriptionChanged
onActivityRequestedOrientationChanged
onTaskFinishing
Design doc:
https://docs.google.com/document/d/1IgWZ44rKe9k1CzkjP2Mohv12OgRD1FxH8oLAyzhvCY4/edit#heading=h.yhzl6os0dbo5
Cherry-picked from I8302d6d3baf1ac1ca928765fe203091b9fab4070
Bug: 32277482
Test: Verify that callbacks are called in dummy implementations
Change-Id: I2ac2b870147ef049f3ee05fc5916c99332334526
Should be used only during dev to avoid having to turn crashing
plugins back on constantly.
Test: Manual
Change-Id: I2f2a461bf7aef017781ed3b61fcb216d7e1cbae9
Send a broadcast back and forth to speed up the rate at which plugins
are enabled or disabled.
Also update make files to handle exclude tests better.
Test: Manual
Change-Id: Ic8f45c663c3a5e5fd4b3e9e2f79480e155845c14
When there are no recents items shown, any tap or swipe will dismiss it
and go back to the launcher.
Bug: 31464845
Fixes: 31464845
Test: manual - overview with no recents and tap the screen to dismiss
Change-Id: I98987daf4d064e3f65141f790e68018fcf445c26
- When device rotates, ensure that the PIP continues to show in the
same aspect ratio, snapped to the same logical snap point.
- Move common snapping code to policy so that it can be shared between
SystemUI and the framework.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackInBoundsAfterRotation
Change-Id: I2d9f1a2dc077a55c39acc1ccba982c255e2ff3a4
- Ensure we use the right display size when calculating PIP bounds.
- Also update interface to take the display id.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackDefaultBounds
Test: #testPinnedStackMovementBounds
Change-Id: I01fd8ba6dee212c29a9a092673ee8f7843e41af6
The linear layout that represents the buttons in the nav bar are added
programatically. Its xml layout values are overwritten, so set the
gravity to to center in its parent to ensure the buttons are always
centered.
Change-Id: Id4d380e8010e316907bc31f0ee6bc8d4624c6667
(cherry picked from commit 288c1c41d5784ba0f5912709b3101abcd8cd7e2a)