Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added getInstance(String), close unused strategy objects

  • Loading branch information...
commit b5f1574b1eb454c3e3863fa0b3be9c2cdbc10c91 1 parent aee2db6
@commonsguy authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/com/commonsware/cwac/prefs/CWSharedPreferences.java
View
13 src/com/commonsware/cwac/prefs/CWSharedPreferences.java
@@ -45,6 +45,19 @@ static public SharedPreferences getInstance(StorageStrategy strategy) {
return(sp);
}
+ else {
+ strategy.close();
+ }
+ }
+
+ return(sp);
+ }
+
+ static public SharedPreferences getInstance(String key) {
+ CWSharedPreferences sp=null;
+
+ synchronized(prefsRoster) {
+ sp=prefsRoster.get(key);
}
return(sp);
Please sign in to comment.
Something went wrong with that request. Please try again.