Commit Graph

10433 Commits

Author SHA1 Message Date
Steven Moreland
e9889e0fc1 Merge "ParcelableHolder: assert stability on read" am: 180aa227f6 am: a9febdf125 am: 6f2efc48ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2020960

Change-Id: I708ea16d3907e8bde822c5cf370ae0a66355c1a5
2022-03-15 18:16:49 +00:00
Michael Wachenschwanz
98a2f3a88b Merge "Fix units is getActiveRadioDuration documentation" into tm-dev 2022-03-15 17:06:05 +00:00
Steven Moreland
180aa227f6 Merge "ParcelableHolder: assert stability on read" 2022-03-15 17:00:57 +00:00
Mayank Garg
e8688b5353 Merge "Improved error code for Remove Result" into tm-dev 2022-03-15 02:08:04 +00:00
Michael Wachenschwanz
3f53035561 Merge "Smear ModemActivityInfo across multiple stats" into tm-dev 2022-03-15 01:26:33 +00:00
Eric Biggers
e945bd62d6 Merge changes from topic "remove-fde" into tm-dev
* changes:
  Remove unused FDE methods from StorageManager
  Stop checking FDE password cache
  Remove checks for FDE in 'adb backup'
2022-03-14 23:03:22 +00:00
Michael Wachenschwanz
a3d930691e Fix units is getActiveRadioDuration documentation
Bug: 207697945
Test: n/a
Change-Id: Ie6d2846fe37962e6ce87c0bf35c5ee463b110901
2022-03-14 15:26:22 -07:00
Michael Wachenschwanz
be79640cb0 Smear ModemActivityInfo across multiple stats
If ModemActivityInfo is available on a device, smear the provided
transmit and received times across RadioAccessTechnology and frequency
(for NR RAT).

Bug: 207697945
Test: atest BatteryStatsNoteTest
Change-Id: Ifb4e30dc3fa5ac5dd4824a87a7a86c4a0d14d019
(cherry picked from commit e85ac3239e)
2022-03-14 15:16:15 -07:00
Dmitri Plotnikov
b79d6441df Merge "Track CACHED procstate in BatteryStats" into tm-dev 2022-03-14 19:42:07 +00:00
Bernardo Rufino
91dfda1f28 Merge "Document when types are checked in Bundle" am: 05f2831e1c am: 9e3ee7afc6 am: 5e90e84fe6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2018615

Change-Id: I4d7f75c708922cf6889fe7125f6be537426e7c06
2022-03-14 10:01:55 +00:00
Bernardo Rufino
05f2831e1c Merge "Document when types are checked in Bundle" 2022-03-14 08:53:45 +00:00
Dmitri Plotnikov
c311349874 Track CACHED procstate in BatteryStats
Bug: 216361629
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: If3ada99a009d09db07f38be1ffb62e86c637e1a3
2022-03-10 17:26:11 -08:00
Steven Moreland
f1010eb8ad ParcelableHolder: assert stability on read
The interface a ParcelableHolder is in determines its stability,
and it shouldn't change based on what is sent.

Bug: 215458170
Test: aidl_integration_test
Change-Id: I40239e14e59b3998ac19d140453eb29a298cdb76
2022-03-10 23:54:23 +00:00
Eric Biggers
ad08fcc781 Remove unused FDE methods from StorageManager
Now that FDE is no longer supported, remove the FDE-related methods from
StorageManager that are no longer called.

Bug: 208476087
Change-Id: Ic24a5b029bdf51dec622d1b70cef9ef26c3d54c5
(cherry picked from commit 41fa601601)
Merged-In: Ic24a5b029bdf51dec622d1b70cef9ef26c3d54c5
2022-03-10 23:05:09 +00:00
Dmitri Plotnikov
64d4b30850 Exclude SDK Sandbox virtual UID from BatteryUsageStats
Bug: 219077358
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: I42e73348f787841677ce63e8cb2be98a0b8e53e2
2022-03-10 18:18:11 +00:00
Sanjana Sunil
d3eabb0714 Set correct storage path for SDK sandbox
For WebView to run in an sdk sandbox process, Context.getDataDir() needs
to return the shared sandbox storage. This CL sets the value in
LoadedApk while binding the application and modifies bindSdkSandbox API
to take in the client app package name to use in the path.

Test: Manual, check that WebView in sandbox tries to access sandbox
shared storage
Bug: 216284889

Change-Id: I1f8bb7e533d155050710866b80047ec849a98f35
2022-03-10 13:28:39 +00:00
Martijn Coenen
5a8d1b20b4 Add a new UID range for SDK sandbox processes.
These are processes that are spawned alongside regular app processes.
They have their own UID range, such that they can be properly isolated
from applications.

Add some APIs in Process that allows the system and mainline
modules to verify that a particular UID belongs to a sandbox
process, and to map between the sandbox process and the
corresponding app process.

Bug: 215012578
Test: N/A
Change-Id: I02aaaa1c2bcf9d141ddc97747eb6d7edd52d7b92
Merged-In: I02aaaa1c2bcf9d141ddc97747eb6d7edd52d7b92
2022-03-10 10:35:16 +01:00
Sarup Dalwani
bf3f189a34 Merge "Renaming isCredentialSharedWithParent to isCredentialSharableWithParent" into tm-dev 2022-03-10 05:59:57 +00:00
Eric Biggers
b56960bc76 Merge changes Ib5bcfb6a,I46c2a472,If0c75774,Iab7ba8d3
* changes:
  Stub out some FDE methods in StorageManager
  Stop trying to update FDE password from LockSettingsService
  Remove clearEncryptionPassword() from LockPatternUtils
  Stop trying to get/set fields in FDE footer
2022-03-10 00:48:53 +00:00
Treehugger Robot
995166710f Merge "IBinder.transact: clarify return" am: 2794ff0ca8 am: 5e19eaf0e8 am: 83de9444cb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1990775

Change-Id: Ia92f237101e5e930100a5723651602c7298ac0d9
2022-03-09 18:36:49 +00:00
Treehugger Robot
2794ff0ca8 Merge "IBinder.transact: clarify return" 2022-03-09 17:51:26 +00:00
Bernardo Rufino
f430745a51 Document when types are checked in Bundle
Test: Builds
Bug: 222087511
Change-Id: Ib844aa626529a4b9696447b22e7848488a0afe87
2022-03-09 14:22:57 +00:00
Eric Biggers
25bf2f8ae0 Stub out some FDE methods in StorageManager
Now that FDE is no longer supported, stub out some methods in
StorageManager that return FDE state.  This allows
StorageManager.getPasswordType() to be removed, and it prepares for
removing these methods later.

Bug: 208476087
Change-Id: Ib5bcfb6a0279150fec33f2c3edd0431b450c90f4
(cherry picked from commit 401bf8a176)
Merged-In: Ib5bcfb6a0279150fec33f2c3edd0431b450c90f4
2022-03-09 05:11:10 +00:00
Eric Biggers
f4f345dbee Stub out some FDE methods in StorageManager
Now that FDE is no longer supported, stub out some methods in
StorageManager that return FDE state.  This allows
StorageManager.getPasswordType() to be removed, and it prepares for
removing these methods later.

Bug: 208476087
Change-Id: Ib5bcfb6a0279150fec33f2c3edd0431b450c90f4
(cherry picked from commit 401bf8a176)
Merged-In: Ib5bcfb6a0279150fec33f2c3edd0431b450c90f4
2022-03-09 03:13:29 +00:00
Mayank Garg
ad9fe6df52 Improved error code for Remove Result
Bug: 215555912
Test: atest UserManagerTest

Change-Id: If92e9a3fcc042236c89ec13e691412dbb6a18a66
2022-03-09 03:10:26 +00:00
Dmitri Plotnikov
2dff83f88a Merge "Define SDK_SANDBOX_VIRTUAL_UID" into tm-dev 2022-03-08 19:18:11 +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
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
Sarup Dalwani
61321ebc97 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
Merged-In: If343342d0a5e996cbd430a4063b25fbc4874c5c0
(cherry picked from commit ece66c4116)
2022-03-07 15:00:19 +00:00
Simon Bowden
4dfe4924d4 Merge "Ensure unlinkToDeath when cancelling external vibrations." into tm-dev 2022-03-07 10:57:22 +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
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
8819133efc Merge "Document isManagedProfile usage should probably be isProfile" into tm-dev 2022-03-03 22:38: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
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
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
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