Commit cf99f31e by Sebastián Katzer

Fix KEYGUARD_SERVICE might not be available

parent 99df92d9
...@@ -575,7 +575,7 @@ public class LocalNotification extends CordovaPlugin { ...@@ -575,7 +575,7 @@ public class LocalNotification extends CordovaPlugin {
.getSystemService(Context.KEYGUARD_SERVICE); .getSystemService(Context.KEYGUARD_SERVICE);
//noinspection SimplifiableIfStatement //noinspection SimplifiableIfStatement
if (km.isKeyguardLocked()) if (km != null && km.isKeyguardLocked())
return false; return false;
return view.getView().getWindowVisibility() == View.VISIBLE; return view.getView().getWindowVisibility() == View.VISIBLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment