diff --git a/android-core/src/main/java/com/mparticle/internal/MessageManager.java b/android-core/src/main/java/com/mparticle/internal/MessageManager.java index 8824a7e2e..2f92e6fe3 100644 --- a/android-core/src/main/java/com/mparticle/internal/MessageManager.java +++ b/android-core/src/main/java/com/mparticle/internal/MessageManager.java @@ -968,11 +968,11 @@ void setFirstRunForMessage(boolean firstRun) { .apply(); } - boolean isFirstRunForAST() { + synchronized boolean isFirstRunForAST() { return sPreferences.getBoolean(Constants.PrefKeys.FIRSTRUN_AST + mConfigManager.getApiKey(), true) && isFirstRunForMessageLegacy(); } - void setFirstRunForAST(boolean firstRun) { + synchronized void setFirstRunForAST(boolean firstRun) { sPreferences.edit() .putBoolean(Constants.PrefKeys.FIRSTRUN_AST + mConfigManager.getApiKey(), firstRun) .remove(Constants.PrefKeys.FIRSTRUN_OBSELETE + mConfigManager.getApiKey())