diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index f3f3d47df4a7c..67415d89c1184 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3595,31 +3595,37 @@ New %s + + %s isn\u2019t working Tap to set up - - + + You may need to reformat the device. Tap to eject. For transferring photos and media Issue with %s + + %s isn\u2019t working Tap to fix %s is corrupt. Select to fix. - - + + You may need to reformat the device. Tap to eject. Unsupported %s + + %s isn\u2019t working This device doesn\u2019t support this %s. Tap to set up in a supported format. This device doesn\u2019t support this %s. Select to set up in a supported format. - - This device doesn\u2019t support this %s. + + You may need to reformat the device %s unexpectedly removed diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index 442c7eaae7296..b6e722266bd6d 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -369,16 +369,24 @@ public class StorageNotification extends SystemUI { R.string.ext_media_new_notification_message, disk.getDescription()); final PendingIntent initIntent = buildInitPendingIntent(vol); - return buildNotificationBuilder(vol, title, text) - .addAction(new Action(R.drawable.ic_settings_24dp, - mContext.getString(R.string.ext_media_init_action), initIntent)) - .addAction(new Action(R.drawable.ic_eject_24dp, - mContext.getString(R.string.ext_media_unmount_action), - buildUnmountPendingIntent(vol))) - .setContentIntent(initIntent) - .setDeleteIntent(buildSnoozeIntent(vol.getFsUuid())) - .build(); + final PendingIntent unmountIntent = buildUnmountPendingIntent(vol); + if (isAutomotive()) { + return buildNotificationBuilder(vol, title, text) + .setContentIntent(unmountIntent) + .setDeleteIntent(buildSnoozeIntent(vol.getFsUuid())) + .build(); + } else { + return buildNotificationBuilder(vol, title, text) + .addAction(new Action(R.drawable.ic_settings_24dp, + mContext.getString(R.string.ext_media_init_action), initIntent)) + .addAction(new Action(R.drawable.ic_eject_24dp, + mContext.getString(R.string.ext_media_unmount_action), + unmountIntent)) + .setContentIntent(initIntent) + .setDeleteIntent(buildSnoozeIntent(vol.getFsUuid())) + .build(); + } } else { final CharSequence title = disk.getDescription(); final CharSequence text = mContext.getString( @@ -427,9 +435,15 @@ public class StorageNotification extends SystemUI { R.string.ext_media_unmountable_notification_title, disk.getDescription()); final CharSequence text = mContext.getString( R.string.ext_media_unmountable_notification_message, disk.getDescription()); + PendingIntent action; + if (isAutomotive()) { + action = buildUnmountPendingIntent(vol); + } else { + action = buildInitPendingIntent(vol); + } return buildNotificationBuilder(vol, title, text) - .setContentIntent(buildInitPendingIntent(vol)) + .setContentIntent(action) .setCategory(Notification.CATEGORY_ERROR) .build(); }