Home
last modified time | relevance | path

Searched refs:mDevicePolicyManager (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/base/cmds/dpm/src/com/android/commands/dpm/
DDpm.java54 private IDevicePolicyManager mDevicePolicyManager; field in Dpm
102 mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface( in onRun()
104 if (mDevicePolicyManager == null) { in onRun()
142 final long toWait = mDevicePolicyManager.forceNetworkLogs(); in runForceNetworkLogs()
154 final long toWait = mDevicePolicyManager.forceSecurityLogs(); in runForceSecurityLogs()
193 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId); in runSetActiveAdmin()
200 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId); in runSetDeviceOwner()
203 if (!mDevicePolicyManager.setDeviceOwner(mComponent, mName, mUserId)) { in runSetDeviceOwner()
209 mDevicePolicyManager.removeActiveAdmin(mComponent, UserHandle.USER_SYSTEM); in runSetDeviceOwner()
213 mDevicePolicyManager.setUserProvisioningState( in runSetDeviceOwner()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DKeyguardIndicationControllerTest.java96 private DevicePolicyManager mDevicePolicyManager; field in KeyguardIndicationControllerTest
134 mContext.addMockSystemService(Context.DEVICE_POLICY_SERVICE, mDevicePolicyManager); in setUp()
162 mDockManager, mBroadcastDispatcher, mDevicePolicyManager, mIBatteryStats, in createController()
250 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in disclosure_unmanaged()
251 when(mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile()).thenReturn(false); in disclosure_unmanaged()
260 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in disclosure_deviceOwner_noOwnerName()
261 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null); in disclosure_deviceOwner_noOwnerName()
271 when(mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile()).thenReturn(true); in disclosure_orgOwnedDeviceWithManagedProfile_noOwnerName()
274 when(mDevicePolicyManager.getOrganizationNameForUser(eq(10))).thenReturn(null); in disclosure_orgOwnedDeviceWithManagedProfile_noOwnerName()
284 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in disclosure_hiddenWhenDozing()
[all …]
DNotificationLockscreenUserManagerTest.java86 private DevicePolicyManager mDevicePolicyManager; field in NotificationLockscreenUserManagerTest
398 super(context, mBroadcastDispatcher, mDevicePolicyManager, mUserManager, in TestNotificationLockscreenUserManager()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java62 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 …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSecurityControllerImpl.java84 private final DevicePolicyManager mDevicePolicyManager; field in SecurityControllerImpl
111 mDevicePolicyManager = (DevicePolicyManager) in SecurityControllerImpl()
149 return mDevicePolicyManager.isDeviceManaged(); in isDeviceManaged()
154 return mDevicePolicyManager.getDeviceOwnerNameOnAnyUser(); in getDeviceOwnerName()
159 return mDevicePolicyManager.getProfileOwnerAsUser(mCurrentUserId) != null; in hasProfileOwner()
165 String name = mDevicePolicyManager.getProfileOwnerNameAsUser(profileId); in getProfileOwnerName()
175 return mDevicePolicyManager.getDeviceOwnerOrganizationName(); in getDeviceOwnerOrganizationName()
182 return mDevicePolicyManager.getOrganizationNameForUser(profileId); in getWorkProfileOrganizationName()
211 return mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile(); in isProfileOwnerOfOrganizationOwnedDevice()
227 return mDevicePolicyManager.isNetworkLoggingEnabled(null); in isNetworkLoggingEnabled()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DMockLockSettingsContext.java35 private DevicePolicyManager mDevicePolicyManager; field in MockLockSettingsContext
51 mDevicePolicyManager = devicePolicyManager; in MockLockSettingsContext()
67 return mDevicePolicyManager; in getSystemService()
DBaseLockSettingsServiceTests.java98 DevicePolicyManager mDevicePolicyManager; field in BaseLockSettingsServiceTests
121 mDevicePolicyManager = mock(DevicePolicyManager.class); in setUp_baseServices()
141 mNotificationManager, mDevicePolicyManager, mock(StorageManager.class), in setUp_baseServices()
186 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn( in setUp_baseServices()
DSyntheticPasswordTests.java240 reset(mDevicePolicyManager); in testTokenBasedResetPassword()
259 verify(mDevicePolicyManager).reportPasswordChanged(PRIMARY_USER_ID); in testTokenBasedResetPassword()
503 reset(mDevicePolicyManager); in testUnlockUserWithToken()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DSecurityControllerTest.java65 private final DevicePolicyManager mDevicePolicyManager = mock(DevicePolicyManager.class); field in SecurityControllerTest
77 mContext.addMockSystemService(Context.DEVICE_POLICY_SERVICE, mDevicePolicyManager); in setUp()
116 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in testIsDeviceManaged()
119 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in testIsDeviceManaged()
125 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn("organization"); in testGetDeviceOwnerOrganizationName()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/permission/
DPermissionManagerServiceTest.java65 private DevicePolicyManager mDevicePolicyManager; field in PermissionManagerServiceTest
169 when(mDevicePolicyManager.hasDeviceIdentifierAccess(mContext.getPackageName(), APP_PID, in checkDeviceIdentifierAccess_hasDpmAccess_returnsGranted()
192 when(mDevicePolicyManager.hasDeviceIdentifierAccess(anyString(), anyInt(), in setupCheckDeviceIdentifierAccessTest()
195 mDevicePolicyManager); in setupCheckDeviceIdentifierAccessTest()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/
DWorkLockActivityTest.java58 private @Mock DevicePolicyManager mDevicePolicyManager; field in WorkLockActivityTest
77 .thenReturn(mDevicePolicyManager); in setUp()
90 when(mDevicePolicyManager.getOrganizationColorForUser(eq(USER_ID))).thenReturn(orgColor); in testBackgroundAlwaysOpaque()
DKeyguardViewMediatorTest.java64 private @Mock DevicePolicyManager mDevicePolicyManager; field in KeyguardViewMediatorTest
84 when(mLockPatternUtils.getDevicePolicyManager()).thenReturn(mDevicePolicyManager); in setUp()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DKeyguardIndicationController.java103 private final DevicePolicyManager mDevicePolicyManager; field in KeyguardIndicationController
155 mDevicePolicyManager = devicePolicyManager; in KeyguardIndicationController()
251 return mDevicePolicyManager.isDeviceManaged() in isOrganizationOwnedDevice()
252 || mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile(); in isOrganizationOwnedDevice()
257 if (mDevicePolicyManager.isDeviceManaged()) { in getOrganizationOwnedDeviceOrganizationName()
258 return mDevicePolicyManager.getDeviceOwnerOrganizationName(); in getOrganizationOwnedDeviceOrganizationName()
259 } else if (mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile()) { in getOrganizationOwnedDeviceOrganizationName()
270 return mDevicePolicyManager.getOrganizationNameForUser(profileId); in getWorkProfileOrganizationName()
DNotificationLockscreenUserManagerImpl.java87 private final DevicePolicyManager mDevicePolicyManager; field in NotificationLockscreenUserManagerImpl
208 mDevicePolicyManager = devicePolicyManager; in NotificationLockscreenUserManagerImpl()
378 final int dpmFlags = mDevicePolicyManager.getKeyguardDisabledFeatures( in updateLockscreenNotificationSetting()
442 mDevicePolicyManager.getKeyguardDisabledFeatures(null /* admin */, userHandle); in adminAllowsKeyguardFeature()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DWifiPermissionsUtilTest.java86 @Mock private DevicePolicyManager mDevicePolicyManager; field in WifiPermissionsUtilTest
868 .thenReturn(mDevicePolicyManager); in testIsDeviceOwnerApp()
870 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerApp()
872 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerApp()
879 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerApp()
881 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerApp()
887 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerApp()
889 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerApp()
895 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerApp()
920 .thenReturn(mDevicePolicyManager); in testIsProfileOwnerApp()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/
DPowerWhitelistBackendTest.java58 private DevicePolicyManager mDevicePolicyManager; field in PowerWhitelistBackendTest
75 doReturn(mDevicePolicyManager).when(mContext).getSystemService(DevicePolicyManager.class); in setUp()
139 doReturn(true).when(mDevicePolicyManager).packageHasActiveAdmins(PACKAGE_ONE); in isWhitelisted_shouldWhitelistActiveDeviceAdminApp()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DActivityStartInterceptorTest.java100 private DevicePolicyManagerInternal mDevicePolicyManager; field in ActivityStartInterceptorTest
133 mDevicePolicyManager); in setUp()
134 when(mDevicePolicyManager.createShowAdminSupportIntent(TEST_USER_ID, true)) in setUp()
DLockTaskControllerTest.java113 @Mock private IDevicePolicyManager mDevicePolicyManager; field in LockTaskControllerTest
146 mLockTaskController.mDevicePolicyManager = mDevicePolicyManager; in setUp()
785 verify(mDevicePolicyManager).notifyLockTaskModeChanged(eq(true), eq(TEST_PACKAGE_NAME), in verifyLockTaskStarted()
798 verify(mDevicePolicyManager, mode).notifyLockTaskModeChanged(eq(false), isNull(), in verifyLockTaskStopped()
/frameworks/base/services/core/java/com/android/server/wm/
DLockTaskController.java140 IDevicePolicyManager mDevicePolicyManager; field in LockTaskController
896 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
897 mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface( in getDevicePolicyManager()
899 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
903 return mDevicePolicyManager; in getDevicePolicyManager()
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
DAuthCredentialView.java73 private final DevicePolicyManager mDevicePolicyManager; field in AuthCredentialView
149 mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class); in AuthCredentialView()
390 mDevicePolicyManager.getProfileWithMinimumFailedPasswordsForWipe(mEffectiveUserId)); in getUserTypeForWipe()
/frameworks/base/core/java/com/android/internal/widget/
DLockPatternUtils.java181 private DevicePolicyManager mDevicePolicyManager; field in LockPatternUtils
241 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
242 mDevicePolicyManager = in getDevicePolicyManager()
244 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
249 return mDevicePolicyManager; in getDevicePolicyManager()
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DKeyguardUpdateMonitorTest.java140 private DevicePolicyManager mDevicePolicyManager; field in KeyguardUpdateMonitorTest
191 mSpiedContext.addMockSystemService(DevicePolicyManager.class, mDevicePolicyManager); in setup()
668 when(mDevicePolicyManager.isSecondaryLockscreenEnabled(eq(UserHandle.of(user)))) in testSecondaryLockscreenRequirement()
670 when(mDevicePolicyManager.getProfileOwnerOrDeviceOwnerSupervisionComponent( in testSecondaryLockscreenRequirement()
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/
DBiometricServiceTest.java112 DevicePolicyManager mDevicePolicyManager; field in BiometricServiceTest
123 .thenReturn(mDevicePolicyManager); in setUp()
1387 when(mDevicePolicyManager in testWorkAuthentication_fingerprintWorksIfNotDisabledByDevicePolicyManager()
1404 when(mDevicePolicyManager in testAuthentication_normalAppIgnoresDevicePolicy()
1418 when(mDevicePolicyManager in testWorkAuthentication_faceWorksIfNotDisabledByDevicePolicyManager()
1437 when(mDevicePolicyManager in testWorkAuthentication_fingerprintFailsIfDisabledByDevicePolicyManager()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/
DGlobalActionsDialogTest.java98 @Mock private DevicePolicyManager mDevicePolicyManager; field in GlobalActionsDialogTest
152 mDevicePolicyManager, in setUp()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardUpdateMonitor.java280 private final DevicePolicyManager mDevicePolicyManager; field in KeyguardUpdateMonitor
1014 boolean enabled = mDevicePolicyManager.isSecondaryLockscreenEnabled(UserHandle.of(userId)); in updateSecondaryLockscreenRequirement()
1019 mDevicePolicyManager.getProfileOwnerOrDeviceOwnerSupervisionComponent( in updateSecondaryLockscreenRequirement()
1781 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in KeyguardUpdateMonitor()
1782 mLogoutEnabled = mDevicePolicyManager.isLogoutEnabled(); in KeyguardUpdateMonitor()
2897 boolean logoutEnabled = mDevicePolicyManager.isLogoutEnabled(); in updateLogoutEnabled()

12