summaryrefslogtreecommitdiffstats
path: root/core/java/com
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-05-07 19:23:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-07 19:23:34 +0000
commitd11ad51d119aaa826d988fbc7f6c626afff00983 (patch)
treec867f4618344af961139b61390c4344767e37c66 /core/java/com
parent39fce1d226c96e49cf8466a347dabe9dba702151 (diff)
parent457a21cdeac04565a0c40ad8c43a928c1182ddd1 (diff)
downloadframeworks_base-d11ad51d119aaa826d988fbc7f6c626afff00983.zip
frameworks_base-d11ad51d119aaa826d988fbc7f6c626afff00983.tar.gz
frameworks_base-d11ad51d119aaa826d988fbc7f6c626afff00983.tar.bz2
Merge "add logging to quick settings tiles" into mnc-dev
Diffstat (limited to 'core/java/com')
-rw-r--r--core/java/com/android/internal/logging/MetricsLogger.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/core/java/com/android/internal/logging/MetricsLogger.java b/core/java/com/android/internal/logging/MetricsLogger.java
index 6173832..9277f9b 100644
--- a/core/java/com/android/internal/logging/MetricsLogger.java
+++ b/core/java/com/android/internal/logging/MetricsLogger.java
@@ -18,6 +18,7 @@ package com.android.internal.logging;
import android.content.Context;
import android.os.Build;
+import android.view.View;
/**
* Log all the things.
@@ -33,6 +34,10 @@ public class MetricsLogger implements MetricsConstants {
public static final int ACTION_BAN_APP_NOTES = 146;
public static final int NOTIFICATION_ZEN_MODE_EVENT_RULE = 147;
public static final int ACTION_DISMISS_ALL_NOTES = 148;
+ public static final int QS_DND_DETAILS = 149;
+ public static final int QS_BLUETOOTH_DETAILS = 150;
+ public static final int QS_CAST_DETAILS = 151;
+ public static final int QS_WIFI_DETAILS = 152;
public static void visible(Context context, int category) throws IllegalArgumentException {
if (Build.IS_DEBUGGABLE && category == VIEW_UNKNOWN) {
@@ -41,13 +46,27 @@ public class MetricsLogger implements MetricsConstants {
EventLogTags.writeSysuiViewVisibility(category, 100);
}
- public static void hidden(Context context, int category) {
+ public static void hidden(Context context, int category) throws IllegalArgumentException {
if (Build.IS_DEBUGGABLE && category == VIEW_UNKNOWN) {
throw new IllegalArgumentException("Must define metric category");
}
EventLogTags.writeSysuiViewVisibility(category, 0);
}
+ public static void visibility(Context context, int category, boolean visibile)
+ throws IllegalArgumentException {
+ if (visibile) {
+ visible(context, category);
+ } else {
+ hidden(context, category);
+ }
+ }
+
+ public static void visibility(Context context, int category, int vis)
+ throws IllegalArgumentException {
+ visibility(context, category, vis == View.VISIBLE);
+ }
+
public static void action(Context context, int category) {
action(context, category, "");
}