Merge "Remove unsupported and unmountable intent for automotive devices" into rvc-dev am: 5bf4d8ce86

Change-Id: I8ccd2f2d0bc33bd10df4255a07221262cb1e4db3
This commit is contained in:
Agatha Man
2020-03-27 19:53:12 +00:00
committed by Automerger Merge Worker
2 changed files with 28 additions and 3 deletions

View File

@@ -3597,6 +3597,8 @@
<string name="ext_media_new_notification_title">New <xliff:g id="name" example="SD card">%s</xliff:g></string>
<!-- Notification body when new external media is detected [CHAR LIMIT=NONE] -->
<string name="ext_media_new_notification_message">Tap to set up</string>
<!-- Automotive specific notification body when new external media is detected. Empty because there is no fix action (b/151671685) [CHAR LIMIT=NONE] -->
<string name="ext_media_new_notification_message" product="automotive"></string>
<!-- Notification body when external media is ready for use [CHAR LIMIT=NONE] -->
<string name="ext_media_ready_notification_message">For transferring photos and media</string>
@@ -3605,8 +3607,10 @@
<string name="ext_media_unmountable_notification_title">Issue with <xliff:g id="name" example="SD card">%s</xliff:g></string>
<!-- Notification body when external media is unmountable (corrupt) [CHAR LIMIT=NONE] -->
<string name="ext_media_unmountable_notification_message">Tap to fix</string>
<!-- TV-specifiv notification body when external media is unmountable (corrupt) [CHAR LIMIT=NONE] -->
<!-- TV-specific notification body when external media is unmountable (corrupt) [CHAR LIMIT=NONE] -->
<string name="ext_media_unmountable_notification_message" product="tv"><xliff:g id="name" example="SD card">%s</xliff:g> is corrupt. Select to fix.</string>
<!-- Automotive specific notification body when external media is unmountable (corrupt). Empty because there is no fix action (b/151671685) [CHAR LIMIT=NONE] -->
<string name="ext_media_unmountable_notification_message" product="automotive"></string>
<!-- Notification title when external media is unsupported [CHAR LIMIT=30] -->
<string name="ext_media_unsupported_notification_title">Unsupported <xliff:g id="name" example="SD card">%s</xliff:g></string>
@@ -3614,6 +3618,8 @@
<string name="ext_media_unsupported_notification_message">This device doesn\u2019t support this <xliff:g id="name" example="SD card">%s</xliff:g>. Tap to set up in a supported format.</string>
<!-- TV-specific notification body when external media is unsupported [CHAR LIMIT=NONE] -->
<string name="ext_media_unsupported_notification_message" product="tv">This device doesn\u2019t support this <xliff:g id="name" example="SD card">%s</xliff:g>. Select to set up in a supported format.</string>
<!-- Automotive specific notification body when external media is unsupported. No action is specified to fix (b/151671685) [CHAR LIMIT=NONE] -->
<string name="ext_media_unsupported_notification_message" product="automotive">This device doesn\u2019t support this <xliff:g id="name" example="SD card">%s</xliff:g>.</string>
<!-- Notification title when external media is unsafely removed [CHAR LIMIT=30] -->
<string name="ext_media_badremoval_notification_title"><xliff:g id="name" example="SD card">%s</xliff:g> unexpectedly removed</string>

View File

@@ -187,8 +187,9 @@ public class StorageNotification extends SystemUI {
}
private void updateMissingPrivateVolumes() {
if (isTv()) {
if (isTv() || isAutomotive()) {
// On TV, TvSettings displays a modal full-screen activity in this case.
// Not applicable for automotive.
return;
}
@@ -595,6 +596,9 @@ public class StorageNotification extends SystemUI {
if (isTv()) {
intent.setPackage("com.android.tv.settings");
intent.setAction("com.android.tv.settings.action.NEW_STORAGE");
} else if (isAutomotive()) {
// TODO(b/151671685): add intent to handle unsupported usb
return null;
} else {
intent.setClassName("com.android.settings",
"com.android.settings.deviceinfo.StorageWizardInit");
@@ -611,6 +615,9 @@ public class StorageNotification extends SystemUI {
if (isTv()) {
intent.setPackage("com.android.tv.settings");
intent.setAction("com.android.tv.settings.action.NEW_STORAGE");
} else if (isAutomotive()) {
// TODO(b/151671685): add intent to handle unmountable usb
return null;
} else {
intent.setClassName("com.android.settings",
"com.android.settings.deviceinfo.StorageWizardInit");
@@ -669,6 +676,9 @@ public class StorageNotification extends SystemUI {
if (isTv()) {
intent.setPackage("com.android.tv.settings");
intent.setAction(Settings.ACTION_INTERNAL_STORAGE_SETTINGS);
} else if (isAutomotive()) {
// TODO(b/151671685): add volume settings intent for automotive
return null;
} else {
switch (vol.getType()) {
case VolumeInfo.TYPE_PRIVATE:
@@ -700,7 +710,7 @@ public class StorageNotification extends SystemUI {
}
private PendingIntent buildForgetPendingIntent(VolumeRecord rec) {
// Not used on TV
// Not used on TV and Automotive
final Intent intent = new Intent();
intent.setClassName("com.android.settings",
"com.android.settings.Settings$PrivateVolumeForgetActivity");
@@ -716,6 +726,9 @@ public class StorageNotification extends SystemUI {
if (isTv()) {
intent.setPackage("com.android.tv.settings");
intent.setAction("com.android.tv.settings.action.MIGRATE_STORAGE");
} else if (isAutomotive()) {
// TODO(b/151671685): add storage migrate intent for automotive
return null;
} else {
intent.setClassName("com.android.settings",
"com.android.settings.deviceinfo.StorageWizardMigrateProgress");
@@ -735,6 +748,9 @@ public class StorageNotification extends SystemUI {
if (isTv()) {
intent.setPackage("com.android.tv.settings");
intent.setAction("com.android.tv.settings.action.MOVE_APP");
} else if (isAutomotive()) {
// TODO(b/151671685): add storage move intent for automotive
return null;
} else {
intent.setClassName("com.android.settings",
"com.android.settings.deviceinfo.StorageWizardMoveProgress");
@@ -750,6 +766,9 @@ public class StorageNotification extends SystemUI {
if (isTv()) {
intent.setPackage("com.android.tv.settings");
intent.setAction(Settings.ACTION_INTERNAL_STORAGE_SETTINGS);
} else if (isAutomotive()) {
// TODO(b/151671685): add storage ready intent for automotive
return null;
} else {
intent.setClassName("com.android.settings",
"com.android.settings.deviceinfo.StorageWizardReady");