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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user