Home
last modified time | relevance | path

Searched refs:isWithinQuota (Results 1 – 11 of 11) sorted by relevance

/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/
DMultiRateLimiterTest.java67 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in testSingleRateLimit_belowLimit_isWithinQuota()
71 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in testSingleRateLimit_belowLimit_isWithinQuota()
75 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in testSingleRateLimit_belowLimit_isWithinQuota()
95 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isFalse(); in testSingleRateLimit_aboveLimit_isNotWithinQuota()
115 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isFalse(); in testSingleRateLimit_afterGoingAboveQuotaAndWaitingWindow_isBackWithinQuota()
119 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in testSingleRateLimit_afterGoingAboveQuotaAndWaitingWindow_isBackWithinQuota()
132 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in createMultipleRateLimits_testTheyLimitsAsExpected()
136 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in createMultipleRateLimits_testTheyLimitsAsExpected()
140 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in createMultipleRateLimits_testTheyLimitsAsExpected()
144 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isFalse(); in createMultipleRateLimits_testTheyLimitsAsExpected()
[all …]
DCountQuotaTrackerTest.java491 assertTrue(mQuotaTracker.isWithinQuota(TEST_USER_ID, TEST_PACKAGE, null)); in testisWithinQuota_GlobalQuotaFree()
492 assertTrue(mQuotaTracker.isWithinQuota(TEST_USER_ID, "com.android.random.app", null)); in testisWithinQuota_GlobalQuotaFree()
499 assertTrue(mQuotaTracker.isWithinQuota(TEST_USER_ID, TEST_PACKAGE, null)); in testisWithinQuota_UptcQuotaFree()
501 mQuotaTracker.isWithinQuota(TEST_USER_ID, "com.android.random.app", null)); in testisWithinQuota_UptcQuotaFree()
508 assertTrue(mQuotaTracker.isWithinQuota(TEST_USER_ID, TEST_PACKAGE, TEST_TAG)); in testisWithinQuota_UnderCount()
515 assertFalse(mQuotaTracker.isWithinQuota(TEST_USER_ID, "com.android.test.spam", TEST_TAG)); in testisWithinQuota_OverCount()
522 assertFalse(mQuotaTracker.isWithinQuota(TEST_USER_ID, TEST_PACKAGE, TEST_TAG)); in testisWithinQuota_EqualsCount()
538 mQuotaTracker.isWithinQuota(TEST_USER_ID, TEST_PACKAGE, TEST_TAG)); in testisWithinQuota_DifferentCategories()
542 mQuotaTracker.isWithinQuota(TEST_USER_ID, TEST_PACKAGE, TEST_TAG)); in testisWithinQuota_DifferentCategories()
546 mQuotaTracker.isWithinQuota(TEST_USER_ID, TEST_PACKAGE, TEST_TAG)); in testisWithinQuota_DifferentCategories()
[all …]
/frameworks/base/services/core/java/com/android/server/utils/quota/
DMultiRateLimiter.java71 public boolean isWithinQuota(int userId, @NonNull String packageName, @Nullable String tag) { in isWithinQuota() method in MultiRateLimiter
95 if (!quotaTracker.isWithinQuota(userId, packageName, tag)) { in isWithinQuotaLocked()
DQuotaTracker.java194 public boolean isWithinQuota(int userId, @NonNull String packageName, @Nullable String tag) { in isWithinQuota() method in QuotaTracker
432 if (isWithinQuota(userId, packageName, tag)) { in maybeScheduleStartAlarmLocked()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/
DQuotaController.java598 final boolean isWithinQuota = isWithinQuotaLocked(jobStatus); in maybeStartTrackingJobLocked()
601 setConstraintSatisfied(jobStatus, nowElapsed, isWithinQuota, isWithinEJQuota); in maybeStartTrackingJobLocked()
609 if (!isWithinQuota || outOfEJQuota) { in maybeStartTrackingJobLocked()
1933 boolean isWithinQuota, boolean isWithinEjQuota) {
1942 isSatisfied = isWithinQuota;
1944 isSatisfied = isWithinEjQuota || isWithinQuota;
1958 boolean isWithinQuota) {
1959 if (jobStatus.setExpeditedJobQuotaApproved(nowElapsed, isWithinQuota)) {
1962 if (isWithinQuota && jobStatus.isReady()) {
/frameworks/base/services/core/java/com/android/server/wearable/
DWearableSensingManagerService.java351 if (!mDataRequestRateLimiter.isWithinQuota( in createDataRequestRemoteCallback()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/
DJobSchedulerService.java1693 if (!mQuotaTracker.isWithinQuota(userId, pkg, QUOTA_TRACKER_SCHEDULE_PERSISTED_TAG)) {
1694 if (mQuotaTracker.isWithinQuota(userId, pkg, QUOTA_TRACKER_SCHEDULE_LOGGED)) {
4126 final boolean isWithinTimeoutQuota = mQuotaTracker.isWithinQuota(
4171 && mQuotaTracker.isWithinQuota(job.getTimeoutBlameUserId(),
4189 mQuotaTracker.isWithinQuota(job.getTimeoutBlameUserId(),
4537 return !mQuotaTracker.isWithinQuota(callingUserId, callingPackageName,
4539 || !mQuotaTracker.isWithinQuota(callingUserId, callingPackageName,
4541 || !mQuotaTracker.isWithinQuota(timeoutBlameUserId, timeoutBlamePackageName,
/frameworks/base/services/core/java/com/android/server/notification/
DNotificationManagerService.java9118 boolean isWithinQuota =
9119 mToastRateLimiter.isWithinQuota(userId, record.pkg, TOAST_QUOTA_TAG)
9124 record, rateLimitingEnabled, isWithinQuota, isPackageInForeground)) {
9145 boolean isWithinQuota, boolean isPackageInForeground) {
9146 if (rateLimitingEnabled && !isWithinQuota && !isPackageInForeground) {
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationManagerServiceTest.java8726 private void setToastRateIsWithinQuota(boolean isWithinQuota) { in setToastRateIsWithinQuota() argument
8727 when(mToastRateLimiter.isWithinQuota( in setToastRateIsWithinQuota()
8731 .thenReturn(isWithinQuota); in setToastRateIsWithinQuota()
/frameworks/base/services/
Dart-profile3378 HSPLcom/android/server/utils/quota/CountQuotaTracker;->isWithinQuota(ILjava/lang/String;Ljava/lang/…
3384 HSPLcom/android/server/utils/quota/QuotaTracker;->isWithinQuota(ILjava/lang/String;Ljava/lang/Strin…
Dart-wear-profile24600 HPLcom/android/server/utils/quota/CountQuotaTracker;->isWithinQuota(ILjava/lang/String;Ljava/lang/S…
24638 HPLcom/android/server/utils/quota/QuotaTracker;->isWithinQuota(ILjava/lang/String;Ljava/lang/String…