Merge "Add logs for wallpaper set completion" into tm-qpr-dev am: e91f8da432

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20291664

Change-Id: Ie291947b6c9cfa2c449065be03b47e1b97d87454
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-11-01 05:24:29 +00:00
committed by Automerger Merge Worker
3 changed files with 9 additions and 4 deletions

View File

@@ -2458,7 +2458,12 @@ public class WallpaperManager {
public void waitForCompletion() { public void waitForCompletion() {
try { try {
mLatch.await(30, TimeUnit.SECONDS); final boolean completed = mLatch.await(30, TimeUnit.SECONDS);
if (completed) {
Log.d(TAG, "Wallpaper set completion.");
} else {
Log.d(TAG, "Timeout waiting for wallpaper set completion!");
}
} catch (InterruptedException e) { } catch (InterruptedException e) {
// This might be legit: the crop may take a very long time. Don't sweat // This might be legit: the crop may take a very long time. Don't sweat
// it in that case; we are okay with display lagging behind in order to // it in that case; we are okay with display lagging behind in order to

View File

@@ -578,6 +578,7 @@ public abstract class WallpaperService extends Service {
*/ */
public void reportEngineShown(boolean waitForEngineShown) { public void reportEngineShown(boolean waitForEngineShown) {
if (mIWallpaperEngine.mShownReported) return; if (mIWallpaperEngine.mShownReported) return;
Log.d(TAG, "reportEngineShown: shouldWait=" + waitForEngineShown);
if (!waitForEngineShown) { if (!waitForEngineShown) {
Message message = mCaller.obtainMessage(MSG_REPORT_SHOWN); Message message = mCaller.obtainMessage(MSG_REPORT_SHOWN);
mCaller.removeMessages(MSG_REPORT_SHOWN); mCaller.removeMessages(MSG_REPORT_SHOWN);

View File

@@ -320,9 +320,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
IRemoteCallback.Stub callback = new IRemoteCallback.Stub() { IRemoteCallback.Stub callback = new IRemoteCallback.Stub() {
@Override @Override
public void sendResult(Bundle data) throws RemoteException { public void sendResult(Bundle data) throws RemoteException {
if (DEBUG) { Slog.d(TAG, "publish system wallpaper changed!");
Slog.d(TAG, "publish system wallpaper changed!");
}
notifyWallpaperChanged(wallpaper); notifyWallpaperChanged(wallpaper);
} }
}; };
@@ -1552,6 +1550,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
mReply.sendResult(null); mReply.sendResult(null);
} catch (RemoteException e) { } catch (RemoteException e) {
Binder.restoreCallingIdentity(ident); Binder.restoreCallingIdentity(ident);
Slog.d(TAG, "failed to send callback!", e);
} }
mReply = null; mReply = null;
} }