Force displaying system bars can cause app screen compatibility issues
in non-Automotive Android.
Bug: 148407132
Test: CTS Test + Unit Tests
Change-Id: Ia433572650760e3b85954724c63084dca769eaa0
Merged-In: Ia433572650760e3b85954724c63084dca769eaa0
The detector class to be used by the CountryDetectorService can be set
by overlaying config_customCountryDetector in the device config.
Test: atest CountryDetectorServiceTest
Bug: 141626568
Merged-In: I158abd6397e3102d13e431ba043e8ce45061b64a
Change-Id: I158abd6397e3102d13e431ba043e8ce45061b64a
(cherry picked from commit 34147601d8)
- Get all packages for system user
- Reuse split system user's logic to blacklist packages when headless system
user is enabled
- Add new method in UserManager to get headless sytem user mode (same as
in master)
Bug: 145626101
Test: edit device's sysconfig file, use tag: system-user-blacklisted-app to blacklist app
make services && adb sync system && adb reboot
cts test
Change-Id: I98d1bc33e7dd59ffa3ac6426f95af708671138da
(cherry picked from commit 9c4cf4945d57d45e429bc7d33bf6ffa68eb0838c)
(NOTE: this change is manually cherry-picked from master - master has the same
trace calls, but they were introduced by larger changes)
Bug: 145626101
Bug: 145027829
Test: manual verification
Change-Id: I5cae10c9c7e5ed6f733c72659643708dfa826fc7
Before the state was update lazily when someone interacted with
appopsmanager.
Since Q the the uid state might change depending on the procState
and hence we might need to trigger the opChanged callbacks when the
procState is applied.
Bug: 148180766
Test: (on master) atest CtsAppOpsTestCases:android.app.appops.cts.ForegroundModeTest
Change-Id: I99720a372db6e79eaba30e4563c09e009cffe86f
Merged-In: Id974769a4e9d89c01890b7557dd93f8444a3908f
Multiple packages might share a UID, but appOpsService might not have
cached the uid->package mapping for those yet. Hence the only way to
list all packages for a uid is to ask package manager.
setUidMode already handled this correctly, hence factor out the code
into notifyOpChangedForAllPkgsInUid and reuse it from
commitUidStatePendingLocked.
Bug: 148180766
Test: (on master) atest CtsAppOpsTestCases:android.app.appops.cts.ForegroundModeTest
Change-Id: I99a8f255a60d3523da7eb36a8f2c9426af1a1fea
Merged-In: I2d5d6c7aa38d201707349a137c9c29b7987775be
On automotive, it helps identify slow services. For example:
W ActivityManager: User switch delayed: observer #1
WallpaperManagerService sent result after 1608 ms
Without this change, the WallpaperManagerService wouldn't be logged
because the "give up" timeout is 3000ms.
Bug: 145558164
Bug: 144801993
Test: manual verification (see logcat above)
Change-Id: I68e3b7220bbac25075e4fd4dad83c3a26b88940c
Merged-In: I68e3b7220bbac25075e4fd4dad83c3a26b88940c
(cherry picked from commit 48a75cbd67)
NOTE: as user switch is a very low-frequency operation, these logs statements
don't need to be guard (to avoid spam).
Test: manual verification
Bug: 141502467
Bug: 140999054
Bug: 145027829
Change-Id: I7122e45c45a646419b03242c99d90417a29da92a
Merged-In: I7122e45c45a646419b03242c99d90417a29da92a
(cherry picked from commit ebccffe3b10d8642e7b1d64f183b627f644011a4)
(cherry picked from commit b5f0e74302)
This change:
- modifies internal programSelectorFromHal to return null instead of
throwing NPE on empty input
- throws NPE on two of its usages where null is unexpected
- *does not* throw NPE on one usage where program selector is optional
(onTuneFailed in RadioModule.java)
Bug: 147522441
Test: boots, but have no quick way to trigger onTuneFailed(Result::error, {})
Change-Id: I6317da3fbde2bce90079b61bb0839e893e1c4712
(cherry picked from commit dc8a5683a149b4f5ce3d9a9f6198fbe310547dbf)
We updated staged sessions to activation failed state when they
aren't in terminal state, and device received ota and reboot. This
happend before the StagingManager resumes the sessions when
the whole set of parent+child sessions have been restored.
A parent session probably cannot find the child session, and a null
exception could happen.
In this change, we do not destroy child sessions before we destroy
the parent session. We only destroy a child session directly if we
are sure that its parent session doesn't exist.
Bug: 147651771
Test: StagedInstallTest
Change-Id: Iac6489a04df35f851aa18a91e1dde2d73928b8ec
Merged-in: Iac6489a04df35f851aa18a91e1dde2d73928b8ec
(cherry picked from commit 1fc8b36cf3)
This addresses an issue where toasts will be hidden due to the setting
of the LAYOUT_HIDE_NAVIGATION flag.
Bug: 148180738
Test: manual (adb shell settings put global policy_control "immersive.navigation=*" then try to show a toast with gravity top)
Change-Id: Ic47edc5423c4daf373fc3a8bfc30af15cadd6d90
If adb is not enabled on a device then the adb key store is not
instantiated when the AdbDebuggingManager's handler is started as
in most cases it will not be needed. However if the user attempts
to revoke any previous adb grants when a device is booted with adb
disabled it will result in a NPE. This commit ensures the key store
is instantiated before attempting to revoke authorizations.
Test: atest AdbDebuggingManagerTest
Test: Manually invoked 'Revoke USB debugging authorizations' after
a boot with adb disabled.
Fixes: 145790817
Change-Id: Id00e531c18412be009a211eec80a72867659608f
Merged-In: Id00e531c18412be009a211eec80a72867659608f
Unhandled exception is causing system server to crash.
Bug: 146790672
Test: builds successfully
Change-Id: Ibfe53ee0309dcec6fd3b24f8b67fcb78f5ce7fd5
Merged-In: Ibfe53ee0309dcec6fd3b24f8b67fcb78f5ce7fd5
The UID allocator stores complete UIDs, not app IDs. When removing a UID
from the range, we should therefore also use the UID, not the app ID.
Also added a test to cover this scenario, which passes with this change.
Bug: 146313311
Test: atest ActivityManagerTest
Change-Id: I1118ec73dcee5987e12f35aabce5cfa8cbe407a1
(cherry picked from commit c9a0df2d88)
* changes:
DO NOT MERGE Don't throw exception in AppOpsManager.checkOp
DO NOT MERGE Remove unnecessary internal APIs.
DO NOT MERGE SetMode: Don't call into PM with AppOps lock held
In Q we handled the case where the op does not match the package name by
returning the default state. NoteOp and StartOp returned errored.
Fix up these scenarios.
Test: - atest CtsAppOpsTestCases
- backported new test to Q to verify the behavior is the same in Q
and master
Bug: 132885449
Bug: 146463528
Bug: 146590200
Bug: 147649036
Change-Id: I5b94e92af759580f2d2644ece49f159bd006b31c
In the setmode paths do not call into package manager with the app-ops
lock held. Otherwise we might get dead-locks then someone calls into
app-ops manager with the package manager lock held.
Test: Booted and saw no errors from the changed code
Bug: 124731615
Bug: 146463528
Bug: 146590200
Bug: 147649036
Change-Id: If074bed1bd246a81791a7d9fd656f42f1a755495
(cherry picked from commit ec142a52fe)
Clean-up the test to use Mockito instead of the deprecated
AndroidTestCase, also getting rid of 1.5s of Thread.sleep.
No logic change.
Bug: 141626568
Test: atest CountryDetectorServiceTest
Merged-in: Ic0782b1ffcd1dcb30b9f1d91b37521d1f9887f03
Change-Id: Ic0782b1ffcd1dcb30b9f1d91b37521d1f9887f03
(cherry picked from commit 50361687ba)
If an app has previously used autoVerify to make claims about its status
re handling web navigation intents, but is updated such that it no
longer makes those claims, step down its "official handler" status as
though it had never invoked autoVerify in the first place.
Bug: 146204120
Test: manual: as described in bug; observe policy before/after via
'adb shell dumpsys package d'
Test: atest CtsOsHostTestCases
Change-Id: I58502d1b32d793aba9aa772fa2ad5ac38acca48a
Merged-In: I58502d1b32d793aba9aa772fa2ad5ac38acca48a