Searched refs:mUsageStatsManager (Results 1 – 6 of 6) sorted by relevance
/cts/tests/tests/app.usage/src/android/app/usage/cts/ |
D | UsageReportingTest.java | 46 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 …]
|
D | UsageStatsTest.java | 228 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/ |
D | IgnoreBatteryOptimizationsTestActivity.java | 33 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/ |
D | ShortcutManagerUsageTest.java | 49 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/ |
D | BroadcastResponseStatsTest.java | 145 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/ |
D | LauncherAppsTest.java | 95 private UsageStatsManager mUsageStatsManager; field in LauncherAppsTest 149 mUsageStatsManager = (UsageStatsManager) mContext.getSystemService( in setUp() 689 mUsageStatsManager.registerAppUsageLimitObserver( in registerObserver() 698 mUsageStatsManager.unregisterAppUsageLimitObserver(observerId)); in unregisterObserver()
|