Loading services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +1 −18 Original line number Diff line number Diff line Loading @@ -322,6 +322,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { setUpUserManager(); when(getServices().lockPatternUtils.hasSecureLockScreen()).thenReturn(true); when(getServices().storageManager.isFileBasedEncryptionEnabled()).thenReturn(true); mIsAutomotive = mContext.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); Loading Loading @@ -7421,7 +7422,6 @@ public class DevicePolicyManagerTest extends DpmTestBase { @Test public void testCanProfileOwnerResetPasswordWhenLocked_nonDirectBootAwarePo() throws Exception { setDeviceEncryptionPerUser(); setupProfileOwner(); setupPasswordResetToken(); Loading @@ -7432,7 +7432,6 @@ public class DevicePolicyManagerTest extends DpmTestBase { @Test public void testCanProfileOwnerResetPasswordWhenLocked_noActiveToken() throws Exception { setDeviceEncryptionPerUser(); setupProfileOwner(); makeAdmin1DirectBootAware(); Loading @@ -7441,21 +7440,9 @@ public class DevicePolicyManagerTest extends DpmTestBase { .that(dpm.canProfileOwnerResetPasswordWhenLocked(CALLER_USER_HANDLE)).isFalse(); } @Test public void testCanProfileOwnerResetPasswordWhenLocked_nonFbeDevice() throws Exception { setupProfileOwner(); makeAdmin1DirectBootAware(); setupPasswordResetToken(); mContext.binder.callingUid = DpmMockContext.SYSTEM_UID; assertWithMessage("device is not FBE") .that(dpm.canProfileOwnerResetPasswordWhenLocked(CALLER_USER_HANDLE)).isFalse(); } @Test @Ignore("b/277916462") public void testCanProfileOwnerResetPasswordWhenLocked() throws Exception { setDeviceEncryptionPerUser(); setupProfileOwner(); makeAdmin1DirectBootAware(); setupPasswordResetToken(); Loading Loading @@ -7500,10 +7487,6 @@ public class DevicePolicyManagerTest extends DpmTestBase { eq(CALLER_USER_HANDLE)); } private void setDeviceEncryptionPerUser() { when(getServices().storageManager.isFileBasedEncryptionEnabled()).thenReturn(true); } private void setCrossProfileAppsList(String... packages) { when(mContext.getResources() .getStringArray(eq(R.array.cross_profile_apps))) Loading Loading
services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +1 −18 Original line number Diff line number Diff line Loading @@ -322,6 +322,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { setUpUserManager(); when(getServices().lockPatternUtils.hasSecureLockScreen()).thenReturn(true); when(getServices().storageManager.isFileBasedEncryptionEnabled()).thenReturn(true); mIsAutomotive = mContext.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); Loading Loading @@ -7421,7 +7422,6 @@ public class DevicePolicyManagerTest extends DpmTestBase { @Test public void testCanProfileOwnerResetPasswordWhenLocked_nonDirectBootAwarePo() throws Exception { setDeviceEncryptionPerUser(); setupProfileOwner(); setupPasswordResetToken(); Loading @@ -7432,7 +7432,6 @@ public class DevicePolicyManagerTest extends DpmTestBase { @Test public void testCanProfileOwnerResetPasswordWhenLocked_noActiveToken() throws Exception { setDeviceEncryptionPerUser(); setupProfileOwner(); makeAdmin1DirectBootAware(); Loading @@ -7441,21 +7440,9 @@ public class DevicePolicyManagerTest extends DpmTestBase { .that(dpm.canProfileOwnerResetPasswordWhenLocked(CALLER_USER_HANDLE)).isFalse(); } @Test public void testCanProfileOwnerResetPasswordWhenLocked_nonFbeDevice() throws Exception { setupProfileOwner(); makeAdmin1DirectBootAware(); setupPasswordResetToken(); mContext.binder.callingUid = DpmMockContext.SYSTEM_UID; assertWithMessage("device is not FBE") .that(dpm.canProfileOwnerResetPasswordWhenLocked(CALLER_USER_HANDLE)).isFalse(); } @Test @Ignore("b/277916462") public void testCanProfileOwnerResetPasswordWhenLocked() throws Exception { setDeviceEncryptionPerUser(); setupProfileOwner(); makeAdmin1DirectBootAware(); setupPasswordResetToken(); Loading Loading @@ -7500,10 +7487,6 @@ public class DevicePolicyManagerTest extends DpmTestBase { eq(CALLER_USER_HANDLE)); } private void setDeviceEncryptionPerUser() { when(getServices().storageManager.isFileBasedEncryptionEnabled()).thenReturn(true); } private void setCrossProfileAppsList(String... packages) { when(mContext.getResources() .getStringArray(eq(R.array.cross_profile_apps))) Loading