2546cef56c
Added a new AppUsageLimit group observer which follows the same pattern as other UsageGroups. This specific observer allows the launcher to query for the AppUsageLimit, available via the new LauncherApps API below. The observer can be registered and unregistered via the respective new APIs in UsageStats. LauncherApps has a new API which allows it to get the AppUsageLimit for a specified package and user, initally set via the API in UsageStats. This new API allows the launcher to query specifics about the limit such as how much usage time the limit has, and how much total usage time is remaining. Bug: 117409586 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: Ifaffab629409e9191e40404a949c8df70bd3f7cb
29 lines
982 B
XML
29 lines
982 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
|
Note: Add android:sharedUserId="android.uid.system" to the root element to simulate the system UID
|
|
caller case.
|
|
-->
|
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.android.tests.usagestats"
|
|
>
|
|
|
|
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
|
|
<uses-permission android:name="android.permission.OBSERVE_APP_USAGE" />
|
|
<uses-permission android:name="android.permission.SUSPEND_APPS" />
|
|
|
|
<application android:label="Usage Access Test">
|
|
<activity android:name=".UsageStatsActivity"
|
|
android:label="Device Usage History">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<activity android:name=".UsageLogActivity" />
|
|
|
|
</application>
|
|
</manifest>
|