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

Commit 0722968c authored by Tim Kilbourn's avatar Tim Kilbourn
Browse files

FEATURE_LEANBACK implies that the device is a tv.

For managing the ui mode, consider the device to be a television if it
has either the FEATURE_TELEVISION or FEATURE_LEANBACK system features.

When leanback is available for non-television devices, we need to
reconsider the use of these features for setting the television ui mode.

Change-Id: I7b82372ce19067e010be9b42111816bab186f95b
parent 55740325
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -173,7 +173,9 @@ final class UiModeManagerService extends SystemService {
        mDeskModeKeepsScreenOn = (context.getResources().getInteger(
                com.android.internal.R.integer.config_deskDockKeepsScreenOn) == 1);
        mTelevision = context.getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_TELEVISION);
                PackageManager.FEATURE_TELEVISION) ||
            context.getPackageManager().hasSystemFeature(
                    PackageManager.FEATURE_LEANBACK);

        mNightMode = Settings.Secure.getInt(context.getContentResolver(),
                Settings.Secure.UI_NIGHT_MODE, UiModeManager.MODE_NIGHT_AUTO);