commit | 99d61c87a97b43a16e7a622446eaeb1949ee0601 | [log] [tgz] |
---|---|---|
author | Jonathan Miranda <jonmiranda@google.com> | Tue Jun 29 23:15:23 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jun 29 23:15:23 2021 +0000 |
tree | a83fae072344eaf279da58a1dccc8b8b7c9d825e | |
parent | 1d161e8209dfa516eea63eb8a6237b252474b1eb [diff] | |
parent | 1b6a8b225514e88c612b9aeff2179d51889658d3 [diff] |
Merge "Fix bug where status bar was not set properly." into sc-dev am: 1b6a8b2255 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15146553 Change-Id: Id0069cd48e1f190b67b69c6e6633745b1beca8f3
diff --git a/src/com/android/launcher3/views/ScrimView.java b/src/com/android/launcher3/views/ScrimView.java index fb1485b..1eb79ad 100644 --- a/src/com/android/launcher3/views/ScrimView.java +++ b/src/com/android/launcher3/views/ScrimView.java
@@ -97,8 +97,10 @@ private void updateSysUiColors() { // Use a light system UI (dark icons) if all apps is behind at least half of the // status bar. - boolean forceChange = - getVisibility() == VISIBLE && getAlpha() > STATUS_BAR_COLOR_FORCE_UPDATE_THRESHOLD; + final float threshold = STATUS_BAR_COLOR_FORCE_UPDATE_THRESHOLD; + boolean forceChange = getVisibility() == VISIBLE + && getAlpha() > threshold + && (Color.alpha(mBackgroundColor) / 255f) > threshold; if (forceChange) { getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, !isScrimDark()); } else {