Make the wallpaper picker supply the correct visibility state.

Change-Id: I98517d606b2a439b7ec91d77ab18e98ac0fbc101
This commit is contained in:
Dianne Hackborn 2009-08-29 19:17:48 -07:00
parent efabe00e4a
commit 5237ccbf17
1 changed files with 26 additions and 0 deletions

View File

@ -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();