Loading core/java/android/service/wallpaper/WallpaperService.java +3 −11 Original line number Diff line number Diff line Loading @@ -196,7 +196,6 @@ public abstract class WallpaperService extends Service { final WindowManager.LayoutParams mLayout = new WindowManager.LayoutParams(); IWindowSession mSession; InputChannel mInputChannel; final Object mLock = new Object(); boolean mOffsetMessageEnqueued; Loading Loading @@ -819,11 +818,11 @@ public abstract class WallpaperService extends Service { mLayout.setTitle(WallpaperService.this.getClass().getName()); mLayout.windowAnimations = com.android.internal.R.style.Animation_Wallpaper; mInputChannel = new InputChannel(); InputChannel inputChannel = new InputChannel(); if (mSession.addToDisplay(mWindow, mWindow.mSeq, mLayout, View.VISIBLE, mDisplay.getDisplayId(), mWinFrame, mContentInsets, mStableInsets, mOutsets, mDisplayCutout, mInputChannel, mOutsets, mDisplayCutout, inputChannel, mInsetsState) < 0) { Log.w(TAG, "Failed to add window while updating wallpaper surface."); return; Loading @@ -831,7 +830,7 @@ public abstract class WallpaperService extends Service { mCreated = true; mInputEventReceiver = new WallpaperInputEventReceiver( mInputChannel, Looper.myLooper()); inputChannel, Looper.myLooper()); } mSurfaceHolder.mSurfaceLock.lock(); Loading Loading @@ -1267,13 +1266,6 @@ public abstract class WallpaperService extends Service { } mSurfaceHolder.mSurface.release(); mCreated = false; // Dispose the input channel after removing the window so the Window Manager // doesn't interpret the input channel being closed as an abnormal termination. if (mInputChannel != null) { mInputChannel.dispose(); mInputChannel = null; } } } Loading core/java/android/view/InputEventReceiver.java +5 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,11 @@ public abstract class InputEventReceiver { nativeDispose(mReceiverPtr); mReceiverPtr = 0; } if (mInputChannel != null) { mInputChannel.dispose(); mInputChannel = null; } mMessageQueue = null; } Loading core/java/android/view/ViewRootImpl.java +6 −13 Original line number Diff line number Diff line Loading @@ -399,7 +399,6 @@ public final class ViewRootImpl implements ViewParent, @UnsupportedAppUsage final View.AttachInfo mAttachInfo; InputChannel mInputChannel; InputQueue.Callback mInputQueueCallback; InputQueue mInputQueue; @UnsupportedAppUsage Loading Loading @@ -882,9 +881,10 @@ public final class ViewRootImpl implements ViewParent, // manager, to make sure we do the relayout before receiving // any other events from the system. requestLayout(); InputChannel inputChannel = null; if ((mWindowAttributes.inputFeatures & WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL) == 0) { mInputChannel = new InputChannel(); inputChannel = new InputChannel(); } mForceDecorViewVisibility = (mWindowAttributes.privateFlags & PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY) != 0; Loading @@ -895,14 +895,14 @@ public final class ViewRootImpl implements ViewParent, res = mWindowSession.addToDisplay(mWindow, mSeq, mWindowAttributes, getHostVisibility(), mDisplay.getDisplayId(), mTmpFrame, mAttachInfo.mContentInsets, mAttachInfo.mStableInsets, mAttachInfo.mOutsets, mAttachInfo.mDisplayCutout, mInputChannel, mAttachInfo.mOutsets, mAttachInfo.mDisplayCutout, inputChannel, mTempInsets); setFrame(mTmpFrame); } catch (RemoteException e) { mAdded = false; mView = null; mAttachInfo.mRootView = null; mInputChannel = null; inputChannel = null; mFallbackEventHandler.setView(null); unscheduleTraversals(); setAccessibilityFocus(null, null); Loading Loading @@ -978,12 +978,12 @@ public final class ViewRootImpl implements ViewParent, mInputQueueCallback = ((RootViewSurfaceTaker)view).willYouTakeTheInputQueue(); } if (mInputChannel != null) { if (inputChannel != null) { if (mInputQueueCallback != null) { mInputQueue = new InputQueue(); mInputQueueCallback.onInputQueueCreated(mInputQueue); } mInputEventReceiver = new WindowInputEventReceiver(mInputChannel, mInputEventReceiver = new WindowInputEventReceiver(inputChannel, Looper.myLooper()); } Loading Loading @@ -4375,13 +4375,6 @@ public final class ViewRootImpl implements ViewParent, } catch (RemoteException e) { } // Dispose the input channel after removing the window so the Window Manager // doesn't interpret the input channel being closed as an abnormal termination. if (mInputChannel != null) { mInputChannel.dispose(); mInputChannel = null; } mDisplayManager.unregisterDisplayListener(mDisplayListener); unscheduleTraversals(); Loading Loading
core/java/android/service/wallpaper/WallpaperService.java +3 −11 Original line number Diff line number Diff line Loading @@ -196,7 +196,6 @@ public abstract class WallpaperService extends Service { final WindowManager.LayoutParams mLayout = new WindowManager.LayoutParams(); IWindowSession mSession; InputChannel mInputChannel; final Object mLock = new Object(); boolean mOffsetMessageEnqueued; Loading Loading @@ -819,11 +818,11 @@ public abstract class WallpaperService extends Service { mLayout.setTitle(WallpaperService.this.getClass().getName()); mLayout.windowAnimations = com.android.internal.R.style.Animation_Wallpaper; mInputChannel = new InputChannel(); InputChannel inputChannel = new InputChannel(); if (mSession.addToDisplay(mWindow, mWindow.mSeq, mLayout, View.VISIBLE, mDisplay.getDisplayId(), mWinFrame, mContentInsets, mStableInsets, mOutsets, mDisplayCutout, mInputChannel, mOutsets, mDisplayCutout, inputChannel, mInsetsState) < 0) { Log.w(TAG, "Failed to add window while updating wallpaper surface."); return; Loading @@ -831,7 +830,7 @@ public abstract class WallpaperService extends Service { mCreated = true; mInputEventReceiver = new WallpaperInputEventReceiver( mInputChannel, Looper.myLooper()); inputChannel, Looper.myLooper()); } mSurfaceHolder.mSurfaceLock.lock(); Loading Loading @@ -1267,13 +1266,6 @@ public abstract class WallpaperService extends Service { } mSurfaceHolder.mSurface.release(); mCreated = false; // Dispose the input channel after removing the window so the Window Manager // doesn't interpret the input channel being closed as an abnormal termination. if (mInputChannel != null) { mInputChannel.dispose(); mInputChannel = null; } } } Loading
core/java/android/view/InputEventReceiver.java +5 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,11 @@ public abstract class InputEventReceiver { nativeDispose(mReceiverPtr); mReceiverPtr = 0; } if (mInputChannel != null) { mInputChannel.dispose(); mInputChannel = null; } mMessageQueue = null; } Loading
core/java/android/view/ViewRootImpl.java +6 −13 Original line number Diff line number Diff line Loading @@ -399,7 +399,6 @@ public final class ViewRootImpl implements ViewParent, @UnsupportedAppUsage final View.AttachInfo mAttachInfo; InputChannel mInputChannel; InputQueue.Callback mInputQueueCallback; InputQueue mInputQueue; @UnsupportedAppUsage Loading Loading @@ -882,9 +881,10 @@ public final class ViewRootImpl implements ViewParent, // manager, to make sure we do the relayout before receiving // any other events from the system. requestLayout(); InputChannel inputChannel = null; if ((mWindowAttributes.inputFeatures & WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL) == 0) { mInputChannel = new InputChannel(); inputChannel = new InputChannel(); } mForceDecorViewVisibility = (mWindowAttributes.privateFlags & PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY) != 0; Loading @@ -895,14 +895,14 @@ public final class ViewRootImpl implements ViewParent, res = mWindowSession.addToDisplay(mWindow, mSeq, mWindowAttributes, getHostVisibility(), mDisplay.getDisplayId(), mTmpFrame, mAttachInfo.mContentInsets, mAttachInfo.mStableInsets, mAttachInfo.mOutsets, mAttachInfo.mDisplayCutout, mInputChannel, mAttachInfo.mOutsets, mAttachInfo.mDisplayCutout, inputChannel, mTempInsets); setFrame(mTmpFrame); } catch (RemoteException e) { mAdded = false; mView = null; mAttachInfo.mRootView = null; mInputChannel = null; inputChannel = null; mFallbackEventHandler.setView(null); unscheduleTraversals(); setAccessibilityFocus(null, null); Loading Loading @@ -978,12 +978,12 @@ public final class ViewRootImpl implements ViewParent, mInputQueueCallback = ((RootViewSurfaceTaker)view).willYouTakeTheInputQueue(); } if (mInputChannel != null) { if (inputChannel != null) { if (mInputQueueCallback != null) { mInputQueue = new InputQueue(); mInputQueueCallback.onInputQueueCreated(mInputQueue); } mInputEventReceiver = new WindowInputEventReceiver(mInputChannel, mInputEventReceiver = new WindowInputEventReceiver(inputChannel, Looper.myLooper()); } Loading Loading @@ -4375,13 +4375,6 @@ public final class ViewRootImpl implements ViewParent, } catch (RemoteException e) { } // Dispose the input channel after removing the window so the Window Manager // doesn't interpret the input channel being closed as an abnormal termination. if (mInputChannel != null) { mInputChannel.dispose(); mInputChannel = null; } mDisplayManager.unregisterDisplayListener(mDisplayListener); unscheduleTraversals(); Loading