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
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
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
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
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
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
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
This is a requirement stated in go/sysui-media-resumption-requirements
but was not actually being enforced.
Bug: 154823185
Test: manual
Change-Id: Iba10b37ff42733d8ef76faf14b90ed17877a1918
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
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
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