1) Adds UserManager#DISALLOW_BIOMETRIC. We actually need to
pass a restriction from settings to ActionDisabledByAdmin area,
otherwise the biometric-specific dialog would be shown outside of
biometric flows.
2) Adds an interface to ActionDisabledByAdminController to return a
optional OnClickListener for the positive dialog button
3) Returns an instance of the biometric controller when conditions
are met
4) Adds string interfaces to DeviceAdminStringProvider to retrieve
biometric-specific strings
Bug: 188847063
Bug: 191306258
Test: manual
Change-Id: Iaeffdeb1336d5db56d464104cdc7677b9021f609
LocationManagerService was overwriting location source appops tag
information whenever a location provider changed state. Since multiple
location providers can correspond to the same uid/app id, this could
lead to loss of tags. This is fixed by recalculating the set of tag for
an entire app id any time a uid changes.
AppOpsPolicy had a bug where tag lists coming from different uids under
the same appid would inappropriately overwrite each other. This is fixed
by modifying the internal/external APIs to work in terms of appid rather
than uid, so that it is someone else's responsibility to ensure the
result is valid for the app id as a whole.
Also fixes a bug where LMS assumes tag listeners are added prior to any
providers. If listeners are added after some providers they will miss
updates. Fixed by always updating the listener on registration.
Bug: 190073375
Test: manual
Change-Id: Ib52d752d857b6ac3b6683186a8d1bbcb814fb798
When DPM.setAlwaysOnVpn is called with package=null, it resets
any VPN configured by the user. With this change it won't happen
anymore: it will only reset VPN configuration if it was previously
configured by the admin.
If an admin actually wants to remove any user configured VPN, they
can enforce DISALLOW_CONFIG_VPN restriction which will remove any
user VPNs and will prevent the user from configuring a new one.
+ Also make sure that when the DPC removes an always-on VPN
configuration, the package loses ability to start VPN until the
user authorizes it again.
Bug: 139823667
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ia703015b4e8d7eaf156358d7eb000d6f58d32238
The validation does not exist in Android R and is causing apps to start
crashing in S.
The validation for the static API createOneShot was maintained, as it
already existed in previous releases.
Fix: 184890231
Test: VibrationEffectTest
Change-Id: I606c943a35ddd68ccacab76f0047b9a276b5cf28
Android 10 did not support file path operations for apps in
scoped storage. But Android 11 and above do support file path
operations for such apps.
Fix docs for getExternalStorageDirectory() and
getExternalStoragePublicDirectory() to reflect the current level of support.
BUG: 153562415
Test: m docs
Change-Id: I8bc2a4aa266dbbcc391b415e6209ed6e5d56fe97
Add information to javadocs explaining that apps in background can
only vibrate the device if the given AudioAttributes usage is one of
notification, ringtone or alarm usages.
Bug: 146313440
Test: N/A
Change-Id: Ib0b8401539157f0ce2768aab281f3b23aae38dae
Now that BUS contains an end time and a duration, use
those in the atom instead of estimating them from
the clock time that the request was made.
Bug: 187223764
Test: atest BatteryUsageStatsProtoTests
Change-Id: Ie69d42bfd19c3a0055e96a25ac33c16c0f7d1a3f
Since the handle wasn't nullified, when the memory is explicitly
closed, the finalizer would attempt to close again, which results in
an exception.
Bug: 189213084
Test: Manual verification of ST use-cases, which uses this.
Patch sent to partner for verification.
Change-Id: I4ac6bbdd88b3f729a022896adfed00effec48bd8
While looking into another bug, I noticed that the file descriptors
do not get properly duped when converting to HidlMemory and that they
aren't explicitly closed when creating a temporary instance of
SharedMemory.
Test: Manual verification of ST functionality, which uses these
utilities.
Fixes: 188931943
Change-Id: I76322c56c58be5db8f1a40eb20eb3b96552412f9