Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a52477f authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Setting v1-dev4 as default." into nyc-dev

am: 1e451b2d

* commit '1e451b2d':
  Setting v1-dev4 as default.

Change-Id: I74a5edfad36f984f85c220e768991c6a854f3619
parents fa776610 1e451b2d
Loading
Loading
Loading
Loading
+25 −24
Original line number Diff line number Diff line
@@ -92,8 +92,7 @@ const std::string& ZIP_ROOT_DIR = "FS";
 * See bugreport-format.txt for more info.
 */
// TODO: change to "v1" before final N build
static std::string VERSION_DEFAULT = "v1-dev3";
static std::string VERSION_BUILD_ON_NAME = "v1-dev4";
static std::string VERSION_DEFAULT = "v1-dev4";

/* gets the tombstone data, according to the bugreport type: if zipped gets all tombstones,
 * otherwise gets just those modified in the last half an hour. */
@@ -929,7 +928,9 @@ static void dumpstate(const std::string& screenshot_path, const std::string& ver
}

static void usage() {
    fprintf(stderr, "usage: dumpstate [-b soundfile] [-e soundfile] [-o file [-d] [-p] [-z]] [-s] [-q] [-B] [-P] [-R] [-V version]\n"
  fprintf(stderr,
          "usage: dumpstate [-b soundfile] [-e soundfile] [-o file [-d] [-p] "
          "[-z]] [-s] [-q] [-B] [-P] [-R] [-V version]\n"
          "  -b: play sound file instead of vibrate, at beginning of job\n"
          "  -e: play sound file instead of vibrate, at end of job\n"
          "  -o: write to file (instead of stdout)\n"
@@ -939,10 +940,12 @@ static void usage() {
          "  -s: write output to control socket (for init)\n"
          "  -q: disable vibrate\n"
          "  -B: send broadcast when finished (requires -o)\n"
            "  -P: send broadcast when started and update system properties on progress (requires -o and -B)\n"
            "  -R: take bugreport in remote mode (requires -o, -z, -d and -B, shouldn't be used with -P)\n"
            "  -V: sets the bugreport format version (valid values: %s, %s)\n",
            VERSION_DEFAULT.c_str(), VERSION_BUILD_ON_NAME.c_str());
          "  -P: send broadcast when started and update system properties on "
          "progress (requires -o and -B)\n"
          "  -R: take bugreport in remote mode (requires -o, -z, -d and -B, "
          "shouldn't be used with -P)\n"
          "  -V: sets the bugreport format version (valid values: %s)\n",
          VERSION_DEFAULT.c_str());
}

static void sigpipe_handler(int n) {
@@ -1094,7 +1097,7 @@ int main(int argc, char *argv[]) {
        exit(1);
    }

    if (version != VERSION_DEFAULT && version != VERSION_BUILD_ON_NAME) {
    if (version != VERSION_DEFAULT) {
      usage();
      exit(1);
    }
@@ -1150,11 +1153,9 @@ int main(int argc, char *argv[]) {
        } else {
            suffix = "undated";
        }
        if (version == VERSION_BUILD_ON_NAME) {
        char build_id[PROPERTY_VALUE_MAX];
        property_get("ro.build.id", build_id, "UNKNOWN_BUILD");
        base_name = base_name + "-" + build_id;
        }
        if (do_fb) {
            // TODO: if dumpstate was an object, the paths could be internal variables and then
            // we could have a function to calculate the derived values, such as: