Only apply server visible to split screen
When the app windows switching, the control target can temporarily updated to the remote control target and the insets will become server controlled in that case. However, we don't want to apply the server visibility for that case as it's not a real insets update. This patch changed the insets visibility calculation, to consider server visibility only if the display is in multi window mode and the insets is not client controlled. Test: atest InsetsSourceProviderTest Test: go/wm-smoke Test: See reproduce steps in the bug. Bug: 158447971 Change-Id: I0525813459b367d23d8300d122c72a2b49bac967
This commit is contained in:
@@ -351,9 +351,13 @@ class InsetsSourceProvider {
|
||||
}
|
||||
|
||||
private void updateVisibility() {
|
||||
// TODO(b/159699383): remove the client controlled check when the insets visibility can be
|
||||
// driven by the system UI.
|
||||
final boolean isClientControlled = mControlTarget != null
|
||||
&& mControlTarget.isClientControlled();
|
||||
mSource.setVisible(mServerVisible && (!isClientControlled || mClientVisible));
|
||||
mSource.setVisible(mServerVisible
|
||||
&& ((!isClientControlled && mDisplayContent.inMultiWindowMode())
|
||||
|| mClientVisible));
|
||||
ProtoLog.d(WM_DEBUG_IME,
|
||||
"InsetsSource updateVisibility serverVisible: %s clientVisible: %s",
|
||||
mServerVisible, mClientVisible);
|
||||
|
||||
Reference in New Issue
Block a user