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

Commit 231a8bb5 authored by Matt Casey's avatar Matt Casey Committed by Android (Google) Code Review
Browse files

Merge "Add clipboard toast suppression permission."

parents e5cac878 07a3663d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5940,6 +5940,10 @@
         <p>Not for use by third-party applications. -->
    <permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND"
        android:protectionLevel="signature" />
    <!-- @hide Permission that suppresses the notification when the clipboard is accessed.
         <p>Not for use by third-party applications. -->
    <permission android:name="android.permission.SUPPRESS_CLIPBOARD_ACCESS_NOTIFICATION"
                android:protectionLevel="signature" />

    <!-- @SystemApi Allows modifying accessibility state.
         @hide -->
+1 −0
Original line number Diff line number Diff line
@@ -308,6 +308,7 @@

    <!-- To change system language (HDMI CEC) -->
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
    <uses-permission android:name="android.permission.SUPPRESS_CLIPBOARD_ACCESS_NOTIFICATION" />

    <protected-broadcast android:name="com.android.settingslib.action.REGISTER_SLICE_RECEIVER" />
    <protected-broadcast android:name="com.android.settingslib.action.UNREGISTER_SLICE_RECEIVER" />
+4 −0
Original line number Diff line number Diff line
@@ -1090,6 +1090,10 @@ public class ClipboardService extends SystemService {
                && mAutofillInternal.isAugmentedAutofillServiceForUser(uid, userId)) {
            return;
        }
        if (mPm.checkPermission(Manifest.permission.SUPPRESS_CLIPBOARD_ACCESS_NOTIFICATION,
                callingPackage) == PackageManager.PERMISSION_GRANTED) {
            return;
        }
        // Don't notify if already notified for this uid and clip.
        if (clipboard.mNotifiedUids.get(uid)) {
            return;