From 17342a5115d7575d44a99fed9c7032e3ab316dcc Mon Sep 17 00:00:00 2001
From: Kevin Jin
Date: Fri, 18 Apr 2014 15:28:36 -0700
Subject: remove deps on Guava
This is to simplify the build and deployment set-up
for DroidDriver clients.
Change-Id: I02238d8721d4d3a505a851138c40cb086d2ff11f
---
src/com/google/android/droiddriver/UiElement.java | 2 +-
.../droiddriver/actions/SingleKeyAction.java | 4 +-
.../android/droiddriver/actions/SwipeAction.java | 9 +-
.../android/droiddriver/actions/TextAction.java | 6 +-
.../android/droiddriver/base/BaseUiElement.java | 30 ++--
.../android/droiddriver/base/DefaultPoller.java | 9 +-
src/com/google/android/droiddriver/finders/By.java | 125 +++-----------
.../android/droiddriver/finders/ByAttribute.java | 20 +--
.../android/droiddriver/finders/ByXPath.java | 37 +++--
.../android/droiddriver/finders/ChainFinder.java | 2 +-
.../google/android/droiddriver/finders/Finder.java | 2 +-
.../android/droiddriver/finders/MatchFinder.java | 17 +-
.../android/droiddriver/finders/Predicate.java | 49 ++++++
.../android/droiddriver/finders/Predicates.java | 179 +++++++++++++++++++++
.../google/android/droiddriver/finders/XPaths.java | 8 +-
.../droiddriver/helpers/UnrecoverableFailure.java | 1 -
.../instrumentation/InstrumentationContext.java | 4 +-
.../instrumentation/InstrumentationDriver.java | 3 +-
.../droiddriver/instrumentation/ViewElement.java | 37 ++---
.../android/droiddriver/runner/TestRunner.java | 6 +-
.../scroll/DynamicSentinelStrategy.java | 4 +-
.../droiddriver/scroll/SentinelStrategy.java | 14 +-
.../uiautomation/UiAutomationContext.java | 6 +-
.../uiautomation/UiAutomationDriver.java | 3 +-
.../uiautomation/UiAutomationElement.java | 19 ++-
.../android/droiddriver/util/ActivityUtils.java | 11 +-
src/com/google/android/droiddriver/util/Logs.java | 5 +-
.../android/droiddriver/util/Preconditions.java | 40 +++++
.../google/android/droiddriver/util/Strings.java | 66 ++++++++
.../google/android/droiddriver/util/TextUtils.java | 26 ---
30 files changed, 481 insertions(+), 263 deletions(-)
create mode 100644 src/com/google/android/droiddriver/finders/Predicate.java
create mode 100644 src/com/google/android/droiddriver/finders/Predicates.java
create mode 100644 src/com/google/android/droiddriver/util/Preconditions.java
create mode 100644 src/com/google/android/droiddriver/util/Strings.java
delete mode 100644 src/com/google/android/droiddriver/util/TextUtils.java
(limited to 'src')
diff --git a/src/com/google/android/droiddriver/UiElement.java b/src/com/google/android/droiddriver/UiElement.java
index 924197f..a2e7017 100644
--- a/src/com/google/android/droiddriver/UiElement.java
+++ b/src/com/google/android/droiddriver/UiElement.java
@@ -22,10 +22,10 @@ import com.google.android.droiddriver.actions.Action;
import com.google.android.droiddriver.actions.InputInjector;
import com.google.android.droiddriver.exceptions.ElementNotVisibleException;
import com.google.android.droiddriver.finders.Attribute;
+import com.google.android.droiddriver.finders.Predicate;
import com.google.android.droiddriver.instrumentation.InstrumentationDriver;
import com.google.android.droiddriver.scroll.Direction.PhysicalDirection;
import com.google.android.droiddriver.uiautomation.UiAutomationDriver;
-import com.google.common.base.Predicate;
import java.util.List;
diff --git a/src/com/google/android/droiddriver/actions/SingleKeyAction.java b/src/com/google/android/droiddriver/actions/SingleKeyAction.java
index 9faba80..853840e 100644
--- a/src/com/google/android/droiddriver/actions/SingleKeyAction.java
+++ b/src/com/google/android/droiddriver/actions/SingleKeyAction.java
@@ -22,7 +22,7 @@ import android.view.KeyEvent;
import com.google.android.droiddriver.UiElement;
import com.google.android.droiddriver.util.Events;
-import com.google.common.base.Objects;
+import com.google.android.droiddriver.util.Strings;
/**
* An action to press a single key. While it is convenient for navigating the
@@ -70,6 +70,6 @@ public class SingleKeyAction extends KeyAction {
String keyCodeString =
Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR1 ? String.valueOf(keyCode)
: KeyEvent.keyCodeToString(keyCode);
- return Objects.toStringHelper(this).addValue(keyCodeString).toString();
+ return Strings.toStringHelper(this).addValue(keyCodeString).toString();
}
}
diff --git a/src/com/google/android/droiddriver/actions/SwipeAction.java b/src/com/google/android/droiddriver/actions/SwipeAction.java
index 71241bb..b946e9f 100644
--- a/src/com/google/android/droiddriver/actions/SwipeAction.java
+++ b/src/com/google/android/droiddriver/actions/SwipeAction.java
@@ -30,9 +30,8 @@ import com.google.android.droiddriver.UiElement;
import com.google.android.droiddriver.exceptions.ActionException;
import com.google.android.droiddriver.scroll.Direction.PhysicalDirection;
import com.google.android.droiddriver.util.Events;
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.primitives.Ints;
+import com.google.android.droiddriver.util.Strings;
+import com.google.android.droiddriver.util.Strings.ToStringHelper;
/**
* A {@link ScrollAction} that swipes the touch screen. Note the scroll
@@ -165,7 +164,7 @@ public class SwipeAction extends ScrollAction {
float topMarginRatio, float leftMarginRatio, float bottomMarginRatio, float rightMarginRatio) {
super(timeoutMillis);
this.direction = direction;
- this.steps = Ints.max(2, steps);
+ this.steps = Math.max(2, steps);
this.drag = drag;
this.topMarginRatio = topMarginRatio;
this.bottomMarginRatio = bottomMarginRatio;
@@ -242,7 +241,7 @@ public class SwipeAction extends ScrollAction {
@Override
public String toString() {
- ToStringHelper toStringHelper = Objects.toStringHelper(this);
+ ToStringHelper toStringHelper = Strings.toStringHelper(this);
toStringHelper.addValue(direction);
toStringHelper.add("steps", steps);
if (drag) {
diff --git a/src/com/google/android/droiddriver/actions/TextAction.java b/src/com/google/android/droiddriver/actions/TextAction.java
index 35f13bd..586ad4e 100644
--- a/src/com/google/android/droiddriver/actions/TextAction.java
+++ b/src/com/google/android/droiddriver/actions/TextAction.java
@@ -23,8 +23,8 @@ import android.view.KeyEvent;
import com.google.android.droiddriver.UiElement;
import com.google.android.droiddriver.exceptions.ActionException;
-import com.google.common.base.Objects;
-import com.google.common.base.Preconditions;
+import com.google.android.droiddriver.util.Preconditions;
+import com.google.android.droiddriver.util.Strings;
/**
* An action to type text.
@@ -80,6 +80,6 @@ public class TextAction extends KeyAction {
@Override
public String toString() {
- return Objects.toStringHelper(this).addValue(text).toString();
+ return Strings.toStringHelper(this).addValue(text).toString();
}
}
diff --git a/src/com/google/android/droiddriver/base/BaseUiElement.java b/src/com/google/android/droiddriver/base/BaseUiElement.java
index 0db6c6a..1478505 100644
--- a/src/com/google/android/droiddriver/base/BaseUiElement.java
+++ b/src/com/google/android/droiddriver/base/BaseUiElement.java
@@ -25,15 +25,15 @@ import com.google.android.droiddriver.actions.SwipeAction;
import com.google.android.droiddriver.actions.TextAction;
import com.google.android.droiddriver.exceptions.ElementNotVisibleException;
import com.google.android.droiddriver.finders.Attribute;
+import com.google.android.droiddriver.finders.Predicate;
+import com.google.android.droiddriver.finders.Predicates;
import com.google.android.droiddriver.scroll.Direction.PhysicalDirection;
import com.google.android.droiddriver.util.Logs;
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.ImmutableList;
+import com.google.android.droiddriver.util.Strings;
+import com.google.android.droiddriver.util.Strings.ToStringHelper;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
@@ -234,20 +234,26 @@ public abstract class BaseUiElement implements UiElement {
public List extends BaseUiElement> getChildren(Predicate super UiElement> predicate) {
List extends BaseUiElement> children = getChildren();
if (children == null) {
- return ImmutableList.of();
+ return Collections.emptyList();
}
- if (predicate == null || predicate.equals(Predicates.alwaysTrue())) {
+ if (predicate == null || predicate.equals(Predicates.any())) {
return children;
}
- return ImmutableList.copyOf(Collections2.filter(children, predicate));
+ List filteredChildren = new ArrayList(children.size());
+ for (BaseUiElement child : children) {
+ if (predicate.apply(child)) {
+ filteredChildren.add(child);
+ }
+ }
+ return Collections.unmodifiableList(filteredChildren);
}
@Override
public String toString() {
- ToStringHelper toStringHelper = Objects.toStringHelper(this);
- for (Attribute attr : Attribute.values()) {
- addAttribute(toStringHelper, attr, get(attr));
+ ToStringHelper toStringHelper = Strings.toStringHelper(this);
+ for (Map.Entry entry : getAttributes().entrySet()) {
+ addAttribute(toStringHelper, entry.getKey(), entry.getValue());
}
if (!isVisible()) {
toStringHelper.addValue(ATTRIB_NOT_VISIBLE);
diff --git a/src/com/google/android/droiddriver/base/DefaultPoller.java b/src/com/google/android/droiddriver/base/DefaultPoller.java
index 923e1b6..c6d69c5 100644
--- a/src/com/google/android/droiddriver/base/DefaultPoller.java
+++ b/src/com/google/android/droiddriver/base/DefaultPoller.java
@@ -22,17 +22,16 @@ import com.google.android.droiddriver.DroidDriver;
import com.google.android.droiddriver.Poller;
import com.google.android.droiddriver.exceptions.TimeoutException;
import com.google.android.droiddriver.finders.Finder;
-import com.google.common.collect.Lists;
-import com.google.common.primitives.Longs;
import java.util.Collection;
+import java.util.LinkedList;
/**
* Default implementation of a {@link Poller}.
*/
public class DefaultPoller implements Poller {
- private final Collection timeoutListeners = Lists.newLinkedList();
- private final Collection pollingListeners = Lists.newLinkedList();
+ private final Collection timeoutListeners = new LinkedList();
+ private final Collection pollingListeners = new LinkedList();
private long timeoutMillis = 10000;
private long intervalMillis = 500;
@@ -85,7 +84,7 @@ public class DefaultPoller implements Poller {
throw new TimeoutException(String.format(
"Timed out after %d milliseconds waiting for %s %s", timeoutMillis, finder, checker));
}
- SystemClock.sleep(Longs.min(intervalMillis, remainingMillis));
+ SystemClock.sleep(Math.min(intervalMillis, remainingMillis));
}
}
diff --git a/src/com/google/android/droiddriver/finders/By.java b/src/com/google/android/droiddriver/finders/By.java
index 5e7f322..e23a244 100644
--- a/src/com/google/android/droiddriver/finders/By.java
+++ b/src/com/google/android/droiddriver/finders/By.java
@@ -16,28 +16,16 @@
package com.google.android.droiddriver.finders;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.android.droiddriver.util.Preconditions.checkNotNull;
import com.google.android.droiddriver.UiElement;
import com.google.android.droiddriver.exceptions.ElementNotFoundException;
-import com.google.common.base.Joiner;
-import com.google.common.base.Objects;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Lists;
-
-import java.util.List;
/**
* Convenience methods to create commonly used finders.
*/
public class By {
- private static final MatchFinder ANY = new MatchFinder(null) {
- @Override
- public String toString() {
- return "any";
- }
- };
+ private static final MatchFinder ANY = new MatchFinder(null);
/** Matches any UiElement. */
public static MatchFinder any() {
@@ -48,7 +36,7 @@ public class By {
public static final MatchStrategy
*/
- public static final Getter SECOND_LAST_CHILD_GETTER = new Getter(Predicates.alwaysTrue(),
+ public static final Getter SECOND_LAST_CHILD_GETTER = new Getter(Predicates.any(),
"SECOND_LAST_CHILD") {
@Override
protected UiElement getSentinel(List extends UiElement> children) {
@@ -114,7 +114,7 @@ public interface SentinelStrategy extends ScrollStepStrategy {
* Returns the second child as the sentinel. Useful when the activity shows a
* fixed first child.
*/
- public static final Getter SECOND_CHILD_GETTER = new Getter(Predicates.alwaysTrue(),
+ public static final Getter SECOND_CHILD_GETTER = new Getter(Predicates.any(),
"SECOND_CHILD") {
@Override
protected UiElement getSentinel(List extends UiElement> children) {
diff --git a/src/com/google/android/droiddriver/uiautomation/UiAutomationContext.java b/src/com/google/android/droiddriver/uiautomation/UiAutomationContext.java
index 35a4483..fcb7a94 100644
--- a/src/com/google/android/droiddriver/uiautomation/UiAutomationContext.java
+++ b/src/com/google/android/droiddriver/uiautomation/UiAutomationContext.java
@@ -25,13 +25,13 @@ import com.google.android.droiddriver.actions.InputInjector;
import com.google.android.droiddriver.base.DroidDriverContext;
import com.google.android.droiddriver.exceptions.UnrecoverableException;
import com.google.android.droiddriver.finders.ByXPath;
-import com.google.common.collect.MapMaker;
import java.util.Map;
+import java.util.WeakHashMap;
class UiAutomationContext extends DroidDriverContext {
- private final Map map = new MapMaker().weakKeys()
- .weakValues().makeMap();
+ private final Map map =
+ new WeakHashMap();
private final UiAutomation uiAutomation;
private final InputInjector injector;
private final UiAutomationDriver driver;
diff --git a/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java b/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java
index ad30693..d465816 100644
--- a/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java
+++ b/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java
@@ -28,7 +28,6 @@ import com.google.android.droiddriver.base.BaseDroidDriver;
import com.google.android.droiddriver.exceptions.TimeoutException;
import com.google.android.droiddriver.uiautomation.UiAutomationContext.UiAutomationCallable;
import com.google.android.droiddriver.util.Logs;
-import com.google.common.primitives.Longs;
/**
* Implementation of DroidDriver that is driven via the accessibility layer.
@@ -92,7 +91,7 @@ public class UiAutomationDriver extends BaseDroidDriver {
String.format("Timed out after %d milliseconds waiting for root AccessibilityNodeInfo",
timeoutMillis));
}
- SystemClock.sleep(Longs.min(250, remainingMillis));
+ SystemClock.sleep(Math.min(250, remainingMillis));
}
}
diff --git a/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java b/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java
index 5e55148..9a2b427 100644
--- a/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java
+++ b/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java
@@ -16,7 +16,7 @@
package com.google.android.droiddriver.uiautomation;
-import static com.google.android.droiddriver.util.TextUtils.charSequenceToString;
+import static com.google.android.droiddriver.util.Strings.charSequenceToString;
import android.app.UiAutomation;
import android.app.UiAutomation.AccessibilityEventFilter;
@@ -28,12 +28,11 @@ import com.google.android.droiddriver.actions.InputInjector;
import com.google.android.droiddriver.base.BaseUiElement;
import com.google.android.droiddriver.finders.Attribute;
import com.google.android.droiddriver.uiautomation.UiAutomationContext.UiAutomationCallable;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
+import com.google.android.droiddriver.util.Preconditions;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.FutureTask;
@@ -70,7 +69,7 @@ public class UiAutomationElement extends BaseUiElement {
Preconditions.checkNotNull(node);
this.parent = parent;
- Map attribs = Maps.newEnumMap(Attribute.class);
+ Map attribs = new EnumMap(Attribute.class);
put(attribs, Attribute.PACKAGE, charSequenceToString(node.getPackageName()));
put(attribs, Attribute.CLASS, charSequenceToString(node.getClassName()));
put(attribs, Attribute.TEXT, charSequenceToString(node.getText()));
@@ -92,13 +91,13 @@ public class UiAutomationElement extends BaseUiElement {
}
put(attribs, Attribute.SELECTED, node.isSelected());
put(attribs, Attribute.BOUNDS, getBounds(node));
- attributes = ImmutableMap.copyOf(attribs);
+ attributes = Collections.unmodifiableMap(attribs);
// Order matters as getVisibleBounds depends on visible
visible = node.isVisibleToUser();
visibleBounds = getVisibleBounds(node);
List mutableChildren = buildChildren(context, node);
- this.children = mutableChildren == null ? null : ImmutableList.copyOf(mutableChildren);
+ this.children = mutableChildren == null ? null : Collections.unmodifiableList(mutableChildren);
}
private void put(Map attribs, Attribute key, Object value) {
@@ -114,7 +113,7 @@ public class UiAutomationElement extends BaseUiElement {
if (childCount == 0) {
children = null;
} else {
- children = Lists.newArrayListWithExpectedSize(childCount);
+ children = new ArrayList(childCount);
for (int i = 0; i < childCount; i++) {
AccessibilityNodeInfo child = node.getChild(i);
if (child != null) {
diff --git a/src/com/google/android/droiddriver/util/ActivityUtils.java b/src/com/google/android/droiddriver/util/ActivityUtils.java
index 466caf9..c0f553f 100644
--- a/src/com/google/android/droiddriver/util/ActivityUtils.java
+++ b/src/com/google/android/droiddriver/util/ActivityUtils.java
@@ -19,12 +19,21 @@ package com.google.android.droiddriver.util;
import android.app.Activity;
import com.google.android.droiddriver.instrumentation.InstrumentationDriver;
-import com.google.common.base.Supplier;
/**
* Static helper methods for retrieving activities.
*/
public class ActivityUtils {
+ public interface Supplier {
+ /**
+ * Retrieves an instance of the appropriate type. The returned object may or
+ * may not be a new instance, depending on the implementation.
+ *
+ * @return an instance of the appropriate type
+ */
+ T get();
+ }
+
private static Supplier runningActivitySupplier;
/**
diff --git a/src/com/google/android/droiddriver/util/Logs.java b/src/com/google/android/droiddriver/util/Logs.java
index e376b73..e08ee10 100644
--- a/src/com/google/android/droiddriver/util/Logs.java
+++ b/src/com/google/android/droiddriver/util/Logs.java
@@ -16,10 +16,9 @@
package com.google.android.droiddriver.util;
+import android.text.TextUtils;
import android.util.Log;
-import com.google.common.base.Joiner;
-
/**
* Internal helper for logging.
*/
@@ -32,7 +31,7 @@ public class Logs {
Log.d(
TAG,
String.format("Invoking %s.%s(%s)", self.getClass().getSimpleName(), method,
- Joiner.on(", ").join(args)));
+ TextUtils.join(", ", args)));
}
}
diff --git a/src/com/google/android/droiddriver/util/Preconditions.java b/src/com/google/android/droiddriver/util/Preconditions.java
new file mode 100644
index 0000000..aaf545d
--- /dev/null
+++ b/src/com/google/android/droiddriver/util/Preconditions.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2013 DroidDriver committers
+ *
+ * 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.droiddriver.util;
+
+/**
+ * Simple static methods to be called at the start of your own methods to verify
+ * correct arguments and state.
+ */
+public final class Preconditions {
+ private Preconditions() {}
+
+ /**
+ * Ensures that an object reference passed as a parameter to the calling
+ * method is not null.
+ *
+ * @param reference an object reference
+ * @return the non-null reference that was validated
+ * @throws NullPointerException if {@code reference} is null
+ */
+ public static T checkNotNull(T reference) {
+ if (reference == null) {
+ throw new NullPointerException();
+ }
+ return reference;
+ }
+}
diff --git a/src/com/google/android/droiddriver/util/Strings.java b/src/com/google/android/droiddriver/util/Strings.java
new file mode 100644
index 0000000..ea75238
--- /dev/null
+++ b/src/com/google/android/droiddriver/util/Strings.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2013 DroidDriver committers
+ *
+ * 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.droiddriver.util;
+
+/**
+ * Static helper methods for manipulating strings.
+ */
+public class Strings {
+ public static String charSequenceToString(CharSequence input) {
+ return input == null ? null : input.toString();
+ }
+
+ public static ToStringHelper toStringHelper(Object self) {
+ return new ToStringHelper(self.getClass().getSimpleName());
+ }
+
+ public static final class ToStringHelper {
+ private final StringBuilder builder;
+ private boolean needsSeparator = false;
+
+ /**
+ * Use {@link #toStringHelper(Object)} to create an instance.
+ */
+ private ToStringHelper(String className) {
+ this.builder = new StringBuilder(32).append(className).append('{');
+ }
+
+ public ToStringHelper addValue(Object value) {
+ maybeAppendSeparator().append(value);
+ return this;
+ }
+
+ public ToStringHelper add(String name, Object value) {
+ maybeAppendSeparator().append(name).append('=').append(value);
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return builder.append('}').toString();
+ }
+
+ private StringBuilder maybeAppendSeparator() {
+ if (needsSeparator) {
+ return builder.append(", ");
+ } else {
+ needsSeparator = true;
+ return builder;
+ }
+ }
+ }
+}
diff --git a/src/com/google/android/droiddriver/util/TextUtils.java b/src/com/google/android/droiddriver/util/TextUtils.java
deleted file mode 100644
index b709018..0000000
--- a/src/com/google/android/droiddriver/util/TextUtils.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2013 DroidDriver committers
- *
- * 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.droiddriver.util;
-
-/**
- * Static helper methods for manipulating strings.
- */
-public class TextUtils {
- public static String charSequenceToString(CharSequence input) {
- return input == null ? null : input.toString();
- }
-}
--
cgit v1.2.3