From ef468d80d8173d3b869b2b54a157396d3ea33c12 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Thu, 3 Jan 2019 01:02:43 -0800 Subject: Do not animate icon if work profile is disabled Bug: 119884907 Change-Id: I14977581dcb42b5fb2fe21f628a4d91945fdd614 --- src/com/android/launcher3/BubbleTextView.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/com/android/launcher3/BubbleTextView.java') diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 4853a907a..891ad9f1c 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -341,6 +341,14 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, refreshDrawableState(); } + @Override + public void onVisibilityAggregated(boolean isVisible) { + super.onVisibilityAggregated(isVisible); + if (mIcon != null) { + mIcon.setVisible(getWindowVisibility() == VISIBLE && isShown(), false); + } + } + @Override public void onLauncherResume() { // Reset the pressed state of icon that was locked in the press state while activity -- cgit v1.2.3