Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public TiProperties(Context context, String name, boolean clear)
{
preferences = context.getSharedPreferences(name, Context.MODE_PRIVATE);
if (clear) {
preferences.edit().clear().commit();
preferences.edit().clear().apply();
}
}

Expand Down Expand Up @@ -103,7 +103,7 @@ public void setString(String key, String value)
} else {
editor.putString(key, value);
}
editor.commit();
editor.apply();
}

/**
Expand Down Expand Up @@ -160,7 +160,7 @@ public void setInt(String key, int value)

SharedPreferences.Editor editor = preferences.edit();
editor.putInt(key, value);
editor.commit();
editor.apply();
}

/**
Expand Down Expand Up @@ -208,7 +208,7 @@ public void setDouble(String key, double value)

SharedPreferences.Editor editor = preferences.edit();
editor.putString(key, value + "");
editor.commit();
editor.apply();
}

/**
Expand Down Expand Up @@ -266,7 +266,7 @@ public void setBool(String key, boolean value)

SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean(key, value);
editor.commit();
editor.apply();
}

/**
Expand Down Expand Up @@ -311,7 +311,7 @@ public void setList(String key, String[] value)
}
editor.putInt(key + ".length", value.length);

editor.commit();
editor.apply();
}

/**
Expand Down Expand Up @@ -377,7 +377,7 @@ public void removeProperty(String key)
if (preferences.contains(key)) {
SharedPreferences.Editor editor = preferences.edit();
editor.remove(key);
editor.commit();
editor.apply();
}
}

Expand All @@ -386,7 +386,7 @@ public void removeProperty(String key)
*/
public void removeAllProperties()
{
preferences.edit().clear().commit();
preferences.edit().clear().apply();
}

public static void setSystemProperties(JSONObject prop)
Expand Down