TIAF: add permission BIND_TV_INTERACTIVE_APP
Similar to BIND_TV_INPUT, in the manifest declaration, specifying the BIND_TV_INTERACTIVE_APP permission to allow the service to connect the TV interactive app to the system. A system service performs the binding and has the BIND_TV_INTERACTIVE_APP permission. Link of BIND_TV_INPUT as a reference: https://developer.android.com/training/tv/tif/tvinput#manifest Bug: 215773542 Change-Id: Id185e0495420e67b2566a848dd81e0f72ad6d083
This commit is contained in:
@@ -50,6 +50,7 @@ package android {
|
||||
field public static final String BIND_TELECOM_CONNECTION_SERVICE = "android.permission.BIND_TELECOM_CONNECTION_SERVICE";
|
||||
field public static final String BIND_TEXT_SERVICE = "android.permission.BIND_TEXT_SERVICE";
|
||||
field public static final String BIND_TV_INPUT = "android.permission.BIND_TV_INPUT";
|
||||
field public static final String BIND_TV_INTERACTIVE_APP = "android.permission.BIND_TV_INTERACTIVE_APP";
|
||||
field public static final String BIND_VISUAL_VOICEMAIL_SERVICE = "android.permission.BIND_VISUAL_VOICEMAIL_SERVICE";
|
||||
field public static final String BIND_VOICE_INTERACTION = "android.permission.BIND_VOICE_INTERACTION";
|
||||
field public static final String BIND_VPN_SERVICE = "android.permission.BIND_VPN_SERVICE";
|
||||
|
||||
@@ -4130,6 +4130,13 @@
|
||||
<permission android:name="android.permission.BIND_TV_INPUT"
|
||||
android:protectionLevel="signature|privileged" />
|
||||
|
||||
<!-- Must be required by a {@link android.media.tv.interactive.TvInteractiveAppService}
|
||||
to ensure that only the system can bind to it.
|
||||
<p>Protection level: signature|privileged
|
||||
-->
|
||||
<permission android:name="android.permission.BIND_TV_INTERACTIVE_APP"
|
||||
android:protectionLevel="signature|privileged" />
|
||||
|
||||
<!-- @SystemApi
|
||||
Must be required by a {@link com.android.media.tv.remoteprovider.TvRemoteProvider}
|
||||
to ensure that only the system can bind to it.
|
||||
|
||||
@@ -129,7 +129,12 @@ public class TvInteractiveAppManagerService extends SystemService {
|
||||
|
||||
for (ResolveInfo ri : services) {
|
||||
ServiceInfo si = ri.serviceInfo;
|
||||
// TODO: add BIND_TV_INTERACTIVE_APP permission and check it here
|
||||
if (!android.Manifest.permission.BIND_TV_INTERACTIVE_APP.equals(si.permission)) {
|
||||
Slog.w(TAG, "Skipping TV interactiva app service " + si.name
|
||||
+ ": it does not require the permission "
|
||||
+ android.Manifest.permission.BIND_TV_INTERACTIVE_APP);
|
||||
continue;
|
||||
}
|
||||
|
||||
ComponentName component = new ComponentName(si.packageName, si.name);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user