|
@@ -205,8 +205,14 @@ public class StorageMigration {
|
|
|
if (succeed) {
|
|
|
mProgressDialog.hide();
|
|
|
} else {
|
|
|
- mProgressDialog.getButton(ProgressDialog.BUTTON_POSITIVE).setVisibility(View.VISIBLE);
|
|
|
- mProgressDialog.setIndeterminateDrawable(mContext.getResources().getDrawable(R.drawable.image_fail));
|
|
|
+
|
|
|
+ if (code == R.string.file_migration_failed_not_readable) {
|
|
|
+ mProgressDialog.hide();
|
|
|
+ askToStillMove();
|
|
|
+ } else {
|
|
|
+ mProgressDialog.getButton(ProgressDialog.BUTTON_POSITIVE).setVisibility(View.VISIBLE);
|
|
|
+ mProgressDialog.setIndeterminateDrawable(mContext.getResources().getDrawable(R.drawable.image_fail));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (mListener != null) {
|
|
@@ -214,6 +220,28 @@ public class StorageMigration {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void askToStillMove() {
|
|
|
+ new AlertDialog.Builder(mContext)
|
|
|
+ .setTitle(R.string.file_migration_source_not_readable_title)
|
|
|
+ .setMessage(mContext.getString(R.string.file_migration_source_not_readable, mStorageTarget))
|
|
|
+ .setNegativeButton(R.string.common_no, new OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(DialogInterface dialogInterface, int i) {
|
|
|
+ dialogInterface.dismiss();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .setPositiveButton(R.string.common_yes, new OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(DialogInterface dialogInterface, int i) {
|
|
|
+ if (mListener != null) {
|
|
|
+ mListener.onStorageMigrationFinished(mStorageTarget, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .create()
|
|
|
+ .show();
|
|
|
+ }
|
|
|
+
|
|
|
protected boolean[] saveAccountsSyncStatus() {
|
|
|
boolean[] syncs = new boolean[mOcAccounts.length];
|
|
|
for (int i = 0; i < mOcAccounts.length; ++i) {
|