summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorMark Punzalan <markpun@google.com>2022-05-27 17:15:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-05-27 17:15:29 +0000
commit76ba87f909f52d62edb5d0a760db3e9319240b21 (patch)
treedd38855b668d9a173c734656eb58c88396034c42 /core/java/android
parent133c2347bcfe8a78fb71c2fc2597194a9340d743 (diff)
parenta695631475b36d73c799c8363eea0d1f10b26a61 (diff)
Merge "Don't clear translation state on temporary detachment." into tm-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/View.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 90497e7adbf7..ba6ba63e4ed0 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -10000,7 +10000,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// We reset any translation state as views may be re-used (e.g., as in ListView and
// RecyclerView). We only need to do this for views important for content capture since
// views unimportant for content capture won't be translated anyway.
- clearTranslationState();
+ if (!isTemporarilyDetached()) {
+ clearTranslationState();
+ }
}
}