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

Commit 53bd7b55 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add permission CHANGE_HDMI_CEC_ACTIVE_SOURCE"

parents c70f1d45 e41b76f1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2616,6 +2616,12 @@
    <permission android:name="android.permission.TV_VIRTUAL_REMOTE_CONTROLLER"
        android:protectionLevel="signature|privileged" />

    <!-- Allows an application to change HDMI CEC active source.
         <p>Not for use by third-party applications.
         @hide -->
    <permission android:name="android.permission.CHANGE_HDMI_CEC_ACTIVE_SOURCE"
        android:protectionLevel="signature|privileged" />

    <!-- @SystemApi Allows an application to modify parental controls
         <p>Not for use by third-party applications.
         @hide -->
+6 −0
Original line number Diff line number Diff line
@@ -1218,6 +1218,12 @@ public final class TvInputManagerService extends SystemService {

        @Override
        public void setMainSession(IBinder sessionToken, int userId) {
            if (mContext.checkCallingPermission(
                    android.Manifest.permission.CHANGE_HDMI_CEC_ACTIVE_SOURCE)
                    != PackageManager.PERMISSION_GRANTED) {
                throw new SecurityException(
                        "The caller does not have CHANGE_HDMI_CEC_ACTIVE_SOURCE permission");
            }
            if (DEBUG) {
                Slog.d(TAG, "setMainSession(sessionToken=" + sessionToken + ")");
            }