Home
last modified time | relevance | path

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

12

/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerTest.java213 public DevicePolicyManager dpm; field in DevicePolicyManagerTest
336 dpm = new DevicePolicyManagerTestable(mContext, dpms); in initializeDpms()
401 runAsCaller(mServiceContext, dpms, dpm -> { in setAsProfileOwner()
403 dpm.setActiveAdmin(admin, /*replace=*/ false); in setAsProfileOwner()
405 assertThat(dpm.setProfileOwner(admin, "owner-name", CALLER_USER_HANDLE)).isTrue(); in setAsProfileOwner()
407 assertThat(dpm.getProfileOwnerAsUser(CALLER_USER_HANDLE)).isEqualTo(admin); in setAsProfileOwner()
437 dpm.setActiveAdmin(adminAnotherPackage, /* replace =*/ false, CALLER_USER_HANDLE); in testLoadAdminData()
438 assertThat(dpm.isAdminActiveAsUser(adminAnotherPackage, CALLER_USER_HANDLE)).isTrue(); in testLoadAdminData()
479 () -> dpm.setActiveAdmin(admin1, false)); in testSetActiveAdmin_SecurityException()
485 () -> dpm.setActiveAdmin(admin1, false, CALLER_USER_HANDLE + 1)); in testSetActiveAdmin_SecurityException()
[all …]
DDevicePolicyManagerServiceMigrationTest.java174 runAsCaller(poContext, dpms, dpm -> { in testCompMigrationAffiliated()
176 .that(dpm.getParentProfileInstance(admin1).getPasswordHistoryLength(admin1)) in testCompMigrationAffiliated()
179 .that(dpm.getPasswordHistoryLength(admin1)).isEqualTo(0); in testCompMigrationAffiliated()
181 .that(dpm.getParentProfileInstance(admin1).getScreenCaptureDisabled(admin1)) in testCompMigrationAffiliated()
185 .that(dpm.getParentProfileInstance(admin1) in testCompMigrationAffiliated()
190 .that(dpm.getAccountTypesWithManagementDisabled()).asList() in testCompMigrationAffiliated()
194 .that(dpm.getParentProfileInstance(admin1).getUserRestrictions(admin1).keySet()) in testCompMigrationAffiliated()
198 dpm.getUserRestrictions(admin1).keySet()) in testCompMigrationAffiliated()
210 .that(dpm.getPersonalAppsSuspendedReasons(admin1)) in testCompMigrationAffiliated()
241 runAsCaller(poContext, dpms, dpm -> { in testCompMigration_keepSuspendedAppsWhenDpcIsRPlus()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DRestrictedLockUtilsInternal.java94 final DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService( in checkIfRestrictionEnforced() local
96 if (dpm == null) { in checkIfRestrictionEnforced()
171 final LockSettingCheck check = (dpm, admin, checkUser) -> { in checkIfKeyguardFeaturesDisabled()
172 int effectiveFeatures = dpm.getKeyguardDisabledFeatures(admin, checkUser); in checkIfKeyguardFeaturesDisabled()
179 DevicePolicyManager dpm = in checkIfKeyguardFeaturesDisabled() local
181 return findEnforcedAdmin(dpm.getActiveAdminsAsUser(userId), dpm, userId, check); in checkIfKeyguardFeaturesDisabled()
212 @NonNull DevicePolicyManager dpm, @UserIdInt int userId, in findEnforcedAdmin() argument
221 if (check.isEnforcing(dpm, admin, userId)) { in findEnforcedAdmin()
276 DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService( in checkIfInputMethodDisallowed() local
278 if (dpm == null) { in checkIfInputMethodDisallowed()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/enterprise/
DActionDisabledByAdminControllerFactory.java66 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()
DActionDisabledLearnMoreButtonLauncher.java112 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in isEnforcedByDeviceOwnerOnSystemUserMode() local
113 return enforcementAdminUserId == dpm.getDeviceOwnerUserId(); in isEnforcedByDeviceOwnerOnSystemUserMode()
/frameworks/base/core/java/android/hardware/biometrics/
DParentalControlsUtilsInternal.java59 @NonNull DevicePolicyManager dpm, @BiometricAuthenticator.Modality int modality, in parentConsentRequired() argument
65 return parentConsentRequired(dpm, modality, userHandle); in parentConsentRequired()
71 public static boolean parentConsentRequired(@NonNull DevicePolicyManager dpm, in parentConsentRequired() argument
73 final ComponentName cn = getSupervisionComponentName(dpm, userHandle); in parentConsentRequired()
78 final int keyguardDisabledFeatures = dpm.getKeyguardDisabledFeatures(cn); in parentConsentRequired()
101 public static ComponentName getSupervisionComponentName(@NonNull DevicePolicyManager dpm, in getSupervisionComponentName() argument
103 return dpm.getProfileOwnerOrDeviceOwnerSupervisionComponent(userHandle); in getSupervisionComponentName()
/frameworks/base/cmds/dpm/
DAndroid.bp22 name: "dpm",
23 src: "dpm",
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawable/
DUserIconDrawable.java101 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in getUpdatableManagedUserDrawable() local
102 return dpm.getResources().getDrawableForDensity( in getUpdatableManagedUserDrawable()
204 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in setBadgeIfManagedUser() local
206 dpm.getProfileOwnerAsUser(userId) != null // has an owner in setBadgeIfManagedUser()
207 && dpm.getProfileOwnerOrDeviceOwnerSupervisionComponent(UserHandle.of(userId)) in setBadgeIfManagedUser()
220 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in setBadgeIfManagedDevice() local
222 boolean deviceOwnerExists = dpm.getDeviceOwnerComponentOnAnyUser() != null; in setBadgeIfManagedDevice()
240 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in getUpdatableManagementBadge() local
241 return dpm.getResources().getDrawableForDensity( in getUpdatableManagementBadge()
/frameworks/base/packages/SettingsLib/RestrictedLockUtils/src/com/android/settingslib/
DRestrictedLockUtils.java56 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()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DNetworkLoggingHandler.java119 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()
DNetworkLogger.java106 NetworkLogger(DevicePolicyManagerService dpm, PackageManagerInternal pm, int targetUserId) { in NetworkLogger() argument
107 mDpm = dpm; in NetworkLogger()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/
DScreenshotNotificationsController.java79 final DevicePolicyManager dpm = in notifyScreenshotError() local
82 dpm.createAdminSupportIntent(DevicePolicyManager.POLICY_DISABLE_SCREEN_CAPTURE); in notifyScreenshotError()
/frameworks/base/core/java/android/provider/
DContactsInternal.java121 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in maybeStartManagedQuickContact()
129 dpm.startManagedQuickContact(actualLookupKey, actualContactId, isContactIdIgnored, in maybeStartManagedQuickContact()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DWorkModeTile.java111 DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in getTileLabel() local
112 return dpm.getResources().getString(QS_WORK_PROFILE_LABEL, in getTileLabel()
/frameworks/base/services/core/java/com/android/server/os/
DBugreportManagerServiceImpl.java206 DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in isCurrentUserAffiliated() local
207 int deviceOwnerUid = dpm.getDeviceOwnerUserId(); in isCurrentUserAffiliated()
220 if (!dpm.isAffiliatedUser(currentUserId)) { in isCurrentUserAffiliated()
/frameworks/base/services/core/java/com/android/server/
DHardwarePropertiesManagerService.java166 final DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in enforceHardwarePropertiesRetrievalAllowed() local
167 if (!dpm.isDeviceOwnerApp(callingPackage) in enforceHardwarePropertiesRetrievalAllowed()
DMasterClearReceiver.java171 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in getWorkProfileDeletedTitle() local
172 return dpm.getResources().getString(WORK_PROFILE_DELETED_TITLE, in getWorkProfileDeletedTitle()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DAccessibilitySecurityPolicy.java457 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in checkIfInputMethodDisallowed() local
458 if (dpm == null) { in checkIfInputMethodDisallowed()
465 permitted = dpm.isInputMethodPermittedByAdmin(admin.component, in checkIfInputMethodDisallowed()
479 if (profileAdmin != null && dpm.isOrganizationOwnedDeviceWithManagedProfile()) { in checkIfInputMethodDisallowed()
480 DevicePolicyManager parentDpm = dpm.getParentProfileInstance( in checkIfInputMethodDisallowed()
/frameworks/base/services/core/java/com/android/server/trust/
DTrustAgentWrapper.java613 DevicePolicyManager dpm = in updateDevicePolicyFeatures() local
616 if ((dpm.getKeyguardDisabledFeatures(null, mUserId) in updateDevicePolicyFeatures()
618 List<PersistableBundle> config = dpm.getTrustAgentConfiguration( in updateDevicePolicyFeatures()
633 final long maxTimeToLock = dpm.getMaximumTimeToLock(null, mUserId); in updateDevicePolicyFeatures()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DUninstallFinish.java97 IDevicePolicyManager dpm = IDevicePolicyManager.Stub.asInterface( in onReceive() local
110 if (dpm.packageHasActiveAdmins(appInfo.packageName, user.id)) { in onReceive()
/frameworks/base/core/java/com/android/internal/notification/
DSystemNotificationChannels.java232 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in getDeviceAdminNotificationChannelName() local
233 return dpm.getResources().getString(NOTIFICATION_CHANNEL_DEVICE_ADMIN, in getDeviceAdminNotificationChannelName()
/frameworks/base/core/java/android/content/pm/
DCrossProfileApps.java328 final DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in getProfileSwitchingLabel() local
329 return dpm.getResources().getString( in getProfileSwitchingLabel()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/television/
DUninstallAppProgress.java153 IDevicePolicyManager dpm = IDevicePolicyManager.Stub.asInterface( in handleMessage() local
164 if (dpm.packageHasActiveAdmins(packageName, user.id)) { in handleMessage()
/frameworks/base/services/tests/PackageManagerServiceTests/server/
DAndroid.bp52 "servicestests-dpm-utils",
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardSecurityContainerController.java980 final DevicePolicyManager dpm = mLockPatternUtils.getDevicePolicyManager(); in reportFailedUnlockAttempt() local
982 dpm.getMaximumFailedPasswordsForWipe(null, userId); in reportFailedUnlockAttempt()
992 final int expiringUser = dpm.getProfileWithMinimumFailedPasswordsForWipe(userId); in reportFailedUnlockAttempt()

12