Merge "Disable seamless rotation for 3 and 2 button mode" into ub-launcher3-qt-dev
am: 19f7c6fefb
Change-Id: Iec2636f14a157e9a9b5e9c47e1c258b9158dc942
This commit is contained in:
commit
bbbfc62c63
4 files changed
+17
-10
No files matched your search
@@ -47,7 +47,6 @@ import com.android.launcher3.LauncherStateManager;
|
|||||||
import com.android.launcher3.LauncherStateManager.StateHandler;
|
import com.android.launcher3.LauncherStateManager.StateHandler;
|
||||||
import com.android.launcher3.QuickstepAppTransitionManagerImpl;
|
import com.android.launcher3.QuickstepAppTransitionManagerImpl;
|
||||||
import com.android.launcher3.Utilities;
|
import com.android.launcher3.Utilities;
|
||||||
import com.android.launcher3.dragndrop.DragLayer;
|
|
||||||
import com.android.launcher3.proxy.ProxyActivityStarter;
|
import com.android.launcher3.proxy.ProxyActivityStarter;
|
||||||
import com.android.launcher3.proxy.StartActivityParams;
|
import com.android.launcher3.proxy.StartActivityParams;
|
||||||
import com.android.quickstep.OverviewInteractionState;
|
import com.android.quickstep.OverviewInteractionState;
|
||||||
@@ -64,10 +63,14 @@ import java.util.zip.Deflater;
|
|||||||
|
|
||||||
public class UiFactory extends RecentsUiFactory {
|
public class UiFactory extends RecentsUiFactory {
|
||||||
|
|
||||||
public static Runnable enableLiveTouchControllerChanges(DragLayer dl) {
|
public static Runnable enableLiveUIChanges(Launcher launcher) {
|
||||||
NavigationModeChangeListener listener = m -> dl.recreateControllers();
|
NavigationModeChangeListener listener = m -> {
|
||||||
SysUINavigationMode mode = SysUINavigationMode.INSTANCE.get(dl.getContext());
|
launcher.getDragLayer().recreateControllers();
|
||||||
mode.addModeChangeListener(listener);
|
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);
|
return () -> mode.removeModeChangeListener(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1063,7 +1063,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||||||
|
|
||||||
// Setup the drag layer
|
// Setup the drag layer
|
||||||
mDragLayer.setup(mDragController, mWorkspace);
|
mDragLayer.setup(mDragController, mWorkspace);
|
||||||
mCancelTouchController = UiFactory.enableLiveTouchControllerChanges(mDragLayer);
|
mCancelTouchController = UiFactory.enableLiveUIChanges(this);
|
||||||
|
|
||||||
mWorkspace.setup(mDragController);
|
mWorkspace.setup(mDragController);
|
||||||
// Until the workspace is bound, ensure that we keep the wallpaper offset locked to the
|
// Until the workspace is bound, ensure that we keep the wallpaper offset locked to the
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ public class RotationHelper implements OnSharedPreferenceChangeListener {
|
|||||||
|
|
||||||
// This is used to defer setting rotation flags until the activity is being created
|
// This is used to defer setting rotation flags until the activity is being created
|
||||||
private boolean mInitialized;
|
private boolean mInitialized;
|
||||||
public boolean mDestroyed;
|
private boolean mDestroyed;
|
||||||
|
private boolean mRotationHasDifferentUI;
|
||||||
|
|
||||||
private int mLastActivityFlags = -1;
|
private int mLastActivityFlags = -1;
|
||||||
|
|
||||||
@@ -92,8 +93,12 @@ public class RotationHelper implements OnSharedPreferenceChangeListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRotationHadDifferentUI(boolean rotationHasDifferentUI) {
|
||||||
|
mRotationHasDifferentUI = rotationHasDifferentUI;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean homeScreenCanRotate() {
|
public boolean homeScreenCanRotate() {
|
||||||
return mIgnoreAutoRotateSettings || mAutoRotateEnabled
|
return mRotationHasDifferentUI || mIgnoreAutoRotateSettings || mAutoRotateEnabled
|
||||||
|| mStateHandlerRequest != REQUEST_NONE
|
|| mStateHandlerRequest != REQUEST_NONE
|
||||||
|| mLauncher.getDeviceProfile().isMultiWindowMode;
|
|| mLauncher.getDeviceProfile().isMultiWindowMode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import com.android.launcher3.DeviceProfile;
|
|||||||
import com.android.launcher3.Launcher;
|
import com.android.launcher3.Launcher;
|
||||||
import com.android.launcher3.LauncherState.ScaleAndTranslation;
|
import com.android.launcher3.LauncherState.ScaleAndTranslation;
|
||||||
import com.android.launcher3.LauncherStateManager.StateHandler;
|
import com.android.launcher3.LauncherStateManager.StateHandler;
|
||||||
import com.android.launcher3.dragndrop.DragLayer;
|
|
||||||
import com.android.launcher3.graphics.RotationMode;
|
import com.android.launcher3.graphics.RotationMode;
|
||||||
import com.android.launcher3.util.TouchController;
|
import com.android.launcher3.util.TouchController;
|
||||||
|
|
||||||
@@ -40,7 +39,7 @@ public class UiFactory {
|
|||||||
launcher.getDragController(), new AllAppsSwipeController(launcher)};
|
launcher.getDragController(), new AllAppsSwipeController(launcher)};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Runnable enableLiveTouchControllerChanges(DragLayer dl) {
|
public static Runnable enableLiveUIChanges(Launcher l) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user