Use DEFAULT_USERDATA_SIZE as userdata partition size if the calling
Intent desn't specify the userdata size or the specified size is zero.
Bug: 145891687
Test: adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip
Change-Id: I52767dfefef394403c5e16fcfd40792b14ff9a71
ApplicationInfo now automatically tries to "squash" the same instances in a
Parcel.
NOTE: This CL still does *not* optimize the package manager APIs that return a
list. e.g. PM.queryContentProviders() still return duplicate AppInfo's.
We can optimize them by making ParcelableListSlice call "allowSquashing",
but that *could* have negative side effects, so I'm not doing it in this CL.
I think we can do that for S.
Bug: 148588589
Test: atest CtsContentTestCases # except for two preexsiting failures:
- android.content.pm.cts.PackageManagerTest#testGetIcon
- android.content.pm.cts.PackageManagerTest#testGetPreferredActivities
Test: Use the debugger and make sure bindApplication() is not receiving
duplicate AppInfo's in the provider list.
Change-Id: I3ba2c047a469169340c0f75c36bdfd394bc5d627
Make obtaining a visual service from non-visual Context instance
report a strict mode violation and print the stacktrace.
Make calling getDisplay() throw an exception if called on an instance
that is not associated with a display. For existing usages introduce
a new internal method that does not perform the verification until
the usages are properly fixed.
Bug: 128338354
Test: StrictModeTest#testIncorrectContextUse_GetSystemService
Test: StrictModeTest#testIncorrectContextUse_GetDisplay
Change-Id: Id25d590eca6e10066e55d7ed6436d3bc9e433beb
Add native thermal manager API of thermal mananger service into
libandroid. Export Thermal API as NDK library.
Bug: 137151587
Bug: 136285293
Test: build, atest thermalmanager-test atest CtsThermalTestCases
Change-Id: Ia49fb2133624ffcd6168af804ae612ef2bb190f2
- Any pending sessions data is attributed to the apps
which contributed them.
- Any commited blobs data is attributed to the app which
has a lease on it. If multiple apps have lease on a blob, don't
attribute the blob to those apps for now.
- Remove StorageStatsAugmenter.augmentStatsForUser as it
is not used for anything currently.
- Fix an issue in how we override existing committers and leasees.
Bug: 148694869
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Test: atest tests/tests/os/src/android/os/storage/cts/StorageStatsManagerTest.java
Test: atest hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
Test: manual
Change-Id: Ia4af0a2549c75db66741f2d1979de95d2d150bc8
Feature is disabled on non-FBE devices since the profile user will
end up in RUNNING_UNLOCKED state.
Bug: 143516540
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: manual
Change-Id: Ib87492577b4e5153a8108036af89c547e4bb76ee
- Create obb directories for packages when zygote starts.
- During zygote fork, bind all visible obb package directories
for an app.
- If app data isolation is not enabled for that process, bind
mount the whole obb directory instead.
Bug: 148049767
Bug: 137890172
Test: atest android.appsecurity.cts.AdoptableHostTest
Change-Id: I841e98c120d447b148c22cfd809d738427b04f2e
Adds getThermalHeadroom, which allows users to determine how close the
device currently is to SEVERE thermal throttling. For intensive
applications which can scale their workloads, this allows them to help
manage the thermal envelope of the device.
Test: Manual, modify Filament test app to call and observe values
Test: PowerManagerTest#testGetThermalHeadroom
Test: atest android.os.cts.PowerManager_ThermalTest
Test: atest com.android.systemui.statusbar.phone.StatusBarTest
Test: atest CachedDeviceStateServiceTest
Test: atest AbstractAccessibilityServiceConnectionTest
Test: atest KeyEventDispatcherTest
Test: atest AttentionManagerServiceTest
Test: atest HdmiControlServiceTest
Test: atest ThermalManagerServiceTest
Test: atest RecoverySystemServiceTest
Bug: 136285293
Change-Id: I26e1c849c4b08cbf7ee0057f555cf0893750da43
The installer may pre-create OBB directories for packages that it is
installing on external storage, in locations like
/storage/emulated/0/data/obb/com.foo . The permissions on this directory
is never explicitly setup; instead, sdcardfs magically fixed up the
permissions to match the package name "com.foo".
With sdcardfs going away in devices launching with R, we need to set
the permissions for these paths up explicitly. Since only vold can do
that, have PackageManager call into StorageManager after an app
install/upgrade to do the correct setup.
Bug: 146419093
Test: manually verify directories are setup correctly
Change-Id: I530c8de196011b1dc97c7a9ab612e5d6dc9403a1
If both BaseBundles are empty, we can infer that without needing to
unparcel any of them.
Test: atest FrameworksCoreTests:android.os.BundleTest
Bug: 146037505
Change-Id: I04c28cdd1293227d9887b0c17e178f61328c1959
Merged-In: I04c28cdd1293227d9887b0c17e178f61328c1959
If both BaseBundles are empty, we can infer that without needing to
unparcel any of them.
Test: atest FrameworksCoreTests:android.os.BundleTest
Bug: 146037505
Change-Id: I04c28cdd1293227d9887b0c17e178f61328c1959
Use PropertyInvalidatedCache to save on redundant
binder calls for isPowerSaveMode and isInteractive.
Bug: 140788621
Test: atest BatterySaverTest
Test: atest PowerManagerTest
Change-Id: I849a48eb7c901d3178097d33dce01630dbb78267
In Q, a manifest flag requestLegacyExternalStorage was
introduced to grant legacy apps full access to external storage.
This flag was sticky across app updates so an app already installed on
a users device would typically always have the legacy_storage appop
even if it received an update to stop requesting the manifest flag.
With the R scoped storage model, we would like to break this
stickiness for 2 reasons:
1. Increase the impact of the storage restrictions
2. Ease testing. Because of the stickyness it is difficult
for apps targeting R to actually lose their legacy_storage appop
Unfortunately, we have to still provide a path for apps who care about
migirating their data on external storage from unreachable locations
on R devices. The canonical example is an app with 3 versions:
(1) Qcannot_migrate, (2) Qcan_migrate, (3) Rcannot_migrate
An update from: 1 -> 2 -> 3 will be fine because (2) will migrate the
apps data. However, apps can very well update from (1) - (3) thereby
losing access to their data in unreachable storage locations on R devices.
To facilitate this migration, apps (targeting R) can explicitly
request the preserveLegacyExternalStorage manifest flag. This will
ensure that if they get updated on a device with a previous version of
their app with the legacy_storage appop, they'll keep legacy_storage
status. Of course, fresh installs (of target R apps) will not have the
legacy_storage appop even if they have requestLegacyExternalStorage
and preserveLegacyExternalStorage flags.
By default, this new flag will be false, legacy status will *not* be
preserved (the legacy_storage appop will *not* be sticky). But apps
that care about migrating data can set the flag to true and
will preserve whatever legacy status they had on an existing install.
Test: atest RestrictedPermissionsTest
Test: atest RestrictedStoragePermissionSharedUidTest
Bug: 148944140
Change-Id: Ifd3410ed1a60f4c0e8414fce904139b539e13ad8
Adds a new public API intent action that should be used to launch a
dialog that prompts the user to clear app caches.
The intent can be used by apps holding MANAGE_EXTERNAL_STORAGE
permission or with OP_MANAGE_EXTERNAL_STORAGE allowed
Bug: 144341120
Test: build
Change-Id: Icc6de16da4f892f1ed46ffc89e51071647a17400
We now use the sequence number of the atrace tag rather than a Binder
transaction, so zygote can observe changes to the tags.
Test: m
Bug: 137366208
Bug: 147667830
This is a cherry-pick of e38797be84.
Change-Id: I50e32a19c538dd255097c035836504b4746b172b
Merged-In: I50e32a19c538dd255097c035836504b4746b172b
We now use the sequence number of the atrace tag rather than a Binder
transaction, so zygote can observe changes to the tags.
Test: m; flash; adb shell atrace dalvik | grep hprof
Bug: 137366208
Bug: 147667830
Change-Id: I50e32a19c538dd255097c035836504b4746b172b