diff options
author | Zhomart Mukhamejanov <zhomart@google.com> | 2018-05-24 18:11:47 +0200 |
---|---|---|
committer | Zhomart Mukhamejanov <zhomart@google.com> | 2018-06-01 01:12:28 +0200 |
commit | f6522eba71576776c9a2f9efb2ab0d1edb3eec46 (patch) | |
tree | 9c07e4b962f81e7a0f44edbfe812343397ffd3c9 /updater_sample/src | |
parent | Merge "updater_sample: Improve update completion handling" (diff) | |
download | android_bootable_recovery-f6522eba71576776c9a2f9efb2ab0d1edb3eec46.tar android_bootable_recovery-f6522eba71576776c9a2f9efb2ab0d1edb3eec46.tar.gz android_bootable_recovery-f6522eba71576776c9a2f9efb2ab0d1edb3eec46.tar.bz2 android_bootable_recovery-f6522eba71576776c9a2f9efb2ab0d1edb3eec46.tar.lz android_bootable_recovery-f6522eba71576776c9a2f9efb2ab0d1edb3eec46.tar.xz android_bootable_recovery-f6522eba71576776c9a2f9efb2ab0d1edb3eec46.tar.zst android_bootable_recovery-f6522eba71576776c9a2f9efb2ab0d1edb3eec46.zip |
Diffstat (limited to 'updater_sample/src')
-rw-r--r-- | updater_sample/src/com/example/android/systemupdatersample/UpdateManager.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/updater_sample/src/com/example/android/systemupdatersample/UpdateManager.java b/updater_sample/src/com/example/android/systemupdatersample/UpdateManager.java index f5c2ea5ab..145cc83b1 100644 --- a/updater_sample/src/com/example/android/systemupdatersample/UpdateManager.java +++ b/updater_sample/src/com/example/android/systemupdatersample/UpdateManager.java @@ -39,6 +39,8 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.DoubleConsumer; import java.util.function.IntConsumer; +import javax.annotation.concurrent.GuardedBy; + /** * Manages the update flow. It has its own state (in memory), separate from * {@link UpdateEngine}'s state. Asynchronously interacts with the {@link UpdateEngine}. @@ -62,11 +64,16 @@ public class UpdateManager { private AtomicBoolean mManualSwitchSlotRequired = new AtomicBoolean(true); + @GuardedBy("mLock") private UpdateData mLastUpdateData = null; + @GuardedBy("mLock") private IntConsumer mOnStateChangeCallback = null; + @GuardedBy("mLock") private IntConsumer mOnEngineStatusUpdateCallback = null; + @GuardedBy("mLock") private DoubleConsumer mOnProgressUpdateCallback = null; + @GuardedBy("mLock") private IntConsumer mOnEngineCompleteCallback = null; private final Object mLock = new Object(); |