Loading core/res/AndroidManifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -4147,6 +4147,11 @@ <permission android:name="android.permission.BIND_SMS_APP_SERVICE" android:protectionLevel="signature" /> <!-- @hide Permission that allows background clipboard access. <p>Not for use by third-party applications. --> <permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND" android:protectionLevel="signature" /> <application android:process="system" android:persistent="true" android:hasCode="false" Loading packages/Shell/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ <uses-permission android:name="android.permission.CONTROL_KEYGUARD" /> <uses-permission android:name="android.permission.SUSPEND_APPS" /> <uses-permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND" /> <application android:label="@string/app_label" android:defaultToDeviceProtectedStorage="true" Loading services/core/java/com/android/server/clipboard/ClipboardService.java +5 −0 Original line number Diff line number Diff line Loading @@ -629,6 +629,11 @@ public class ClipboardService extends SystemService { if (mAppOps.noteOp(op, callingUid, callingPackage) != AppOpsManager.MODE_ALLOWED) { return false; } // Shell can access the clipboard for testing purposes. if (mPm.checkPermission(android.Manifest.permission.READ_CLIPBOARD_IN_BACKGROUND, callingPackage) == PackageManager.PERMISSION_GRANTED) { return true; } // The default IME is always allowed to access the clipboard. String defaultIme = Settings.Secure.getStringForUser(getContext().getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD, UserHandle.getUserId(callingUid)); Loading Loading
core/res/AndroidManifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -4147,6 +4147,11 @@ <permission android:name="android.permission.BIND_SMS_APP_SERVICE" android:protectionLevel="signature" /> <!-- @hide Permission that allows background clipboard access. <p>Not for use by third-party applications. --> <permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND" android:protectionLevel="signature" /> <application android:process="system" android:persistent="true" android:hasCode="false" Loading
packages/Shell/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ <uses-permission android:name="android.permission.CONTROL_KEYGUARD" /> <uses-permission android:name="android.permission.SUSPEND_APPS" /> <uses-permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND" /> <application android:label="@string/app_label" android:defaultToDeviceProtectedStorage="true" Loading
services/core/java/com/android/server/clipboard/ClipboardService.java +5 −0 Original line number Diff line number Diff line Loading @@ -629,6 +629,11 @@ public class ClipboardService extends SystemService { if (mAppOps.noteOp(op, callingUid, callingPackage) != AppOpsManager.MODE_ALLOWED) { return false; } // Shell can access the clipboard for testing purposes. if (mPm.checkPermission(android.Manifest.permission.READ_CLIPBOARD_IN_BACKGROUND, callingPackage) == PackageManager.PERMISSION_GRANTED) { return true; } // The default IME is always allowed to access the clipboard. String defaultIme = Settings.Secure.getStringForUser(getContext().getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD, UserHandle.getUserId(callingUid)); Loading