Apply proper color when action mode destroyed

This commit is contained in:
Alex Hart 2019-10-28 10:51:21 -03:00 committed by Greyson Parrelli
parent 80deb301e5
commit 3c4efdd8f9

View file

@ -501,8 +501,14 @@ public class ConversationListFragment extends Fragment
}
if (Build.VERSION.SDK_INT >= 23) {
TypedArray lightStatusBarAttr = getActivity().getTheme().obtainStyledAttributes(new int[] {android.R.attr.windowLightStatusBar});
int current = getActivity().getWindow().getDecorView().getSystemUiVisibility();
getActivity().getWindow().getDecorView().setSystemUiVisibility(current | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
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;