/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryUtilsTest.java | 98 private static final int UID = 12345; field in BatteryUtilsTest 201 doReturn(UID).when(mNormalBatterySipper).getUid(); in setUp() 358 when(mNormalBatterySipper.getUid()).thenReturn(UID); in testShouldHideSipper_UidNormal_ReturnFalse() 365 when(mNormalBatterySipper.getUid()).thenReturn(UID); in testShouldHideSipper_TypeService_ReturnTrue() 374 when(mNormalBatterySipper.getUid()).thenReturn(UID); in testShouldHideSipper_hiddenSystemModule_ReturnTrue() 489 AppOpsManager.OP_RUN_IN_BACKGROUND, UID, PACKAGE_NAME); in testBackgroundRestrictionOn_restrictionOn_returnTrue() 491 assertThat(mBatteryUtils.isBackgroundRestrictionEnabled(SDK_VERSION, UID, in testBackgroundRestrictionOn_restrictionOn_returnTrue() 498 AppOpsManager.OP_RUN_IN_BACKGROUND, UID, PACKAGE_NAME); in testBackgroundRestrictionOn_restrictionOff_returnFalse() 500 assertThat(mBatteryUtils.isBackgroundRestrictionEnabled(SDK_VERSION, UID, PACKAGE_NAME)) in testBackgroundRestrictionOn_restrictionOff_returnFalse() 577 mBatteryUtils.setForceAppStandby(UID, LOW_SDK_PACKAGE, AppOpsManager.MODE_IGNORED); in testSetForceAppStandby_forcePreOApp_forceTwoRestrictions() [all …]
|
D | AdvancedPowerUsageDetailTest.java | 86 private static final int UID = 1; field in AdvancedPowerUsageDetailTest 171 doReturn(UID).when(mBatterySipper).getUid(); in setUp() 268 assertThat(mBundle.getInt(AdvancedPowerUsageDetail.EXTRA_UID)).isEqualTo(UID); in testStartBatteryDetailPage_hasBasicData() 285 assertThat(mBundle.getInt(AdvancedPowerUsageDetail.EXTRA_UID)).isEqualTo(UID); in testStartBatteryDetailPage_typeNotApp_hasBasicData() 360 doReturn(UID).when(mPackageManager).getPackageUid(PACKAGE_NAME[0], 0 /* no flag */); in testStartBatteryDetailPage_batteryEntryNotExisted_extractUidFromPackageName() 364 assertThat(mBundle.getInt(AdvancedPowerUsageDetail.EXTRA_UID)).isEqualTo(UID); in testStartBatteryDetailPage_batteryEntryNotExisted_extractUidFromPackageName()
|
D | RestrictedAppDetailsTest.java | 72 private static final int UID = UserHandle.getUid(USER_ID, 234); field in RestrictedAppDetailsTest 101 .setUid(UID) in setUp() 128 doReturn(true).when(mRestrictedAppDetails.mBatteryUtils).isForceAppStandbyEnabled(UID, in refreshUi_displayPreference() 131 timestampArray.put(UID, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(5)); in refreshUi_displayPreference()
|
D | BatteryAppListPreferenceControllerTest.java | 62 private static final int UID = 123; field in BatteryAppListPreferenceControllerTest 97 when(mNormalBatterySipper.getUid()).thenReturn(UID); in setUp() 137 mNormalBatterySipper.uidObj = new BatteryStatsImpl.Uid(new BatteryStatsImpl(), UID); in testExtractKeyFromSipper_typeAPPUidObjectNotNull_returnUid()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/ |
D | NotificationsPreferenceControllerTest.java | 47 private static final int UID = 1001010; field in NotificationsPreferenceControllerTest 76 packageInfo.applicationInfo.uid = UID; in setUp() 82 when(mMockManager.areNotificationsEnabledForPackage(PKG_NAME, UID)).thenReturn(true); in onCreate_notificationEnabled_isChecked() 91 when(mMockManager.areNotificationsEnabledForPackage(PKG_NAME, UID)).thenReturn(false); in onCreate_notificationDisabled_isNotChecked() 100 when(mMockManager.onlyHasDefaultChannel(PKG_NAME, UID)).thenReturn(false); in callChangeListener_setEnable_enablingNotification() 104 verify(mMockManager).setNotificationsEnabledForPackage(PKG_NAME, UID, true); in callChangeListener_setEnable_enablingNotification() 109 when(mMockManager.onlyHasDefaultChannel(PKG_NAME, UID)).thenReturn(false); in callChangeListener_setDisable_disablingNotification() 113 verify(mMockManager).setNotificationsEnabledForPackage(PKG_NAME, UID, false); in callChangeListener_setDisable_disablingNotification() 118 when(mMockManager.onlyHasDefaultChannel(PKG_NAME, UID)).thenReturn(true); in callChangeListener_onlyHasDefaultChannel_updateChannel() 121 PKG_NAME, UID, NotificationChannel.DEFAULT_CHANNEL_ID, true)) in callChangeListener_onlyHasDefaultChannel_updateChannel() [all …]
|
D | ApplicationsSettingsPreferenceControllerTest.java | 48 private static final int UID = 12; field in ApplicationsSettingsPreferenceControllerTest 77 appInfo.uid = UID; in onDataLoaded_addPreference_hasOnePreference() 98 appInfo.uid = UID; in preferenceClick_launchesDetailFragment()
|
D | ApplicationListItemManagerTest.java | 49 private static final int UID = 12; field in ApplicationListItemManagerTest 86 appInfo.uid = UID; in onRebuildComplete_shouldNotifyRegisteredListener() 108 appInfo.uid = UID; in onRebuildComplete_unRegisterOneListener_shouldNotifyRegisteredListener()
|
/packages/apps/Car/Notification/tests/robotests/src/com/android/car/notification/ |
D | CarNotificationDiffTest.java | 52 private static final int UID = 2; field in CarNotificationDiffTest 98 ID, TAG, UID, INITIAL_PID, mNotificationBuilder1.build(), USER_HANDLE, in setupBaseActivityAndLayout() 101 ID, TAG, UID, INITIAL_PID, mNotificationBuilder1.build(), USER_HANDLE, in setupBaseActivityAndLayout() 104 ID, TAG, UID, INITIAL_PID, mNotificationBuilder2.build(), USER_HANDLE, in setupBaseActivityAndLayout() 191 ID, TAG, UID, INITIAL_PID, mNotificationBuilder1.build(), USER_HANDLE, in sameGroupUniqueIdentifiers_diffNotificationKey_shouldReturnFalse() 208 ID, TAG, UID, INITIAL_PID, mNotificationBuilder1.build(), USER_HANDLE, in sameGroupUniqueIdentifiers_sameChildrenNotification_shouldReturnTrue() 279 ID, TAG, UID, INITIAL_PID, oldNotification.build(), USER_HANDLE, in areBundleEqual_sameSize_shouldReturnTrue() 282 ID, TAG, UID, INITIAL_PID, newNotification.build(), USER_HANDLE, in areBundleEqual_sameSize_shouldReturnTrue() 323 ID, TAG, UID, INITIAL_PID, oldNotification.build(), USER_HANDLE, in areBundleEqual_diffSize_shouldReturnFalse() 326 ID, TAG, UID, INITIAL_PID, newNotification.build(), USER_HANDLE, in areBundleEqual_diffSize_shouldReturnFalse() [all …]
|
D | CarHeadsUpNotificationManagerTest.java | 94 private static final int UID = 2; field in CarHeadsUpNotificationManagerTest 164 ID, TAG, UID, INITIAL_PID, mNotificationBuilder1.build(), USER_HANDLE, in setupBaseActivityAndLayout() 167 ID, TAG, UID, INITIAL_PID, mNotificationBuilder2.build(), USER_HANDLE, in setupBaseActivityAndLayout() 170 ID, TAG, UID, INITIAL_PID, mNotificationBuilder_carInformationHeadsUp.build(), in setupBaseActivityAndLayout() 173 ID, TAG, UID, INITIAL_PID, mNotificationBuilder_messageHeadsUp.build(), in setupBaseActivityAndLayout() 176 ID, TAG, UID, INITIAL_PID, mNotificationBuilder_navigationHeadsUp.build(), in setupBaseActivityAndLayout() 179 ID, TAG, UID, INITIAL_PID, mNotificationBuilder_callHeadsUp.build(), in setupBaseActivityAndLayout() 182 ID, TAG, UID, INITIAL_PID, mNotificationBuilder_inboxHeadsUp.build(), in setupBaseActivityAndLayout()
|
D | NotificationDataManagerTest.java | 46 private static final int UID = 2; field in NotificationDataManagerTest 69 ID, TAG, UID, INITIAL_PID, mNotificationBuilder1.build(), USER_HANDLE, in setup() 72 ID, TAG, UID, INITIAL_PID, mNotificationBuilder2.build(), USER_HANDLE, in setup()
|
D | NotificationGroupTest.java | 53 private static final int UID = 2; field in NotificationGroupTest 76 ID, TAG, UID, INITIAL_PID, mNotificationBuilder.build(), USER_HANDLE, in setup() 79 ID, TAG, UID, INITIAL_PID, mNotificationBuilder.build(), USER_HANDLE, in setup()
|
D | PreprocessingManagerTest.java | 45 private static final int UID = 2; field in PreprocessingManagerTest 78 PKG, OP_PKG, ID, TAG, UID, INITIAL_PID, notification, USER_HANDLE, in getEmptyAutoGeneratedGroupSummary()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/ |
D | BatteryDatabaseManager.java | 26 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.UID; 89 values.put(UID, uid); in insertAnomaly() 104 final String[] projection = {PACKAGE_NAME, ANOMALY_TYPE, UID}; in queryAllAnomalies() 114 final int uid = cursor.getInt(cursor.getColumnIndex(UID)); in queryAllAnomalies() 172 final String[] projection = {ActionColumns.UID, ActionColumns.TIME_STAMP_MS}; in queryActionTime() 178 final int uidIndex = cursor.getColumnIndex(ActionColumns.UID); in queryActionTime() 198 values.put(ActionColumns.UID, uid); in insertAction() 213 ActionColumns.ACTION_TYPE + " = ? AND " + ActionColumns.UID + " = ? AND " in deleteAction()
|
D | AnomalyDatabaseHelper.java | 67 String UID = "uid"; field 87 AnomalyColumns.UID + 97 " PRIMARY KEY (" + AnomalyColumns.UID + "," + AnomalyColumns.ANOMALY_TYPE + "," 110 String UID = "uid"; field 125 ActionColumns.UID + 133 " PRIMARY KEY (" + ActionColumns.ACTION_TYPE + "," + ActionColumns.UID + ","
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/ |
D | BatteryDatabaseManager.java | 26 …tic com.android.car.developeroptions.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.UID; 89 values.put(UID, uid); in insertAnomaly() 104 final String[] projection = {PACKAGE_NAME, ANOMALY_TYPE, UID}; in queryAllAnomalies() 114 final int uid = cursor.getInt(cursor.getColumnIndex(UID)); in queryAllAnomalies() 172 final String[] projection = {ActionColumns.UID, ActionColumns.TIME_STAMP_MS}; in queryActionTime() 178 final int uidIndex = cursor.getColumnIndex(ActionColumns.UID); in queryActionTime() 198 values.put(ActionColumns.UID, uid); in insertAction() 213 ActionColumns.ACTION_TYPE + " = ? AND " + ActionColumns.UID + " = ? AND " in deleteAction()
|
D | AnomalyDatabaseHelper.java | 67 String UID = "uid"; field 87 AnomalyColumns.UID + 97 " PRIMARY KEY (" + AnomalyColumns.UID + "," + AnomalyColumns.ANOMALY_TYPE + "," 110 String UID = "uid"; field 125 ActionColumns.UID + 133 " PRIMARY KEY (" + ActionColumns.ACTION_TYPE + "," + ActionColumns.UID + ","
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/deviceadmin/ |
D | DeviceAdminAddTest.java | 48 private static final int UID = 12345; field in DeviceAdminAddTest 66 doReturn(UID).when(mBatteryUtils).getPackageUid(PACKAGE_NAME); in setUp() 92 doReturn(true).when(mBatteryUtils).isForceAppStandbyEnabled(UID, PACKAGE_NAME); in unrestrictAppIfPossible_appRestricted_unrestrictApp() 96 verify(mBatteryUtils).setForceAppStandby(UID, PACKAGE_NAME, AppOpsManager.MODE_ALLOWED); in unrestrictAppIfPossible_appRestricted_unrestrictApp() 101 doReturn(false).when(mBatteryUtils).isForceAppStandbyEnabled(UID, PACKAGE_NAME); in unrestrictAppIfPossible_appUnrestricted_doNothing() 105 verify(mBatteryUtils, never()).setForceAppStandby(UID, PACKAGE_NAME, in unrestrictAppIfPossible_appUnrestricted_doNothing()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/ |
D | PasswordUtilsTest.java | 58 private static final int UID = 1234; field in PasswordUtilsTest 138 when(mActivityService.getLaunchedFromUid(mActivityToken)).thenReturn(UID); in isCallingAppPermitted_permissionGranted_returnsTrue() 139 when(mContext.checkPermission(PERMISSION, -1, UID)).thenReturn(PERMISSION_GRANTED); in isCallingAppPermitted_permissionGranted_returnsTrue() 146 when(mActivityService.getLaunchedFromUid(mActivityToken)).thenReturn(UID); in isCallingAppPermitted_permissionDenied_returnsFalse() 147 when(mContext.checkPermission(PERMISSION, -1, UID)).thenReturn(PERMISSION_DENIED); in isCallingAppPermitted_permissionDenied_returnsFalse()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/ |
D | AppInfoTest.java | 42 private static final int UID = 3452; field in AppInfoTest 53 .setUid(UID) in setUp() 68 assertThat(appInfo.uid).isEqualTo(UID); in testParcel() 92 assertThat(mAppInfo.uid).isEqualTo(UID); in testBuilder()
|
D | AnomalyCleanupJobServiceTest.java | 56 private static final int UID = 1234; field in AnomalyCleanupJobServiceTest 113 databaseManager.insertAnomaly(UID, PACKAGE_NAME, ANOMALY_TYPE, in onStartJob_cleanUpDataBefore30days() 115 databaseManager.insertAnomaly(UID, PACKAGE_NAME_OLD, ANOMALY_TYPE, in onStartJob_cleanUpDataBefore30days() 124 .setUid(UID) in onStartJob_cleanUpDataBefore30days()
|
D | AnomalyDetectionJobServiceTest.java | 80 private static final int UID = 12345; field in AnomalyDetectionJobServiceTest 142 doReturn(UID).when(mAnomalyDetectionJobService).extractUidFromStatsDimensionsValue(any()); in saveAnomalyToDatabase_systemWhitelisted_doNotSave() 267 when(intValue.getIntValue()).thenReturn(UID); in extractUidFromStatsDimensionsValue_extractCorrectUid() 277 tupleValue)).isEqualTo(UID); in extractUidFromStatsDimensionsValue_extractCorrectUid()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/ |
D | StorageApplicationListPreferenceControllerTest.java | 44 private static final int UID = 12; field in StorageApplicationListPreferenceControllerTest 75 appInfo.uid = UID; in onDataLoaded_addPreference_hasOnePreference() 97 appInfo.uid = UID; in onDataLoaded_updatePreference_hasOnePreferenceWithUpdatedValues()
|
D | StorageMediaCategoryDetailPreferenceControllerTest.java | 44 private static final int UID = 12; field in StorageMediaCategoryDetailPreferenceControllerTest 75 appInfo.uid = UID; in onDataLoaded_addPreference_hasTwoPreferences()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
D | NotificationChannelSliceTest.java | 79 private static final int UID = 2019; field in NotificationChannelSliceTest 101 doReturn(UID).when(mNotificationChannelSlice).getApplicationUid(any(String.class)); in setUp() 321 applicationInfo.uid = UID; in addMockPackageToPackageManager() 357 appRow.uid = UID; in buildAppRow()
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | DownloadReceiver.java | 155 new String[] { Downloads.Impl._ID, Constants.UID, COLUMN_DESTINATION, _DATA }, in handleUidRemoved() argument 156 Constants.UID + "=" + uid, null, null)) { in handleUidRemoved() argument 164 values.putNull(Constants.UID); in handleUidRemoved()
|