Closed julian-villing closed 7 years ago
Flash-storage has a limited amount of write-cycles until it's dead
SharedPreferenceHelper.java:
Sample
public class SharedPreferencesHelper { private static Boolean initialized; private static Boolean changed; private static Boolean _prop1: private static Int32 _prop2; private static TYPE _NAME; public void Load(@OnlyIfRequired Context ctxt) { if(initialized) return; [...]; initialized = true; } public void Save(@OnlyIfRequired Context ctxt) { if(!changed) return; [...]; } public static Boolean prop1() { return prop1; } public static void prop1(Boolean value) {if (prop1 == value) return; prop1 = value; propertyChanged(); [...] private static void propertyChanged() { changed = true; } }
the OnlyIfRequired-Annotation should be taken literally
Flash-storage has a limited amount of write-cycles until it's dead
SharedPreferenceHelper.java:
Sample
the OnlyIfRequired-Annotation should be taken literally