summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorPhil Weaver <pweaver@google.com>2016-03-18 15:08:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-03-18 15:08:45 +0000
commit3b2e22a004f659c2e18faa7f2a6e0aa73ce695f2 (patch)
treea577f997aec9c4e52b124572e6263afb3d315ed2 /core/java
parentfa89fbb9c3ebeb212a52227b1ec4c8720d033070 (diff)
parent35841683c5db419a46ee2dcf7c66e0a5f6b84d26 (diff)
Merge "Add intdef for UiAutomation flags." into nyc-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/Instrumentation.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index 33fd1dbda63d..13e8e75a4db7 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.IntDef;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
@@ -49,6 +50,8 @@ import android.view.Window;
import com.android.internal.content.ReferrerIntent;
import java.io.File;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;
@@ -78,7 +81,15 @@ public class Instrumentation {
public static final String REPORT_KEY_STREAMRESULT = "stream";
private static final String TAG = "Instrumentation";
-
+
+ /**
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({0, UiAutomation.FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES})
+ public @interface UiAutomationFlags {};
+
+
private final Object mSync = new Object();
private ActivityThread mThread = null;
private MessageQueue mMessageQueue = null;
@@ -1876,7 +1887,7 @@ public class Instrumentation {
*
* @see UiAutomation
*/
- public UiAutomation getUiAutomation(int flags) {
+ public UiAutomation getUiAutomation(@UiAutomationFlags int flags) {
if (mUiAutomationConnection != null) {
if ((mUiAutomation == null) || (mUiAutomation.isDestroyed())) {
mUiAutomation = new UiAutomation(getTargetContext().getMainLooper(),