get rid of launcher script requirement; fix app data dir being hardcoded; update documentation; remove prebuilt dalvik (NOTE - purged from history at this point, so is not part of the diff)

This commit is contained in:
Mis012
2022-10-12 17:23:19 +02:00
parent 31cf1a521b
commit 49961186a2
17 changed files with 989 additions and 899 deletions

View File

@@ -122,7 +122,7 @@ public class Context extends Object {
private File getDataDirFile() {
if(data_dir == null) {
data_dir = new File("data/");
data_dir = android.os.Environment.getExternalStorageDirectory();
}
return data_dir;
}
@@ -185,7 +185,7 @@ public class Context extends Object {
public FileOutputStream openFileOutput(String name, int mode) throws java.io.FileNotFoundException {
System.out.println("openFileOutput called for: '"+name+"'");
return new FileOutputStream("data/files/" + name);
return new FileOutputStream(android.os.Environment.getExternalStorageDirectory().getPath() + "/files/" + name);
}
public int checkCallingOrSelfPermission(String permission) {

View File

@@ -467,7 +467,7 @@ public final class AssetManager {
factory.setNamespaceAware(true);
XmlPullParser xpp = factory.newPullParser();
xpp.setInput( new FileReader("data/" + fileName) );
xpp.setInput( new FileReader(android.os.Environment.getExternalStorageDirectory().getPath() + "/" + fileName) );
return (XmlResourceParser)xpp;
}