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

Commit bd52fdcf authored by Nikolas Havrikov's avatar Nikolas Havrikov Committed by Android (Google) Code Review
Browse files

Merge "Determine TV form factor based on FEATURE_LEANBACK"

parents 1fd7ea10 73eb3c1d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -18,12 +18,10 @@ package com.android.packageinstaller;

import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Configuration;

public class DeviceUtils {
    public static boolean isTelevision(Context context) {
        int uiMode = context.getResources().getConfiguration().uiMode;
        return (uiMode & Configuration.UI_MODE_TYPE_MASK) == Configuration.UI_MODE_TYPE_TELEVISION;
        return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK);
    }

    public static boolean isWear(final Context context) {