OSDN Git Service

Fix race conditions for camera prewarm service
authorJorim Jaggi <jjaggi@google.com>
Tue, 18 Aug 2015 03:17:30 +0000 (20:17 -0700)
committerJorim Jaggi <jjaggi@google.com>
Wed, 19 Aug 2015 00:01:45 +0000 (00:01 +0000)
commitf610bd78b2cf574faa197ed9f21128ac7795a407
treedd292ca717e95b6afee95a8158ce69195cc26d5a
parent0b8045425ff58f992046ff2be35bc91001dabf7b
Fix race conditions for camera prewarm service

When the unbind request came in before the service was actually
bound, we dropped the unbind request because mPrewarmBound was still
false. Fix that by tracking whether a bind is pending and if a unbind
event comes in during that time, set another flag to unbind it
directly again when the service is actually bound. In addition, don't
allow binding again if any of the previous events are still pending.

Bug: 23143748
Change-Id: I2b8ace86e35479a9848668a3462a2ce687835413
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java