Loading core/java/android/os/storage/DiskInfo.java +13 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.os.storage; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.res.Resources; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -93,7 +94,7 @@ public class DiskInfo implements Parcelable { return true; } public String getDescription() { public @Nullable String getDescription() { final Resources res = Resources.getSystem(); if ((flags & FLAG_SD) != 0) { if (isInteresting(label)) { Loading @@ -112,6 +113,17 @@ public class DiskInfo implements Parcelable { } } public @Nullable String getShortDescription() { final Resources res = Resources.getSystem(); if (isSd()) { return res.getString(com.android.internal.R.string.storage_sd_card); } else if (isUsb()) { return res.getString(com.android.internal.R.string.storage_usb_drive); } else { return null; } } public boolean isAdoptable() { return (flags & FLAG_ADOPTABLE) != 0; } Loading proto/src/metrics_constants.proto +5 −0 Original line number Diff line number Diff line Loading @@ -5583,6 +5583,11 @@ message MetricsEvent { // OS: P SETTINGS_GESTURE_SWIPE_UP = 1374; // OPEN: Settings > Storage > Dialog to format a storage volume // CATEGORY: SETTINGS // OS: P DIALOG_VOLUME_FORMAT = 1375; // ---- End P Constants, all P constants go above this line ---- // First Q constant in master goes here: Loading Loading
core/java/android/os/storage/DiskInfo.java +13 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.os.storage; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.res.Resources; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -93,7 +94,7 @@ public class DiskInfo implements Parcelable { return true; } public String getDescription() { public @Nullable String getDescription() { final Resources res = Resources.getSystem(); if ((flags & FLAG_SD) != 0) { if (isInteresting(label)) { Loading @@ -112,6 +113,17 @@ public class DiskInfo implements Parcelable { } } public @Nullable String getShortDescription() { final Resources res = Resources.getSystem(); if (isSd()) { return res.getString(com.android.internal.R.string.storage_sd_card); } else if (isUsb()) { return res.getString(com.android.internal.R.string.storage_usb_drive); } else { return null; } } public boolean isAdoptable() { return (flags & FLAG_ADOPTABLE) != 0; } Loading
proto/src/metrics_constants.proto +5 −0 Original line number Diff line number Diff line Loading @@ -5583,6 +5583,11 @@ message MetricsEvent { // OS: P SETTINGS_GESTURE_SWIPE_UP = 1374; // OPEN: Settings > Storage > Dialog to format a storage volume // CATEGORY: SETTINGS // OS: P DIALOG_VOLUME_FORMAT = 1375; // ---- End P Constants, all P constants go above this line ---- // First Q constant in master goes here: Loading