Merge "Add visibility metrics to dialogs."
This commit is contained in:
committed by
Android (Google) Code Review
commit
295f5a03bc
@@ -59,6 +59,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;
|
||||
@@ -703,7 +704,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;
|
||||
|
||||
@@ -715,6 +716,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();
|
||||
@@ -749,7 +755,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;
|
||||
|
||||
@@ -758,6 +764,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())
|
||||
@@ -767,7 +778,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;
|
||||
|
||||
@@ -780,6 +791,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();
|
||||
@@ -804,7 +820,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;
|
||||
|
||||
@@ -817,6 +833,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();
|
||||
@@ -837,7 +858,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;
|
||||
|
||||
@@ -846,6 +867,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