From 06da8b6ebc9a351bff3ad588dccfeebc941cfe4c Mon Sep 17 00:00:00 2001 From: atrost Date: Tue, 17 Mar 2020 20:37:49 +0000 Subject: [PATCH] Show only listUIChanges instead of all Use the new method that filters out changes that shouldn't be in the developer UI. Test: make RunSettingsRoboTests ROBOTEST_FILTER=PlatformCompatDashboardTest Bug: 151299145 Change-Id: I7c725a1eca32e2d253b9671c789777b5422ed469 --- .../settings/development/compat/PlatformCompatDashboard.java | 2 +- .../development/compat/PlatformCompatDashboardTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/development/compat/PlatformCompatDashboard.java b/src/com/android/settings/development/compat/PlatformCompatDashboard.java index 7b79da77954..2f2c7509851 100644 --- a/src/com/android/settings/development/compat/PlatformCompatDashboard.java +++ b/src/com/android/settings/development/compat/PlatformCompatDashboard.java @@ -100,7 +100,7 @@ public class PlatformCompatDashboard extends DashboardFragment { public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); try { - mChanges = getPlatformCompat().listAllChanges(); + mChanges = getPlatformCompat().listUIChanges(); } catch (RemoteException e) { throw new RuntimeException("Could not list changes!", e); } 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 1e59167e500..e59bd0b3446 100644 --- a/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java +++ b/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java @@ -93,7 +93,7 @@ public class PlatformCompatDashboardTest { mChanges[2] = new CompatibilityChangeInfo(3L, "Enabled_After_SDK_1_1", 1, false, false, ""); mChanges[3] = new CompatibilityChangeInfo(4L, "Enabled_After_SDK_1_2", 1, false, false, ""); mChanges[4] = new CompatibilityChangeInfo(5L, "Enabled_After_SDK_2", 2, false, false, ""); - when(mPlatformCompat.listAllChanges()).thenReturn(mChanges); + when(mPlatformCompat.listUIChanges()).thenReturn(mChanges); when(mPlatformCompat.getOverrideValidator()).thenReturn(mOverrideValidator); // By default, allow any change when(mOverrideValidator.getOverrideAllowedState(anyLong(),anyString()))