Revision 9dac5c41
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/os/OSInterface.java | ||
---|---|---|
191 | 191 |
|
192 | 192 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
193 | 193 |
// PREFERENCES |
194 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
195 |
|
|
196 |
public void setPreferences(SharedPreferences prefs) |
|
197 |
{ |
|
198 |
mPreferences = prefs; |
|
199 |
} |
|
200 |
|
|
201 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
202 |
|
|
203 |
public void setEditor(SharedPreferences.Editor editor) |
|
204 |
{ |
|
205 |
mEditor = editor; |
|
206 |
} |
|
207 |
|
|
194 | 208 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
195 | 209 |
|
196 | 210 |
public void remove(String key) |
... | ... | |
202 | 216 |
|
203 | 217 |
public void putInt(String key, int value) |
204 | 218 |
{ |
219 |
android.util.Log.e("D", "remembering "+key+" : "+value); |
|
205 | 220 |
mEditor.putInt(key,value); |
206 | 221 |
} |
207 | 222 |
|
... | ... | |
209 | 224 |
|
210 | 225 |
public int getInt(String key, int def) |
211 | 226 |
{ |
212 |
return mPreferences.getInt(key,def); |
|
227 |
int ret = mPreferences.getInt(key,def); |
|
228 |
android.util.Log.e("D", "recalling "+key+" : "+ret); |
|
229 |
return ret; |
|
213 | 230 |
} |
214 | 231 |
} |
Also available in: Unified diff
Move the SharedPreferences to the OSInterface