/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
H A D | DevicePolicyManagerTest.java | 185 public DevicePolicyManager dpm; field in DevicePolicyManagerTest 2771 dpm.reboot(admin1); in testReboot() 4282 dpm.setTime(admin1, 0); in testSetTime() 4802 dpm.wipeData(0); in testWipeDataManagedProfile() 4836 dpm.wipeData(0); in testWipeDataManagedProfileOnOrganizationOwnedDevice() 4903 dpm.wipeData(0); in testWipeDataDeviceOwner() 6122 dpm -> dpm.setCertInstallerPackage(admin1, caller.packageName)); in testGetOwnerInstalledCaCertsForDelegate() 6256 (dpm) -> assertThat(dpm.getOwnerInstalledCaCerts(callerUser)) in verifyCanGetOwnerInstalledCaCerts() 6319 runAsCaller(admin1Context, dpms, dpm -> dpm.clearProfileOwner(admin1)); in verifyCantGetOwnerInstalledCaCertsProfileOwnerRemoval() 6598 dpm -> dpm.setDelegatedScopes(admin1, DpmMockContext.DELEGATE_PACKAGE_NAME, in testEnforceCallerCanRequestDeviceIdAttestation_delegateCaller() [all …]
|
H A D | DevicePolicyManagerServiceMigrationTest.java | 402 runAsCaller(poContext, dpms, dpm -> { in testCompMigrationAffiliated() 404 .that(dpm.getParentProfileInstance(admin1).getPasswordHistoryLength(admin1)) in testCompMigrationAffiliated() 407 .that(dpm.getPasswordHistoryLength(admin1)).isEqualTo(0); in testCompMigrationAffiliated() 413 .that(dpm.getParentProfileInstance(admin1) in testCompMigrationAffiliated() 418 .that(dpm.getAccountTypesWithManagementDisabled()).asList() in testCompMigrationAffiliated() 426 dpm.getUserRestrictions(admin1).keySet()) in testCompMigrationAffiliated() 438 .that(dpm.getPersonalAppsSuspendedReasons(admin1)) in testCompMigrationAffiliated() 469 runAsCaller(poContext, dpms, dpm -> { in testCompMigration_keepSuspendedAppsWhenDpcIsRPlus() 471 .that(dpm.getPersonalAppsSuspendedReasons(admin1)) in testCompMigration_keepSuspendedAppsWhenDpcIsRPlus() 495 runAsCaller(poContext, dpms, dpm -> { in testCompMigration_unsuspendAppsWhenDpcNotRPlus() [all …]
|
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/ |
H A D | RestrictedLockUtilsInternal.java | 92 if (dpm == null) { in checkIfRestrictionEnforced() 175 DevicePolicyManager dpm = in checkIfKeyguardFeaturesDisabled() local 177 return findEnforcedAdmin(dpm.getActiveAdminsAsUser(userId), dpm, userId, check); in checkIfKeyguardFeaturesDisabled() 274 if (dpm == null) { in checkIfInputMethodDisallowed() 318 if (dpm == null) { in checkIfRemoteContactSearchDisallowed() 337 if (dpm == null) { in checkIfAccessibilityServiceDisallowed() 421 if (dpm == null || dpm.isUsbDataSignalingEnabledForUser(userId)) { in checkIfUsbDataSignalingIsDisabled() 471 if (dpm == null) { in checkIfPasswordQualityIsSet() 551 if (dpm == null) { in checkForLockSetting() 605 if (dpm == null) { in getDeviceOwner() [all …]
|
/aosp12/frameworks/base/core/java/android/hardware/biometrics/ |
H A D | ParentalControlsUtilsInternal.java | 47 @NonNull DevicePolicyManager dpm, @BiometricAuthenticator.Modality int modality, in parentConsentRequired() argument 53 return parentConsentRequired(dpm, modality, userHandle); in parentConsentRequired() 59 public static boolean parentConsentRequired(@NonNull DevicePolicyManager dpm, in parentConsentRequired() argument 61 final ComponentName cn = getSupervisionComponentName(dpm, userHandle); in parentConsentRequired() 66 final int keyguardDisabledFeatures = dpm.getKeyguardDisabledFeatures(cn); in parentConsentRequired() 89 public static ComponentName getSupervisionComponentName(@NonNull DevicePolicyManager dpm, in getSupervisionComponentName() argument 91 return dpm.getProfileOwnerOrDeviceOwnerSupervisionComponent(userHandle); in getSupervisionComponentName()
|
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/enterprise/ |
H A D | ActionDisabledByAdminControllerFactory.java | 66 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in doesBiometricRequireParentalConsent() local 67 return ParentalControlsUtilsInternal.parentConsentRequired(context, dpm, in doesBiometricRequireParentalConsent() 72 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isFinancedDevice() local 73 return dpm.isDeviceManaged() && dpm.getDeviceOwnerType( in isFinancedDevice() 74 dpm.getDeviceOwnerComponentOnAnyUser()) == DEVICE_OWNER_TYPE_FINANCED; in isFinancedDevice()
|
/aosp12/packages/apps/Settings/src/com/android/settings/accounts/ |
H A D | AccountRestrictionHelper.java | 73 final DevicePolicyManager dpm = (DevicePolicyManager) mContext.getSystemService( in isOrganizationOwnedDevice() local 75 if (dpm == null) { in isOrganizationOwnedDevice() 78 return dpm.isOrganizationOwnedDeviceWithManagedProfile(); in isOrganizationOwnedDevice() 82 final DevicePolicyManager dpm = (DevicePolicyManager) mContext.getSystemService( in getEnforcedAdmin() local 84 if (dpm == null) { in getEnforcedAdmin() 88 ComponentName adminComponent = dpm.getProfileOwnerAsUser(managedUsedId); in getEnforcedAdmin()
|
H A D | CrossProfileCalendarPreferenceController.java | 82 final DevicePolicyManager dpm = managedProfileContext.getSystemService( in isCrossProfileCalendarDisallowedByAdmin() local 84 if (dpm == null) { in isCrossProfileCalendarDisallowedByAdmin() 87 final Set<String> packages = dpm.getCrossProfileCalendarPackages(); in isCrossProfileCalendarDisallowedByAdmin()
|
/aosp12/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/ |
H A D | ApplicationsUtilsTest.java | 83 DevicePolicyManager dpm = mock(DevicePolicyManager.class); in isProfileOrDeviceOwner_profileOwner_returnsTrue() local 87 when(dpm.getProfileOwnerAsUser(userInfo.id)).thenReturn( in isProfileOrDeviceOwner_profileOwner_returnsTrue() 90 assertThat(ApplicationsUtils.isProfileOrDeviceOwner(PACKAGE_NAME, dpm, profileHelper)) in isProfileOrDeviceOwner_profileOwner_returnsTrue() 96 DevicePolicyManager dpm = mock(DevicePolicyManager.class); in isProfileOrDeviceOwner_deviceOwner_returnsTrue() local 97 when(dpm.isDeviceOwnerAppOnAnyUser(PACKAGE_NAME)).thenReturn(true); in isProfileOrDeviceOwner_deviceOwner_returnsTrue() 99 assertThat(ApplicationsUtils.isProfileOrDeviceOwner(PACKAGE_NAME, dpm, in isProfileOrDeviceOwner_deviceOwner_returnsTrue()
|
/aosp12/packages/apps/Settings/src/com/android/settings/biometrics/ |
H A D | ParentalControlsUtils.java | 57 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in parentConsentRequired() local 58 return parentConsentRequiredInternal(dpm, modality, userHandle); in parentConsentRequired() 68 @NonNull DevicePolicyManager dpm, @BiometricAuthenticator.Modality int modality, in parentConsentRequiredInternal() 70 if (ParentalControlsUtilsInternal.parentConsentRequired(dpm, modality, in parentConsentRequiredInternal() 73 ParentalControlsUtilsInternal.getSupervisionComponentName(dpm, userHandle); in parentConsentRequiredInternal()
|
/aosp12/packages/apps/Settings/src/com/android/settings/enterprise/ |
H A D | PrivacySettingsPreferenceFactory.java | 50 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isFinancedDevice() local 51 return dpm.isDeviceManaged() && dpm.getDeviceOwnerType( in isFinancedDevice() 52 dpm.getDeviceOwnerComponentOnAnyUser()) == DEVICE_OWNER_TYPE_FINANCED; in isFinancedDevice()
|
/aosp12/packages/services/Car/car-admin-ui-lib/src/main/java/com/android/car/admin/ui/ |
H A D | ManagedDeviceTextView.java | 65 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in getManagedDeviceText() local 66 CharSequence orgName = dpm.getDeviceOwnerOrganizationName(); in getManagedDeviceText() 84 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isManagedDevice() 85 return dpm != null && dpm.isDeviceManaged(); in isManagedDevice()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/ |
H A D | CrossProfileCalendarPreferenceControllerTest.java | 70 private ShadowDevicePolicyManager dpm; field in CrossProfileCalendarPreferenceControllerTest 79 dpm = Shadows.shadowOf(application.getSystemService(DevicePolicyManager.class)); in setUp() 96 dpm.setProfileOwner(TEST_COMPONENT_NAME); in getAvailabilityStatus_noPackageAllowed_shouldBeDisabledForUser() 103 dpm.setProfileOwner(TEST_COMPONENT_NAME); in getAvailabilityStatus_somePackagesAllowed_shouldBeAvailable() 104 dpm.setCrossProfileCalendarPackages(TEST_COMPONENT_NAME, in getAvailabilityStatus_somePackagesAllowed_shouldBeAvailable() 112 dpm.setProfileOwner(TEST_COMPONENT_NAME); in getAvailabilityStatus_allPackagesAllowed_shouldBeAvailable() 113 dpm.setCrossProfileCalendarPackages(TEST_COMPONENT_NAME, null); in getAvailabilityStatus_allPackagesAllowed_shouldBeAvailable()
|
/aosp12/packages/apps/Settings/src/com/android/settings/wifi/ |
H A D | WifiUtils.java | 84 final DevicePolicyManager dpm = in isNetworkLockedDown() local 91 if (pm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN) && dpm == null) { in isNetworkLockedDown() 96 if (dpm != null) { in isNetworkLockedDown() 97 final ComponentName deviceOwner = dpm.getDeviceOwnerComponentOnAnyUser(); in isNetworkLockedDown() 99 final int deviceOwnerUserId = dpm.getDeviceOwnerUserId(); in isNetworkLockedDown() 107 } else if (dpm.isOrganizationOwnedDeviceWithManagedProfile()) { in isNetworkLockedDown() 109 final ComponentName profileOwner = dpm.getProfileOwnerAsUser(profileOwnerUserId); in isNetworkLockedDown()
|
/aosp12/packages/apps/Settings/src/com/android/settings/ |
H A D | MonitoringCertInfoActivity.java | 56 DevicePolicyManager dpm = getSystemService(DevicePolicyManager.class); in onCreate() local 73 if (dpm.getProfileOwnerAsUser(mUserId) != null) { in onCreate() 75 numberOfCertificates, dpm.getProfileOwnerNameAsUser(mUserId))); in onCreate() 76 } else if (dpm.getDeviceOwnerComponentOnCallingUser() != null) { in onCreate() 79 dpm.getDeviceOwnerNameOnAnyUser())); in onCreate()
|
/aosp12/packages/apps/Settings/src/com/android/settings/display/ |
H A D | ScreenTimeoutPreferenceController.java | 78 final DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in getMaxScreenTimeout() local 79 if (dpm != null) { in getMaxScreenTimeout() 80 return dpm.getMaximumTimeToLock(null /* admin */, UserHandle.myUserId()); in getMaxScreenTimeout() 93 final DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in getPreferenceDisablingAdmin() local 95 if (dpm != null) { in getPreferenceDisablingAdmin()
|
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
H A D | WifiConfigHelper.java | 252 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isNetworkLockedDown() local 258 if (pm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN) && dpm == null) { in isNetworkLockedDown() 263 if (dpm != null) { in isNetworkLockedDown() 264 final ComponentName deviceOwner = dpm.getDeviceOwnerComponentOnAnyUser(); in isNetworkLockedDown() 266 final int deviceOwnerUserId = dpm.getDeviceOwnerUserId(); in isNetworkLockedDown() 274 } else if (dpm.isOrganizationOwnedDeviceWithManagedProfile()) { in isNetworkLockedDown() 276 final ComponentName profileOwner = dpm.getProfileOwnerAsUser(profileOwnerUserId); in isNetworkLockedDown()
|
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/e2eui/ |
H A D | E2eUiTestUtils.java | 51 DevicePolicyManager dpm) { in verifyProfile() argument 52 dpm.setProfileEnabled(ManagedProfileAdminReceiver.COMPONENT_NAME); in verifyProfile() 53 final boolean isProfileOwner = dpm.isProfileOwnerApp(context.getPackageName()); in verifyProfile()
|
H A D | DpcPostProvisioningActivity.java | 27 DevicePolicyManager dpm = in onCreate() local 30 boolean testResult = E2eUiTestUtils.verifyProfile(this, getIntent(), dpm); in onCreate()
|
/aosp12/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/ |
H A D | UserInfoView.java | 92 DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); in setManagedStatus() local 93 if (dpm == null) return; in setManagedStatus() 95 UserHandle deviceOwner = dpm.getDeviceOwnerUser(); in setManagedStatus() 103 ComponentName profileOwner = dpm.getProfileOwnerAsUser(userId); in setManagedStatus()
|
/aosp12/packages/apps/Car/Settings/src/com/android/car/settings/applications/ |
H A D | ApplicationsUtils.java | 69 public static boolean isProfileOrDeviceOwner(String packageName, DevicePolicyManager dpm, in isProfileOrDeviceOwner() argument 71 if (dpm.isDeviceOwnerAppOnAnyUser(packageName)) { in isProfileOrDeviceOwner() 76 ComponentName cn = dpm.getProfileOwnerAsUser(userInfos.get(i).id); in isProfileOrDeviceOwner()
|
/aosp12/packages/apps/Settings/src/com/android/settings/security/ |
H A D | CryptKeeperSettings.java | 153 DevicePolicyManager dpm = (DevicePolicyManager) in onActivityCreated() local 155 if (dpm != null) { in onActivityCreated() 156 int status = dpm.getStorageEncryptionStatus(); in onActivityCreated() 219 DevicePolicyManager dpm = (DevicePolicyManager) in addEncryptionInfoToPreference() local 221 if (dpm.getDoNotAskCredentialsOnBoot()) { in addEncryptionInfoToPreference()
|
/aosp12/frameworks/base/packages/SettingsLib/RestrictedLockUtils/src/com/android/settingslib/ |
H A D | RestrictedLockUtils.java | 56 final DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService( in getProfileOrDeviceOwner() local 58 if (dpm == null) { in getProfileOrDeviceOwner() 74 if (Objects.equals(dpm.getDeviceOwnerUser(), user)) { in getProfileOrDeviceOwner() 75 adminComponent = dpm.getDeviceOwnerComponentOnAnyUser(); in getProfileOrDeviceOwner()
|
/aosp12/frameworks/base/cmds/dpm/ |
H A D | Android.bp | 22 name: "dpm", 23 src: "dpm",
|
/aosp12/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/ |
H A D | NetworkLoggingHandler.java | 119 NetworkLoggingHandler(Looper looper, DevicePolicyManagerService dpm, int targetUserId) { in NetworkLoggingHandler() argument 120 this(looper, dpm, 0 /* event id */, targetUserId); in NetworkLoggingHandler() 124 NetworkLoggingHandler(Looper looper, DevicePolicyManagerService dpm, long id, in NetworkLoggingHandler() argument 127 this.mDpm = dpm; in NetworkLoggingHandler()
|
/aosp12/packages/apps/Settings/src/com/android/settings/network/ |
H A D | ProxyPreferenceController.java | 48 final DevicePolicyManager dpm = (DevicePolicyManager) in displayPreference() local 50 pref.setEnabled(dpm.getGlobalProxyAdmin() == null); in displayPreference()
|