Crash fix in BubbleStachedHandleViewController.
Switching between gesture nav and 3 button nav may lead to a state where the RegionSamplingHelper is unexpectedly null. Bug: 269670598 Test: In Settings switch navigation modes until launcher crashes. Change-Id: I56d6eea81070f367db292c1ded9866452f6e2650
This commit is contained in:
+8
-6
@@ -203,12 +203,14 @@ public class BubbleStashedHandleViewController {
|
||||
private void updateRegionSampling() {
|
||||
boolean handleVisible = mStashedHandleView.getVisibility() == VISIBLE
|
||||
&& mBubbleStashController.isStashed();
|
||||
mRegionSamplingHelper.setWindowVisible(handleVisible);
|
||||
if (handleVisible) {
|
||||
mStashedHandleView.updateSampledRegion(mStashedHandleBounds);
|
||||
mRegionSamplingHelper.start(mStashedHandleView.getSampledRegion());
|
||||
} else {
|
||||
mRegionSamplingHelper.stop();
|
||||
if (mRegionSamplingHelper != null) {
|
||||
mRegionSamplingHelper.setWindowVisible(handleVisible);
|
||||
if (handleVisible) {
|
||||
mStashedHandleView.updateSampledRegion(mStashedHandleBounds);
|
||||
mRegionSamplingHelper.start(mStashedHandleView.getSampledRegion());
|
||||
} else {
|
||||
mRegionSamplingHelper.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user