The pending intent of notification may launch the activity indirectly,
e.g. service or receiver. Before the activity is started, the
notification may be canceled, then the notification view is detached.
And View#post will only put the runnable to a list that will be
executed until attach again. So in this case since the notification
view is removed, the remote animation is never executed that leads to
remote animation timeout and the activity jumps cut without animation.
This fix ensures that the handler to animate is valid.
Also fix a flickering issue that if activity doesn't draw fast enough
(ActivityLaunchAnimator#ANIMATION_DURATION) then the notification panel
has started to collapse. The notification view may have clip bottom
larger than its actual height, that causes negative crop (as no crop)
height of the animating surface. So the first frame will show fully
height and then start to animate from the height close to zero.
This fix ensures that the crop height is at least zero.
Fixes: 158207087
Test: atest ActivityLaunchAnimatorTest
Test: Send a notification which will start a service. The service
cancels the notification and starts a activity with >500ms
delay. Check the launch animation should run smoothly.
Change-Id: I78426db1ce295c633271fcaa685b47cc9f697761
Fixes: 158288114
Test: manual - Cast from Spotify. Dismiss the app. Cast from Spotify
again and look at the device shown in the QS player. It should not show
"Phone speaker".
Test: atest tests/src/com/android/systemui/media/MediaDeviceManagerTest.kt
Change-Id: I637f304f4b7e35ec7dfa7b0b30593d9fcf50a586
Expand/collapse animations work by applying a matrix to the expanded view container - this is a) fast b) allows for pivot scale animation c) works around some weirdness with "actually" scaling the view, since the matrix transform is applied after the AV draws.
Switch animations work by snapshotting the current bubble's surface into graphics memory, rendering that into a SurfaceView, and animating the SurfaceView out. Memory profiler indicates this does not use additional memory (since those pixels were already in graphic memory anyway, and released as soon as the animation ends).
Test: lots and lots of manual testing
Fixes: 123306815
Fixes: 135137761
Merged-In: I0b01dab4bb0c82873afc55d054bafc672bacc8bf
Change-Id: I0b01dab4bb0c82873afc55d054bafc672bacc8bf
Remove the channel specific controls and replace the conversation
icon with the app icon to make it clearer what the scope of the text
and linked controls is
Test: atest
Fixes: 158592601
Change-Id: I6056e9de37d68e4236b483bcc3ebc6d3b0557e35
1) Bubbles that are persisted no longer have an entry in
some cases this wasn't being handled correctly (i.e.
persisted bubbles would never autoexpand)
2) Removed the custom work to promote something from the
overflow -- in most cases we should be able to update
flagBubble & rely on the subsequent notification update
which minimizes the # of code paths
3) mPendingBubbles makes more sense as a HashMap
4) The visibility fix: If the bubble switched from a
shortcut to a pending intent, we would skip making the
view visible
Fixes: 158480978
Fixes: 157755108
Test: atest BubbleControllerTest
Test: manual - create a shortcut bubble
- reboot the device
- promote that bubble from the overflow
=> ensure that it auto-expands
- collapse the stack
- receive an update for that bubble but
now it's a pendingIntent
- open the stack
=> ensure that the view is visible
Change-Id: I37dc780e9a66b9e2f2ae46b5386dcd291dc0e0ab
Log recording start, end from qs tile, and end from notification
Fixes: 147503450
Test: atest RecordingServiceTest ScreenRecordTileTest
Test: manual with go/aster-event-viewing, verified correct IDs logged
Change-Id: I1b631cfb82c087ad4c08f074795ae3a8b170e714
BubbleDataRepository tried to read the xml file before a write,
and the xml file is only created on write if it didn't exist,
which caused the FileNotFound exception.
Bug: 158231089
Test: BubblePersistentRepositoryTest
Change-Id: I7cd75b1d74be277df49f433338ad814ce50c87c1
Prevent the credential UI from resizing when the IME appears
or disappeares. Fixes the issue where the window behind us is
briefly shown behind the IME area, before the IME is fully
animated in.
Fixes: 157910732
Test: atest com.android.systemui.biometrics
Test: 1) Set up work profile, set up separate challenge (password)
2) Open work profile app, close app, lock screen
3) Open work profile app, go to credential UI, toggle IME
multiple times. Window behind (launcher) is not seen
Change-Id: Id5b9a43fb76a63063abe64c578d7fa3492be4bdd
If the ProximitySensor passed into ProximityCheck is shared with other
clients, the ProximityCheck was causing the ProximitySensor to be
paused which, in turn, meant other clients would miss out on events.
Specifically, this manifested itself in AOD/Doze where one part of
Doze wanted the proximity sensor registered, but another part used
ProximityCheck with the same sensor, causing the sensor to be
paused. The screen would either not turn off when covered, or would
not turn back on when uncovered.
This CL is a cherry pick of an earlier CL that went into rvc-d1.
Some slight differences are seen since the proximity code in rvc-d1
has diverged from rvc, but the logic needed for the fix is the same.
Fixes: 155365422
Test: atest SystemUITests and manual
Change-Id: I3c3faf79ba6d3915b0cfecec7861f6065ae689e8
Merged-In: I3c3faf79ba6d3915b0cfecec7861f6065ae689e8
WeakHashMap holds strong references to values, so if we would like to
have them cleaned up automatically we need make sure we don't reference
the key strongly in the value.
Bug: 149918957
Test: Bubble animation looks OK.
Test: No GC root paths through PhysicsAnimator.
Test: atest PhysicsAnimator
Change-Id: I4e701bfb7f91662e18c317eaf895b5ea31e0860d