From b75291375a2b114084109e04e8db4674c47ac1f5 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 6 Oct 2019 16:11:15 -0700 Subject: [PATCH] Android: Setup UI callback earlier if possible. --- android/src/org/ppsspp/ppsspp/NativeActivity.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/src/org/ppsspp/ppsspp/NativeActivity.java b/android/src/org/ppsspp/ppsspp/NativeActivity.java index 55c5d9b192f0..5676afee2391 100644 --- a/android/src/org/ppsspp/ppsspp/NativeActivity.java +++ b/android/src/org/ppsspp/ppsspp/NativeActivity.java @@ -838,8 +838,10 @@ protected void onResume() { @Override public void onAttachedToWindow() { + Log.i(TAG, "onAttachedToWindow"); + super.onAttachedToWindow(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - Log.i(TAG, "onAttachedToWindow"); DisplayCutout cutout = getWindow().getDecorView().getRootWindowInsets().getDisplayCutout(); if (cutout != null) { safeInsetLeft = cutout.getSafeInsetLeft(); @@ -855,6 +857,10 @@ public void onAttachedToWindow() { safeInsetBottom = 0; } } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + setupSystemUiCallback(); + } } @Override