Added APIs for App Usage Limits.
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
Loading
Please register or sign in to comment