OSDN Git Service

Add getSummaryMethod to AbstractPreferenceController
authorMatthew Fritze <mfritze@google.com>
Thu, 4 Jan 2018 00:51:49 +0000 (16:51 -0800)
committerMatthew Fritze <mfritze@google.com>
Thu, 4 Jan 2018 21:47:59 +0000 (13:47 -0800)
We want a dedicated getSummay method, as summary text
is a fairly important part of the preference framework.

Specifically for preferences with dynamic summaries, having a
method to provide summaries for Slices, and in the future, search
is necessary for correctness.

Change-Id: I435ccab7758d90515583fd8ca10a9b1ef0c858b9
Bug: 71514936
Test: make -j40 RunSettingsRoboTests

packages/SettingsLib/src/com/android/settingslib/core/AbstractPreferenceController.java

index 88f0d2b..d14b53b 100644 (file)
@@ -69,4 +69,12 @@ public abstract class AbstractPreferenceController {
             pref.setVisible(isVisible);
         }
     }
+
+
+    /**
+     * @return a String for the summary of the preference.
+     */
+    public String getSummary() {
+        return null;
+    }
 }