use of org.acra.ErrorReporter in project android by cSploit.
the class CrashReporter method notifyChildCrashed.
public static void notifyChildCrashed(int childID, int signal) {
ErrorReporter reporter = ACRA.getErrorReporter();
reporter.putCustomData("childID", Integer.toString(childID));
notifyNativeError(reporter, new ChildManager.ChildDiedException(signal));
}
use of org.acra.ErrorReporter in project J2ME-Loader by nikita36078.
the class MicroLoader method loadMIDletList.
LinkedHashMap<String, String> loadMIDletList() throws IOException {
LinkedHashMap<String, String> midlets = new LinkedHashMap<>();
Descriptor descriptor = new Descriptor(new File(appDir, Config.MIDLET_MANIFEST_FILE), false);
Map<String, String> attr = descriptor.getAttrs();
ErrorReporter errorReporter = ACRA.getErrorReporter();
String report = errorReporter.getCustomData(Constants.KEY_APPCENTER_ATTACHMENT);
StringBuilder sb = new StringBuilder();
if (report != null) {
sb.append(report).append("\n");
}
sb.append(Descriptor.MIDLET_NAME).append(": ").append(descriptor.getName()).append("\n");
sb.append(Descriptor.MIDLET_VENDOR).append(": ").append(descriptor.getVendor()).append("\n");
sb.append(Descriptor.MIDLET_VERSION).append(": ").append(descriptor.getVersion());
errorReporter.putCustomData(Constants.KEY_APPCENTER_ATTACHMENT, sb.toString());
MIDlet.initProps(attr);
for (Map.Entry<String, String> entry : attr.entrySet()) {
if (entry.getKey().matches("MIDlet-[0-9]+")) {
String tmp = entry.getValue();
String clazz = tmp.substring(tmp.lastIndexOf(',') + 1).trim();
String title = tmp.substring(0, tmp.indexOf(',')).trim();
midlets.put(clazz, title);
}
}
return midlets;
}
Aggregations