User switcher is in SystemUI which runs in User 0.
UserManager.getUserSwitchability() currently checks for the
DISALLOW_USER_SWITCH only on the process's user id rather than the
foreground user's id. This is causing a bug where we're using the wrong
user to check for user restrictions.
This CL updates getUserSwitchability to handle different user ids and
updates UserSwitcherController to use the new API.
This also introduces Headless System User support which only runs a
subset of the logic.
Fixes: 143298605
Test: [1] Enable multi-user
[2] Create a new secondary user
[3] Switch to new secondary user (assume to be user 10)
[4] adb root && adb shell pm set-user-restriction --user 10 no_user_switch 1
[5] Can't user switch
[6] adb root && adb shell pm set-user-restriction --user 10 no_user_switch 0
[7] Can user switch
Change-Id: Id039e2afd01a53116700c08177eb4e599a871946
This class is hanging around for UnsupportedAppUsage. Adding additional
method to fix compilation, but it should never be called.
Bug: 135686713
Test: compilation fixed
Change-Id: I58022af86a53239990e057936826d0f1214acc6f
Wifi/telephony mainline modules uses IBatteryStats which is an AIDL &
hence cannot be made a @SystemApi. Create a new manager class to wrap
around this AIDL to expose @System Api.
Bug: 138806762
Test: Device boots up & connects to wifi networks.
Change-Id: Ib8816c3df17ccc562b9664e7bea1ef01ab61f697
This change adds initial support for scanning APEX directories looking
for APK, and make them available to the system as normal system APKs.
For now privileged apps and resource overlay are not supported, and the
support will be added in a later CL.
Scanning features are inherited from the partition in which the
preinstalled version of a given APEX module is located.
Supports both flattened and un-flattened APEX configurations.
Bug: 138429615
Test: Compiled a test apex with the Snake app installed in it. Verified
app is correctly scanned and usable. Tried also installing the apex in
/vendor and /product.
Change-Id: I8fb91317da0296567403b2b62babbb71e4b48938
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.
Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
(cherry picked from commit 5e67462971)
There are already public versions of these APIs which allow
these queries for the calling app's user. Need to expose a version that
allows single instance apps, i.e user 0 (like wifi) to query info for
different users. The exposed APIs are:
a) isUserUnlockingOrUnlocked
b) isSameProfileGroup
Bug: 142024973
Test: Device boots up & connects to wifi networks
Change-Id: I77cd31a2344a6cbb272196523c10ad259aea74ce
Initial user creation is slow because the system must prepare per-user data (like storage and
permissions) whose cost is proportional to the number of pre-installed apps. On automovive's
reference implementation, it can take more than 10s, which is a bad user experience.
This change lets OEMs pre-create some users , so that high initial-creation cost is "paid" during
the initial boot. On automotive, it improves the creation of an additional user (or guest user)
in about 7s (from ~17s to 9s).
Bug: 111451156
Bug: 132111956
Bug: 140750212
Bug: 140868593
Test: manual verification
Test: atest FrameworksServicesTests:UserControllerTest#testStartTemplateUser_background
Merged-In: I81de1b5376dc9c42b63be8853d7204c88826401f
Change-Id: I81de1b5376dc9c42b63be8853d7204c88826401f
(cherry picked from commit c1ca4410e1)
Because SettingsProvider needs to call through the IUserManager
interface there is now a method to provide restricted-access information
via that route. It has the same protection as the implicit local
service call surface that was previously used: only system-uid callers
can invoke it.
Bug: 140833849
Test: system boots & runs normally
Change-Id: I05823ca57240ab10feb382c45590541212e406c1
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony
Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
waitForService is used to lazily start AIDL services
Bug: 138756857
Test: Manual (tested starting gsiservice with this function)
Change-Id: I7ff16b014052d3845bd4b1baa8fc9843e7975a16
We've already been parsing them for many years, and they're well
defined by other public APIs, so let's reveal them in MediaStore.
Also get some storage-related documentation updated to guide
developers towards replacements in a post-scoped-storage world.
Bug: 140247264, 139185855, 141523097, 139185322
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id39a74a9972a330b3f83913b2eef5100ec59627d