Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSSecurityFooterTest.java +0 −21 Original line number Diff line number Diff line Loading @@ -14,9 +14,6 @@ package com.android.systemui.qs; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_DEFAULT; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_FINANCED; import static com.google.common.truth.Truth.assertThat; import static junit.framework.Assert.assertEquals; Loading Loading @@ -132,9 +129,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerComponentOnAnyUser()) .thenReturn(DEVICE_OWNER_COMPONENT); when(mSecurityController.isFinancedDevice()).thenReturn(false); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_DEFAULT); } @Nullable Loading Loading @@ -201,9 +195,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerOrganizationName()) .thenReturn(MANAGING_ORGANIZATION); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); SecurityButtonConfig buttonConfig = getButtonConfig(); assertNotNull(buttonConfig); Loading Loading @@ -514,9 +505,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { public void testGetManagementTitleForFinancedDevice() { when(mSecurityController.isDeviceManaged()).thenReturn(true); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); assertEquals(mContext.getString(R.string.monitoring_title_financed_device, MANAGING_ORGANIZATION), Loading Loading @@ -545,9 +533,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { public void testGetManagementMessage_deviceOwner_asFinancedDevice() { when(mSecurityController.isDeviceManaged()).thenReturn(true); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); assertEquals(mContext.getString(R.string.monitoring_financed_description_named_management, MANAGING_ORGANIZATION, MANAGING_ORGANIZATION), Loading Loading @@ -855,9 +840,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerOrganizationName()) .thenReturn(MANAGING_ORGANIZATION); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); View view = mFooterUtils.createDialogView(getContext()); Loading @@ -879,9 +861,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerOrganizationName()) .thenReturn(MANAGING_ORGANIZATION); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); Expandable expandable = mock(Expandable.class); when(expandable.dialogTransitionController(any())).thenReturn( Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java +2 −8 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.systemui.statusbar; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_DEFAULT; import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_TRANSIENT; import static com.android.systemui.keyguard.ScreenLifecycle.SCREEN_ON; Loading Loading @@ -105,9 +103,8 @@ import org.mockito.MockitoAnnotations; public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { protected static final String ORGANIZATION_NAME = "organization"; protected static final ComponentName DEVICE_OWNER_COMPONENT = new ComponentName( "com.android.foo", "bar"); private static final ComponentName DEVICE_OWNER_COMPONENT = new ComponentName("com.android.foo", "bar"); protected static final int TEST_STRING_RES = R.string.keyguard_indication_trust_unlocked; Loading Loading @@ -243,9 +240,6 @@ public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) .thenReturn(DEVICE_OWNER_COMPONENT); when(mDevicePolicyManager.isFinancedDevice()).thenReturn(false); // TODO(b/259908270): remove when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_DEFAULT); when(mDevicePolicyResourcesManager.getString(anyString(), any())) .thenReturn(mDisclosureGeneric); Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.statusbar; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_FINANCED; import static android.content.pm.UserInfo.FLAG_MANAGED_PROFILE; import static android.hardware.biometrics.BiometricFaceConstants.FACE_ACQUIRED_TOO_DARK; import static android.hardware.biometrics.BiometricFaceConstants.FACE_ERROR_LOCKOUT_PERMANENT; Loading Loading @@ -311,9 +310,6 @@ public class KeyguardIndicationControllerTest extends KeyguardIndicationControll when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(ORGANIZATION_NAME); when(mDevicePolicyManager.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); sendUpdateDisclosureBroadcast(); mExecutor.runAllReady(); mController.setVisible(true); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityController.java +0 −4 Original line number Diff line number Diff line Loading @@ -44,10 +44,6 @@ public interface SecurityController extends CallbackController<SecurityControlle /** Device owner component even if not on this user. **/ ComponentName getDeviceOwnerComponentOnAnyUser(); // TODO(b/259908270): remove /** Device owner type for a device owner. **/ @Deprecated int getDeviceOwnerType(ComponentName admin); boolean isNetworkLoggingEnabled(); /** @deprecated Use {@link VpnRepository#getVpnState()} instead. */ @Deprecated Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java +0 −8 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.annotation.Nullable; import android.annotation.SuppressLint; import android.app.admin.DeviceAdminInfo; import android.app.admin.DevicePolicyManager; import android.app.admin.DevicePolicyManager.DeviceOwnerType; import android.app.supervision.SupervisionManager; import android.content.BroadcastReceiver; import android.content.ComponentName; Loading Loading @@ -293,13 +292,6 @@ public class SecurityControllerImpl implements SecurityController { return mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); } // TODO(b/259908270): remove @Override @DeviceOwnerType public int getDeviceOwnerType(@NonNull ComponentName admin) { return mDevicePolicyManager.getDeviceOwnerType(admin); } @Override public boolean isFinancedDevice() { return mDevicePolicyManager.isFinancedDevice(); Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSSecurityFooterTest.java +0 −21 Original line number Diff line number Diff line Loading @@ -14,9 +14,6 @@ package com.android.systemui.qs; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_DEFAULT; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_FINANCED; import static com.google.common.truth.Truth.assertThat; import static junit.framework.Assert.assertEquals; Loading Loading @@ -132,9 +129,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerComponentOnAnyUser()) .thenReturn(DEVICE_OWNER_COMPONENT); when(mSecurityController.isFinancedDevice()).thenReturn(false); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_DEFAULT); } @Nullable Loading Loading @@ -201,9 +195,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerOrganizationName()) .thenReturn(MANAGING_ORGANIZATION); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); SecurityButtonConfig buttonConfig = getButtonConfig(); assertNotNull(buttonConfig); Loading Loading @@ -514,9 +505,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { public void testGetManagementTitleForFinancedDevice() { when(mSecurityController.isDeviceManaged()).thenReturn(true); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); assertEquals(mContext.getString(R.string.monitoring_title_financed_device, MANAGING_ORGANIZATION), Loading Loading @@ -545,9 +533,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { public void testGetManagementMessage_deviceOwner_asFinancedDevice() { when(mSecurityController.isDeviceManaged()).thenReturn(true); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); assertEquals(mContext.getString(R.string.monitoring_financed_description_named_management, MANAGING_ORGANIZATION, MANAGING_ORGANIZATION), Loading Loading @@ -855,9 +840,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerOrganizationName()) .thenReturn(MANAGING_ORGANIZATION); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); View view = mFooterUtils.createDialogView(getContext()); Loading @@ -879,9 +861,6 @@ public class QSSecurityFooterTest extends SysuiTestCase { when(mSecurityController.getDeviceOwnerOrganizationName()) .thenReturn(MANAGING_ORGANIZATION); when(mSecurityController.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); Expandable expandable = mock(Expandable.class); when(expandable.dialogTransitionController(any())).thenReturn( Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java +2 −8 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.systemui.statusbar; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_DEFAULT; import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_TRANSIENT; import static com.android.systemui.keyguard.ScreenLifecycle.SCREEN_ON; Loading Loading @@ -105,9 +103,8 @@ import org.mockito.MockitoAnnotations; public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { protected static final String ORGANIZATION_NAME = "organization"; protected static final ComponentName DEVICE_OWNER_COMPONENT = new ComponentName( "com.android.foo", "bar"); private static final ComponentName DEVICE_OWNER_COMPONENT = new ComponentName("com.android.foo", "bar"); protected static final int TEST_STRING_RES = R.string.keyguard_indication_trust_unlocked; Loading Loading @@ -243,9 +240,6 @@ public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) .thenReturn(DEVICE_OWNER_COMPONENT); when(mDevicePolicyManager.isFinancedDevice()).thenReturn(false); // TODO(b/259908270): remove when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_DEFAULT); when(mDevicePolicyResourcesManager.getString(anyString(), any())) .thenReturn(mDisclosureGeneric); Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.statusbar; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_FINANCED; import static android.content.pm.UserInfo.FLAG_MANAGED_PROFILE; import static android.hardware.biometrics.BiometricFaceConstants.FACE_ACQUIRED_TOO_DARK; import static android.hardware.biometrics.BiometricFaceConstants.FACE_ERROR_LOCKOUT_PERMANENT; Loading Loading @@ -311,9 +310,6 @@ public class KeyguardIndicationControllerTest extends KeyguardIndicationControll when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(ORGANIZATION_NAME); when(mDevicePolicyManager.isFinancedDevice()).thenReturn(true); // TODO(b/259908270): remove when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) .thenReturn(DEVICE_OWNER_TYPE_FINANCED); sendUpdateDisclosureBroadcast(); mExecutor.runAllReady(); mController.setVisible(true); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityController.java +0 −4 Original line number Diff line number Diff line Loading @@ -44,10 +44,6 @@ public interface SecurityController extends CallbackController<SecurityControlle /** Device owner component even if not on this user. **/ ComponentName getDeviceOwnerComponentOnAnyUser(); // TODO(b/259908270): remove /** Device owner type for a device owner. **/ @Deprecated int getDeviceOwnerType(ComponentName admin); boolean isNetworkLoggingEnabled(); /** @deprecated Use {@link VpnRepository#getVpnState()} instead. */ @Deprecated Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java +0 −8 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.annotation.Nullable; import android.annotation.SuppressLint; import android.app.admin.DeviceAdminInfo; import android.app.admin.DevicePolicyManager; import android.app.admin.DevicePolicyManager.DeviceOwnerType; import android.app.supervision.SupervisionManager; import android.content.BroadcastReceiver; import android.content.ComponentName; Loading Loading @@ -293,13 +292,6 @@ public class SecurityControllerImpl implements SecurityController { return mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); } // TODO(b/259908270): remove @Override @DeviceOwnerType public int getDeviceOwnerType(@NonNull ComponentName admin) { return mDevicePolicyManager.getDeviceOwnerType(admin); } @Override public boolean isFinancedDevice() { return mDevicePolicyManager.isFinancedDevice(); Loading