summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-09-05 03:20:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-05 03:20:10 -0700
commit049eda744c8d2477f7d2accc6cabf0c303b82784 (patch)
treeb524729a341201e0b0d485a2ea468ec35518406b /packages
parent0d9bc428de99971316ae3a699b648d769c9a73e4 (diff)
parentadaffc14ecc4bdf6027677b738e65efda8548c64 (diff)
downloadframeworks_base-049eda744c8d2477f7d2accc6cabf0c303b82784.zip
frameworks_base-049eda744c8d2477f7d2accc6cabf0c303b82784.tar.gz
frameworks_base-049eda744c8d2477f7d2accc6cabf0c303b82784.tar.bz2
am adaffc14: am a1730fa4: Merge "Debug code for window transition crash" into jb-mr1-dev
* commit 'adaffc14ecc4bdf6027677b738e65efda8548c64': Debug code for window transition crash
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java10
2 files changed, 11 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index c3ecdb5..b133ff9 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -164,13 +164,6 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = createView(parent);
- if (convertView.getParent() != null) {
- throw new RuntimeException("Recycled child has parent");
- }
- } else {
- if (convertView.getParent() != null) {
- throw new RuntimeException("Recycled child has parent");
- }
}
ViewHolder holder = (ViewHolder) convertView.getTag();
@@ -600,6 +593,9 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
usingDrawingCache = true;
}
+ if (bm == null) {
+ throw new RuntimeException("Recents thumbnail is null");
+ }
ActivityOptions opts = ActivityOptions.makeThumbnailScaleUpAnimation(
holder.thumbnailViewImage, bm, 0, 0, null);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 106ce7e..832cf88 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -488,11 +488,18 @@ public abstract class BaseStatusBar extends SystemUI implements
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_width);
float thumbHeight = res
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_height);
+ if (first == null) {
+ throw new RuntimeException("Recents thumbnail is null");
+ }
if (first.getWidth() != thumbWidth || first.getHeight() != thumbHeight) {
first = Bitmap.createScaledBitmap(first, (int) thumbWidth, (int) thumbHeight,
true);
+ if (first == null) {
+ throw new RuntimeException("Recents thumbnail is null");
+ }
}
+
DisplayMetrics dm = new DisplayMetrics();
mDisplay.getMetrics(dm);
// calculate it here, but consider moving it elsewhere
@@ -521,8 +528,7 @@ public abstract class BaseStatusBar extends SystemUI implements
+ thumbBgPadding + thumbLeftMargin);
y = (int) (dm.heightPixels
- res.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_height) - thumbBgPadding);
- } else { // if (config.orientation ==
- // Configuration.ORIENTATION_LANDSCAPE) {
+ } else { // if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
float thumbTopMargin = res
.getDimensionPixelSize(R.dimen.status_bar_recents_thumbnail_top_margin);
float thumbBgPadding = res