Commit Graph

10024 Commits

Author SHA1 Message Date
Dmitri Plotnikov
ae0596ccb0 Merge "Fix NPE caused by a null battery history tag" 2021-11-29 21:02:00 +00:00
Adam Bookatz
3176e85792 Merge "UserManager.isUserTypeEnabled" 2021-11-29 21:00:48 +00:00
Stephanie Bak
f12f44547c Merge "Adding a new user restriction DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI" 2021-11-29 20:08:38 +00:00
Lais Andrade
0447a404bd Merge "Introduce media and accessibility vibration usages." 2021-11-29 18:10:48 +00:00
Dmitri Plotnikov
b6d0af354b Fix NPE caused by a null battery history tag
Bug: 206823946
Test: atest CtsDumpsysHostTestCases:BatteryStatsDumpsysTest
Change-Id: I7a5d70137608bf80ec8a0ca4ee161a42a0d96f95
2021-11-29 09:56:06 -08:00
Treehugger Robot
52f2c48a54 Merge "Update vibrator file owners" am: fcab8baf60 am: 4c1e2a20ca am: ed1a20f15d am: dba6db0483
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1905230

Change-Id: I0346f2f3ad1dcd1d3742900fa7f5a938f6d80ecd
2021-11-29 15:31:43 +00:00
Treehugger Robot
dba6db0483 Merge "Update vibrator file owners" am: fcab8baf60 am: 4c1e2a20ca am: ed1a20f15d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1905230

Change-Id: I9c3b48508f66343333088403c3594d5c8d597428
2021-11-29 15:18:27 +00:00
Treehugger Robot
ed1a20f15d Merge "Update vibrator file owners" am: fcab8baf60 am: 4c1e2a20ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1905230

Change-Id: I2851f8279bf1a4c9a8b80f06127d03d2c9bcc1fa
2021-11-29 15:06:43 +00:00
Treehugger Robot
4c1e2a20ca Merge "Update vibrator file owners" am: fcab8baf60
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1905230

Change-Id: Ie0f0dc75410cec10173fdb99e8eebb50b24c04ea
2021-11-29 14:53:50 +00:00
Lais Andrade
14dd35d2a7 Introduce media and accessibility vibration usages.
Also update mappings to add new communication request values from
AudioAttributes.

Bug: 207477604
Test: VibrationAttributesTest
Change-Id: I0b7f49c5c8770c039546fb15e89be5db43708b78
2021-11-29 14:23:01 +00:00
Lais Andrade
2447152914 Update vibrator file owners
This should include the missing file VibrationAttributes as well.

Change-Id: I041fc01bba70da46004f27e9dd4fafdef7768ba3
2021-11-29 13:13:14 +00:00
Stephanie Bak
b75ad62dc7 Adding a new user restriction DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI
Bug: 197558754
Test: atest UserRestrictionsTest
Change-Id: Id44b0799efe315501976f127b47dc02669782266
2021-11-29 07:14:01 +00:00
Treehugger Robot
bc6e294027 Merge "Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}" am: b6f19328d5 am: 5dc7e50d24 am: 66536ae4f7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1891615

Change-Id: Ia9706ddd9ef79a1921e8413dca94ec5d96261e24
2021-11-26 03:58:30 +00:00
Treehugger Robot
66536ae4f7 Merge "Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}" am: b6f19328d5 am: 5dc7e50d24
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1891615

Change-Id: I35f53119fcc0daf2dd112191b40460aa16218939
2021-11-26 03:41:28 +00:00
Treehugger Robot
5dc7e50d24 Merge "Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}" am: b6f19328d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1891615

Change-Id: I2aaee0d7eae200481bafd21d3082222412c998bd
2021-11-26 03:23:23 +00:00
Youkichi Hosoi
9b033785ae Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}
Currently, VolumeInfo.isVisibleForUser(), VolumeInfo.isVisibleForRead(),
and VolumeInfo.isVisibleForWrite() are all equivalent; all of them just
mean that the volume has MOUNT_FLAG_VISIBLE.

This CL splits MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_READ and
MOUNT_FLAG_VISIBLE_FOR_WRITE. They correspond to isVisibleForRead() and
isVisibleForWrite(), respectively, whereas isVisibleForUser() is now
defined as isVisibleForRead() || isVisibleForWrite().

Accordingly, all usages of MOUNT_FLAG_VISIBLE are replaced with
MOUNT_FLAG_VISIBLE_FOR_WRITE, and all usages of isVisibleForRead() are
replaced with isVisibleForUser().

Bug: 206019156
Test: m
Change-Id: I576430680620363f4fbe49787035bd52445b3554
Merged-In: I576430680620363f4fbe49787035bd52445b3554
2021-11-25 13:04:34 +09:00
Adam Bookatz
67639c67e1 Merge "UM.canAddMoreUsers(userType)" 2021-11-24 18:51:14 +00:00
TreeHugger Robot
5eedc93388 Merge "Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}" 2021-11-24 12:37:31 +00:00
Rhed Jao
903e3bbcae Merge "Fix PackageManager did not recognize OTA when only upgrade product" 2021-11-24 01:56:41 +00:00
Adam Bookatz
5488844638 UserManager.isUserTypeEnabled
Introduce hidden API for Settings to determine whether a given user type
is enabled, so that it knows not to show the option for creating users
of that type.

Bug: 192577100
Test: com.android.settings.users.UserSettingsTest
Change-Id: Ie99b0772dce3bb275aded0f6ef0404466a76b660
2021-11-23 14:52:36 -08:00
Adam Bookatz
ac0a1235ee UM.canAddMoreUsers(userType)
Introduces an API for whether more users can be added of the given user
type.

Bug: 192577100
Bug: 175795666
Bug: 189937255
Bug: 205100630
Test: atest com.android.server.pm.UserManagerTest#testAddTooManyUsers
Change-Id: I1c705d65d1c083a60fd4e058456dcdc4ffa0fffb
2021-11-23 10:14:29 -08:00
Yasin Kilicdere
c7b8b6acdd Merge "Change createUser API in UserManager to create a user with seed account data." 2021-11-22 14:24:16 +00:00
Yasin Kilicdere
d4a6b38ccd Change createUser API in UserManager to create a user with seed account data.
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
2021-11-19 19:17:26 +00:00
Rhed Jao
d150569b03 Fix PackageManager did not recognize OTA when only upgrade product
- 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
2021-11-19 13:59:52 +08:00
Treehugger Robot
4f10090196 Merge "Create StatsBootstrapAtomService" am: e9f913aee8 am: c2566e6582 am: c74d9d6911 am: c9c355889c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885469

Change-Id: I30eeb8206bca1d8d298977a80bcd35c554e98fe5
2021-11-19 00:40:21 +00:00
Treehugger Robot
c9c355889c Merge "Create StatsBootstrapAtomService" am: e9f913aee8 am: c2566e6582 am: c74d9d6911
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885469

Change-Id: Ia2fa8a3d576b41a0b55cbdd6dc29a3d3126e9cfa
2021-11-19 00:22:11 +00:00
Treehugger Robot
c74d9d6911 Merge "Create StatsBootstrapAtomService" am: e9f913aee8 am: c2566e6582
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885469

Change-Id: I08d70d539650a2bec4e08681f3c6bd7bd12698cd
2021-11-19 00:04:36 +00:00
Treehugger Robot
c2566e6582 Merge "Create StatsBootstrapAtomService" am: e9f913aee8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885469

Change-Id: I9fe270fa5bffb2edd912ba59fbc6c002497e76b4
2021-11-18 23:48:16 +00:00
Treehugger Robot
e9f913aee8 Merge "Create StatsBootstrapAtomService" 2021-11-18 23:25:21 +00:00
Tej Singh
da79f2a110 Create StatsBootstrapAtomService
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
2021-11-18 13:27:21 -08:00
TreeHugger Robot
33f9db9246 Merge "Add public vibrate method with VibrationAttributes" 2021-11-18 17:12:46 +00:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Makoto Onuki
5c53f4a047 Improve the javadoc for the new Process APIs.
Fix: 206696542
Test: treehugger
Change-Id: Iab420163f7970d2c5036e997f567812bf31fca22
2021-11-17 11:30:01 -08:00
Mayank Garg
a8d31ebbc8 Merge "Implementation for new createUser call" 2021-11-17 18:08:39 +00:00
Mayank Garg
04f9d971cc Implementation for new createUser call
Bug: 199446283
CTS-Coverage-Bug: 199446283
Test: m
Change-Id: Ib15377cdac667b3ab6842aa894bb0890e341d610
2021-11-17 15:45:05 +00:00
Martijn Coenen
e57620446b Have getVolumeList() take a userId instead of a UID.
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
2021-11-17 13:59:54 +00:00
Lais Andrade
4e9af66050 Add public vibrate method with VibrationAttributes
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
2021-11-17 13:25:45 +00:00
Bernardo Rufino
f5956d39ae Merge "Deprecate unsafe parcel APIs" am: 9f8b914c9f am: 87b6f365d3 am: 04f4d7aa21 am: df232c0faf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1890540

Change-Id: Ied54481c20c266512190fb0a438b5756c87b7687
2021-11-17 10:57:04 +00:00
Bernardo Rufino
df232c0faf Merge "Deprecate unsafe parcel APIs" am: 9f8b914c9f am: 87b6f365d3 am: 04f4d7aa21
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1890540

Change-Id: I1cedae136129697fcf2df852034eb6c422e6316a
2021-11-17 10:37:31 +00:00
Bernardo Rufino
04f4d7aa21 Merge "Deprecate unsafe parcel APIs" am: 9f8b914c9f am: 87b6f365d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1890540

Change-Id: If483ab5bd836e3700d67bc7ba6701f5e35a58b57
2021-11-17 10:20:56 +00:00
Bernardo Rufino
9f8b914c9f Merge "Deprecate unsafe parcel APIs" 2021-11-17 09:43:11 +00:00
Yifan Hong
e0d06afbe5 Merge "Add ServiceManager.registerForNotifications" am: ce80de5db0 am: 45ddf12cbc am: 3b546f86e0 am: 5c940e62c3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1883550

Change-Id: I873e0e99b6671858cdbc4ed85312f77fd2bbe077
2021-11-17 06:24:57 +00:00
Yifan Hong
5c940e62c3 Merge "Add ServiceManager.registerForNotifications" am: ce80de5db0 am: 45ddf12cbc am: 3b546f86e0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1883550

Change-Id: Ic5346dff7ffdb0f2d0d8e911cb931db167c7a2b0
2021-11-17 06:12:15 +00:00
Yifan Hong
3b546f86e0 Merge "Add ServiceManager.registerForNotifications" am: ce80de5db0 am: 45ddf12cbc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1883550

Change-Id: I8f7746e16b1e60fbc29a93dae3046b05f00c212d
2021-11-17 05:55:32 +00:00
Makoto Onuki
15b2e036ee Merge "Add new APIs to android.os.Process" 2021-11-16 22:10:35 +00:00
Dmitri Plotnikov
03fca4a0ef Merge "Reduce object allocation in procstate CPU attribution" 2021-11-16 21:10:12 +00:00
TreeHugger Robot
3ae8743e33 Merge "Made USER_TYPE_FULL_GUEST a @SystemApi" 2021-11-16 19:45:38 +00:00
TreeHugger Robot
f86b4b4974 Merge "Go to sleep on fold for foldable devices." 2021-11-16 04:09:38 +00:00
Makoto Onuki
13f2f6a511 Add new APIs to android.os.Process
- 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
2021-11-15 15:37:37 -08:00
Youkichi Hosoi
9c0b284bed Split MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_{READ, WRITE}
Currently, VolumeInfo.isVisibleForUser(), VolumeInfo.isVisibleForRead(),
and VolumeInfo.isVisibleForWrite() are all equivalent; all of them just
mean that the volume has MOUNT_FLAG_VISIBLE.

This CL splits MOUNT_FLAG_VISIBLE into MOUNT_FLAG_VISIBLE_FOR_READ and
MOUNT_FLAG_VISIBLE_FOR_WRITE. They correspond to isVisibleForRead() and
isVisibleForWrite(), respectively, whereas isVisibleForUser() is now
defined as isVisibleForRead() || isVisibleForWrite().

Accordingly, all usages of MOUNT_FLAG_VISIBLE are replaced with
MOUNT_FLAG_VISIBLE_FOR_WRITE, and all usages of isVisibleForRead() are
replaced with isVisibleForUser().

Bug: 206019156
Test: m
Change-Id: I576430680620363f4fbe49787035bd52445b3554
2021-11-15 12:07:25 +09:00