Move temporary metrics constants to proto

Change-Id: I8fb3ac22df7bdc52039dd640f7696ebd32281f0b
This commit is contained in:
Jason Monk
2016-03-08 14:18:30 -05:00
parent 4695fc7e48
commit 3e19fc5600
18 changed files with 42 additions and 69 deletions

View File

@@ -24,6 +24,7 @@ import android.content.pm.PackageManager;
import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
import com.android.internal.logging.MetricsProto.MetricsEvent;
import java.util.Map;
import java.util.Set;
@@ -99,7 +100,7 @@ public class SharedPreferencesLogger implements SharedPreferences {
private void logPackageName(String key, String value) {
MetricsLogger.histogram(mContext, mTag + "/" + key, 1);
MetricsLogger.action(mContext, InstrumentedFragment.ACTION_GENERIC_PACKAGE,
MetricsLogger.action(mContext, MetricsEvent.ACTION_GENERIC_PACKAGE,
mTag + "/" + key + "|" + value);
}