Home
last modified time | relevance | path

Searched refs:dpm (Results 1 – 25 of 90) sorted by relevance

1234

/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/
DRestrictedLockUtilsInternal.java82 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 …]
DRestrictedLockUtils.java47 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/
DWifiHelper.java46 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/
DMonitoringCertInfoActivity.java64 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()
DMainClearConfirm.java162 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/
DApplicationsUtilsTest.java83 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/
DAccountRestrictionHelper.java73 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()
DCrossProfileCalendarPreferenceController.java82 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/
DCrossProfileCalendarPreferenceControllerTest.java70 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/
DParentalControlsUtils.java60 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/
DManagedDeviceTextView.java65 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/
DWifiUtils.java103 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/
DPrivacySettingsPreferenceFactory.java50 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/
DScreenTimeoutPreferenceController.java82 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/
DUserInfoView.java112 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/
DE2eUiTestUtils.java51 DevicePolicyManager dpm) { in verifyProfile() argument
52 dpm.setProfileEnabled(ManagedProfileAdminReceiver.COMPONENT_NAME); in verifyProfile()
53 final boolean isProfileOwner = dpm.isProfileOwnerApp(context.getPackageName()); in verifyProfile()
DDpcPostProvisioningActivity.java27 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/
DApplicationsUtils.java69 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/
DProfileDialogFragment.java120 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/
DEnterpriseUtils.java143 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/
DWifiUtil.java177 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/
DUserCallIntentProcessor.java123 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/
DRoleHolderProvider.java30 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class);
31 String deviceManagerConfig = dpm.getDevicePolicyManagementRoleHolderPackage();
DUtils.java321 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/
DDevicePolicyUtils.java30 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isBluetoothWorkContactSharingDisabled() local
39 return dpm.getBluetoothContactSharingDisabled(uh); in isBluetoothWorkContactSharingDisabled()

1234