mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 00:59:41 +01:00
Merge pull request #12395 from unknownbrackets/android-minor
Android: Setup UI callback earlier if possible
This commit is contained in:
1 file changed
+7
-1
@@ -838,8 +838,10 @@ public abstract class NativeActivity extends Activity implements SurfaceHolder.C
|
||||
|
||||
@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 abstract class NativeActivity extends Activity implements SurfaceHolder.C
|
||||
safeInsetBottom = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
setupSystemUiCallback();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user