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

Commit e41b76f1 authored by Shubang's avatar Shubang
Browse files

Add permission CHANGE_HDMI_CEC_ACTIVE_SOURCE

Test: mmm
Bug: 62270868
Change-Id: I7e8aad5324598ae2e2408d6ef6cb62d58d687d0e
parent 9b12a427
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2612,6 +2612,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 + ")");
            }