summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-05-30 06:55:58 -0700
committerMichael Jurka <mikejurka@google.com>2012-05-30 07:00:08 -0700
commitd234b32e995800fd035acc780db19529f34dd281 (patch)
treeda595f86c0b2145d9c5dbcff9610789d5fe122ed /packages/SystemUI/src
parent9d820eccfc2ddbdc03680e22b9d4c4cac66a97b9 (diff)
downloadframeworks_base-d234b32e995800fd035acc780db19529f34dd281.zip
frameworks_base-d234b32e995800fd035acc780db19529f34dd281.tar.gz
frameworks_base-d234b32e995800fd035acc780db19529f34dd281.tar.bz2
Fix issue where "No recent apps" showed initially before loading thumbnails
Bug: 6573911 Also add additional debugging code for bug 6573911
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java9
2 files changed, 10 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 39d686f..4351e95 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -308,7 +308,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
// if there are no apps, either bring up a "No recent apps" message, or just
// quit early
- boolean noApps = (mRecentTaskDescriptions.size() == 0);
+ boolean noApps = !mFirstScreenful && (mRecentTaskDescriptions.size() == 0);
if (mRecentsNoApps != null) {
mRecentsNoApps.setVisibility(noApps ? View.VISIBLE : View.INVISIBLE);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
index 3c71784..f682203 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
@@ -101,6 +101,9 @@ public class RecentsVerticalScrollView extends ScrollView
}
final View view = mAdapter.getView(i, old, mLinearLayout);
+ if (view.getParent() != null) {
+ throw new RuntimeException("Recycled child has parent");
+ }
if (mPerformanceHelper != null) {
mPerformanceHelper.addViewCallback(view);
@@ -139,6 +142,9 @@ public class RecentsVerticalScrollView extends ScrollView
thumbnailView.setClickable(true);
thumbnailView.setOnClickListener(launchAppListener);
thumbnailView.setOnLongClickListener(longClickListener);
+ if (view.getParent() != null) {
+ throw new RuntimeException("Recycled child has parent");
+ }
// We don't want to dismiss recents if a user clicks on the app title
// (we also don't want to launch the app either, though, because the
@@ -148,6 +154,9 @@ public class RecentsVerticalScrollView extends ScrollView
appTitle.setOnTouchListener(noOpListener);
final View calloutLine = view.findViewById(R.id.recents_callout_line);
calloutLine.setOnTouchListener(noOpListener);
+ if (view.getParent() != null) {
+ throw new RuntimeException("Recycled child has parent");
+ }
mLinearLayout.addView(view);
}