diff options
author | Lixin Yue <L.X.YUE@motorola.com> | 2010-04-16 10:42:27 +0800 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2010-05-04 17:43:46 -0700 |
commit | 1d2222642c372e5635a906b6d6620ac35a304cf9 (patch) | |
tree | 33d633dcc47942cc5789e9151edbe74a76c74c99 | |
parent | 5dca0a3cb47d2349b07956bbba62642717bc577d (diff) | |
download | android_packages_apps_Bluetooth-1d2222642c372e5635a906b6d6620ac35a304cf9.tar.gz android_packages_apps_Bluetooth-1d2222642c372e5635a906b6d6620ac35a304cf9.tar.bz2 android_packages_apps_Bluetooth-1d2222642c372e5635a906b6d6620ac35a304cf9.zip |
Fix the %1 bug in UI when sdcard full
3 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java b/src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java index d63a6faa4..7a6d6d65f 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java +++ b/src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java @@ -322,7 +322,7 @@ public class BluetoothOppTransferActivity extends AlertActivity implements mLine2View.setText(tmp); mLine3View = (TextView)mView.findViewById(R.id.line3_view); tmp = getString(R.string.download_fail_line3, BluetoothOppUtility - .getStatusDescription(this, mTransInfo.mStatus)); + .getStatusDescription(this, mTransInfo.mStatus, mTransInfo.mDeviceName)); mLine3View.setText(tmp); } mLine5View = (TextView)mView.findViewById(R.id.line5_view); @@ -336,7 +336,7 @@ public class BluetoothOppTransferActivity extends AlertActivity implements mLine2View.setText(tmp); mLine3View = (TextView)mView.findViewById(R.id.line3_view); tmp = getString(R.string.download_fail_line3, BluetoothOppUtility.getStatusDescription( - this, mTransInfo.mStatus)); + this, mTransInfo.mStatus, mTransInfo.mDeviceName)); mLine3View.setText(tmp); mLine5View = (TextView)mView.findViewById(R.id.line5_view); mLine5View.setVisibility(View.GONE); diff --git a/src/com/android/bluetooth/opp/BluetoothOppTransferAdapter.java b/src/com/android/bluetooth/opp/BluetoothOppTransferAdapter.java index dfdd70985..690a646ff 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppTransferAdapter.java +++ b/src/com/android/bluetooth/opp/BluetoothOppTransferAdapter.java @@ -104,7 +104,7 @@ public class BluetoothOppTransferAdapter extends ResourceCursorAdapter { tv = (TextView)view.findViewById(R.id.complete_text); tv.setVisibility(View.VISIBLE); if (BluetoothShare.isStatusError(status)) { - tv.setText(BluetoothOppUtility.getStatusDescription(mContext, status)); + tv.setText(BluetoothOppUtility.getStatusDescription(mContext, status, deviceName)); } else { String completeText; if (dir == BluetoothShare.DIRECTION_INBOUND) { diff --git a/src/com/android/bluetooth/opp/BluetoothOppUtility.java b/src/com/android/bluetooth/opp/BluetoothOppUtility.java index 1b42f7455..42c6aedfa 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppUtility.java +++ b/src/com/android/bluetooth/opp/BluetoothOppUtility.java @@ -249,7 +249,7 @@ public class BluetoothOppUtility { /** * Get status description according to status code. */ - public static String getStatusDescription(Context context, int statusCode) { + public static String getStatusDescription(Context context, int statusCode, String deviceName) { String ret; if (statusCode == BluetoothShare.STATUS_PENDING) { ret = context.getString(R.string.status_pending); @@ -270,7 +270,7 @@ public class BluetoothOppUtility { } else if (statusCode == BluetoothShare.STATUS_CONNECTION_ERROR) { ret = context.getString(R.string.status_connection_error); } else if (statusCode == BluetoothShare.STATUS_ERROR_SDCARD_FULL) { - ret = context.getString(R.string.bt_sm_2_1); + ret = context.getString(R.string.bt_sm_2_1, deviceName); } else if ((statusCode == BluetoothShare.STATUS_BAD_REQUEST) || (statusCode == BluetoothShare.STATUS_LENGTH_REQUIRED) || (statusCode == BluetoothShare.STATUS_PRECONDITION_FAILED) |