Make the wallpaper picker supply the correct visibility state.
Change-Id: I98517d606b2a439b7ec91d77ab18e98ac0fbc101
This commit is contained in:
parent
efabe00e4a
commit
5237ccbf17
|
@ -128,6 +128,10 @@ public class LiveWallpaperPickActivity extends LauncherActivity
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mEngine = engine;
|
mEngine = engine;
|
||||||
|
try {
|
||||||
|
engine.setVisibility(true);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
engine.destroy();
|
engine.destroy();
|
||||||
|
@ -158,6 +162,28 @@ public class LiveWallpaperPickActivity extends LauncherActivity
|
||||||
setResult(RESULT_CANCELED);
|
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
|
@Override
|
||||||
public void onDetachedFromWindow() {
|
public void onDetachedFromWindow() {
|
||||||
super.onDetachedFromWindow();
|
super.onDetachedFromWindow();
|
||||||
|
|
Loading…
Reference in New Issue