Since we cannot access locked user's data and clear it when a package
got removed. When a user is unlocking, we should prune their data and
remove all data that doesn't belong to any of installed packages.
This will also help in handling the case where device gets
rebooted before the data is cleared for an uninstalled package.
Bug: 186151459
Test: atest --rebuild-module-info CtsAppSearchHostTestCases
Change-Id: Ic6d151621a88df7806901781d3edfec65700c35d
Callers that have power exemption should be allowed to set smaller
windows for their alarms.
Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest
Bug: 185199076
Change-Id: I5f6515a917da7f87891f79fb637d48a3d7862a1b
We need to store other things in the appsearch data dir other than what
Icing stores, such as the storage info cache.
Bug: 177685938
Bug: 181787682
Test: Presubmit
Change-Id: I903c34a2c891d617217d44f5126d0d31c8c6bf39
Non-updatable APEXes are going to be only present on a dm-verity
protected read-only partition. For such APEXes there is no need in
embedding a hashtree.
This is a no-op change in preparation of switching default value of
generate_hashtree to true.
Bug: 190621617
Test: m
Change-Id: I0283fb03908a87490e5e29b803553977b8b6729f
The permission SCHEDULE_EXACT_ALARM state changes at the following
boundaries:
1. App-op: This gets toggled by the user via Settings.
2. Deny-list: Packages can be added to the deny list via DeviceConfig
APIs.
3. Package changes: A package's manifest may changes when it gets
updated.
In both cases 1 and 2, if alarm manager detects a permission change
from revoked to granted, it sends the
ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED broadcast to the
app.
If it detects a permission change from granted to revoked, it kills
all the processes within the hosting uid.
In all three cases, when the permssion changes from granted to revoked,
all the exact alarms scheduled by the relevant package are removed.
Package updates are treated differently as they require processes to
restart anyway. The broadcast is not needed in this case as there
are no alarms expected to have been lost by a previous revocation, and
apps can always use ACTION_MY_PACKAGE_REPLACED for post-update setup as
usual.
All this only applies to packages that have the change
REQUIRE_EXACT_ALARM_PERMISSION enabled.
Also changed canScheduleExactAlarms to return false if the change is not
enabled for the calling package.
Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest
atest CtsAlarmManagerTestCases
Bug: 179541791
Bug: 187206399
Change-Id: Icd68275701f2804be65b3a10a7dd81bbf6e2a0bb
This was removed in Iff38291b964de4116bcdefe4fd74136c4878c543 in favor
of using the bootclasspath fragment. However the bootclasspath fragment
for media does not contain the API tracking files, so it back for now
to make sure we can finalize the media API files.
This CL may be revertable in the future if we can get the
java_sdk_library into the bootclasspath_fragment somehow.
Bug: 190807367
Bug: 188427719
Test: m media-module-sdk and inspect the zip for api tracking files
Change-Id: Ia01c32d4c6c6bad734df053da0024a139a808a54
Flushing takes a few ms, it seems like a pretty good trade off compared
to keeping an icing instance in memory forever.
Bug: 179390369
Test: presubmit
Change-Id: Ic0493137dc8c33d44bd074bbd9ca4ae442049513
Bug: 189291729
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing public API
Change-Id: I7e26eaef4fe9d7d7b4b3a1740608e0fe821537d2
This subsumes the java_sdk_library in the sdk. Also add the service
java_sdk_library as it was missing.
Bug: 188427719
Test: build_mainline_modules.sh
Change-Id: Iff38291b964de4116bcdefe4fd74136c4878c543
The implementation of handleIncomingUser is copied from
ag/13200660 (1d1547b).
Bug: 181787682
Test: Presubmit
Change-Id: I946199a8844e7fd6ea5574b873da56d8b8630f62
There isn't a need to require that the app has permission on other
user as well. With this change, we are checking the apps existence
on other users to limit access such that apps won't be able to
access any more data than they would've accessed by having
INTERACT_ACROSS_USERS permission and talking to their instances
on other users.
Bug: 175844032
Test: atest --test-mapping apex/blobstore
Change-Id: I6f13e3e7a240d55c02aecf31e10f750b9e4d5702
Also clean up FgsTempAllowList, since the key is always UID.
Bug: 188789296
Test: atest FgsTempAllowListTest
Test: Manual test with `cmd deviceidle tempwhitelist` with and without `-r`,
while monitoring the AMS dumpsys with the following command.
$ watch -n 1 "adb shell dumpsys activity processes | sed -n '/mFgsStartTempAllowList/,\$p'"
Change-Id: I0e113b1614653c85e57a37579921c3baa7dedc78
When we're charging and on an unmetered network, run jobs that we
calcluate won't complete within the max execution time due to the
network speed, just so they have a chance of running.
Also update documentation to guide to only providing size of
non-interruptible transfers.
Bug: 188429037
Test: Run `m offline-sdk-docs` and check site at out/target/common/docs/offline-sdk/reference/android/app/job/JobInfo.html
Test: atest FrameworksMockingServicesTests:ConnectivityControllerTest
Change-Id: Ic69e85a7e0eae51b3dd3ea89bd00255a734c1472
Test: adb shell dumpsys alarm
Should not show a section labelled "Allow while idle dispatches".
Fixes: 178484639
Change-Id: Idab67a7a3a78b89e80f60e24f3b0a6e3a0bcb68a
Stopped using BinderDeathDispatcher as deduping is no longer required.
If an app sets the same listener, it is first removed internally which
will result in a call to unlink before the subsequent call to set.
Test: Manually using a test app that cancels and sets an alarm with a
new listener instance in a loop.
atest CtsAlarmManagerTestCases:BasicApiTests
Bug: 189091551
Change-Id: I390d9bba37a4040b7e789e0ae04f9980fbed5c12
It manages the P/H flags from DeviceConfig.
bug: 173532925
Test: atest FrameworksMockingServicesTests:AppSearchConfigManagerTest
Change-Id: I668ecd8190bbe7a21ab3a23b52d08f4dce400491
This helps readers understand that the AppSearch APIs can operate
across users.
Bug: 179822197
Test: presubmit
Change-Id: I0be942f16d0211ea1ea68d72ac82c254b9dd6d02