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 11package org .schabi .newpipe .util ;
22
3+ import static android .content .Context .INPUT_SERVICE ;
4+
35import android .annotation .SuppressLint ;
46import android .app .UiModeManager ;
57import android .content .Context ;
2729
2830import java .lang .reflect .Method ;
2931
30- import static android .content .Context .INPUT_SERVICE ;
31-
3232public final class DeviceUtils {
3333
3434 private static final String AMAZON_FEATURE_FIRE_TV = "amazon.hardware.fire_tv" ;
35+ private static final boolean SAMSUNG = Build .MANUFACTURER .equals ("samsung" );
3536 private static Boolean isTV = null ;
3637 private static Boolean isFireTV = null ;
3738
@@ -120,6 +121,10 @@ public static boolean isDesktopMode(@NonNull final Context context) {
120121 return true ;
121122 }
122123
124+ if (!SAMSUNG ) {
125+ return false ;
126+ // DeX is Samsung-specific, skip the checks below on non-Samsung devices
127+ }
123128 // DeX check for standalone and multi-window mode, from:
124129 // https://developer.samsung.com/samsung-dex/modify-optimizing.html
125130 try {
You can’t perform that action at this time.
0 commit comments