Fix onIsStashedChanged() not called in 3 button mode
Calling this ensures we update touchableRegion accordingly. Since this will also start the stashed handle region sampling, which we don't need for 3 button mode, also adjust logic to check that the StashedHandleView is actually visible. Flag: None Test: Lock screen, run `adb shell cmd uimode night yes`, unlock Test: Lock screen, rotate, unlock In both cases, verify touchableRegion is accurate Fixes: 315393203 Change-Id: I951af6b97cad0ee0f362dc22f3996cfd9286a21e
This commit is contained in:
@@ -149,7 +149,7 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
});
|
||||
initRegionSampler();
|
||||
if (mActivity.isPhoneGestureNavMode()) {
|
||||
onIsStashedChanged(true);
|
||||
onIsStashedChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,10 +232,10 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
}
|
||||
|
||||
/** Called when taskbar is stashed or unstashed. */
|
||||
public void onIsStashedChanged(boolean isStashed) {
|
||||
mIsStashed = isStashed;
|
||||
public void onIsStashedChanged() {
|
||||
mIsStashed = isStashedHandleVisible();
|
||||
updateRegionSamplingWindowVisibility();
|
||||
if (isStashed) {
|
||||
if (mIsStashed) {
|
||||
mStashedHandleView.updateSampledRegion(mStashedHandleBounds);
|
||||
mRegionSamplingHelper.start(mStashedHandleView.getSampledRegion());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user