Loading core/res/AndroidManifest.xml +9 −0 Original line number Diff line number Diff line Loading @@ -5593,6 +5593,15 @@ <permission android:name="android.permission.BIND_TV_INPUT" android:protectionLevel="signature|privileged" /> <!-- This permission is required among systems services to always keep the binding with TvInputManagerService. <p>This should only be used by the OEM TvInputService. <p>Protection level: signature|privileged|vendorPrivileged @hide --> <permission android:name="android.permission.ALWAYS_BOUND_TV_INPUT" android:protectionLevel="signature|privileged|vendorPrivileged" /> <!-- 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 Loading services/core/java/com/android/server/tv/TvInputManagerService.java +7 −1 Original line number Diff line number Diff line Loading @@ -341,10 +341,16 @@ public final class TvInputManagerService extends SystemService { }, UserHandle.ALL, intentFilter, null, null); } private static boolean hasAlwaysBoundPermission(PackageManager pm, ComponentName component) { return pm.checkPermission(android.Manifest.permission.ALWAYS_BOUND_TV_INPUT, component.getPackageName()) == PackageManager.PERMISSION_GRANTED; } private static boolean hasHardwarePermission(PackageManager pm, ComponentName component) { return pm.checkPermission(android.Manifest.permission.TV_INPUT_HARDWARE, component.getPackageName()) == PackageManager.PERMISSION_GRANTED; } @GuardedBy("mLock") private void buildTvInputListLocked(int userId, String[] updatedPackages) { UserState userState = getOrCreateUserStateLocked(userId); Loading Loading @@ -3526,7 +3532,7 @@ public final class TvInputManagerService extends SystemService { continue; } ComponentName component = new ComponentName(si.packageName, si.name); if (hasHardwarePermission(pm, component)) { if (!hasAlwaysBoundPermission(pm, component) && hasHardwarePermission(pm, component)) { updateServiceConnectionLocked(component, userId); } } Loading Loading
core/res/AndroidManifest.xml +9 −0 Original line number Diff line number Diff line Loading @@ -5593,6 +5593,15 @@ <permission android:name="android.permission.BIND_TV_INPUT" android:protectionLevel="signature|privileged" /> <!-- This permission is required among systems services to always keep the binding with TvInputManagerService. <p>This should only be used by the OEM TvInputService. <p>Protection level: signature|privileged|vendorPrivileged @hide --> <permission android:name="android.permission.ALWAYS_BOUND_TV_INPUT" android:protectionLevel="signature|privileged|vendorPrivileged" /> <!-- 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 Loading
services/core/java/com/android/server/tv/TvInputManagerService.java +7 −1 Original line number Diff line number Diff line Loading @@ -341,10 +341,16 @@ public final class TvInputManagerService extends SystemService { }, UserHandle.ALL, intentFilter, null, null); } private static boolean hasAlwaysBoundPermission(PackageManager pm, ComponentName component) { return pm.checkPermission(android.Manifest.permission.ALWAYS_BOUND_TV_INPUT, component.getPackageName()) == PackageManager.PERMISSION_GRANTED; } private static boolean hasHardwarePermission(PackageManager pm, ComponentName component) { return pm.checkPermission(android.Manifest.permission.TV_INPUT_HARDWARE, component.getPackageName()) == PackageManager.PERMISSION_GRANTED; } @GuardedBy("mLock") private void buildTvInputListLocked(int userId, String[] updatedPackages) { UserState userState = getOrCreateUserStateLocked(userId); Loading Loading @@ -3526,7 +3532,7 @@ public final class TvInputManagerService extends SystemService { continue; } ComponentName component = new ComponentName(si.packageName, si.name); if (hasHardwarePermission(pm, component)) { if (!hasAlwaysBoundPermission(pm, component) && hasHardwarePermission(pm, component)) { updateServiceConnectionLocked(component, userId); } } Loading