Skip to content

Commit

Permalink
Merge pull request #12395 from unknownbrackets/android-minor
Browse files Browse the repository at this point in the history
Android: Setup UI callback earlier if possible
  • Loading branch information
hrydgard committed Oct 7, 2019
2 parents bf1777f + b752913 commit e0f60eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion android/src/org/ppsspp/ppsspp/NativeActivity.java
Expand Up @@ -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();
Expand All @@ -855,6 +857,10 @@ public void onAttachedToWindow() {
safeInsetBottom = 0;
}
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setupSystemUiCallback();
}
}

@Override
Expand Down

0 comments on commit e0f60eb

Please sign in to comment.