From edd75ce519e79b6f26cbcf12c5aa03afc3ef2ca5 Mon Sep 17 00:00:00 2001 From: atrost Date: Wed, 4 Dec 2019 18:46:00 +0000 Subject: [PATCH] Add descriptions to compat changes. Capture the comment above a definition of a compat change and make it the description. Next: make sure existing changes use supported format (only /** comments, only above the annotations), and use in developer UI. Bug: 144927670 Test: treeHugger Change-Id: I5f53517751762a637dc6fc0f220b83d84eb3a916 --- .../compat/PlatformCompatDashboardTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 d13b9273e87..693ed45b56a 100644 --- a/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java +++ b/tests/robotests/src/com/android/settings/development/compat/PlatformCompatDashboardTest.java @@ -75,11 +75,11 @@ public class PlatformCompatDashboardTest { public void setUp() throws RemoteException, NameNotFoundException { MockitoAnnotations.initMocks(this); mChanges = new CompatibilityChangeInfo[5]; - mChanges[0] = new CompatibilityChangeInfo(1L, "Default_Enabled", 0, false); - mChanges[1] = new CompatibilityChangeInfo(2L, "Default_Disabled", 0, true); - mChanges[2] = new CompatibilityChangeInfo(3L, "Enabled_After_SDK_1_1", 1, false); - mChanges[3] = new CompatibilityChangeInfo(4L, "Enabled_After_SDK_1_2", 1, false); - mChanges[4] = new CompatibilityChangeInfo(5L, "Enabled_After_SDK_2", 2, false); + mChanges[0] = new CompatibilityChangeInfo(1L, "Default_Enabled", 0, false, ""); + mChanges[1] = new CompatibilityChangeInfo(2L, "Default_Disabled", 0, true, ""); + mChanges[2] = new CompatibilityChangeInfo(3L, "Enabled_After_SDK_1_1", 1, false, ""); + mChanges[3] = new CompatibilityChangeInfo(4L, "Enabled_After_SDK_1_2", 1, false, ""); + mChanges[4] = new CompatibilityChangeInfo(5L, "Enabled_After_SDK_2", 2, false, ""); when(mPlatformCompat.listAllChanges()).thenReturn(mChanges); mContext = RuntimeEnvironment.application; mPreferenceManager = new PreferenceManager(mContext); @@ -158,9 +158,9 @@ public class PlatformCompatDashboardTest { new ChangeConfig(enabledChanges, disabledChanges)); List changesToAdd = new ArrayList<>(); for (int i = 0; i < mChanges.length; ++i) { - changesToAdd.add(new CompatibilityChangeInfo(mChanges[i].getId(), mChanges[i] - .getName(), - mChanges[i].getEnableAfterTargetSdk(), mChanges[i].getDisabled())); + changesToAdd.add(new CompatibilityChangeInfo(mChanges[i].getId(), mChanges[i].getName(), + mChanges[i].getEnableAfterTargetSdk(), mChanges[i].getDisabled(), + mChanges[i].getDescription())); } PreferenceCategory category = mDashboard.createChangeCategoryPreference(changesToAdd,