summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-04-02 14:15:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-02 14:15:46 +0000
commit19fb677a587d2a798a953ca7a858b2a17ed2c62e (patch)
tree6a1c951fb5c10024ab9666353a268e9e9f722352 /src/com
parente3107164d50cabb3be5bf936a08b296cac6a4a50 (diff)
parent20c3093679e81c4ae184acf4de49359d216311ce (diff)
downloadpackages_apps_Settings-19fb677a587d2a798a953ca7a858b2a17ed2c62e.tar.gz
packages_apps_Settings-19fb677a587d2a798a953ca7a858b2a17ed2c62e.tar.bz2
packages_apps_Settings-19fb677a587d2a798a953ca7a858b2a17ed2c62e.zip
Merge "provide better instructions for adding settings views."
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/InstrumentedFragment.java10
-rw-r--r--src/com/android/settings/InstrumentedPreferenceActivity.java7
-rw-r--r--src/com/android/settings/InstrumentedPreferenceFragment.java7
3 files changed, 24 insertions, 0 deletions
diff --git a/src/com/android/settings/InstrumentedFragment.java b/src/com/android/settings/InstrumentedFragment.java
index 96b7296b1..604af1868 100644
--- a/src/com/android/settings/InstrumentedFragment.java
+++ b/src/com/android/settings/InstrumentedFragment.java
@@ -23,6 +23,16 @@ import com.android.internal.logging.MetricsLogger;
* Instrumented fragment that logs visibility state.
*/
public abstract class InstrumentedFragment extends PreferenceFragment {
+ // Declare new temproary categories here, starting after this value.
+ public static final int VIEW_CATEGORY_UNDECLARED = 100000;
+
+ /**
+ * Declare the view of this category.
+ *
+ * Categories are defined in {@link com.android.internal.logging.MetricsLogger}
+ * or if there is no relevant existing category you may define one in
+ * {@link com.android.settings.InstrumentedFragment}.
+ */
protected abstract int getMetricsCategory();
@Override
diff --git a/src/com/android/settings/InstrumentedPreferenceActivity.java b/src/com/android/settings/InstrumentedPreferenceActivity.java
index 8ad88b0dd..480d5c7a4 100644
--- a/src/com/android/settings/InstrumentedPreferenceActivity.java
+++ b/src/com/android/settings/InstrumentedPreferenceActivity.java
@@ -23,6 +23,13 @@ import com.android.internal.logging.MetricsLogger;
* Instrumented activity that logs visibility state.
*/
public abstract class InstrumentedPreferenceActivity extends PreferenceActivity {
+ /**
+ * Declare the view of this category.
+ *
+ * Categories are defined in {@link com.android.internal.logging.MetricsLogger}
+ * or if there is no relevant existing category you may define one in
+ * {@link com.android.settings.InstrumentedFragment}.
+ */
protected abstract int getMetricsCategory();
@Override
diff --git a/src/com/android/settings/InstrumentedPreferenceFragment.java b/src/com/android/settings/InstrumentedPreferenceFragment.java
index 1d8610297..f56bce03e 100644
--- a/src/com/android/settings/InstrumentedPreferenceFragment.java
+++ b/src/com/android/settings/InstrumentedPreferenceFragment.java
@@ -23,6 +23,13 @@ import com.android.internal.logging.MetricsLogger;
* Instrumented preference fragment that logs visibility state.
*/
public abstract class InstrumentedPreferenceFragment extends PreferenceFragment {
+ /**
+ * Declare the view of this category.
+ *
+ * Categories are defined in {@link com.android.internal.logging.MetricsLogger}
+ * or if there is no relevant existing category you may define one in
+ * {@link com.android.settings.InstrumentedFragment}.
+ */
protected abstract int getMetricsCategory();
@Override