summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-03-14 18:35:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-03-14 18:35:48 +0000
commit8dafd322607e53b9ae215c427005afd6ad5f0a1f (patch)
tree957a296b8a754772424d79fc14335a950a8182ef
parentc97a9e1419d3a7537a944ff454fbda53765d34ba (diff)
parent6043fea7d4a1126013ed0f187d79878e577b7213 (diff)
Merge "Removing some dead code related to legacy grid recents" into main
-rw-r--r--core/java/com/android/internal/policy/TransitionAnimation.java27
-rw-r--r--core/res/res/values/config.xml8
-rw-r--r--core/res/res/values/symbols.xml2
-rw-r--r--services/core/java/com/android/server/wm/AppTransition.java18
-rw-r--r--services/core/java/com/android/server/wm/RecentTasks.java5
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerInternal.java8
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java9
7 files changed, 5 insertions, 72 deletions
diff --git a/core/java/com/android/internal/policy/TransitionAnimation.java b/core/java/com/android/internal/policy/TransitionAnimation.java
index 40a437f300f3..9dec1027d398 100644
--- a/core/java/com/android/internal/policy/TransitionAnimation.java
+++ b/core/java/com/android/internal/policy/TransitionAnimation.java
@@ -129,7 +129,6 @@ public class TransitionAnimation {
private final int mDefaultWindowAnimationStyleResId;
private final boolean mDebug;
- private final boolean mGridLayoutRecentsEnabled;
private final boolean mLowRamRecentsEnabled;
public TransitionAnimation(Context context, boolean debug, String tag) {
@@ -166,7 +165,6 @@ public class TransitionAnimation {
mConfigShortAnimTime = context.getResources().getInteger(
com.android.internal.R.integer.config_shortAnimTime);
- mGridLayoutRecentsEnabled = SystemProperties.getBoolean("ro.recents.grid", false);
mLowRamRecentsEnabled = ActivityManager.isLowRamDeviceStatic();
final TypedArray windowStyle = mContext.getTheme().obtainStyledAttributes(
@@ -768,10 +766,8 @@ public class TransitionAnimation {
// We scale the width and clip to the top/left square
float scale =
thumbWidth / (appWidth - contentInsets.left - contentInsets.right);
- if (!mGridLayoutRecentsEnabled) {
- int unscaledThumbHeight = (int) (thumbHeight / scale);
- mTmpFromClipRect.bottom = mTmpFromClipRect.top + unscaledThumbHeight;
- }
+ int unscaledThumbHeight = (int) (thumbHeight / scale);
+ mTmpFromClipRect.bottom = mTmpFromClipRect.top + unscaledThumbHeight;
Animation scaleAnim = new ScaleAnimation(
scaleUp ? scale : 1, scaleUp ? 1 : scale,
@@ -887,12 +883,6 @@ public class TransitionAnimation {
toY = appRect.height() / 2 * (1 - 1 / scaleW) + appRect.top;
pivotX = mTmpRect.width() / 2;
pivotY = appRect.height() / 2 / scaleW;
- if (mGridLayoutRecentsEnabled) {
- // In the grid layout, the header is displayed above the thumbnail instead of
- // overlapping it.
- fromY -= thumbHeightI;
- toY -= thumbHeightI * scaleW;
- }
} else {
pivotX = 0;
pivotY = 0;
@@ -936,10 +926,7 @@ public class TransitionAnimation {
// This AnimationSet uses the Interpolators assigned above.
AnimationSet set = new AnimationSet(false);
set.addAnimation(scale);
- if (!mGridLayoutRecentsEnabled) {
- // In the grid layout, the header should be shown for the whole animation.
- set.addAnimation(alpha);
- }
+ set.addAnimation(alpha);
set.addAnimation(translate);
set.addAnimation(clipAnim);
a = set;
@@ -958,10 +945,7 @@ public class TransitionAnimation {
// This AnimationSet uses the Interpolators assigned above.
AnimationSet set = new AnimationSet(false);
set.addAnimation(scale);
- if (!mGridLayoutRecentsEnabled) {
- // In the grid layout, the header should be shown for the whole animation.
- set.addAnimation(alpha);
- }
+ set.addAnimation(alpha);
set.addAnimation(translate);
a = set;
@@ -1081,8 +1065,7 @@ public class TransitionAnimation {
* @return whether the transition should show the thumbnail being scaled down.
*/
private boolean shouldScaleDownThumbnailTransition(int orientation) {
- return mGridLayoutRecentsEnabled
- || orientation == Configuration.ORIENTATION_PORTRAIT;
+ return orientation == Configuration.ORIENTATION_PORTRAIT;
}
private static int updateToTranslucentAnimIfNeeded(int anim, @TransitionOldType int transit) {
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index f59c0993c34f..511c6c93721a 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3586,14 +3586,6 @@
<!-- The minimum number of visible recent tasks to be presented to the user through the
SystemUI. Can be -1 if there is no minimum limit. -->
- <integer name="config_minNumVisibleRecentTasks_grid">-1</integer>
-
- <!-- The maximum number of visible recent tasks to be presented to the user through the
- SystemUI. Can be -1 if there is no maximum limit. -->
- <integer name="config_maxNumVisibleRecentTasks_grid">9</integer>
-
- <!-- The minimum number of visible recent tasks to be presented to the user through the
- SystemUI. Can be -1 if there is no minimum limit. -->
<integer name="config_minNumVisibleRecentTasks_lowRam">-1</integer>
<!-- The maximum number of visible recent tasks to be presented to the user through the
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index c603fa78b08e..b11d26ee6501 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -392,8 +392,6 @@
<java-symbol type="string" name="config_hdmiCecSetMenuLanguageActivity" />
<java-symbol type="integer" name="config_minNumVisibleRecentTasks_lowRam" />
<java-symbol type="integer" name="config_maxNumVisibleRecentTasks_lowRam" />
- <java-symbol type="integer" name="config_minNumVisibleRecentTasks_grid" />
- <java-symbol type="integer" name="config_maxNumVisibleRecentTasks_grid" />
<java-symbol type="integer" name="config_minNumVisibleRecentTasks" />
<java-symbol type="integer" name="config_maxNumVisibleRecentTasks" />
<java-symbol type="integer" name="config_activeTaskDurationHours" />
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index 1a63f14e1b8c..5184e49385b2 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -228,11 +228,8 @@ public class AppTransition implements Dump {
private int mAppTransitionState = APP_STATE_IDLE;
private final ArrayList<AppTransitionListener> mListeners = new ArrayList<>();
- private KeyguardExitAnimationStartListener mKeyguardExitAnimationStartListener;
private final ExecutorService mDefaultExecutor = Executors.newSingleThreadExecutor();
- private final boolean mGridLayoutRecentsEnabled;
-
private final int mDefaultWindowAnimationStyleResId;
private boolean mOverrideTaskTransition;
@@ -249,8 +246,6 @@ public class AppTransition implements Dump {
mTransitionAnimation = new TransitionAnimation(
context, ProtoLog.isEnabled(WM_DEBUG_ANIM), TAG);
- mGridLayoutRecentsEnabled = SystemProperties.getBoolean("ro.recents.grid", false);
-
final TypedArray windowStyle = mContext.getTheme().obtainStyledAttributes(
com.android.internal.R.styleable.Window);
mDefaultWindowAnimationStyleResId = windowStyle.getResourceId(
@@ -493,11 +488,6 @@ public class AppTransition implements Dump {
mListeners.remove(listener);
}
- void registerKeygaurdExitAnimationStartListener(
- KeyguardExitAnimationStartListener listener) {
- mKeyguardExitAnimationStartListener = listener;
- }
-
public void notifyAppTransitionFinishedLocked(IBinder token) {
for (int i = 0; i < mListeners.size(); i++) {
mListeners.get(i).onAppTransitionFinishedLocked(token);
@@ -1595,14 +1585,6 @@ public class AppTransition implements Dump {
return mNextAppTransitionRequests.contains(transit);
}
- /**
- * @return whether the transition should show the thumbnail being scaled down.
- */
- private boolean shouldScaleDownThumbnailTransition(int uiMode, int orientation) {
- return mGridLayoutRecentsEnabled
- || orientation == Configuration.ORIENTATION_PORTRAIT;
- }
-
private void handleAppTransitionTimeout() {
synchronized (mService.mGlobalLock) {
final DisplayContent dc = mDisplayContent;
diff --git a/services/core/java/com/android/server/wm/RecentTasks.java b/services/core/java/com/android/server/wm/RecentTasks.java
index dd146420c748..33588a03b8e1 100644
--- a/services/core/java/com/android/server/wm/RecentTasks.java
+++ b/services/core/java/com/android/server/wm/RecentTasks.java
@@ -364,11 +364,6 @@ class RecentTasks {
com.android.internal.R.integer.config_minNumVisibleRecentTasks_lowRam);
mMaxNumVisibleTasks = res.getInteger(
com.android.internal.R.integer.config_maxNumVisibleRecentTasks_lowRam);
- } else if (SystemProperties.getBoolean("ro.recents.grid", false)) {
- mMinNumVisibleTasks = res.getInteger(
- com.android.internal.R.integer.config_minNumVisibleRecentTasks_grid);
- mMaxNumVisibleTasks = res.getInteger(
- com.android.internal.R.integer.config_maxNumVisibleRecentTasks_grid);
} else {
mMinNumVisibleTasks = res.getInteger(
com.android.internal.R.integer.config_minNumVisibleRecentTasks);
diff --git a/services/core/java/com/android/server/wm/WindowManagerInternal.java b/services/core/java/com/android/server/wm/WindowManagerInternal.java
index 77319cc0ba8a..acc63305055b 100644
--- a/services/core/java/com/android/server/wm/WindowManagerInternal.java
+++ b/services/core/java/com/android/server/wm/WindowManagerInternal.java
@@ -620,14 +620,6 @@ public abstract class WindowManagerInternal {
public abstract void unregisterTaskSystemBarsListener(TaskSystemBarsListener listener);
/**
- * Registers a listener to be notified to start the keyguard exit animation.
- *
- * @param listener The listener to register.
- */
- public abstract void registerKeyguardExitAnimationStartListener(
- KeyguardExitAnimationStartListener listener);
-
- /**
* Reports that the password for the given user has changed.
*/
public abstract void reportPasswordChanged(int userId);
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 40b1b20909af..0e66fcf4b2f0 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -8094,15 +8094,6 @@ public class WindowManagerService extends IWindowManager.Stub
}
@Override
- public void registerKeyguardExitAnimationStartListener(
- KeyguardExitAnimationStartListener listener) {
- synchronized (mGlobalLock) {
- getDefaultDisplayContentLocked().mAppTransition
- .registerKeygaurdExitAnimationStartListener(listener);
- }
- }
-
- @Override
public void reportPasswordChanged(int userId) {
mKeyguardDisableHandler.updateKeyguardEnabled(userId);
}