From fe521427722eff1994aa156d846afb609c8cba64 Mon Sep 17 00:00:00 2001 From: tprotopopov-dev <73544592+tprotopopov-dev@users.noreply.github.com> Date: Wed, 16 Dec 2020 03:17:37 -0600 Subject: Revert c5093aad6df3096498cb396da299793d8b13db56 due to import incompatibility (#136) --- .../mobly/snippet/bundled/UiautomatorSnippet.java | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/main/java/com/google/android/mobly/snippet/bundled/UiautomatorSnippet.java (limited to 'src/main/java/com') 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() { - } -} -- cgit v1.2.3