Skip to content

Commit f10d591

Browse files
Robinopusforlife2
andcommitted
Samsung DeX should only be checked on Samsung devices
Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>
1 parent eea4f0f commit f10d591

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/util/DeviceUtils.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.schabi.newpipe.util;
22

3+
import static android.content.Context.INPUT_SERVICE;
4+
35
import android.annotation.SuppressLint;
46
import android.app.UiModeManager;
57
import android.content.Context;
@@ -27,11 +29,10 @@
2729

2830
import java.lang.reflect.Method;
2931

30-
import static android.content.Context.INPUT_SERVICE;
31-
3232
public 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 {

0 commit comments

Comments
 (0)