Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +23 −1 Original line number Original line Diff line number Diff line Loading @@ -61,7 +61,6 @@ import com.android.launcher3.folder.FolderIcon; import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.ItemClickHandler; import com.android.launcher3.touch.ItemClickHandler; import com.android.launcher3.util.PackageManagerHelper; import com.android.launcher3.util.PackageManagerHelper; import com.android.launcher3.util.SettingsCache; import com.android.launcher3.util.SettingsCache; Loading Loading @@ -108,6 +107,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ private final boolean mIsSafeModeEnabled; private final boolean mIsSafeModeEnabled; private final boolean mIsUserSetupComplete; private final boolean mIsUserSetupComplete; private boolean mIsDestroyed = false; private boolean mIsDestroyed = false; // The flag to know if the window is excluded from magnification region computation. private boolean mIsExcludeFromMagnificationRegion = false; public TaskbarActivityContext(Context windowContext, DeviceProfile dp, public TaskbarActivityContext(Context windowContext, DeviceProfile dp, TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider Loading Loading @@ -520,4 +521,25 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ protected boolean isUserSetupComplete() { protected boolean isUserSetupComplete() { return mIsUserSetupComplete; return mIsUserSetupComplete; } } /** * Called when we determine the touchable region. * * @param exclude {@code true} then the magnification region computation will omit the window. */ public void excludeFromMagnificationRegion(boolean exclude) { if (mIsExcludeFromMagnificationRegion == exclude) { return; } mIsExcludeFromMagnificationRegion = exclude; if (exclude) { mWindowLayoutParams.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION; } else { mWindowLayoutParams.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION; } mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams); } } } quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayerController.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -137,12 +137,14 @@ public class TaskbarDragLayerController { // Always have nav buttons be touchable // Always have nav buttons be touchable mControllers.navbarButtonsViewController.addVisibleButtonsRegion( mControllers.navbarButtonsViewController.addVisibleButtonsRegion( mTaskbarDragLayer, insetsInfo.touchableRegion); mTaskbarDragLayer, insetsInfo.touchableRegion); boolean insetsIsTouchableRegion = true; if (mTaskbarDragLayer.getAlpha() < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD) { if (mTaskbarDragLayer.getAlpha() < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD) { // Let touches pass through us. // Let touches pass through us. insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); } else if (mControllers.navbarButtonsViewController.isImeVisible()) { } else if (mControllers.navbarButtonsViewController.isImeVisible()) { insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_CONTENT); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_CONTENT); insetsIsTouchableRegion = false; } else if (!mControllers.uiController.isTaskbarTouchable()) { } else if (!mControllers.uiController.isTaskbarTouchable()) { // Let touches pass through us. // Let touches pass through us. insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); Loading @@ -151,9 +153,11 @@ public class TaskbarDragLayerController { // Taskbar has some touchable elements, take over the full taskbar area // Taskbar has some touchable elements, take over the full taskbar area insetsInfo.setTouchableInsets(mActivity.isTaskbarWindowFullscreen() insetsInfo.setTouchableInsets(mActivity.isTaskbarWindowFullscreen() ? TOUCHABLE_INSETS_FRAME : TOUCHABLE_INSETS_CONTENT); ? TOUCHABLE_INSETS_FRAME : TOUCHABLE_INSETS_CONTENT); insetsIsTouchableRegion = false; } else { } else { insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); } } mActivity.excludeFromMagnificationRegion(insetsIsTouchableRegion); } } /** /** Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +23 −1 Original line number Original line Diff line number Diff line Loading @@ -61,7 +61,6 @@ import com.android.launcher3.folder.FolderIcon; import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.ItemClickHandler; import com.android.launcher3.touch.ItemClickHandler; import com.android.launcher3.util.PackageManagerHelper; import com.android.launcher3.util.PackageManagerHelper; import com.android.launcher3.util.SettingsCache; import com.android.launcher3.util.SettingsCache; Loading Loading @@ -108,6 +107,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ private final boolean mIsSafeModeEnabled; private final boolean mIsSafeModeEnabled; private final boolean mIsUserSetupComplete; private final boolean mIsUserSetupComplete; private boolean mIsDestroyed = false; private boolean mIsDestroyed = false; // The flag to know if the window is excluded from magnification region computation. private boolean mIsExcludeFromMagnificationRegion = false; public TaskbarActivityContext(Context windowContext, DeviceProfile dp, public TaskbarActivityContext(Context windowContext, DeviceProfile dp, TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider Loading Loading @@ -520,4 +521,25 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ protected boolean isUserSetupComplete() { protected boolean isUserSetupComplete() { return mIsUserSetupComplete; return mIsUserSetupComplete; } } /** * Called when we determine the touchable region. * * @param exclude {@code true} then the magnification region computation will omit the window. */ public void excludeFromMagnificationRegion(boolean exclude) { if (mIsExcludeFromMagnificationRegion == exclude) { return; } mIsExcludeFromMagnificationRegion = exclude; if (exclude) { mWindowLayoutParams.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION; } else { mWindowLayoutParams.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION; } mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams); } } }
quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayerController.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -137,12 +137,14 @@ public class TaskbarDragLayerController { // Always have nav buttons be touchable // Always have nav buttons be touchable mControllers.navbarButtonsViewController.addVisibleButtonsRegion( mControllers.navbarButtonsViewController.addVisibleButtonsRegion( mTaskbarDragLayer, insetsInfo.touchableRegion); mTaskbarDragLayer, insetsInfo.touchableRegion); boolean insetsIsTouchableRegion = true; if (mTaskbarDragLayer.getAlpha() < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD) { if (mTaskbarDragLayer.getAlpha() < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD) { // Let touches pass through us. // Let touches pass through us. insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); } else if (mControllers.navbarButtonsViewController.isImeVisible()) { } else if (mControllers.navbarButtonsViewController.isImeVisible()) { insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_CONTENT); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_CONTENT); insetsIsTouchableRegion = false; } else if (!mControllers.uiController.isTaskbarTouchable()) { } else if (!mControllers.uiController.isTaskbarTouchable()) { // Let touches pass through us. // Let touches pass through us. insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); Loading @@ -151,9 +153,11 @@ public class TaskbarDragLayerController { // Taskbar has some touchable elements, take over the full taskbar area // Taskbar has some touchable elements, take over the full taskbar area insetsInfo.setTouchableInsets(mActivity.isTaskbarWindowFullscreen() insetsInfo.setTouchableInsets(mActivity.isTaskbarWindowFullscreen() ? TOUCHABLE_INSETS_FRAME : TOUCHABLE_INSETS_CONTENT); ? TOUCHABLE_INSETS_FRAME : TOUCHABLE_INSETS_CONTENT); insetsIsTouchableRegion = false; } else { } else { insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION); } } mActivity.excludeFromMagnificationRegion(insetsIsTouchableRegion); } } /** /** Loading