Merge "Remove the input consumer surfaces when the consumer is disposed" into rvc-dev
This commit is contained in:
@@ -153,10 +153,11 @@ class InputConsumerImpl implements IBinder.DeathRecipient {
|
||||
t.reparent(mInputSurface, wc.getSurfaceControl());
|
||||
}
|
||||
|
||||
void disposeChannelsLw() {
|
||||
void disposeChannelsLw(SurfaceControl.Transaction t) {
|
||||
mService.mInputManager.unregisterInputChannel(mServerChannel);
|
||||
mClientChannel.dispose();
|
||||
mServerChannel.dispose();
|
||||
t.remove(mInputSurface);
|
||||
unlinkFromDeathRecipient();
|
||||
}
|
||||
|
||||
|
||||
@@ -112,8 +112,9 @@ final class InputMonitor {
|
||||
@Override
|
||||
public void dispose() {
|
||||
synchronized (mService.mGlobalLock) {
|
||||
disposeChannelsLw();
|
||||
disposeChannelsLw(mInputMonitor.mInputTransaction);
|
||||
mInputEventReceiver.dispose();
|
||||
mInputMonitor.updateInputWindowsLw(true /* force */);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,8 +196,7 @@ final class InputMonitor {
|
||||
|
||||
private boolean disposeInputConsumer(InputConsumerImpl consumer) {
|
||||
if (consumer != null) {
|
||||
consumer.disposeChannelsLw();
|
||||
consumer.hide(mInputTransaction);
|
||||
consumer.disposeChannelsLw(mInputTransaction);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user