permissions.
1. Create a generic FgsTempAllowList class, mFgsStartTempAllowList and
mFgsWhileInUseTempAllowList are instantiated from FgsTempAllowList.
2. For mFgsWhileInUseTempAllowList, 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.
3. When media button is pressed, the targetUid is added to
mFgsWhileInUseTempAllowList, for the duration of 10 seconds, this way the
targetUid can start FGS from background and have while-in-use permission.
4. 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, 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
has "allowWhileInUsePermissionInFgs=true" and "isForeground=true".
Change-Id: Ic80aefe4202fe2210881bb8eea24b6e34cb1e7d0
When the preference has switched to another transport, do
not allow data setup. This avoid the case that data service
keeps asking telephony to retry while QNS already switched
the preference to another transport.
Test: Manual
Fix: 182899920
Fix: 175399007
Change-Id: I1a0c86a978756d5b05851d939e011010f8f1afc2
- Connectivity related files will be inside mainline module, so
the external callers cannot call its hidden API. Remove the usage
of hidden API or replace it with public API.
Bug: 182859030
Test: atest FrameworksMockingServicesTests:ConnectivityControllerTest
Change-Id: I36e732b7e44aeb7e7716ef2c948b92770d458529
1) disable notification for user set to none
2) send notification to primary user only
Test: atest NotificationAssistantsTest, NotificationManagerServiceTest
Bug: 185623118
Change-Id: Iada56e2f2ee10eaaad9a03d5e436de883e8f3e28
- SysUI studio has trouble referencing this private attribute
directly, so move the resolving of the color to the code
instead
Bug: 152086714
Test: Studio builds, numpad colors still reflect the
colorSurface color when changing dark/light &
wallpapers
Change-Id: I9a96c89010c41eaf6d14d5e1cfe86777cc30c8be
The list would be cleared while next time we use them, so it could
constantly occupy the memory. This CL clears the temp list right after
we use the controls. So it won't occupy the memory while they are not
being used.
This CL also sends a new list to the app when dispatching the insets
animation progress. In this way, we don't need to clear mTmpRunningAnims
after dispatching it. Also, the app might use the animation list AFTER
the 'onProgress' callback. This change can make the list stay the same.
Fix: 183684434
Test: Use Android Memory Profiler to check if there is
InsetsAnimationControlImpl or WindowInsetsAnimation instances
after GCing after playing insets animation in Launcher.
Change-Id: I781233abb2c9c8400c6f76b537bef161745e67f7
The light bar is only allowed if the color-controlling window has
intersection with the system bar.
The app window frame doesn't need to 'contains' the frame of the bar,
because:
1. In split-screen mode, the app window only intersects a part of status
bar.
2. When navigation bar is at the same side of a display cutout,
navigation bar would be thicker than the cutout. The app window which
fits the cutout can only intersect with a part of navigation bar.
Fix: 183696228
Test: atest LetterboxTest LightBarTests DisplayPolicyTests
Change-Id: If17a2050b22e674bb760d6c98305ee69067b11fe
When calling Activity#setRequestedOrientation, the orientation of task
may not be updated yet. If the requested orientation are mismatched,
the configuration could be letterboxed (unresizable activity) according
to the intermediate state. And because WindowProcessController may be a
configuration listener of the activity, the app may receive unexpected
configuration and keep calling setRequestedOrientation to cause a
relaunch loop.
Now the direct onConfigurationChanged from setOrientation is only
called when:
- In multi window mode: if the activity is unresizable, its requested
orientation should be still respected to compute letterboxed bounds
if needed. Otherwise the orientation is ignored for resizable.
- The ancestor ignores orientation request from descendant, e.g. in a
fixed orientation display.
This should save an extra onConfigurationChanged for the most common
case in fullscreen windowing mode.
Fixes: 169349616
Test: atest WindowContainerTests#testSetOrientation
Change-Id: I49ba2003699422a491c1183b10a691e25867ffa7