diff options
-rw-r--r-- | core/res/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | packages/SystemUI/AndroidManifest.xml | 5 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java | 2 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java (renamed from services/java/com/android/server/status/StorageNotification.java) | 9 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java (renamed from services/java/com/android/server/status/UsbStorageActivity.java) | 2 |
5 files changed, 12 insertions, 9 deletions
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 1fcf186..2ddb6b9 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1269,9 +1269,6 @@ <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> - <activity android:name="com.android.server.status.UsbStorageActivity" - android:excludeFromRecents="true"> - </activity> <activity android:name="com.android.internal.app.ExternalMediaFormatActivity" android:theme="@style/Theme.Dialog.Alert" android:excludeFromRecents="true"> diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 3f5b69d..aba5e05 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -18,5 +18,10 @@ android:name=".statusbar.PhoneStatusBarService" android:exported="false" /> + + <activity android:name=".usb.UsbStorageActivity" + android:excludeFromRecents="true"> + </activity> + </application> </manifest> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java index 9ef9d0d..4f39ee4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java @@ -365,7 +365,7 @@ public class StatusBarPolicy { // storage mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE); mStorageManager.registerListener( - new com.android.server.status.StorageNotification(context)); + new com.android.systemui.usb.StorageNotification(context)); // battery mService.setIcon("battery", com.android.internal.R.drawable.stat_sys_battery_unknown, 0); diff --git a/services/java/com/android/server/status/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index 8da8cd3..f8abc5a 100644 --- a/services/java/com/android/server/status/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.status; +package com.android.systemui.usb; import android.app.Activity; import android.app.Notification; @@ -80,9 +80,10 @@ public class StorageNotification extends StorageEventListener { mContext = context; mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE); - mUmsAvailable = mStorageManager.isUsbMassStorageConnected(); + final boolean connected = mStorageManager.isUsbMassStorageConnected(); Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable, Environment.getExternalStorageState())); + onUsbMassStorageConnectionChanged(connected); } /* @@ -122,7 +123,7 @@ public class StorageNotification extends StorageEventListener { * for stopping UMS. */ Intent intent = new Intent(); - intent.setClass(mContext, com.android.server.status.UsbStorageActivity.class); + intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class); PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0); setUsbStorageNotification( com.android.internal.R.string.usb_storage_stop_notification_title, @@ -240,7 +241,7 @@ public class StorageNotification extends StorageEventListener { if (available) { Intent intent = new Intent(); - intent.setClass(mContext, com.android.server.status.UsbStorageActivity.class); + intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); final boolean adbOn = 1 == Settings.Secure.getInt( diff --git a/services/java/com/android/server/status/UsbStorageActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java index e8631c5..55d31ec 100644 --- a/services/java/com/android/server/status/UsbStorageActivity.java +++ b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.status; +package com.android.systemui.usb; import com.android.internal.R; import android.app.Activity; |