Fix update problem

pull/102/head
FongMi 4 years ago
parent c1230f801a
commit 919dc8cc27
  1. 10
      app/src/main/java/com/fongmi/android/tv/utils/FileUtil.java

@ -61,6 +61,7 @@ public class FileUtil {
fos.write(data);
fos.flush();
fos.close();
chmod(file);
return file;
}
@ -111,4 +112,13 @@ public class FileUtil {
intent.setDataAndType(getShareUri(file), FileUtil.getMimeType(file.getName()));
App.get().startActivity(intent);
}
private static void chmod(File file) {
try {
Process process = Runtime.getRuntime().exec("chmod 777 " + file);
process.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Loading…
Cancel
Save