This commit is contained in:
@@ -32,15 +32,17 @@ public class IntentExtras implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, Object> mMap;
|
private Map<String, Object> mMap;
|
||||||
|
private int mId;
|
||||||
|
|
||||||
private IntentExtras() {
|
private IntentExtras() {
|
||||||
mMap = new HashMap<>();
|
mMap = new HashMap<>();
|
||||||
int id = mMaxId.incrementAndGet();
|
mId = mMaxId.incrementAndGet();
|
||||||
extraStore.put(id, mMap);
|
extraStore.put(mId, mMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private IntentExtras(int id) {
|
private IntentExtras(int id) {
|
||||||
|
mId = id;
|
||||||
mMap = extraStore.get(id);
|
mMap = extraStore.get(id);
|
||||||
if (mMap == null) {
|
if (mMap == null) {
|
||||||
mMap = new HashMap<>();
|
mMap = new HashMap<>();
|
||||||
@@ -60,7 +62,7 @@ public class IntentExtras implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Intent putInIntent(Intent intent) {
|
public Intent putInIntent(Intent intent) {
|
||||||
intent.putExtra(EXTRA_ID, mMaxId);
|
intent.putExtra(EXTRA_ID, mId);
|
||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user