diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java index 140cc8050b6ed..79069b89c42a8 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java @@ -205,4 +205,8 @@ public class RecentsActivity extends Activity { boolean isForeground() { return mForeground; } + + boolean isActivityShowing() { + return mShowing; + } } diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java index ff519960cac8b..8607508b9bce7 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java @@ -579,7 +579,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener } else { mRecentTaskDescriptions.addAll(tasks); } - if (((RecentsActivity)mContext).isForeground()) { + if (((RecentsActivity) mContext).isActivityShowing()) { refreshViews(); } }