commit | c49a495b6e068152758984691f1c3a394174326e | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Fri Jul 07 22:12:02 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jul 07 22:12:02 2023 +0000 |
tree | 18ba76e6abcf232893894dcc04c2d68d6ac069e3 | |
parent | 2705f6193150d412c5ad7acad7c7477546b2c35b [diff] | |
parent | e958fdd56680b8b0499c6e8f4e03be534e62a8f9 [diff] |
Merge "Fix a type conversion bug." into udc-qpr-dev am: e958fdd566 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23882514 Change-Id: Ic1d16bba1245b9e6d6c6458e79fdf6bb33f431e0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h index d2b701d..2378676 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h +++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h
@@ -57,7 +57,7 @@ float dispersion; // Defines minimum and maximum value based on initial value. float increment; // Value that we will be added to currentValue with each timer tick. int64_t interval; - long lastEventTimestamp; + int64_t lastEventTimestamp; }; GeneratorCfg mGenCfg;
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp index 9133144..fe08dcf 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp +++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp
@@ -86,7 +86,7 @@ if (mGenCfg.lastEventTimestamp == 0) { mGenCfg.lastEventTimestamp = elapsedRealtimeNano(); } else { - long nextEventTime = mGenCfg.lastEventTimestamp + mGenCfg.interval; + int64_t nextEventTime = mGenCfg.lastEventTimestamp + mGenCfg.interval; // Prevent overflow. assert(nextEventTime > mGenCfg.lastEventTimestamp); mGenCfg.lastEventTimestamp = nextEventTime;