From d21705629b2f8f1ade871639e4e83b195a40489d Mon Sep 17 00:00:00 2001 From: devops-github-rudderstack <88187154+devops-github-rudderstack@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:13:49 +0530 Subject: [PATCH] chore(release): pulling release/1.25.1 into master (#481) * fix: handle db crash issue on Amazon devices (#480) * fix: handle SQLiteCantOpenDatabaseException * chore: improve error message * chore(release): 1.25.1 --------- Co-authored-by: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> Co-authored-by: GitHub actions --- CHANGELOG.md | 7 +++++++ .../sdk/core/persistence/DefaultPersistence.java | 10 ++++++++-- gradle.properties | 4 ++-- package.json | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e129b7582..44425c2d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.25.1](https://github.com/rudderlabs/rudder-sdk-android/compare/v1.25.0...v1.25.1) (2024-10-14) + + +### Bug Fixes + +* handle db crash issue on Amazon devices ([#480](https://github.com/rudderlabs/rudder-sdk-android/issues/480)) ([db717d3](https://github.com/rudderlabs/rudder-sdk-android/commit/db717d35ff4aaf475d81c0472202f083e8c7c1bb)) + ## [1.25.0](https://github.com/rudderlabs/rudder-sdk-android/compare/v1.24.0...v1.25.0) (2024-08-27) diff --git a/core/src/main/java/com/rudderstack/android/sdk/core/persistence/DefaultPersistence.java b/core/src/main/java/com/rudderstack/android/sdk/core/persistence/DefaultPersistence.java index 177cb761f..93e397759 100644 --- a/core/src/main/java/com/rudderstack/android/sdk/core/persistence/DefaultPersistence.java +++ b/core/src/main/java/com/rudderstack/android/sdk/core/persistence/DefaultPersistence.java @@ -4,6 +4,7 @@ import android.content.ContentValues; import android.database.Cursor; import android.database.SQLException; +import android.database.sqlite.SQLiteCantOpenDatabaseException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Build; @@ -258,7 +259,12 @@ public void addDbCloseListener(DbCloseListener listener) { @Override public boolean isAccessible() { - return getWritableDatabase().isOpen(); + try { + return getWritableDatabase().isOpen(); + } catch (SQLiteCantOpenDatabaseException ex) { + RudderLogger.logError("DefaultPersistence: isAccessible: Exception while checking the accessibility of the database due to " + ex); + return false; + } } static class DbParams { final String dbName; @@ -271,4 +277,4 @@ public DbParams(String dbName, int dbVersion) { } } -//END-NO-SONAR-SCAN \ No newline at end of file +//END-NO-SONAR-SCAN diff --git a/gradle.properties b/gradle.properties index 5c4f968c1..1cf78dc55 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,8 +5,8 @@ android.enableJetifier=true android.enableR8.fullMode=true kotlin.code.style=official GROUP=com.rudderstack.android.sdk -VERSION_CODE=32 -VERSION_NAME=1.25.0 +VERSION_CODE=33 +VERSION_NAME=1.25.1 POM_NAME=Rudderstack SDK for android POM_DESCRIPTION=Rudderstack SDK for android POM_ARTIFACT_ID=core diff --git a/package.json b/package.json index 5b0439b60..248e5a8be 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.25.0", + "version": "1.25.1", "dependencies": { "properties-reader": "^2.2.0" }