When the system code sending non-protected broadcast,
if it's dynamic broadcast receiver is not exported,
the wtf log of sending non-protected broadcast should not be printed.
Bug:263210319
Test:A system code, for example com.android.settings
step1:send a non-protected broadcast but with packageName to itself;
step2:it registers a dynamic broadcast receiver with Context.RECEIVER_NOT_EXPORTED to receive this broadcast.
Change-Id: Ie7e359d1ae079be0d444c72791ff1b2a892b71bb
- adding ShadeWindowLogger using LogBuffer
- adding interface for all loggers wanting to log simple constant strings: ConstantStringsLogger
- adding default implementation of ConstantStringsLogger which can be used easily in Kotlin and using it in other loggers
- moving mForceOpenTokens from NotificationShadeWindowController to its State
Test: logging works
Bug: 245441667
Change-Id: Ic7c3b553c6388982bbc50b34a99a26de9f5e0d86
mCloseLock currently guards #queueInputImage, #dequeueInputImage, and
#postEventFromNative. However, there have been cases reported where a
contention between #postEventFromNative and #queueInputImage would lead
to a deadlock. This CL removes the mCloseLock guard from #queueInputImage
and #dequeInputImage as the native implementations are already
synchronized on `this` and there are no reported bugs from race
conditions in those two functions.
It also drops the mCloseLock guard from #postEventFromNative and moves
the responsibility of ensuring ImageWriter is valid to the
ListenerHandler. This ensures that mCloseLock is never in contention
in the JNI thread that calls #postEventFromNative.
#close() is still protected by mCloseLock to prevent multiple
simultaneous closes.
Bug: 263395157
Test: Existing ImageWriter tests pass
Ran the sequence that led to deadlock 30 times without a single
deadlock.
Change-Id: I5b0d367cce7df9401386e5a53c5e9b539d8c1f40
- Ensure we only check adding callbacks for the pip controller (and not
other dependencies using the same ShellInit class)
- Ensure pip bounds state has non-null current/min/max bounds
- Ensure callbacks posted to the main executor are run in shell
shell controller tests
- Ensure transition changes have a non-null surface (since it's copied)
- Bump up timeout for running test code (it can exceed 20ms), and ensure
we release any virtual displays created during the test
- Update the test to the new background layer constant previously added
Bug: 262783148
Test: atest WMShellUnitTests
Change-Id: Ib57e1c0b7c32b44953dd33d2fb09a8ecc00f9c0e
1. introduced three states (ease-in, main, and ease-out) to better control each animation & support non-fixed duration animation
(such as loading).
2. move business logic to the controller.
Follow up tasks (ordered in priority):
- have media player send a signal to end the animation. (currently it
finishes after the max duration.)
- update animation curve (currently it's all linear)
- support force finish if needed (currently finish only works when the
state is MAIN)
Bug: 237282226
Test: TurbulenceNoiseViewTest, TurbulenceNoiseControllerTest
Change-Id: I711c87096c7c9af6e322104ad0138c4fd78c4953
There is a deadlock situation from AttentionManagerService acquiring
lock before callings back to its clients with the proximity update. This
can cause a deadlock because the clients, while holding their own locks,
can call AttentionManagerService again.
Thread 1:
Acquires attention lock -> AttentionManager Service reports proximityUpdate to VoiceInteraction -> tries to acquire voice lock
Thread 2:
Acquires voice lock -> VoiceService tries to cancel proximity updates
-> tries to acquire attention lock
The deadlock can be fixed by removing the acquiring attention lock step
before reporting proximityUpdates to the clients.
Bug: 261143716
Test: atest CtsAttentionServiceDeviceTestCases
Change-Id: I9f7d520cbcfd57032a9476853acad025fd7a6b95
Merged-In: I9f7d520cbcfd57032a9476853acad025fd7a6b95
(cherry picked from commit a28af297d3)