commit | 9d7d266d94604c29e79ca5e902ddbe256982eecc | [log] [tgz] |
---|---|---|
author | Megha Shetty <shettymegha@google.com> | Thu Sep 01 19:09:31 2022 +0000 |
committer | Megha Shetty <shettymegha@google.com> | Fri Sep 02 18:32:23 2022 +0000 |
tree | 0f353d3a157438a6a16adc623d1a16fee3a5fe2d | |
parent | 931afed78036103fd381ae302b4bb932a56efdbf [diff] |
Fix for test-SecuritysettingTest Test: https://android-build.googleplex.com/builds/abtd/run/L78200000956243589 Bug: 243921028 Change-Id: I1ead499e595ae06b28443aeabe3308356cbaad8e
diff --git a/libraries/automotive-helpers/settings-app-helper/src/android/platform/helpers/SettingsSecurityHelperImpl.java b/libraries/automotive-helpers/settings-app-helper/src/android/platform/helpers/SettingsSecurityHelperImpl.java index cee79e1..b52ef52 100644 --- a/libraries/automotive-helpers/settings-app-helper/src/android/platform/helpers/SettingsSecurityHelperImpl.java +++ b/libraries/automotive-helpers/settings-app-helper/src/android/platform/helpers/SettingsSecurityHelperImpl.java
@@ -3,11 +3,14 @@ import android.app.Instrumentation; import android.support.test.uiautomator.By; import android.support.test.uiautomator.UiObject2; +import android.os.SystemClock; import java.util.List; public class SettingsSecurityHelperImpl extends AbstractAutoStandardAppHelper implements IAutoSecuritySettingsHelper { + private static final int UI_RESPONSE_WAIT_MS = 1000; + public SettingsSecurityHelperImpl(Instrumentation instr) { super(instr); } @@ -37,6 +40,7 @@ } private void openChooseLockTypeMenu() { + SystemClock.sleep(UI_RESPONSE_WAIT_MS); List<UiObject2> titles = findUiObjects( getResourceFromConfig( @@ -182,6 +186,7 @@ AutoConfigConstants.LOCK_TYPE_NONE)); clickAndWaitForWindowUpdate( getApplicationConfig(AutoConfigConstants.SETTINGS_PACKAGE), none_menu); + SystemClock.sleep(UI_RESPONSE_WAIT_MS); UiObject2 remove_button = findUiObject( getResourceFromConfig(