The cancel listeners are created per PendingIntent instance and were
spamming the callback list stored inside PendingIntentRecord. In cases
where there is even a single live PendingIntent backed by this
PendingIntentRecord, all PendingIntent instances backed by this
PendingIntentRecord for which a callback was ever registered will leak.
Test: atest FrameworksMockingServicesTests:\
com.android.server.am.PendingIntentControllerTest
atest FrameworksMockingServicesTests:\
com.android.server.AlarmManagerServiceTest
Bug: 143091024
Change-Id: I65df12da0c437064e6e3719911926738c677c4eb
am: fe99b6cffc -s ours
am skip reason: change_id I69298f763a2a2e63c0cf8deae13f747ea19bbf9d with SHA1 faae648f39 is in history
Change-Id: I5d00b4e85dd2a747bb25649665ffe4cf1b65f843
am: 9b8b62f753 -s ours
am skip reason: change_id If1907d71135158bafea69881205f351ab666025e with SHA1 50b81545bd is in history
Change-Id: I5e5985b57b208c49fc7067dac8d5557e8259c83a
These allowed null parameters handling them with a try/catch block.
Avoid the exception overhead for this frequent case by comparing for null
before the try{} block.
Bug: 143173083
Test: boot, simple playback
Change-Id: I761a8f35839054d61bba5aa1c80eb45058b9db22
So that on debuggable devices, we'll see SysuiLogs in
logcat for events logged that don't specify their log level
For logcat logs, don't include the timestamp
Test: manual
Change-Id: If2cb238e70acc5a551d4b4a4161dc0020536cec9
This CL is to fix a bug that found in
TransitionSelectionTests#testCloseTask_BothWallpaper_SlowStop may flaky
because when TopActivity launched & call finish(), the activity will destroy
too soon before BottomActivity resume & idle.
When TopActivity launched, suppose BottomActivity's nowVisible state should
be false because both activities are fullscreen activity & TopActivity should
cover BottomActivity.
After TopActivity called finish(), normally the activity should wait for
BottomActivity visible and then destroy, and this test is to verify if
TRANSIT_WALLPAPER_INTRA_CLOSE state will coming when opening & closing animation
target with wallpaper theme are animating case.
But the flakiness may happen if device is in low-performance stage, when
TopActivity launched, system calls setClientHidden for BottomActivity's all
windows to update its viewVisibility but can't update in time, and then
the next relayoutWindow comes, mis-detected BottomActivity's Floating child
window as drawn state, so that can't update BottomActivity's nowVisible
state as invisible with onWindowsGone().
So when TopActivity called finish(), TopActivity will soon going to destroy
state since BottomActivity is still in nowVisible state.
The fix is to add isNextNotYetVisible, if the next activity the nowVisible or visible
is not yet true, which means we need to add the current finishing
activity into stopping list and destory until the next activity idle.
Bug: 140088359
Test: atest TransitionSelectionTests
Change-Id: If1907d71135158bafea69881205f351ab666025e
Merged-In: If1907d71135158bafea69881205f351ab666025e
am: 9d813b92f8 -s ours
am skip reason: change_id I34e172c747dd52aa498037e64b758393793fddba with SHA1 a416d984b0 is in history
Change-Id: I670f965636e67abe0ae2a4f2bb23b860ba72c8fb