Add createUserWithAttributes method to UserManagerService.
Refactor createUser API in UserManager to call createUserWithAttributes in UserManagerService.
Add someUserHasSeedAccountOrAccount method to UserManager system API.
Did some refactoring on UserManagerService to prevent permission check chaining.
Bug: 204560945
Bug: 205100630
Test: atest UserManagerTest (cts)
Change-Id: I137ddcddba2ad422f74231fe37d3d2469b4562fc
- Introduce the PackagePartitions.FINGERPRINT to represent the
fingerprint of the build and all system partitions. Using it to
determine whether the system update has occurred.
- Update PackageManager relating modules to replace Build.FINGERPRINT
with the PackagePartitions.FINGERPRINT.
Bug: 135224411
Test: atest PackagePartitionsTest
Change-Id: I4c6244cd71cd0954b4d551f62b81b6ce3e2c4b17
Design doc is at go/statsd-bootstrap-logging. Creates a proxy service for
logging atoms from bootstrap processes to statsd. Service has one API,
which converts StatsBootstrapAtom into StatsEvent and logs to statsd.
This should only used by processes that start in the bootstrap namespace
and cannot directly link statsd's libraries to log to statsd.
Bug: 204889815
Test: booted, made sure binder service was published.
Change-Id: I09709a30a42a7a398234c995324f62a0d62ad24f
getVolumeList() previously accepted a uid and a packagename. This
approach has a few issues:
1) The uid wasn't actually checked in the implementation to match the
calling UID, nor was the package name checked against the UID in all
cases.
2) The implementation assumed that the UID also specificies the userId
that we want to get the volumes for. This was historically true, but
with the new app cloning implementation, MediaProvider running in user 0
might ask for volumes in the clone user.
To fix this, explicitly pass in the userId that we're requesting volumes
for, and verify that the calling UID and the passed in package name
match.
Bug: 206624903
Test: atest packages/providers/MediaProvider
Change-Id: Idffbb4ae7740c1b9725af0974948dc55bf1f1fde
Deprecate Vibrator.vibrate method that takes AudioAttributes and
introduce a new one that takes VibrationAttributes instead.
Update setAlwaysOnEffect to also take VibrationAttributes.
Introduce new public constructor for VibrationAttributes.Builder that
takes AudioAttributes, to be used in scenarios where the vibration
is meant to accompany an audio, and have similar attributes.
Bug: 163119475
Test: VibratorTest
Change-Id: I2721e3638aeb1aa4df3d515c3c0465923457dcc0
- APIs the get the current process name
- APIs to get the process start "request" time
Fix: 205629074
Fix: 205337677
Test: atest CtsProcessTest
Change-Id: Id284fa169eb303011cdade6c3ab96e7026654612
Deprecate unsafe parcel APIs and point to the safer ones that take the
expected type as parameter. Where applicable also mention the typed ones
that take the creator as argument since those are also more performant.
APIs deprecated here are:
* readMap(Map, ClassLoader)
* readList(List, ClassLoader)
* readHashMap(ClassLoader)
* readArrayList(ClassLoader)
* readArray(ClassLoader)
* readSparseArray(ClassLoader)
* readParcelable(ClassLoader)
* readParcelableCreator(ClassLoader)
* readSerializable()
Test: Builds
Bug: 195622897
Bug: 199275680
Bug: 205985058
Change-Id: Ic41ae13e0d965b1fd346985c77c1eecc605285b2
We pass around more and more UserHandle these days because of mainline
modules, because even @SystemApi are not allowed to use integer user
IDs.
So let's make sure even in extreme cases we don't keep allocating
new UserHandle's for the same user.
Test: atest $ANDROID_BUILD_TOP/frameworks/base/core/tests/coretests/src/android/os/UserHandleTest.java
Test: atest $ANDROID_BUILD_TOP/cts/tests/app/src/android/app/cts/UserHandleTest.java
Change-Id: Iae34e1d11638ced53246d68d310ad62e058dba93
Added typed read API of `readMap` and `readHashMap`,
that takes extra clazz parameters check that the class written
on the wire is the same or a descendant from the one provided
as the key and value arguments.
Doing so could enhance the security of Parcel deserialization,
as it would prevent unexpected types of objects being deserialized.
More details can be found at go/safer-parcel.
Test: atest -d android.os.cts.ParcelTest
Bug: 195622897
Change-Id: Ife9d1d7277b6345a6e11856179c301339b2dc087
Allow configuration of foldable states to indicate the device
should sleep when entering certain states.
Test: Check that device still wakes up on unfold, and sleeps on fold.
Bug: 180154690
Change-Id: I179d93ec506deee7e9da7d9190934c52a0bc188f
New methods are to write a list/array of interface objects and to read
them again.
Basically these methods are quite similar to those for IBinder objects.
But when reading IInterface objects, we need to create an array of the
exact type and need a way of converting IBinder into IInterface value.
Two functional interfaces (newArray and asInterface) are just like
while Parcelable.Creator does. We could pass "Stub" class which is
generated by the AIDL compiler and use reflection to create a typed
array instance and call `asInterface` method. But rather than relying on
reflection, passing `IMyInterface[]::new` and
`IMyInterface.Stub::asInterface` would be simple enough to use.
Bug: 205195901
Test: atest -d android.os.cts.ParcelTest
Change-Id: I275db9ebf52d3b9713fa105d81da3a1d289d96a8