@@ -162,18 +162,6 @@ public static void setSocketConnectionSettings(String hostName, int port) {
162162 Constants .SOCKET_PORT = port ;
163163 }
164164
165- /**
166- * Optional. By default, Leanplum will hash file variables to determine if they're modified and
167- * need to be uploaded to the server. Use this method to override this setting.
168- *
169- * @param enabled Setting this to false will reduce startup latency in development mode, but it's
170- * possible that Leanplum will always have the most up-to-date versions of your resources.
171- * (Default: true)
172- */
173- public static void setFileHashingEnabledInDevelopmentMode (boolean enabled ) {
174- Constants .hashFilesToDetermineModifications = enabled ;
175- }
176-
177165 /**
178166 * Optional. Whether to enable file uploading in development mode.
179167 *
@@ -225,15 +213,6 @@ public static void setNetworkTimeout(int seconds, int downloadSeconds) {
225213 Constants .NETWORK_TIMEOUT_SECONDS_FOR_DOWNLOADS = downloadSeconds ;
226214 }
227215
228- /**
229- * Advanced: Whether new variables can be downloaded mid-session. By default, this is disabled.
230- * Currently, if this is enabled, new variables can only be downloaded if a push notification is
231- * sent while the app is running, and the notification's metadata hasn't be downloaded yet.
232- */
233- public static void setCanDownloadContentMidSessionInProductionMode (boolean value ) {
234- Constants .canDownloadContentMidSessionInProduction = value ;
235- }
236-
237216 /**
238217 * Must call either this or {@link Leanplum#setAppIdForProductionMode} before issuing any calls to
239218 * the API, including start.
@@ -824,7 +803,7 @@ private static void handleStartResponse(final JSONObject response) {
824803 APIConfig .getInstance ().setToken (token );
825804 APIConfig .getInstance ().saveToken ();
826805
827- applyContentInResponse (response , true );
806+ applyContentInResponse (response );
828807
829808 VarCache .saveUserAttributes ();
830809
@@ -947,9 +926,8 @@ public void run() {
947926 * Applies the variables, messages, or update rules in a start or getVars response.
948927 *
949928 * @param response The response containing content.
950- * @param alwaysApply Always apply the content regardless of whether the content changed.
951929 */
952- private static void applyContentInResponse (JSONObject response , boolean alwaysApply ) {
930+ private static void applyContentInResponse (JSONObject response ) {
953931 Map <String , Object > values = JsonConverter .mapFromJsonOrDefault (
954932 response .optJSONObject (Constants .Keys .VARS ));
955933 Map <String , Object > messages = JsonConverter .mapFromJsonOrDefault (
@@ -966,22 +944,15 @@ private static void applyContentInResponse(JSONObject response, boolean alwaysAp
966944 String varsJson = (varsJsonObj != null ) ? varsJsonObj .toString () : null ;
967945 String varsSignature = response .optString (Constants .Keys .VARS_SIGNATURE );
968946
969- if (alwaysApply
970- || !values .equals (VarCache .getDiffs ())
971- || !messages .equals (VarCache .getMessageDiffs ())
972- || !variants .equals (VarCache .variants ())
973- || !localCaps .equals (VarCache .localCaps ())
974- || !regions .equals (VarCache .regions ())) {
975- VarCache .applyVariableDiffs (
976- values ,
977- messages ,
978- regions ,
979- variants ,
980- localCaps ,
981- variantDebugInfo ,
982- varsJson ,
983- varsSignature );
984- }
947+ VarCache .applyVariableDiffs (
948+ values ,
949+ messages ,
950+ regions ,
951+ variants ,
952+ localCaps ,
953+ variantDebugInfo ,
954+ varsJson ,
955+ varsSignature );
985956 }
986957
987958 /**
@@ -2079,7 +2050,7 @@ public void response(JSONObject response) {
20792050 if (response == null ) {
20802051 Log .e ("No response received from the server. Please contact us to investigate." );
20812052 } else {
2082- applyContentInResponse (response , false );
2053+ applyContentInResponse (response );
20832054 if (response .optBoolean (Constants .Keys .SYNC_INBOX , false )) {
20842055 LeanplumInbox .getInstance ().downloadMessages ();
20852056 } else {
0 commit comments