diff --git a/CHANGELOG.md b/CHANGELOG.md index 892e4270..c030a81f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to the LaunchDarkly Android SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). +## [2.14.1] - 2021-01-14 +### Fixed +- Before this release, the SDK could cause an uncaught exception on certain Android implementations, when scheduling a future poll request under certain situations. This fix extends a previous fix implemented in the [2.9.1 release](https://github.com/launchdarkly/android-client-sdk/releases/tag/2.9.1) of the SDK, which catches `SecurityException`s thrown by the alarm manager when registering an alarm for the next poll. This `SecurityException` was introduced by Samsung on their Lollipop and later Android implementions, and is thrown when the application has at least 500 existing alarms when registering a new alarm. After recent reports of the alarm manager throwing an `IllegalStateException` rather than a `SecurityException` under the same conditions but different Android implementations, this release broadens the exception handling when scheduling a poll request to safeguard against other exception types. + ## [2.14.0] - 2020-12-17 ### Added - Added `LDConfig.Builder.setPollUri` configuration setter that is equivalent to the now deprecated `setBaseUri`. diff --git a/example/build.gradle b/example/build.gradle index eb2a0c8e..cdb57eb2 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -46,7 +46,7 @@ dependencies { implementation 'com.android.support:appcompat-v7:26.1.0' implementation project(path: ':launchdarkly-android-client-sdk') // Comment the previous line and uncomment this one to depend on the published artifact: - //implementation 'com.launchdarkly:launchdarkly-android-client-sdk:2.14.0' + //implementation 'com.launchdarkly:launchdarkly-android-client-sdk:2.14.1' implementation 'com.jakewharton.timber:timber:4.7.1' diff --git a/launchdarkly-android-client-sdk/build.gradle b/launchdarkly-android-client-sdk/build.gradle index cbffb35e..be63e85e 100644 --- a/launchdarkly-android-client-sdk/build.gradle +++ b/launchdarkly-android-client-sdk/build.gradle @@ -7,7 +7,7 @@ apply plugin: 'io.codearte.nexus-staging' allprojects { group = 'com.launchdarkly' - version = '2.14.0' + version = '2.14.1' sourceCompatibility = 1.7 targetCompatibility = 1.7 } diff --git a/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/android/PollingUpdater.java b/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/android/PollingUpdater.java index 449caa43..6c6420e3 100644 --- a/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/android/PollingUpdater.java +++ b/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/android/PollingUpdater.java @@ -42,8 +42,8 @@ synchronized static void startPolling(Context context, int initialDelayMillis, i SystemClock.elapsedRealtime() + initialDelayMillis, intervalMillis, pendingIntent); - } catch (SecurityException ex) { - Timber.w(ex, "SecurityException when setting background polling alarm"); + } catch (Exception ex) { + Timber.w(ex, "Exception occurred when creating [background] polling alarm, likely due to the host application having too many existing alarms."); } }