Merge "Do not show the redundant RemoveAccountFailureDialog" into sc-v2-dev am: 5377da37f1
am: 56c54e4bd9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16413584 Change-Id: Ieab64ecfdfc7c828f68a8a508540bbef211b5fc4
This commit is contained in:
@@ -53,6 +53,7 @@ import java.io.IOException;
|
|||||||
public class RemoveAccountPreferenceController extends AbstractPreferenceController
|
public class RemoveAccountPreferenceController extends AbstractPreferenceController
|
||||||
implements PreferenceControllerMixin, OnClickListener {
|
implements PreferenceControllerMixin, OnClickListener {
|
||||||
|
|
||||||
|
private static final String TAG = "RemoveAccountPrefController";
|
||||||
private static final String KEY_REMOVE_ACCOUNT = "remove_account";
|
private static final String KEY_REMOVE_ACCOUNT = "remove_account";
|
||||||
|
|
||||||
private final MetricsFeatureProvider mMetricsFeatureProvider;
|
private final MetricsFeatureProvider mMetricsFeatureProvider;
|
||||||
@@ -175,10 +176,11 @@ public class RemoveAccountPreferenceController extends AbstractPreferenceControl
|
|||||||
| IOException
|
| IOException
|
||||||
| AuthenticatorException e) {
|
| AuthenticatorException e) {
|
||||||
// handled below
|
// handled below
|
||||||
}
|
Log.w(TAG, "Remove account error: " + e);
|
||||||
if (failed) {
|
|
||||||
RemoveAccountFailureDialog.show(getTargetFragment());
|
RemoveAccountFailureDialog.show(getTargetFragment());
|
||||||
} else {
|
}
|
||||||
|
Log.i(TAG, "failed: " + failed);
|
||||||
|
if (!failed) {
|
||||||
targetActivity.finish();
|
targetActivity.finish();
|
||||||
}
|
}
|
||||||
}, null, mUserHandle);
|
}, null, mUserHandle);
|
||||||
@@ -210,7 +212,7 @@ public class RemoveAccountPreferenceController extends AbstractPreferenceControl
|
|||||||
final Context context = getActivity();
|
final Context context = getActivity();
|
||||||
|
|
||||||
return new AlertDialog.Builder(context)
|
return new AlertDialog.Builder(context)
|
||||||
.setTitle(R.string.really_remove_account_title)
|
.setTitle(R.string.remove_account_label)
|
||||||
.setMessage(R.string.remove_account_failed)
|
.setMessage(R.string.remove_account_failed)
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
.setPositiveButton(android.R.string.ok, null)
|
||||||
.create();
|
.create();
|
||||||
|
Reference in New Issue
Block a user