mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: [android] fix compatibility with older Android versions
Previously, setHighRefreshRate requires APIs restricted to Android 30, or higher. Tested on Android 6.0.1 (released on 2015). Signed-off-by: inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -259,6 +259,10 @@ public final class GioView extends SurfaceView implements Choreographer.FrameCal
|
||||
}
|
||||
|
||||
private void setHighRefreshRate() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
|
||||
return;
|
||||
}
|
||||
|
||||
Context context = getContext();
|
||||
Display display = context.getDisplay();
|
||||
Display.Mode[] supportedModes = display.getSupportedModes();
|
||||
|
||||
Reference in New Issue
Block a user