/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/ |
D | RestrictedLockUtilsInternal.java | 82 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in checkIfRestrictionEnforced() local 83 if (dpm == null) { in checkIfRestrictionEnforced() 144 final LockSettingCheck check = (dpm, admin, checkUser) -> { in checkIfKeyguardFeaturesDisabled() 145 int effectiveFeatures = dpm.getKeyguardDisabledFeatures(admin, checkUser); in checkIfKeyguardFeaturesDisabled() 152 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in checkIfKeyguardFeaturesDisabled() local 153 return findEnforcedAdmin(dpm.getActiveAdminsAsUser(userId), dpm, userId, check); in checkIfKeyguardFeaturesDisabled() 183 @NonNull DevicePolicyManager dpm, @UserIdInt int userId, in findEnforcedAdmin() argument 192 if (check.isEnforcing(dpm, admin, userId)) { in findEnforcedAdmin() 247 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in checkIfInputMethodDisallowed() local 248 if (dpm == null) { in checkIfInputMethodDisallowed() [all …]
|
D | RestrictedLockUtils.java | 47 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in getProfileOrDeviceOwner() local 48 if (dpm == null) { in getProfileOrDeviceOwner() 64 if (Objects.equals(dpm.getDeviceOwnerUser(), user)) { in getProfileOrDeviceOwner() 65 adminComponent = dpm.getDeviceOwnerComponentOnAnyUser(); in getProfileOrDeviceOwner()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/network/ |
D | WifiHelper.java | 46 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isNetworkLockedDown() local 52 if (pm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN) && dpm == null) { in isNetworkLockedDown() 57 if (dpm != null) { in isNetworkLockedDown() 58 final ComponentName deviceOwner = dpm.getDeviceOwnerComponentOnAnyUser(); in isNetworkLockedDown() 60 final int deviceOwnerUserId = dpm.getDeviceOwnerUserId(); in isNetworkLockedDown() 68 } else if (dpm.isOrganizationOwnedDeviceWithManagedProfile()) { in isNetworkLockedDown() 70 final ComponentName profileOwner = dpm.getProfileOwnerAsUser(profileOwnerUserId); in isNetworkLockedDown()
|
/packages/apps/Settings/src/com/android/settings/ |
D | MonitoringCertInfoActivity.java | 64 DevicePolicyManager dpm = getSystemService(DevicePolicyManager.class); in onCreate() local 81 if (dpm.getProfileOwnerAsUser(mUserId) != null) { in onCreate() 83 dpm.getResources().getString( in onCreate() 90 arguments.put("orgName", dpm.getProfileOwnerNameAsUser(mUserId)); in onCreate() 93 } else if (dpm.getDeviceOwnerComponentOnCallingUser() != null) { in onCreate() 95 dpm.getResources() in onCreate() 103 arguments.put("orgName", dpm.getDeviceOwnerNameOnAnyUser()); in onCreate()
|
D | MainClearConfirm.java | 162 final DevicePolicyManager dpm = (DevicePolicyManager) getActivity() in shouldWipePersistentDataBlock() local 166 if (!dpm.isFactoryResetProtectionPolicySupported()) { in shouldWipePersistentDataBlock() 172 FactoryResetProtectionPolicy frpPolicy = dpm.getFactoryResetProtectionPolicy(null); in shouldWipePersistentDataBlock() 173 if (dpm.isOrganizationOwnedDeviceWithManagedProfile() && frpPolicy != null in shouldWipePersistentDataBlock()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/ |
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()
|
/packages/apps/Settings/src/com/android/settings/accounts/ |
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()
|
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()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/ |
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()
|
/packages/apps/Settings/src/com/android/settings/biometrics/ |
D | ParentalControlsUtils.java | 60 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in parentConsentRequired() local 61 return parentConsentRequiredInternal(dpm, modality, userHandle); in parentConsentRequired() 71 @NonNull DevicePolicyManager dpm, @BiometricAuthenticator.Modality int modality, in parentConsentRequiredInternal() 73 if (ParentalControlsUtilsInternal.parentConsentRequired(dpm, modality, in parentConsentRequiredInternal() 76 ParentalControlsUtilsInternal.getSupervisionComponentName(dpm, userHandle); in parentConsentRequiredInternal()
|
/packages/services/Car/car-admin-ui-lib/src/main/java/com/android/car/admin/ui/ |
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()
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | WifiUtils.java | 103 final DevicePolicyManager dpm = in isNetworkLockedDown() local 110 if (pm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN) && dpm == null) { in isNetworkLockedDown() 115 if (dpm != null) { in isNetworkLockedDown() 116 final ComponentName deviceOwner = dpm.getDeviceOwnerComponentOnAnyUser(); in isNetworkLockedDown() 118 final int deviceOwnerUserId = dpm.getDeviceOwnerUserId(); in isNetworkLockedDown() 126 } else if (dpm.isOrganizationOwnedDeviceWithManagedProfile()) { in isNetworkLockedDown() 128 final ComponentName profileOwner = dpm.getProfileOwnerAsUser(profileOwnerUserId); in isNetworkLockedDown()
|
/packages/apps/Settings/src/com/android/settings/enterprise/ |
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()
|
/packages/apps/Settings/src/com/android/settings/display/ |
D | ScreenTimeoutPreferenceController.java | 82 final DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in getMaxScreenTimeout() local 83 if (dpm != null) { in getMaxScreenTimeout() 84 return dpm.getMaximumTimeToLock(null /* admin */, UserHandle.myUserId()); in getMaxScreenTimeout() 97 final DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in getPreferenceDisablingAdmin() local 99 if (dpm != null) { in getPreferenceDisablingAdmin()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/ |
D | UserInfoView.java | 112 DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); in setManagedStatus() local 113 if (dpm == null) return; in setManagedStatus() 115 UserHandle deviceOwner = dpm.getDeviceOwnerUser(); in setManagedStatus() 123 ComponentName profileOwner = dpm.getProfileOwnerAsUser(userId); in setManagedStatus()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/e2eui/ |
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()
|
D | DpcPostProvisioningActivity.java | 27 DevicePolicyManager dpm = in onCreate() local 30 boolean testResult = E2eUiTestUtils.verifyProfile(this, getIntent(), dpm); in onCreate()
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/ |
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()
|
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/ui/ |
D | ProfileDialogFragment.java | 120 final DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); in getUpdatedEnterpriseString() local 121 return dpm.getResources().getString(updatableStringId, () -> getString(defaultStringId)); in getUpdatedEnterpriseString() 126 final DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); in getUpdatedWorkProfileIcon() local 127 return dpm.getResources().getDrawable(WORK_PROFILE_ICON, OUTLINE, () -> in getUpdatedWorkProfileIcon()
|
/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/ |
D | EnterpriseUtils.java | 143 DevicePolicyManager dpm = getDevicePolicyManager(context); in isDeviceManaged() local 144 return dpm.isDeviceManaged(); in isDeviceManaged() 151 DevicePolicyManager dpm = getDevicePolicyManager(context); in hasDeviceOwner() local 152 return dpm.isDeviceManaged() && getDeviceOwner(context) != null; in hasDeviceOwner()
|
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/ |
D | WifiUtil.java | 177 final DevicePolicyManager dpm = in isNetworkLockedDown() local 183 if (pm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN) && dpm == null) { in isNetworkLockedDown() 188 if (dpm != null) { in isNetworkLockedDown() 189 final ComponentName deviceOwner = dpm.getDeviceOwnerComponentOnAnyUser(); in isNetworkLockedDown() 191 final int deviceOwnerUserId = dpm.getDeviceOwnerUserId(); in isNetworkLockedDown()
|
/packages/services/Telecomm/src/com/android/server/telecom/components/ |
D | UserCallIntentProcessor.java | 123 final DevicePolicyManager dpm = in processOutgoingCallIntent() local 125 if (dpm == null) { in processOutgoingCallIntent() 128 final Intent adminSupportIntent = dpm.createAdminSupportIntent( in processOutgoingCallIntent()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
D | RoleHolderProvider.java | 30 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); 31 String deviceManagerConfig = dpm.getDevicePolicyManagementRoleHolderPackage();
|
D | Utils.java | 321 DevicePolicyManager dpm = in isDeviceManaged() local 323 return dpm.isDeviceManaged(); in isDeviceManaged() 674 public boolean isPackageDeviceOwner(DevicePolicyManager dpm, String packageName) { in isPackageDeviceOwner() argument 675 final ComponentName deviceOwner = dpm.getDeviceOwnerComponentOnCallingUser(); in isPackageDeviceOwner() 760 public ComponentName getCurrentDeviceOwnerComponentName(DevicePolicyManager dpm) { in getCurrentDeviceOwnerComponentName() argument 762 ? dpm.getDeviceOwnerComponentOnAnyUser() in getCurrentDeviceOwnerComponentName() 763 : dpm.getDeviceOwnerComponentOnCallingUser(); in getCurrentDeviceOwnerComponentName()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/util/ |
D | DevicePolicyUtils.java | 30 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isBluetoothWorkContactSharingDisabled() local 39 return dpm.getBluetoothContactSharingDisabled(uh); in isBluetoothWorkContactSharingDisabled()
|