summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-10-13 17:01:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-13 17:01:17 -0700
commitbc931eaf154b8f196fd15983b1d0603e12dae890 (patch)
tree2f9526d72a0cec64ee192cbbd45629e0844efdb5 /packages
parentdb6303e51ef2779b2b6b8b6dc557b5de9b7fdcf0 (diff)
parenta007ab294d83db987b05b49ab869566978a87494 (diff)
downloadframeworks_base-bc931eaf154b8f196fd15983b1d0603e12dae890.zip
frameworks_base-bc931eaf154b8f196fd15983b1d0603e12dae890.tar.gz
frameworks_base-bc931eaf154b8f196fd15983b1d0603e12dae890.tar.bz2
am a007ab29: am ffbc4b94: Merge "Fix SD card mounting issues #3074555 and #3072332" into gingerbread
Merge commit 'a007ab294d83db987b05b49ab869566978a87494' * commit 'a007ab294d83db987b05b49ab869566978a87494': Fix SD card mounting issues #3074555 and #3072332
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/AndroidManifest.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java30
2 files changed, 14 insertions, 20 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 6057023..5fde3c3 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -28,6 +28,10 @@
<activity android:name=".usb.UsbStorageActivity"
android:excludeFromRecents="true">
</activity>
+ <activity android:name="com.android.internal.app.ExternalMediaFormatActivity"
+ android:theme="@*android:style/Theme.Dialog.Alert"
+ android:excludeFromRecents="true">
+ </activity>
<activity android:name=".recent.RecentApplicationsActivity"
android:theme="@android:style/Theme.NoTitleBar"
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index b9e915a4..47ed7da 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -16,33 +16,17 @@
package com.android.systemui.usb;
-import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
import android.content.Context;
-import android.content.DialogInterface;
import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
import android.content.res.Resources;
-import android.os.Bundle;
import android.os.Environment;
-import android.os.Handler;
-import android.os.storage.IMountService;
-import android.os.Message;
-import android.os.ServiceManager;
import android.os.storage.StorageEventListener;
import android.os.storage.StorageManager;
-import android.os.storage.StorageResultCode;
import android.provider.Settings;
import android.util.Slog;
-import android.view.View;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.TextView;
-import android.widget.Toast;
public class StorageNotification extends StorageEventListener {
private static final String TAG = "StorageNotification";
@@ -165,10 +149,16 @@ public class StorageNotification extends StorageEventListener {
* Show safe to unmount media notification, and enable UMS
* notification if connected.
*/
- setMediaStorageNotification(
- com.android.internal.R.string.ext_media_safe_unmount_notification_title,
- com.android.internal.R.string.ext_media_safe_unmount_notification_message,
- com.android.internal.R.drawable.stat_notify_sdcard, true, true, null);
+ if (Environment.isExternalStorageRemovable()) {
+ setMediaStorageNotification(
+ com.android.internal.R.string.ext_media_safe_unmount_notification_title,
+ com.android.internal.R.string.ext_media_safe_unmount_notification_message,
+ com.android.internal.R.drawable.stat_notify_sdcard, true, true, null);
+ } else {
+ // This device does not have removable storage, so
+ // don't tell the user they can remove it.
+ setMediaStorageNotification(0, 0, 0, false, false, null);
+ }
updateUsbMassStorageNotification(mUmsAvailable);
}
} else {