Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java +1 −1 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) { return; } mTaskViewSimulator.setRecentsConfiguration(mActivity.getResources().getConfiguration()); mTaskViewSimulator.setRecentsRotation(mActivity.getDisplay().getRotation()); // If we've already ended the gesture and are going home, don't prepare recents UI, // as that will set the state as BACKGROUND_APP, overriding the animation to NORMAL. Loading quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java +2 −2 Original line number Diff line number Diff line Loading @@ -129,8 +129,8 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { /** * @see com.android.quickstep.views.RecentsView#onConfigurationChanged(Configuration) */ public void setRecentsConfiguration(Configuration configuration) { mOrientationState.setActivityConfiguration(configuration); public void setRecentsRotation(int recentsRotation) { mOrientationState.setRecentsRotation(recentsRotation); mLayoutValid = false; } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +2 −2 Original line number Diff line number Diff line Loading @@ -393,7 +393,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView mActivity = BaseActivity.fromContext(context); mOrientationState = new RecentsOrientedState( context, mSizeStrategy, this::animateRecentsRotationInPlace); mOrientationState.setActivityConfiguration(context.getResources().getConfiguration()); mOrientationState.setRecentsRotation(mActivity.getDisplay().getRotation()); mFastFlingVelocity = getResources() .getDimensionPixelSize(R.dimen.recents_fast_fling_velocity); Loading Loading @@ -1657,7 +1657,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (mOrientationState.setActivityConfiguration(newConfig)) { if (mOrientationState.setRecentsRotation(mActivity.getDisplay().getRotation())) { updateOrientationHandler(); } } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java +2 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import com.android.systemui.plugins.OverviewScreenshotActions; import com.android.systemui.plugins.PluginListener; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.ConfigurationCompat; /** * A task in the Recents view. Loading Loading @@ -385,8 +384,8 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc if (mBitmapShader != null && mThumbnailData != null) { mPreviewRect.set(0, 0, mThumbnailData.thumbnail.getWidth(), mThumbnailData.thumbnail.getHeight()); int currentRotation = ConfigurationCompat.getWindowConfigurationRotation( mActivity.getResources().getConfiguration()); int currentRotation = getTaskView().getRecentsView().getPagedViewOrientedState() .getRecentsActivityRotation(); mPreviewPositionHelper.updateThumbnailMatrix(mPreviewRect, mThumbnailData, getMeasuredWidth(), getMeasuredHeight(), mActivity.getDeviceProfile(), currentRotation); Loading quickstep/src/com/android/quickstep/util/RecentsOrientedState.java +5 −11 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; import android.content.ContentResolver; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; import android.database.ContentObserver; import android.graphics.Matrix; Loading @@ -48,7 +47,6 @@ import android.view.Surface; import androidx.annotation.IntDef; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.launcher3.DeviceProfile; import com.android.launcher3.InvariantDeviceProfile; Loading @@ -58,7 +56,6 @@ import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.util.WindowBounds; import com.android.quickstep.BaseActivityInterface; import com.android.quickstep.SysUINavigationMode; import com.android.systemui.shared.system.ConfigurationCompat; import java.lang.annotation.Retention; import java.util.function.IntConsumer; Loading Loading @@ -91,6 +88,7 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre private @SurfaceRotation int mTouchRotation = ROTATION_0; private @SurfaceRotation int mDisplayRotation = ROTATION_0; private @SurfaceRotation int mRecentsActivityRotation = ROTATION_0; private @SurfaceRotation int mRecentsRotation = ROTATION_0 - 1; // Launcher activity supports multiple orientation, but fallback activity does not private static final int FLAG_MULTIPLE_ORIENTATION_SUPPORTED_BY_ACTIVITY = 1 << 0; Loading Loading @@ -133,8 +131,6 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre private int mFlags; private int mPreviousRotation = ROTATION_0; @Nullable private Configuration mActivityConfiguration; /** * @param rotationChangeListener Callback for receiving rotation events when rotation watcher * is enabled Loading Loading @@ -170,11 +166,11 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre } /** * Sets the configuration for the recents activity, which could affect the activity's rotation * Sets the rotation for the recents activity, which could affect the appearance of task view. * @see #update(int, int) */ public boolean setActivityConfiguration(Configuration activityConfiguration) { mActivityConfiguration = activityConfiguration; public boolean setRecentsRotation(@SurfaceRotation int recentsRotation) { mRecentsRotation = recentsRotation; return update(mTouchRotation, mDisplayRotation); } Loading Loading @@ -231,9 +227,7 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre @SurfaceRotation private int inferRecentsActivityRotation(@SurfaceRotation int displayRotation) { if (isRecentsActivityRotationAllowed()) { return mActivityConfiguration == null ? displayRotation : ConfigurationCompat.getWindowConfigurationRotation(mActivityConfiguration); return mRecentsRotation < ROTATION_0 ? displayRotation : mRecentsRotation; } else { return ROTATION_0; } Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java +1 −1 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) { return; } mTaskViewSimulator.setRecentsConfiguration(mActivity.getResources().getConfiguration()); mTaskViewSimulator.setRecentsRotation(mActivity.getDisplay().getRotation()); // If we've already ended the gesture and are going home, don't prepare recents UI, // as that will set the state as BACKGROUND_APP, overriding the animation to NORMAL. Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java +2 −2 Original line number Diff line number Diff line Loading @@ -129,8 +129,8 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { /** * @see com.android.quickstep.views.RecentsView#onConfigurationChanged(Configuration) */ public void setRecentsConfiguration(Configuration configuration) { mOrientationState.setActivityConfiguration(configuration); public void setRecentsRotation(int recentsRotation) { mOrientationState.setRecentsRotation(recentsRotation); mLayoutValid = false; } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +2 −2 Original line number Diff line number Diff line Loading @@ -393,7 +393,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView mActivity = BaseActivity.fromContext(context); mOrientationState = new RecentsOrientedState( context, mSizeStrategy, this::animateRecentsRotationInPlace); mOrientationState.setActivityConfiguration(context.getResources().getConfiguration()); mOrientationState.setRecentsRotation(mActivity.getDisplay().getRotation()); mFastFlingVelocity = getResources() .getDimensionPixelSize(R.dimen.recents_fast_fling_velocity); Loading Loading @@ -1657,7 +1657,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (mOrientationState.setActivityConfiguration(newConfig)) { if (mOrientationState.setRecentsRotation(mActivity.getDisplay().getRotation())) { updateOrientationHandler(); } } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java +2 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import com.android.systemui.plugins.OverviewScreenshotActions; import com.android.systemui.plugins.PluginListener; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.ConfigurationCompat; /** * A task in the Recents view. Loading Loading @@ -385,8 +384,8 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc if (mBitmapShader != null && mThumbnailData != null) { mPreviewRect.set(0, 0, mThumbnailData.thumbnail.getWidth(), mThumbnailData.thumbnail.getHeight()); int currentRotation = ConfigurationCompat.getWindowConfigurationRotation( mActivity.getResources().getConfiguration()); int currentRotation = getTaskView().getRecentsView().getPagedViewOrientedState() .getRecentsActivityRotation(); mPreviewPositionHelper.updateThumbnailMatrix(mPreviewRect, mThumbnailData, getMeasuredWidth(), getMeasuredHeight(), mActivity.getDeviceProfile(), currentRotation); Loading
quickstep/src/com/android/quickstep/util/RecentsOrientedState.java +5 −11 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; import android.content.ContentResolver; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; import android.database.ContentObserver; import android.graphics.Matrix; Loading @@ -48,7 +47,6 @@ import android.view.Surface; import androidx.annotation.IntDef; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.launcher3.DeviceProfile; import com.android.launcher3.InvariantDeviceProfile; Loading @@ -58,7 +56,6 @@ import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.util.WindowBounds; import com.android.quickstep.BaseActivityInterface; import com.android.quickstep.SysUINavigationMode; import com.android.systemui.shared.system.ConfigurationCompat; import java.lang.annotation.Retention; import java.util.function.IntConsumer; Loading Loading @@ -91,6 +88,7 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre private @SurfaceRotation int mTouchRotation = ROTATION_0; private @SurfaceRotation int mDisplayRotation = ROTATION_0; private @SurfaceRotation int mRecentsActivityRotation = ROTATION_0; private @SurfaceRotation int mRecentsRotation = ROTATION_0 - 1; // Launcher activity supports multiple orientation, but fallback activity does not private static final int FLAG_MULTIPLE_ORIENTATION_SUPPORTED_BY_ACTIVITY = 1 << 0; Loading Loading @@ -133,8 +131,6 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre private int mFlags; private int mPreviousRotation = ROTATION_0; @Nullable private Configuration mActivityConfiguration; /** * @param rotationChangeListener Callback for receiving rotation events when rotation watcher * is enabled Loading Loading @@ -170,11 +166,11 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre } /** * Sets the configuration for the recents activity, which could affect the activity's rotation * Sets the rotation for the recents activity, which could affect the appearance of task view. * @see #update(int, int) */ public boolean setActivityConfiguration(Configuration activityConfiguration) { mActivityConfiguration = activityConfiguration; public boolean setRecentsRotation(@SurfaceRotation int recentsRotation) { mRecentsRotation = recentsRotation; return update(mTouchRotation, mDisplayRotation); } Loading Loading @@ -231,9 +227,7 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre @SurfaceRotation private int inferRecentsActivityRotation(@SurfaceRotation int displayRotation) { if (isRecentsActivityRotationAllowed()) { return mActivityConfiguration == null ? displayRotation : ConfigurationCompat.getWindowConfigurationRotation(mActivityConfiguration); return mRecentsRotation < ROTATION_0 ? displayRotation : mRecentsRotation; } else { return ROTATION_0; } Loading