summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-03-15 13:49:14 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-03-15 13:49:14 -0700
commit7896f1bd551a466168144f58b6b5a9932cafa749 (patch)
tree35d0f1b29cea9c91366b7b97e5582631a862906f /packages
parente822af2f7bc5034046834cf6adce0565596d1758 (diff)
parentc9b82ebb97411cf4a8494dc83f57039bb77937c5 (diff)
downloadframeworks_base-7896f1bd551a466168144f58b6b5a9932cafa749.zip
frameworks_base-7896f1bd551a466168144f58b6b5a9932cafa749.tar.gz
frameworks_base-7896f1bd551a466168144f58b6b5a9932cafa749.tar.bz2
am c9b82ebb: am 3b7871c2: Merge "USB Manager string clean up:" into honeycomb-mr1
* commit 'c9b82ebb97411cf4a8494dc83f57039bb77937c5': USB Manager string clean up:
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/values/strings.xml9
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbAccessoryUriActivity.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbPermissionActivity.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java12
5 files changed, 33 insertions, 10 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 8998674..b4eea6e 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -129,7 +129,7 @@
<string name="usb_accessory_confirm_prompt">Open %1$s when this USB accessory is connected?</string>
<!-- Prompt for the USB accessory URI dialog [CHAR LIMIT=80] -->
- <string name="usb_accessory_uri_prompt">Additional information for this device may be found at: %1$s</string>
+ <string name="usb_accessory_uri_prompt">Additional information for this USB accessory may be found at: %1$s</string>
<!-- Title for USB accessory dialog. Used when the name of the accessory cannot be determined. [CHAR LIMIT=50] -->
<string name="title_usb_accessory">USB accessory</string>
@@ -137,7 +137,10 @@
<!-- View button label for USB dialogs. [CHAR LIMIT=15] -->
<string name="label_view">View</string>
- <!-- Ignore button label for USB dialogs. [CHAR LIMIT=15] -->
- <string name="label_ignore">Ignore</string>
+ <!-- Checkbox label for USB device dialogs. [CHAR LIMIT=50] -->
+ <string name="always_use_device">Use by default for this USB device</string>
+
+ <!-- Checkbox label for USB accessory dialogs. [CHAR LIMIT=50] -->
+ <string name="always_use_accessory">Use by default for this USB accessory</string>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbAccessoryUriActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbAccessoryUriActivity.java
index eefb1c6..5007cf4 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbAccessoryUriActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbAccessoryUriActivity.java
@@ -76,7 +76,7 @@ public class UsbAccessoryUriActivity extends AlertActivity
}
ap.mMessage = getString(R.string.usb_accessory_uri_prompt, mUri);
ap.mPositiveButtonText = getString(R.string.label_view);
- ap.mNegativeButtonText = getString(R.string.label_ignore);
+ ap.mNegativeButtonText = getString(android.R.string.cancel);
ap.mPositiveButtonListener = this;
ap.mNegativeButtonListener = this;
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java
index 2781246..030a261 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java
@@ -80,8 +80,8 @@ public class UsbConfirmActivity extends AlertActivity
ap.mMessage = getString(R.string.usb_device_confirm_prompt, appName);
mDisconnectedReceiver = new UsbDisconnectedReceiver(this, mDevice);
}
- ap.mPositiveButtonText = getString(com.android.internal.R.string.ok);
- ap.mNegativeButtonText = getString(com.android.internal.R.string.cancel);
+ ap.mPositiveButtonText = getString(android.R.string.ok);
+ ap.mNegativeButtonText = getString(android.R.string.cancel);
ap.mPositiveButtonListener = this;
ap.mNegativeButtonListener = this;
@@ -90,7 +90,11 @@ public class UsbConfirmActivity extends AlertActivity
Context.LAYOUT_INFLATER_SERVICE);
ap.mView = inflater.inflate(com.android.internal.R.layout.always_use_checkbox, null);
mAlwaysUse = (CheckBox)ap.mView.findViewById(com.android.internal.R.id.alwaysUse);
- mAlwaysUse.setText(com.android.internal.R.string.alwaysUse);
+ if (mDevice == null) {
+ mAlwaysUse.setText(R.string.always_use_accessory);
+ } else {
+ mAlwaysUse.setText(R.string.always_use_device);
+ }
mAlwaysUse.setOnCheckedChangeListener(this);
mClearDefaultHint = (TextView)ap.mView.findViewById(
com.android.internal.R.id.clearDefaultHint);
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbPermissionActivity.java
index 27cce6d..c384f50 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbPermissionActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbPermissionActivity.java
@@ -91,8 +91,8 @@ public class UsbPermissionActivity extends AlertActivity
ap.mMessage = getString(R.string.usb_device_permission_prompt, appName);
mDisconnectedReceiver = new UsbDisconnectedReceiver(this, mDevice);
}
- ap.mPositiveButtonText = getString(com.android.internal.R.string.ok);
- ap.mNegativeButtonText = getString(com.android.internal.R.string.cancel);
+ ap.mPositiveButtonText = getString(android.R.string.ok);
+ ap.mNegativeButtonText = getString(android.R.string.cancel);
ap.mPositiveButtonListener = this;
ap.mNegativeButtonListener = this;
@@ -101,7 +101,11 @@ public class UsbPermissionActivity extends AlertActivity
Context.LAYOUT_INFLATER_SERVICE);
ap.mView = inflater.inflate(com.android.internal.R.layout.always_use_checkbox, null);
mAlwaysUse = (CheckBox)ap.mView.findViewById(com.android.internal.R.id.alwaysUse);
- mAlwaysUse.setText(com.android.internal.R.string.alwaysUse);
+ if (mDevice == null) {
+ mAlwaysUse.setText(R.string.always_use_accessory);
+ } else {
+ mAlwaysUse.setText(R.string.always_use_device);
+ }
mAlwaysUse.setOnCheckedChangeListener(this);
mClearDefaultHint = (TextView)ap.mView.findViewById(
com.android.internal.R.id.clearDefaultHint);
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
index 7c63820..f61ecb1 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
@@ -31,6 +31,9 @@ import android.os.Parcelable;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.Log;
+import android.widget.CheckBox;
+
+import com.android.systemui.R;
import java.util.ArrayList;
@@ -58,6 +61,15 @@ public class UsbResolverActivity extends ResolverActivity {
super.onCreate(savedInstanceState, target, title, null, rList,
true /* Set alwaysUseOption to true to enable "always use this app" checkbox. */ );
+ CheckBox alwaysUse = (CheckBox)findViewById(com.android.internal.R.id.alwaysUse);
+ if (alwaysUse != null) {
+ if (mDevice == null) {
+ alwaysUse.setText(R.string.always_use_accessory);
+ } else {
+ alwaysUse.setText(R.string.always_use_device);
+ }
+ }
+
mDevice = (UsbDevice)target.getParcelableExtra(UsbManager.EXTRA_DEVICE);
if (mDevice != null) {
mDisconnectedReceiver = new UsbDisconnectedReceiver(this, mDevice);