Fix issue with delegate consumers being overwritten
- Whenever the delegate consumer sets itself as active, it will cancel the base consumers which can cause onConsumerInactive() which will clear the active consumer. Instead, we should only clear the active consumer, and in the case where isConsumerDetachedFromGesture() is checked, only check the active consumer before resetting. ie. base ic (detached) -> on touch up (do nothing) -> onConsumerInactive (active == base) -> reset base ic (detached), wrapped ic (active) -> onConsumerInactive (active != base) -> on touch up (active == wrapped) -> reset base ic (detached, active), wrapped ic -> on touch up (do nothing) -> onConsumerInactive (active == base) -> reset base ic (not detached) -> on touch up (active == base) -> reset base ic (not detached), wrapped ic (active) -> onConsumerInactive (active != base) -> on touch up (active == wrapped) -> reset base ic (not detached, active), wrapped ic -> on touch up (active == base) -> reset Change-Id: I2d623c501d9c9799dadcf2005f34e1e0062c113f
Loading
Please register or sign in to comment