summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolò Mazzucato <nicomazz@google.com>2022-12-22 14:54:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-12-22 14:54:32 +0000
commita2f8af42c719bf3edff24371479f1d3bd043c4db (patch)
tree5b09d4827fd8db72e6d34dcc82c6bbc6ced8659c
parent6cd36cdf4b4e5624a1ede9bfa8eeca096b890dd9 (diff)
parent345e8b4fa0d367bb435ef4a34d41ab74bb3c4012 (diff)
downloadplatform_testing-a2f8af42c719bf3edff24371479f1d3bd043c4db.tar.gz
Merge "Using only DeviceHelpers.getContext() in systemui-tapl" into tm-qpr-dev
-rw-r--r--libraries/systemui-helper/src/android/platform/helpers/CommonUtils.java2
-rw-r--r--libraries/systemui-helper/src/android/platform/helpers/LockscreenUtils.java2
-rw-r--r--libraries/systemui-helper/src/android/platform/helpers/ui/UiAutomatorUtils.java10
3 files changed, 2 insertions, 12 deletions
diff --git a/libraries/systemui-helper/src/android/platform/helpers/CommonUtils.java b/libraries/systemui-helper/src/android/platform/helpers/CommonUtils.java
index 59a281c0e..ecacf80fa 100644
--- a/libraries/systemui-helper/src/android/platform/helpers/CommonUtils.java
+++ b/libraries/systemui-helper/src/android/platform/helpers/CommonUtils.java
@@ -16,10 +16,10 @@
package android.platform.helpers;
-import static android.platform.helpers.ui.UiAutomatorUtils.getContext;
import static android.platform.helpers.ui.UiAutomatorUtils.getInstrumentation;
import static android.platform.helpers.ui.UiAutomatorUtils.getUiDevice;
import static android.platform.helpers.ui.UiSearch.search;
+import static android.platform.uiautomator_helpers.DeviceHelpers.getContext;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
diff --git a/libraries/systemui-helper/src/android/platform/helpers/LockscreenUtils.java b/libraries/systemui-helper/src/android/platform/helpers/LockscreenUtils.java
index d66699d86..63d88d414 100644
--- a/libraries/systemui-helper/src/android/platform/helpers/LockscreenUtils.java
+++ b/libraries/systemui-helper/src/android/platform/helpers/LockscreenUtils.java
@@ -20,8 +20,8 @@ import static android.content.Context.KEYGUARD_SERVICE;
import static android.os.SystemClock.sleep;
import static android.platform.helpers.CommonUtils.executeShellCommand;
import static android.platform.helpers.Constants.SHORT_WAIT_TIME_IN_SECONDS;
-import static android.platform.helpers.ui.UiAutomatorUtils.getContext;
import static android.platform.helpers.ui.UiAutomatorUtils.getUiDevice;
+import static android.platform.uiautomator_helpers.DeviceHelpers.getContext;
import static android.view.KeyEvent.KEYCODE_ENTER;
import static com.google.common.truth.Truth.assertThat;
diff --git a/libraries/systemui-helper/src/android/platform/helpers/ui/UiAutomatorUtils.java b/libraries/systemui-helper/src/android/platform/helpers/ui/UiAutomatorUtils.java
index d618cb732..009e0a9ba 100644
--- a/libraries/systemui-helper/src/android/platform/helpers/ui/UiAutomatorUtils.java
+++ b/libraries/systemui-helper/src/android/platform/helpers/ui/UiAutomatorUtils.java
@@ -17,7 +17,6 @@
package android.platform.helpers.ui;
import android.app.Instrumentation;
-import android.content.Context;
import android.support.test.uiautomator.UiDevice;
import android.util.Log;
@@ -46,15 +45,6 @@ public class UiAutomatorUtils {
}
/**
- * Gets application context.
- *
- * @return an instance of Context
- */
- public static Context getContext() {
- return getInstrumentation().getTargetContext();
- }
-
- /**
* To get base class for implementing application instrumentation code.
*
* @return an instance of Instrumentation