Android: Don't use putIfAbsent as that is not available in older APIs
Fixes: QTBUG-88076 Change-Id: I1ab12c574be036babfd0e4aacb44d1f75c66f4ad Pick-to: 5.15 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
8040d3dce1
commit
2b4a581f34
@ -272,8 +272,8 @@ public class QtNative
|
||||
if (uri == null) {
|
||||
Log.e(QtTAG, "getSize(): No permissions to open Uri");
|
||||
return size;
|
||||
} else {
|
||||
m_cachedUris.putIfAbsent(contentUrl, uri);
|
||||
} else if (!m_cachedUris.containsKey(contentUrl)) {
|
||||
m_cachedUris.put(contentUrl, uri);
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user