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

Commit 571cd23e authored by Yu Shan's avatar Yu Shan
Browse files

Ignore "-a" dump option.

This option will be used when generating bugreport. We don't want
this to cause invalid option error.

Test: adb shell dumpsys
android.hardware.automotive.vehicle.IVehicle/default -a
Bug: 261768324

Change-Id: I27347a6cd063623b01ada2803a06c2c86f936396
parent 50596dc9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -789,10 +789,13 @@ binder_status_t DefaultVehicleHal::dump(int fd, const char** args, uint32_t numA
    for (uint32_t i = 0; i < numArgs; i++) {
        options.push_back(args[i]);
    }
    if (options.size() == 1 && options[0] == "-a") {
        // Ignore "-a" option. Bugreport will call with this option.
        options.clear();
    }
    DumpResult result = mVehicleHardware->dump(options);
    dprintf(fd, "%s", (result.buffer + "\n").c_str());
    if (!result.callerShouldDumpState) {
        ALOGE("Skip dumping Vehicle HAL State.");
        return STATUS_OK;
    }
    dprintf(fd, "Vehicle HAL State: \n");