summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2018-05-17 10:13:12 -0700
committer Selim Cinek <cinek@google.com> 2018-05-17 11:46:37 -0700
commit52424c9386a9be0e40fcb78a9a8e18ad508e3ac4 (patch)
tree6f52be34b17093224e4dc538acf7b91fa428fd8f
parent645c8671ed6aa3f4c5b0d405aa5360b113b30f16 (diff)
Don't scale textViews when transforming if their text isn't equal
Change-Id: I34f8299790da84edbfdb1e3679181d68023a24ff Fixes: 79876736 Test: add group, observe normal scaling when dragging down
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/TextViewTransformState.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TextViewTransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TextViewTransformState.java
index 178c8130307f..c1ffc22637de 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TextViewTransformState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TextViewTransformState.java
@@ -35,9 +35,7 @@ public class TextViewTransformState extends TransformState {
@Override
public void initFrom(View view, TransformInfo transformInfo) {
super.initFrom(view, transformInfo);
- if (view instanceof TextView) {
- mText = (TextView) view;
- }
+ mText = (TextView) view;
}
@Override
@@ -94,6 +92,9 @@ public class TextViewTransformState extends TransformState {
return false;
}
TextViewTransformState otherTvs = (TextViewTransformState) otherState;
+ if (!TextUtils.equals(mText.getText(), otherTvs.mText.getText())) {
+ return false;
+ }
int lineCount = mText.getLineCount();
return lineCount == 1 && lineCount == otherTvs.mText.getLineCount()
&& getEllipsisCount() == otherTvs.getEllipsisCount()