Commit Graph

475638 Commits

Author SHA1 Message Date
Beth Thibodeau
d664de2cd5 Update when media controls get cleared
Some apps include an action to dismiss a media notification, so we
should listen for that happening and clear controls in that case.

Also, remove STATE_CONNECTING as a condition to clear controls -
This was originally added in ag/11056932 as a workaround for an issue
with YouTube cast sessions. However this caused issues with other apps
like Spotify which set STATE_CONNECTING while still active. YT was using
that as a workaround for legacy behavior and will update to use
STATE_NONE for R+ builds (b/155213698). In the meantime, listening for
when the notification is removed will also work to clear YT's controls
as expected.

Fixes: 154953276
Fixes: 155029855
Test: manual

Change-Id: Ie9320e1406c1f457a39f67705ec1ffcb3a983488
2020-04-29 04:23:09 +00:00
Jeff Sharkey
0920ccba1a Merge "Fix inconsistent MIME type mapping." into rvc-dev 2020-04-27 20:37:01 +00:00
Beth Thibodeau
6acf4dfeca Merge "Check URI is valid for loading images" into rvc-dev 2020-04-27 20:29:30 +00:00
Heemin Seog
beb2f1f9ad Merge "Prepare for flexible system bars" into rvc-dev 2020-04-27 20:23:20 +00:00
TreeHugger Robot
f35adda035 Merge "Fix tooltip crash and positioning" into rvc-dev 2020-04-27 20:20:39 +00:00
Heemin Seog
7fc97ad189 Merge "Connect to hvac in background thread, post status icons init" into rvc-dev 2020-04-27 20:13:29 +00:00
TreeHugger Robot
24ec473937 Merge "Fix lock icon animation for bio-auth." into rvc-dev 2020-04-27 20:11:32 +00:00
Matt Casey
76942bc683 Merge "Clear back stack when editing a screenshot" into rvc-dev 2020-04-27 20:09:46 +00:00
Robert Snoeberger
44eb5ae04c Merge "Add logs to help debug the transfer chip disappearing" into rvc-dev 2020-04-27 20:06:20 +00:00
TreeHugger Robot
c1ddf61ca7 Merge "Cleanup: remove DSS RemoteException references" into rvc-dev 2020-04-27 19:57:53 +00:00
TreeHugger Robot
1ef9f259c4 Merge "Keep the intent resolver button bar stuck to the bottom." into rvc-dev 2020-04-27 19:53:32 +00:00
TreeHugger Robot
9153a323fd Merge "Update one-line layout for conversation notifs" into rvc-dev 2020-04-27 19:53:23 +00:00
TreeHugger Robot
18f35e5747 Merge "Fixed TopNotificationPanelViewMediator to register drag open listener on top bar." into rvc-dev 2020-04-27 19:49:40 +00:00
Ytai Ben-tsvi
bb2f50e768 Merge "Fix deadlock between APS and sound trigger middleware" into rvc-dev 2020-04-27 19:47:32 +00:00
Mehdi Alizadeh
082d0c47b7 Merge "Adds unit tests for ShortcutChangeCallback APIs" into rvc-dev 2020-04-27 19:34:25 +00:00
Riddle Hsu
009c800f55 Merge "Remove unnecessary cleanup procedures of WmTests" into rvc-dev 2020-04-27 18:59:53 +00:00
Chavi Weingarten
5d2781b772 Merge "Added takeScreenshot API to WindowOrganizer" into rvc-dev 2020-04-27 18:59:49 +00:00
TreeHugger Robot
997d9eb807 Merge "Add null check for retrieved package." into rvc-dev 2020-04-27 18:58:25 +00:00
Dave Mankoff
5dcdec7eb2 Fix lock icon animation for bio-auth.
1) Ensure lock icon animates when using biometric authentication to
unlock a device.

2) Don't animate the lock twice. Accomplished by waiting to clear
the biometric authentication credentials until after we've started
the keyguard dismiss animation. When we cleared them before the
animation, the keyguard would be left in an inconsistent state where
it would be non-dismissable but also not-yet animating away, meaning
the keyguard appeared locked to the rest of the codebase.

Fixes: 153117689
Test: atest SystemUITests && manual
Change-Id: I8c2390e5f3ca2d366d377f6da5822f24ca311c2f
Merged-In: I8c2390e5f3ca2d366d377f6da5822f24ca311c2f
2020-04-27 18:57:07 +00:00
TreeHugger Robot
d98b964b80 Merge "Ensure media resumption controls have a title" into rvc-dev 2020-04-27 18:55:58 +00:00
Fabian Kozynski
ebff98b7a9 Fix tooltip crash and positioning
There was a missing attribute that was crashing on inflating the
tooltip. Also, after adding animations, positioning was wrong.

Test: manual
Fixes: 154955165
Change-Id: I44b48e158e48f867e6268fc5493c3d9f987c617d
2020-04-27 14:48:55 -04:00
TreeHugger Robot
756662fb2f Merge "Inform receivers of restart attempt previous visibility" into rvc-dev 2020-04-27 18:29:46 +00:00
TreeHugger Robot
d0ac45fc4c Merge "Set pending intent for physical keyboard connection as immutable." into rvc-dev 2020-04-27 18:27:16 +00:00
Songchun Fan
99a4daeaf1 Merge "[pm] fix potential NPE during permission check" into rvc-dev 2020-04-27 18:21:50 +00:00
Beth Thibodeau
dba74bcfa8 Check URI is valid for loading images
ImageDecoder requires URIs to have a scheme of type
SCHEME_CONTENT,
SCHEME_ANDROID_RESOURCE, or
SCHEME_FILE

In addition URI scheme being null was causing NPE since ImageDecoder
does not check for that.

Fixes: 155021174
Test: manual
Change-Id: I724c8b7e1000c2fc5b3910550ec69904da079bce
2020-04-27 14:17:08 -04:00
Katsiaryna Naliuka
16ee6e725f Merge "Pass the URI of the new screenshot instead of file name (framework). This better matches the recommended way to access on-device media." into rvc-dev 2020-04-27 18:16:19 +00:00
Heemin Seog
23f18d0771 Connect to hvac in background thread, post status icons init
Bug: 147455109
Test: manual with systrace
Change-Id: I82c7cbdb4e8693123092566e1822db95738e2017
2020-04-27 11:11:22 -07:00
Ytai Ben-Tsvi
ede7ae7dc6 Fix deadlock between APS and sound trigger middleware
SoundTriggerMiddlewareValidation.setCaptureState() acquired a lock,
which is also acquired by load{Phrase,}Model() and unloadModel(),
which in turn call into audio policy service for the sake of
acquiring/releasing sound trigger capture session handles.

Since audio policy manager is single threaded, a deadlock may result
if setCaptureState() occurs concurrently with one of the model loading
operations:

- System server thread is in the process of loading, acquired the lock
  in SoundTriggerMiddlewareValidation and calls into APS, blocked
  waiting to acquire the mutex of APM.
- Audio server thread is in the process of changing the capture state,
  acquired the APM mutex and is calling into sound trigger middleware,
  blocked waiting to acquire the lock in
  SoundTriggerMiddlewareValidation.

The fix is simple: no need to lock SoundTriggerMiddlewareValidation if
using an atomic for the capture state. Verified by careful reading of
the code that this is the only contention point.

Bug: 154383165
Test: Hard to verify a rare deadlock, ran a quick verification of
      basic sound trigger functionality.
Change-Id: I1350316521d56d7de74f20ad980f92f0df0035f8
2020-04-27 11:09:58 -07:00
Miranda Kephart
c8f22beefe Merge "Keep screenshot process bound" into rvc-dev 2020-04-27 18:00:43 +00:00
JianYang Liu
fe619371bd Fixed TopNotificationPanelViewMediator to register drag open listener on
top bar.

Bug: 145827692
Test: Manual
Change-Id: I1ee8263ed46a89813330965cf6e91aa5590108bf
2020-04-27 10:59:42 -07:00
Diego Vela
7c59c63943 Merge "Update Documentation for onActivityResult." into rvc-dev 2020-04-27 17:58:29 +00:00
Aran Ink
82e9872732 Merge "Add dismissImmediate to ListPopupWindow to prevent window leaks in GlobalActionsDialog." into rvc-dev 2020-04-27 17:57:15 +00:00
Jeff Sharkey
0db4811916 Fix inconsistent MIME type mapping.
MediaProvider heavily relies on developers to provide a MIME type,
which it then translates into a file extension, and then later back
into a MIME type.

For this flow to work without apps losing access to the data they
just wrote, all MIME types need to consistently map back to the
same "major" type that they started with.

This change adds tests to verify this consistency for all audio,
video, and image MIME types, and fixes an obscure bug where the
"audio/3gpp" MIME type would end up translating to "video/3gpp".

Bug: 154667531
Test: atest CtsMimeMapTestCases
Change-Id: I47998d8f4b1f9922a7d9439014e2f7f51f401f04
2020-04-27 11:53:12 -06:00
Mehdi Alizadeh
666796b0fa Merge "Include cache-only and pinned-only shortcuts as Sharing shortcuts as well" into rvc-dev 2020-04-27 17:47:23 +00:00
arangelov
27b997491e Keep the intent resolver button bar stuck to the bottom.
Fixes: 154939990
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Test: manual
Change-Id: Ia450701650dfca55488ed7bf1f9bebcae5b72c2c
2020-04-27 18:40:47 +01:00
Kweku Adams
259403ef7f Add null check for retrieved package.
PackageManagerInternal.getPackage() states that the returned value can
be null. Check that the returned object isn't null before calling any of
its methods to avoid NullPointerExceptions.

Bug: 154899364
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: Ifcb200a4a0ed6582cc1a368c2949f0aaf32d7dd2
2020-04-27 10:40:39 -07:00
Yuncheol Heo
18fd3d0e07 Merge "Make onTaskDisplayChanged/onTaskRemoved work." into rvc-dev 2020-04-27 17:38:55 +00:00
Rob Carr
9005cdcf01 Merge "BLAST: Two start-up optimizations" into rvc-dev 2020-04-27 17:20:42 +00:00
Taran Singh
88191952ec Merge "Add test for ImeInsetsSourceConsumer" into rvc-dev 2020-04-27 17:08:05 +00:00
Beth Thibodeau
52d9a561d2 Ensure media resumption controls have a title
This is a requirement stated in go/sysui-media-resumption-requirements
but was not actually being enforced.

Bug: 154823185
Test: manual
Change-Id: Iba10b37ff42733d8ef76faf14b90ed17877a1918
2020-04-27 12:45:29 -04:00
chaviw
5ef1e93671 Added takeScreenshot API to WindowOrganizer
Added requests to take screenshot of a Window that's organized
by the client. The resulting screenshot will be attached to a
SurfaceControl and reparented to the requested window's parent. The
client will be responsible for showing, setting z order, etc. They can
also re-parent to another place in the hierarchy. The default is to
parent to the window's parent since that's usually where a screenshot is
placed.

Test: Builds
Bug: 152114574
Change-Id: I5c829e029f3528fdb382842e9f0474097e01cb2e
Merged-In: I5c829e029f3528fdb382842e9f0474097e01cb2e
2020-04-27 16:45:27 +00:00
Riddle Hsu
b2c07aa823 Remove unnecessary cleanup procedures of WmTests
Since WMS instance is created for each test methods, the cleanup for
the window created by previous tests is not needed.

Take ZOrderingTests as the example, it reduces about ~18% (20s+).
If there are more windows to remove, the improvement will be more
significant.

Bug: 154655192
Test: presubmit
Change-Id: If2cfdd15688fd72d37bab7caf6ab1f27766ba7f6
2020-04-27 16:38:01 +00:00
TreeHugger Robot
2133dc6e73 Merge "Implement direct share targets quota based onto app share score in ChooserTarget ranking protorype." into rvc-dev 2020-04-27 16:17:27 +00:00
TreeHugger Robot
bac5755dad Merge "Allow tests for more PermissionControllerManager methods" into rvc-dev 2020-04-27 16:16:28 +00:00
Evan Rosky
8d1c24e0a5 Inform receivers of restart attempt previous visibility
This way receivers like recents know whether the activity
was already visible before a restart attempt.

Bug: 154575664
Test: added test. Can also launch a running activity into
      split-primary and it won't expand it.
Change-Id: If59ee1615fa36bbe3af9412194a7f96b9377528a
2020-04-27 09:13:31 -07:00
TreeHugger Robot
c7b99da139 Merge "Proper handling of unrecoverable status." into rvc-dev 2020-04-27 15:57:56 +00:00
Steve Elliott
936df15c79 Update one-line layout for conversation notifs
Fixes: 152770837
Test: manual, visual
Change-Id: I8433d5e26be4e6fe0c16acc87b29bac334011cbf
2020-04-27 11:49:13 -04:00
Diego Vela
f0298c4672 Merge "Minor clean up." into rvc-dev 2020-04-27 15:48:19 +00:00
Beverly Tai
d3162cf2ba Merge "Separate managed/primary profile sensitive notifs" into rvc-dev 2020-04-27 15:34:52 +00:00
Shafik Nassar
559792fb96 Merge "MANAGE_EXTERNAL_STORAGE cleanup: remove isIgnoredAppOp" into rvc-dev 2020-04-27 15:30:59 +00:00