summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Feng Cao <fengcao@google.com> 2019-05-28 23:03:55 -0700
committer android-build-merger <android-build-merger@google.com> 2019-05-28 23:03:55 -0700
commitbe1357d1581702e7dde2a0447612e5e2347163aa (patch)
tree44d072ed7006dbba2878e9d6ea451a83138685c3
parent2ec07bc023c28166e020649b896238abf511cb01 (diff)
parentd272fe295065e60810ec90820a00449f49159c49 (diff)
Merge "Fix clipboard permission issue for AugmentedAutofillService provider." into qt-dev am: 3c0eeb951f
am: d272fe2950 Change-Id: I66d6b1b8d1a92186e670644ab3ced87624c5d231
-rw-r--r--services/core/java/com/android/server/clipboard/ClipboardService.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java
index af25ad56a2a7..b279b370c611 100644
--- a/services/core/java/com/android/server/clipboard/ClipboardService.java
+++ b/services/core/java/com/android/server/clipboard/ClipboardService.java
@@ -775,8 +775,7 @@ public class ClipboardService extends SystemService {
// if the application has the permission, let it to access user's clipboard.
// To passed synthesized uid user#10_app#systemui may not tell the real uid.
// userId must pass intending userId. i.e. user#10.
- allowed = mContentCaptureInternal.isContentCaptureServiceForUser(
- Binder.getCallingUid(), userId);
+ allowed = mContentCaptureInternal.isContentCaptureServiceForUser(uid, userId);
}
if (!allowed && mAutofillInternal != null) {
// ...or the Augmented Autofill Service
@@ -785,8 +784,7 @@ public class ClipboardService extends SystemService {
// if the application has the permission, let it to access user's clipboard.
// To passed synthesized uid user#10_app#systemui may not tell the real uid.
// userId must pass intending userId. i.e. user#10.
- allowed = mAutofillInternal.isAugmentedAutofillServiceForUser(
- Binder.getCallingUid(), userId);
+ allowed = mAutofillInternal.isAugmentedAutofillServiceForUser(uid, userId);
}
if (!allowed) {
Slog.e(TAG, "Denying clipboard access to " + callingPackage