/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | EnterprisePrivacyFeatureProviderImplTest.java | 83 private @Mock DevicePolicyManager mDevicePolicyManager; field in EnterprisePrivacyFeatureProviderImplTest 101 mProvider = new EnterprisePrivacyFeatureProviderImpl(mContext, mDevicePolicyManager, in setUp() 107 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(null); in testHasDeviceOwner() 110 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(OWNER); in testHasDeviceOwner() 116 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(OWNER); in testIsInCompMode() 125 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null); in testGetDeviceOwnerOrganizationName() 128 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(OWNER_ORGANIZATION); in testGetDeviceOwnerOrganizationName() 134 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(null); in testGetDeviceOwnerDisclosure() 142 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(OWNER); in testGetDeviceOwnerDisclosure() 143 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null); in testGetDeviceOwnerDisclosure() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/ |
D | UserProvisioningStateHelperTest.java | 52 @Mock private DevicePolicyManager mDevicePolicyManager; field in UserProvisioningStateHelperTest 63 when(mContext.getSystemService(DEVICE_POLICY_SERVICE)).thenReturn(mDevicePolicyManager); in setUp() 84 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_FINALIZED, in testInitiallyDone_ProfileAfterSuw() 100 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_COMPLETE, in testInitiallyDone_ProfileDuringSuw() 103 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_PROFILE_COMPLETE, in testInitiallyDone_ProfileDuringSuw() 118 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_COMPLETE, in testInitiallyDone_DeviceOwnerSkipUserSetup() 133 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_INCOMPLETE, in testInitiallyDone_DeviceOwnerDontSkipUserSetup() 148 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_FINALIZED, in testFinalized_ManagedProfile() 151 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_UNMANAGED, in testFinalized_ManagedProfile() 165 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_FINALIZED, in testFinalized_DeviceOwner() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | AppWithAdminGrantedPermissionsCounterTest.java | 87 private DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsCounterTest 143 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp1)).isTrue(); in testIncludeInCount() 146 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp2)).isFalse(); in testIncludeInCount() 149 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp3)).isTrue(); in testIncludeInCount() 152 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp4)).isFalse(); in testIncludeInCount() 155 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp5)).isFalse(); in testIncludeInCount() 188 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_1)) in configureRunTimePermissions() 190 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_2)) in configureRunTimePermissions() 192 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_2), anyObject())) in configureRunTimePermissions() 194 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_3), anyObject())) in configureRunTimePermissions() [all …]
|
D | AppWithAdminGrantedPermissionsListerTest.java | 83 private DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsListerTest 121 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_1)) in verifyListInstalledApps() 123 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_2)) in verifyListInstalledApps() 125 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_2), anyObject())) in verifyListInstalledApps() 127 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_3), anyObject())) in verifyListInstalledApps() 129 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_4), anyObject())) in verifyListInstalledApps() 131 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_5), anyObject())) in verifyListInstalledApps() 171 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_6), anyObject())) in verifyListInstalledApps() 214 mDevicePolicyManager, mUserManager); in AppWithAdminGrantedPermissionsListerTestable()
|
D | ApplicationFeatureProviderImplTest.java | 87 private DevicePolicyManager mDevicePolicyManager; field in ApplicationFeatureProviderImplTest 105 mPackageManagerService, mDevicePolicyManager); in setUp() 154 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION)) in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 156 when(mDevicePolicyManager.getPermissionGrantState(null, APP_2, PERMISSION)) in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 191 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION)) in testListAppsWithAdminGrantedPermissions() 193 when(mDevicePolicyManager.getPermissionGrantState(null, APP_2, PERMISSION)) in testListAppsWithAdminGrantedPermissions()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | SetDevicePolicyTaskTest.java | 56 @Mock private DevicePolicyManager mDevicePolicyManager; field in SetDevicePolicyTaskTest 75 .thenReturn(mDevicePolicyManager); in setUp() 80 when(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser()).thenReturn(null); in setUp() 81 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in setUp() 167 verify(mDevicePolicyManager).setActiveAdmin(ADMIN_COMPONENT_NAME, true, TEST_USER_ID); in testSetActiveAdmin() 181 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in testSetDeviceOwner() 193 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in testSetDeviceOwner_PreconditionsNotMet() 210 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in testSetDeviceOwner_ReturnFalse() 226 when(mDevicePolicyManager.setProfileOwner(ADMIN_COMPONENT_NAME, ADMIN_PACKAGE_NAME, in testSetProfileOwner() 233 verify(mDevicePolicyManager).setProfileOwner(ADMIN_COMPONENT_NAME, ADMIN_PACKAGE_NAME, in testSetProfileOwner()
|
D | ManagedProfileSettingsTaskTest.java | 70 @Mock private DevicePolicyManager mDevicePolicyManager; field in ManagedProfileSettingsTaskTest 83 .thenReturn(mDevicePolicyManager); in setUp() 102 verify(mDevicePolicyManager, never()) in testNoMainColor() 128 verify(mDevicePolicyManager).setOrganizationColorForUser(Color.GREEN, TEST_USER_ID); in testMainColor()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/ |
D | SetNewPasswordControllerTest.java | 70 private DevicePolicyManager mDevicePolicyManager; field in SetNewPasswordControllerTest 81 mDevicePolicyManager, mUi); in setUp() 97 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithFingerprint() 117 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithFace() 165 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFingerprint_noFingerprintSensor() 184 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFace_noFaceSensor() 203 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFingerprint_hasFingerprintEnrolled() 222 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFace_hasFaceEnrolled() 241 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFingerprint_deviceAdminDisallowFingerprintForKeyguard() 260 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFace_deviceAdminDisallowFaceForKeyguard()
|
D | ChooseLockGenericControllerTest.java | 63 private DevicePolicyManager mDevicePolicyManager; field in ChooseLockGenericControllerTest 216 .when(mDevicePolicyManager) in upgradeQuality_noDpmRequirement_shouldReturnQuality() 228 .when(mDevicePolicyManager) in upgradeQuality_dpmRequirement_shouldReturnRequiredQuality() 239 when(mDevicePolicyManager.getPasswordQuality(nullable(ComponentName.class), anyInt())) in upgradeQuality_complexityHigh_minQualityNumericComplex() 249 when(mDevicePolicyManager.getPasswordQuality(nullable(ComponentName.class), anyInt())) in upgradeQuality_complexityMedium_minQualityNumericComplex() 259 when(mDevicePolicyManager.getPasswordQuality(nullable(ComponentName.class), anyInt())) in upgradeQuality_complexityLow_minQualitySomething() 273 mDevicePolicyManager, in createController()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/ |
D | SetDevicePolicyTask.java | 43 private final DevicePolicyManager mDevicePolicyManager; field in SetDevicePolicyTask 66 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in SetDevicePolicyTask() 120 mDevicePolicyManager.setActiveAdmin(component, true, userId); in setActiveAdmin() 125 if (!component.equals(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser())) { in setDeviceOwner() 126 return mDevicePolicyManager.setDeviceOwner(component, owner, userId); in setDeviceOwner() 133 if (!component.equals(mDevicePolicyManager.getProfileOwnerAsUser(userId))) { in setProfileOwner() 134 return mDevicePolicyManager.setProfileOwner(component, component.getPackageName(), in setProfileOwner()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ota/ |
D | OtaController.java | 68 private final DevicePolicyManager mDevicePolicyManager; field in OtaController 94 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in OtaController() 110 final int deviceOwnerUserId = mDevicePolicyManager.getDeviceOwnerUserId(); in run() 118 } else if (mDevicePolicyManager.getProfileOwnerAsUser(userInfo.id) != null) { in run() 129 ComponentName deviceOwner = mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); in addDeviceOwnerTasks() 158 ComponentName profileOwner = mDevicePolicyManager.getProfileOwnerAsUser(userId); in addManagedProfileTasks() 184 ComponentName profileOwner = mDevicePolicyManager.getProfileOwnerAsUser(userId); in addManagedUserTasks()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/ |
D | PreProvisioningControllerTest.java | 97 private DevicePolicyManager mDevicePolicyManager; field in PreProvisioningControllerTest 139 .thenReturn(mDevicePolicyManager); in setUp() 167 when(mDevicePolicyManager.getStorageEncryptionStatus()) in setUp() 192 when(mDevicePolicyManager.checkProvisioningPreCondition( in testManagedProfile_provisioningNotAllowed() 355 when(mDevicePolicyManager.getStorageEncryptionStatus()) in testManagedProfile_encryptionNotSupported() 447 when(mDevicePolicyManager.getStorageEncryptionStatus()) in testNfc_encryptionNotSupported() 705 when(mDevicePolicyManager.checkProvisioningPreCondition(action, TEST_MDM_PACKAGE)) in prepareMocksForMaybeStartProvisioning() 727 when(mDevicePolicyManager.checkProvisioningPreCondition(action, TEST_MDM_PACKAGE)) in prepareMocksForManagedProfileIntent() 737 when(mDevicePolicyManager.checkProvisioningPreCondition(action, TEST_MDM_PACKAGE)) in prepareMocksForNfcIntent() 748 when(mDevicePolicyManager.checkProvisioningPreCondition(action, TEST_MDM_PACKAGE)) in prepareMocksForQrIntent() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/ |
D | OtaControllerTest.java | 77 @Mock private DevicePolicyManager mDevicePolicyManager; field in OtaControllerTest 94 .thenReturn(mDevicePolicyManager); in setUp() 259 when(mDevicePolicyManager.getDeviceOwnerUserId()).thenReturn(userId); in setDeviceOwner() 260 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(admin); in setDeviceOwner() 266 when(mDevicePolicyManager.getProfileOwnerAsUser(userId)).thenReturn(admin); in addManagedProfile() 274 when(mDevicePolicyManager.getProfileOwnerAsUser(userId)).thenReturn(admin); in addManagedUser()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/biometrics/fingerprint/ |
D | FingerprintEnrollSuggestionActivityTest.java | 48 private DevicePolicyManager mDevicePolicyManager; field in FingerprintEnrollSuggestionActivityTest 55 .thenReturn(mDevicePolicyManager); in setUp() 56 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(), anyInt())).thenReturn(0); in setUp() 100 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(), anyInt())) in testFingerprintEnrollmentIntroductionIsCompleteWhenFingerprintDisabled()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | AppInfoDashboardFragmentTest.java | 86 private DevicePolicyManager mDevicePolicyManager; field in AppInfoDashboardFragmentTest 116 when(mDevicePolicyManager.packageHasActiveAdmins(nullable(String.class))).thenReturn(false); in shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue() 118 ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager); in shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue() 132 when(mDevicePolicyManager.packageHasActiveAdmins(nullable(String.class))).thenReturn(false); in shouldShowUninstallForAll_installForSelfOnly_shouldReturnFalse() 134 ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager); in shouldShowUninstallForAll_installForSelfOnly_shouldReturnFalse() 251 when(mDevicePolicyManager.packageHasActiveAdmins(nullable(String.class))).thenReturn(false); in instantApps_noUninstallForAllButton() 260 ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager); in instantApps_noUninstallForAllButton()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/finalization/ |
D | UserProvisioningStateHelper.java | 47 private final DevicePolicyManager mDevicePolicyManager; field in UserProvisioningStateHelper 62 mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( in UserProvisioningStateHelper() 148 final int currentState = mDevicePolicyManager.getUserProvisioningState(); in isStateUnmanagedOrFinalized() 154 mDevicePolicyManager.setUserProvisioningState(state, userId); in setUserProvisioningState()
|
/packages/apps/Settings/src/com/android/settings/password/ |
D | SetNewPasswordController.java | 66 private final DevicePolicyManager mDevicePolicyManager; field in SetNewPasswordController 105 mDevicePolicyManager = checkNotNull(devicePolicyManager); in SetNewPasswordController() 164 mDevicePolicyManager.getKeyguardDisabledFeatures(null, mTargetUserId); in isFingerprintDisabledByAdmin() 170 mDevicePolicyManager.getKeyguardDisabledFeatures(null, mTargetUserId); in isFaceDisabledByAdmin()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/password/ |
D | SetNewPasswordController.java | 66 private final DevicePolicyManager mDevicePolicyManager; field in SetNewPasswordController 105 mDevicePolicyManager = checkNotNull(devicePolicyManager); in SetNewPasswordController() 164 mDevicePolicyManager.getKeyguardDisabledFeatures(null, mTargetUserId); in isFingerprintDisabledByAdmin() 170 mDevicePolicyManager.getKeyguardDisabledFeatures(null, mTargetUserId); in isFaceDisabledByAdmin()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/ |
D | AppWithAdminGrantedPermissionsLister.java | 32 private final DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsLister 40 mDevicePolicyManager = devicePolicyManager; in AppWithAdminGrantedPermissionsLister() 46 mDevicePolicyManager, mPm, mPackageManagerService, info); in includeInCount()
|
D | AppWithAdminGrantedPermissionsCounter.java | 34 private final DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsCounter 42 mDevicePolicyManager = devicePolicyManager; in AppWithAdminGrantedPermissionsCounter() 47 return includeInCount(mPermissions, mDevicePolicyManager, mPm, mPackageManagerService, in includeInCount()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | AppWithAdminGrantedPermissionsLister.java | 32 private final DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsLister 40 mDevicePolicyManager = devicePolicyManager; in AppWithAdminGrantedPermissionsLister() 46 mDevicePolicyManager, mPm, mPackageManagerService, info); in includeInCount()
|
D | AppWithAdminGrantedPermissionsCounter.java | 34 private final DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsCounter 42 mDevicePolicyManager = devicePolicyManager; in AppWithAdminGrantedPermissionsCounter() 47 return includeInCount(mPermissions, mDevicePolicyManager, mPm, mPackageManagerService, in includeInCount()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/inputmethod/ |
D | InputMethodUtilTest.java | 81 private DevicePolicyManager mDevicePolicyManager; field in InputMethodUtilTest 124 mInputMethodManager, mDevicePolicyManager); in getPermittedAndEnabledInputMethodList_noEnabledInputMethods_returnsNull() 136 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()) in getPermittedAndEnabledInputMethodList_noPermittedMethods_returnsEmptyList() 140 mInputMethodManager, mDevicePolicyManager); in getPermittedAndEnabledInputMethodList_noPermittedMethods_returnsEmptyList() 154 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in getPermittedAndEnabledInputMethodList_withGoogleTypingIME_doesNotIncludeIME() 157 mInputMethodManager, mDevicePolicyManager); in getPermittedAndEnabledInputMethodList_withGoogleTypingIME_doesNotIncludeIME()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/ |
D | UtilsTest.java | 88 private DevicePolicyManager mDevicePolicyManager; field in UtilsTest 173 when(mDevicePolicyManager.isDeviceOwnerAppOnAnyUser(PACKAGE_NAME)).thenReturn(true); in isProfileOrDeviceOwner_deviceOwnerApp_returnTrue() 175 assertThat(Utils.isProfileOrDeviceOwner(mUserManager, mDevicePolicyManager, PACKAGE_NAME)) in isProfileOrDeviceOwner_deviceOwnerApp_returnTrue() 185 when(mDevicePolicyManager.getProfileOwnerAsUser(userInfos.get(0).id)) in isProfileOrDeviceOwner_profileOwnerApp_returnTrue() 188 assertThat(Utils.isProfileOrDeviceOwner(mUserManager, mDevicePolicyManager, PACKAGE_NAME)) in isProfileOrDeviceOwner_profileOwnerApp_returnTrue()
|
/packages/apps/Car/Settings/src/com/android/car/settings/inputmethod/ |
D | KeyboardPreferenceController.java | 41 private final DevicePolicyManager mDevicePolicyManager; field in KeyboardPreferenceController 48 mDevicePolicyManager = in KeyboardPreferenceController() 63 mInputMethodManager, mDevicePolicyManager); in updateState()
|