OSDN Git Service

Disable RT animations for notification actions
authorJohn Reck <jreck@google.com>
Thu, 7 Dec 2017 22:55:26 +0000 (14:55 -0800)
committerJohn Reck <jreck@google.com>
Thu, 7 Dec 2017 22:55:26 +0000 (14:55 -0800)
Bug: 69474443
Test: systrace'd an inline reply
Change-Id: Ifb4d615f6b141d7925565f89cf776a6eb81a75f8

core/java/com/android/internal/widget/NotificationActionListLayout.java

index 26023b4..e013553 100644 (file)
@@ -21,6 +21,7 @@ import android.content.Context;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.graphics.drawable.Drawable;
+import android.graphics.drawable.RippleDrawable;
 import android.util.AttributeSet;
 import android.util.Pair;
 import android.view.Gravity;
@@ -203,6 +204,11 @@ public class NotificationActionListLayout extends LinearLayout {
     public void onViewAdded(View child) {
         super.onViewAdded(child);
         clearMeasureOrder();
+        // For some reason ripples + notification actions seem to be an unhappy combination
+        // b/69474443 so just turn them off for now.
+        if (child.getBackground() instanceof RippleDrawable) {
+            ((RippleDrawable)child.getBackground()).setForceSoftware(true);
+        }
     }
 
     @Override