Merge "Fix consumer closed input channel cause an error occurred (1/2)" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
488cd2c4ff
@@ -4638,14 +4638,17 @@ public final class ViewRootImpl implements ViewParent,
|
||||
mInputQueueCallback = null;
|
||||
mInputQueue = null;
|
||||
}
|
||||
if (mInputEventReceiver != null) {
|
||||
mInputEventReceiver.dispose();
|
||||
mInputEventReceiver = null;
|
||||
}
|
||||
try {
|
||||
mWindowSession.remove(mWindow);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
// Dispose receiver would dispose client InputChannel, too. That could send out a socket
|
||||
// broken event, so we need to unregister the server InputChannel when removing window to
|
||||
// prevent server side receive the event and prompt error.
|
||||
if (mInputEventReceiver != null) {
|
||||
mInputEventReceiver.dispose();
|
||||
mInputEventReceiver = null;
|
||||
}
|
||||
|
||||
mDisplayManager.unregisterDisplayListener(mDisplayListener);
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ public class WindowlessWindowManager implements IWindowSession {
|
||||
throw new IllegalArgumentException(
|
||||
"Invalid window token (never added or removed already)");
|
||||
}
|
||||
|
||||
try (SurfaceControl.Transaction t = new SurfaceControl.Transaction()) {
|
||||
t.remove(state.mSurfaceControl).apply();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user