Revision 65bc1da3
Added by Leszek Koltunski 12 months ago
src/main/java/org/distorted/external/RubikScores.java | ||
---|---|---|
37 | 37 |
|
38 | 38 |
public static final int MAX_RECORD = 10; |
39 | 39 |
public static final int MULT = 1000000; |
40 |
public static final long NO_RECORD = Long.MAX_VALUE;
|
|
40 |
public static final int NO_RECORD = Integer.MAX_VALUE;
|
|
41 | 41 |
private static RubikScores mThis; |
42 | 42 |
|
43 | 43 |
private String mName, mCountry; |
... | ... | |
50 | 50 |
|
51 | 51 |
private static class MapValue |
52 | 52 |
{ |
53 |
long record;
|
|
53 |
int record;
|
|
54 | 54 |
boolean submitted; |
55 | 55 |
|
56 |
MapValue(long rec,int sub)
|
|
56 |
MapValue(int rec,int sub)
|
|
57 | 57 |
{ |
58 | 58 |
record = rec; |
59 | 59 |
submitted = sub!=0; |
... | ... | |
286 | 286 |
|
287 | 287 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
288 | 288 |
|
289 |
public synchronized int setRecord(int object, int level, long record)
|
|
289 |
public synchronized int setRecord(int object, int level, int record)
|
|
290 | 290 |
{ |
291 | 291 |
int key = mapKey(object,level); |
292 | 292 |
MapValue oldValue = mMap.get(key); |
... | ... | |
312 | 312 |
|
313 | 313 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
314 | 314 |
|
315 |
public synchronized long getRecord(int object, int level)
|
|
315 |
public synchronized int getRecord(int object, int level)
|
|
316 | 316 |
{ |
317 | 317 |
int key = mapKey(object,level); |
318 | 318 |
MapValue value = mMap.get(key); |
... | ... | |
420 | 420 |
public synchronized void restorePreferences(SharedPreferences preferences) |
421 | 421 |
{ |
422 | 422 |
String recordStr, subStr, nameStr, timeStr, submStr, errorStr=""; |
423 |
int start, end, equals, comma, ordinal, subm; |
|
424 |
long time; |
|
423 |
int start, end, equals, comma, ordinal, subm, time; |
|
425 | 424 |
boolean thereWasError = false; |
426 | 425 |
int numObjects = RubikObjectList.getNumObjects(); |
427 | 426 |
|
... | ... | |
453 | 452 |
|
454 | 453 |
if( ordinal>=0 && ordinal<numObjects ) |
455 | 454 |
{ |
456 |
time = Long.parseLong(timeStr);
|
|
455 |
time = Integer.parseInt(timeStr);
|
|
457 | 456 |
subm = Integer.parseInt(submStr); |
458 | 457 |
|
459 | 458 |
if( subm>=0 && subm<=1 ) |
Also available in: Unified diff
Improve the way we display time in the Scores dialog