We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff774a1 commit cfda073Copy full SHA for cfda073
1 file changed
app/src/main/java/org/schabi/newpipe/util/DeviceUtils.java
@@ -120,10 +120,10 @@ public static boolean isDesktopMode(final Context context) {
120
final Method getEnabledMethod = desktopModeStateClass
121
.getDeclaredMethod("getEnabled");
122
final int enabled = (int) getEnabledMethod.invoke(desktopModeState);
123
- final boolean isEnabled = enabled == desktopModeStateClass
124
- .getDeclaredField("ENABLED").getInt(desktopModeStateClass);
125
-
126
- isDeXMode = isEnabled;
+ if (enabled == desktopModeStateClass
+ .getDeclaredField("ENABLED").getInt(desktopModeStateClass)) {
+ isDeXMode = true;
+ }
127
} catch (NoSuchFieldException | NoSuchMethodException
128
| IllegalAccessException | InvocationTargetException e) {
129
// Device does not support DeX 3.0
0 commit comments