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

Commit e32ff25b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update feature flag config of unbinding inactive TIS" into main

parents a804e49b fc5c0be9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5605,12 +5605,13 @@
    <!-- This permission is required among systems services to always keep the
         binding with TvInputManagerService.
         <p>This should only be used by the OEM TvInputService.
         @FlaggedApi("android.media.tv.flags.tif_unbind_inactive_tis")
         <p>Protection level: signature|privileged|vendorPrivileged
         @hide
    -->
    <permission android:name="android.permission.ALWAYS_BOUND_TV_INPUT"
        android:protectionLevel="signature|privileged|vendorPrivileged"
        android:featureFlag="android.media.tv.flags.tis_always_bound_permission"/>
        android:featureFlag="android.media.tv.flags.tif_unbind_inactive_tis"/>

    <!-- Must be required by a {@link android.media.tv.interactive.TvInteractiveAppService}
         to ensure that only the system can bind to it.
+3 −3
Original line number Diff line number Diff line
@@ -26,11 +26,11 @@ flag {
}

flag {
    name: "tis_always_bound_permission"
    name: "tif_unbind_inactive_tis"
    is_exported: true
    namespace: "media_tv"
    description: "Introduce ALWAYS_BOUND_TV_INPUT for TIS."
    bug: "332201346"
    description: "Unbind hardware TIS when not needed"
    bug: "279189366"
}

flag {
+8 −5
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.server.tv;
import static android.media.AudioManager.DEVICE_NONE;
import static android.media.tv.TvInputManager.INPUT_STATE_CONNECTED;
import static android.media.tv.TvInputManager.INPUT_STATE_CONNECTED_STANDBY;
import static android.media.tv.flags.Flags.tifUnbindInactiveTis;
import static android.media.tv.flags.Flags.kidsModeTvdbSharing;

import android.annotation.NonNull;
@@ -4515,12 +4516,14 @@ public final class TvInputManagerService extends SystemService {
                    break;
                }
                case MSG_UPDATE_HARDWARE_TIS_BINDING:
                    if (tifUnbindInactiveTis()) {
                        SomeArgs args = (SomeArgs) msg.obj;
                        int userId = (int) args.arg1;
                        synchronized (mLock) {
                            updateHardwareTvInputServiceBindingLocked(userId);
                        }
                        args.recycle();
                    }
                    break;
                default: {
                    Slog.w(TAG, "unhandled message code: " + msg.what);