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
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
On devices without sdcardfs, these classes of apps get the right storage
access by being a part of the correct group.
Bug: 146419093
Test: manually verify apps get the correct GID
Change-Id: I7021cbf8a2e84bda7a49519da36e84fcf3f479a8
Bug: 140788621
Test: A special build that puts the PropertyInvalidatedCache in
verification mode was loaded on the device. Then one iteration of MPTS
was executed. No cache inconsistencies were found and no SELinux
violations (associated with the binder cache) were found. The number of
cache misses was approximately 10% of the total binder calls. All
binder calls went through the cache. Added a new user and later deleted
the same user; verified that caches were invalidated as expected and no
errors were detected by the PropertyInvalidatedCache verification mode.
Passed the CtsMultiUserHostTestCases test.
Change-Id: I32e3e39768e288101c82b02e63a7eb20d5ed7f93
Change the framework to handle brightness as a float rather than an int.
Test: AutomaticBrightnessControllerTest
BrightnessConfigurationTest
BrightnessMappingStrategyTest
BrightnessUtilsTest
DevicePolicyManagerTest
DisplayManagerServiceTest
DisplayTest
DozeScreenBrightnessTest
PowerManagerTest
PowerManagerVrTest
SettingsProviderTest
Exempt-From-Owner-Approval: Changing param from int to float
Change-Id: I413641cd987c5ec8f82753c0388a33f85a9682de
- passing V4 signature to IncFS,
- cleanup and use InstallationFile everywhere,
- pass params to DataLoader creation,
- minor refactor for PackageManagerShellCommandDataLoader to prepare for
Incremental data loading.
Test: atest PackageManagerShellCommandTest
Bug: b/136132412 b/133435829
Change-Id: Iacc3e4c51c0fa3410b076147ce153a1303246189
- Get all packages for system user
- Reuse split system user's logic to blacklist packages when headless system
user is enabled
- Add new method in UserManager to get headless sytem user mode (same as
in master)
Bug: 145626101
Test: edit device's sysconfig file, use tag: system-user-blacklisted-app to blacklist app
make services && adb sync system && adb reboot
cts test
Change-Id: I98d1bc33e7dd59ffa3ac6426f95af708671138da
(cherry picked from commit 9c4cf4945d57d45e429bc7d33bf6ffa68eb0838c)
Because statsd now uses StatsDimensionsValueParcel instead of
StatsDimensionsValue.h/c, statsd no longer has to depend on libservices.
Test: m -j
Test: atest StatsdHostTestCases#testBroadcastSubscriber
Bug: 148604617
Change-Id: I6d65383ccec99f4672d6575232981c0f6cc40fcf
Basically we configure all the lib files inside Incremental Service,
e.g., create lib dirs, make lib files, extract original
lib file data from zip and then write data to the lib files on incfs.
Test: manual with incremental installation
BUG: b/136132412 b/133435829
Change-Id: I7544d2e78bcf3bdd76ce4c0766ec31ff13fd2011
Move GraphicsStatsService to android.graphics package.
Move GraphicsStatsService JNI from libservices.core to
libandroid_runtime.
Declare GraphicsStatsService ctor as the only @SystemApi.
Remove MemoryFile usage from GraphicsStatsService, but use
SharedMemory and other SDK APIs instead. This is done to
avoid using unstable API MemoryFile.getFileDescriptor.
Propose new SharedMemory.getFdDup API for next release, which
is hidden for now.
Refactor statsd puller to avoid proto serialization by moving
data directly into AStatsEventList.
"libprotoutil" is added as a static dependancy to libhwui, which
should be fine because its implementation does not link anything.
Bug: 146353313
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Passed unit tests and GraphicsStatsValidationTest CTS
Change-Id: If16c5addbd519cba33e03bd84ac312595032e0e1
Timing for initialize cache path only. Currently ~3ms.
This will hopefully help catch regressions.
Bug: 148959827
Test: m, flash, boot, inspect logcat.
Change-Id: Ief83b8e1a6f0e58bca509527656c67b3465a4d19