Revision dcbdd841
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/os/OSInterface.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
public class OSInterface implements OperatingSystemInterface |
28 | 28 |
{ |
29 |
|
|
30 | 29 |
private final WeakReference<Activity> mAct; |
30 |
private final Resources mRes; |
|
31 |
|
|
31 | 32 |
private MotionEvent mEvent; |
32 | 33 |
private int mPointer1, mPointer2; |
33 | 34 |
SharedPreferences.Editor mEditor; |
... | ... | |
38 | 39 |
public OSInterface(Activity act) |
39 | 40 |
{ |
40 | 41 |
mAct = new WeakReference<>(act); |
42 |
mRes = act.getResources(); |
|
41 | 43 |
} |
42 | 44 |
|
43 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
228 | 230 |
android.util.Log.e("D", "recalling "+key+" : "+ret); |
229 | 231 |
return ret; |
230 | 232 |
} |
233 |
|
|
234 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
235 |
// PREFERENCES |
|
236 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
237 |
|
|
238 |
public String getString(int id) |
|
239 |
{ |
|
240 |
return mRes.getString(id); |
|
241 |
} |
|
242 |
|
|
243 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
244 |
|
|
245 |
public String getString(int id, String s1) |
|
246 |
{ |
|
247 |
return mRes.getString(id,s1); |
|
248 |
} |
|
249 |
|
|
250 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
251 |
|
|
252 |
public String getString(int id, String s1, String s2) |
|
253 |
{ |
|
254 |
return mRes.getString(id,s1,s2); |
|
255 |
} |
|
256 |
|
|
257 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
258 |
|
|
259 |
public String getString(int id, String s1, String s2, String s3) |
|
260 |
{ |
|
261 |
return mRes.getString(id,s1,s2,s3); |
|
262 |
} |
|
231 | 263 |
} |
Also available in: Unified diff
minor