Merge "Fix StringIndexOutOfBoundsException in PackageManagerService"
diff --git a/Android.mk b/Android.mk
index 7cd482c..7717c76 100644
--- a/Android.mk
+++ b/Android.mk
@@ -112,6 +112,7 @@
core/java/android/os/ICheckinService.aidl \
core/java/android/os/IMessenger.aidl \
core/java/android/os/IMountService.aidl \
+ core/java/android/os/IMountServiceObserver.aidl \
core/java/android/os/INetworkManagementService.aidl \
core/java/android/os/INetStatService.aidl \
core/java/android/os/IParentalControlCallback.aidl \
diff --git a/core/java/android/os/IMountServiceObserver.aidl b/core/java/android/os/IMountServiceObserver.aidl
new file mode 100644
index 0000000..f753649
--- /dev/null
+++ b/core/java/android/os/IMountServiceObserver.aidl
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+/**
+ * Callback class for receiving events from MountService.
+ *
+ * @hide
+ */
+interface IMountServiceObserver {
+ /**
+ * A sharing method has changed availability state.
+ *
+ * @param method The share method which has changed.
+ * @param available The share availability state.
+ */
+ void shareAvailabilityChange(String method, boolean available);
+
+ /**
+ * Media has been inserted
+ *
+ * @param label The volume label.
+ * @param path The volume mount path.
+ * @param major The backing device major number.
+ * @param minor The backing device minor number.
+ */
+ void mediaInserted(String label, String path, int major, int minor);
+
+ /**
+ * Media has been removed
+ *
+ * @param label The volume label.
+ * @param path The volume mount path.
+ * @param major The backing device major number.
+ * @param minor The backing device minor number.
+ * @param clean Indicates if the removal was clean (unmounted first).
+ */
+ void mediaRemoved(String label, String path, int major, int minor, boolean clean);
+
+ /**
+ * Volume state has changed.
+ *
+ * @param label The volume label.
+ * @param path The volume mount path.
+ * @param oldState The old state of the volume.
+ * @param newState The new state of the volume.
+ *
+ * Note: State is one of the values returned by Environment.getExternalStorageState()
+ */
+ void volumeStateChange(String label, String path, String oldState, String newState);
+
+}
diff --git a/core/java/android/os/MountServiceObserver.java b/core/java/android/os/MountServiceObserver.java
new file mode 100644
index 0000000..3020562
--- /dev/null
+++ b/core/java/android/os/MountServiceObserver.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+/**
+ * Callback class for receiving progress reports during a restore operation. These
+ * methods will all be called on your application's main thread.
+ * @hide
+ */
+public abstract class MountServiceObserver {
+ /**
+ * A sharing method has changed availability state.
+ *
+ * @param method The share method which has changed.
+ * @param available The share availability state.
+ */
+ void shareAvailabilityChange(String method, boolean available) {
+ }
+
+ /**
+ * Media has been inserted
+ *
+ * @param label The volume label.
+ * @param path The volume mount path.
+ * @param major The backing device major number.
+ * @param minor The backing device minor number.
+ */
+ void mediaInserted(String label, String path, int major, int minor) {
+ }
+
+ /**
+ * Media has been removed
+ *
+ * @param label The volume label.
+ * @param path The volume mount path.
+ * @param major The backing device major number.
+ * @param minor The backing device minor number.
+ * @param clean Indicates if the removal was clean (unmounted first).
+ */
+ void mediaRemoved(String label, String path, int major, int minor, boolean clean) {
+ }
+
+ /**
+ * Volume state has changed.
+ *
+ * @param label The volume label.
+ * @param path The volume mount path.
+ * @param oldState The old state of the volume.
+ * @param newState The new state of the volume.
+ *
+ * Note: State is one of the values returned by Environment.getExternalStorageState()
+ */
+ void volumeStateChange(String label, String path, String oldState, String newState) {
+ }
+}
diff --git a/core/java/com/android/internal/app/UsbStorageActivity.java b/core/java/com/android/internal/app/UsbStorageActivity.java
index b8a2136..37ea352 100644
--- a/core/java/com/android/internal/app/UsbStorageActivity.java
+++ b/core/java/com/android/internal/app/UsbStorageActivity.java
@@ -16,7 +16,7 @@
package com.android.internal.app;
-import android.app.AlertDialog;
+import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@@ -28,16 +28,23 @@
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.widget.ImageView;
+import android.widget.Button;
+import android.widget.TextView;
import android.widget.Toast;
+import android.view.View;
/**
* This activity is shown to the user for him/her to enable USB mass storage
* on-demand (that is, when the USB cable is connected). It uses the alert
* dialog style. It will be launched from a notification.
*/
-public class UsbStorageActivity extends AlertActivity implements DialogInterface.OnClickListener {
-
- private static final int POSITIVE_BUTTON = AlertDialog.BUTTON1;
+public class UsbStorageActivity extends Activity {
+ private Button mMountButton;
+ private Button mUnmountButton;
+ private TextView mBanner;
+ private TextView mMessage;
+ private ImageView mIcon;
/** Used to detect when the USB cable is unplugged, so we can call finish() */
private BroadcastReceiver mBatteryReceiver = new BroadcastReceiver() {
@@ -53,16 +60,49 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- // Set up the "dialog"
- final AlertController.AlertParams p = mAlertParams;
- p.mIconId = com.android.internal.R.drawable.ic_dialog_usb;
- p.mTitle = getString(com.android.internal.R.string.usb_storage_title);
- p.mMessage = getString(com.android.internal.R.string.usb_storage_message);
- p.mPositiveButtonText = getString(com.android.internal.R.string.usb_storage_button_mount);
- p.mPositiveButtonListener = this;
- p.mNegativeButtonText = getString(com.android.internal.R.string.usb_storage_button_unmount);
- p.mNegativeButtonListener = this;
- setupAlert();
+ setTitle(getString(com.android.internal.R.string.usb_storage_activity_title));
+
+ setContentView(com.android.internal.R.layout.usb_storage_activity);
+
+ mIcon = (ImageView) findViewById(com.android.internal.R.id.icon);
+ mBanner = (TextView) findViewById(com.android.internal.R.id.banner);
+ mMessage = (TextView) findViewById(com.android.internal.R.id.message);
+
+ mMountButton = (Button) findViewById(com.android.internal.R.id.mount_button);
+ mMountButton.setOnClickListener(
+ new View.OnClickListener() {
+ public void onClick(View v) {
+ mountAsUsbStorage();
+ // TODO: replace with forthcoming MountService callbacks
+ switchDisplay(true);
+ }
+ });
+
+ mUnmountButton = (Button) findViewById(com.android.internal.R.id.unmount_button);
+ mUnmountButton.setOnClickListener(
+ new View.OnClickListener() {
+ public void onClick(View v) {
+ stopUsbStorage();
+ // TODO: replace with forthcoming MountService callbacks
+ switchDisplay(false);
+ }
+ });
+ }
+
+ private void switchDisplay(boolean usbStorageInUse) {
+ if (usbStorageInUse) {
+ mUnmountButton.setVisibility(View.VISIBLE);
+ mMountButton.setVisibility(View.GONE);
+ mIcon.setImageResource(com.android.internal.R.drawable.usb_android_connected);
+ mBanner.setText(com.android.internal.R.string.usb_storage_stop_title);
+ mMessage.setText(com.android.internal.R.string.usb_storage_stop_message);
+ } else {
+ mUnmountButton.setVisibility(View.GONE);
+ mMountButton.setVisibility(View.VISIBLE);
+ mIcon.setImageResource(com.android.internal.R.drawable.usb_android);
+ mBanner.setText(com.android.internal.R.string.usb_storage_title);
+ mMessage.setText(com.android.internal.R.string.usb_storage_message);
+ }
}
@Override
@@ -70,6 +110,18 @@
super.onResume();
registerReceiver(mBatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
+
+ boolean umsOn = false;
+ try {
+ IMountService mountService = IMountService.Stub.asInterface(ServiceManager
+ .getService("mount"));
+ if (mountService != null) {
+ umsOn = mountService.getMassStorageEnabled();
+ }
+ } catch (android.os.RemoteException exc) {
+ // pass
+ }
+ switchDisplay(umsOn);
}
@Override
@@ -79,19 +131,6 @@
unregisterReceiver(mBatteryReceiver);
}
- /**
- * {@inheritDoc}
- */
- public void onClick(DialogInterface dialog, int which) {
-
- if (which == POSITIVE_BUTTON) {
- mountAsUsbStorage();
- }
-
- // No matter what, finish the activity
- finish();
- }
-
private void mountAsUsbStorage() {
IMountService mountService = IMountService.Stub.asInterface(ServiceManager
.getService("mount"));
@@ -108,6 +147,22 @@
}
}
+ private void stopUsbStorage() {
+ IMountService mountService = IMountService.Stub.asInterface(ServiceManager
+ .getService("mount"));
+ if (mountService == null) {
+ showStoppingError();
+ return;
+ }
+
+ try {
+ mountService.setMassStorageEnabled(false);
+ } catch (RemoteException e) {
+ showStoppingError();
+ return;
+ }
+ }
+
private void handleBatteryChanged(Intent intent) {
int pluggedType = intent.getIntExtra("plugged", 0);
if (pluggedType == 0) {
@@ -120,5 +175,10 @@
Toast.makeText(this, com.android.internal.R.string.usb_storage_error_message,
Toast.LENGTH_LONG).show();
}
+
+ private void showStoppingError() {
+ Toast.makeText(this, com.android.internal.R.string.usb_storage_stop_error_message,
+ Toast.LENGTH_LONG).show();
+ }
}
diff --git a/core/java/com/android/internal/app/UsbStorageStopActivity.java b/core/java/com/android/internal/app/UsbStorageStopActivity.java
deleted file mode 100644
index 557a523..0000000
--- a/core/java/com/android/internal/app/UsbStorageStopActivity.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.app;
-
-import android.app.AlertDialog;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IMountService;
-import android.os.Message;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.widget.Toast;
-
-/**
- * This activity is shown to the user for him/her to disable USB mass storage.
- * It uses the alert dialog style. It will be launched from a notification.
- */
-public class UsbStorageStopActivity extends AlertActivity implements DialogInterface.OnClickListener {
-
- private static final int POSITIVE_BUTTON = AlertDialog.BUTTON1;
-
- /** Used to detect when the USB cable is unplugged, so we can call finish() */
- private BroadcastReceiver mBatteryReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (intent.getAction() == Intent.ACTION_BATTERY_CHANGED) {
- handleBatteryChanged(intent);
- }
- }
- };
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Set up the "dialog"
- final AlertController.AlertParams p = mAlertParams;
- p.mIconId = com.android.internal.R.drawable.ic_dialog_alert;
- p.mTitle = getString(com.android.internal.R.string.usb_storage_stop_title);
- p.mMessage = getString(com.android.internal.R.string.usb_storage_stop_message);
- p.mPositiveButtonText = getString(com.android.internal.R.string.usb_storage_stop_button_mount);
- p.mPositiveButtonListener = this;
- p.mNegativeButtonText = getString(com.android.internal.R.string.usb_storage_stop_button_unmount);
- p.mNegativeButtonListener = this;
- setupAlert();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
-
- registerReceiver(mBatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
- }
-
- @Override
- protected void onPause() {
- super.onPause();
-
- unregisterReceiver(mBatteryReceiver);
- }
-
- /**
- * {@inheritDoc}
- */
- public void onClick(DialogInterface dialog, int which) {
-
- if (which == POSITIVE_BUTTON) {
- stopUsbStorage();
- }
-
- // No matter what, finish the activity
- finish();
- }
-
- private void stopUsbStorage() {
- IMountService mountService = IMountService.Stub.asInterface(ServiceManager
- .getService("mount"));
- if (mountService == null) {
- showStoppingError();
- return;
- }
-
- try {
- mountService.setMassStorageEnabled(false);
- } catch (RemoteException e) {
- showStoppingError();
- return;
- }
- }
-
- private void handleBatteryChanged(Intent intent) {
- int pluggedType = intent.getIntExtra("plugged", 0);
- if (pluggedType == 0) {
- // It was disconnected from the plug, so finish
- finish();
- }
- }
-
- private void showStoppingError() {
- Toast.makeText(this, com.android.internal.R.string.usb_storage_stop_error_message,
- Toast.LENGTH_LONG).show();
- }
-
-}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 54e15a5..665088a 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1240,7 +1240,6 @@
</intent-filter>
</activity>
<activity android:name="com.android.internal.app.UsbStorageActivity"
- android:theme="@style/Theme.Dialog.Alert"
android:excludeFromRecents="true">
</activity>
<activity android:name="com.android.internal.app.UsbStorageStopActivity"
diff --git a/core/res/res/drawable-hdpi/usb_android.png b/core/res/res/drawable-hdpi/usb_android.png
new file mode 100644
index 0000000..8153ec4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/usb_android.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/usb_android_connected.png b/core/res/res/drawable-hdpi/usb_android_connected.png
new file mode 100644
index 0000000..6449b7c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/usb_android_connected.png
Binary files differ
diff --git a/core/res/res/layout-land/usb_storage_activity.xml b/core/res/res/layout-land/usb_storage_activity.xml
new file mode 100644
index 0000000..d714479
--- /dev/null
+++ b/core/res/res/layout-land/usb_storage_activity.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/main"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:padding="18dip"
+ android:orientation="horizontal"
+ >
+
+ <ImageView android:id="@+id/icon"
+ android:layout_centerHorizontal="true"
+ android:layout_alignParentTop="true"
+ android:layout_height="wrap_content"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:src="@drawable/usb_android" />
+
+ <RelativeLayout
+ android:layout_height="wrap_content"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ >
+
+ <TextView android:id="@+id/banner"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@id/icon"
+ android:layout_marginTop="10dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="24sp"
+ android:gravity="center"
+ android:text="@string/usb_storage_title" />
+
+ <TextView android:id="@+id/message"
+ android:layout_below="@id/banner"
+ android:layout_marginTop="10dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="14sp"
+ android:gravity="center"
+ android:text="@string/usb_storage_message" />
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@id/message"
+ android:layout_marginTop="20dip"
+ >
+
+ <Button android:id="@+id/mount_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="18dip"
+ android:paddingRight="18dip"
+ android:text="@string/usb_storage_button_mount"
+ />
+ <Button android:id="@+id/unmount_button"
+ android:visibility="gone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="18dip"
+ android:paddingRight="18dip"
+ android:text="@string/usb_storage_stop_button_mount"
+ />
+
+ </RelativeLayout>
+ </RelativeLayout>
+</LinearLayout>
diff --git a/core/res/res/layout/usb_storage_activity.xml b/core/res/res/layout/usb_storage_activity.xml
new file mode 100644
index 0000000..86bfadb
--- /dev/null
+++ b/core/res/res/layout/usb_storage_activity.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/main"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:padding="18dip"
+ >
+
+ <ImageView android:id="@+id/icon"
+ android:layout_centerHorizontal="true"
+ android:layout_alignParentTop="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/usb_android" />
+
+ <TextView android:id="@+id/banner"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@id/icon"
+ android:layout_marginTop="10dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="24sp"
+ android:gravity="center"
+ android:text="@string/usb_storage_title" />
+
+ <TextView android:id="@+id/message"
+ android:layout_below="@id/banner"
+ android:layout_marginTop="10dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="14sp"
+ android:gravity="center"
+ android:text="@string/usb_storage_message" />
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@id/message"
+ android:layout_marginTop="20dip"
+ >
+
+ <Button android:id="@+id/mount_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="18dip"
+ android:paddingRight="18dip"
+ android:text="@string/usb_storage_button_mount"
+ />
+ <Button android:id="@+id/unmount_button"
+ android:visibility="gone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="18dip"
+ android:paddingRight="18dip"
+ android:text="@string/usb_storage_stop_button_mount"
+ />
+
+ </RelativeLayout>
+</RelativeLayout>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 42553d4..8f97c13 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2008,21 +2008,23 @@
<string name="googlewebcontenthelper_loading">Loading\u2026</string>
<!-- USB storage dialog strings -->
- <!-- This is the label for the activity, and should never be visible to the user. -->
+ <!-- This is the title for the activity's window. -->
+ <string name="usb_storage_activity_title">USB Mass Storage</string>
+
<!-- See USB_STORAGE. USB_STORAGE_DIALOG: After the user selects the notification, a dialog is shown asking if he wants to mount. This is the title. -->
<string name="usb_storage_title">USB connected</string>
<!-- See USB_STORAGE. This is the message. -->
- <string name="usb_storage_message">You have connected your phone to your computer via USB. Select \"Mount\" if you want to copy files between your computer and your phone\'s SD card.</string>
+ <string name="usb_storage_message">You have connected your phone to your computer via USB. Select the button below if you want to copy files between your computer and your Android\u2018s SD card.</string>
<!-- See USB_STORAGE. This is the button text to mount the phone on the computer. -->
- <string name="usb_storage_button_mount">Mount</string>
- <!-- See USB_STORAGE. This is the button text to ignore the plugging in of the phone.. -->
- <string name="usb_storage_button_unmount">Don\'t mount</string>
+ <string name="usb_storage_button_mount">Turn on USB storage</string>
<!-- See USB_STORAGE_DIALOG. If there was an error mounting, this is the text. -->
<string name="usb_storage_error_message">There is a problem using your SD card for USB storage.</string>
<!-- USB_STORAGE: When the user connects the phone to a computer via USB, we show a notification asking if he wants to share files across. This is the title -->
<string name="usb_storage_notification_title">USB connected</string>
<!-- See USB_STORAGE. This is the message. -->
<string name="usb_storage_notification_message">Select to copy files to/from your computer.</string>
+
+
<!-- USB_STORAGE_STOP: While USB storage is enabled, we show a notification dialog asking if he wants to stop. This is the title -->
<string name="usb_storage_stop_notification_title">Turn off USB storage</string>
<!-- See USB_STORAGE. This is the message. -->
@@ -2031,15 +2033,13 @@
<!-- USB storage stop dialog strings -->
<!-- This is the label for the activity, and should never be visible to the user. -->
<!-- See USB_STORAGE_STOP. USB_STORAGE_STOP_DIALOG: After the user selects the notification, a dialog is shown asking if he wants to stop usb storage. This is the title. -->
- <string name="usb_storage_stop_title">Turn off USB storage</string>
+ <string name="usb_storage_stop_title">USB storage in use</string>
<!-- See USB_STORAGE_STOP. This is the message. -->
- <string name="usb_storage_stop_message">Before turning off USB storage, make sure you have unmounted on the USB host. Select \"Turn Off\" to turn off USB storage.</string>
+ <string name="usb_storage_stop_message">Before turning off USB storage, make sure you have unmounted (\u201cejected\u201d) your Android\u2018s SD card from your computer.</string>
<!-- See USB_STORAGE_STOP. This is the button text to stop usb storage. -->
- <string name="usb_storage_stop_button_mount">Turn Off</string>
- <!-- See USB_STORAGE_STOP. This is the button text to cancel stoping usb storage. -->
- <string name="usb_storage_stop_button_unmount">Cancel</string>
+ <string name="usb_storage_stop_button_mount">Turn off USB storage</string>
<!-- See USB_STORAGE_STOP_DIALOG. If there was an error stopping, this is the text. -->
- <string name="usb_storage_stop_error_message">We\'ve encountered a problem turning off USB storage. Check to make sure you have unmounted the USB host, then try again.</string>
+ <string name="usb_storage_stop_error_message">There was a problem turning off USB storage. Check to make sure you have unmounted the USB host, then try again.</string>
<!-- External media format dialog strings -->
<!-- This is the label for the activity, and should never be visible to the user. -->
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 9a1f8a6..05cea46 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -206,7 +206,7 @@
if (mUmsEnabled) {
if (newUmsNotifyEnabled) {
Intent intent = new Intent();
- intent.setClass(mContext, com.android.internal.app.UsbStorageStopActivity.class);
+ intent.setClass(mContext, com.android.internal.app.UsbStorageActivity.class);
PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
setUsbStorageNotification(com.android.internal.R.string.usb_storage_stop_notification_title,
com.android.internal.R.string.usb_storage_stop_notification_message,
@@ -866,7 +866,7 @@
if (mUmsActiveNotify) {
Intent intent = new Intent();
- intent.setClass(mContext, com.android.internal.app.UsbStorageStopActivity.class);
+ intent.setClass(mContext, com.android.internal.app.UsbStorageActivity.class);
PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
setUsbStorageNotification(com.android.internal.R.string.usb_storage_stop_notification_title,
com.android.internal.R.string.usb_storage_stop_notification_message,