mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Fix DeX mode check
This commit is contained in:
		| @@ -120,10 +120,10 @@ public final class DeviceUtils { | |||||||
|                 final Method getEnabledMethod = desktopModeStateClass |                 final Method getEnabledMethod = desktopModeStateClass | ||||||
|                         .getDeclaredMethod("getEnabled"); |                         .getDeclaredMethod("getEnabled"); | ||||||
|                 final int enabled = (int) getEnabledMethod.invoke(desktopModeState); |                 final int enabled = (int) getEnabledMethod.invoke(desktopModeState); | ||||||
|                 final boolean isEnabled = enabled == desktopModeStateClass |                 if (enabled == desktopModeStateClass | ||||||
|                         .getDeclaredField("ENABLED").getInt(desktopModeStateClass); |                         .getDeclaredField("ENABLED").getInt(desktopModeStateClass)) { | ||||||
|  |                     isDeXMode = true; | ||||||
|                 isDeXMode = isEnabled; |                 } | ||||||
|             } catch (NoSuchFieldException | NoSuchMethodException |             } catch (NoSuchFieldException | NoSuchMethodException | ||||||
|                     | IllegalAccessException | InvocationTargetException e) { |                     | IllegalAccessException | InvocationTargetException e) { | ||||||
|                 // Device does not support DeX 3.0 |                 // Device does not support DeX 3.0 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Hanif Shersy
					Hanif Shersy