UsageStatsManager#registerAppUsageLimitObserver now accepts the time
remaining in addition to the total time limit.
The API now also uses java.time.Duration instead of long+TimeUnit for
the total time and remaining time.
Bug: 124272203
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForRegisterObserver
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForUnregisterObserver
Test: manual (mmma frameworks/base/tests/UsageStatsTest/)
Change-Id: I6f85ca9295cad46e10a30035b67e6210ae5c1886
Appops can be peformed by an app on its behalf and also on
behalf of another app, i.e. an app can perform a proxy op
and blame the work on another app. The proxy mechanims is
for apps doing work on behalf of other apps where GCore is
one example since the app doing the work needs to check if
the caller has access to the functionality - specifically
the app op backing a runtime permission in case the calling
app does not support runtime permissions.
Apps being able to blame work on other apps is a problem now
that we would be using historical op data to show permission
usage in the UI as apps can start blaming each other to gain
a competitive advantage.
To address the issue we are adding APIs for querying portions
of the app op data - last and historical. One can now get
the ops for work the app did for itself, work the app blamed
on other apps if the app is trusted, work the app blamed on
other apps if the app is not trusted, work other trusted apps
blamed on the app, work other untrusted apps blamed on the app.
A trusted app is one holding the permisison to update app op
stats which is privileged.
The data slicing API allow us to show in the UI only the trusted
poriton of the data which is work the app did for itself, work
trusted apps balmed on the app, and work the app if untrusted
blamed on other apps.
Test: atest CtsAppOpsTestCases
bug:111061782
Change-Id: I9a2bcaea272cb06f38ba742cf601a6dc3b287d5e
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
Handles cases where apps try deleting paths returned in "_data"
columns, and where they try renaming across bind mounts.
Bug: 124349250
Test: atest android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageRename
Change-Id: I7f4461bcacada80398eb95d051a0d29456f63499
StatusBarManager#setDisabledForSetup() requires
android.Manifest.permission.STATUS_BAR, and is now documented that way.
Also rename areNoComponentsDisabled to areAllComponentsEnabled so it
reads better
Bug: 126376147
Test: atest GtsStatusBarHostTestCases
Change-Id: I59b113a2568463541dfbd46f505489aa94aac9d9
To support Kotlin developers we here annotate all (non-deprecated)
public Notification.Builder methods with the @NonNull annotation.
Bug: 126699778
Test: N/A
Change-Id: I7ba56430bf2af8112d9be1bcbdd3601fb577543f
Add more a specific description of what methods do when the
secure lock screen feature is not supported by the device.
Bug: 123270501
Test: make
Change-Id: Ib6c16f421cf3dc60b0f0cb0c6335c6dc35ac7ece
Instrumentation.sendPointerSync currently calls direclty into
InputManager to inject input. Instead have it call
injectInputAfterTransactionApplied to ensure it waits for animations
to complete and input windows to get set.
Additionally, changed injectInputAfterTransactionApplied to call
InputManagerInternal instead of InputManager to prevent the calling pid
from changing. This ensures the permission check remains tied to the client
that injected the input.
Bug: 123616343
Bug: 120920331
Test: atest HoverTest
Change-Id: I8c893e47fea9bd38e92da0ffa668ebca066f1080
Tweak AppComponentFactory.instantiateClassLoader() API to accept
ApplicationInfo as an argument instead of an independent getter.
Bug: 124800390
Bug: 111342996
Test: atest CtsClassLoaderFactoryPathClassLoaderTestCases
Test: atest CtsClassLoaderFactoryInMemoryDexClassLoaderTestCases
Change-Id: I4a4d5af842446a5060083c88a0ac5bec014c0c55
singleTaskInstance displays will only contain one task and any attempt
to launch new task will re-route to the default display. Signal a callback
for listeners to handle the case.
Bug: 123642392
Test: atest ActivityManagerMultiDisplayTests#testSingleTaskInstanceDisplay
Change-Id: I16b98d47a798f920a551942d761f07b1df1defc0
For packages:
android.app.admin
android.app.backup
android.app.job
android.app.usage
android.content
android.content.om
android.content.pm
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: Id84ee490f3435a196fca10a89bda9f7217b750c6
(it was accidentally being called twice due to a bad git merge)
Fixes: 125628737
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I260e33942855e7355fd531fb05baf699e9961a89
Clarify usage of Activity.onKeyLongPress(..). It is not obvious at
all that onKeyDown should be used in order for OnKeyLongPress to work.
Direct readers to the other api to make sure that this nuance is not
missed.
Bug: 21451760
Test: atest KeyEventInjectionTest
Change-Id: Ic73f6fe06b2108a3967ac590d22acfb283a700e1
To return current foregroundServiceType if the service has become a
foreground service.
If service become foreground service by calling Service.startForeground(int,
Notification, int type), the returned type is the type specified.
If the no-type version Service.startForeground(int, Notification) is called.
the returned type is foregroundServiceType specified in manifest.
If no foregroundServiceType specified in manifest, the returned type is
zero.
If the service is not a foreground service, the returned type is zero.
Bug: 124517685
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerProcessStateTest.java#testFgsLocation
Change-Id: Ibcc4431429a90aab92a5533e296fb104b4add9e6