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

Commit 73eb3c1d authored by Nikolas Havrikov's avatar Nikolas Havrikov
Browse files

Determine TV form factor based on FEATURE_LEANBACK

This CL changes the implementation of isTelevision in DeviceUtils.java
to be consistent with NFF checks for other form factors.

Test: make
Change-Id: I1922b27466a27bab5278fe93dc65f56c312b2f6a
parent b009d37e
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) {