Add fixed_rotation_transform to home settings
This sets the feature flag on launcher side and also updates the setting in Settings.Global Launcher DOES NOT listen to the Settings.Global change from adb anymore. This should take preference over setting it from command line. Also fix a related swipe to home animation bug that happened w/ merge conflict. Fixes: 150260456 Test: Set and unset, visually verified behavior. Tested w/ autorotate on and off. Checked Settings.Global value correctly updated via "adb shell settings get global fixed_rotation_transform" TODO: Update tests to reflect this new default-on fixed rotation behavior. Change-Id: Id95f006eb1e92a59e24b05567298fd21b1409b13
This commit is contained in:
1 parent
31ff98e144
commit
b9ec9319c5
13 files changed
+162
-91
No files matched your search
@@ -50,7 +50,16 @@ public final class PagedViewOrientedState {
|
||||
*/
|
||||
private boolean mDisableMultipleOrientations;
|
||||
|
||||
/**
|
||||
* Sets the appropriate {@link PagedOrientationHandler} for {@link #mOrientationHandler}
|
||||
* @param touchRotation The rotation the nav bar region that is touched is in
|
||||
* @param displayRotation Rotation of the display/device
|
||||
*/
|
||||
public void update(int touchRotation, int displayRotation) {
|
||||
if (mDisableMultipleOrientations) {
|
||||
return;
|
||||
}
|
||||
|
||||
mDisplayRotation = displayRotation;
|
||||
mTouchRotation = touchRotation;
|
||||
if (mTouchRotation == Surface.ROTATION_90) {
|
||||
@@ -62,20 +71,13 @@ public final class PagedViewOrientedState {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if the area where the user touched the nav bar is the expected
|
||||
* location for the given display rotation. Ex. bottom of phone in portrait, or left side of
|
||||
* phone in landscape, right side in seascape, etc.
|
||||
* False otherwise
|
||||
*/
|
||||
public boolean isTouchRegionNaturalForDisplay() {
|
||||
return mTouchRotation == mDisplayRotation;
|
||||
}
|
||||
|
||||
public boolean areMultipleLayoutOrientationsDisabled() {
|
||||
return mDisableMultipleOrientations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting this preference will render future calls to {@link #update(int, int)} as a no-op.
|
||||
*/
|
||||
public void disableMultipleOrientations(boolean disable) {
|
||||
mDisableMultipleOrientations = disable;
|
||||
if (disable) {
|
||||
|
||||
Reference in new issue
Block a user