CB-12188 Status Bar is not changing in some specific android phone (Red MI 3s Prime)

This closes #76
This commit is contained in:
olln3 2017-02-09 08:35:45 +08:00 committed by Steve Gill
parent 995e4fdf9d
commit 916cccc2c0

View File

@ -154,7 +154,7 @@ public class StatusBar extends CordovaPlugin {
window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
try {
// Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21
window.getClass().getDeclaredMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref));
window.getClass().getMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref));
} catch (IllegalArgumentException ignore) {
LOG.e(TAG, "Invalid hexString argument, use f.i. '#999999'");
} catch (Exception ignore) {