From 3c4efdd8f9da5c6bae8c8b4b567d562e042479af Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Mon, 28 Oct 2019 10:51:21 -0300 Subject: [PATCH] Apply proper color when action mode destroyed --- .../securesms/ConversationListFragment.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ConversationListFragment.java b/src/org/thoughtcrime/securesms/ConversationListFragment.java index 6d31f508e4..4b68dcb913 100644 --- a/src/org/thoughtcrime/securesms/ConversationListFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationListFragment.java @@ -501,8 +501,14 @@ public class ConversationListFragment extends Fragment } if (Build.VERSION.SDK_INT >= 23) { - int current = getActivity().getWindow().getDecorView().getSystemUiVisibility(); - getActivity().getWindow().getDecorView().setSystemUiVisibility(current | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + TypedArray lightStatusBarAttr = getActivity().getTheme().obtainStyledAttributes(new int[] {android.R.attr.windowLightStatusBar}); + int current = getActivity().getWindow().getDecorView().getSystemUiVisibility(); + int statusBarMode = lightStatusBarAttr.getBoolean(0, false) ? current | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR + : current & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; + + getActivity().getWindow().getDecorView().setSystemUiVisibility(statusBarMode); + + lightStatusBarAttr.recycle(); } actionMode = null;