Browse Source

fix unit tests

Guy Carmeli 5 years ago
parent
commit
5a6fc7fd39

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/utils/StatusBarUtils.java View File

32
 
32
 
33
     public static boolean isTranslucent(Window window) {
33
     public static boolean isTranslucent(Window window) {
34
         WindowManager.LayoutParams lp = window.getAttributes();
34
         WindowManager.LayoutParams lp = window.getAttributes();
35
-        return (lp.flags & FLAG_TRANSLUCENT_STATUS) == FLAG_TRANSLUCENT_STATUS;
35
+        return lp != null && (lp.flags & FLAG_TRANSLUCENT_STATUS) == FLAG_TRANSLUCENT_STATUS;
36
     }
36
     }
37
 }
37
 }