瀏覽代碼

fix unit tests

Guy Carmeli 5 年之前
父節點
當前提交
5a6fc7fd39
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      lib/android/app/src/main/java/com/reactnativenavigation/utils/StatusBarUtils.java

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/utils/StatusBarUtils.java 查看文件

@@ -32,6 +32,6 @@ public class StatusBarUtils {
32 32
 
33 33
     public static boolean isTranslucent(Window window) {
34 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
 }