- use getPackageManagerForUser when looking up app info
- use the userId on the bubble, not the currentUserId from
BubbleController when writing to XML as the currentUserId
in BubbleController does not account for workprofile.
Test: atest SystemUITests
Test: atest BubbleControllerTest
Test: - have a managed work profile
- install the bubbles app *only* for the work profile
- make some bubbles
=> Notice bubbles appear
- dismiss all the bubbles
- restart the device, add a bubble
- open the bubble, navigate to the bubble overflow
=> notice the previously dismissed workprofile bubbles
are in the overflow
Bug: 184041127
Change-Id: Iefc4e4e80a569a4f3b4ac3b8a1268de1b475409b
WindowProcessController.areBackgroundActivityStartsAllowed() has the 10 seconds grace period,
starts from last activity's launch time or finish time.
Expose this method for AMS to call, to determine if BG-FGS while-in-use permission is allowed.
Bug: 182400165
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
Merged-In: I30706dc1950bf5d49926a8e26c0493d9e168eb1b
Change-Id: I3615d0a2dc3464b6e980237b906c83872c3b4bce
permissions.
1. Create FgsWhileInUseTempAllowList, the uid on this list is allowed to
have while-in-use permission when the FGS is started from background for
a duration of time.
2. When media button is pressed, the targetUid is added to
FgsWhileInUseTempAllowList for the duration of 10 seconds, this way the
targetUid can start FGS from background and have while-in-use permission.
3. When checking for ProcessRecord.
mAllowBackgroundActivityStartsTokens, it is the caller app's
ProcessRecord should be checked instead of the service's ProcessRecord.
Bug: 182481312
Test: use b/167998084 reproduce steps, use Line app to make a voip call, the
receiver side screen is unlocked, the receiver side uses bluetooth
headset button to pick up the call, "dumpsys activity -a" shows the FGS
"com.linecorp.voip.core.common.notification.VoipNotificationCommand" has
"allowWhileInUsePermissionInFgs=true" and "isForeground=true".
Change-Id: Ic80aefe4202fe2210881bb8eea24b6e34cb1e7d0
Merged-In: I32a14d675550cd262976bb8e16a48a070387d318
A single oomAdjUpdate pass could trigger quite a few app compactions,
each of them would need to acquire the AM lock during the handling,
results in lock contentions. Now use its own lock. Also skip the
scheduling if the given app is pending with compaction already.
Bug: 163297662
Test: atest CachedAppOptimizerTest
Test: Manual - Boot & check the logs
Change-Id: I4618a3ae78838cd9783a431e7364130270ebb4d6
This reverts commit I7b9d3c786d653a9b00a553e89d7390bcef45c0f2.
Fixes: 169414761
Test: Manual
Test: Add package A
Test: Verify package A exists
Test: Remove A, add package B w/ original-package A
Test: Verify package A exists, but codepath is to package B
Test: Replace package B w/o original-package A
Test: Verify package A removed and package B added
This reverts commit dd13be00dc5654e98ddcb206dc15fc4e07829526.
Change-Id: I5d66c2b2649bd4d19b5318ea6bbcd31cb6d405fc
Due to DisplayImeController listens to insetsChanged and display
rotation at all time, it might caching unexpected IME shown state in
DividerImeController. Since RemoteInsetsControllerTarget only
controlling insets during split mode, it won't receive hideInsets event
when the target app request to hide IME. Thus leaving unexpected IME
state in split component. When the next time entering split screen,
it'll adjust split layout with wrong IME state.
Update to not caching IME shown state in DividerImeController if the
split is not activated.
Bug: 176846448
Test: atest WMShellUnitTests
Test: open IME and rotate and dock two apps in split mode, observed
the divider bar is interactable and there's no dim layer on the
secondary split
Merged-In: I2f63eebb208b8c987a0a05615ddef4f6feef10d6
Change-Id: I2f63eebb208b8c987a0a05615ddef4f6feef10d6
If the NotificationPanel is not inflated, the proper listeners are not
setup and certain behavior will be broken until the panel is opened for
the first time.
Bug: 182531816
Test: manual
Change-Id: If55156b963c0a83ff644524dea0106708f1635cc