Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 25.4.7
* Mitigated an issue where the navigation bar showed an unwanted shadow during content display.

## 25.4.6
* Improved content error handling and display mechanics.
* Updated user properties caching mechanism according to sessions.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
# RELEASE FIELD SECTION
VERSION_NAME=25.4.6
VERSION_NAME=25.4.7
GROUP=ly.count.android
POM_URL=https://github.com/Countly/countly-sdk-android
POM_SCM_URL=https://github.com/Countly/countly-sdk-android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class TestUtils {
public final static String commonAppKey = "appkey";
public final static String commonDeviceId = "1234";
public final static String SDK_NAME = "java-native-android";
public final static String SDK_VERSION = "25.4.6";
public final static String SDK_VERSION = "25.4.7";
public static final int MAX_THREAD_COUNT_PER_STACK_TRACE = 50;

public static class Activity2 extends Activity {
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/ly/count/android/sdk/Countly.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ of this software and associated documentation files (the "Software"), to deal
*/
public class Countly {

private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "25.4.6";
private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "25.4.7";
/**
* Used as request meta data on every request
*/
Expand Down
12 changes: 6 additions & 6 deletions sdk/src/main/java/ly/count/android/sdk/ModuleContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ private String prepareContentFetchRequest(@NonNull DisplayMetrics displayMetrics

int totalWidthPx = displayMetrics.widthPixels;
int totalHeightPx = displayMetrics.heightPixels;
int totalWidthDp = (int) Math.ceil(totalWidthPx / displayMetrics.density);
int totalHeightDp = (int) Math.ceil(totalHeightPx / displayMetrics.density);
int totalWidthDp = (int) Math.floor(totalWidthPx / displayMetrics.density);
int totalHeightDp = (int) Math.floor(totalHeightPx / displayMetrics.density);
L.d("[ModuleContent] prepareContentFetchRequest, total screen dimensions (px): [" + totalWidthPx + "x" + totalHeightPx + "], (dp): [" + totalWidthDp + "x" + totalHeightDp + "], density: [" + displayMetrics.density + "]");

WebViewDisplayOption displayOption = _cly.config_.webViewDisplayOption;
Expand All @@ -198,10 +198,10 @@ private String prepareContentFetchRequest(@NonNull DisplayMetrics displayMetrics
SafeAreaDimensions safeArea = SafeAreaCalculator.calculateSafeAreaDimensions(_cly.context_, L);

// px to dp
portraitWidth = (int) Math.ceil(safeArea.portraitWidth / displayMetrics.density);
portraitHeight = (int) Math.ceil(safeArea.portraitHeight / displayMetrics.density);
landscapeWidth = (int) Math.ceil(safeArea.landscapeWidth / displayMetrics.density);
landscapeHeight = (int) Math.ceil(safeArea.landscapeHeight / displayMetrics.density);
portraitWidth = (int) Math.floor(safeArea.portraitWidth / displayMetrics.density);
portraitHeight = (int) Math.floor(safeArea.portraitHeight / displayMetrics.density);
landscapeWidth = (int) Math.floor(safeArea.landscapeWidth / displayMetrics.density);
landscapeHeight = (int) Math.floor(safeArea.landscapeHeight / displayMetrics.density);

L.d("[ModuleContent] prepareContentFetchRequest, safe area dimensions (px->dp) - Portrait: [" + safeArea.portraitWidth + "x" + safeArea.portraitHeight + " px] -> [" + portraitWidth + "x" + portraitHeight + " dp], topOffset: [" + safeArea.portraitTopOffset + " px]");
L.d("[ModuleContent] prepareContentFetchRequest, safe area dimensions (px->dp) - Landscape: [" + safeArea.landscapeWidth + "x" + safeArea.landscapeHeight + " px] -> [" + landscapeWidth + "x" + landscapeHeight + " dp], topOffset: [" + safeArea.landscapeTopOffset + " px]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,14 @@ private void hideSystemUI() {
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN);

getWindow().setNavigationBarColor(Color.TRANSPARENT);
getWindow().setStatusBarColor(Color.TRANSPARENT);

getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);

getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}

private void resizeContentInternal() {
Expand Down
8 changes: 0 additions & 8 deletions sdk/src/main/java/ly/count/android/sdk/UtilsDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ private static void applyWindowMetrics(@NonNull Context context,

// If not activity, we can't know system UI visibility, so always use physical screen size
if (!usePhysicalScreenSize) {
// Only subtract navigation bar insets when navigation bar is actually visible
if (windowInsets.isVisible(WindowInsets.Type.navigationBars())) {
types |= WindowInsets.Type.navigationBars();
}

if (windowInsets.isVisible(WindowInsets.Type.statusBars())) {
types |= WindowInsets.Type.statusBars();
}

boolean drawUnderCutout;
WindowManager.LayoutParams params = ((Activity) context).getWindow().getAttributes();
Expand Down
Loading