Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-base: Commit

frameworks/base


Commit MetaInfo

Revisionc63970d8f82984d979cc4d76ef7f623656449489 (tree)
Time2017-03-25 04:13:40
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

DiskInfo: support CD/DVD type

Change Summary

Incremental Difference

--- a/core/java/android/os/storage/DiskInfo.java
+++ b/core/java/android/os/storage/DiskInfo.java
@@ -47,6 +47,7 @@ public class DiskInfo implements Parcelable {
4747 public static final int FLAG_DEFAULT_PRIMARY = 1 << 1;
4848 public static final int FLAG_SD = 1 << 2;
4949 public static final int FLAG_USB = 1 << 3;
50+ public static final int FLAG_CDROM = 1 << 6;
5051
5152 public final String id;
5253 public final int flags;
@@ -107,6 +108,12 @@ public class DiskInfo implements Parcelable {
107108 } else {
108109 return res.getString(com.android.internal.R.string.storage_usb_drive);
109110 }
111+ } else if ((flags & FLAG_CDROM) != 0) {
112+ if (isInteresting(label)) {
113+ return res.getString(com.android.internal.R.string.storage_cdrom_label, label);
114+ } else {
115+ return res.getString(com.android.internal.R.string.storage_cdrom);
116+ }
110117 } else {
111118 return null;
112119 }
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1213,6 +1213,8 @@
12131213 <string name="storage_sd_card_label" msgid="6347111320774379257">"<xliff:g id="MANUFACTURER">%s</xliff:g> SD 卡"</string>
12141214 <string name="storage_usb_drive" msgid="6261899683292244209">"U 盘"</string>
12151215 <string name="storage_usb_drive_label" msgid="4501418548927759953">"<xliff:g id="MANUFACTURER">%s</xliff:g> U 盘"</string>
1216+ <string name="storage_cdrom">"CD/DVD 光盘"</string>
1217+ <string name="storage_cdrom_label">"<xliff:g id="MANUFACTURER">%s</xliff:g> CD/DVD 光盘"</string>
12161218 <string name="storage_usb" msgid="3017954059538517278">"USB存储器"</string>
12171219 <string name="data_usage_warning_title" msgid="1955638862122232342">"流量警告"</string>
12181220 <string name="data_usage_warning_body" msgid="2814673551471969954">"触摸可查看使用情况和设置。"</string>
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1213,6 +1213,8 @@
12131213 <string name="storage_sd_card_label" msgid="6347111320774379257">"<xliff:g id="MANUFACTURER">%s</xliff:g> SD 卡"</string>
12141214 <string name="storage_usb_drive" msgid="6261899683292244209">"USB 驅動器"</string>
12151215 <string name="storage_usb_drive_label" msgid="4501418548927759953">"<xliff:g id="MANUFACTURER">%s</xliff:g> USB 驅動器"</string>
1216+ <string name="storage_cdrom">"CD/DVD 光碟機"</string>
1217+ <string name="storage_cdrom_label">"<xliff:g id="MANUFACTURER">%s</xliff:g> CD/DVD 光碟機"</string>
12161218 <string name="storage_usb" msgid="3017954059538517278">"USB 儲存裝置"</string>
12171219 <string name="data_usage_warning_title" msgid="1955638862122232342">"資料用量警告"</string>
12181220 <string name="data_usage_warning_body" msgid="2814673551471969954">"輕觸即可查看使用量和設定。"</string>
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1213,6 +1213,8 @@
12131213 <string name="storage_sd_card_label" msgid="6347111320774379257">"<xliff:g id="MANUFACTURER">%s</xliff:g> SD 卡"</string>
12141214 <string name="storage_usb_drive" msgid="6261899683292244209">"USB 隨身碟"</string>
12151215 <string name="storage_usb_drive_label" msgid="4501418548927759953">"<xliff:g id="MANUFACTURER">%s</xliff:g> USB 隨身碟"</string>
1216+ <string name="storage_cdrom">"CD/DVD 光碟機"</string>
1217+ <string name="storage_cdrom_label">"<xliff:g id="MANUFACTURER">%s</xliff:g> CD/DVD 光碟機"</string>
12161218 <string name="storage_usb" msgid="3017954059538517278">"USB 儲存裝置"</string>
12171219 <string name="data_usage_warning_title" msgid="1955638862122232342">"數據用量警告"</string>
12181220 <string name="data_usage_warning_body" msgid="2814673551471969954">"輕觸即可查看使用量和設定。"</string>
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3341,6 +3341,11 @@
33413341 <!-- Storage description for a USB drive from a specific manufacturer. [CHAR LIMIT=NONE] -->
33423342 <string name="storage_usb_drive_label"><xliff:g id="manufacturer" example="Seagate">%s</xliff:g> USB drive</string>
33433343
3344+ <!-- Storage description for a generic CDROM drive. [CHAR LIMIT=NONE] -->
3345+ <string name="storage_cdrom">CD/DVD drive</string>
3346+ <!-- Storage description for a CDROM drive from a specific manufacturer. [CHAR LIMIT=NONE] -->
3347+ <string name="storage_cdrom_label"><xliff:g id="manufacturer" example="ASUS">%s</xliff:g> CD/DVD drive</string>
3348+
33443349 <!-- Storage description for USB storage. [CHAR LIMIT=NONE] -->
33453350 <string name="storage_usb">USB storage</string>
33463351
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2248,6 +2248,8 @@
22482248 <java-symbol type="string" name="storage_sd_card_label" />
22492249 <java-symbol type="string" name="storage_usb_drive" />
22502250 <java-symbol type="string" name="storage_usb_drive_label" />
2251+ <java-symbol type="string" name="storage_cdrom" />
2252+ <java-symbol type="string" name="storage_cdrom_label" />
22512253 <java-symbol type="string" name="storage_usb" />
22522254
22532255 <java-symbol type="drawable" name="ic_eject_24dp" />
Show on old repository browser