Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db87c1a3 authored by Eric Rahm's avatar Eric Rahm Committed by Android (Google) Code Review
Browse files

Merge "Gracefully handle unbind errors when detaching" into main

parents 1b18c08d 336ac019
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -3749,7 +3749,11 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
            mContext.getMainThreadHandler().removeCallbacks(
            mContext.getMainThreadHandler().removeCallbacks(
                    wallpaper.connection.mTryToRebindRunnable);
                    wallpaper.connection.mTryToRebindRunnable);


            try {
                mContext.unbindService(wallpaper.connection);
                mContext.unbindService(wallpaper.connection);
            } catch (IllegalArgumentException e) {
                Slog.w(TAG, "Error unbinding wallpaper when detaching", e);
            }
            wallpaper.connection = null;
            wallpaper.connection = null;
            if (wallpaper == mLastWallpaper) {
            if (wallpaper == mLastWallpaper) {
                mLastWallpaper = null;
                mLastWallpaper = null;