This allows us test the notifyAppIoBlocked and notifyAppIoResumed APIs
Also fixed isAppIoBlocked bug where a uid with a blocked counter of
'0' would incorrectly result in returning true.
Test: m
Bug: 181222557
Change-Id: I3e8f040cd0e08cb0765fec0cfafab6428d6a3a00
Merged-In: I3e8f040cd0e08cb0765fec0cfafab6428d6a3a00
This CL adds a new permission called SUGGEST_EXTERNAL_TIME that
gates TimeManager.suggestExternalTime calls.
The new permission is marked as 'privileged' as protection level. This
could result in third party apps preinstalled on the system image to
potentially get this permission. This is OK for the following reasons:
- OEM coordination is needed to grant 3P apps this permission, so
adding "privileged" doesn't introduce significant risk.
- This permission/API doesn't guarantee that the suggested timestamp
will immediately be used as the new system timestamp. The system must
be configured so that the external time source has a higher priority
than other time sources (e.g. GNSS) for the external time suggestion to
be used. This configuration is also done by the OEM. That introduces
significant roadblock for a malicious app to do anything useful with
this permission.
- More importantly, apps can set system time directly using
TimeManager.setTime() which requires SET_TIME permission. This
permission is also signature|privileged, so this change is consistent
with it.
Bug: 157504928, 177079827
CTS-Coverage-Bug: 182275086
Test: atest android.app.time
Change-Id: I0098ab7565b647fb220d39575f0616d2a47bdc89
This allows us test the notifyAppIoBlocked and notifyAppIoResumed APIs
Also fixed isAppIoBlocked bug where a uid with a blocked counter of
'0' would incorrectly result in returning true.
Test: m
Bug: 181222557
Change-Id: I3e8f040cd0e08cb0765fec0cfafab6428d6a3a00
Since the MediaProvider mainline module will now manage volumes of
multiple users, it needs to know which user a volume belongs to. This
was implemented by an already existing API, so make that a @SystemApi.
Bug: 182396009
Test: N/A
Change-Id: I9ca24e500adfd51fbd52e863f549365dd9aaf39d
* changes:
Request new Bluetooth runtime permissions.
Default grants for "Nearby devices" permission.
Add BLUETOOTH_SCAN and BLUETOOTH_CONNECT app ops
Split new NEARBY_DEVICES permissions
Define new NEARBY_DEVICES permission group
Secondary volumes are FUSE mounted, whereas Android/data and Android/obb
on primary volumes are not FUSE mounted. Access to these private app
directories on primary volumes is restricted using the mount modes, but
access for these on secondary volumes need to be regulated by
MediaProvider.
Make getExternalStorageMountMode as SystemApi so that MediaProvider
can leverage the same mount logic for Secondary volumes.
Expose relevant mount modes as SystemApi as well.
This change saves us the maintenance overhead for Secondary volumes for
Android S+. Otherwise we would have to check if an app is a signature
app through APIs which would basically be the duplication for the
logic in StorageManagerService.java.
Expose ExternalStorageProvider and downloads Authority for MediaProvider
to rely only on APIs. This is also required for CDD modifications that
these 2 providers are given exceptional access to private app dirs.
Bug: 175796984
Bug: 173505864
Bug: 173505864
Test: atest DownloadProviderTest
Test: atest CtsScopedStorageHostTest
Test: atest android.scopedstorage.cts.host.PublicVolumeHostTest#testCheckInstallerAppAccessToObbDirs
Test: atest android.scopedstorage.cts.host.PublicVolumeHostTest#testCantAccessOtherAppsExternalDirs
Change-Id: I51bc7bd3f355fadd9de56ac267469c2352eb0ffa
This change adds a new hidden user type "android.os.usertype.profile.CLONE"
and two new system APIs "isCloneProfile" and "hasSharedMedia". To support App cloning, we need to support sharing media between the owner user and the clone user. Adding this as a property in UserTypeDetails.
Bug: 182396009
Test: atest android.multiuser.cts.UserManagerTest#testCloneUser, atest com.android.server.pm.UserManagerTest#testCloneUser and manually ran shell commands on the clone user.
Change-Id: I49ddcbd499944ca9ec05ef4dc10d2e2b231d8b88
(cherry picked from commit db930667a21dac9f0de7cb2fe99175b3b4545bf4)
This CL adds registerCallback(executor, callback) as @SystemApi
for system MediaRouter2.
Bug: 183453134
Test: Passed CTS
Change-Id: I50e942714946ae8af7ad69432cefcd8015040d4d