File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,20 +100,18 @@ public static boolean isTv(final Context context) {
100100 */
101101 public static boolean isDesktopMode (final Context context ) {
102102 // Adapted from https://stackoverflow.com/a/64615568
103- // to check for all devices that have an active cursor
104- if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .LOLLIPOP ) {
105- final InputManager im = (InputManager ) context .getSystemService (INPUT_SERVICE );
106- for (final int id : im .getInputDeviceIds ()) {
107- final InputDevice inputDevice = im .getInputDevice (id );
108- if (
109- inputDevice .supportsSource (InputDevice .SOURCE_BLUETOOTH_STYLUS )
110- || inputDevice .supportsSource (InputDevice .SOURCE_MOUSE )
111- || inputDevice .supportsSource (InputDevice .SOURCE_STYLUS )
112- || inputDevice .supportsSource (InputDevice .SOURCE_TOUCHPAD )
113- || inputDevice .supportsSource (InputDevice .SOURCE_TRACKBALL )
114- ) {
115- return true ;
116- }
103+ // to check for all input devices that have an active cursor
104+ final InputManager im = (InputManager ) context .getSystemService (INPUT_SERVICE );
105+ for (final int id : im .getInputDeviceIds ()) {
106+ final InputDevice inputDevice = im .getInputDevice (id );
107+ if (
108+ inputDevice .supportsSource (InputDevice .SOURCE_BLUETOOTH_STYLUS )
109+ || inputDevice .supportsSource (InputDevice .SOURCE_MOUSE )
110+ || inputDevice .supportsSource (InputDevice .SOURCE_STYLUS )
111+ || inputDevice .supportsSource (InputDevice .SOURCE_TOUCHPAD )
112+ || inputDevice .supportsSource (InputDevice .SOURCE_TRACKBALL )
113+ ) {
114+ return true ;
117115 }
118116 }
119117
You can’t perform that action at this time.
0 commit comments