Fix crash.
Change-Id: Id219351625494c54524e400055755d41f3bef868
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index ce597ad..c5e7b62 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -4934,7 +4934,7 @@
void grantUriPermissionFromIntentLocked(int callingUid,
String targetPkg, Intent intent, UriPermissionOwner owner) {
NeededUriGrants needed = checkGrantUriPermissionFromIntentLocked(callingUid, targetPkg,
- intent, intent.getFlags(), null);
+ intent, intent != null ? intent.getFlags() : 0, null);
if (needed == null) {
return;
}