Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ package android { field public static final java.lang.String REGISTER_CALL_PROVIDER = "android.permission.REGISTER_CALL_PROVIDER"; field public static final java.lang.String REGISTER_CONNECTION_MANAGER = "android.permission.REGISTER_CONNECTION_MANAGER"; field public static final java.lang.String REGISTER_SIM_SUBSCRIPTION = "android.permission.REGISTER_SIM_SUBSCRIPTION"; field public static final java.lang.String REMOTE_DISPLAY_PROVIDER = "android.permission.REMOTE_DISPLAY_PROVIDER"; field public static final java.lang.String REMOVE_DRM_CERTIFICATES = "android.permission.REMOVE_DRM_CERTIFICATES"; field public static final java.lang.String REMOVE_TASKS = "android.permission.REMOVE_TASKS"; field public static final java.lang.String RESET_PASSWORD = "android.permission.RESET_PASSWORD"; Loading core/res/AndroidManifest.xml +8 −2 Original line number Diff line number Diff line Loading @@ -3521,19 +3521,25 @@ <permission android:name="android.permission.MODIFY_DEFAULT_AUDIO_EFFECTS" android:protectionLevel="signature|privileged" /> <!-- @SystemApi Allows an application to provide remote displays. <p>Not for use by third-party applications.</p> @hide --> <permission android:name="android.permission.REMOTE_DISPLAY_PROVIDER" android:protectionLevel="signature|privileged" /> <!-- Allows an application to capture video output. <p>Not for use by third-party applications.</p> @hide @removed --> <permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" android:protectionLevel="signature|privileged" /> android:protectionLevel="signature" /> <!-- Allows an application to capture secure video output. <p>Not for use by third-party applications.</p> @hide @removed --> <permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" android:protectionLevel="signature|privileged" /> android:protectionLevel="signature" /> <!-- Allows an application to know what content is playing and control its playback. <p>Not for use by third-party applications due to privacy of media consumption</p> --> Loading services/core/java/com/android/server/media/RemoteDisplayProviderWatcher.java +6 −17 Original line number Diff line number Diff line Loading @@ -159,12 +159,13 @@ public final class RemoteDisplayProviderWatcher { + serviceInfo.packageName + "/" + serviceInfo.name); return false; } if (!hasCaptureVideoPermission(serviceInfo.packageName)) { // If the service does not have permission to capture video then it // isn't going to be terribly useful as a remote display, is it? // Kind of makes you wonder what it's doing there in the first place. if (mPackageManager.checkPermission(Manifest.permission.REMOTE_DISPLAY_PROVIDER, serviceInfo.packageName) != PackageManager.PERMISSION_GRANTED) { // If the service does not have this permission then the system will not bind to it. // This is to prevent non privileged apps declaring themselves as remote display // providers just to be bound to by the system and keep their process alive. Slog.w(TAG, "Ignoring remote display provider service because it does not " + "have the CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT " + "have the REMOTE_DISPLAY_PROVIDER " + "permission: " + serviceInfo.packageName + "/" + serviceInfo.name); return false; } Loading @@ -172,18 +173,6 @@ public final class RemoteDisplayProviderWatcher { return true; } private boolean hasCaptureVideoPermission(String packageName) { if (mPackageManager.checkPermission(Manifest.permission.CAPTURE_VIDEO_OUTPUT, packageName) == PackageManager.PERMISSION_GRANTED) { return true; } if (mPackageManager.checkPermission(Manifest.permission.CAPTURE_SECURE_VIDEO_OUTPUT, packageName) == PackageManager.PERMISSION_GRANTED) { return true; } return false; } private int findProvider(String packageName, String className) { int count = mProviders.size(); for (int i = 0; i < count; i++) { Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ package android { field public static final java.lang.String REGISTER_CALL_PROVIDER = "android.permission.REGISTER_CALL_PROVIDER"; field public static final java.lang.String REGISTER_CONNECTION_MANAGER = "android.permission.REGISTER_CONNECTION_MANAGER"; field public static final java.lang.String REGISTER_SIM_SUBSCRIPTION = "android.permission.REGISTER_SIM_SUBSCRIPTION"; field public static final java.lang.String REMOTE_DISPLAY_PROVIDER = "android.permission.REMOTE_DISPLAY_PROVIDER"; field public static final java.lang.String REMOVE_DRM_CERTIFICATES = "android.permission.REMOVE_DRM_CERTIFICATES"; field public static final java.lang.String REMOVE_TASKS = "android.permission.REMOVE_TASKS"; field public static final java.lang.String RESET_PASSWORD = "android.permission.RESET_PASSWORD"; Loading
core/res/AndroidManifest.xml +8 −2 Original line number Diff line number Diff line Loading @@ -3521,19 +3521,25 @@ <permission android:name="android.permission.MODIFY_DEFAULT_AUDIO_EFFECTS" android:protectionLevel="signature|privileged" /> <!-- @SystemApi Allows an application to provide remote displays. <p>Not for use by third-party applications.</p> @hide --> <permission android:name="android.permission.REMOTE_DISPLAY_PROVIDER" android:protectionLevel="signature|privileged" /> <!-- Allows an application to capture video output. <p>Not for use by third-party applications.</p> @hide @removed --> <permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" android:protectionLevel="signature|privileged" /> android:protectionLevel="signature" /> <!-- Allows an application to capture secure video output. <p>Not for use by third-party applications.</p> @hide @removed --> <permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" android:protectionLevel="signature|privileged" /> android:protectionLevel="signature" /> <!-- Allows an application to know what content is playing and control its playback. <p>Not for use by third-party applications due to privacy of media consumption</p> --> Loading
services/core/java/com/android/server/media/RemoteDisplayProviderWatcher.java +6 −17 Original line number Diff line number Diff line Loading @@ -159,12 +159,13 @@ public final class RemoteDisplayProviderWatcher { + serviceInfo.packageName + "/" + serviceInfo.name); return false; } if (!hasCaptureVideoPermission(serviceInfo.packageName)) { // If the service does not have permission to capture video then it // isn't going to be terribly useful as a remote display, is it? // Kind of makes you wonder what it's doing there in the first place. if (mPackageManager.checkPermission(Manifest.permission.REMOTE_DISPLAY_PROVIDER, serviceInfo.packageName) != PackageManager.PERMISSION_GRANTED) { // If the service does not have this permission then the system will not bind to it. // This is to prevent non privileged apps declaring themselves as remote display // providers just to be bound to by the system and keep their process alive. Slog.w(TAG, "Ignoring remote display provider service because it does not " + "have the CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT " + "have the REMOTE_DISPLAY_PROVIDER " + "permission: " + serviceInfo.packageName + "/" + serviceInfo.name); return false; } Loading @@ -172,18 +173,6 @@ public final class RemoteDisplayProviderWatcher { return true; } private boolean hasCaptureVideoPermission(String packageName) { if (mPackageManager.checkPermission(Manifest.permission.CAPTURE_VIDEO_OUTPUT, packageName) == PackageManager.PERMISSION_GRANTED) { return true; } if (mPackageManager.checkPermission(Manifest.permission.CAPTURE_SECURE_VIDEO_OUTPUT, packageName) == PackageManager.PERMISSION_GRANTED) { return true; } return false; } private int findProvider(String packageName, String className) { int count = mProviders.size(); for (int i = 0; i < count; i++) { Loading