diff --git a/app/src/main/java/mw/gri/android/MainActivity.java b/app/src/main/java/mw/gri/android/MainActivity.java index aa2e1ff..ebc8037 100644 --- a/app/src/main/java/mw/gri/android/MainActivity.java +++ b/app/src/main/java/mw/gri/android/MainActivity.java @@ -53,7 +53,6 @@ public class MainActivity extends GameActivity { if (orientationEventListener.canDetectOrientation()) { orientationEventListener.enable(); } - onDisplayCutoutsChanged(Utils.getDisplayCutouts(this)); // Register receiver to finish activity from the BackgroundService. registerReceiver(mBroadcastReceiver, new IntentFilter(FINISH_ACTIVITY_ACTION)); @@ -64,6 +63,13 @@ public class MainActivity extends GameActivity { native void onDisplayCutoutsChanged(int[] cutouts); + @Override + protected void onResume() { + super.onResume(); + // Update display cutouts. + onDisplayCutoutsChanged(Utils.getDisplayCutouts(this)); + } + @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) {