OSDN Git Service

[RESTRICT AUTOMERGE] Correct argument order in permission check
authorBryan Ferris <bferris@google.com>
Thu, 27 Jun 2019 21:39:46 +0000 (14:39 -0700)
committerBryan Ferris <bferris@google.com>
Thu, 27 Jun 2019 22:00:19 +0000 (22:00 +0000)
The function 'checkAccess' recieves the uid and pid in that order and
forwards them to checkSlicePermission in the same order. However,
checkSlicePermission expects them in the opposite order.

Bug: 135551349
Test: atest FrameworksUiServicesTests
Change-Id: I6e49efeab08f0e2a29d9830e6f81905598ae410c

services/core/java/com/android/server/slice/SliceManagerService.java

index e8f255f..f5947ee 100644 (file)
@@ -390,7 +390,7 @@ public class SliceManagerService extends ISliceManager.Stub {
     }
 
     protected int checkAccess(String pkg, Uri uri, int uid, int pid) {
-        return checkSlicePermission(uri, pkg, uid, pid, null);
+        return checkSlicePermission(uri, pkg, pid, uid, null);
     }
 
     private String getProviderPkg(Uri uri, int user) {