Loading quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +8 −5 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.launcher3.LauncherStateManager; import com.android.launcher3.LauncherStateManager.StateHandler; import com.android.launcher3.QuickstepAppTransitionManagerImpl; import com.android.launcher3.Utilities; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.proxy.ProxyActivityStarter; import com.android.launcher3.proxy.StartActivityParams; import com.android.quickstep.OverviewInteractionState; Loading @@ -64,10 +63,14 @@ import java.util.zip.Deflater; public class UiFactory extends RecentsUiFactory { public static Runnable enableLiveTouchControllerChanges(DragLayer dl) { NavigationModeChangeListener listener = m -> dl.recreateControllers(); SysUINavigationMode mode = SysUINavigationMode.INSTANCE.get(dl.getContext()); mode.addModeChangeListener(listener); public static Runnable enableLiveUIChanges(Launcher launcher) { NavigationModeChangeListener listener = m -> { launcher.getDragLayer().recreateControllers(); launcher.getRotationHelper().setRotationHadDifferentUI(m != Mode.NO_BUTTON); }; SysUINavigationMode mode = SysUINavigationMode.INSTANCE.get(launcher); SysUINavigationMode.Mode m = mode.addModeChangeListener(listener); launcher.getRotationHelper().setRotationHadDifferentUI(m != Mode.NO_BUTTON); return () -> mode.removeModeChangeListener(listener); } Loading src/com/android/launcher3/Launcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -1063,7 +1063,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, // Setup the drag layer mDragLayer.setup(mDragController, mWorkspace); mCancelTouchController = UiFactory.enableLiveTouchControllerChanges(mDragLayer); mCancelTouchController = UiFactory.enableLiveUIChanges(this); mWorkspace.setup(mDragController); // Until the workspace is bound, ensure that we keep the wallpaper offset locked to the Loading src/com/android/launcher3/states/RotationHelper.java +7 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,8 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { // This is used to defer setting rotation flags until the activity is being created private boolean mInitialized; public boolean mDestroyed; private boolean mDestroyed; private boolean mRotationHasDifferentUI; private int mLastActivityFlags = -1; Loading @@ -92,8 +93,12 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { } } public void setRotationHadDifferentUI(boolean rotationHasDifferentUI) { mRotationHasDifferentUI = rotationHasDifferentUI; } public boolean homeScreenCanRotate() { return mIgnoreAutoRotateSettings || mAutoRotateEnabled return mRotationHasDifferentUI || mIgnoreAutoRotateSettings || mAutoRotateEnabled || mStateHandlerRequest != REQUEST_NONE || mLauncher.getDeviceProfile().isMultiWindowMode; } Loading src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java +1 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState.ScaleAndTranslation; import com.android.launcher3.LauncherStateManager.StateHandler; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.util.TouchController; Loading @@ -40,7 +39,7 @@ public class UiFactory { launcher.getDragController(), new AllAppsSwipeController(launcher)}; } public static Runnable enableLiveTouchControllerChanges(DragLayer dl) { public static Runnable enableLiveUIChanges(Launcher l) { return null; } Loading Loading
quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +8 −5 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.launcher3.LauncherStateManager; import com.android.launcher3.LauncherStateManager.StateHandler; import com.android.launcher3.QuickstepAppTransitionManagerImpl; import com.android.launcher3.Utilities; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.proxy.ProxyActivityStarter; import com.android.launcher3.proxy.StartActivityParams; import com.android.quickstep.OverviewInteractionState; Loading @@ -64,10 +63,14 @@ import java.util.zip.Deflater; public class UiFactory extends RecentsUiFactory { public static Runnable enableLiveTouchControllerChanges(DragLayer dl) { NavigationModeChangeListener listener = m -> dl.recreateControllers(); SysUINavigationMode mode = SysUINavigationMode.INSTANCE.get(dl.getContext()); mode.addModeChangeListener(listener); public static Runnable enableLiveUIChanges(Launcher launcher) { NavigationModeChangeListener listener = m -> { launcher.getDragLayer().recreateControllers(); launcher.getRotationHelper().setRotationHadDifferentUI(m != Mode.NO_BUTTON); }; SysUINavigationMode mode = SysUINavigationMode.INSTANCE.get(launcher); SysUINavigationMode.Mode m = mode.addModeChangeListener(listener); launcher.getRotationHelper().setRotationHadDifferentUI(m != Mode.NO_BUTTON); return () -> mode.removeModeChangeListener(listener); } Loading
src/com/android/launcher3/Launcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -1063,7 +1063,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, // Setup the drag layer mDragLayer.setup(mDragController, mWorkspace); mCancelTouchController = UiFactory.enableLiveTouchControllerChanges(mDragLayer); mCancelTouchController = UiFactory.enableLiveUIChanges(this); mWorkspace.setup(mDragController); // Until the workspace is bound, ensure that we keep the wallpaper offset locked to the Loading
src/com/android/launcher3/states/RotationHelper.java +7 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,8 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { // This is used to defer setting rotation flags until the activity is being created private boolean mInitialized; public boolean mDestroyed; private boolean mDestroyed; private boolean mRotationHasDifferentUI; private int mLastActivityFlags = -1; Loading @@ -92,8 +93,12 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { } } public void setRotationHadDifferentUI(boolean rotationHasDifferentUI) { mRotationHasDifferentUI = rotationHasDifferentUI; } public boolean homeScreenCanRotate() { return mIgnoreAutoRotateSettings || mAutoRotateEnabled return mRotationHasDifferentUI || mIgnoreAutoRotateSettings || mAutoRotateEnabled || mStateHandlerRequest != REQUEST_NONE || mLauncher.getDeviceProfile().isMultiWindowMode; } Loading
src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java +1 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState.ScaleAndTranslation; import com.android.launcher3.LauncherStateManager.StateHandler; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.util.TouchController; Loading @@ -40,7 +39,7 @@ public class UiFactory { launcher.getDragController(), new AllAppsSwipeController(launcher)}; } public static Runnable enableLiveTouchControllerChanges(DragLayer dl) { public static Runnable enableLiveUIChanges(Launcher l) { return null; } Loading