OSDN Git Service

Fix edge cases leading to backup hanging forever
authorChristopher Tate <ctate@google.com>
Tue, 17 Jan 2012 23:20:32 +0000 (15:20 -0800)
committerChristopher Tate <ctate@google.com>
Wed, 18 Jan 2012 23:44:47 +0000 (15:44 -0800)
commit6de74ff2a45591455cbb5c21d78904065e89ec89
tree70c9ca44545f3e67e3a61d5e69b0763f8f7d4c9a
parentea77ed02e44ebd177e3c7e1797d9cb804820ce43
Fix edge cases leading to backup hanging forever

Plug a couple of apparent code paths (one not obviously reachable, but
fixed here on general principles) that could lead to a backup pass
getting confused partway through and simply never properly completing.
In this state it would leave its wakelock held forever until next
reboot.  Bug 5828859.

Those fixes are a total of two lines of code. The rest of the patch
adds a textual journal of the most recently completed (or ongoing!)
backup pass's progress, with an eye to being able to isolate any such
issues that may crop up in the future.

Change-Id: If8a5e8aba11db5a1e618d8b9c9ba3038dd5377a1
core/java/com/android/internal/backup/BackupConstants.java
services/java/com/android/server/BackupManagerService.java