Currently CameraService calls isUidActive() before allowing the camera
access.
When start/resume activity, WindowManagerService start/resume the
activity, then post a runnable to DiaplayThread and
ActivityManagerService to update UidRecord's
proc state, because the thread switch, the latency before proc
state update is undetermined.
When CameraService calls ActivityManagerService.isUidActive(), the proc
state may not have been updated and camera access is denied.
isUidActiveOrForeground() check isUidActive() first, if false,
check isUidForeground() which is actually to check with WindowManagerService if
the uid is foreground, which is equivalent to ActivityManagerService's uid
active, just updated earlier.
Bug: 151185692, 151777097, 109950150
Test: manual test.
Change-Id: Iffed63293dbdb466e7955fe765ad2aa23a20b3ed
When creating a LoadedApk in a zygote context (app zygote or WebView
zygote), don't add the app's data dir to the list of paths the dynamic
linker is allowed to load libraries from, because the linker's attempt
to canonicalize the path causes SELinux access denials. The process
can't access the data directory at all, so cannot load libraries from
there in any case.
Fixes: 149481620
Test: check for avc denials from webview_zygote
Change-Id: I9aceecaf6067e748cc2251782b0f41661cbb35d8
(cherry picked from commit e1579d4d14)
Gate background custom toast block on targetSdk for beta 1, after
having gathered dogfood feedback. So, enabling the change for apps with
targetSdk > Q (>= R). Also removed warning toast.
Added tests in topic CL to cover all the cases.
Bug: 144152069
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
Change-Id: If368a97a2a8ff56770635615f89c79007bb27075
The noteOp API without attributeId is deprecated.
For @UnsupportedApi Binder calls we need to keep the old name there.
Test: TH
Bug: 136595429
Change-Id: Ib758b431c0842bb16ce8e8fb3a33d4524ab0878c
Previously the dream activity was of a standard activity type. This
allows other activities to be started in front of it, which should not
happen.
This CL adds a new ACTIVITY_TYPE_DREAM and makes dream activities to be
attached on top of all other activities. It also adds activities of type
dream to be one of the always on top activities.
Bug: 150749838
Test: make && flash; start PiP and then start the screensaver. Verify
that PiP is hidden by the dream.
Change-Id: I852db2455d580d5c99aca3dbbd1ee3bea20aa7ae
Also make use of PackageManager.getUnsuspendablePackages() which
already takes care of launcher and dialer packages and some
other critical apps, like package verifier, package
[un-]installer, etc.
For newly installed packages it PackageManager.getUnsuspendableApps()
seems to be sufficient since that app won't be critical for the
functioning of the device.
Test: Test: atest
OrgOwnedProfileOwnerTest#testPersonalAppsSuspensionInstalledApp
Bug: 149394138
Change-Id: Ic3196dbfdd5c506e708563d305a42494391dc878
We don't set a wallpaper component again if it's the one
already set, so we're now sending it a command notifying
of this in case the wallpaper needs to reload or apply
settings.
Bug: 147677688
Test: atest WallpaperManagerServiceTests
Change-Id: If65671287ba3270933b75771a8c1c65c5ff0216a
WM currently only allows the organization of tasks, however we will soon
be allowing the organization of DisplayAreas. To help with the code
structure, we are introducing WindowOrganizer interface which will
contain common APIs for all types of windows organizers (e.g.
applyTransaction) and also be the interfaece for getting the controller
for other organizers.
Test: they pass!
Bug: 147406652
Bug: 152113464
Bug: 152117221
Change-Id: Id2797b288ce92430206c25345d60e7b0e3be98c8
Revert "Verify reported display sizes in multi-window"
Revert submission 10636794-app_config_updates_adjustments-rvc-dev
Reason for revert: See b/151903752#comment29. This CL was identified (via bisection) as the CL that is breaking Android Auto.
Reverted Changes:
Ib3ee007bc:Don't override activity display adjustments with a...
I5ba4dd354:Verify reported display sizes in multi-window
Bug: 151903752
Change-Id: I845ed4871637d6d8a5fac1a6a5236378829b837e
Window management files on the client side have normally been dumped in
either android.view or android.app package. This CL starts to
centralized them in android.window package so there is better
separation.
Test: they pass
Bug: 147406652
Bug: 152113464
Bug: 152117221
Change-Id: I4d64bd256e9b3581af0ccf9396f7dd2454132719
Users want to be able to use this flag and have been relying on
WallpaperColors#fromBitmap given that flags were not parsed by
the main constructor.
Fixes: 151717291
Test: atest WallpaperColorsTest
Change-Id: I0470a867c54756df9a758b24835a50bc67191050
When the app widget on the launcher is tapped on:
1. Update AppOps. AppOps treats the underlying app as foreground so the app can get while-in-use
permission.
2. Report a USER_INTERACTION event to UsageStats so UsageStats can
update mLastTimeUsed and mLastTimeVisible of this package.
Bug: 149043079
Test: manual test, tapped on a widget.
Change-Id: Ic8c91190881cf5dcf89f0f72cfd410b0c2e86bf6
We should only use the shortcut icon if it's available
Bug: 150905003
Test: add group message from Notify with largeIcon
Change-Id: Icd5b0991b34fbfb517344cc6c908a2588973cdca
- Documentation clarity and method rename per API review feedback.
- Specifying in documentation and implementation that the implementing service must be exported by the Profile Owner.
Bug: 150866056
Bug: 136085151
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest KeyguardUpdateMonitorTest
Test: atest AdminSecondaryLockScreenControllerTest
Change-Id: I58175bd6cf8936f5b1267625ca15b4f9c57f4144
Remove PackageManager#clearMimeGroup method. Add expected best
practices of the MIME group naming to Javadocs.
getMimeGroup/setMimeGroup throw in case of undefined MIME group.
Bug: 151101912
Test: atest CtsDynamicMimeHostTestCases
Change-Id: Ica468c77785cb0f9862b412a0bbc664f23e2f2d4