diff options
author | tprotopopov-dev <73544592+tprotopopov-dev@users.noreply.github.com> | 2020-12-16 03:17:37 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 17:17:37 +0800 |
commit | fe521427722eff1994aa156d846afb609c8cba64 (patch) | |
tree | ff7298932954cbafe1995a5973a6338232dc69f0 | |
parent | 05ceaf206c46e2360328edd0cc02b30d0b916164 (diff) | |
download | mobly-bundled-snippets-fe521427722eff1994aa156d846afb609c8cba64.tar.gz |
Revert c5093aad6df3096498cb396da299793d8b13db56 due to import incompatibility (#136)
-rw-r--r-- | build.gradle | 7 | ||||
-rw-r--r-- | src/main/AndroidManifest.xml | 1 | ||||
-rw-r--r-- | src/main/java/com/google/android/mobly/snippet/bundled/UiautomatorSnippet.java | 47 |
3 files changed, 3 insertions, 52 deletions
diff --git a/build.gradle b/build.gradle index 12c3ed8..b0bcbfd 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { } plugins { - id "com.github.sherter.google-java-format" version "0.9" + id "com.github.sherter.google-java-format" version "0.8" } repositories { @@ -36,7 +36,7 @@ android { defaultConfig { applicationId "com.google.android.mobly.snippet.bundled" - minSdkVersion 18 + minSdkVersion 15 // Set target to 22 to avoid having to deal with runtime permissions. targetSdkVersion 22 versionCode 1 @@ -74,8 +74,7 @@ artifacts { } dependencies { - implementation 'androidx.test.uiautomator:uiautomator:2.2.0' - implementation 'androidx.test:runner:1.3.0' + implementation 'androidx.test:runner:1.2.0' implementation 'com.google.android.mobly:mobly-snippet-lib:1.2.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.google.guava:guava:27.0.1-android' diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index bd59ce5..21de6d7 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -47,7 +47,6 @@ com.google.android.mobly.snippet.bundled.NetworkingSnippet, com.google.android.mobly.snippet.bundled.FileSnippet, com.google.android.mobly.snippet.bundled.SmsSnippet, - com.google.android.mobly.snippet.bundled.UiautomatorSnippet, com.google.android.mobly.snippet.bundled.WifiManagerSnippet, com.google.android.mobly.snippet.bundled.StorageSnippet" /> </application> diff --git a/src/main/java/com/google/android/mobly/snippet/bundled/UiautomatorSnippet.java b/src/main/java/com/google/android/mobly/snippet/bundled/UiautomatorSnippet.java deleted file mode 100644 index d71bff1..0000000 --- a/src/main/java/com/google/android/mobly/snippet/bundled/UiautomatorSnippet.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2020 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.google.android.mobly.snippet.bundled; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.uiautomator.UiDevice; -import com.google.android.mobly.snippet.Snippet; -import com.google.android.mobly.snippet.rpc.Rpc; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStream; - -/** - * Snippet class exposing Android APIs in Uiautomator. - */ -public class UiautomatorSnippet implements Snippet { - - private static final UiDevice device = - UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); - - @Rpc(description = "Dumps UI hierarchy XML and return as string.") - public String uiautomatorDumpWindowHierarchy() throws IOException { - OutputStream outStream = new ByteArrayOutputStream(); - device.dumpWindowHierarchy(outStream); - String res = outStream.toString(); - outStream.close(); - return res; - } - - @Override - public void shutdown() { - } -} |