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

@@ -112,7 +112,7 @@ public class Activity extends Context {
public void setContentView(int layoutResID) throws Exception {
System.out.println("- setContentView - yay!");
String layout_xml_file = "data/" + getString(layoutResID);
String layout_xml_file = android.os.Environment.getExternalStorageDirectory().getPath() + "/" + getString(layoutResID);
System.out.println("loading layout from: " + layout_xml_file);

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;
}

View File

@@ -111,7 +111,7 @@ public final class Bitmap {
} // FIXME
Bitmap(String path) {
pixbuf = native_bitmap_from_path("data/"+path);
pixbuf = native_bitmap_from_path(android.os.Environment.getExternalStorageDirectory().getPath() + "/" + path);
mIsMutable = false;
mIsPremultiplied = false;

File diff suppressed because it is too large Load Diff

View File

@@ -91,7 +91,7 @@ public class LayoutInflater {
public View inflate(int layoutResID, ViewGroup root, boolean attachToRoot) throws Exception {
String layout_xml_file = "data/" + Context.this_application.getString(layoutResID);
String layout_xml_file = android.os.Environment.getExternalStorageDirectory().getPath() + "/" + Context.this_application.getString(layoutResID);
System.out.println("loading layout from: " + layout_xml_file);