Merge "Add intdef for UiAutomation flags." into nyc-dev

am: 3b2e22a

* commit '3b2e22a004f659c2e18faa7f2a6e0aa73ce695f2':
  Add intdef for UiAutomation flags.
This commit is contained in:
Phil Weaver
2016-03-18 15:15:02 +00:00
committed by android-build-merger

View File

@@ -16,6 +16,7 @@
package android.app; package android.app;
import android.annotation.IntDef;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
@@ -49,6 +50,8 @@ import android.view.Window;
import com.android.internal.content.ReferrerIntent; import com.android.internal.content.ReferrerIntent;
import java.io.File; import java.io.File;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -78,7 +81,15 @@ public class Instrumentation {
public static final String REPORT_KEY_STREAMRESULT = "stream"; public static final String REPORT_KEY_STREAMRESULT = "stream";
private static final String TAG = "Instrumentation"; 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 final Object mSync = new Object();
private ActivityThread mThread = null; private ActivityThread mThread = null;
private MessageQueue mMessageQueue = null; private MessageQueue mMessageQueue = null;
@@ -1876,7 +1887,7 @@ public class Instrumentation {
* *
* @see UiAutomation * @see UiAutomation
*/ */
public UiAutomation getUiAutomation(int flags) { public UiAutomation getUiAutomation(@UiAutomationFlags int flags) {
if (mUiAutomationConnection != null) { if (mUiAutomationConnection != null) {
if ((mUiAutomation == null) || (mUiAutomation.isDestroyed())) { if ((mUiAutomation == null) || (mUiAutomation.isDestroyed())) {
mUiAutomation = new UiAutomation(getTargetContext().getMainLooper(), mUiAutomation = new UiAutomation(getTargetContext().getMainLooper(),