Reset visibility before creating leash

Otherwise we create the leash with visibility=shown before the
client can update it, creating a flicker.

Test: Open IME, go home, observe no flicker
Bug: 111084606
Change-Id: I38eadaef79c27036edf5a86b773f6695d463db5c
This commit is contained in:
Jorim Jaggi
2019-01-22 17:48:34 +01:00
parent 92fd290867
commit d89efebc97
4 changed files with 10 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ public class InsetsSourceConsumer {
mState = state;
mTransactionSupplier = transactionSupplier;
mController = controller;
mVisible = InsetsState.getDefaultVisibly(type);
mVisible = InsetsState.getDefaultVisibility(type);
}
public void setControl(@Nullable InsetsSourceControl control) {

View File

@@ -278,7 +278,7 @@ public class InsetsState implements Parcelable {
}
}
public static boolean getDefaultVisibly(@InsetType int type) {
public static boolean getDefaultVisibility(@InsetType int type) {
switch (type) {
case TYPE_TOP_BAR:
case TYPE_SIDE_BAR_1: