MCPcopy Create free account
hub / github.com/XCSoar/XCSoar / getType

Method getType

android/src/FileProvider.java:87–102  ·  view source on GitHub ↗
(Uri uri)

Source from the content-addressed store, hash-verified

85 }
86
87 @Override
88 public String getType(Uri uri) {
89 File file = getFileForUri(uri);
90 if (file != null) {
91 String name = file.getName();
92 int dot = name.lastIndexOf('.');
93 if (dot >= 0) {
94 String extension = name.substring(dot + 1);
95 String mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
96 if (mime != null)
97 return mime;
98 }
99 }
100
101 return "application/octet-stream";
102 }
103
104 @Override
105 public Uri insert(Uri uri, ContentValues values) {

Callers 3

onSensorChangedMethod · 0.80
IOIOAgentMethod · 0.80

Calls 1

getFileForUriMethod · 0.95

Tested by

no test coverage detected