Loading core/java/android/service/wallpaper/WallpaperService.java +35 −28 Original line number Diff line number Diff line Loading @@ -325,6 +325,7 @@ public abstract class WallpaperService extends Service { IWindowSession mSession; final Object mLock = new Object(); private final Object mSurfaceReleaseLock = new Object(); boolean mOffsetMessageEnqueued; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) Loading Loading @@ -1075,10 +1076,12 @@ public abstract class WallpaperService extends Service { animator.setDuration(DIMMING_ANIMATION_DURATION_MS); animator.addUpdateListener((ValueAnimator va) -> { final float dimValue = (float) va.getAnimatedValue(); if (mBbqSurfaceControl != null) { synchronized (mSurfaceReleaseLock) { if (mBbqSurfaceControl != null && mBbqSurfaceControl.isValid()) { surfaceControlTransaction .setAlpha(mBbqSurfaceControl, 1 - dimValue).apply(); } } }); animator.addListener(new AnimatorListenerAdapter() { @Override Loading Loading @@ -2356,10 +2359,13 @@ public abstract class WallpaperService extends Service { if (DEBUG) Log.v(TAG, "onDestroy(): " + this); onDestroy(); synchronized (mSurfaceReleaseLock) { if (mCreated) { try { if (DEBUG) Log.v(TAG, "Removing window and destroying surface " if (DEBUG) { Log.v(TAG, "Removing window and destroying surface " + mSurfaceHolder.getSurface() + " of: " + this); } if (mInputEventReceiver != null) { mInputEventReceiver.dispose(); Loading Loading @@ -2387,6 +2393,7 @@ public abstract class WallpaperService extends Service { mRelayoutResult = null; } } } private final DisplayListener mDisplayListener = new DisplayListener() { Loading Loading
core/java/android/service/wallpaper/WallpaperService.java +35 −28 Original line number Diff line number Diff line Loading @@ -325,6 +325,7 @@ public abstract class WallpaperService extends Service { IWindowSession mSession; final Object mLock = new Object(); private final Object mSurfaceReleaseLock = new Object(); boolean mOffsetMessageEnqueued; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) Loading Loading @@ -1075,10 +1076,12 @@ public abstract class WallpaperService extends Service { animator.setDuration(DIMMING_ANIMATION_DURATION_MS); animator.addUpdateListener((ValueAnimator va) -> { final float dimValue = (float) va.getAnimatedValue(); if (mBbqSurfaceControl != null) { synchronized (mSurfaceReleaseLock) { if (mBbqSurfaceControl != null && mBbqSurfaceControl.isValid()) { surfaceControlTransaction .setAlpha(mBbqSurfaceControl, 1 - dimValue).apply(); } } }); animator.addListener(new AnimatorListenerAdapter() { @Override Loading Loading @@ -2356,10 +2359,13 @@ public abstract class WallpaperService extends Service { if (DEBUG) Log.v(TAG, "onDestroy(): " + this); onDestroy(); synchronized (mSurfaceReleaseLock) { if (mCreated) { try { if (DEBUG) Log.v(TAG, "Removing window and destroying surface " if (DEBUG) { Log.v(TAG, "Removing window and destroying surface " + mSurfaceHolder.getSurface() + " of: " + this); } if (mInputEventReceiver != null) { mInputEventReceiver.dispose(); Loading Loading @@ -2387,6 +2393,7 @@ public abstract class WallpaperService extends Service { mRelayoutResult = null; } } } private final DisplayListener mDisplayListener = new DisplayListener() { Loading