Fix Jank when factory resetting

A progress dialog is shown and quickly disappear caused the UI jank.
The progress dialog should be shown only when erase external SD card
is needed because WipeDataTask only wipe SD card in it background
task. Other factory reset function is done in Thread thr.

Fixes: 140594314
Test: manual
Change-Id: I71ab1577165ceab79704b359c47c3f752d9dfc79
(cherry picked from commit d5b1510994)
This commit is contained in:
Raff Tsai
2019-09-30 14:39:32 +08:00
parent c73945bd84
commit 00d746fea3

View File

@@ -82,7 +82,7 @@ public class MasterClearReceiver extends BroadcastReceiver {
}
};
if (mWipeExternalStorage || mWipeEsims) {
if (mWipeExternalStorage) {
// thr will be started at the end of this task.
new WipeDataTask(context, thr).execute();
} else {