The MINIX NEO-U1 is now being reported as Android TV
authorSam Lantinga <slouken@libsdl.org>
Thu, 09 Aug 2018 16:04:25 -0700
changeset 120941517756022e5
parent 12093 593daac0ffd1
child 12095 d985a68d32ea
The MINIX NEO-U1 is now being reported as Android TV
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Thu Aug 09 16:04:21 2018 -0700
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Thu Aug 09 16:04:25 2018 -0700
     1.3 @@ -767,7 +767,13 @@
     1.4       */
     1.5      public static boolean isAndroidTV() {
     1.6          UiModeManager uiModeManager = (UiModeManager) getContext().getSystemService(UI_MODE_SERVICE);
     1.7 -        return (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION);
     1.8 +        if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) {
     1.9 +            return true;
    1.10 +        }
    1.11 +        if (Build.MANUFACTURER.equals("MINIX") && Build.MODEL.equals("NEO-U1")) {
    1.12 +            return true;
    1.13 +        }
    1.14 +        return false;
    1.15      }
    1.16  
    1.17      /**