From 5237ccbf173d01f5d17daecc382856e0839f2622 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Sat, 29 Aug 2009 19:17:48 -0700 Subject: [PATCH] Make the wallpaper picker supply the correct visibility state. Change-Id: I98517d606b2a439b7ec91d77ab18e98ac0fbc101 --- .../launcher2/LiveWallpaperPickActivity.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/com/android/launcher2/LiveWallpaperPickActivity.java b/src/com/android/launcher2/LiveWallpaperPickActivity.java index cfafda004d..40d183a52e 100644 --- a/src/com/android/launcher2/LiveWallpaperPickActivity.java +++ b/src/com/android/launcher2/LiveWallpaperPickActivity.java @@ -128,6 +128,10 @@ public class LiveWallpaperPickActivity extends LauncherActivity synchronized (this) { if (mConnected) { mEngine = engine; + try { + engine.setVisibility(true); + } catch (RemoteException e) { + } } else { try { engine.destroy(); @@ -158,6 +162,28 @@ public class LiveWallpaperPickActivity extends LauncherActivity setResult(RESULT_CANCELED); } + @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();