Commit Graph

10433 Commits

Author SHA1 Message Date
Dmitri Plotnikov
5c32c09d93 Merge "Define SDK_SANDBOX_VIRTUAL_UID" into tm-dev am: 2dff83f88a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17039035

Change-Id: I2c3ecf195542452cef6bc3c2c5b007a5c1c6f682
2022-03-08 19:36:02 +00:00
Dmitri Plotnikov
2dff83f88a Merge "Define SDK_SANDBOX_VIRTUAL_UID" into tm-dev 2022-03-08 19:18:11 +00:00
Gavin Corkery
56c39376bb Merge "Rename sdkSandboxToAppUid to getAppUidForSdkSandboxUid" into tm-dev am: 25778aaf39
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17122823

Change-Id: Iab70b3c31f084726f0a536a12653f169b704de47
2022-03-08 17:39:07 +00:00
Gavin Corkery
25778aaf39 Merge "Rename sdkSandboxToAppUid to getAppUidForSdkSandboxUid" into tm-dev 2022-03-08 17:20:02 +00:00
Gavin Corkery
2e85bab00d Rename sdkSandboxToAppUid to getAppUidForSdkSandboxUid
Test: Build
Bug: 223185146
Change-Id: Ie3531d6606b18359497bfb7d6c5fef7e3078f29f
2022-03-08 14:45:52 +00:00
Dmitri Plotnikov
a242a89956 Define SDK_SANDBOX_VIRTUAL_UID
Bug: 219080829
Bug: 219077358
Test: N/A - this is a constant definition
Change-Id: I64861513962a384f1a46a736e429e71d6d22cbed
2022-03-07 15:13:27 -08:00
Lee Shombert
5bb0cc3ac2 Merge "Create os/IpcDataCache" into tm-dev am: 53dd894d42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17083666

Change-Id: Ia1b40845c872ac8a849990bb75692bbe3f5f0679
2022-03-07 20:40:28 +00:00
Lee Shombert
53dd894d42 Merge "Create os/IpcDataCache" into tm-dev 2022-03-07 20:26:05 +00:00
Lee Shombert
4f1473c6ac Create os/IpcDataCache
Bug: 219609105

Create os/IpcDataCache as a subclass of PropertyInvalidatedCache.  The
APIs in the new class are the SystemApi for mainline modules.

Note that IpcDataCache.invalidateCache(String) is a new system API,
relative to the list in PropertyInvalidateCache.  The new API is
static, which is the most common use case for invalidateCache calls.

The corresponding CTS test is updated in the next review.  However, it
is also cloned into the current unit test.

Test: * atest FrameworksCoreTests:PropertyInvalidatedCacheTests
 * atest FrameworksCoreTests:IpcDataCacheTest
Change-Id: I83ce97a4154b9065e0686ee99a25c90f955366ff
2022-03-07 08:26:11 -08:00
Simon Bowden
9c96573c23 Merge "Ensure unlinkToDeath when cancelling external vibrations." into tm-dev am: 4dfe4924d4 am: baaf4942d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17071468

Change-Id: I547750fda5e5c4ff920d3eea7ba8c520ed25d5cc
2022-03-07 11:18:03 +00:00
Simon Bowden
4dfe4924d4 Merge "Ensure unlinkToDeath when cancelling external vibrations." into tm-dev 2022-03-07 10:57:22 +00:00
Sarup Dalwani
2076e74831 Merge "Renaming isCredentialSharedWithParent to isCredentialSharableWithParent" 2022-03-07 10:44:17 +00:00
Eric Biggers
0f0530ff03 Merge "Remove broken code for mounting encrypted OBB files" am: a4f24f08b0 am: 56c37e5778 am: 089a351d31 am: 4fb38d5fc3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003052

Change-Id: Icea63b78f2e329e53c5a855b7711a0a034efe1cf
2022-03-04 22:15:50 +00:00
Eric Biggers
4fb38d5fc3 Merge "Remove broken code for mounting encrypted OBB files" am: a4f24f08b0 am: 56c37e5778 am: 089a351d31
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003052

Change-Id: I87cbb67af5e1dc62ddbb8ff7d58a256ee4569b44
2022-03-04 22:11:49 +00:00
Eric Biggers
56c37e5778 Merge "Remove broken code for mounting encrypted OBB files" am: a4f24f08b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003052

Change-Id: Id027c555af21e46922a1c0ce29195d95bb7bb876
2022-03-04 21:27:43 +00:00
Samiul Islam
a29df63e9f Merge "Create sdk directory for an app only if app consumes sdk" into tm-dev am: 4781c8b220
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16966506

Change-Id: Ic11f2f1ff7222883a1416ec42ab4663e22a5c6ff
2022-03-04 18:52:09 +00:00
Eric Biggers
8bc9340b4c Remove broken code for mounting encrypted OBB files
Mounting encrypted OBB files has never worked reliably across devices,
partly due to its reliance on Twofish encryption support in the kernel.
This is because Twofish support (CONFIG_CRYPTO_TWOFISH) has never been
required or even recommended for Android.  It has never been enabled in
GKI, but even before GKI it wasn't required or recommended.  Moreover,
this is now the only Android feature that still uses dm-crypt
(CONFIG_DM_CRYPT), and some devices don't have that enabled either.

Therefore, it appears that this feature is unused.  That's perhaps not
surprising, considering that the documentation for OBBs
(https://developer.android.com/google/play/expansion-files) says that
they are deprecated, and also it explains OBBs as being app files that
are opaque to the platform; the ability of the platform to mount OBBs
that happen to be in a particular format is never mentioned.  That means
that OBB mounting is probably rarely used even with unencrypted OBBs.
Finally, the usefulness of OBBs having their own encryption layer (in
addition to what the platform already provides via FBE) is not clear
either, especially with such an unusual choice of cipher.

To avoid the confusion that is being caused by having the broken code
for mounting encrypted OBBs still sitting around, let's remove it.

Test: atest StorageManagerTest # on Cuttlefish
Test: atest StorageManagerIntegrationTest # on Cuttlefish
Bug: 216475849
Change-Id: I6e6a6462ab8343299dc5e0145b87dc28b16b0bc1
2022-03-04 04:51:54 +00:00
Samiul Islam
beaf4d8692 Create sdk directory for an app only if app consumes sdk
Currently, we create sdk directories for all apps. This means during
boot time, when we create app data directory for system apps, we are now
creating twice the amount of directories as before. This has significant
impact on boot time.

In order to avoid the regression, we are now limiting the creation to
only when app actually consumes an sdk and needs these directories. We
have introduced a new installd flag: FLAG_STORAGE_SDK, which needs to be
passed to installd when sdk directory should be created for the app.

Bug: 220095381
Bug: 217543371
Test: atest SupplementalProcessStorageHostTest
Change-Id: I72af7c9460892bf7ac6d908a6a7ca6912167b894
2022-03-04 00:26:02 +00:00
Yasin Kilicdere
bb673791e5 Merge "Fix Guest string was not translated in UMS.userWithName()" into tm-dev 2022-03-04 00:03:00 +00:00
TreeHugger Robot
e82cb2aa4c Merge "Document isManagedProfile usage should probably be isProfile" into tm-dev am: 8819133efc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17072218

Change-Id: I71b73a51273d3c1448183b0631c55451a2c45e63
2022-03-03 22:47:07 +00:00
TreeHugger Robot
8819133efc Merge "Document isManagedProfile usage should probably be isProfile" into tm-dev 2022-03-03 22:38:37 +00:00
Gavin Corkery
4d68713b8e Merge "Add some Process APIs to test_current" into tm-dev am: 0214bd512e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16943884

Change-Id: Idb142bd2b902bee7424f7d7367c9828611cf1058
2022-03-03 21:04:37 +00:00
Simon Bowden
d319a179a7 Ensure unlinkToDeath when cancelling external vibrations.
Remove the ExternalVibrationDeathRecipient, and use the ExternalVibrationHolder directly. Ensure all resets of mCurrentExternalVibration pass through the end method that unlinks.

Add some test coverage.

Bug: 222300386
Test: atest
Change-Id: I7da926af98e5b9e6a80f50c27e1655e02308710f
2022-03-03 18:46:02 +00:00
Yasin Kilicdere
d03224f326 Fix Guest string was not translated in UMS.userWithName()
Guest users name was stuck with the language when it was created,
and it wasn't changing with the active language setting.
To solve that, removed name parameter from UM.createGuest() and
created the guest user with a null name, then made changes
in UMS.userWithName() to fill the name of guest user with the active
language's translation when it has a null name.
Creating a guest with a specific name is still supported
through UM.createUser API.

Bug: 185309160
Test: atest com.android.server.pm.UserManagerTest
Change-Id: I2745aed0ea722765a11c6da40fb4159146da54c7
Merged-In: I2745aed0ea722765a11c6da40fb4159146da54c7
(cherry picked from commit c556777ca4)
2022-03-03 18:32:23 +00:00
Adam Bookatz
0b5d0c7f87 Document isManagedProfile usage should probably be isProfile
Much usage of isManagedProfile should probably really be isProfile instead, so have the javadoc explicitly point to it.

Bug: 170249807
Change-Id: Ia6c3cc6d052f2b9f6581fd160410b9ef601c3bcf
Test: N/A (just doc)
2022-03-03 17:53:23 +00:00
Sarup Dalwani
ece66c4116 Renaming isCredentialSharedWithParent to isCredentialSharableWithParent
Renaming isCredentialSharedWithParent to isCredentialSharableWithParent,
as for work profile there is possibility to enroll its own credential.

Bug: 222108271
Test: atest android.multiuser.cts.UserManagerTest
atest LockSettingsServiceTests

Change-Id: If343342d0a5e996cbd430a4063b25fbc4874c5c0
2022-03-03 17:23:49 +00:00
Gavin Corkery
b9c52eb96c Add some Process APIs to test_current
In order to test MODULE_LIBRARIES System APIs, the
@TestApi annotation needs to be explicitly added. Also adds
some whitespace changes which were autogenerated when
updating the APIs. Also renames Process.toAppUid().

Test: atest ProcessTest
Bug: 218723058
Change-Id: I49bee200c267550b9616ad0b43022126d2d7cc4b
2022-03-03 14:59:31 +00:00
Yasin Kilicdere
b7f163f13b Merge "Fix Guest string was not translated in UMS.userWithName()" 2022-03-03 03:24:18 +00:00
Sandro Montanari
211b1a9c58 Merge "Add /metadata info on dumpsys diskstats and StatsPullAtomService" am: 31f779f949 am: 079b5b2e27 am: b5b91ee453 am: b815f74d5f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1993550

Change-Id: Iba463e1ff7640013cb10626995c8893a3056f202
2022-03-02 19:35:50 +00:00
Sandro Montanari
b815f74d5f Merge "Add /metadata info on dumpsys diskstats and StatsPullAtomService" am: 31f779f949 am: 079b5b2e27 am: b5b91ee453
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1993550

Change-Id: I0fe8899299577c8b2b8381e4ea385fd982c74eb7
2022-03-02 19:31:13 +00:00
Bernardo Rufino
13591cdaeb Merge "Adjust Class<T> parameter bounds in new Bundle APIs" am: 15b7548d05 am: 7f6ac3e820 am: ffdd4aa037 am: fe435670d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2004350

Change-Id: Iaa4ad9303370fecc70b25f701853efc667c2e953
2022-03-02 18:49:03 +00:00
Sandro Montanari
079b5b2e27 Merge "Add /metadata info on dumpsys diskstats and StatsPullAtomService" am: 31f779f949
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1993550

Change-Id: Iebb35e4099506f05f73c59dd689e84e75ae8756d
2022-03-02 18:47:03 +00:00
Bernardo Rufino
fe435670d3 Merge "Adjust Class<T> parameter bounds in new Bundle APIs" am: 15b7548d05 am: 7f6ac3e820 am: ffdd4aa037
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2004350

Change-Id: I09586ba0388f89f0da4ee95a0445424e6a68fa8e
2022-03-02 18:26:18 +00:00
Sandro Montanari
31f779f949 Merge "Add /metadata info on dumpsys diskstats and StatsPullAtomService" 2022-03-02 18:22:28 +00:00
Bernardo Rufino
7f6ac3e820 Merge "Adjust Class<T> parameter bounds in new Bundle APIs" am: 15b7548d05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2004350

Change-Id: I7beed95d36ba4a83c4e6460dc34d92bdd0873fc8
2022-03-02 17:32:29 +00:00
Bernardo Rufino
15b7548d05 Merge "Adjust Class<T> parameter bounds in new Bundle APIs" 2022-03-02 17:00:31 +00:00
sandrom
f76f5842a4 Add /metadata info on dumpsys diskstats and StatsPullAtomService
Bug: 208676063
Test: manual tests
Change-Id: Ice3b706222aa1f77beadb1b9f4ae93f0d796a0b0
2022-03-02 08:08:23 +00:00
TreeHugger Robot
c9d7b97ea8 Merge "Fix memory flags in external services and secondary zygotes." into tm-dev am: 951aa29f72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16989014

Change-Id: Ibfba1b5e3db063e4c34965b87d3e8df260bcd979
2022-03-02 01:19:29 +00:00
Colin Cross
811efa2b62 Merge "Add Build.Version.RELEASE_OR_PREVIEW_DISPLAY" am: a789b92644 am: e3086a9896 am: ffa0f38936 am: 4c7fba2811
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003053

Change-Id: Ie6d2d2c0df60f381ae078b47dad64b93418bb2a8
2022-03-02 01:18:56 +00:00
TreeHugger Robot
951aa29f72 Merge "Fix memory flags in external services and secondary zygotes." into tm-dev 2022-03-02 00:57:51 +00:00
Colin Cross
4c7fba2811 Merge "Add Build.Version.RELEASE_OR_PREVIEW_DISPLAY" am: a789b92644 am: e3086a9896 am: ffa0f38936
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003053

Change-Id: I21f5874867e74ca12334711adf1fbc6938c1a3ff
2022-03-02 00:55:39 +00:00
Colin Cross
e3086a9896 Merge "Add Build.Version.RELEASE_OR_PREVIEW_DISPLAY" am: a789b92644
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003053

Change-Id: Iab0ad2e55f21ba464ae1b7d4c3ac3252638f711b
2022-03-02 00:13:00 +00:00
Yasin Kilicdere
c556777ca4 Fix Guest string was not translated in UMS.userWithName()
Guest users name was stuck with the language when it was created,
and it wasn't changing with the active language setting.
To solve that, removed name parameter from UM.createGuest() and
created the guest user with a null name, then made changes
in UMS.userWithName() to fill the name of guest user with the active
language's translation when it has a null name.
Creating a guest with a specific name is still supported
through UM.createUser API.

Bug: 185309160
Test: atest com.android.server.pm.UserManagerTest
Change-Id: I2745aed0ea722765a11c6da40fb4159146da54c7
2022-03-02 00:09:38 +00:00
Colin Cross
a789b92644 Merge "Add Build.Version.RELEASE_OR_PREVIEW_DISPLAY" 2022-03-02 00:01:05 +00:00
Neil Fuller
465771968c Merge "Add explicit OWNERS for SystemClock and related classes" am: c740b09828 am: 1cd597ccd1 am: f0454c198f am: ca67d53303
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003870

Change-Id: I0195faa22a155a68854bc40eb66fd91a09ecd8ae
2022-03-01 18:54:34 +00:00
Neil Fuller
ca67d53303 Merge "Add explicit OWNERS for SystemClock and related classes" am: c740b09828 am: 1cd597ccd1 am: f0454c198f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003870

Change-Id: I1c5e525b23ae2622c79c32f05113f78b9180d084
2022-03-01 18:42:28 +00:00
Evgenii Stepanov
fe85ed2ef5 Fix memory flags in external services and secondary zygotes.
This change fixes a number of interconnected issues in memory safety
(MTE, GWP-ASan, nativeHeapZeroInit) runtime flags.

* Exported services use the hosting app UID to locate the process
  definition, and fail 100% of the time. Use the defining app UID and
  package name instead.
* Isolated services process name does not match the name in the defining
  app manifest, because it includes a class name and an instance number.
  Pass the defining process name in HostingRecord to address this.
* Exported service ApplicationInfo.packageName refers to the hosting
  app, again. As a result, wrong compat feature overrides are applied.
  This has been fixed before for AppZygote services; extend the fix to all
  external services.
* Pass correct memory runtimeFlags to WebViewZygote. This is important
  because both MTE and GWP-ASan have a one-way disable switch; they are
  enabled in the Zygote and disabled in the apps that do not opt-in.
  Passing 0 runtimeFlags to WebViewZygote (and AppZygote) makes it
  impossible to enable these features later in their child processes.

This change moves runtimeFlags logic from ProcessList to os.Zygote to
make it available to WebViewZygote.

Bug: 208910418
Test: CtsTaggingHostTestCases
Test: atest in frameworks/base
Test: CtsWebkitTestCases
Test: manual install WebView with android:memtagMode tag

Change-Id: I232d35344f4cd34226ff11324421904b35251525
2022-03-01 18:23:28 +00:00
Neil Fuller
1cd597ccd1 Merge "Add explicit OWNERS for SystemClock and related classes" am: c740b09828
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2003870

Change-Id: Id14bf9d6a5eb3bc9f740e4c4a86fcc71d6ba4741
2022-03-01 17:59:02 +00:00
Nikita Ioffe
5b7b56bb88 Merge "Rename SupplementalProcess to SdkSandbox" into tm-dev am: 8056335fcd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16951825

Change-Id: Ia6b33bbf08a0cc93697fe5a98f3f3fa2793ad7d9
2022-03-01 17:28:21 +00:00
Nikita Ioffe
8056335fcd Merge "Rename SupplementalProcess to SdkSandbox" into tm-dev 2022-03-01 17:07:16 +00:00