Fix: Disappearing home button

Symptom:
Accidentally, home button was not shown on navigation bar after
unlocking keygaurd.

Root cause:
Home button's visibility is controlled by STATUS_BAR_DISABLE_HOME
flag. Keygaurd requests STATUS_BAR_DISABLE_HOME flag at locking
and removes it at unlocking.
When removing the flag and recreation of NavigationBarFragment
happen simultaneously, NavigationBarFragment fails to remove the
flag and it keeps hiding the home button.

Solution:
CommandQueue has a latest requested "disabled" flags. It's better to
reevaluate the flag and apply it to the recreated NavigationBarFragment.

Test: manual
Fixes: 122999473
Fixes: 113914868
Change-Id: Ic19029aab2e777aeb187963da3ef341291cca490
This commit is contained in:
Tetsutoki Shiozawa
2019-01-11 18:46:28 +09:00
committed by Matthew Ng
parent e49bb32221
commit e294e49c4e

View File

@@ -243,6 +243,9 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
mDisabledFlags2 = savedInstanceState.getInt(EXTRA_DISABLE2_STATE, 0);
}
mAccessibilityManagerWrapper.addCallback(mAccessibilityListener);
// Respect the latest disabled-flags.
mCommandQueue.recomputeDisableFlags(mDisplayId, false);
}
@Override