diff --git a/android/src/androidTest/java/io/ably/lib/push/LocalDeviceStorageTest.java b/android/src/androidTest/java/io/ably/lib/push/LocalDeviceStorageTest.java index 27f646b6b..8f1982ec4 100644 --- a/android/src/androidTest/java/io/ably/lib/push/LocalDeviceStorageTest.java +++ b/android/src/androidTest/java/io/ably/lib/push/LocalDeviceStorageTest.java @@ -49,7 +49,7 @@ public int get(String key, int defaultValue) { } @Override - public void clear(Field[] fields) { + public void clear(String[] keys) { hashMap = new HashMap<>(); } }; diff --git a/android/src/main/java/io/ably/lib/push/SharedPreferenceStorage.java b/android/src/main/java/io/ably/lib/push/SharedPreferenceStorage.java index 9906ca1e4..6f2315ed8 100644 --- a/android/src/main/java/io/ably/lib/push/SharedPreferenceStorage.java +++ b/android/src/main/java/io/ably/lib/push/SharedPreferenceStorage.java @@ -40,11 +40,7 @@ public int get(String key, int defaultValue) { public void clear(String[] keys) { SharedPreferences.Editor editor = activationContext.getPreferences().edit(); for (String key : keys) { - try { - editor.remove(key); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } + editor.remove(key); } editor.commit(); }