Make the wallpaper picker supply the correct visibility state.

Change-Id: I98517d606b2a439b7ec91d77ab18e98ac0fbc101
diff --git a/src/com/android/launcher2/LiveWallpaperPickActivity.java b/src/com/android/launcher2/LiveWallpaperPickActivity.java
index cfafda0..40d183a 100644
--- a/src/com/android/launcher2/LiveWallpaperPickActivity.java
+++ b/src/com/android/launcher2/LiveWallpaperPickActivity.java
@@ -128,6 +128,10 @@
             synchronized (this) {
                 if (mConnected) {
                     mEngine = engine;
+                    try {
+                        engine.setVisibility(true);
+                    } catch (RemoteException e) {
+                    }
                 } else {
                     try {
                         engine.destroy();
@@ -159,6 +163,28 @@
     }
     
     @Override
+    public void onResume() {
+        super.onResume();
+        if (mWallpaperConnection != null && mWallpaperConnection.mEngine != null) {
+            try {
+                mWallpaperConnection.mEngine.setVisibility(true);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+    
+    @Override
+    public void onPause() {
+        super.onPause();
+        if (mWallpaperConnection != null && mWallpaperConnection.mEngine != null) {
+            try {
+                mWallpaperConnection.mEngine.setVisibility(false);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+    
+    @Override
     public void onDetachedFromWindow() {
         super.onDetachedFromWindow();
         if (mWallpaperConnection != null) {