Optimize mobile rendering and extend live-client launch options

This commit is contained in:
shen
2026-10-19 16:36:27 -07:00
parent 3f72cb7cc4
commit 113ea26b07
15 changed files with 317 additions and 101 deletions
+2
View File
@@ -20,6 +20,8 @@
android:alwaysRetainTaskState="true"
android:launchMode="singleInstance"
android:screenOrientation="sensorLandscape"
android:showWhenLocked="true"
android:turnScreenOn="true"
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
android:preferMinimalPostProcessing="true"
android:exported="true">
@@ -35,6 +35,17 @@ public class MainActivity extends SDLActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
setShowWhenLocked(true);
setTurnScreenOn(true);
} else {
getWindow().addFlags(
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON |
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
);
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
applyImmersiveMode();
// --refresh-rate N pins the display mode for a test run; otherwise src/host switches it with