Add visibility metrics to dialogs.
Bug: 30681529 Test: adb logcat -b events | egrep "(sysui_|notification_)" Change-Id: I199d2e1b2cb8588a562b46bb8128d8ece24952f0
This commit is contained in:
@@ -60,6 +60,7 @@ import com.android.settings.Settings.StorageUseActivity;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.applications.ManageApplications;
|
||||
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
|
||||
import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
|
||||
import com.android.settings.deviceinfo.StorageSettings.MountTask;
|
||||
import com.android.settingslib.deviceinfo.StorageMeasurement;
|
||||
@@ -705,7 +706,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
/**
|
||||
* Dialog that allows editing of volume nickname.
|
||||
*/
|
||||
public static class RenameFragment extends DialogFragment {
|
||||
public static class RenameFragment extends InstrumentedDialogFragment {
|
||||
public static void show(PrivateVolumeSettings parent, VolumeInfo vol) {
|
||||
if (!parent.isAdded()) return;
|
||||
|
||||
@@ -717,6 +718,11 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
dialog.show(parent.getFragmentManager(), TAG_RENAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.DIALOG_VOLUME_RENAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
final Context context = getActivity();
|
||||
@@ -751,7 +757,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public static class SystemInfoFragment extends DialogFragment {
|
||||
public static class SystemInfoFragment extends InstrumentedDialogFragment {
|
||||
public static void show(Fragment parent) {
|
||||
if (!parent.isAdded()) return;
|
||||
|
||||
@@ -760,6 +766,11 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
dialog.show(parent.getFragmentManager(), TAG_SYSTEM_INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.DIALOG_STORAGE_SYSTEM_INFO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
return new AlertDialog.Builder(getActivity())
|
||||
@@ -769,7 +780,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public static class OtherInfoFragment extends DialogFragment {
|
||||
public static class OtherInfoFragment extends InstrumentedDialogFragment {
|
||||
public static void show(Fragment parent, String title, VolumeInfo sharedVol) {
|
||||
if (!parent.isAdded()) return;
|
||||
|
||||
@@ -782,6 +793,11 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
dialog.show(parent.getFragmentManager(), TAG_OTHER_INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.DIALOG_STORAGE_OTHER_INFO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
final Context context = getActivity();
|
||||
@@ -806,7 +822,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public static class UserInfoFragment extends DialogFragment {
|
||||
public static class UserInfoFragment extends InstrumentedDialogFragment {
|
||||
public static void show(Fragment parent, CharSequence userLabel, CharSequence userSize) {
|
||||
if (!parent.isAdded()) return;
|
||||
|
||||
@@ -819,6 +835,11 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
dialog.show(parent.getFragmentManager(), TAG_USER_INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.DIALOG_STORAGE_USER_INFO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
final Context context = getActivity();
|
||||
@@ -839,7 +860,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
/**
|
||||
* Dialog to request user confirmation before clearing all cache data.
|
||||
*/
|
||||
public static class ConfirmClearCacheFragment extends DialogFragment {
|
||||
public static class ConfirmClearCacheFragment extends InstrumentedDialogFragment {
|
||||
public static void show(Fragment parent) {
|
||||
if (!parent.isAdded()) return;
|
||||
|
||||
@@ -848,6 +869,11 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
dialog.show(parent.getFragmentManager(), TAG_CONFIRM_CLEAR_CACHE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.DIALOG_STORAGE_CLEAR_CACHE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
final Context context = getActivity();
|
||||
|
||||
Reference in New Issue
Block a user