Fix missing computeIfAbsent() method in L_MR1 and M
Replace ConcurrentHashMap#computeIfAbsent() with containsKey() and put() since computeIfAbsent() is added in API level 24. Bug: 158846265 Test: Build Signed-off-by: Taesu Lee <taesu82.lee@samsung.com> Change-Id: I3c43f0d7b1f289f0442c9359de4f099217244387
This commit is contained in:
@@ -250,8 +250,11 @@ public class DataModelImpl extends DataModel {
|
|||||||
if (subId <= ParticipantData.DEFAULT_SELF_SUB_ID) {
|
if (subId <= ParticipantData.DEFAULT_SELF_SUB_ID) {
|
||||||
subId = PhoneUtils.getDefault().getDefaultSmsSubscriptionId();
|
subId = PhoneUtils.getDefault().getDefaultSmsSubscriptionId();
|
||||||
}
|
}
|
||||||
sConnectivityUtilInstanceCacheLMR1.computeIfAbsent(
|
|
||||||
subId, key -> new ConnectivityUtil(mContext, key));
|
if (!sConnectivityUtilInstanceCacheLMR1.containsKey(subId)) {
|
||||||
|
sConnectivityUtilInstanceCacheLMR1.put(
|
||||||
|
subId, new ConnectivityUtil(mContext, subId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user