mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-18 10:32:43 +00:00
Fix crash on Android 5.0 and earlier
This commit is contained in:
parent
454fe80172
commit
a34a44f29a
@ -597,9 +597,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
|
||||
// FIXME: Remove when Android R SDK is finalized
|
||||
private static void setPreferMinimalPostProcessingWithReflection(WindowManager.LayoutParams windowLayoutParams, boolean isPreferred) {
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && Build.VERSION.PREVIEW_SDK_INT == 0) {
|
||||
// Don't attempt this reflection unless on Android R Developer Preview
|
||||
return;
|
||||
// Build.VERSION.PREVIEW_SDK_INT was added in M
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && Build.VERSION.PREVIEW_SDK_INT == 0) {
|
||||
// Don't attempt this reflection unless on Android R Developer Preview
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user