Home
last modified time | relevance | path

Searched refs:mUsageStatsManager (Results 1 – 6 of 6) sorted by relevance

/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageReportingTest.java46 private UsageStatsManager mUsageStatsManager; field in UsageReportingTest
65 mUsageStatsManager = (UsageStatsManager) InstrumentationRegistry.getInstrumentation() in setUp()
82 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testUsageStartAndStopReporting()
85 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsageStartAndStopReporting()
89 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testUsageStartAndStopReporting()
92 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsageStartAndStopReporting()
105 mUsageStatsManager.reportUsageStart(activity, TOKEN_0, 100); in testUsagePastReporting()
108 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsagePastReporting()
121 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testUsageReportingMissingStop()
140 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testExceptionOnRepeatReport()
[all …]
DUsageStatsTest.java228 private UsageStatsManager mUsageStatsManager; field in UsageStatsTest
244 mUsageStatsManager = (UsageStatsManager) mContext.getSystemService( in setUp()
346 mUsageStatsManager.forceUsageSourceSettingRead(); in setUsageSourceSetting()
395 assertTrue(mUsageStatsManager.isAppStandbyEnabled()); in testTogglingViaSettings()
399 waitUntil(() -> mUsageStatsManager.isAppStandbyEnabled(), false); in testTogglingViaSettings()
404 waitUntil(() -> mUsageStatsManager.isAppStandbyEnabled(), false); in testTogglingViaSettings()
408 waitUntil(() -> mUsageStatsManager.isAppStandbyEnabled(), true); in testTogglingViaSettings()
520 mUsageStatsManager.getLastTimeAnyComponentUsed(targetPackage) / DAY; in verifyLastTimeAnyComponentUsedWithinRange()
530 final Map<String, UsageStats> map = mUsageStatsManager.queryAndAggregateUsageStats( in getAggregateUsageStats()
551 final Map<String, UsageStats> map = mUsageStatsManager.queryAndAggregateUsageStats( in testLastTimeAnyComponentUsed_JobServiceShouldBeIgnored()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/battery/
DIgnoreBatteryOptimizationsTestActivity.java33 private UsageStatsManager mUsageStatsManager; field in IgnoreBatteryOptimizationsTestActivity
42 mUsageStatsManager = getSystemService(UsageStatsManager.class); in onCreate()
69 && mUsageStatsManager.getAppStandbyBucket() in isExempted()
76 || (mUsageStatsManager.isAppStandbyEnabled() in isFullyNotExempted()
77 && mUsageStatsManager.getAppStandbyBucket() in isFullyNotExempted()
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerUsageTest.java49 private UsageStatsManager mUsageStatsManager; field in ShortcutManagerUsageTest
58 mUsageStatsManager = getTestContext().getSystemService(UsageStatsManager.class); in setUp()
144 mUsageStatsManager, (usm) -> usm.queryEvents(start3, end3)), in testReportShortcutUsed()
179 hasEvent(mUsageStatsManager.queryEvents(start, end), in testShortcutInvocationEventIsNotVisible()
186 ShellIdentityUtils.invokeMethodWithShellPermissions(mUsageStatsManager, in checkEventReported()
/cts/tests/tests/app.usage/BroadcastResponseStats/src/android/app/usage/brs/cts/
DBroadcastResponseStatsTest.java145 private UsageStatsManager mUsageStatsManager; field in BroadcastResponseStatsTest
171 mUsageStatsManager = sContext.getSystemService(UsageStatsManager.class); in setUp()
189 mUsageStatsManager.clearBroadcastEvents(); in tearDown()
190 mUsageStatsManager.clearBroadcastResponseStats(null /* packageName */, 0 /* id */); in tearDown()
214 mUsageStatsManager.queryBroadcastResponseStats(TEST_APP_PKG, TEST_RESPONSE_STATS_ID_1); in testQueryBroadcastResponseStats_noPermission()
219 mUsageStatsManager.queryBroadcastResponseStats(TEST_APP_PKG, in testQueryBroadcastResponseStats_noPermission()
229 mUsageStatsManager.clearBroadcastResponseStats(TEST_APP_PKG, TEST_RESPONSE_STATS_ID_1); in testClearBroadcastResponseStats_noPermission()
234 mUsageStatsManager.clearBroadcastResponseStats(TEST_APP_PKG, in testClearBroadcastResponseStats_noPermission()
374 mUsageStatsManager.clearBroadcastResponseStats(TEST_APP_PKG, TEST_RESPONSE_STATS_ID_1); in testBroadcastResponseStats_notificationPostedCount()
455 mUsageStatsManager.clearBroadcastResponseStats(TEST_APP_PKG, TEST_RESPONSE_STATS_ID_1); in testBroadcastResponseStats_notificationUpdatedCount()
[all …]
/cts/tests/tests/content/src/android/content/pm/cts/
DLauncherAppsTest.java95 private UsageStatsManager mUsageStatsManager; field in LauncherAppsTest
149 mUsageStatsManager = (UsageStatsManager) mContext.getSystemService( in setUp()
689 mUsageStatsManager.registerAppUsageLimitObserver( in registerObserver()
698 mUsageStatsManager.unregisterAppUsageLimitObserver(observerId)); in unregisterObserver()