From 92480fc15d5406e6b08c73817dc1c72a5c54a775 Mon Sep 17 00:00:00 2001 From: Benjamin Franz Date: Wed, 6 Jan 2021 15:12:50 +0000 Subject: [PATCH] Update constructor usage for CompatibilityChangeInfo As we're introducing an overridable flag on CompatibilityChangeInfo, the constructor takes an additional argument that needs to be reflected in these tests. Bug: 174043039 Test: atest SettingsRoboTests Change-Id: Ib5528ded408cb7807e2e3a90e1f99ee1775d566d --- .../compat/PlatformCompatDashboardTest.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java b/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java index 15e9bdaddcc..dffd7fb944a 100644 --- a/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java +++ b/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java @@ -88,14 +88,16 @@ public class PlatformCompatDashboardTest { public void setUp() throws RemoteException, NameNotFoundException { MockitoAnnotations.initMocks(this); mChanges = new CompatibilityChangeInfo[5]; - mChanges[0] = new CompatibilityChangeInfo(1L, "Default_Enabled", 0, 0, false, false, ""); - mChanges[1] = new CompatibilityChangeInfo(2L, "Default_Disabled", 0, 0, true, false, ""); - mChanges[2] = new CompatibilityChangeInfo(3L, "Enabled_Since_SDK_1_1", -1, 1, false, false, - ""); - mChanges[3] = new CompatibilityChangeInfo(4L, "Enabled_Since_SDK_1_2", -1, 1, false, false, - ""); - mChanges[4] = new CompatibilityChangeInfo(5L, "Enabled_Since_SDK_2", -1, 2, false, false, - ""); + mChanges[0] = new CompatibilityChangeInfo( + 1L, "Default_Enabled", 0, 0, false, false, "", false); + mChanges[1] = new CompatibilityChangeInfo( + 2L, "Default_Disabled", 0, 0, true, false, "", false); + mChanges[2] = new CompatibilityChangeInfo( + 3L, "Enabled_Since_SDK_1_1", -1, 1, false, false, "", false); + mChanges[3] = new CompatibilityChangeInfo( + 4L, "Enabled_Since_SDK_1_2", -1, 1, false, false, "", false); + mChanges[4] = new CompatibilityChangeInfo( + 5L, "Enabled_Since_SDK_2", -1, 2, false, false, "", false); when(mPlatformCompat.listUIChanges()).thenReturn(mChanges); when(mPlatformCompat.getOverrideValidator()).thenReturn(mOverrideValidator); // By default, allow any change @@ -208,7 +210,8 @@ public class PlatformCompatDashboardTest { for (int i = 0; i < mChanges.length; ++i) { changesToAdd.add(new CompatibilityChangeInfo(mChanges[i].getId(), mChanges[i].getName(), -1, mChanges[i].getEnableSinceTargetSdk(), mChanges[i].getDisabled(), - mChanges[i].getLoggingOnly(), mChanges[i].getDescription())); + mChanges[i].getLoggingOnly(), mChanges[i].getDescription(), + mChanges[i].getOverridable())); } PreferenceCategory category = mDashboard.createChangeCategoryPreference(changesToAdd,