@@ -188,8 +188,10 @@ public void handleMessage(Message msg) {
188188 ActivityCompat .requestPermissions (jActivity , new String [] {"android.permission.WRITE_EXTERNAL_STORAGE" }, 100 );
189189 }
190190 }
191- root = getDir (LogTag , Context .MODE_WORLD_READABLE
192- | Context .MODE_WORLD_WRITEABLE );
191+ if (Build .VERSION .SDK_INT < 24 )
192+ root = getDir (LogTag , Context .MODE_WORLD_READABLE | Context .MODE_WORLD_WRITEABLE );
193+ else
194+ root = getDir (LogTag , Context .MODE_PRIVATE );
193195
194196 File binDir = new File (root , "bin" );
195197 binDir .mkdir ();
@@ -750,8 +752,10 @@ protected boolean doInstall(File base) throws IOException
750752 publishProgress ("installing addons" );
751753 installDirectory (base , "addons" );
752754
753- File root = getDir (LogTag , Context .MODE_WORLD_READABLE
754- | Context .MODE_WORLD_WRITEABLE );
755+ if (Build .VERSION .SDK_INT < 24 )
756+ root = getDir (LogTag , Context .MODE_WORLD_READABLE | Context .MODE_WORLD_WRITEABLE );
757+ else
758+ root = getDir (LogTag , Context .MODE_PRIVATE );
755759 installDirectory (root , "libexec" );
756760 final Runtime runtime = Runtime .getRuntime ();
757761 setWorldReadable (runtime , new File (root , "libexec" ), true );
0 commit comments