/** Dump the report to a Printer. */
  public void dump(Printer pw, String prefix) {
    pw.println(prefix + "type: " + type);
    pw.println(prefix + "packageName: " + packageName);
    pw.println(prefix + "installerPackageName: " + installerPackageName);
    pw.println(prefix + "processName: " + processName);
    pw.println(prefix + "time: " + time);
    pw.println(prefix + "systemApp: " + systemApp);

    switch (type) {
      case TYPE_CRASH:
        crashInfo.dump(pw, prefix);
        break;
      case TYPE_ANR:
        anrInfo.dump(pw, prefix);
        break;
      case TYPE_BATTERY:
        batteryInfo.dump(pw, prefix);
        break;
    }
  }
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(type);
    dest.writeString(packageName);
    dest.writeString(installerPackageName);
    dest.writeString(processName);
    dest.writeLong(time);
    dest.writeInt(systemApp ? 1 : 0);

    switch (type) {
      case TYPE_CRASH:
        crashInfo.writeToParcel(dest, flags);
        break;
      case TYPE_ANR:
        anrInfo.writeToParcel(dest, flags);
        break;
      case TYPE_BATTERY:
        batteryInfo.writeToParcel(dest, flags);
        break;
      case TYPE_RUNNING_SERVICE:
        runningServiceInfo.writeToParcel(dest, flags);
        break;
    }
  }