Commit Graph

28869 Commits

Author SHA1 Message Date
Selim Cinek
4b510ab9b8 Merge changes from topic "media_refactor" into rvc-dev
* changes:
  Handling multiple players better
  Fixed an issue where GONE Views would show during transitions
  Fixing some issues where view was too short when created
  Made the animation logic more stable
  Measuring the Media Views now properly the first time its created
  When animating between states, animate the view width
  Factored out the media view manager from the hiearchyManager
  Migrated away from view detaching as a signal
  Work back in media uri loading that was changed in the refactor
  Media views now dynamically transition between media hosts
  Changed the quick settings layout for media
  Refactored the Media Player management
  Changing media to MotionLayout
  Made sure that we're only updating the media notification when inflated
2020-05-12 05:33:10 +00:00
Mady Mellor
f7f3ba1568 Merge "Use mock window manager for BubbleController in tests" into rvc-dev 2020-05-12 00:23:33 +00:00
Mady Mellor
59a7b980e5 Use mock window manager for BubbleController in tests
Bubbles are no longer part of the status bar window and
live in their own window now. This resulted in a new
window being created each time setUp step happened in
BubbleControllerTests without ever being removed, resulting
in OOM when running tests :(

This CL fixes it by using a mock window manager in tests.

Test: atest
Fixes: 155805511
Change-Id: Id1940aeb7ee94801fa5669a30a98e2ea9c92126b
2020-05-11 15:21:08 -07:00
Curtis Belmonte
3940a99593 Merge "Don't re-trigger face auth from notification shade" into rvc-dev 2020-05-11 21:51:10 +00:00
Curtis Belmonte
060a546ba1 Merge "Fix BiometricPrompt double TalkBack announcement" into rvc-dev 2020-05-11 20:27:56 +00:00
Josh Tsuji
6282ff9bc2 Merge "Add TYPE_TRUSTED_APPLICATION_OVERLAY." into rvc-dev 2020-05-11 20:24:34 +00:00
Josh Tsuji
6ad0b48b0a Merge "Fix PIP snapping to incorrect location." into rvc-dev 2020-05-11 20:23:56 +00:00
Curtis Belmonte
9dc6815ebc Don't re-trigger face auth from notification shade
Adds a condition to shouldListenForFace() that checks whether the
notification shade is in the locked state. This should prevent it from
re-triggering after previous authentication attempts (which seems to
have happened in b/155223318).

Test: atest KeyguardUpdateMonitorTest
Test: Unable to repro issue. Manually verified that unlocking from
notification shade still works.

Fixes: 155223318
Change-Id: Ibddb10e8f14d7bcbaa45d8471cca02719f6f758f
2020-05-11 10:46:27 -07:00
Adrian Roos
4869550555 Merge "GlobalActions: Disable IME focusability" into rvc-dev 2020-05-11 13:39:14 +00:00
Jeff Chang
8fdb8d4f34 Merge "Handle the WatchRotation failed" into rvc-dev 2020-05-11 06:33:51 +00:00
Lucas Dupin
f2570fbd42 Merge "Smoothly hide the keyboard" into rvc-dev 2020-05-11 02:05:45 +00:00
Selim Cinek
f418bb0275 Handling multiple players better
Previously the animation was completely broken with multiple players
since they were all laid out at 0 instead of the actual position.
Measuring the full layout is a bit too expansive, so we're
introducing some workarounds to only measure the players.

Test: add multiple players, observe transitions
Bug: 154137987
Change-Id: I1c424c980cf3b64f5a9d63ba058aa7e47f6e4156
2020-05-08 22:23:44 -07:00
Selim Cinek
8081f0940f Fixed an issue where GONE Views would show during transitions
Because we're clipping children and MotionLayout doesn't hide them
when collapsed, views could flicker onto the screen

Test: add media notification, swipe down to shade and back, observe no flickering
Bug: 154137987
Change-Id: Ida591706e779215e13c6d3047be7e3b5318b4d19
2020-05-08 22:23:44 -07:00
Selim Cinek
b28ec0a32f Fixing some issues where view was too short when created
The view was always created too small because we didn't
set the constraints in the beginning

Test: add new media notification, not clipped off
Bug: 154137987
Change-Id: Ifb9c95ba41be7392ec4b61e2b801b7420b811d3a
2020-05-08 22:23:44 -07:00
Selim Cinek
2d7be5f40f Made the animation logic more stable
We're now using the most recent state of the last attached location
for the animation start, since otherwise this could be flickering.
The animation could detoriate if the view wasn't attached
to the screen anymore as a result, which is fixed as well.

Bug: 154137987
Test: add media notification, observe
Change-Id: I1a6dfa651d676b3d620577fbd6c9e6a5d833dc0c
2020-05-08 22:23:43 -07:00
Selim Cinek
54809628f9 Measuring the Media Views now properly the first time its created
Instead of only knowing the measurement when its attached, we need
to know before otherwise the layout will be broken

Bug: 154137987
Test: atest SystemUITests
Change-Id: I8a4d90a7d933f477df65a5f26942059b0f0920da
2020-05-08 22:23:32 -07:00
Selim Cinek
3df592e5a8 When animating between states, animate the view width
Test: add media notification observe no flickery animation
Bug: 154137987
Change-Id: I909dd4427813b34426cc7d7fc08f298761f134bc
2020-05-08 22:23:32 -07:00
Selim Cinek
9e517f73a5 Factored out the media view manager from the hiearchyManager
It was always supposed to be separate, but we now finally
split it in preparation for the Viewpager refactor.

Bug: 154137987
Test: add media notification, observe :)
Change-Id: I1ae53ab1cb9bb67493fa4175e06687cb2b3b4b78
2020-05-08 22:23:32 -07:00
Selim Cinek
098baf4dd9 Migrated away from view detaching as a signal
Previously the seekbar update stopped pretty much
immediately since the Lifecycle was set to destroyed
whenever detatched.
We're now listening whenever a view exists.
Similarly, were we making the view inactive whenever
reattaching, which happens constantly now

Test: add any player, observe progress bar updating
Bug: 154137987
Change-Id: I5bac0822ceb282999db35c797d7355127b1daf31
2020-05-08 22:23:32 -07:00
Selim Cinek
c54367124c Work back in media uri loading that was changed in the refactor
Rebuilt ag/11180565 and fixed a few cases while doing so.
This also includes the fixes from ag/11270945

Test: play music from spotify
Bug: 154137987
Change-Id: Ib912df716d754f451b68b289920a2e138977b9bd
2020-05-08 22:23:32 -07:00
Selim Cinek
f0f7495c92 Media views now dynamically transition between media hosts
Let there be hosts and transitions.
This also enables us to build again after the rebase

Bug: 154137987
Test: atest SystemUITests
Change-Id: I8aaed1718b35be46abae0b0255793f37b8a1fbd2
2020-05-08 22:23:32 -07:00
Selim Cinek
b52642b8d2 Changed the quick settings layout for media
Previously media were side by side. Instead it's now
below the QS Tiles.

Bug: 154137987
Test: atest SystemUITests
Change-Id: I5d88ae26ebdae257167982c8fe0cca208032f043
2020-05-08 22:23:31 -07:00
Selim Cinek
5dbef2d99c Refactored the Media Player management
Previously all media instances had their own management
and it could easily happen that certain players
would get out of sync as a result. We now have
a unified architecture to listen to media notifications
and inflating a singular UI

Test: atest SystemUiTests
Bug: 154137987
Change-Id: I9f807e6431dd7cb54ca9b6d983379d770a281f31
2020-05-08 22:23:31 -07:00
Selim Cinek
d835792bb0 Changing media to MotionLayout
Bug: 154137987
Change-Id: Ice66b2bd79a837832cf1ea9bc3920690ac263a5a
2020-05-08 22:23:31 -07:00
Selim Cinek
b98e9ac621 Made sure that we're only updating the media notification when inflated
Previously the update was happening before inflation, but isMediaNotification()
actually depended on it.

Bug: 154137987
Test: add media notification fresh on lockscreen, without ever updating, observe media extracted to background
Change-Id: I8f7ef11d5c99f2905c4942c07a701bbc134c1307
2020-05-08 22:23:31 -07:00
Lucas Dupin
6f0ad152be Smoothly hide the keyboard
Fixes: 155980369
Test: manual
Test: atest KeyguardSecurityContainerTest
Change-Id: I678d9a04fdea6895c24cd4bdb77348cdeb2daced
2020-05-08 16:49:51 -07:00
Curtis Belmonte
bca44547d0 Fix BiometricPrompt double TalkBack announcement
Fixes an issue that caused the content description for the
BiometricPrompt background cancellation target to be read aloud twice by
TalkBack when the prompt was displayed.

Test: Manual:
1. Enable Talkback
2. Install the CtsVerifier apk
3. Launch app and select Biometric Tests > 4a: Cipher, Credential
4. Select "time-based key with biometric" to launch prompt

Before: TalkBack reads "Tap to cancel authentication. Tap to cancel
authentication, button."

After: TalkBack reads "SystemUI. Tap to cancel authentication, button."

Fixes: 155042588
Change-Id: I93f7380d87213aba8f1e1030510b84170ae9c2f7
2020-05-08 13:49:33 -07:00
Hongwei Wang
e63217a7b9 Merge "Do not show PipMenuActivity during expansion" into rvc-dev 2020-05-08 20:33:54 +00:00
Hall Liu
ee1249911a Merge "Convert Telephony broadcasts to be non-sticky" into rvc-dev 2020-05-08 19:27:56 +00:00
Dave Mankoff
6727245a59 Merge "Prevent NPE in PulseExpansionHandler" into rvc-dev 2020-05-08 18:44:47 +00:00
John Li
7da465dcfe Merge "Provide BatteryControllerImpl" into rvc-dev 2020-05-08 17:24:12 +00:00
Adrian Roos
284b32dc32 GlobalActions: Disable IME focusability
GlobalActions is a frequent path to take bugreports; this prevents
it from acquiring the IME focus, which destroys the IME state and
makes IME-related bugreports frequently useless.

Fixes: 156071729
Test: atest GlobalActionsImeTest
Test: Click any text field, long-press power, verify keyboard is still open (behind the power menu)
Change-Id: I396006f3e240c9e410dfa0dab60508d9e2a5ef5d
2020-05-08 18:55:35 +02:00
Jorim Jaggi
5e980bfd8b Merge "Revert "Fix pip enter/expand from split-screen secondary."" into rvc-dev 2020-05-08 15:46:39 +00:00
Beverly Tai
c7810730ba Merge "Remove uninflated notifs from allNotifs list" into rvc-dev 2020-05-08 13:17:43 +00:00
John Li
67fde31e1b Provide BatteryControllerImpl
- move the initialization methods out of the constructor and into an init method
- @Provides that ensures the init method gets called

Bug: 155685169
Test: atest SystemUITests:BatteryControllerTest
Merged-In: I064442fcf56397ba6394ee98ccf9cc82e589a0e3
Change-Id: Ifd7a3e41714b488ed7144f2344f7488184d48951
2020-05-08 20:54:23 +08:00
Jorim Jaggi
785edb4d0a Revert "Fix pip enter/expand from split-screen secondary."
This reverts commit dc1d29f0c3.

Reason for revert: b/156037652

Change-Id: I775a7cc92a4e891a1ffb42e8f4e20b336c47e858
2020-05-08 12:34:47 +00:00
Hongwei Wang
7c6224062a Do not show PipMenuActivity during expansion
When PiP window is enlarged to its expanded state, show the menu after
the expand transition is completed.

Video: http://go/recall/-/aaaaaabFQoRHlzixHdtY/PEn28BT2vdPmCMU6Cqpqy
Bug: 150810705
Test: manual
Change-Id: I62fd28e5568865de12d868719de401aabeb78d13
2020-05-08 00:27:01 -07:00
Jay Aliomer
830401575b Merge "Fixing stroked qs tile" into rvc-dev 2020-05-08 02:48:35 +00:00
Beverly Tai
89e616fa34 Merge "Remove HUN when user launches intent from its guts" into rvc-dev 2020-05-08 01:21:52 +00:00
Kevin Chyn
f67a780c33 Merge "[DO NOT MERGE] Add sysUiSessionId between BiometricService and AuthController" into rvc-dev 2020-05-07 23:22:02 +00:00
Jay Aliomer
54fda22191 Merge "Screen recording sound options" into rvc-dev 2020-05-07 23:20:35 +00:00
Kevin Chyn
fa7069d83c [DO NOT MERGE] Add sysUiSessionId between BiometricService and AuthController
Bug: 155420058

Test: BiometricPromptDemo, inspect logs

Change-Id: I47cffa4e8acb1e5f098572d26e47882ff5e9be26
2020-05-07 14:06:57 -07:00
Beverly Tai
71e343bd55 Merge "Allow group changes for newly visible notifs" into rvc-dev 2020-05-07 20:36:11 +00:00
Jeff DeCew
6980483555 Merge "Make implicit intent immutable." into rvc-dev 2020-05-07 20:20:32 +00:00
Lyn Han
d668678adb Merge "Show bubble by default when stack expands" into rvc-dev 2020-05-07 20:05:11 +00:00
Beverly
8ca664bd54 Remove uninflated notifs from allNotifs list
If a notification is cancelled before it's inflated, make sure we still
remove the notification from the mAllNotifications collection

Test: atest NotificationEntryManagerTest
Fixes: 155778759
Change-Id: Ib8dc9cca4dc600278584ab52c8a73f8665840d73
2020-05-07 14:46:50 -04:00
Robert Carr
b80a55cda8 PipAnimationController: Make sure we set crop when resetting scale
For example if we are going from small to large, then the
crop needs to be expanded in the same frame that we reset the
scale and complete the resize. This is how the free resize
path works, so we just make the animate resize path also
work this way.

Bug: 150810705
Test: Resize pip small to big. Everything works!
Change-Id: I41c8b41bada159908227991001dfa24e70bf8545
2020-05-07 18:06:58 +00:00
Jay Aliomer
0bd491ae55 Screen recording sound options
Adding options to screen recording
Internal and Mic audio combination

Fixes: 146340420
Test: manual
Change-Id: Ib3c3b6c78a4d075f22479897e7c9e93a29c4fd4f

Change-Id: If8d49ebba02150580d8caf3117d293aedcd648ff
2020-05-07 18:02:34 +00:00
Evan Rosky
074701fa30 Merge "Fix pip enter/expand from split-screen secondary." into rvc-dev 2020-05-07 17:17:04 +00:00
Lucas Dupin
0c07fe50e9 Merge "Recompute scrim alpha when enabling expansion" into rvc-dev 2020-05-07 16:47:32 +00:00