Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e75ec61d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4942392 from 5c7dd600 to pi-qpr1-release

Change-Id: Ib8ee91bb77cd838477dc1c2d37116723173829a5
parents aff93b4d 5c7dd600
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -9629,10 +9629,17 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
        }
        // If we're extending a persistable grant, then we always need to create
        // the grant data structure so that take/release APIs work
        // Figure out the value returned when access is allowed
        final int allowedResult;
        if ((modeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
            return targetUid;
            // If we're extending a persistable grant, then we need to return
            // "targetUid" so that we always create a grant data structure to
            // support take/release APIs
            allowedResult = targetUid;
        } else {
            // Otherwise, we can return "-1" to indicate that no grant data
            // structures need to be created
            allowedResult = -1;
        }
        if (targetUid >= 0) {
@@ -9641,7 +9648,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                // No need to grant the target this permission.
                if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION,
                        "Target " + targetPkg + " already has full permission to " + grantUri);
                return -1;
                return allowedResult;
            }
        } else {
            // First...  there is no target package, so can anyone access it?
@@ -9676,7 +9683,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                }
            }
            if (allowed) {
                return -1;
                return allowedResult;
            }
        }