/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
H A D | RestrictedLockUtilsTest.java | 62 private DevicePolicyManager mDevicePolicyManager; field in RestrictedLockUtilsTest 80 .thenReturn(mDevicePolicyManager); in setUp() 158 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_oneEnforcedAdminForManagedProfile() 171 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_multipleEnforcedAdminForManagedProfile() 173 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mUserId)) in checkIfKeyguardFeaturesDisabled_multipleEnforcedAdminForManagedProfile() 188 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 190 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mProfileId)) in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 216 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() 218 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mProfileId)) in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() 239 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile() [all …]
|
H A D | RestrictedPreferenceHelperTest.java | 51 private DevicePolicyManager mDevicePolicyManager; field in RestrictedPreferenceHelperTest 63 doReturn(mDevicePolicyResourcesManager).when(mDevicePolicyManager) in setUp() 65 doReturn(mDevicePolicyManager).when(mContext) in setUp()
|
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/core/ |
H A D | AbstractPreferenceController.java | 42 private final DevicePolicyManager mDevicePolicyManager; field in AbstractPreferenceController 46 mDevicePolicyManager = in AbstractPreferenceController() 144 if (!BuildCompat.isAtLeastT() || mDevicePolicyManager == null) { in replaceEnterpriseStringTitle() 155 mDevicePolicyManager.getResources().getString(overrideKey, in replaceEnterpriseStringTitle() 162 if (!BuildCompat.isAtLeastT() || mDevicePolicyManager == null) { in replaceEnterpriseStringSummary() 173 mDevicePolicyManager.getResources().getString(overrideKey, in replaceEnterpriseStringSummary()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
H A D | SecurityControllerImpl.java | 90 private final DevicePolicyManager mDevicePolicyManager; field in SecurityControllerImpl 129 mDevicePolicyManager = (DevicePolicyManager) in SecurityControllerImpl() 169 return mDevicePolicyManager.isDeviceManaged(); in isDeviceManaged() 174 return mDevicePolicyManager.getDeviceOwnerNameOnAnyUser(); in getDeviceOwnerName() 195 return mDevicePolicyManager.getDeviceOwnerOrganizationName(); in getDeviceOwnerOrganizationName() 202 return mDevicePolicyManager.getOrganizationNameForUser(profileId); in getWorkProfileOrganizationName() 254 return mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); in getDeviceOwnerComponentOnAnyUser() 261 return mDevicePolicyManager.getDeviceOwnerType(admin); in getDeviceOwnerType() 266 return mDevicePolicyManager.isFinancedDevice(); in isFinancedDevice() 271 return mDevicePolicyManager.isNetworkLoggingEnabled(null); in isNetworkLoggingEnabled() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
H A D | SecurityControllerTest.java | 73 private final DevicePolicyManager mDevicePolicyManager = mock(DevicePolicyManager.class); field in SecurityControllerTest 87 mContext.addMockSystemService(Context.DEVICE_POLICY_SERVICE, mDevicePolicyManager); in setUp() 130 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in testIsDeviceManaged() 133 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in testIsDeviceManaged() 139 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn("organization"); in testGetDeviceOwnerOrganizationName() 145 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testGetDeviceOwnerComponentOnAnyUser() 153 when(mDevicePolicyManager.isFinancedDevice()).thenReturn(true); in testIsFinancedDevice() 155 when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) in testIsFinancedDevice()
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/ |
H A D | EnableAdbPreferenceControllerTest.java | 62 private DevicePolicyManager mDevicePolicyManager; field in EnableAdbPreferenceControllerTest 75 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setUp() 142 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_settingsOn_shouldCheck() 143 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in updateState_settingsOn_shouldCheck() 158 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_settingsOff_shouldUncheck() 159 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in updateState_settingsOff_shouldUncheck()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/appclips/ |
H A D | AppClipsServiceTest.java | 65 @Mock private DevicePolicyManager mDevicePolicyManager; field in AppClipsServiceTest 194 when(mDevicePolicyManager.getScreenCaptureDisabled(eq(null))).thenReturn(true); in mockForScreenshotBlocked() 203 when(mDevicePolicyManager.getScreenCaptureDisabled(eq(null))).thenReturn(false); in mockForInvalidConfigComponentName() 212 when(mDevicePolicyManager.getScreenCaptureDisabled(eq(null))).thenReturn(false); in mockToSatisfyAllPrerequisites() 217 mOptionalBubbles, mDevicePolicyManager); in getInterfaceWithRealContext() 223 mOptionalBubbles, mDevicePolicyManager); in getInterfaceWithMockContext()
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/ |
H A D | PreAuthInfoTest.java | 66 DevicePolicyManager mDevicePolicyManager; field in PreAuthInfoTest 75 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(), anyInt())) in setup() 106 PreAuthInfo preAuthInfo = PreAuthInfo.create(mTrustManager, mDevicePolicyManager, in testFaceAuthentication_whenCameraPrivacyIsEnabled() 133 PreAuthInfo preAuthInfo = PreAuthInfo.create(mTrustManager, mDevicePolicyManager, in testFaceAuthentication_whenCameraPrivacyIsDisabledAndCameraIsAvailable() 160 PreAuthInfo preAuthInfo = PreAuthInfo.create(mTrustManager, mDevicePolicyManager, in testFaceAuthentication_whenCameraIsUnavailable()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ |
H A D | KeyguardIndicationControllerBaseTest.java | 106 protected DevicePolicyManager mDevicePolicyManager; field in KeyguardIndicationControllerBaseTest 196 mContext.addMockSystemService(Context.DEVICE_POLICY_SERVICE, mDevicePolicyManager); in setUp() 214 when(mDevicePolicyManager.getResources()).thenReturn(mDevicePolicyResourcesManager); in setUp() 215 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in setUp() 217 when(mDevicePolicyManager.isFinancedDevice()).thenReturn(false); in setUp() 219 when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) in setUp() 258 mDockManager, mBroadcastDispatcher, mDevicePolicyManager, mIBatteryStats, in createController()
|
H A D | KeyguardIndicationControllerTest.java | 195 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in disclosure_unmanaged() 209 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in disclosure_deviceOwner_noOrganizationName() 210 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null); in disclosure_deviceOwner_noOrganizationName() 238 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in disclosure_deviceOwner_withOrganizationName() 264 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in disclosure_updateOnTheFly() 268 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in disclosure_updateOnTheFly() 276 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in disclosure_updateOnTheFly() 284 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in disclosure_updateOnTheFly() 296 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in disclosure_deviceOwner_financedDeviceWithOrganizationName() 298 when(mDevicePolicyManager.isFinancedDevice()).thenReturn(true); in disclosure_deviceOwner_financedDeviceWithOrganizationName() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/appclips/ |
H A D | AppClipsService.java | 64 private final DevicePolicyManager mDevicePolicyManager; field in AppClipsService 73 mDevicePolicyManager = devicePolicyManager; in AppClipsService() 125 return mDevicePolicyManager.getScreenCaptureDisabled(null) in onBind()
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
H A D | MockLockSettingsContext.java | 44 private final DevicePolicyManager mDevicePolicyManager; field in MockLockSettingsContext 63 mDevicePolicyManager = devicePolicyManager; in MockLockSettingsContext() 89 return mDevicePolicyManager; in getSystemService()
|
H A D | BaseLockSettingsServiceTests.java | 103 DevicePolicyManager mDevicePolicyManager; field in BaseLockSettingsServiceTests 129 mDevicePolicyManager = mock(DevicePolicyManager.class); in setUp_baseServices() 150 mDevicePolicyManager, mock(StorageManager.class), mock(TrustManager.class), in setUp_baseServices() 232 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn( in setUp_baseServices()
|
/aosp14/frameworks/base/packages/SettingsLib/Utils/src/com/android/settingslib/utils/ |
H A D | WorkPolicyUtils.java | 43 private final DevicePolicyManager mDevicePolicyManager; field in WorkPolicyUtils 53 mDevicePolicyManager = in WorkPolicyUtils() 163 return mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); in getDeviceOwnerComponent()
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/enterprise/ |
H A D | ActionDisabledLearnMoreButtonLauncherTest.java | 66 private DevicePolicyManager mDevicePolicyManager; field in ActionDisabledLearnMoreButtonLauncherTest 84 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setUp() 217 when(mDevicePolicyManager.getDeviceOwnerUserId()).thenReturn(ENFORCEMENT_ADMIN_USER_ID + 1); in mockEnforcementAdminIsNotDeviceOwner() 221 when(mDevicePolicyManager.getDeviceOwnerUserId()).thenReturn(userId); in mockDeviceOwner()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | KeyguardIndicationController.java | 163 private final DevicePolicyManager mDevicePolicyManager; field in KeyguardIndicationController 283 mDevicePolicyManager = devicePolicyManager; in KeyguardIndicationController() 492 isFinanced = mDevicePolicyManager.isFinancedDevice(); in getDisclosureText() 494 isFinanced = mDevicePolicyManager.isDeviceManaged() in getDisclosureText() 495 && mDevicePolicyManager.getDeviceOwnerType( in getDisclosureText() 501 return mDevicePolicyManager.getResources().getString( in getDisclosureText() 508 return mDevicePolicyManager.getResources().getString( in getDisclosureText() 712 mDevicePolicyManager.logoutUser(); in updateLockScreenLogoutView() 722 return mDevicePolicyManager.isDeviceManaged() in isOrganizationOwnedDevice() 728 if (mDevicePolicyManager.isDeviceManaged()) { in getOrganizationOwnedDeviceOrganizationName() [all …]
|
H A D | NotificationLockscreenUserManagerImpl.java | 93 private final DevicePolicyManager mDevicePolicyManager; field in NotificationLockscreenUserManagerImpl 246 mDevicePolicyManager = devicePolicyManager; in NotificationLockscreenUserManagerImpl() 369 final int dpmFlags = mDevicePolicyManager.getKeyguardDisabledFeatures( in updateLockscreenNotificationSetting() 432 mDevicePolicyManager.getKeyguardDisabledFeatures(null /* admin */, userHandle); in adminAllowsKeyguardFeature()
|
/aosp14/frameworks/base/core/tests/coretests/src/android/content/pm/ |
H A D | CrossProfileAppsTest.java | 71 private DevicePolicyManager mDevicePolicyManager; field in CrossProfileAppsTest 103 mDevicePolicyManager); in mockContext() 104 when(mDevicePolicyManager.getResources()).thenReturn(mDevicePolicyResourcesManager); in mockContext()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ |
H A D | TakeScreenshotService.java | 69 private final DevicePolicyManager mDevicePolicyManager; field in TakeScreenshotService 113 mDevicePolicyManager = devicePolicyManager; in TakeScreenshotService() 205 if (mDevicePolicyManager.getScreenCaptureDisabled(null, UserHandle.USER_ALL)) { in handleRequest() 210 String blockedByAdminText = mDevicePolicyManager.getResources().getString( in handleRequest()
|
/aosp14/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
H A D | ActivityStartInterceptorTest.java | 118 private DevicePolicyManagerInternal mDevicePolicyManager; field in ActivityStartInterceptorTest 154 mDevicePolicyManager); in setUp() 155 when(mDevicePolicyManager.createShowAdminSupportIntent(TEST_USER_ID, true)) in setUp() 257 when(mDevicePolicyManager.isKeepProfilesRunningEnabled()).thenReturn(true); in testInterceptQuietProfile_keepProfilesRunningEnabled() 268 when(mDevicePolicyManager.isKeepProfilesRunningEnabled()).thenReturn(false); in testInterceptQuietProfile_keepProfilesRunningDisabled() 284 when(mDevicePolicyManager.isKeepProfilesRunningEnabled()).thenReturn(true); in testInterceptQuietProfileWhenPackageSuspended_keepProfilesRunningEnabled() 300 when(mDevicePolicyManager.isKeepProfilesRunningEnabled()).thenReturn(false); in testInterceptQuietProfileWhenPackageSuspended_keepProfilesRunningDisabled()
|
H A D | LockTaskControllerTest.java | 119 @Mock private IDevicePolicyManager mDevicePolicyManager; field in LockTaskControllerTest 153 mLockTaskController.mDevicePolicyManager = mDevicePolicyManager; in setUp() 805 verify(mDevicePolicyManager).notifyLockTaskModeChanged(eq(true), eq(TEST_PACKAGE_NAME), in verifyLockTaskStarted() 818 verify(mDevicePolicyManager, mode).notifyLockTaskModeChanged(eq(false), isNull(), in verifyLockTaskStopped()
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/ |
H A D | PowerAllowlistBackendTest.java | 60 private DevicePolicyManager mDevicePolicyManager; field in PowerAllowlistBackendTest 79 doReturn(mDevicePolicyManager).when(mContext).getSystemService(DevicePolicyManager.class); in setUp() 148 doReturn(true).when(mDevicePolicyManager).packageHasActiveAdmins(PACKAGE_ONE); in isAllowlisted_shouldAllowlistActiveDeviceAdminApp()
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/pm/permission/ |
H A D | LegacyPermissionManagerServiceTest.java | 67 private DevicePolicyManager mDevicePolicyManager; field in LegacyPermissionManagerServiceTest 162 when(mDevicePolicyManager.hasDeviceIdentifierAccess(mPackageName, APP_PID, in checkDeviceIdentifierAccess_hasDpmAccess_returnsGranted() 398 when(mDevicePolicyManager.hasDeviceIdentifierAccess(anyString(), anyInt(), in setupCheckDeviceIdentifierAccessTest() 401 mDevicePolicyManager); in setupCheckDeviceIdentifierAccessTest()
|
/aosp14/frameworks/base/services/core/java/com/android/server/wm/ |
H A D | LockTaskController.java | 153 IDevicePolicyManager mDevicePolicyManager; field in LockTaskController 1051 if (mDevicePolicyManager == null) { in getDevicePolicyManager() 1052 mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface( in getDevicePolicyManager() 1054 if (mDevicePolicyManager == null) { in getDevicePolicyManager() 1058 return mDevicePolicyManager; in getDevicePolicyManager()
|
/aosp14/frameworks/base/core/java/com/android/internal/widget/ |
H A D | LockPatternUtils.java | 230 private DevicePolicyManager mDevicePolicyManager; field in LockPatternUtils 292 if (mDevicePolicyManager == null) { in getDevicePolicyManager() 293 mDevicePolicyManager = in getDevicePolicyManager() 295 if (mDevicePolicyManager == null) { in getDevicePolicyManager() 300 return mDevicePolicyManager; in getDevicePolicyManager()
|