mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Merge "Allow dragging outside TaskView on fallback recents" into sc-v2-dev
This commit is contained in:
@@ -26,6 +26,7 @@ import android.app.ActivityManager.RunningTaskInfo;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -209,4 +210,11 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
|
||||
setDisallowScrollToClearAll(!state.hasClearAllButton());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent ev) {
|
||||
boolean result = super.onTouchEvent(ev);
|
||||
// Do not let touch escape to siblings below this view.
|
||||
return result || mActivity.getStateManager().getState().overviewUi();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,15 +40,16 @@ public class RecentsState implements BaseState<RecentsState> {
|
||||
private static final int FLAG_SHOW_AS_GRID = BaseState.getFlag(4);
|
||||
private static final int FLAG_SCRIM = BaseState.getFlag(5);
|
||||
private static final int FLAG_LIVE_TILE = BaseState.getFlag(6);
|
||||
private static final int FLAG_OVERVIEW_UI = BaseState.getFlag(7);
|
||||
|
||||
public static final RecentsState DEFAULT = new RecentsState(0,
|
||||
FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID | FLAG_SCRIM
|
||||
| FLAG_LIVE_TILE);
|
||||
| FLAG_LIVE_TILE | FLAG_OVERVIEW_UI);
|
||||
public static final RecentsState MODAL_TASK = new ModalState(1,
|
||||
FLAG_DISABLE_RESTORE | FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_MODAL
|
||||
| FLAG_SHOW_AS_GRID | FLAG_SCRIM | FLAG_LIVE_TILE);
|
||||
| FLAG_SHOW_AS_GRID | FLAG_SCRIM | FLAG_LIVE_TILE | FLAG_OVERVIEW_UI);
|
||||
public static final RecentsState BACKGROUND_APP = new BackgroundAppState(2,
|
||||
FLAG_DISABLE_RESTORE | FLAG_NON_INTERACTIVE | FLAG_FULL_SCREEN);
|
||||
FLAG_DISABLE_RESTORE | FLAG_NON_INTERACTIVE | FLAG_FULL_SCREEN | FLAG_OVERVIEW_UI);
|
||||
public static final RecentsState HOME = new RecentsState(3, 0);
|
||||
public static final RecentsState BG_LAUNCHER = new LauncherState(4, 0);
|
||||
|
||||
@@ -140,6 +141,13 @@ public class RecentsState implements BaseState<RecentsState> {
|
||||
return deviceProfile.isTablet && FeatureFlags.ENABLE_OVERVIEW_GRID.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* True if the state has overview panel visible.
|
||||
*/
|
||||
public boolean overviewUi() {
|
||||
return hasFlag(FLAG_OVERVIEW_UI);
|
||||
}
|
||||
|
||||
private static class ModalState extends RecentsState {
|
||||
|
||||
public ModalState(int id, int flags) {
|
||||
|
||||
Reference in New Issue
Block a user