Loading services/core/java/com/android/server/location/provider/LocationProviderManager.java +10 −8 Original line number Diff line number Diff line Loading @@ -1734,12 +1734,6 @@ public class LocationProviderManager extends return null; } // lastly - note app ops if (!mAppOpsHelper.noteOpNoThrow(LocationPermissions.asAppOp(permissionLevel), identity)) { return null; } Location location = getPermittedLocation( getLastLocationUnsafe( identity.getUserId(), Loading @@ -1748,11 +1742,19 @@ public class LocationProviderManager extends Long.MAX_VALUE), permissionLevel); if (location != null && identity.getPid() == Process.myPid()) { if (location != null) { // lastly - note app ops if (!mAppOpsHelper.noteOpNoThrow(LocationPermissions.asAppOp(permissionLevel), identity)) { return null; } // if delivering to the same process, make a copy of the location first (since // location is mutable) if (identity.getPid() == Process.myPid()) { location = new Location(location); } } return location; } Loading Loading
services/core/java/com/android/server/location/provider/LocationProviderManager.java +10 −8 Original line number Diff line number Diff line Loading @@ -1734,12 +1734,6 @@ public class LocationProviderManager extends return null; } // lastly - note app ops if (!mAppOpsHelper.noteOpNoThrow(LocationPermissions.asAppOp(permissionLevel), identity)) { return null; } Location location = getPermittedLocation( getLastLocationUnsafe( identity.getUserId(), Loading @@ -1748,11 +1742,19 @@ public class LocationProviderManager extends Long.MAX_VALUE), permissionLevel); if (location != null && identity.getPid() == Process.myPid()) { if (location != null) { // lastly - note app ops if (!mAppOpsHelper.noteOpNoThrow(LocationPermissions.asAppOp(permissionLevel), identity)) { return null; } // if delivering to the same process, make a copy of the location first (since // location is mutable) if (identity.getPid() == Process.myPid()) { location = new Location(location); } } return location; } Loading