Skip to content

Commit fb7a76d

Browse files
revert: cutout support
1 parent 4810ed4 commit fb7a76d

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

sdk/src/main/java/ly/count/android/sdk/TransparentActivity.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import android.content.res.Configuration;
77
import android.graphics.Color;
88
import android.net.Uri;
9-
import android.os.Build;
109
import android.os.Bundle;
1110
import android.util.DisplayMetrics;
1211
import android.util.Log;
@@ -77,10 +76,6 @@ protected void onCreate(Bundle savedInstanceState) {
7776
params.width = config.width;
7877
params.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
7978
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
80-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
81-
params.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
82-
// If this is disabled, UtilsDevice line 61 needs to be changed to subtract cutout always
83-
}
8479
getWindow().setAttributes(params);
8580
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
8681

sdk/src/main/java/ly/count/android/sdk/UtilsDevice.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ private static void applyWindowMetrics(@NonNull Context context,
6161
if (!drawUnderCutout && windowInsets.isVisible(WindowInsets.Type.displayCutout())) {
6262
types |= WindowInsets.Type.displayCutout();
6363
}
64-
// Cutout is always respected as safe area for now even in fullscreen mode
65-
// Only subtract display cutout insets when not allowed to draw under the cutout
66-
if (windowInsets.isVisible(WindowInsets.Type.displayCutout())) {
67-
types |= WindowInsets.Type.displayCutout();
68-
}
64+
}
65+
66+
// Cutout is always respected as safe area for now even in fullscreen mode
67+
if (windowInsets.isVisible(WindowInsets.Type.displayCutout())) {
68+
types |= WindowInsets.Type.displayCutout();
6969
}
7070

7171
final Insets insets = windowInsets.getInsets(types);

0 commit comments

Comments
 (0)