Commit Graph

7900 Commits

Author SHA1 Message Date
Treehugger Robot
61538a7ff8 Merge "Use device SKU for Build.SKU instead of product/odm SKU" am: d1acd32722 am: 5dbd259527
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318696

Change-Id: I60137d2247a7a7033d04f669f4f90c5e2644c218
2020-06-02 21:17:20 +00:00
Treehugger Robot
5dbd259527 Merge "Use device SKU for Build.SKU instead of product/odm SKU" am: d1acd32722
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318696

Change-Id: Ida9865813088b5b1c6a0d0a728acb93dbe75cfda
2020-06-02 21:01:22 +00:00
Treehugger Robot
d1acd32722 Merge "Use device SKU for Build.SKU instead of product/odm SKU" 2020-06-02 20:48:33 +00:00
Martijn Coenen
5dab822067 Merge "Use killProcessGroup when killing app zygote." into rvc-dev am: 0a8ef2b45f
Original change: undetermined

Change-Id: I6033bc141efd30efb832c8cde26a2312d4f3c177
2020-06-02 07:08:35 +00:00
Martijn Coenen
0a8ef2b45f Merge "Use killProcessGroup when killing app zygote." into rvc-dev 2020-06-02 06:54:46 +00:00
Jeff Sharkey
459f2c806b Merge "Revert "Apps shouldn't be disabling StrictMode checks."" into rvc-dev am: c99a508218
Change-Id: I5d4a4161fa0c9e9ab8bef9a543c357bab4576408
2020-06-01 16:04:05 +00:00
Jeff Sharkey
c99a508218 Merge "Revert "Apps shouldn't be disabling StrictMode checks."" into rvc-dev 2020-06-01 15:55:14 +00:00
Jeff Sharkey
3080fb7c9e Revert "Apps shouldn't be disabling StrictMode checks."
This reverts commit 14e961870a.

Reason for revert: satayev@
Bug: 156336269

Change-Id: Ic0d3a650156c06f58fce4c28157191f4497469f0
2020-06-01 15:54:41 +00:00
Jeff Sharkey
e42cbb8704 Merge "Support getStorageVolume() for synthetic volumes." into rvc-dev am: fd71805e1c
Change-Id: I5f6675f1514ed308014e833d28e1b3a3cbe8c93a
2020-06-01 14:38:01 +00:00
Jeff Sharkey
f05d514436 Merge "Apps shouldn't be disabling StrictMode checks." into rvc-dev am: 4d96602de0
Change-Id: Iaf92a5949c9196d5d4194322e360d114325a4eea
2020-06-01 14:37:23 +00:00
Jeff Sharkey
fd71805e1c Merge "Support getStorageVolume() for synthetic volumes." into rvc-dev 2020-06-01 14:18:32 +00:00
Jeff Sharkey
4d96602de0 Merge "Apps shouldn't be disabling StrictMode checks." into rvc-dev 2020-06-01 14:16:54 +00:00
TreeHugger Robot
4af2991795 Merge "Fixed how ShellCommand show exceptions." into rvc-dev am: 725f9cea7f
Change-Id: I2b8d3c4941c79663d5f02e16b244801bbd7d97ea
2020-05-29 23:01:16 +00:00
Treehugger Robot
df04459b1d Merge "Add ParcelableHolder type" am: 7d2fc62868 am: 841a116b7e
Change-Id: Ibb9629999638c868e453889592b8290673be04c9
2020-05-29 22:08:18 +00:00
Treehugger Robot
841a116b7e Merge "Add ParcelableHolder type" am: 7d2fc62868
Change-Id: If7258d57ff14020c3127aa7eadd892ed51301cd4
2020-05-29 21:42:41 +00:00
felipeal
283e3c388d Fixed how ShellCommand show exceptions.
Prior to this change, it was duplicating the exception. Example:

$ adb shell cmd car_service create-user --flags 4444 --timeout 100 --hal-only Dude

Exception occurred while executing: new user flags mismatch on existing users on {.requestId = 2, .newUserInfo = {.userId = 11, .flags = 0x115c}, .newUserName = Dude, .usersInfo = {.currentUser = {.userId = 11, .flags = NONE}, .numberUsers = 3, .existingUsers = [{.userId = 0, .flags = 0x9}, {.userId = 10, .flags = ADMIN}, {.userId = 11, .flags = NONE}]}}
java.lang.IllegalArgumentException: new user flags mismatch on existing users on {.requestId = 2, .newUserInfo = {.userId = 11, .flags = 0x115c}, .newUserName = Dude, .usersInfo = {.currentUser = {.userId = 11, .flags = NONE}, .numberUsers = 3, .existingUsers = [{.userId = 0, .flags = 0x9}, {.userId = 10, .flags = ADMIN}, {.userId = 11, .flags = NONE}]}}
	at com.android.internal.util.Preconditions.checkArgument(Preconditions.java:69)
	at android.car.userlib.UserHalHelper.toVehiclePropValue(UserHalHelper.java:503)
	at com.android.car.hal.UserHalService.createUser(UserHalService.java:339)

Now it's showing the failed command instead:

Exception occurred while executing 'create-user --flags 4444 --timeout 100 --hal-only Dude':
java.lang.IllegalArgumentException: new user flags mismatch on existing users on {.requestId = 2, .newUserInfo = {.userId = 11, .flags = 0x115c}, .newUserName = Dude, .usersInfo = {.currentUser = {.userId = 11, .flags = NONE}, .numberUsers = 3, .existingUsers = [{.userId = 0, .flags = 0x9}, {.userId = 10, .flags = ADMIN}, {.userId = 11, .flags = NONE}]}}
	at com.android.internal.util.Preconditions.checkArgument(Preconditions.java:69)
	at android.car.userlib.UserHalHelper.toVehiclePropValue(UserHalHelper.java:503)
	at com.android.car.hal.UserHalService.createUser(UserHalService.java:339)

Test: manual verification
Bug: 150408921

Change-Id: I42221fbe2410770b0755c32d16620acc71d8d5d2
2020-05-29 21:21:56 +00:00
Martijn Coenen
6bec07ec39 Use killProcessGroup when killing app zygote.
To make sure we kill all untracked children, too.

Bug: 156741968
Bug: 157598956
Test: manual inspection, PoC no longer works.
Change-Id: I5d8efeb05ddec08a7fc7c00eabca6590c4cfdd8c
2020-05-29 14:49:25 +02:00
Treehugger Robot
7d2fc62868 Merge "Add ParcelableHolder type" 2020-05-29 04:05:46 +00:00
Jeff Sharkey
88818fe7b2 Support getStorageVolume() for synthetic volumes.
The MediaStore.VOLUME_EXTERNAL volume is a synthetic collection of
all currently mounted storage volumes, so if someone wants to find
the underlying StorageVolume for one of these Uris, we need to query
to resolve the real volume name.

Bug: 153664437
Test: atest android.provider.cts.MediaStoreTest
Change-Id: I7b28ba3bfd5b7a4cc577830940de4a2e1cbd1932
2020-05-28 19:18:40 -06:00
Jeff Sharkey
14e961870a Apps shouldn't be disabling StrictMode checks.
Since Android N we've helpfully guided apps towards using content://
Uris when sharing data, but some obstinate apps have tried bypassing
these helpful checks.  Since we're finally changing the storage model
in Android R, we really to communicate strongly that apps must be
using content://, and these methods should not be used.

Bug: 156336269
Test: manual
Change-Id: Id8707ecb51f3a24747b4c84d86c70591fb5f7ffc
2020-05-28 15:34:11 -06:00
Robin Lee
7b772fdcd1 Use device SKU for Build.SKU instead of product/odm SKU
Change-Id: I9c8bebf04cf0fa1a9cfd5211ea53c38bfb0affa7
Test: atest android.os.cts.BuildTest
Bug: 155840001
Bug: 151157621
2020-05-28 07:39:54 +00:00
Songchun Fan
b8e087607b Merge "[incremental] respect extractNativeLibs in native lib config" into rvc-dev am: f2a6af4b8a
Change-Id: Ibc96844cf6737663c48c9133b49bc9c972ed632f
2020-05-28 00:59:35 +00:00
Songchun Fan
f2a6af4b8a Merge "[incremental] respect extractNativeLibs in native lib config" into rvc-dev 2020-05-27 22:17:23 +00:00
Songchun Fan
14f6c3c735 [incremental] respect extractNativeLibs in native lib config
Makes sure the behavior is consistent with legacy installs:

When the flag is on, the native libs will be extracted to subdirs under
lib/.
When the flag is off, the lib/ subdirs will be created but the native
libs are not extracted.
When the flag is off, check if the native libs are uncompressed and well
aligned.

Test: atest android.extractnativelibs.cts.CtsExtractNativeLibsHostTest
BUG: 157173358
Change-Id: Idb57fd7ca1115f787faf5cde3056c32ff3f60890
2020-05-27 22:16:57 +00:00
Adam Bookatz
4440fc60bf Merge "Unify multiuser switcher enabled setting" into rvc-dev am: 203a17d955
Change-Id: If70ef74c9dcaf1071324cf093aeec1db7196786b
2020-05-27 17:32:20 +00:00
Adam Bookatz
203a17d955 Merge "Unify multiuser switcher enabled setting" into rvc-dev 2020-05-27 17:15:33 +00:00
Alex Johnston
5abed10363 Merge "Per-profile user restrictions in org-owned managed profile" into rvc-dev am: 155d909a08
Change-Id: I93687c3754b13bd72a53de49ce058211266bca64
2020-05-27 13:25:39 +00:00
Alex Johnston
155d909a08 Merge "Per-profile user restrictions in org-owned managed profile" into rvc-dev 2020-05-27 13:12:43 +00:00
Alex Buynytskyy
53ea003df2 Merge "Lifecycle: detecting blocked and unhealthy." into rvc-dev am: 4e5ff2eb7d
Change-Id: If0f24b8549fbf78aecf4586551528606064ecfe7
2020-05-27 04:17:10 +00:00
Brad Ebinger
b9677fd658 Merge "Add clearAll method to RegistrantList for easier cleanup" am: e3f505a02d
Change-Id: I0f3d742b83488a649bac48bf52863fb188242cfc
2020-05-26 23:30:16 +00:00
Adam Bookatz
d626fd310c Unify multiuser switcher enabled setting
This does the following:
1. The multiuser switcher (in Settings and SysUI)
is now disabled by default. In order for it to be enabled
one of the following must be true:
  a. the user has explicitly toggled it on in Settings
  b. a new user gets created (via any means)
  c. config_showUserSwitcherByDefault overrides this default

2. Even if a new user is added, if the user had explicitly
*disabled* the switcher, the switcher still won't be enabled.

3. SystemUI and Settings (et al.) all use
UserManager.isUserSwitcherEnabled as the source of
truth in this regard.
No one else reads USER_SWITCHER_ENABLED directly.

4. If the switcher is enabled, then SystemUI will show the
switcher avatar, even if there are no other users on the device,
as long as new users can be created. This way, if the user
has enabled the switcher, the user can use the avatar to add
guest/secondary users (which would not be possible if enabled
status was tied solely to the existence of other users).

Bug: 137943217
Bug: 141372193
Bug: 149973281
Bug: 130270878

Test: manual: Settings > Multiuser doesn't turn on the systemui avatar
Test: manual: Settings > Multiuser is initially disabled
Test: manual: adb shell pm create-user A, does turn on sysui avatar
              even if the user didn't enable, but not if they disabled

Change-Id: Ia440b4db78792da76f94322a563d93db0c68e933
2020-05-26 23:01:55 +00:00
Brad Ebinger
a659f19f39 Add clearAll method to RegistrantList for easier cleanup
Bug: 155320231
Fixes: 155819930
Test: atest FrameworksTelephonyTests
Change-Id: I6f1896ae163e77cff30e89a5b01b41162fc58200
Merged-In: I6f1896ae163e77cff30e89a5b01b41162fc58200
2020-05-26 14:45:13 -07:00
Alex Buynytskyy
8ef61aebee Lifecycle: detecting blocked and unhealthy.
Part 1: interfaces and PM implementation.

Bug: 153874006
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: I312dd919d2bb552bea3d72fb49fd1579882da14b
2020-05-26 19:34:39 +00:00
Collin Fijalkovich
d47bed436d Merge "Cache isUserUnlockingOrUnlocked Binder calls" into rvc-dev am: adfe0e9193
Change-Id: Ia4488c0150fc811bbd476d275b6c8f5adec792da
2020-05-26 17:57:15 +00:00
Collin Fijalkovich
adfe0e9193 Merge "Cache isUserUnlockingOrUnlocked Binder calls" into rvc-dev 2020-05-26 17:49:51 +00:00
Alex Johnston
97b68a53fb Per-profile user restrictions in org-owned managed profile
Background
* Some user restrictions should be per-profile
  instead of per-device to allow for more
  granularity.
* For this reason, the profile owner of an
  organization-owned managed profile should
  apply user restrictions the same way as the
  profile owner on the personal user
  (instead of the device owner).

Changes
* Move per-profile user restrictions from
  PROFILE_OWNER_ORGANIZATION_OWNED_GLOBAL_RESTRICTIONS
  to PROFILE_OWNER_ORGANIZATION_OWNED_LOCAL_RESTRICTIONS
  in UserRestrictionsUtils
* Update UserManager javadocs
* Update DevicePolicyManagerTest

Bug: 148453838
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDevicePolicyManagerParentSupport
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testUserRestrictionSetOnParentLogged
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testUserRestrictionsSetOnParentAreNotPersisted
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPerProfileUserRestrictionOnParent
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPerDeviceUserRestrictionOnParent
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testCameraDisabledOnParentIsEnforced
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testCameraDisabledOnParentLogged
Change-Id: I431f7b9bf45a24b77f62899794561d6098f2a54b
2020-05-26 14:32:01 +01:00
Jeongik Cha
a98415b043 Add ParcelableHolder type
To give a way to extend a stable parcelable object, a wraper for a
parcelable is necessary.
The reason why it needs to be wrapped is allowing to trasfer an extended
parcelable even though some of modules using the parcelable don't
know the type of an extension.

Whenever setParcelable() is called, it checks stability level

Bug: 146611855
Test: atest aidl_integration_test aidl_unittests

Change-Id: I6895976658fd7450b2ee47076a03079995777143
2020-05-26 22:05:30 +09:00
Adam Bookatz
9dd510e1e9 Merge "UserRestriction doc fix: primary -> admin" into rvc-dev am: 535e4abdd2
Change-Id: I084ce0b6837db8216941e3e9cecf94fa6450535f
2020-05-21 23:00:33 +00:00
Adam Bookatz
535e4abdd2 Merge "UserRestriction doc fix: primary -> admin" into rvc-dev 2020-05-21 22:44:53 +00:00
TreeHugger Robot
5eff0b3819 Merge "Reconfigure Scoped Storage experiment: force ScSt on list of apps" into rvc-dev am: 5a1dc47c34
Change-Id: Ic57203d01bf9d2287baa876b7066be42eda15131
2020-05-20 16:15:23 +00:00
shafik
3acc77cc7b Reconfigure Scoped Storage experiment: force ScSt on list of apps
Add a DeviceConfig feature that denotes a list of apps we want to force
into scoped storage. This would allow us to test these apps behaviours
under scoped storage at scale.

Also add the feature to StorageManagerService#dump.

Test: manual:
$ adb shell device_config put storage_native_boot forced_scoped_storage_whitelist <pkg>
$ adb reboot
$ adb shell dumpsys appops --package <pkg> # observe LEGACY_STORAGE
mode=ignored
Test: adb shell dumpsys mount
Bug: 151735608

Change-Id: I6a43e987ebf8d14fb64103a74bafde28f5863ae2
2020-05-20 12:37:24 +01:00
Mathew Inwood
045833a959 Merge "Remove garbage spaces" am: b29fb46920 am: fcce9c56d4
Change-Id: Ifb22ae812e5473c54d2a963eb60e9ef04af3ae9f
2020-05-20 09:41:54 +00:00
Mathew Inwood
fcce9c56d4 Merge "Remove garbage spaces" am: b29fb46920
Change-Id: I1fb3e6a7f598be9ea8d993a39e3f3ee6ac554f4d
2020-05-20 09:17:59 +00:00
Mathew Inwood
b29fb46920 Merge "Remove garbage spaces" 2020-05-20 09:01:15 +00:00
Treehugger Robot
27bfb77024 Merge "Add isStable in Parcelable interface" am: 9bb27b0311 am: a5ace2e7be
Change-Id: Ie4e99da3fb2f98222709960a7e6d1148ef18b643
2020-05-18 22:19:24 +00:00
Treehugger Robot
a5ace2e7be Merge "Add isStable in Parcelable interface" am: 9bb27b0311
Change-Id: Ia3ac39e9b47e2fdcebca868823dd6536d88f9860
2020-05-18 22:16:05 +00:00
TreeHugger Robot
7b1bcf049b Merge "Update documentation for ACTION_CLEAR_APP_CACHE" into rvc-dev am: 669b6a5987
Change-Id: Ie1aa08f25b14e2b112fe15a47dcab98e2a79fdab
2020-05-18 10:39:09 +00:00
TreeHugger Robot
669b6a5987 Merge "Update documentation for ACTION_CLEAR_APP_CACHE" into rvc-dev 2020-05-18 10:27:53 +00:00
shafik
75bb8caa55 Update documentation for ACTION_CLEAR_APP_CACHE
The actual cache clearing is not async anymore, so we can report the
status to the calling app. Here, we just change the documentation to
make the caller aware of the 3rd possible activity result: EIO.

This value is returned if an error happens while MediaProvider is
clearing the cache. In this case, we don't know how much of the cache
was deleted, if at all.

Test: build
Bug: 155290762
Change-Id: I3a04a9b5b6b07c6ec61e97a4cb0d3bc8b10b0370
2020-05-18 10:26:37 +00:00
Taesu Lee
c3ca1c2945 Remove garbage spaces
Test: build

Change-Id: Ia15e39bbcc410e9ffcf0f267e5a385d66a3bf420
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-05-18 08:57:31 +00:00