mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
Send JSON preferences in crash report
This commit is contained in:
parent
9e9d0333cc
commit
b0c1703b23
@ -25,6 +25,8 @@ import android.widget.ProgressBar;
|
|||||||
|
|
||||||
import org.deadc0de.apple2ix.basic.BuildConfig;
|
import org.deadc0de.apple2ix.basic.BuildConfig;
|
||||||
import org.deadc0de.apple2ix.basic.R;
|
import org.deadc0de.apple2ix.basic.R;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -428,6 +430,22 @@ public class Apple2CrashHandler {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
StringBuilder jsonData = new StringBuilder();
|
||||||
|
if (Apple2Utils.readEntireFile(new File(homeDir, Apple2Preferences.PREFS_FILE), jsonData)) {
|
||||||
|
JSONObject obj = null;
|
||||||
|
try {
|
||||||
|
obj = new JSONObject(jsonData.toString());
|
||||||
|
} catch (JSONException e) {
|
||||||
|
Log.e(TAG, "Error reading preferences : " + e);
|
||||||
|
}
|
||||||
|
if (obj != null) {
|
||||||
|
summary.append("PREFS:\n");
|
||||||
|
summary.append(obj.toString());
|
||||||
|
allCrashData.append(">>>>>>> PREFS\n");
|
||||||
|
allCrashData.append(obj.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Apple2Utils.unexposeSymbols(activity);
|
Apple2Utils.unexposeSymbols(activity);
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user