/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/ |
D | ProfileDetailsEndSessionPreferenceControllerTest.java | 63 private DevicePolicyManager mDpm; field in ProfileDetailsEndSessionPreferenceControllerTest 132 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDpm); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice() 133 when(mDpm.isLogoutEnabled()).thenReturn(false); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice() 134 when(mDpm.getLogoutUser()).thenReturn(mUserHandle); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice() 142 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDpm); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice_zoneWrite() 143 when(mDpm.isLogoutEnabled()).thenReturn(false); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice_zoneWrite() 144 when(mDpm.getLogoutUser()).thenReturn(mUserHandle); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice_zoneWrite() 153 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDpm); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice_zoneRead() 154 when(mDpm.isLogoutEnabled()).thenReturn(false); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice_zoneRead() 155 when(mDpm.getLogoutUser()).thenReturn(mUserHandle); in getAvailabilityStatus_logoutDisabled_unsupportedOnDevice_zoneRead() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/enterprise/ |
D | BaseEnterpriseTestCase.java | 91 protected DevicePolicyManager mDpm; field in BaseEnterpriseTestCase 111 assertWithMessage("mDpm").that(mDpm).isNotNull(); in setFixtures() 115 when(mSpiedContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDpm); in setFixtures() 144 when(mDpm.getProfileOwner()).thenReturn(mDefaultAdmin); in mockProfileOwner() 148 when(mDpm.getProfileOwnerAsUser(MY_USER_ID)).thenReturn(mDefaultAdmin); in mockProfileOwnerAsUser() 149 when(mDpm.getProfileOwnerAsUser(MY_USER_ID.getIdentifier())).thenReturn(mDefaultAdmin); in mockProfileOwnerAsUser() 153 when(mDpm.getProfileOwnerAsUser(MY_USER_ID)).thenReturn(null); in mockNoProfileOwnerAsUser() 154 when(mDpm.getProfileOwnerAsUser(MY_USER_ID.getIdentifier())).thenReturn(null); in mockNoProfileOwnerAsUser() 158 when(mDpm.isDeviceManaged()).thenReturn(true); in mockDeviceOwner() 160 when(mDpm.isDeviceManaged()).thenReturn(true); in mockDeviceOwner() [all …]
|
D | CaCertsCurrentUserPreferenceControllerTest.java | 64 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(Collections.emptyList()); in testNoInstalledCaCerts_preferenceDisabled() 78 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(Collections.emptyList()); in testNoInstalledCaCerts_preferenceDisabled_zoneWrite() 93 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(Collections.emptyList()); in testNoInstalledCaCerts_preferenceDisabled_zoneRead() 108 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(Collections.emptyList()); in testNoInstalledCaCerts_preferenceDisabled_zoneHidden() 123 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(ImmutableList.of("cert1", "cert2")); in testInstalledCaCerts_preferenceEnabled() 135 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(ImmutableList.of("cert1", "cert2")); in testInstalledCaCerts_preferenceEnabled_zoneWrite() 148 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(ImmutableList.of("cert1", "cert2")); in testInstalledCaCerts_preferenceEnabled_zoneRead() 162 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(ImmutableList.of("cert1", "cert2")); in testInstalledCaCerts_preferenceEnabled_zoneHidden() 176 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(ImmutableList.of("cert1", "cert2")); in testNoCompMode_showsRegularTitle() 187 when(mDpm.getOwnerInstalledCaCerts(any())).thenReturn(ImmutableList.of("cert1", "cert2")); in testCompMode_showsPersonalProfileTitle()
|
/packages/apps/Settings/src/com/android/settings/enterprise/ |
D | EnterprisePrivacyFeatureProviderImpl.java | 51 private final DevicePolicyManager mDpm; field in EnterprisePrivacyFeatureProviderImpl 65 mDpm = dpm; in EnterprisePrivacyFeatureProviderImpl() 86 final CharSequence organizationName = mDpm.getDeviceOwnerOrganizationName(); in getDeviceOwnerOrganizationName() 101 final CharSequence organizationName = mDpm.getDeviceOwnerOrganizationName(); in getDeviceOwnerDisclosure() 103 disclosure.append(mDpm.getResources().getString(DEVICE_MANAGED_WITH_NAME, in getDeviceOwnerDisclosure() 107 disclosure.append(mDpm.getResources().getString(DEVICE_MANAGED_WITHOUT_NAME, in getDeviceOwnerDisclosure() 115 final long timestamp = mDpm.getLastSecurityLogRetrievalTime(); in getLastSecurityLogRetrievalTime() 121 final long timestamp = mDpm.getLastBugReportRequestTime(); in getLastBugReportRequestTime() 127 final long timestamp = mDpm.getLastNetworkLogRetrievalTime(); in getLastNetworkLogRetrievalTime() 133 return mDpm.isSecurityLoggingEnabled(null); in isSecurityLoggingEnabled() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/enterprise/ |
D | EnterprisePrivacyFeatureProviderImpl.java | 46 private final DevicePolicyManager mDpm; field in EnterprisePrivacyFeatureProviderImpl 59 mDpm = dpm; in EnterprisePrivacyFeatureProviderImpl() 79 final CharSequence organizationName = mDpm.getDeviceOwnerOrganizationName(); in getDeviceOwnerOrganizationName() 94 final CharSequence organizationName = mDpm.getDeviceOwnerOrganizationName(); in getDeviceOwnerDisclosure() 106 final long timestamp = mDpm.getLastSecurityLogRetrievalTime(); in getLastSecurityLogRetrievalTime() 112 final long timestamp = mDpm.getLastBugReportRequestTime(); in getLastBugReportRequestTime() 118 final long timestamp = mDpm.getLastNetworkLogRetrievalTime(); in getLastNetworkLogRetrievalTime() 124 return mDpm.isSecurityLoggingEnabled(null); in isSecurityLoggingEnabled() 129 return mDpm.isNetworkLoggingEnabled(null); in isNetworkLoggingEnabled() 146 ComponentName owner = mDpm.getDeviceOwnerComponentOnCallingUser(); in getMaximumFailedPasswordsBeforeWipeInCurrentUser() [all …]
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/enterprise/ |
D | EnterprisePrivacyFeatureProviderImpl.java | 46 private final DevicePolicyManager mDpm; field in EnterprisePrivacyFeatureProviderImpl 59 mDpm = dpm; in EnterprisePrivacyFeatureProviderImpl() 79 final CharSequence organizationName = mDpm.getDeviceOwnerOrganizationName(); in getDeviceOwnerOrganizationName() 94 final CharSequence organizationName = mDpm.getDeviceOwnerOrganizationName(); in getDeviceOwnerDisclosure() 109 final long timestamp = mDpm.getLastSecurityLogRetrievalTime(); in getLastSecurityLogRetrievalTime() 115 final long timestamp = mDpm.getLastBugReportRequestTime(); in getLastBugReportRequestTime() 121 final long timestamp = mDpm.getLastNetworkLogRetrievalTime(); in getLastNetworkLogRetrievalTime() 127 return mDpm.isSecurityLoggingEnabled(null); in isSecurityLoggingEnabled() 132 return mDpm.isNetworkLoggingEnabled(null); in isNetworkLoggingEnabled() 149 ComponentName owner = mDpm.getDeviceOwnerComponentOnCallingUser(); in getMaximumFailedPasswordsBeforeWipeInCurrentUser() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settingslib/enterprise/ |
D | EnterprisePrivacyFeatureProviderImpl.java | 40 private final DevicePolicyManager mDpm; field in EnterprisePrivacyFeatureProviderImpl 46 mDpm = dpm; in EnterprisePrivacyFeatureProviderImpl() 52 long timestamp = mDpm.getLastSecurityLogRetrievalTime(); in getLastSecurityLogRetrievalTime() 58 long timestamp = mDpm.getLastBugReportRequestTime(); in getLastBugReportRequestTime() 64 long timestamp = mDpm.getLastNetworkLogRetrievalTime(); in getLastNetworkLogRetrievalTime() 70 if (!mDpm.isCurrentInputMethodSetByOwner()) { in getImeLabelIfOwnerSet() 89 ComponentName owner = mDpm.getDeviceOwnerComponentOnCallingUser(); in getMaximumFailedPasswordsBeforeWipeInCurrentUser() 91 owner = mDpm.getProfileOwnerAsUser(MY_USER_ID); in getMaximumFailedPasswordsBeforeWipeInCurrentUser() 96 return mDpm.getMaximumFailedPasswordsForWipe(owner, MY_USER_ID); in getMaximumFailedPasswordsBeforeWipeInCurrentUser()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sidebar/ |
D | UserItemsCombinerTest.java | 83 private final DevicePolicyManager mDpm = field in UserItemsCombinerTest 113 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableList_empty() 127 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableListForAllUsers_empty() 135 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableList_currentIsPersonal_personalItemsOnly() 146 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableList_currentIsWork_personalItemsOnly() 164 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableListForAllUsers_currentIsPersonal_personalItemsOnly() 180 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableListForAllUsers_currentIsWork_personalItemsOnly() 196 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableListForAllUsers_currentIsPrivate_personalItemsOnly() 207 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableList_currentIsPersonal_workItemsOnly() 218 mCombiner = new UserItemsCombiner(mResources, mDpm, mState) in testCreatePresentableList_currentIsWork_workItemsOnly() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/ |
D | DeviceAdminAddWarningPreferenceController.java | 46 boolean isProfileOwner = admin.equals(mDpm.getProfileOwner()); in updateState() 47 if (isProfileOwner || admin.equals(mDpm.getDeviceOwnerComponentOnCallingUser())) { in updateState() 61 int resId = mDpm.isAdminActive(admin) ? R.string.device_admin_status in updateState() 75 return mDpm.isDeviceManaged() && mDpm.getDeviceOwnerType(mDpm in isFinancedDevice()
|
D | DeviceAdminAddFragment.java | 63 private DevicePolicyManager mDpm; field in DeviceAdminAddFragment 71 mDpm = dpm; in setDevicePolicyManager() 156 if (mDpm.isAdminActive(admin)) { in onAttach() 157 if (mDpm.isRemovingAdmin(admin, myUserHandle().getIdentifier())) { in onAttach() 165 if (!mDpm.hasGrantedPolicy(admin, pi.ident)) { in onAttach() 178 mDpm.setActiveAdmin(admin, refreshing); in onAttach() 234 mIsActive = mDpm.isAdminActive(mAdminComponentToUninstall); in startUninstall() 237 mDpm.removeActiveAdmin(mAdminComponentToUninstall); in startUninstall() 261 mDpm.setActiveAdmin(mAdminComponentToUninstall, /* refreshing= */ false); in onActivityResult() 320 if (mDpm.isAdminActive(who)) { in isValidAdmin()
|
D | BaseEnterprisePreferenceController.java | 45 protected final DevicePolicyManager mDpm; field in BaseEnterprisePreferenceController 58 mDpm = context.getSystemService(DevicePolicyManager.class); in BaseEnterprisePreferenceController() 74 return admin.equals(mDpm.getProfileOwner()) in isProfileOrDeviceOwner() 75 || admin.equals(mDpm.getDeviceOwnerComponentOnCallingUser()); in isProfileOrDeviceOwner()
|
/packages/services/Car/tests/CarTestDpc/src/com/android/car/testdpc/ |
D | DpcShellCommand.java | 44 private final DevicePolicyManager mDpm; field in DpcShellCommand 74 mDpm = context.getSystemService(DevicePolicyManager.class); in DpcShellCommand() 211 mDpm.clearUserRestriction(mAdmin, restriction); in runClearUserRestriction() 215 Bundle restrictions = mDpm.getUserRestrictions(mAdmin); in runGetUserRestrictions() 225 Set<String> ids = mDpm.getAffiliationIds(mAdmin); in runGetAffiliationIds() 245 mDpm.setAffiliationIds(mAdmin, idSet); in runSetAffiliationIds() 251 mWriter.println(mDpm.isAffiliatedUser()); in runIsUserAffiliated() 265 UserHandle user = mDpm.createAndManageUser(mAdmin, userId, mAdmin, in runCreateAndManageUser() 277 boolean success = mDpm.removeUser(mAdmin, user); in runRemoveUser() 288 int status = mDpm.startUserInBackground(mAdmin, user); in runStartUserBackground() [all …]
|
D | DpcService.java | 47 private DevicePolicyManager mDpm; field in DpcService 57 mDpm = mContext.getSystemService(DevicePolicyManager.class); in onCreate() 59 mDpm.setAffiliationIds(mAdmin, AFFILIATION_IDS); in onCreate() 86 writer.printf("isProfileOwner()? %b\n", mDpm.isProfileOwnerApp(mContext.getPackageName())); in printInternalState() 87 writer.printf("isDeviceOwner()? %b\n", mDpm.isDeviceOwnerApp(mContext.getPackageName())); in printInternalState()
|
D | DpcFactory.java | 44 private final DevicePolicyManager mDpm; field in DpcFactory 49 mDpm = mContext.getSystemService(DevicePolicyManager.class); in DpcFactory() 52 if (isPO(mContext, mDpm) || isDO(mContext, mDpm)) { in DpcFactory() 58 List<UserHandle> targetUsers = mDpm.getBindDeviceAdminTargetUsers(mAdmin); in assignDevicePolicyManagers()
|
/packages/services/Car/tests/CarTestDpc/src/com/android/car/testdpc/remotedpm/ |
D | LocalDevicePolicyManager.java | 31 private final DevicePolicyManager mDpm; field in LocalDevicePolicyManager 36 mDpm = context.getSystemService(DevicePolicyManager.class); in LocalDevicePolicyManager() 46 int status = mDpm.startUserInBackground(mAdmin, target); in startUserInBackground() 54 mDpm.reboot(mAdmin); in reboot() 60 mDpm.addUserRestriction(mAdmin, key); in addUserRestriction()
|
D | RemoteDevicePolicyManagerServiceImpl.java | 30 private final DevicePolicyManager mDpm; field in RemoteDevicePolicyManagerServiceImpl 34 mDpm = mContext.getSystemService(DevicePolicyManager.class); in RemoteDevicePolicyManagerServiceImpl() 41 mDpm.reboot(admin); in reboot() 51 mDpm.addUserRestriction(admin, key); in addUserRestriction()
|
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/ |
D | ProfileDetailsEndSessionPreferenceController.java | 40 private final DevicePolicyManager mDpm; field in ProfileDetailsEndSessionPreferenceController 48 mDpm = context.getSystemService(DevicePolicyManager.class); in ProfileDetailsEndSessionPreferenceController() 74 if (mDpm == null) { in getDefaultAvailabilityStatus() 78 boolean isLogoutEnabled = mDpm.isLogoutEnabled(); in getDefaultAvailabilityStatus() 79 mLogoutUser = mDpm.getLogoutUser(); in getDefaultAvailabilityStatus()
|
/packages/modules/DeviceLock/DeviceLockController/src/com/android/devicelockcontroller/policy/ |
D | LockTaskModePolicyHandler.java | 62 private final DevicePolicyManager mDpm; field in LockTaskModePolicyHandler 68 mDpm = dpm; in LockTaskModePolicyHandler() 127 mDpm.setLockTaskPackages(null /* admin */, allowlistPackages); in updateAllowlist() 155 mDpm.setLockTaskFeatures(/* admin= */ null, DEFAULT_LOCK_TASK_FEATURES_FOR_DLC); 171 mDpm.setLockTaskFeatures(/* admin= */ null, flags); 185 mDpm.setLockTaskFeatures(null /* admin */, DevicePolicyManager.LOCK_TASK_FEATURE_NONE); 189 mDpm.setLockTaskPackages(null /* admin */, new String[]{""}); 191 mDpm.setLockTaskPackages(null /* admin */, new String[0]); 192 mDpm.clearPackagePersistentPreferredActivities(null /* admin */,
|
D | PackagePolicyHandler.java | 37 private final DevicePolicyManager mDpm; field in PackagePolicyHandler 42 mDpm = dpm; in PackagePolicyHandler() 63 mDpm.setUninstallBlocked(null /* admin */, kioskPackageName, in enablePackageProtection() 81 mDpm.setUserControlDisabledPackages(null /* admin */, pkgList); in enablePackageProtection()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/ |
D | UserCapabilitiesTest.java | 47 private ShadowDevicePolicyManager mDpm; field in UserCapabilitiesTest 53 mDpm = ShadowDevicePolicyManager.getShadow(); in setUp() 107 mDpm.setDeviceOwner(null); in restrictedProfile_enabled() 116 mDpm.setDeviceOwner(null); in restrictedProfile_configNotSet() 125 mDpm.setDeviceOwner(new ComponentName("test", "test")); in restrictedProfile_deviceIsManaged() 134 mDpm.setDeviceOwner(null); in restrictedProfile_typeNotEnabled()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/ |
D | UninstallPreference.java | 38 private final DevicePolicyManager mDpm; field in UninstallPreference 45 mDpm = context.getSystemService(DevicePolicyManager.class); in UninstallPreference() 130 return (mDpm != null && mDpm.packageHasActiveAdmins(mEntry.info.packageName)); in isActiveDeviceAdmin() 143 if (mDpm.packageHasActiveAdmins(packageName)) { in getUninstallDeviceAdminIntent()
|
/packages/modules/Connectivity/framework-t/src/android/net/ |
D | NetworkStatsAccess.java | 114 final DevicePolicyManager mDpm = context.getSystemService(DevicePolicyManager.class); in checkAccessLevel() local 124 isDeviceOwner = mDpm != null && mDpm.isDeviceOwnerApp(callingPackage); in checkAccessLevel() 152 isProfileOwner = mDpm != null && mDpm.isProfileOwnerApp(callingPackage); in checkAccessLevel()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/enterprise/ |
D | EnterprisePolicyGuard.java | 51 final private DevicePolicyManager mDpm; field in EnterprisePolicyGuard 56 mDpm = context.getSystemService(DevicePolicyManager.class); in EnterprisePolicyGuard() 79 mDpm.hasManagedProfileCallerIdAccess(currentHandle, callingPackage); in isCrossProfileAllowed() 81 mDpm.hasManagedProfileContactsAccess(currentHandle, callingPackage); in isCrossProfileAllowed() 83 !mDpm.getBluetoothContactSharingDisabled(currentHandle); in isCrossProfileAllowed()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/device/apps/ |
D | UninstallPreferenceController.java | 37 private final DevicePolicyManager mDpm; field in UninstallPreferenceController 45 mDpm = context.getSystemService(DevicePolicyManager.class); in UninstallPreferenceController() 99 return (mDpm != null && mDpm.packageHasActiveAdmins(mAppEntry.info.packageName)); in isActiveDeviceAdmin()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/ |
D | ParentalControlsUtilsTest.java | 57 private DevicePolicyManager mDpm; field in ParentalControlsUtilsTest 74 when(mDpm.getProfileOwnerOrDeviceOwnerSupervisionComponent(any(UserHandle.class))) in getEnforcedAdminForCombination() 76 when(mDpm.getKeyguardDisabledFeatures(eq(supervisionComponentName))) in getEnforcedAdminForCombination() 79 return ParentalControlsUtils.parentConsentRequiredInternal(mDpm, modality, in getEnforcedAdminForCombination()
|