Merge "Add permission CHANGE_HDMI_CEC_ACTIVE_SOURCE"
This commit is contained in:
committed by
Android (Google) Code Review
commit
53bd7b553b
@@ -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 -->
|
||||
|
||||
@@ -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 + ")");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user