You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
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:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user