OSDN Git Service

[MasterClear] fix race in showing dialog
authorAndres Morales <anmorales@google.com>
Mon, 1 Jun 2015 23:23:41 +0000 (16:23 -0700)
committerAndres Morales <anmorales@google.com>
Mon, 1 Jun 2015 23:23:41 +0000 (16:23 -0700)
commitc17ec1be19a45dec12d601f1e6a545f558bdf293
treea490036365c501cf74606781d3e120ed2fc343f9
parent47ed6ca004dcfe9498269602b109b1e667fae287
[MasterClear] fix race in showing dialog

Wiping the PDB effectively starves all other threads from
accessing flash, and freezes the UI. We throw up a dialog
but there's a race between drawing the dialog and starting the
wipe.

Show the dialog in onPreExecute to fix this.

Bug: 20854355
Change-Id: I8462f5ed3ff53ed574ebc1be416a821c2086b4f5
src/com/android/settings/MasterClearConfirm.java