This counts the number of times the app was launched from outside the app and ignores intra-app activity transitions. Introduce a new permission for registering to observe app usage. Fixes a bug where Settings couldn't force the app into another bucket if it was recently launched. Bug: 74335821 Fixes: 76100712 Test: Manual test using Settings Test: UsageStatsTest to verify permission change Change-Id: Ibd343c1cfa37089a3ac6fc30ba3194e21a9be499
28 lines
911 B
XML
28 lines
911 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" />
|
|
|
|
<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>
|