merge in jb-mr1.1-release history after reset to jb-mr1.1-dev
diff --git a/res/drawable/table.xml b/res/drawable/table.xml
index 4663f51..6c22af8 100644
--- a/res/drawable/table.xml
+++ b/res/drawable/table.xml
@@ -22,9 +22,4 @@
         android:endColor="@color/tabletop_dark"
         android:type="linear"
         />
-    <padding
-        android:left="10dp"
-        android:top="10dp"
-        android:right="10dp"
-        android:bottom="10dp" />
 </shape>
diff --git a/res/layout/table.xml b/res/layout/table.xml
index 3a2b34b..b5663cb 100644
--- a/res/layout/table.xml
+++ b/res/layout/table.xml
@@ -16,20 +16,24 @@
 <FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
-   android:layout_height="match_parent" >
+   android:layout_height="match_parent"
+   >
   <com.android.dreams.phototable.PhotoTable
-    android:background="@+drawable/table"
-    android:id="@+id/table"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent" />
+     android:background="@+drawable/table"
+     android:id="@+id/table"
+     android:layout_width="match_parent"
+     android:layout_height="match_parent"
+     />
   <!-- View
      android:background="@+drawable/vignette_br"
      android:layout_gravity="bottom|right"
      android:layout_width="300dp"
-     android:layout_height="300dp" />
-  <View
+     android:layout_height="300dp"
+     / -->
+  <!-- View
      android:background="@+drawable/vignette_tl"
      android:layout_gravity="top|left"
      android:layout_width="300dp"
-     android:layout_height="300dp" / -->
+     android:layout_height="300dp"
+     / -->
 </FrameLayout>
diff --git a/src/com/android/dreams/phototable/PhotoTableDream.java b/src/com/android/dreams/phototable/PhotoTableDream.java
index e7cc2ce..37ea019 100644
--- a/src/com/android/dreams/phototable/PhotoTableDream.java
+++ b/src/com/android/dreams/phototable/PhotoTableDream.java
@@ -19,8 +19,6 @@
 import android.content.SharedPreferences;
 import android.content.res.Resources;
 import android.service.dreams.DreamService;
-import android.view.LayoutInflater;
-import android.view.ViewGroup;
 
 import java.util.Set;
 
@@ -35,28 +33,30 @@
     public void onDreamingStarted() {
         super.onDreamingStarted();
         setInteractive(true);
+
+        BummerView bummer = (BummerView) findViewById(R.id.bummer);
+        if (bummer != null) {
+            Resources resources = getResources();
+            bummer.setAnimationParams(true,
+                    resources.getInteger(R.integer.table_drop_period),
+                    resources.getInteger(R.integer.fast_drop));
+        }
+
+        PhotoTable table = (PhotoTable) findViewById(R.id.table);
+        if (table != null) {
+            table.setDream(this);
+        }
     }
 
     @Override
     public void onAttachedToWindow() {
         super.onAttachedToWindow();
-        LayoutInflater inflater =
-                (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         AlbumSettings settings = AlbumSettings.getAlbumSettings(
                 getSharedPreferences(PhotoTableDreamSettings.PREFS_NAME, 0));
         if (settings.isConfigured()) {
-            ViewGroup view = (ViewGroup) inflater.inflate(R.layout.table, null);
-            PhotoTable table = (PhotoTable) view.findViewById(R.id.table);
-            table.setDream(this);
-            setContentView(view);
+            setContentView(R.layout.table);
         } else {
-            Resources resources = getResources();
-            ViewGroup view = (ViewGroup) inflater.inflate(R.layout.bummer, null);
-            BummerView bummer = (BummerView) view.findViewById(R.id.bummer);
-            bummer.setAnimationParams(true,
-                                      resources.getInteger(R.integer.table_drop_period),
-                                      resources.getInteger(R.integer.fast_drop));
-            setContentView(view);
+            setContentView(R.layout.bummer);
         }
         setFullscreen(true);
     }