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