use apply for preferences instead of commit

// FREEBIE
This commit is contained in:
Jake McGinty
2014-05-05 13:48:26 -05:00
committed by Moxie Marlinspike
parent d8e6a93584
commit 34e147838a
10 changed files with 60 additions and 33 deletions

View File

@@ -64,7 +64,7 @@ public class CanonicalSessionMigrator {
}
}
context.getSharedPreferences("SecureSMS", Context.MODE_PRIVATE).edit().putBoolean("canonicalized", true).commit();
context.getSharedPreferences("SecureSMS", Context.MODE_PRIVATE).edit().putBoolean("canonicalized", true).apply();
}
}

View File

@@ -223,7 +223,7 @@ public class SmsMigrator {
}
context.getSharedPreferences("SecureSMS", Context.MODE_PRIVATE).edit()
.putBoolean("migrated", true).commit();
.putBoolean("migrated", true).apply();
}
public interface SmsMigrationProgressListener {