Commit dcbac589 authored by Ed Morley's avatar Ed Morley
Browse files

Merge mozilla-central to mozilla-inbound

parents eed40771 a0b7a9c9
Loading
Loading
Loading
Loading
+17 −6
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

@@ -253,10 +254,20 @@ public class AboutHomeContent extends ScrollView {
                    if (fileStream == null)
                        return;
                    StringBuffer jsonString = new StringBuffer();
                    try {
                        int read = 0;
                        while ((read = fileStream.read(buf, 0, 32768)) != -1) {
                            jsonString.append(new String(buf, 0, read));
                        }
                    } finally {
                        try {
                            fileStream.close();
                        } catch (IOException ioe) {
                            // catch this here because we can continue even if the
                            // close failed
                            Log.i(LOGTAG, "error closing json file", ioe);
                        }
                    }
                    final JSONArray array = new JSONObject(jsonString.toString()).getJSONArray("addons");
                    GeckoApp.mAppContext.mMainHandler.post(new Runnable() {
                        public void run() {
@@ -264,15 +275,15 @@ public class AboutHomeContent extends ScrollView {
                                for (int i = 0; i < array.length(); i++) {
                                    JSONObject jsonobj = array.getJSONObject(i);
                                    mAddonsAdapter.add(jsonobj.getString("name"));
                                    Log.i("GeckoAddons", "addon #" + i +": " + jsonobj.getString("name"));
                                    Log.i(LOGTAG, "addon #" + i +": " + jsonobj.getString("name"));
                                }
                            } catch (Exception e) {
                                Log.i("GeckoAddons", "error reading json file", e);
                                Log.i(LOGTAG, "error reading json file", e);
                            }
                        }
                    });
                } catch (Exception e) {
                    Log.i("GeckoAddons", "error reading json file", e);
                    Log.i(LOGTAG, "error reading json file", e);
                }
            }
        });
+1 −1
Original line number Diff line number Diff line
@@ -331,6 +331,6 @@ public class CrashReporter extends Activity
    }

    private String unescape(String string) {
        return string.replaceAll("\\\\", "\\").replaceAll("\\n", "\n").replaceAll("\\t", "\t");
        return string.replaceAll("\\\\\\\\", "\\").replaceAll("\\\\n", "\n").replaceAll("\\\\t", "\t");
    }
}