Add logging for a few dialogs in Settings.
Bug: 30681529 Test: Checked via adb logcat -b events |egrep'(sysui_|notification_)' Change-Id: Ida7ce88f11fd476164f2d016ac0badcd7c549ae4
This commit is contained in:
@@ -18,7 +18,6 @@ package com.android.settings;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Context;
|
||||
@@ -30,6 +29,9 @@ import android.support.v14.preference.ListPreferenceDialogFragment;
|
||||
import android.support.v7.preference.ListPreference;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.android.internal.logging.MetricsProto;
|
||||
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
|
||||
|
||||
public class CustomListPreference extends ListPreference {
|
||||
|
||||
public CustomListPreference(Context context, AttributeSet attrs) {
|
||||
@@ -196,7 +198,7 @@ public class CustomListPreference extends ListPreference {
|
||||
}
|
||||
}
|
||||
|
||||
public static class ConfirmDialogFragment extends DialogFragment {
|
||||
public static class ConfirmDialogFragment extends InstrumentedDialogFragment {
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
return new AlertDialog.Builder(getActivity())
|
||||
@@ -213,5 +215,10 @@ public class CustomListPreference extends ListPreference {
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.create();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.DIALOG_CUSTOM_LIST_CONFIRMATION;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user