Crash when powering off.
authorMathias Jeppsson <mathias.jeppsson@sonyericsson.com>
Tue, 17 Aug 2010 11:33:09 +0000 (13:33 +0200)
committerJohan Redestig <johan.redestig@sonyericsson.com>
Tue, 17 Aug 2010 11:33:09 +0000 (13:33 +0200)
commit8534a8e438ff35511051cf74f8f73d52c8b3b1f4
treedacab49496d260991cfb12bb40dbf2acea242f99
parentc708e38356e9c381b640ef96db3b0b0fdd41d433
Crash when powering off.

Fixing a race condition. If "confirm" is true and the shutdown
dialog is shown it may take some time before the user presses the
ok button. During this time a new call to shutdown may be made with
confirm=false. When this happens the shutdown thread is started by
the second call, and later when the users presses the ok button. This
results in ShutdownThread.beginShutdownSequence() being called
twice. I.e., the beginShutdownSequence lacks the proper protection
for this error case.

Change-Id: Ib9b01c5a43f4dc23de09057f3fc1507000317faf
core/java/com/android/internal/app/ShutdownThread.java