Merge "Maintain fake nav bar position in overview for landscape" into ub-launcher3-rvc-dev
This commit is contained in:
commit
c217c72bcc
6 files changed
+51
-9
No files matched your search
@@ -150,6 +150,9 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
|
||||
return deviceState.isInDeferredGestureRegion(ev);
|
||||
}
|
||||
|
||||
public abstract void onExitOverview(RecentsAnimationDeviceState deviceState,
|
||||
Runnable exitRunnable);
|
||||
|
||||
/**
|
||||
* Updates the prediction state to the overview state.
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,6 @@ import android.graphics.Region;
|
||||
import android.os.Process;
|
||||
import android.os.UserManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.annotation.BinderThread;
|
||||
@@ -107,7 +106,7 @@ public class RecentsAnimationDeviceState implements
|
||||
if (frozen) {
|
||||
return;
|
||||
}
|
||||
mOrientationTouchTransformer.enableMultipleRegions(false, mDefaultDisplay.getInfo());
|
||||
enableMultipleRegions(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -118,6 +117,13 @@ public class RecentsAnimationDeviceState implements
|
||||
|
||||
private final List<ComponentName> mGestureBlockedActivities;
|
||||
private Runnable mOnDestroyFrozenTaskRunnable;
|
||||
/**
|
||||
* Set to true when user swipes to recents. In recents, we ignore the state of the recents
|
||||
* task list being frozen or not to allow the user to keep interacting with nav bar rotation
|
||||
* they went into recents with as opposed to defaulting to the default display rotation.
|
||||
* TODO: (b/156984037) For when user rotates after entering overview
|
||||
*/
|
||||
private boolean mInOverview;
|
||||
|
||||
public RecentsAnimationDeviceState(Context context) {
|
||||
mContext = context;
|
||||
@@ -508,7 +514,18 @@ public class RecentsAnimationDeviceState implements
|
||||
mOrientationTouchTransformer.transform(event);
|
||||
}
|
||||
|
||||
void onSwipeUpToOverview(BaseActivityInterface activityInterface) {
|
||||
mInOverview = true;
|
||||
activityInterface.onExitOverview(this, () -> {
|
||||
mInOverview = false;
|
||||
enableMultipleRegions(false);
|
||||
});
|
||||
}
|
||||
|
||||
void enableMultipleRegions(boolean enable) {
|
||||
if (mInOverview) {
|
||||
return;
|
||||
}
|
||||
mOrientationTouchTransformer.enableMultipleRegions(enable, mDefaultDisplay.getInfo());
|
||||
UI_HELPER_EXECUTOR.execute(() -> {
|
||||
int quickStepStartingRotation =
|
||||
|
||||
Reference in new issue
Block a user