Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aea2cd05 authored by Lixin Yue's avatar Lixin Yue Committed by Jaikumar Ganesh
Browse files

Fix the %1 bug in UI when sdcard full

parent 065aa142
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+2 −2
Original line number Diff line number Diff line
@@ -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)