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

Commit 10f81a7e authored by Prashant Patil's avatar Prashant Patil
Browse files

Screen wakeup is added in VTS tests setup

VtsHalConfirmationUITargetTest need screen to be on in order to pass.
Hence device wakeup command is executed from VTS tests setup.

Bug: 332827323
Test: atest VtsHalConfirmationUITargetTest
Change-Id: I354cd33c6b48f7cf94433a4959ecfcb96f4a9da2
parent 287187f1
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -192,6 +192,12 @@ class ConfirmationUIAidlTest : public ::testing::TestWithParam<std::string> {
  public:
  public:
    void TearDown() override { confirmator_->abort(); }
    void TearDown() override { confirmator_->abort(); }
    void SetUp() override {
    void SetUp() override {
        // Wake up the device in-case screen is off. b/332827323
        int ret = system("input keyevent KEYCODE_WAKEUP");
        if (ret != 0) {
            ALOGE("Failed to run keyevent KEYCODE_WAKEUP command");
        }
        usleep(100000);  // wait for 100ms to wake up the screen.
        std::string name = GetParam();
        std::string name = GetParam();
        ASSERT_TRUE(AServiceManager_isDeclared(name.c_str())) << name;
        ASSERT_TRUE(AServiceManager_isDeclared(name.c_str())) << name;
        ndk::SpAIBinder binder(AServiceManager_waitForService(name.c_str()));
        ndk::SpAIBinder binder(AServiceManager_waitForService(name.c_str()));