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

Commit 2e6d900f authored by Yu Shan's avatar Yu Shan
Browse files

Prevent log spam.

Add a macro guard for log messages to prevent spam.

Test: Manually test on emulator.
Bug: 200737967
Change-Id: I27a270fe70cf706307a0908d6d4aae8e5197a3e5
parent 26a3150b
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@
 * limitations under the License.
 */

#define LOG_TAG "FakeVehicleHardware"
#define FAKE_VEHICLEHARDWARE_DEBUG false  // STOPSHIP if true.

#include "FakeVehicleHardware.h"

#include <DefaultConfig.h>
@@ -387,7 +390,9 @@ StatusCode FakeVehicleHardware::setValues(std::shared_ptr<const SetValuesCallbac
        const VehiclePropValue& value = request.value;
        int propId = value.prop;

        if (FAKE_VEHICLEHARDWARE_DEBUG) {
            ALOGD("Set value for property ID: %d", propId);
        }

        SetValueResult setValueResult;
        setValueResult.requestId = request.requestId;
@@ -434,7 +439,10 @@ StatusCode FakeVehicleHardware::getValues(std::shared_ptr<const GetValuesCallbac
    std::vector<GetValueResult> results;
    for (auto& request : requests) {
        const VehiclePropValue& value = request.prop;

        if (FAKE_VEHICLEHARDWARE_DEBUG) {
            ALOGD("getValues(%d)", value.prop);
        }

        GetValueResult getValueResult;
        getValueResult.requestId = request.requestId;