MCPcopy Create free account
hub / github.com/FongMi/TV / openFile

Method openFile

app/src/main/java/com/fongmi/android/tv/utils/FileUtil.java:39–45  ·  view source on GitHub ↗
(File file)

Source from the content-addressed store, hash-verified

37 }
38
39 public static void openFile(File file) {
40 Intent intent = new Intent(Intent.ACTION_VIEW);
41 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
42 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
43 intent.setDataAndType(getShareUri(file), FileUtil.getMimeType(file.getName()));
44 App.get().startActivity(intent);
45 }
46
47 public static void gzipCompress(File target) {
48 byte[] buffer = new byte[16384];

Callers 2

successMethod · 0.95
onFileMethod · 0.95

Calls 4

getShareUriMethod · 0.95
getMimeTypeMethod · 0.95
getMethod · 0.95
getNameMethod · 0.45

Tested by

no test coverage detected