- Fixes bug where Harmony Crypto
SharedPreferences.contains()
returns true even though the value is false #56 - Fixes bug in Harmony Crypto where
Editor.remove()
was not removing values - Fixes bug in Harmony Crypto where
null
values could not be set for String set- NOTE: This change will cause previously
null
keys forgetStringSet()
to return a non-empty set in Harmony Crypto
- NOTE: This change will cause previously
- Refactors internal code for Harmony Crypto
- Removes unnecessary check in Harmony
- Upgraded several dependencies
- Upgraded to AGP 8.2.1
- Upgraded to Kotlin 1.9.22
- Upgraded to Gradle 8.5
- MinSDK is now 23
- Rewrite of JSON reading/writing
- Use library version rather than OS APIs (ex.
androidx.collection.ArraySet
vsandroid.util.ArraySet
)
- Migrate to use vanniktech for publishing
- Update compileSdk to 34
- Updated several libraries
- Converted to using version catalog
- Bring in dependency analysis tool (https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin)
- Made fixes per dependency analysis
- Fix bug where transaction file metadata was not being written right away
- Don't create unnecessary hash set if no string set is found for given key
- Update annotation library
- Fixes crash with putting a string set with a
null
item #46
- Adds new
OnHarmonySharedPreferenceChangedListener
that provides an explicit callback forclear()
events, instead of just emittingnull
keys - Exposes
withFileLock()
andFileInputStream.sync()
utility functions for public use - Updated Kotlin to 1.7.10
- Updated
compileSdk
to 33 - Updated Android Gradle plugin version to 7.2.2
- Moves all build logic to custom plugins in the
buildSrc
directory - Moves tests specific for apps that target SDK 31 to a test module
- Fixes bug where
contains()
would befalse
fornull
keys - Allows usage of new
OnHarmonySharedPreferenceChangedListener
from Harmony - Updates
HarmonyKeysetManager
to more closely reflect theAndroidKeysetManager
from the Google/Tink project - Utilizes a custom
KeysetReader
andKeysetWriter
that stores and reads keys using a file rather than the shared preferences - Encrypted Harmony shared preferences can now handle notifying when
clear()
is called
- Updated Kotlin to 1.6.10
- Updated
compileSdk
to 31 - Updated Android Gradle plugin version to 7.0.4
- Targets Java 11 now
- Fixes crashing issue caused by
WeakHashMap
throwing aNoSuchElementException
#41
- Fixes crashing issue caused by the
FileObserver.startWatch()
function on LGE devices #38 - Update Kotlin version to 1.5.31 and Coroutines to 1.5.2
- Fixes crashing issue caused by bad transaction file #36
- Update libraries
- Update to Harmony v1.1.8
- Fixes OnSharedPreferenceChangeListener not emitting
null
issue #14 - Removes targetSdk from library
- Adds support for
null
keys #29 - Fixes issue with certain strings not being stored in Harmony #31
- Use
Os.fsync()
for Android versions that support it - Fast follow improvement when reading transaction file
- Initial release!
- Fixes OnSharedPreferenceChangeListener issue #13
- Fixes OOM issue caused by bad transaction read. #22
- Adds an API to inject a logger for capturing logs within Harmony.
Harmony.setLogger(harmonyLog: HarmonyLog)
- Updates Kotlin library version to 1.5.10
- Improves performance when using multiple Harmony SharedPreferences
- Improved
commit()
time, and notification ofcommit()
between processes
- Removed dependency on Kotlin Coroutines. This is to reduce bringing in libraries that may not already exist into the project.
- Create a global thread to handle Harmony updates, instead of each Harmony object having their own thread.
- Note: The test times may appear better this release, but that is only because I was previously testing on a debug build of the demo app instead of a release build. In actuality, v1.1.5 performs just as well as v1.1.4 with the listed changes. Sorry if there is any confusion.
- Added
FileDescriptor.sync()
for each transaction written (in response to #15) - Minor restructure for reading JSON string from main file
- Updated Kotlin libraries and Android plugins
- Migrated to releasing directly to MavenCentral instead of Bintray
- MIN SDK Raised to API 17
- Adds batching to transactions, making inter-process data replication much faster
- Updates several core Kotlin and Coroutines libraries
- Fixes potential bug where an
IOException
could be thrown by a function, but isn't declared as throws when compiled to JVM bytecode. - Slight improvements with memory usage
- Fixes a file descriptor crash
- Additional unit tests for
apply()
andcommit()
functions - Fixed crasg bug when storing a large string (64K limit with
DataOutputStream.writeUTF()
) - Known issues:
- There is a bug where changes don't always emit on
OnSharedPreferenceChangeListener
across processes (#13) - When targeting API 30,
OnSharedPreferenceChangeListener
emits an event whenEditor.clear()
is called forSharedPreferences
. Harmony does not currently honor this, as modifying this affects the above bug (#14) - Harmony
apply()
fails occasionally (#15)
- There is a bug where changes don't always emit on
- Renamed several functions and variables
- Fixes minor issue where phone restart could cause transactions to come in out of order
- Fixes a bug where calling
apply()
in both processes at once would potentially cause removed data to be restored - Improves in-memory replication time between processes when using
apply()
- Creates a transaction file where changes get written to before being written to the main preferences file
- Every time
apply()
orcommit()
is called, a new transaction is written to the transaction file - Each time a process restarts and gets an instance of a Harmony preference object, all transactions are flushed and written to the main file
- Transactions are also flushed when transaction file grows beyond a certain size (128 KB currently, or about ~3k single key transactions)
- All transactions contain a checksum value to validate transaction integrity
- Every time
- FIRST MAJOR RELEASE!
- Fixes a bug where
getAll()
only holdslong
numbers, instead ofint
andfloat
- Fixes a but where lock files could be deleted but not recreated, causing a crash
- Changes underlying data structure (BREAKING CHANGE)
- Updates Kotlin Coroutines library
- Updates min Android SDK to API 14
- Adds instrumented tests via Firebase Test Lab
- Added additional tests, especially around testing Harmony in multiprocess
- Change to casting logic from in-memory map, to match documentation of SharedPreferences
- Slight improvement to
apply()
performance - Adds code for performance testing of Harmony vs SharedPreferences
- Removes unused library from example app (MMKV)
- License change from MIT to Apache-2.0
- Adds java doc (Dokka HTML) to this release
- Prep work to release on Maven Central
- Removes
app_name
from thestrings.xml
file - Restructures library to be under the package
com.frybits.harmony
instead ofcom.frybits.harmonyprefs
- Renames the
Harmony
class toHarmonyImpl
and sets class to private. - Import of
getHarmonySharedPreferences()
method is now cleaner
- Initial release!