question: public boolean isDeviceTV ( Context context ) { if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . LOLLIPOP ) { UiModeManager uiManager = ( UiModeManager ) context . getSystemService ( Context . UI_MODE_SERVICE ) ; return uiManager != null && uiManager . getCurrentModeType ( ) == Configuration . UI_MODE_TYPE_TELEVISION ; } return false ; }
target:  Determines if the current device is a TV.