diff options
author | 2023-09-20 15:52:24 +0000 | |
---|---|---|
committer | 2023-09-20 15:52:24 +0000 | |
commit | 2c519e128545189faaf3cb0b2a718c20c3f20321 (patch) | |
tree | eaca31f88bdeaea82de0377bab3c96cfb51ccc62 | |
parent | 4a18995220f155a9e9e601f39f41f7d7c5422035 (diff) | |
parent | ff3ebb326b6acd787507b7c784e6886ef8a4c71f (diff) |
Merge "Update WindowInfosListenerUtils to use 5s timeout" into udc-qpr-dev am: 92ef1fe606 am: ff3ebb326b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/24795252
Change-Id: I8100e04c407c6d03c1ba2ea39238a21c2e9e68fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | services/surfaceflinger/tests/utils/WindowInfosListenerUtils.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/surfaceflinger/tests/utils/WindowInfosListenerUtils.h b/services/surfaceflinger/tests/utils/WindowInfosListenerUtils.h index 8e28a75ed4..11723c7509 100644 --- a/services/surfaceflinger/tests/utils/WindowInfosListenerUtils.h +++ b/services/surfaceflinger/tests/utils/WindowInfosListenerUtils.h @@ -14,6 +14,7 @@ * limitations under the License. */ +#include <android-base/properties.h> #include <gtest/gtest.h> #include <gui/SurfaceComposerClient.h> #include <private/android_filesystem_config.h> @@ -21,7 +22,8 @@ #include <future> namespace android { -using Transaction = SurfaceComposerClient::Transaction; + +using base::HwTimeoutMultiplier; using gui::DisplayInfo; using gui::WindowInfo; @@ -36,7 +38,8 @@ public: auto listener = sp<WindowInfosListener>::make(std::move(predicate), promise); mClient->addWindowInfosListener(listener); auto future = promise.get_future(); - bool satisfied = future.wait_for(std::chrono::seconds{1}) == std::future_status::ready; + bool satisfied = future.wait_for(std::chrono::seconds{5 * HwTimeoutMultiplier()}) == + std::future_status::ready; mClient->removeWindowInfosListener(listener); return satisfied; } |