Merge "Clean up any restrictions files that shouldn't be there."
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 6118fc3..893daf1 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -162,6 +162,7 @@
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/framework-res_intermediates)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/api/current.txt b/api/current.txt
index 80952e3..3318e06 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -35600,6 +35600,7 @@
method public int getResponseCode() throws java.io.IOException;
method public java.lang.String getResponseMessage() throws java.io.IOException;
method public void setChunkedStreamingMode(int);
+ method public void setFixedLengthStreamingMode(long);
method public void setFixedLengthStreamingMode(int);
method public static void setFollowRedirects(boolean);
method public void setInstanceFollowRedirects(boolean);
@@ -35643,6 +35644,7 @@
field public static final int HTTP_VERSION = 505; // 0x1f9
field protected int chunkLength;
field protected int fixedContentLength;
+ field protected long fixedContentLengthLong;
field protected boolean instanceFollowRedirects;
field protected java.lang.String method;
field protected int responseCode;
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 8f0c62d..810a521 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1569,7 +1569,7 @@
currentKey = parsePublicKey(encodedKey);
definedKeySets.put(currentKey, new HashSet<String>());
sa.recycle();
- } else if (tagname.equals("keyset")) {
+ } else if (tagname.equals("keyset")) {
final TypedArray sa = res.obtainAttributes(attrs,
com.android.internal.R.styleable.KeySet);
final String name = sa.getNonResourceString(
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index 5cc1150..c3e9cb7 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -204,37 +204,71 @@
// TODO(): The following arrays are fragile and error-prone. This needs to be refactored.
// Note: This needs to be updated, whenever a new sensor is added.
- private static int[] sSensorReportingModes = {
- REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS,
- REPORTING_MODE_CONTINUOUS, REPORTING_MODE_ON_CHANGE, REPORTING_MODE_CONTINUOUS,
- REPORTING_MODE_ON_CHANGE, REPORTING_MODE_ON_CHANGE, REPORTING_MODE_CONTINUOUS,
- REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS, REPORTING_MODE_ON_CHANGE,
- REPORTING_MODE_ON_CHANGE, REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS,
- REPORTING_MODE_CONTINUOUS, REPORTING_MODE_ONE_SHOT };
-
- // Note: This needs to be updated, whenever a new sensor is added.
- // Holds the maximum length of the values array associated with {@link SensorEvent} or
- // {@link TriggerEvent} for the Sensor
- private static int[] sMaxLengthValuesArray = {
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3,
- 6, 4, 6, 1 };
+ // Holds the reporting mode and maximum length of the values array
+ // associated with
+ // {@link SensorEvent} or {@link TriggerEvent} for the Sensor
+ private static final int[] sSensorReportingModes = {
+ 0, 0, // padding because sensor types start at 1
+ REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_ACCELEROMETER
+ REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_GEOMAGNETIC_FIELD
+ REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_ORIENTATION
+ REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_GYROSCOPE
+ REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_LIGHT
+ REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_PRESSURE
+ REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_TEMPERATURE
+ REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_PROXIMITY
+ REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_GRAVITY
+ REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_LINEAR_ACCELERATION
+ REPORTING_MODE_CONTINUOUS, 5, // SENSOR_TYPE_ROTATION_VECTOR
+ REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_RELATIVE_HUMIDITY
+ REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_AMBIENT_TEMPERATURE
+ REPORTING_MODE_CONTINUOUS, 6, // SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED
+ REPORTING_MODE_CONTINUOUS, 4, // SENSOR_TYPE_GAME_ROTATION_VECTOR
+ REPORTING_MODE_CONTINUOUS, 6, // SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
+ REPORTING_MODE_ONE_SHOT, 1, // SENSOR_TYPE_SIGNIFICANT_MOTION
+ // added post 4.3
+ REPORTING_MODE_ON_CHANGE, 1, // SENSOR_TYPE_STEP_DETECTOR
+ REPORTING_MODE_ON_CHANGE, 1, // SENSOR_TYPE_STEP_COUNTER
+ REPORTING_MODE_CONTINUOUS, 5 // SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR
+ };
static int getReportingMode(Sensor sensor) {
- // mType starts from offset 1.
- return sSensorReportingModes[sensor.mType - 1];
+ int offset = sensor.mType * 2;
+ if (offset >= sSensorReportingModes.length) {
+ // we don't know about this sensor, so this is probably a
+ // vendor-defined sensor, in that case, we figure out the reporting
+ // mode from the sensor meta-data.
+ int minDelay = sensor.mMinDelay;
+ if (minDelay == 0) {
+ return REPORTING_MODE_ON_CHANGE;
+ } else if (minDelay < 0) {
+ return REPORTING_MODE_ONE_SHOT;
+ } else {
+ return REPORTING_MODE_CONTINUOUS;
+ }
+ }
+ return sSensorReportingModes[offset];
}
static int getMaxLengthValuesArray(Sensor sensor, int sdkLevel) {
- // mType starts from offset 1.
- int len = sMaxLengthValuesArray[sensor.mType - 1];
-
+ int type = sensor.mType;
// RotationVector length has changed to 3 to 5 for API level 18
// Set it to 3 for backward compatibility.
- if (sensor.getType() == Sensor.TYPE_ROTATION_VECTOR &&
+ if (type == Sensor.TYPE_ROTATION_VECTOR &&
sdkLevel <= Build.VERSION_CODES.JELLY_BEAN_MR1) {
- len = 3;
+ return 3;
}
- return len;
+ int offset = type * 2 + 1;
+ if (offset >= sSensorReportingModes.length) {
+ // we don't know about this sensor, so this is probably a
+ // vendor-defined sensor, in that case, we don't know how many value
+ // it has
+ // so we return the maximum and assume the app will know.
+ // FIXME: sensor HAL should advertise how much data is returned per
+ // sensor
+ return 16;
+ }
+ return sSensorReportingModes[offset];
}
/* Some of these fields are set only by the native bindings in
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 8e0935d..12646bd 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -1803,8 +1803,8 @@
for (int i=0; i<timers.size(); i++) {
TimerEntry timer = timers.get(i);
sb.setLength(0);
- sb.append(" Wake lock #");
- sb.append(timer.mId);
+ sb.append(" Wake lock ");
+ UserHandle.formatUid(sb, timer.mId);
sb.append(" ");
sb.append(timer.mName);
printWakeLock(sb, timer.mTimer, batteryRealtime, null, which, ": ");
@@ -1822,8 +1822,11 @@
}
Uid u = uidStats.valueAt(iu);
-
- pw.println(prefix + " #" + uid + ":");
+
+ pw.print(prefix);
+ pw.print(" ");
+ UserHandle.formatUid(pw, uid);
+ pw.println(":");
boolean uidActivity = false;
long mobileRxBytes = u.getNetworkActivityCount(NETWORK_MOBILE_RX_BYTES, which);
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java
index d205253..6e693a4 100644
--- a/core/java/android/os/UserHandle.java
+++ b/core/java/android/os/UserHandle.java
@@ -168,8 +168,11 @@
if (appId >= Process.FIRST_ISOLATED_UID && appId <= Process.LAST_ISOLATED_UID) {
sb.append('i');
sb.append(appId - Process.FIRST_ISOLATED_UID);
- } else {
+ } else if (appId >= Process.FIRST_APPLICATION_UID) {
sb.append('a');
+ sb.append(appId - Process.FIRST_APPLICATION_UID);
+ } else {
+ sb.append('s');
sb.append(appId);
}
}
@@ -190,8 +193,11 @@
if (appId >= Process.FIRST_ISOLATED_UID && appId <= Process.LAST_ISOLATED_UID) {
pw.print('i');
pw.print(appId - Process.FIRST_ISOLATED_UID);
- } else {
+ } else if (appId >= Process.FIRST_APPLICATION_UID) {
pw.print('a');
+ pw.print(appId - Process.FIRST_APPLICATION_UID);
+ } else {
+ pw.print('s');
pw.print(appId);
}
}
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index a441c39..4adee14 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -781,7 +781,7 @@
int modifier = paint != null ? setupColorFilter(paint) : MODIFIER_NONE;
try {
final int nativePaint = paint == null ? 0 : paint.mNativePaint;
- nDrawPatch(mRenderer, bitmap.mNativeBitmap, patch.mNativeChunk,
+ nDrawPatch(mRenderer, bitmap.mNativeBitmap, bitmap.mBuffer, patch.mNativeChunk,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
} finally {
if (modifier != MODIFIER_NONE) nResetModifiers(mRenderer, modifier);
@@ -796,14 +796,14 @@
int modifier = paint != null ? setupColorFilter(paint) : MODIFIER_NONE;
try {
final int nativePaint = paint == null ? 0 : paint.mNativePaint;
- nDrawPatch(mRenderer, bitmap.mNativeBitmap, patch.mNativeChunk,
+ nDrawPatch(mRenderer, bitmap.mNativeBitmap, bitmap.mBuffer, patch.mNativeChunk,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
} finally {
if (modifier != MODIFIER_NONE) nResetModifiers(mRenderer, modifier);
}
}
- private static native void nDrawPatch(int renderer, int bitmap, int chunk,
+ private static native void nDrawPatch(int renderer, int bitmap, byte[] buffer, int chunk,
float left, float top, float right, float bottom, int paint);
@Override
@@ -813,13 +813,13 @@
int modifiers = paint != null ? setupModifiers(bitmap, paint) : MODIFIER_NONE;
try {
final int nativePaint = paint == null ? 0 : paint.mNativePaint;
- nDrawBitmap(mRenderer, bitmap.mNativeBitmap, left, top, nativePaint);
+ nDrawBitmap(mRenderer, bitmap.mNativeBitmap, bitmap.mBuffer, left, top, nativePaint);
} finally {
if (modifiers != MODIFIER_NONE) nResetModifiers(mRenderer, modifiers);
}
}
- private static native void nDrawBitmap(int renderer, int bitmap,
+ private static native void nDrawBitmap(int renderer, int bitmap, byte[] buffer,
float left, float top, int paint);
@Override
@@ -829,13 +829,15 @@
int modifiers = paint != null ? setupModifiers(bitmap, paint) : MODIFIER_NONE;
try {
final int nativePaint = paint == null ? 0 : paint.mNativePaint;
- nDrawBitmap(mRenderer, bitmap.mNativeBitmap, matrix.native_instance, nativePaint);
+ nDrawBitmap(mRenderer, bitmap.mNativeBitmap, bitmap.mBuffer,
+ matrix.native_instance, nativePaint);
} finally {
if (modifiers != MODIFIER_NONE) nResetModifiers(mRenderer, modifiers);
}
}
- private static native void nDrawBitmap(int renderer, int bitmap, int matrix, int paint);
+ private static native void nDrawBitmap(int renderer, int bitmap, byte[] buffer,
+ int matrix, int paint);
@Override
public void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) {
@@ -857,7 +859,7 @@
bottom = src.bottom;
}
- nDrawBitmap(mRenderer, bitmap.mNativeBitmap, left, top, right, bottom,
+ nDrawBitmap(mRenderer, bitmap.mNativeBitmap, bitmap.mBuffer, left, top, right, bottom,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
} finally {
if (modifiers != MODIFIER_NONE) nResetModifiers(mRenderer, modifiers);
@@ -884,14 +886,14 @@
bottom = src.bottom;
}
- nDrawBitmap(mRenderer, bitmap.mNativeBitmap, left, top, right, bottom,
+ nDrawBitmap(mRenderer, bitmap.mNativeBitmap, bitmap.mBuffer, left, top, right, bottom,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
} finally {
if (modifiers != MODIFIER_NONE) nResetModifiers(mRenderer, modifiers);
}
}
- private static native void nDrawBitmap(int renderer, int bitmap,
+ private static native void nDrawBitmap(int renderer, int bitmap, byte[] buffer,
float srcLeft, float srcTop, float srcRight, float srcBottom,
float left, float top, float right, float bottom, int paint);
@@ -960,15 +962,15 @@
int modifiers = paint != null ? setupModifiers(bitmap, paint) : MODIFIER_NONE;
try {
- final int nativePaint = paint == null ? 0 : paint.mNativePaint;
- nDrawBitmapMesh(mRenderer, bitmap.mNativeBitmap, meshWidth, meshHeight,
+ final int nativePaint = paint == null ? 0 : paint.mNativePaint;
+ nDrawBitmapMesh(mRenderer, bitmap.mNativeBitmap, bitmap.mBuffer, meshWidth, meshHeight,
verts, vertOffset, colors, colorOffset, nativePaint);
} finally {
if (modifiers != MODIFIER_NONE) nResetModifiers(mRenderer, modifiers);
}
}
- private static native void nDrawBitmapMesh(int renderer, int bitmap,
+ private static native void nDrawBitmapMesh(int renderer, int bitmap, byte[] buffer,
int meshWidth, int meshHeight, float[] verts, int vertOffset,
int[] colors, int colorOffset, int paint);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 6788fee..93c6d6e 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -422,8 +422,6 @@
synchronized (this) {
if (mView == null) {
mView = view;
- Slog.d(TAG, "setView: b9404689 setting mView to " + view + " mAdded=" + mAdded
- + " Callers=" + Debug.getCallers(4));
mViewLayoutDirectionInitial = mView.getRawLayoutDirection();
mFallbackEventHandler.setView(view);
mWindowAttributes.copyFrom(attrs);
@@ -480,8 +478,6 @@
= panelParentView.getApplicationWindowToken();
}
mAdded = true;
- Slog.d(TAG, "setView: b9404689 setting mAdded=true mView=" + mView
- + " Callers=" + Debug.getCallers(4));
int res; /* = WindowManagerImpl.ADD_OKAY; */
// Schedule the first layout -before- adding to the window
@@ -507,8 +503,6 @@
mFallbackEventHandler.setView(null);
unscheduleTraversals();
setAccessibilityFocus(null, null);
- Slog.d(TAG, "setView: b9404689 threw exception e=" + e
- + " Callers=" + Debug.getCallers(4));
throw new RuntimeException("Adding window failed", e);
} finally {
if (restore) {
@@ -5164,14 +5158,11 @@
return;
}
mRemoved = true;
- Slog.d(TAG, "doDie: b9404689 mAdded=" + mAdded + " mView=" + mView
- + " Callers=" + Debug.getCallers(4));
if (mAdded) {
dispatchDetachedFromWindow();
}
if (mAdded && !mFirst) {
- Slog.d(TAG, "doDie: b9404689 mAdded && !mFirst");
invalidateDisplayLists();
destroyHardwareRenderer();
@@ -5195,8 +5186,6 @@
}
}
- Slog.d(TAG, "doDie: b9404689 setting mAdded=false mView=" + mView
- + " Callers=" + Debug.getCallers(4));
mAdded = false;
}
WindowManagerGlobal.getInstance().doRemoveView(this);
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java
index 6666545..b183bb6 100644
--- a/core/java/android/view/WindowManagerGlobal.java
+++ b/core/java/android/view/WindowManagerGlobal.java
@@ -227,7 +227,6 @@
if (index >= 0) {
if (mDyingViews.contains(view)) {
// Don't wait for MSG_DIE to make it's way through root's queue.
- Slog.d(TAG, "addView: b9404689 mDying contains view=" + view);
mRoots.get(index).doDie();
} else {
throw new IllegalStateException("View " + view
@@ -252,7 +251,6 @@
view.setLayoutParams(wparams);
- Slog.d(TAG, "addView: b9404689 adding view=" + view + " root=" + root);
mViews.add(view);
mRoots.add(root);
mParams.add(wparams);
@@ -351,8 +349,6 @@
if (view != null) {
view.assignParent(null);
if (deferred) {
- Slog.d(TAG, "removeViewLocked: b9404689 mDyingViews adding view=" + view
- + " root=" + root + " Callers=" + Debug.getCallers(4));
mDyingViews.add(view);
}
}
@@ -362,15 +358,10 @@
synchronized (mLock) {
final int index = mRoots.indexOf(root);
if (index >= 0) {
- Slog.d(TAG, "doRemoveView: b9404689 removing view=" + mViews.get(index)
- + " Callers=" + Debug.getCallers(4));
mRoots.remove(index);
mParams.remove(index);
final View view = mViews.remove(index);
mDyingViews.remove(view);
- } else {
- Slog.d(TAG, "doRemoveView: b9404689 couldn't find root=" + root
- + " Callers=" + Debug.getCallers(4));
}
}
}
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index d452f58..594b130 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -1037,7 +1037,12 @@
final int sectionCount = mSections.length;
final int positionsInSection;
if (section < sectionCount - 1) {
- final int nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
+ final int nextSectionPos;
+ if (section + 1 < sectionCount) {
+ nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
+ } else {
+ nextSectionPos = totalItemCount - 1;
+ }
positionsInSection = nextSectionPos - sectionPos;
} else {
positionsInSection = totalItemCount - sectionPos;
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 5392a96..65a2d4d 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -959,11 +959,9 @@
if (!mInDrawing) {
if (verifyDrawable(dr)) {
final Rect dirty = dr.getBounds();
- final int scrollX = mScrollX + mPaddingLeft;
- final int scrollY = mScrollY + mPaddingTop;
- invalidate(dirty.left + scrollX, dirty.top + scrollY,
- dirty.right + scrollX, dirty.bottom + scrollY);
+ invalidate(dirty.left + mScrollX, dirty.top + mScrollY,
+ dirty.right + mScrollX, dirty.bottom + mScrollY);
} else {
super.invalidateDrawable(dr);
}
diff --git a/core/java/android/widget/SectionIndexer.java b/core/java/android/widget/SectionIndexer.java
index 24f894c..a1c71f4 100644
--- a/core/java/android/widget/SectionIndexer.java
+++ b/core/java/android/widget/SectionIndexer.java
@@ -20,7 +20,9 @@
* Interface that should be implemented on Adapters to enable fast scrolling
* in an {@link AbsListView} between sections of the list. A section is a group of list items
* to jump to that have something in common. For example, they may begin with the
- * same letter or they may be songs from the same artist.
+ * same letter or they may be songs from the same artist. ExpandableListAdapters that
+ * consider groups and sections as synonymous should account for collapsed groups and return
+ * an appropriate section/position.
*/
public interface SectionIndexer {
/**
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index 43a02cf..fe532b0 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -572,7 +572,7 @@
if (whichButtons == BIT_BUTTON_POSITIVE) {
centerButton(mButtonPositive);
} else if (whichButtons == BIT_BUTTON_NEGATIVE) {
- centerButton(mButtonNeutral);
+ centerButton(mButtonNegative);
} else if (whichButtons == BIT_BUTTON_NEUTRAL) {
centerButton(mButtonNeutral);
}
diff --git a/core/java/com/android/internal/inputmethod/InputMethodUtils.java b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
index 4e21324..78389c5 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodUtils.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
@@ -432,6 +432,17 @@
}
}
+ public static CharSequence getImeAndSubtypeDisplayName(Context context, InputMethodInfo imi,
+ InputMethodSubtype subtype) {
+ final CharSequence imiLabel = imi.loadLabel(context.getPackageManager());
+ return subtype != null
+ ? TextUtils.concat(subtype.getDisplayName(context,
+ imi.getPackageName(), imi.getServiceInfo().applicationInfo),
+ (TextUtils.isEmpty(imiLabel) ?
+ "" : " - " + imiLabel))
+ : imiLabel;
+ }
+
/**
* Utility class for putting and getting settings for InputMethod
* TODO: Move all putters and getters of settings to this class.
diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp
index 6374494..ae0113b 100644
--- a/core/jni/android_hardware_SensorManager.cpp
+++ b/core/jni/android_hardware_SensorManager.cpp
@@ -142,7 +142,13 @@
while ((n = q->read(buffer, 16)) > 0) {
for (int i=0 ; i<n ; i++) {
- env->SetFloatArrayRegion(mScratch, 0, 16, buffer[i].data);
+ if (buffer[i].type == SENSOR_TYPE_STEP_COUNTER) {
+ // step-counter returns a uint64, but the java API only deals with floats
+ float value = float(buffer[i].u64.step_counter);
+ env->SetFloatArrayRegion(mScratch, 0, 1, &value);
+ } else {
+ env->SetFloatArrayRegion(mScratch, 0, 16, buffer[i].data);
+ }
env->CallVoidMethod(mReceiverObject,
gBaseEventQueueClassInfo.dispatchSensorEvent,
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 87ebbd2..70a4daa 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -377,20 +377,31 @@
// ----------------------------------------------------------------------------
static void android_view_GLES20Canvas_drawBitmap(JNIEnv* env, jobject clazz,
- OpenGLRenderer* renderer, SkBitmap* bitmap, jfloat left, jfloat top, SkPaint* paint) {
+ OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer,
+ jfloat left, jfloat top, SkPaint* paint) {
+ // This object allows the renderer to allocate a global JNI ref to the buffer object.
+ JavaHeapBitmapRef bitmapRef(env, bitmap, buffer);
+
renderer->drawBitmap(bitmap, left, top, paint);
}
static void android_view_GLES20Canvas_drawBitmapRect(JNIEnv* env, jobject clazz,
- OpenGLRenderer* renderer, SkBitmap* bitmap,
+ OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer,
float srcLeft, float srcTop, float srcRight, float srcBottom,
float dstLeft, float dstTop, float dstRight, float dstBottom, SkPaint* paint) {
+ // This object allows the renderer to allocate a global JNI ref to the buffer object.
+ JavaHeapBitmapRef bitmapRef(env, bitmap, buffer);
+
renderer->drawBitmap(bitmap, srcLeft, srcTop, srcRight, srcBottom,
dstLeft, dstTop, dstRight, dstBottom, paint);
}
static void android_view_GLES20Canvas_drawBitmapMatrix(JNIEnv* env, jobject clazz,
- OpenGLRenderer* renderer, SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint) {
+ OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer,
+ SkMatrix* matrix, SkPaint* paint) {
+ // This object allows the renderer to allocate a global JNI ref to the buffer object.
+ JavaHeapBitmapRef bitmapRef(env, bitmap, buffer);
+
renderer->drawBitmap(bitmap, matrix, paint);
}
@@ -420,8 +431,12 @@
}
static void android_view_GLES20Canvas_drawBitmapMesh(JNIEnv* env, jobject clazz,
- OpenGLRenderer* renderer, SkBitmap* bitmap, jint meshWidth, jint meshHeight,
- jfloatArray vertices, jint offset, jintArray colors, jint colorOffset, SkPaint* paint) {
+ OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer,
+ jint meshWidth, jint meshHeight, jfloatArray vertices, jint offset, jintArray colors,
+ jint colorOffset, SkPaint* paint) {
+ // This object allows the renderer to allocate a global JNI ref to the buffer object.
+ JavaHeapBitmapRef bitmapRef(env, bitmap, buffer);
+
jfloat* verticesArray = vertices ? env->GetFloatArrayElements(vertices, NULL) + offset : NULL;
jint* colorsArray = colors ? env->GetIntArrayElements(colors, NULL) + colorOffset : NULL;
@@ -432,8 +447,11 @@
}
static void android_view_GLES20Canvas_drawPatch(JNIEnv* env, jobject clazz,
- OpenGLRenderer* renderer, SkBitmap* bitmap, Res_png_9patch* patch,
+ OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer, Res_png_9patch* patch,
float left, float top, float right, float bottom, SkPaint* paint) {
+ // This object allows the renderer to allocate a global JNI ref to the buffer object.
+ JavaHeapBitmapRef bitmapRef(env, bitmap, buffer);
+
renderer->drawPatch(bitmap, patch, left, top, right, bottom, paint);
}
@@ -1018,14 +1036,14 @@
{ "nGetMatrix", "(II)V", (void*) android_view_GLES20Canvas_getMatrix },
{ "nConcatMatrix", "(II)V", (void*) android_view_GLES20Canvas_concatMatrix },
- { "nDrawBitmap", "(IIFFI)V", (void*) android_view_GLES20Canvas_drawBitmap },
- { "nDrawBitmap", "(IIFFFFFFFFI)V", (void*) android_view_GLES20Canvas_drawBitmapRect },
- { "nDrawBitmap", "(IIII)V", (void*) android_view_GLES20Canvas_drawBitmapMatrix },
+ { "nDrawBitmap", "(II[BFFI)V", (void*) android_view_GLES20Canvas_drawBitmap },
+ { "nDrawBitmap", "(II[BFFFFFFFFI)V",(void*) android_view_GLES20Canvas_drawBitmapRect },
+ { "nDrawBitmap", "(II[BII)V", (void*) android_view_GLES20Canvas_drawBitmapMatrix },
{ "nDrawBitmap", "(I[IIIFFIIZI)V", (void*) android_view_GLES20Canvas_drawBitmapData },
- { "nDrawBitmapMesh", "(IIII[FI[III)V", (void*) android_view_GLES20Canvas_drawBitmapMesh },
+ { "nDrawBitmapMesh", "(II[BII[FI[III)V",(void*) android_view_GLES20Canvas_drawBitmapMesh },
- { "nDrawPatch", "(IIIFFFFI)V", (void*) android_view_GLES20Canvas_drawPatch },
+ { "nDrawPatch", "(II[BIFFFFI)V", (void*) android_view_GLES20Canvas_drawPatch },
{ "nDrawColor", "(III)V", (void*) android_view_GLES20Canvas_drawColor },
{ "nDrawRect", "(IFFFFI)V", (void*) android_view_GLES20Canvas_drawRect },
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 087be92..ee652c5 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -825,8 +825,8 @@
<string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="6481623830344107222">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah menggambar pola pembuka kunci. "\n\n"Coba lagi dalam <xliff:g id="NUMBER_1">%d</xliff:g> detik."</string>
<string name="lockscreen_too_many_failed_password_attempts_dialog_message" msgid="2725973286239344555">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah mengetik sandi. "\n\n"Coba lagi dalam <xliff:g id="NUMBER_1">%d</xliff:g> detik."</string>
<string name="lockscreen_too_many_failed_pin_attempts_dialog_message" msgid="6216672706545696955">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah mengetik PIN. "\n\n"Coba lagi dalam <xliff:g id="NUMBER_1">%d</xliff:g> detik."</string>
- <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="9191611984625460820">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci tablet menggunakan info masuk Google."\n\n"Coba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> detik."</string>
- <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="2590227559763762751">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci ponsel menggunakan info masuk Google."\n\n"Coba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> detik."</string>
+ <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="9191611984625460820">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci tablet menggunakan proses masuk Google."\n\n"Coba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> detik."</string>
+ <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="2590227559763762751">"Anda telah <xliff:g id="NUMBER_0">%d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci ponsel menggunakan proses masuk Google."\n\n"Coba lagi dalam <xliff:g id="NUMBER_2">%d</xliff:g> detik."</string>
<string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="6128106399745755604">"Anda telah gagal mencoba membuka gembok tablet sebanyak <xliff:g id="NUMBER_0">%d</xliff:g> kali. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> upaya gagal lagi, tablet akan disetel ulang ke setelan default pabrik dan semua data pengguna hilang."</string>
<string name="lockscreen_failed_attempts_almost_at_wipe" product="default" msgid="8603565142156826565">"Anda telah gagal mencoba membuka gembok ponsel sebanyak <xliff:g id="NUMBER_0">%d</xliff:g> kali. Setelah <xliff:g id="NUMBER_1">%d</xliff:g> upaya gagal lagi, ponsel akan disetel ulang ke setelan default pabrik dan semua data pengguna hilang."</string>
<string name="lockscreen_failed_attempts_now_wiping" product="tablet" msgid="280873516493934365">"Anda telah gagal mencoba membuka gembok tablet sebanyak <xliff:g id="NUMBER">%d</xliff:g> kali. Kini tablet akan disetel ulang ke setelan default pabrik."</string>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc202/config.xml
similarity index 92%
rename from core/res/res/values-mcc310/config.xml
rename to core/res/res/values-mcc202/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc202/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc204/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc204/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc204/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc206/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc206/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc206/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc208/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc208/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc208/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc214/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc214/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc214/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc216/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc216/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc216/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc219/config.xml b/core/res/res/values-mcc219/config.xml
index 7ae82fa..80f4e58 100644
--- a/core/res/res/values-mcc219/config.xml
+++ b/core/res/res/values-mcc219/config.xml
@@ -29,4 +29,7 @@
<item>"96"</item>
</string-array>
+ <!-- Whether safe headphone volume is enabled or not (country specific). -->
+ <bool name="config_safe_media_volume_enabled">true</bool>
+
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc222/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc222/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc222/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc226/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc226/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc226/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc228/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc228/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc228/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc230/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc230/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc230/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc231/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc231/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc231/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc232/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc232/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc232/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc234/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc234/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc234/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc238/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc238/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc238/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc240/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc240/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc240/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc242/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc242/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc242/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc244/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc244/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc244/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc246/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc246/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc246/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc247/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc247/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc247/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc248/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc248/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc248/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc260/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc260/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc260/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc262/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc262/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc262/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc268/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc268/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc268/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc270/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc270/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc270/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc272/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc272/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc272/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc274/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc274/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc274/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc278/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc278/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc278/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc280/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc280/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc280/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc284/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc284/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc284/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc286/config.xml b/core/res/res/values-mcc286/config.xml
index d99d051..f73a523 100644
--- a/core/res/res/values-mcc286/config.xml
+++ b/core/res/res/values-mcc286/config.xml
@@ -61,4 +61,7 @@
to enable use of the new Release 9 tables for Indic languages. -->
<!-- <integer-array name="config_sms_enabled_locking_shift_tables"></integer-array> -->
+ <!-- Whether safe headphone volume is enabled or not (country specific). -->
+ <bool name="config_safe_media_volume_enabled">true</bool>
+
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc293/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc293/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc293/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc310/config.xml b/core/res/res/values-mcc294/config.xml
similarity index 92%
copy from core/res/res/values-mcc310/config.xml
copy to core/res/res/values-mcc294/config.xml
index df398f9..8d6d3b1 100644
--- a/core/res/res/values-mcc310/config.xml
+++ b/core/res/res/values-mcc294/config.xml
@@ -20,6 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
+ <bool name="config_safe_media_volume_enabled">true</bool>
</resources>
diff --git a/core/res/res/values-mcc311/config.xml b/core/res/res/values-mcc311/config.xml
deleted file mode 100644
index df398f9..0000000
--- a/core/res/res/values-mcc311/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** 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.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc312/config.xml b/core/res/res/values-mcc312/config.xml
deleted file mode 100644
index df398f9..0000000
--- a/core/res/res/values-mcc312/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** 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.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc313/config.xml b/core/res/res/values-mcc313/config.xml
deleted file mode 100644
index df398f9..0000000
--- a/core/res/res/values-mcc313/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** 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.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc314/config.xml b/core/res/res/values-mcc314/config.xml
deleted file mode 100644
index df398f9..0000000
--- a/core/res/res/values-mcc314/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** 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.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc315/config.xml b/core/res/res/values-mcc315/config.xml
deleted file mode 100644
index df398f9..0000000
--- a/core/res/res/values-mcc315/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** 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.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc316/config.xml b/core/res/res/values-mcc316/config.xml
deleted file mode 100644
index df398f9..0000000
--- a/core/res/res/values-mcc316/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** 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.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">false</bool>
-
-</resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 5d75047..b998377 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -875,7 +875,7 @@
<string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
<string name="granularity_label_character" msgid="7336470535385009523">"tegn"</string>
<string name="granularity_label_word" msgid="7075570328374918660">"ord"</string>
- <string name="granularity_label_link" msgid="5815508880782488267">"kobling"</string>
+ <string name="granularity_label_link" msgid="5815508880782488267">"link"</string>
<string name="granularity_label_line" msgid="5764267235026120888">"linje"</string>
<string name="hour_ampm" msgid="4584338083529355982">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="2083465992940444366">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 7076922..da6dfd3 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1072,7 +1072,7 @@
<bool name="config_useDevInputEventForAudioJack">false</bool>
<!-- Whether safe headphone volume is enabled or not (country specific). -->
- <bool name="config_safe_media_volume_enabled">true</bool>
+ <bool name="config_safe_media_volume_enabled">false</bool>
<!-- Set to true if the wifi display supports compositing content stored
in gralloc protected buffers. For this to be true, there must exist
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index 43eead9..880d7e9 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -57,7 +57,7 @@
</div>
-<p style="clear:both"><em>Data collected during a 14-day period ending on June 3, 2013.
+<p style="clear:both"><em>Data collected during a 14-day period ending on July 8, 2013.
<br/>Any versions with less than 0.1% distribution are not shown.</em>
</p>
@@ -83,7 +83,7 @@
</div>
-<p style="clear:both"><em>Data collected during a 14-day period ending on June 3, 2013
+<p style="clear:both"><em>Data collected during a 14-day period ending on July 8, 2013
<br/>Any screen configurations with less than 0.1% distribution are not shown.</em></p>
@@ -130,7 +130,7 @@
-<p style="clear:both"><em>Data collected during a 14-day period ending on June 3, 2013</em></p>
+<p style="clear:both"><em>Data collected during a 14-day period ending on July 8, 2013</em></p>
@@ -148,7 +148,7 @@
var VERSION_DATA =
[
{
- "chart": "//chart.googleapis.com/chart?chl=Eclair%7CFroyo%7CGingerbread%7CHoneycomb%7CIce%20Cream%20Sandwich%7CJelly%20Bean&chd=t%3A1.6%2C3.2%2C36.5%2C0.1%2C25.6%2C33.0&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c&cht=p&chs=500x250",
+ "chart": "//chart.googleapis.com/chart?chl=Eclair%7CFroyo%7CGingerbread%7CHoneycomb%7CIce%20Cream%20Sandwich%7CJelly%20Bean&chco=c4df9b%2C6fad0c&chd=t%3A1.5%2C3.1%2C34.1%2C0.1%2C23.3%2C37.9&chf=bg%2Cs%2C00000000&chs=500x250&cht=p",
"data": [
{
"api": 4,
@@ -158,22 +158,17 @@
{
"api": 7,
"name": "Eclair",
- "perc": "1.5"
+ "perc": "1.4"
},
{
"api": 8,
"name": "Froyo",
- "perc": "3.2"
- },
- {
- "api": 9,
- "name": "Gingerbread",
- "perc": "0.1"
+ "perc": "3.1"
},
{
"api": 10,
"name": "Gingerbread",
- "perc": "36.4"
+ "perc": "34.1"
},
{
"api": 13,
@@ -183,17 +178,17 @@
{
"api": 15,
"name": "Ice Cream Sandwich",
- "perc": "25.6"
+ "perc": "23.3"
},
{
"api": 16,
"name": "Jelly Bean",
- "perc": "29.0"
+ "perc": "32.3"
},
{
"api": 17,
"name": "Jelly Bean",
- "perc": "4.0"
+ "perc": "5.6"
}
]
}
@@ -210,16 +205,16 @@
"Large": {
"hdpi": "0.4",
"ldpi": "0.6",
- "mdpi": "3.0",
+ "mdpi": "3.2",
"tvdpi": "1.0",
- "xhdpi": "0.6"
+ "xhdpi": "0.5"
},
"Normal": {
- "hdpi": "36.0",
+ "hdpi": "34.9",
"ldpi": "0.1",
"mdpi": "16.0",
- "xhdpi": "24.5",
- "xxhdpi": "3.3"
+ "xhdpi": "24.0",
+ "xxhdpi": "4.9"
},
"Small": {
"hdpi": "0.1",
@@ -227,12 +222,12 @@
},
"Xlarge": {
"hdpi": "0.2",
- "mdpi": "4.2",
+ "mdpi": "4.1",
"xhdpi": "0.1"
}
},
- "densitychart": "//chart.googleapis.com/chart?chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chd=t%3A10.6%2C23.2%2C1.0%2C36.7%2C25.2%2C3.3&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c&cht=p&chs=400x250",
- "layoutchart": "//chart.googleapis.com/chart?chl=Xlarge%7CLarge%7CNormal%7CSmall&chd=t%3A4.5%2C5.6%2C79.9%2C10.0&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c&cht=p&chs=400x250"
+ "densitychart": "//chart.googleapis.com/chart?chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chco=c4df9b%2C6fad0c&chd=t%3A10.7%2C23.3%2C1.0%2C35.6%2C24.6%2C4.9&chf=bg%2Cs%2C00000000&chs=400x250&cht=p",
+ "layoutchart": "//chart.googleapis.com/chart?chl=Xlarge%7CLarge%7CNormal%7CSmall&chco=c4df9b%2C6fad0c&chd=t%3A4.4%2C5.7%2C79.9%2C10.1&chf=bg%2Cs%2C00000000&chs=400x250&cht=p"
}
];
diff --git a/docs/html/distribute/googleplay/quality/tablet.jd b/docs/html/distribute/googleplay/quality/tablet.jd
index 03c180b..5a707be 100644
--- a/docs/html/distribute/googleplay/quality/tablet.jd
+++ b/docs/html/distribute/googleplay/quality/tablet.jd
@@ -25,9 +25,7 @@
</ol>
</div></div>
-<p>Before you publish an app on Google Play, it's important to make sure that
-the app meets the basic expectations of tablet users through compelling features
-and an intuitive, well-designed UI. </p>
+<p>Before you publish an app on Google Play, it's important to make sure that the app meets the basic expectations of tablet users through compelling features and an intuitive, well-designed UI. </p>
<p>Tablets are a growing part of the Android installed base that offers new
opportunities for <a
@@ -258,32 +256,34 @@
<h2 id="use-tablet-icons">4. Use Icons and other assets that are designed
for tablet screens</h2>
-<p>So that your app looks its best, make sure to use icons and other bitmap
-assets that are created specifically for the densities used by tablet screens.
-Specifically, you should create sets of alternative bitmap drawables for each
-density in the range commonly supported by tablets.</p>
+<p>To ensure your app looks its best, provide icons and other bitmap
+assets for each density in the range commonly supported by tablets. Specifically, you should
+design your icons for the action bar, notifications, and launcher according to the
+<a href="{@docRoot}design/style/iconography.html">Iconography</a> guidelines and
+provide them in multiple densities, so they appear at the appropriate size on all screens
+without blurring or other scaling artifacts.</p>
<p class="table-caption"><strong>Table 1</strong>. Raw asset sizes for icon types.<table>
<tr>
-<th>Density </th>
-<th colspa>Launcher</th>
+<th>Density</th>
+<th>Launcher</th>
<th>Action Bar</th>
<th>Small/Contextual</th>
<th>Notification</th>
</tr>
<tr>
<td><code>mdpi</code></td>
-<td>48x48px</td>
-<td>32x32px</td>
-<td>16x16px</td>
-<td>24x24px</td>
+<td>48x48 px</td>
+<td>32x32 px</td>
+<td>16x16 px</td>
+<td>24x24 px</td>
</tr>
<tr>
<td><code>hdpi</code></td>
-<td>72x72px</td>
-<td>48x48px</td>
-<td>24x24px</td>
-<td>36x36px</td>
+<td>72x72 px</td>
+<td>48x48 px</td>
+<td>24x24 px</td>
+<td>36x36 px</td>
</tr>
<tr>
<td><code>tvdpi</code></td>
@@ -294,34 +294,42 @@
</tr>
<tr>
<td><code>xhdpi</code></td>
-<td>96x96px</td>
-<td>64x64px</td>
-<td>32x32px</td>
-<td>48x48px</td>
+<td>96x96 px</td>
+<td>64x64 px</td>
+<td>32x32 px</td>
+<td>48x48 px</td>
+</tr>
+<tr>
+<td><code>xxhdpi</code></td>
+<td>144x144 px</td>
+<td>96x96 px</td>
+<td>48x48 px</td>
+<td>74x74 px</td>
</tr>
</table>
-<p>Other points to consider: </p>
+<p>Your app should supply a version of each icon and bitmap asset that's optimized
+for <strong>at least one</strong> the following common tablet screen densities:</p>
<ul>
-<li>Icons in the action bar, notifications, and launcher should be designed
-according to the icon design guidelines and have the same physical size on
-tablets as on phones.</li>
-<li>Use density-specific <a
-href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">
-resource qualifiers</a> to ensure that the proper set of alternative resources
-gets loaded.</li>
+ <li><code>hdpi</code></li>
+ <li><code>xhdpi</code></li>
+ <li><code>xxhdpi</code></li>
</ul>
-<p style="margin-bottom:.5em;">At a minimum, your app should supply sets of
- custom drawables and assets for common tablet screen densities,
- tagged with these qualifiers as appropriate:</p>
+<p>Other tips:</p>
<ul>
- <li><code>hdpi</code>, OR</li>
- <li><code>xhdpi</code>, OR</li>
- <li><code>xxhdpi</code></li>
+<li>When possible, use vector shapes for your icon designs so you can scale them
+without loss of detail and edge crispness.</li>
+<li>Use density-specific <a
+href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">
+resource qualifiers</a> to ensure that the proper icons are loaded for each screen density.</li>
+<li>Tablets and other large screen devices often request a launcher icon that is one density
+size larger than the device's actual density, so you should provide your launcher
+icon at the highest density possible. For example, if a tablet has an {@code xhdpi} screen,
+it will request the {@code xxhdpi} version of the launcher icon.</li>
</ul>
<div class="rel-resources">
@@ -331,8 +339,8 @@
<ul>
<li>
- <a href="{@docRoot}design/style/iconography.html">Iconography</a>— Android
- Design document that shows how to use various types of icons.
+ <a href="{@docRoot}design/style/iconography.html">Iconography</a>—
+ Design guidelines and tips about how to create various types of icons.
</li>
<li>
diff --git a/docs/html/guide/topics/graphics/hardware-accel.jd b/docs/html/guide/topics/graphics/hardware-accel.jd
index 8ba6676..54ef20c 100644
--- a/docs/html/guide/topics/graphics/hardware-accel.jd
+++ b/docs/html/guide/topics/graphics/hardware-accel.jd
@@ -164,7 +164,7 @@
draws views without hardware acceleration as well. The following sections describe the
software-based and hardware-accelerated drawing models.</p>
-<h3>Software-based drawing model</h3>
+<h3 id="software-model">Software-based drawing model</h3>
<p>In the software drawing model, views are drawn with the following two steps:</p>
<ol>
<li>Invalidate the hierarchy</li>
@@ -196,7 +196,7 @@
android.view.View#invalidate invalidate()} when their properties change, such as the background
color or the text in a {@link android.widget.TextView}.</p>
- <h3>Hardware accelerated drawing model</h3>
+ <h3 id="hardware-model">Hardware accelerated drawing model</h3>
<p>The Android system still uses {@link android.view.View#invalidate invalidate()} and {@link
android.view.View#draw draw()} to request screen updates and to render views, but handles the
actual drawing differently. Instead of executing the drawing commands immediately, the Android
diff --git a/docs/html/sdk/installing/studio-tips.jd b/docs/html/sdk/installing/studio-tips.jd
index a686efd..12d2527 100644
--- a/docs/html/sdk/installing/studio-tips.jd
+++ b/docs/html/sdk/installing/studio-tips.jd
@@ -10,6 +10,8 @@
>Eclipse Compatibility Mode</a></li>
<li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA" class="external-link"
>FAQ on Migrating</a></li>
+ <li><a href="http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html"
+ class="external-link">Adding a Backend to Your App In Android Studio</a></li>
</ul>
</div>
</div>
diff --git a/docs/html/tools/help/uiautomator/Configurator.jd b/docs/html/tools/help/uiautomator/Configurator.jd
new file mode 100644
index 0000000..c898772
--- /dev/null
+++ b/docs/html/tools/help/uiautomator/Configurator.jd
@@ -0,0 +1,960 @@
+page.title=Configurator
+parent.title=uiautomator
+parent.link=index.html
+
+@jd:body
+<style>
+ h4.jd-details-title {background-color: #DEE8F1;}
+</style>
+
+<div id="api-info-block">
+<div class="api-level" style="margin:-95px 0 0;">
+Since <a href="/guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 18</a>
+</div>
+</div>
+
+<p>Allows you to set key parameters for running uiautomator tests. The new
+settings take effect immediately and can be changed any time during a test run.
+To modify parameters using <code><a href="#">Configurator</a></code>, first
+obtain an instance by calling <code><a href="#getInstance()">getInstance()</a></code>.
+As a best practice, make sure you always save the original value of any
+parameter that you are modifying. After running your tests with the modified
+parameters, make sure to also restore the original parameter values, otherwise
+this will impact other tests cases.</p>
+
+
+<h2>Summary</h2>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
+
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ long</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getActionAcknowledgmentTimeout()">getActionAcknowledgmentTimeout</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the current timeout for waiting for an acknowledgment of generic
+ uiautomator actions, such as clicks, text setting, and menu presses.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+ static
+
+ <a href="#">Configurator</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getInstance()">getInstance</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Retrieves a singleton instance of Configurator.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ long</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getKeyInjectionDelay()">getKeyInjectionDelay</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the current delay between key presses when injecting text input.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ long</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getScrollAcknowledgmentTimeout()">getScrollAcknowledgmentTimeout</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the timeout for waiting for an acknowledgement of an
+ uiautomtor scroll swipe action.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ long</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getWaitForIdleTimeout()">getWaitForIdleTimeout</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the current timeout used for waiting for the user interface to go
+ into an idle state.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ long</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getWaitForSelectorTimeout()">getWaitForSelectorTimeout</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the current timeout for waiting for a widget to become visible in
+ the user interface so that it can be matched by a selector.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">Configurator</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setActionAcknowledgmentTimeout(long)">setActionAcknowledgmentTimeout</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Sets the timeout for waiting for an acknowledgment of generic uiautomator
+ actions, such as clicks, text setting, and menu presses.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">Configurator</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setKeyInjectionDelay(long)">setKeyInjectionDelay</a></span>(long delay)</nobr>
+
+ <div class="jd-descrdiv">Sets a delay between key presses when injecting text input.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">Configurator</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Sets the timeout for waiting for an acknowledgement of an
+ uiautomtor scroll swipe action.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">Configurator</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setWaitForIdleTimeout(long)">setWaitForIdleTimeout</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Sets the timeout for waiting for the user interface to go into an idle
+ state before starting a uiautomator action.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">Configurator</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Sets the timeout for waiting for a widget to become visible in the user
+ interface so that it can be matched by a selector.</div>
+
+ </td></tr>
+
+
+
+</table>
+
+
+
+
+
+
+
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="inhmethods" class="jd-sumtable"><tr><th>
+ <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
+ <div style="clear:left;">Inherited Methods</div></th></tr>
+
+
+<tr class="api" >
+<td colspan="12">
+ <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
+ ><img id="inherited-methods-java.lang.Object-trigger"
+ src="../../../../../assets/images/triangle-closed.png"
+ class="jd-expando-trigger-img" /></a>
+From class
+
+ java.lang.Object
+
+<div id="inherited-methods-java.lang.Object">
+ <div id="inherited-methods-java.lang.Object-list"
+ class="jd-inheritedlinks">
+ </div>
+ <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
+ <table class="jd-sumtable-expando">
+
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Object</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">clone</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">equals</span>(Object arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">finalize</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ Class<?></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getClass</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">hashCode</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notify</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notifyAll</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">toString</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0)</nobr>
+
+ </td></tr>
+
+
+</table>
+ </div>
+</div>
+</td></tr>
+
+
+</table>
+
+
+</div><!-- jd-descr (summary) -->
+
+<!-- Details -->
+
+
+
+
+
+
+
+
+<!-- XML Attributes -->
+
+
+<!-- Enum Values -->
+
+
+<!-- Constants -->
+
+
+<!-- Fields -->
+
+
+<!-- Public ctors -->
+
+
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+<!-- Protected ctors -->
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+<!-- Public methdos -->
+
+<h2>Public Methods</h2>
+
+
+
+<A NAME="getActionAcknowledgmentTimeout()"></A>
+
+<div class="jd-details api apilevel-18">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ long
+ </span>
+ <span class="sympad">getActionAcknowledgmentTimeout</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the current timeout for waiting for an acknowledgment of generic
+ uiautomator actions, such as clicks, text setting, and menu presses.
+
+ The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>,
+ corresponding to an action, that lets the framework determine if the
+ action was successful. Generally, this timeout should not be modified.
+ See <code><a href="UiObject.html">UiObject</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>current timeout in milliseconds</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+
+ </div>
+</div>
+
+
+<A NAME="getInstance()"></A>
+
+<div class="jd-details api apilevel-18">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+ static
+
+
+
+ <a href="#">Configurator</a>
+ </span>
+ <span class="sympad">getInstance</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Retrieves a singleton instance of Configurator.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>Configurator instance</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+
+ </div>
+</div>
+
+
+<A NAME="getKeyInjectionDelay()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ long
+ </span>
+ <span class="sympad">getKeyInjectionDelay</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the current delay between key presses when injecting text input.
+ See <code><a href="UiObject.html#setText(java.lang.String)">setText(String)</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>current delay in milliseconds</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="getScrollAcknowledgmentTimeout()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ long
+ </span>
+ <span class="sympad">getScrollAcknowledgmentTimeout</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the timeout for waiting for an acknowledgement of an
+ uiautomtor scroll swipe action.
+
+ The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>,
+ corresponding to the scroll action, that lets the framework determine if
+ the scroll action was successful. Generally, this timeout should not be modified.
+ See <code><a href="UiScrollable.html">UiScrollable</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>current timeout in milliseconds</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="getWaitForIdleTimeout()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ long
+ </span>
+ <span class="sympad">getWaitForIdleTimeout</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the current timeout used for waiting for the user interface to go
+ into an idle state.
+
+ By default, all core uiautomator objects except <code><a href="UiDevice.html">UiDevice</a></code> will perform
+ this wait before starting to search for the widget specified by the
+ object's <code><a href="UiSelector.html">UiSelector</a></code>. Once the idle state is detected or the
+ timeout elapses (whichever occurs first), the object will start to wait
+ for the selector to find a match.
+ See <code><a href="#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>Current timeout value in milliseconds</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="getWaitForSelectorTimeout()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ long
+ </span>
+ <span class="sympad">getWaitForSelectorTimeout</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the current timeout for waiting for a widget to become visible in
+ the user interface so that it can be matched by a selector.
+
+ Because user interface content is dynamic, sometimes a widget may not
+ be visible immediately and won't be detected by a selector. This timeout
+ allows the uiautomator framework to wait for a match to be found, up until
+ the timeout elapses.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>Current timeout value in milliseconds</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="setActionAcknowledgmentTimeout(long)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">Configurator</a>
+ </span>
+ <span class="sympad">setActionAcknowledgmentTimeout</span>
+ <span class="normal">(long timeout)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the timeout for waiting for an acknowledgment of generic uiautomator
+ actions, such as clicks, text setting, and menu presses.
+
+ The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>,
+ corresponding to an action, that lets the framework determine if the
+ action was successful. Generally, this timeout should not be modified.
+ See <code><a href="UiObject.html">UiObject</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>timeout</td>
+ <td>Timeout value in milliseconds</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>self</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="setKeyInjectionDelay(long)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">Configurator</a>
+ </span>
+ <span class="sympad">setKeyInjectionDelay</span>
+ <span class="normal">(long delay)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets a delay between key presses when injecting text input.
+ See <code><a href="UiObject.html#setText(java.lang.String)">setText(String)</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>delay</td>
+ <td>Delay value in milliseconds</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>self</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="setScrollAcknowledgmentTimeout(long)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">Configurator</a>
+ </span>
+ <span class="sympad">setScrollAcknowledgmentTimeout</span>
+ <span class="normal">(long timeout)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the timeout for waiting for an acknowledgement of an
+ uiautomtor scroll swipe action.
+
+ The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>,
+ corresponding to the scroll action, that lets the framework determine if
+ the scroll action was successful. Generally, this timeout should not be modified.
+ See <code><a href="UiScrollable.html">UiScrollable</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>timeout</td>
+ <td>Timeout value in milliseconds</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>self</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="setWaitForIdleTimeout(long)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">Configurator</a>
+ </span>
+ <span class="sympad">setWaitForIdleTimeout</span>
+ <span class="normal">(long timeout)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the timeout for waiting for the user interface to go into an idle
+ state before starting a uiautomator action.
+
+ By default, all core uiautomator objects except <code><a href="UiDevice.html">UiDevice</a></code> will perform
+ this wait before starting to search for the widget specified by the
+ object's <code><a href="UiSelector.html">UiSelector</a></code>. Once the idle state is detected or the
+ timeout elapses (whichever occurs first), the object will start to wait
+ for the selector to find a match.
+ See <code><a href="#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>timeout</td>
+ <td>Timeout value in milliseconds</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>self</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="setWaitForSelectorTimeout(long)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">Configurator</a>
+ </span>
+ <span class="sympad">setWaitForSelectorTimeout</span>
+ <span class="normal">(long timeout)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the timeout for waiting for a widget to become visible in the user
+ interface so that it can be matched by a selector.
+
+ Because user interface content is dynamic, sometimes a widget may not
+ be visible immediately and won't be detected by a selector. This timeout
+ allows the uiautomator framework to wait for a match to be found, up until
+ the timeout elapses.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>timeout</td>
+ <td>Timeout value in milliseconds.</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>self</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+
+
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+
+
+
+
diff --git a/docs/html/tools/help/uiautomator/IAutomationSupport.jd b/docs/html/tools/help/uiautomator/IAutomationSupport.jd
index 4120f2b..1e9e301 100644
--- a/docs/html/tools/help/uiautomator/IAutomationSupport.jd
+++ b/docs/html/tools/help/uiautomator/IAutomationSupport.jd
@@ -11,58 +11,8 @@
</p>
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
<h2>Summary</h2>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<!-- ========== METHOD SUMMARY =========== -->
<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
@@ -97,31 +47,6 @@
</div><!-- jd-descr (summary) -->
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- Fields -->
-
-
-<!-- Public ctors -->
-
-
-
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->
@@ -149,20 +74,9 @@
<span class="sympad">sendStatus</span>
<span class="normal">(int resultCode, Bundle status)</span>
</h4>
- <div class="api-level">
- <div>
-
</div>
-
-
- </div>
- <div class="jd-details-descr">
-
+<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Allows the running test cases to send out interim status</p></div>
-
- </div>
</div>
-
-
diff --git a/docs/html/tools/help/uiautomator/UiAutomatorTestCase.jd b/docs/html/tools/help/uiautomator/UiAutomatorTestCase.jd
index 48c63ba..0d8d1bc 100644
--- a/docs/html/tools/help/uiautomator/UiAutomatorTestCase.jd
+++ b/docs/html/tools/help/uiautomator/UiAutomatorTestCase.jd
@@ -14,27 +14,6 @@
</ul>
</p>
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<div class="jd-descr">
diff --git a/docs/html/tools/help/uiautomator/UiCollection.jd b/docs/html/tools/help/uiautomator/UiCollection.jd
index ed92ca7..3fc32b7 100644
--- a/docs/html/tools/help/uiautomator/UiCollection.jd
+++ b/docs/html/tools/help/uiautomator/UiCollection.jd
@@ -9,8 +9,6 @@
or targeting a sub elements by a child's text or description.
</p>
-<div class="jd-descr">
-
<h2>Summary</h2>
@@ -1267,5 +1265,4 @@
</div>
</div>
-</div>
diff --git a/docs/html/tools/help/uiautomator/UiDevice.jd b/docs/html/tools/help/uiautomator/UiDevice.jd
index 1c8805b..574245e 100644
--- a/docs/html/tools/help/uiautomator/UiDevice.jd
+++ b/docs/html/tools/help/uiautomator/UiDevice.jd
@@ -5,35 +5,9 @@
<style>
h4.jd-details-title {background-color: #DEE8F1;}
</style>
-
-<h2>Class Overview</h2>
-<p>UiDevice provides access to state information about the device.
- You can also use this class to simulate user actions on the device,
- such as pressing the d-pad or pressing the Home and Menu buttons.</p>
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
+<p>Provides access to state information about the device. You can
+also use this class to simulate user actions on the device, such as pressing
+the d-pad or pressing the Home and Menu buttons.</p>
<h2>Summary</h2>
@@ -68,866 +42,957 @@
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#clearLastTraversedText()">clearLastTraversedText</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#clearLastTraversedText()">clearLastTraversedText</a></span>()</nobr>
+
<div class="jd-descrdiv">Clears the text from the last UI traversal event.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#click(int, int)">click</a></span>(int x, int y)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#click(int, int)">click</a></span>(int x, int y)</nobr>
+
<div class="jd-descrdiv">Perform a click at arbitrary coordinates specified by the user</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#dumpWindowHierarchy(java.lang.String)">dumpWindowHierarchy</a></span>(String fileName)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#drag(int, int, int, int, int)">drag</a></span>(int startX, int startY, int endX, int endY, int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs a swipe from one coordinate to another coordinate.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#dumpWindowHierarchy(java.lang.String)">dumpWindowHierarchy</a></span>(String fileName)</nobr>
+
<div class="jd-descrdiv">Helper method used for debugging to dump the current window's layout hierarchy.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#freezeRotation()">freezeRotation</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#freezeRotation()">freezeRotation</a></span>()</nobr>
+
<div class="jd-descrdiv">Disables the sensors and freezes the device rotation at its
current rotation state.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- String
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getCurrentActivityName()">getCurrentActivityName</a></span>()
-
- <div class="jd-descrdiv">
- <em>
- This method is deprecated.
- The results returned should be considered unreliable</em></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getCurrentActivityName()">getCurrentActivityName</a></span>()</nobr>
+
+ <div class="jd-descrdiv"><em>
+ This method is deprecated.
+ The results returned should be considered unreliable</em></div>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- String
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getCurrentPackageName()">getCurrentPackageName</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getCurrentPackageName()">getCurrentPackageName</a></span>()</nobr>
+
<div class="jd-descrdiv">Retrieves the name of the last package to report accessibility events.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- int
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getDisplayHeight()">getDisplayHeight</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getDisplayHeight()">getDisplayHeight</a></span>()</nobr>
+
<div class="jd-descrdiv">Gets the height of the display, in pixels.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- int
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getDisplayRotation()">getDisplayRotation</a></span>()
-
- <div class="jd-descrdiv">Returns the current rotation of the display, as defined in Surface@return</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getDisplayRotation()">getDisplayRotation</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Returns the current rotation of the display, as defined in <code><a href="../../../../../reference/android/view/Surface.html">Surface</a></code></div>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- int
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Point</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getDisplayWidth()">getDisplayWidth</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getDisplaySizeDp()">getDisplaySizeDp</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Returns the display size in dp (device-independent pixel)
+
+ The returned display size is adjusted per screen rotation.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getDisplayWidth()">getDisplayWidth</a></span>()</nobr>
+
<div class="jd-descrdiv">Gets the width of the display, in pixels.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
static
-
- <a href="UiDevice.html">UiDevice</a>
+
+ <a href="#">UiDevice</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getInstance()">getInstance</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getInstance()">getInstance</a></span>()</nobr>
+
<div class="jd-descrdiv">Retrieves a singleton instance of UiDevice</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- String
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getLastTraversedText()">getLastTraversedText</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getLastTraversedText()">getLastTraversedText</a></span>()</nobr>
+
<div class="jd-descrdiv">Retrieves the text from the last UI traversal event received.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- String
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getProductName()">getProductName</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getProductName()">getProductName</a></span>()</nobr>
+
<div class="jd-descrdiv">Retrieves the product name of the device.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#hasAnyWatcherTriggered()">hasAnyWatcherTriggered</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#hasAnyWatcherTriggered()">hasAnyWatcherTriggered</a></span>()</nobr>
+
<div class="jd-descrdiv">Checks if any registered <code><a href="UiWatcher.html">UiWatcher</a></code> have triggered.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#hasWatcherTriggered(java.lang.String)">hasWatcherTriggered</a></span>(String watcherName)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#hasWatcherTriggered(java.lang.String)">hasWatcherTriggered</a></span>(String watcherName)</nobr>
+
<div class="jd-descrdiv">Checks if a specific registered <code><a href="UiWatcher.html">UiWatcher</a></code> has triggered.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isNaturalOrientation()">isNaturalOrientation</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isNaturalOrientation()">isNaturalOrientation</a></span>()</nobr>
+
<div class="jd-descrdiv">Check if the device is in its natural orientation.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isScreenOn()">isScreenOn</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isScreenOn()">isScreenOn</a></span>()</nobr>
+
<div class="jd-descrdiv">Checks the power manager if the screen is ON.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressBack()">pressBack</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#openNotification()">openNotification</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Opens the notification shade.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#openQuickSettings()">openQuickSettings</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Opens the Quick Settings shade.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressBack()">pressBack</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the BACK button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressDPadCenter()">pressDPadCenter</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressDPadCenter()">pressDPadCenter</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the CENTER button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressDPadDown()">pressDPadDown</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressDPadDown()">pressDPadDown</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the DOWN button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressDPadLeft()">pressDPadLeft</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressDPadLeft()">pressDPadLeft</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the LEFT button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressDPadRight()">pressDPadRight</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressDPadRight()">pressDPadRight</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the RIGHT button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressDPadUp()">pressDPadUp</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressDPadUp()">pressDPadUp</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the UP button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressDelete()">pressDelete</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressDelete()">pressDelete</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the DELETE key.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressEnter()">pressEnter</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressEnter()">pressEnter</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the ENTER key.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressHome()">pressHome</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressHome()">pressHome</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the HOME button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressKeyCode(int)">pressKeyCode</a></span>(int keyCode)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressKeyCode(int, int)">pressKeyCode</a></span>(int keyCode, int metaState)</nobr>
+
<div class="jd-descrdiv">Simulates a short press using a key code.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressKeyCode(int, int)">pressKeyCode</a></span>(int keyCode, int metaState)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressKeyCode(int)">pressKeyCode</a></span>(int keyCode)</nobr>
+
<div class="jd-descrdiv">Simulates a short press using a key code.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressMenu()">pressMenu</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressMenu()">pressMenu</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the MENU button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressRecentApps()">pressRecentApps</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressRecentApps()">pressRecentApps</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the Recent Apps button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#pressSearch()">pressSearch</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pressSearch()">pressSearch</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates a short press on the SEARCH button.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)">registerWatcher</a></span>(String name, <a href="UiWatcher.html">UiWatcher</a> watcher)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)">registerWatcher</a></span>(String name, <a href="UiWatcher.html">UiWatcher</a> watcher)</nobr>
+
<div class="jd-descrdiv">Registers a <code><a href="UiWatcher.html">UiWatcher</a></code> to run automatically when the testing framework is unable to
find a match using a <code><a href="UiSelector.html">UiSelector</a></code>.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#removeWatcher(java.lang.String)">removeWatcher</a></span>(String name)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#removeWatcher(java.lang.String)">removeWatcher</a></span>(String name)</nobr>
+
<div class="jd-descrdiv">Removes a previously registered <code><a href="UiWatcher.html">UiWatcher</a></code>.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#resetWatcherTriggers()">resetWatcherTriggers</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#resetWatcherTriggers()">resetWatcherTriggers</a></span>()</nobr>
+
<div class="jd-descrdiv">Resets a <code><a href="UiWatcher.html">UiWatcher</a></code> that has been triggered.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#runWatchers()">runWatchers</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#runWatchers()">runWatchers</a></span>()</nobr>
+
<div class="jd-descrdiv">This method forces all registered watchers to run.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setOrientationLeft()">setOrientationLeft</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setCompressedLayoutHeirarchy(boolean)">setCompressedLayoutHeirarchy</a></span>(boolean compressed)</nobr>
+
+ <div class="jd-descrdiv">Enables or disables layout hierarchy compression.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setOrientationLeft()">setOrientationLeft</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates orienting the device to the left and also freezes rotation
by disabling the sensors.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setOrientationNatural()">setOrientationNatural</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setOrientationNatural()">setOrientationNatural</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates orienting the device into its natural orientation and also freezes rotation
by disabling the sensors.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setOrientationRight()">setOrientationRight</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setOrientationRight()">setOrientationRight</a></span>()</nobr>
+
<div class="jd-descrdiv">Simulates orienting the device to the right and also freezes rotation
by disabling the sensors.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#sleep()">sleep</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#sleep()">sleep</a></span>()</nobr>
+
<div class="jd-descrdiv">This method simply presses the power button if the screen is ON else
it does nothing if the screen is already OFF.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#swipe(android.graphics.Point[], int)">swipe</a></span>(Point[] segments, int segmentSteps)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#swipe(android.graphics.Point[], int)">swipe</a></span>(Point[] segments, int segmentSteps)</nobr>
+
<div class="jd-descrdiv">Performs a swipe between points in the Point array.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#swipe(int, int, int, int, int)">swipe</a></span>(int startX, int startY, int endX, int endY, int steps)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#swipe(int, int, int, int, int)">swipe</a></span>(int startX, int startY, int endX, int endY, int steps)</nobr>
+
<div class="jd-descrdiv">Performs a swipe from one coordinate to another using the number of steps
to determine smoothness and speed.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#takeScreenshot(java.io.File, float, int)">takeScreenshot</a></span>(File storePath, float scale, int quality)
-
- <div class="jd-descrdiv">Take a screenshot of current window and store it as PNG
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#takeScreenshot(java.io.File)">takeScreenshot</a></span>(File storePath)</nobr>
- The screenshot is adjusted per screen rotation</div>
-
- </td></tr>
-
-
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
- </td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#takeScreenshot(java.io.File)">takeScreenshot</a></span>(File storePath)
-
<div class="jd-descrdiv">Take a screenshot of current window and store it as PNG
Default scale of 1.0f (original size) and 90% quality is used
The screenshot is adjusted per screen rotation</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#unfreezeRotation()">unfreezeRotation</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#takeScreenshot(java.io.File, float, int)">takeScreenshot</a></span>(File storePath, float scale, int quality)</nobr>
+
+ <div class="jd-descrdiv">Take a screenshot of current window and store it as PNG
+
+ The screenshot is adjusted per screen rotation</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#unfreezeRotation()">unfreezeRotation</a></span>()</nobr>
+
<div class="jd-descrdiv">Re-enables the sensors and un-freezes the device rotation allowing its contents
to rotate with the device physical rotation.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#waitForIdle(long)">waitForIdle</a></span>(long time)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#waitForIdle(long)">waitForIdle</a></span>(long timeout)</nobr>
+
<div class="jd-descrdiv">Waits for the current application to idle.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#waitForIdle()">waitForIdle</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#waitForIdle()">waitForIdle</a></span>()</nobr>
+
<div class="jd-descrdiv">Waits for the current application to idle.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#waitForWindowUpdate(java.lang.String, long)">waitForWindowUpdate</a></span>(String packageName, long timeout)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#waitForWindowUpdate(java.lang.String, long)">waitForWindowUpdate</a></span>(String packageName, long timeout)</nobr>
+
<div class="jd-descrdiv">Waits for a window content update event to occur.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- void
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#wakeUp()">wakeUp</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#wakeUp()">wakeUp</a></span>()</nobr>
+
<div class="jd-descrdiv">This method simulates pressing the power button if the screen is OFF else
it does nothing if the screen is already ON.</div>
-
+
</td></tr>
@@ -946,7 +1011,7 @@
<div style="clear:left;">Inherited Methods</div></th></tr>
-<tr class="api apilevel-" >
+<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
@@ -962,150 +1027,182 @@
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
-
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Object</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">equals</span>(Object arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">clone</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">equals</span>(Object arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">finalize</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- Class<?>
+
+
+ Class<?></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">getClass</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getClass</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- int
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">hashCode</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">hashCode</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notify</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notify</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notifyAll</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notifyAll</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- String
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">toString</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">toString</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0, int arg1)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0)</nobr>
+
</td></tr>
@@ -1157,31 +1254,29 @@
-<a id="clearLastTraversedText()"></a>
+<A NAME="clearLastTraversedText()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">clearLastTraversedText</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Clears the text from the last UI traversal event.
See <code><a href="#getLastTraversedText()">getLastTraversedText()</a></code>.</p></div>
@@ -1189,41 +1284,39 @@
</div>
-<a id="click(int, int)"></a>
+<A NAME="click(int, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">click</span>
<span class="normal">(int x, int y)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Perform a click at arbitrary coordinates specified by the user</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>x</th>
+ <th>x</td>
<td>coordinate</td>
</tr>
<tr>
- <th>y</th>
+ <th>y</td>
<td>coordinate</td>
</tr>
</table>
@@ -1237,31 +1330,88 @@
</div>
-<a id="dumpWindowHierarchy(java.lang.String)"></a>
+<A NAME="drag(int, int, int, int, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api apilevel-18">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">drag</span>
+ <span class="normal">(int startX, int startY, int endX, int endY, int steps)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a swipe from one coordinate to another coordinate. You can control
+ the smoothness and speed of the swipe by specifying the number of steps.
+ Each step execution is throttled to 5 milliseconds per step, so for a 100
+ steps, the swipe will take around 0.5 seconds to complete.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>startX</td>
+ <td>X-axis value for the starting coordinate</td>
+ </tr>
+ <tr>
+ <th>startY</td>
+ <td>Y-axis value for the starting coordinate</td>
+ </tr>
+ <tr>
+ <th>endX</td>
+ <td>X-axis value for the ending coordinate</td>
+ </tr>
+ <tr>
+ <th>endY</td>
+ <td>Y-axis value for the ending coordinate</td>
+ </tr>
+ <tr>
+ <th>steps</td>
+ <td>is the number of steps for the swipe action</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if swipe is performed, false if the operation fails
+ or the coordinates are invalid</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="dumpWindowHierarchy(java.lang.String)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
void
</span>
<span class="sympad">dumpWindowHierarchy</span>
<span class="normal">(String fileName)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Helper method used for debugging to dump the current window's layout hierarchy.
The file root location is /data/local/tmp</p></div>
@@ -1269,40 +1419,38 @@
</div>
-<a id="freezeRotation()"></a>
+<A NAME="freezeRotation()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">freezeRotation</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Disables the sensors and freezes the device rotation at its
current rotation state.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -1314,34 +1462,32 @@
</div>
-<a id="getCurrentActivityName()"></a>
+<A NAME="getCurrentActivityName()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
String
</span>
<span class="sympad">getCurrentActivityName</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
<p>
- <p class="caution">
- <strong>
- This method is deprecated.</strong><br/> The results returned should be considered unreliable
+ <p class="caution"><strong>
+ This method is deprecated.</strong><br/>
+ The results returned should be considered unreliable
</p>
<div class="jd-tagdata jd-tagdescr"><p>Retrieves the last activity to report accessibility events.</p></div>
<div class="jd-tagdata">
@@ -1353,31 +1499,29 @@
</div>
-<a id="getCurrentPackageName()"></a>
+<A NAME="getCurrentPackageName()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
String
</span>
<span class="sympad">getCurrentPackageName</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Retrieves the name of the last package to report accessibility events.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1388,31 +1532,29 @@
</div>
-<a id="getDisplayHeight()"></a>
+<A NAME="getDisplayHeight()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
int
</span>
<span class="sympad">getDisplayHeight</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Gets the height of the display, in pixels. The size is adjusted based
on the current orientation of the display.</p></div>
<div class="jd-tagdata">
@@ -1424,65 +1566,84 @@
</div>
-<a id="getDisplayRotation()"></a>
+<A NAME="getDisplayRotation()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
int
</span>
<span class="sympad">getDisplayRotation</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Returns the current rotation of the display, as defined in Surface@return</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Returns the current rotation of the display, as defined in <code><a href="../../../../../reference/android/view/Surface.html">Surface</a></code></p></div>
+
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
+
+
+<A NAME="getDisplaySizeDp()"></A>
+
+<div class="jd-details api apilevel-18">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ Point
+ </span>
+ <span class="sympad">getDisplaySizeDp</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Returns the display size in dp (device-independent pixel)
+
+ The returned display size is adjusted per screen rotation. Also this will return the actual
+ size of the screen, rather than adjusted per system decorations (like status bar).</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>a Point containing the display size in dp
+</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
</div>
</div>
-<a id="getDisplayWidth()"></a>
+<A NAME="getDisplayWidth()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
int
</span>
<span class="sympad">getDisplayWidth</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Gets the width of the display, in pixels. The width and height details
are reported based on the current orientation of the display.</p></div>
<div class="jd-tagdata">
@@ -1494,31 +1655,23 @@
</div>
-<a id="getInstance()"></a>
+<A NAME="getInstance()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
- static
-
-
-
- <a href="UiDevice.html">UiDevice</a>
+ public
+ static
+
+
+
+ <a href="#">UiDevice</a>
</span>
<span class="sympad">getInstance</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Retrieves a singleton instance of UiDevice</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1529,31 +1682,29 @@
</div>
-<a id="getLastTraversedText()"></a>
+<A NAME="getLastTraversedText()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
String
</span>
<span class="sympad">getLastTraversedText</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Retrieves the text from the last UI traversal event received.
You can use this method to read the contents in a WebView container
@@ -1573,31 +1724,23 @@
</div>
-<a id="getProductName()"></a>
+<A NAME="getProductName()"></A>
-<div class="jd-details api ">
+<div class="jd-details api apilevel-17">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
String
</span>
<span class="sympad">getProductName</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Retrieves the product name of the device.
This method provides information on what type of device the test is running on. This value is
@@ -1607,38 +1750,36 @@
<ul class="nolist"><li>product name of the device</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="hasAnyWatcherTriggered()"></a>
+<A NAME="hasAnyWatcherTriggered()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">hasAnyWatcherTriggered</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Checks if any registered <code><a href="UiWatcher.html">UiWatcher</a></code> have triggered.
See <code><a href="#registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)">registerWatcher(String, UiWatcher)</a></code>
@@ -1648,31 +1789,29 @@
</div>
-<a id="hasWatcherTriggered(java.lang.String)"></a>
+<A NAME="hasWatcherTriggered(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">hasWatcherTriggered</span>
<span class="normal">(String watcherName)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Checks if a specific registered <code><a href="UiWatcher.html">UiWatcher</a></code> has triggered.
See <code><a href="#registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)">registerWatcher(String, UiWatcher)</a></code>. If a UiWatcher runs and its
<code><a href="UiWatcher.html#checkForCondition()">checkForCondition()</a></code> call returned <code>true</code>, then
@@ -1687,31 +1826,23 @@
</div>
-<a id="isNaturalOrientation()"></a>
+<A NAME="isNaturalOrientation()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isNaturalOrientation</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Check if the device is in its natural orientation. This is determined by checking if the
orientation is at 0 or 180 degrees.</p></div>
<div class="jd-tagdata">
@@ -1719,38 +1850,36 @@
<ul class="nolist"><li>true if it is in natural orientation</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="isScreenOn()"></a>
+<A NAME="isScreenOn()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isScreenOn</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Checks the power manager if the screen is ON.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1758,11 +1887,11 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -1774,31 +1903,89 @@
</div>
-<a id="pressBack()"></a>
+<A NAME="openNotification()"></A>
-<div class="jd-details api ">
+<div class="jd-details api apilevel-18">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">openNotification</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Opens the notification shade.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if successful, else return false</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="openQuickSettings()"></A>
+
+<div class="jd-details api apilevel-18">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">openQuickSettings</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Opens the Quick Settings shade.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if successful, else return false</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="pressBack()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressBack</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the BACK button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1809,31 +1996,29 @@
</div>
-<a id="pressDPadCenter()"></a>
+<A NAME="pressDPadCenter()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressDPadCenter</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the CENTER button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1844,31 +2029,29 @@
</div>
-<a id="pressDPadDown()"></a>
+<A NAME="pressDPadDown()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressDPadDown</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the DOWN button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1879,31 +2062,29 @@
</div>
-<a id="pressDPadLeft()"></a>
+<A NAME="pressDPadLeft()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressDPadLeft</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the LEFT button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1914,31 +2095,29 @@
</div>
-<a id="pressDPadRight()"></a>
+<A NAME="pressDPadRight()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressDPadRight</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the RIGHT button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1949,31 +2128,29 @@
</div>
-<a id="pressDPadUp()"></a>
+<A NAME="pressDPadUp()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressDPadUp</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the UP button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1984,31 +2161,29 @@
</div>
-<a id="pressDelete()"></a>
+<A NAME="pressDelete()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressDelete</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the DELETE key.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2019,31 +2194,29 @@
</div>
-<a id="pressEnter()"></a>
+<A NAME="pressEnter()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressEnter</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the ENTER key.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2054,31 +2227,29 @@
</div>
-<a id="pressHome()"></a>
+<A NAME="pressHome()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressHome</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the HOME button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2089,80 +2260,41 @@
</div>
-<a id="pressKeyCode(int)"></a>
+<A NAME="pressKeyCode(int, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- boolean
- </span>
- <span class="sympad">pressKeyCode</span>
- <span class="normal">(int keyCode)</span>
- </h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Simulates a short press using a key code.
-
- See KeyEvent</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if successful, else return false</li></ul>
- </div>
-
- </div>
-</div>
+ public
-<a id="pressKeyCode(int, int)"></a>
-<div class="jd-details api ">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
+
boolean
</span>
<span class="sympad">pressKeyCode</span>
<span class="normal">(int keyCode, int metaState)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press using a key code.
- See KeyEvent.</p></div>
+ See <code><a href="../../../../../reference/android/view/KeyEvent.html">KeyEvent</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>keyCode</th>
+ <th>keyCode</td>
<td>the key code of the event.</td>
</tr>
<tr>
- <th>metaState</th>
+ <th>metaState</td>
<td>an integer in which each bit set to 1 represents a pressed meta key</td>
</tr>
</table>
@@ -2176,31 +2308,64 @@
</div>
-<a id="pressMenu()"></a>
+<A NAME="pressKeyCode(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">pressKeyCode</span>
+ <span class="normal">(int keyCode)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Simulates a short press using a key code.
+
+ See <code><a href="../../../../../reference/android/view/KeyEvent.html">KeyEvent</a></code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if successful, else return false</li></ul>
+ </div>
+
+ </div>
+</div>
+
+
+<A NAME="pressMenu()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressMenu</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the MENU button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2211,31 +2376,29 @@
</div>
-<a id="pressRecentApps()"></a>
+<A NAME="pressRecentApps()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressRecentApps</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the Recent Apps button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2243,11 +2406,11 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -2259,31 +2422,29 @@
</div>
-<a id="pressSearch()"></a>
+<A NAME="pressSearch()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">pressSearch</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates a short press on the SEARCH button.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2294,42 +2455,40 @@
</div>
-<a id="registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)"></a>
+<A NAME="registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">registerWatcher</span>
<span class="normal">(String name, <a href="UiWatcher.html">UiWatcher</a> watcher)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Registers a <code><a href="UiWatcher.html">UiWatcher</a></code> to run automatically when the testing framework is unable to
find a match using a <code><a href="UiSelector.html">UiSelector</a></code>. See <code><a href="#runWatchers()">runWatchers()</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>name</th>
+ <th>name</td>
<td>to register the UiWatcher</td>
</tr>
<tr>
- <th>watcher</th>
+ <th>watcher</td>
<td><code><a href="UiWatcher.html">UiWatcher</a></code></td>
</tr>
</table>
@@ -2339,31 +2498,29 @@
</div>
-<a id="removeWatcher(java.lang.String)"></a>
+<A NAME="removeWatcher(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">removeWatcher</span>
<span class="normal">(String name)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Removes a previously registered <code><a href="UiWatcher.html">UiWatcher</a></code>.
See <code><a href="#registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)">registerWatcher(String, UiWatcher)</a></code></p></div>
@@ -2371,50 +2528,39 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>name</th>
+ <th>name</td>
<td>used to register the UiWatcher</td>
</tr>
</table>
</div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th></td>
- <td>UiAutomationException</td>
- </tr>
- </table>
- </div>
</div>
</div>
-<a id="resetWatcherTriggers()"></a>
+<A NAME="resetWatcherTriggers()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">resetWatcherTriggers</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Resets a <code><a href="UiWatcher.html">UiWatcher</a></code> that has been triggered.
If a UiWatcher runs and its <code><a href="UiWatcher.html#checkForCondition()">checkForCondition()</a></code> call
returned <code>true</code>, then the UiWatcher is considered triggered.
@@ -2424,31 +2570,29 @@
</div>
-<a id="runWatchers()"></a>
+<A NAME="runWatchers()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">runWatchers</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>This method forces all registered watchers to run.
See <code><a href="#registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)">registerWatcher(String, UiWatcher)</a></code></p></div>
@@ -2456,31 +2600,63 @@
</div>
-<a id="setOrientationLeft()"></a>
+<A NAME="setCompressedLayoutHeirarchy(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api apilevel-18">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ void
+ </span>
+ <span class="sympad">setCompressedLayoutHeirarchy</span>
+ <span class="normal">(boolean compressed)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Enables or disables layout hierarchy compression.
+
+ If compression is enabled, the layout hierarchy derived from the Acessibility
+ framework will only contain nodes that are important for uiautomator
+ testing. Any unnecessary surrounding layout nodes that make viewing
+ and searching the hierarchy inefficient are removed.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>compressed</td>
+ <td>true to enable compression; else, false to disable</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="setOrientationLeft()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
void
</span>
<span class="sympad">setOrientationLeft</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates orienting the device to the left and also freezes rotation
by disabling the sensors.
@@ -2488,11 +2664,11 @@
see <code><a href="#unfreezeRotation()">unfreezeRotation()</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -2500,38 +2676,30 @@
</table>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="setOrientationNatural()"></a>
+<A NAME="setOrientationNatural()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">setOrientationNatural</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates orienting the device into its natural orientation and also freezes rotation
by disabling the sensors.
@@ -2539,11 +2707,11 @@
see <code><a href="#unfreezeRotation()">unfreezeRotation()</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -2551,38 +2719,30 @@
</table>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="setOrientationRight()"></a>
+<A NAME="setOrientationRight()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">setOrientationRight</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Simulates orienting the device to the right and also freezes rotation
by disabling the sensors.
@@ -2590,11 +2750,11 @@
see <code><a href="#unfreezeRotation()">unfreezeRotation()</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -2602,47 +2762,45 @@
</table>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="sleep()"></a>
+<A NAME="sleep()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">sleep</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>This method simply presses the power button if the screen is ON else
it does nothing if the screen is already OFF.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -2654,42 +2812,40 @@
</div>
-<a id="swipe(android.graphics.Point[], int)"></a>
+<A NAME="swipe(android.graphics.Point[], int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">swipe</span>
<span class="normal">(Point[] segments, int segmentSteps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Performs a swipe between points in the Point array. Each step execution is throttled
to 5ms per step. So for a 100 steps, the swipe will take about 1/2 second to complete</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>segments</th>
+ <th>segments</td>
<td>is Point array containing at least one Point object</td>
</tr>
<tr>
- <th>segmentSteps</th>
+ <th>segmentSteps</td>
<td>steps to inject between two Points</td>
</tr>
</table>
@@ -2703,31 +2859,29 @@
</div>
-<a id="swipe(int, int, int, int, int)"></a>
+<A NAME="swipe(int, int, int, int, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">swipe</span>
<span class="normal">(int startX, int startY, int endX, int endY, int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Performs a swipe from one coordinate to another using the number of steps
to determine smoothness and speed. Each step execution is throttled to 5ms
per step. So for a 100 steps, the swipe will take about 1/2 second to complete.</p></div>
@@ -2735,7 +2889,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
+ <th>steps</td>
<td>is the number of move steps sent to the system</td>
</tr>
</table>
@@ -2749,31 +2903,65 @@
</div>
-<a id="takeScreenshot(java.io.File, float, int)"></a>
+<A NAME="takeScreenshot(java.io.File)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">takeScreenshot</span>
+ <span class="normal">(File storePath)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Take a screenshot of current window and store it as PNG
+
+ Default scale of 1.0f (original size) and 90% quality is used
+ The screenshot is adjusted per screen rotation</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>storePath</td>
+ <td>where the PNG should be written to</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if screen shot is created successfully, false otherwise</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="takeScreenshot(java.io.File, float, int)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
boolean
</span>
<span class="sympad">takeScreenshot</span>
<span class="normal">(File storePath, float scale, int quality)</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Take a screenshot of current window and store it as PNG
The screenshot is adjusted per screen rotation</p></div>
@@ -2781,15 +2969,15 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>storePath</th>
+ <th>storePath</td>
<td>where the PNG should be written to</td>
</tr>
<tr>
- <th>scale</th>
+ <th>scale</td>
<td>scale the screenshot down if needed; 1.0f for original size</td>
</tr>
<tr>
- <th>quality</th>
+ <th>quality</td>
<td>quality of the PNG compression; range: 0-100</td>
</tr>
</table>
@@ -2799,94 +2987,42 @@
<ul class="nolist"><li>true if screen shot is created successfully, false otherwise</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="takeScreenshot(java.io.File)"></a>
+<A NAME="unfreezeRotation()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- boolean
- </span>
- <span class="sympad">takeScreenshot</span>
- <span class="normal">(File storePath)</span>
- </h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Take a screenshot of current window and store it as PNG
-
- Default scale of 1.0f (original size) and 90% quality is used
- The screenshot is adjusted per screen rotation</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>storePath</th>
- <td>where the PNG should be written to</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if screen shot is created successfully, false otherwise</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
- </div>
-</div>
+ public
-<a id="unfreezeRotation()"></a>
-<div class="jd-details api ">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
+
void
</span>
<span class="sympad">unfreezeRotation</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Re-enables the sensors and un-freezes the device rotation allowing its contents
to rotate with the device physical rotation. During a test execution, it is best to
keep the device frozen in a specific orientation until the test case execution has completed.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th>RemoteException</td>
<td></td>
@@ -2898,62 +3034,67 @@
</div>
-<a id="waitForIdle(long)"></a>
+<A NAME="waitForIdle(long)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">waitForIdle</span>
- <span class="normal">(long time)</span>
+ <span class="normal">(long timeout)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Waits for the current application to idle.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>timeout</td>
+ <td>in milliseconds</td>
+ </tr>
+ </table>
+ </div>
</div>
</div>
-<a id="waitForIdle()"></a>
+<A NAME="waitForIdle()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">waitForIdle</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Waits for the current application to idle.
Default wait timeout is 10 seconds</p></div>
@@ -2961,31 +3102,29 @@
</div>
-<a id="waitForWindowUpdate(java.lang.String, long)"></a>
+<A NAME="waitForWindowUpdate(java.lang.String, long)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">waitForWindowUpdate</span>
<span class="normal">(String packageName, long timeout)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Waits for a window content update event to occur.
If a package name for the window is specified, but the current window
@@ -2994,12 +3133,12 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>packageName</th>
+ <th>packageName</td>
<td>the specified window package name (can be <code>null</code>).
If <code>null</code>, a window update from any front-end window will end the wait</td>
</tr>
<tr>
- <th>timeout</th>
+ <th>timeout</td>
<td>the timeout for the wait</td>
</tr>
</table>
@@ -3014,31 +3153,29 @@
</div>
-<a id="wakeUp()"></a>
+<A NAME="wakeUp()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">wakeUp</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>This method simulates pressing the power button if the screen is OFF else
it does nothing if the screen is already ON.
@@ -3046,11 +3183,11 @@
to allow the device time to wake up and accept input.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th></td>
<td>RemoteException</td>
- </tr>
+ </tr>
<tr>
<th>RemoteException</td>
<td></td>
@@ -3059,7 +3196,6 @@
</div>
</div>
-</div>
@@ -3069,5 +3205,4 @@
-<!-- ========= END OF CLASS DATA ========= -->
diff --git a/docs/html/tools/help/uiautomator/UiObject.jd b/docs/html/tools/help/uiautomator/UiObject.jd
index a22df50..45007e0 100644
--- a/docs/html/tools/help/uiautomator/UiObject.jd
+++ b/docs/html/tools/help/uiautomator/UiObject.jd
@@ -5,31 +5,12 @@
<style>
h4.jd-details-title {background-color: #DEE8F1;}
</style>
-<p>A UiObject is a representation of a user interface (UI) element. It is not in any way directly bound to a
- UI element as an object reference. A UiObject holds information to help it
- locate a matching UI element at runtime based on the <code><a href="UiSelector.html">UiSelector</a></code> properties specified in
- its constructor. Since a UiObject is a representative for a UI element, it can
- be reused for different views with matching UI elements.
-</p>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
+<p>A <code><a href="#">UiObject</a></code> is a representation of a view. It is
+not in any way directly bound to a view as an object reference. A <code><a href="#">UiObject</a></code>
+contains information to help it locate a matching view at runtime based on the
+<code><a href="#UiSelector.html">UiSelector</a></code> properties specified in
+its constructor. Once you create an instance of a UiObject, it can be reused for
+different views that match the selector criteria.</p>
<h2>Summary</h2>
@@ -45,6 +26,63 @@
+<!-- =========== ENUM CONSTANT SUMMARY =========== -->
+<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol">int</td>
+ <td class="jd-linkcol"><a href="#FINGER_TOUCH_HALF_WIDTH">FINGER_TOUCH_HALF_WIDTH</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">int</td>
+ <td class="jd-linkcol"><a href="#SWIPE_MARGIN_LIMIT">SWIPE_MARGIN_LIMIT</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="#WAIT_FOR_EVENT_TMEOUT">WAIT_FOR_EVENT_TMEOUT</a></td>
+ <td class="jd-descrcol" width="100%"><em>
+ This constant is deprecated.
+ use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code>
+</em></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="#WAIT_FOR_SELECTOR_POLL">WAIT_FOR_SELECTOR_POLL</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="#WAIT_FOR_SELECTOR_TIMEOUT">WAIT_FOR_SELECTOR_TIMEOUT</a></td>
+ <td class="jd-descrcol" width="100%"><em>
+ This constant is deprecated.
+ use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code>
+</em></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="#WAIT_FOR_WINDOW_TMEOUT">WAIT_FOR_WINDOW_TMEOUT</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+
+</table>
+
+
@@ -60,22 +98,22 @@
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
-
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ </nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#UiObject(com.android.uiautomator.core.UiSelector)">UiObject</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
- <div class="jd-descrdiv">Constructs a UiObject to represent a specific UI element matched by the specified
- <code><a href="UiSelector.html">UiSelector</a></code> selector properties.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#UiObject(com.android.uiautomator.core.UiSelector)">UiObject</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
+
+ <div class="jd-descrdiv">Constructs a UiObject to represent a view that matches the specified
+ selector criteria.</div>
+
</td></tr>
@@ -92,642 +130,766 @@
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- void
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#clearTextField()">clearTextField</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#clearTextField()">clearTextField</a></span>()</nobr>
+
<div class="jd-descrdiv">Clears the existing text contents in an editable field.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#click()">click</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#click()">click</a></span>()</nobr>
+
<div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented
by this UiObject.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)</nobr>
+
<div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented
by this UiObject and waits for window transitions.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()
-
- <div class="jd-descrdiv">See <code><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow(long)</a></code>
- This method is intended to reliably wait for window transitions that would typically take
- longer than the usual default timeouts.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Waits for window transitions that would typically take longer than the
+ usual default timeouts.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#clickBottomRight()">clickBottomRight</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#clickBottomRight()">clickBottomRight</a></span>()</nobr>
+
<div class="jd-descrdiv">Clicks the bottom and right corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#clickTopLeft()">clickTopLeft</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#clickTopLeft()">clickTopLeft</a></span>()</nobr>
+
<div class="jd-descrdiv">Clicks the top and left corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#exists()">exists</a></span>()
-
- <div class="jd-descrdiv">Check if UI element exists.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#dragTo(com.android.uiautomator.core.UiObject, int)">dragTo</a></span>(<a href="#">UiObject</a> destObj, int steps)</nobr>
+
+ <div class="jd-descrdiv">Drags this object to a destination UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- Rect
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getBounds()">getBounds</a></span>()
-
- <div class="jd-descrdiv">Returns the UI element's <code>bounds</code> property.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#dragTo(int, int, int)">dragTo</a></span>(int destX, int destY, int steps)</nobr>
+
+ <div class="jd-descrdiv">Drags this object to arbitrary coordinates.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getChild(com.android.uiautomator.core.UiSelector)">getChild</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
- <div class="jd-descrdiv">Creates a new UiObject representing a child UI element of the element currently represented
- by this UiObject.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#exists()">exists</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if view exists.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- int
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Rect</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getChildCount()">getChildCount</a></span>()
-
- <div class="jd-descrdiv">Counts the child UI elements immediately under the UI element currently represented by
- this UiObject.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getBounds()">getBounds</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Returns the view's <code>bounds</code> property.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getContentDescription()">getContentDescription</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getChild(com.android.uiautomator.core.UiSelector)">getChild</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
+
+ <div class="jd-descrdiv">Creates a new UiObject for a child view that is under the present UiObject.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getChildCount()">getChildCount</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Counts the child views immediately under the present UiObject.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getClassName()">getClassName</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Retrieves the <code>className</code> property of the UI element.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getContentDescription()">getContentDescription</a></span>()</nobr>
+
<div class="jd-descrdiv">Reads the <code>content_desc</code> property of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getFromParent(com.android.uiautomator.core.UiSelector)">getFromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
- <div class="jd-descrdiv">Creates a new UiObject representing a child UI element from the parent element currently
- represented by this object.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getFromParent(com.android.uiautomator.core.UiSelector)">getFromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
+
+ <div class="jd-descrdiv">Creates a new UiObject for a sibling view or a child of the sibling view,
+ relative to the present UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getPackageName()">getPackageName</a></span>()
-
- <div class="jd-descrdiv">Reads the UI element's <code>package</code> property</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getPackageName()">getPackageName</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Reads the view's <code>package</code> property</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+
+ <a href="UiSelector.html">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getSelector()">getSelector</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getSelector()">getSelector</a></span>()</nobr>
+
<div class="jd-descrdiv">Debugging helper.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getText()">getText</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getText()">getText</a></span>()</nobr>
+
<div class="jd-descrdiv">Reads the <code>text</code> property of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- Rect
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Rect</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getVisibleBounds()">getVisibleBounds</a></span>()
-
- <div class="jd-descrdiv">Returns the visible bounds of the UI element.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getVisibleBounds()">getVisibleBounds</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Returns the visible bounds of the view.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isCheckable()">isCheckable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>checkable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isCheckable()">isCheckable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>checkable</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isChecked()">isChecked</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isChecked()">isChecked</a></span>()</nobr>
+
<div class="jd-descrdiv">Check if the UI element's <code>checked</code> property is currently true</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isClickable()">isClickable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>clickable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isClickable()">isClickable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>clickable</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isEnabled()">isEnabled</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>enabled</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isEnabled()">isEnabled</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>enabled</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isFocusable()">isFocusable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>focusable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isFocusable()">isFocusable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if the UI element's <code>focusable</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isFocused()">isFocused</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isFocused()">isFocused</a></span>()</nobr>
+
<div class="jd-descrdiv">Check if the UI element's <code>focused</code> property is currently true</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isLongClickable()">isLongClickable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>long-clickable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isLongClickable()">isLongClickable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if the view's <code>long-clickable</code> property is currently true</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isScrollable()">isScrollable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>scrollable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isScrollable()">isScrollable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if the view's <code>scrollable</code> property is currently true</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#isSelected()">isSelected</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>selected</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#isSelected()">isSelected</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>selected</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#longClick()">longClick</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#longClick()">longClick</a></span>()</nobr>
+
<div class="jd-descrdiv">Long clicks the center of the visible bounds of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#longClickBottomRight()">longClickBottomRight</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#longClickBottomRight()">longClickBottomRight</a></span>()</nobr>
+
<div class="jd-descrdiv">Long clicks bottom and right corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#longClickTopLeft()">longClickTopLeft</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#longClickTopLeft()">longClickTopLeft</a></span>()</nobr>
+
<div class="jd-descrdiv">Long clicks on the top and left corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setText(java.lang.String)">setText</a></span>(String text)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)">performMultiPointerGesture</a></span>(PointerCoords... touches)</nobr>
+
+ <div class="jd-descrdiv">Performs a multi-touch gesture.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int)">performTwoPointerGesture</a></span>(Point startPoint1, Point startPoint2, Point endPoint1, Point endPoint2, int steps)</nobr>
+
+ <div class="jd-descrdiv">Generates a two-pointer gesture with arbitrary starting and ending points.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pinchIn(int, int)">pinchIn</a></span>(int percent, int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally
+ toward the other, from the edges to the center of this UiObject .</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#pinchOut(int, int)">pinchOut</a></span>(int percent, int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally
+ opposite across the other, from the center out towards the edges of the
+ this UiObject.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setText(java.lang.String)">setText</a></span>(String text)</nobr>
+
<div class="jd-descrdiv">Sets the text in an editable field, after clearing the field's content.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#swipeDown(int)">swipeDown</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this object, Also see
- #scrollToBeginning(int), #scrollToEnd(int), #scrollBackward(),
- #scrollForward().</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#swipeDown(int)">swipeDown</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe down action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#swipeLeft(int)">swipeLeft</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this object.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#swipeLeft(int)">swipeLeft</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe left action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#swipeRight(int)">swipeRight</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this object.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#swipeRight(int)">swipeRight</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe right action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#swipeUp(int)">swipeUp</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this UiObject.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#swipeUp(int)">swipeUp</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe up action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#waitForExists(long)">waitForExists</a></span>(long timeout)
-
- <div class="jd-descrdiv">Waits a specified length of time for a UI element to become visible.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#waitForExists(long)">waitForExists</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Waits a specified length of time for a view to become visible.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)
-
- <div class="jd-descrdiv">Waits a specified length of time for a UI element to become undetectable.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Waits a specified length of time for a view to become undetectable.</div>
+
</td></tr>
@@ -737,6 +899,34 @@
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
+
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ AccessibilityNodeInfo</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#findAccessibilityNodeInfo(long)">findAccessibilityNodeInfo</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Finds a matching UI element in the accessibility hierarchy, by
+ using the selector for this UiObject.</div>
+
+ </td></tr>
+
+
+
+</table>
+
+
@@ -746,7 +936,7 @@
<div style="clear:left;">Inherited Methods</div></th></tr>
-<tr class="api apilevel-" >
+<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
@@ -762,150 +952,182 @@
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
-
-
+
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Object</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">equals</span>(Object arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">clone</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">equals</span>(Object arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">finalize</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- Class<?>
+
+
+ Class<?></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">getClass</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getClass</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- int
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">hashCode</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">hashCode</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notify</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notify</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notifyAll</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notifyAll</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">toString</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">toString</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0, int arg1)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0)</nobr>
+
</td></tr>
@@ -938,6 +1160,251 @@
<!-- Constants -->
+<!-- ========= ENUM CONSTANTS DETAIL ======== -->
+<h2>Constants</h2>
+
+
+
+
+<A NAME="FINGER_TOUCH_HALF_WIDTH"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+ static
+ final
+ int
+ </span>
+ FINGER_TOUCH_HALF_WIDTH
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ 20
+ (0x00000014)
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
+<A NAME="SWIPE_MARGIN_LIMIT"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+ static
+ final
+ int
+ </span>
+ SWIPE_MARGIN_LIMIT
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ 5
+ (0x00000005)
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
+<A NAME="WAIT_FOR_EVENT_TMEOUT"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+ static
+ final
+ long
+ </span>
+ WAIT_FOR_EVENT_TMEOUT
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+ <p>
+ <p class="caution"><strong>
+ This constant is deprecated.</strong><br/>
+ use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code>
+
+ </p>
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ 3000
+ (0x0000000000000bb8)
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
+<A NAME="WAIT_FOR_SELECTOR_POLL"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+ static
+ final
+ long
+ </span>
+ WAIT_FOR_SELECTOR_POLL
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ 1000
+ (0x00000000000003e8)
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
+<A NAME="WAIT_FOR_SELECTOR_TIMEOUT"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+ static
+ final
+ long
+ </span>
+ WAIT_FOR_SELECTOR_TIMEOUT
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+ <p>
+ <p class="caution"><strong>
+ This constant is deprecated.</strong><br/>
+ use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code>
+
+ </p>
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ 10000
+ (0x0000000000002710)
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
+<A NAME="WAIT_FOR_WINDOW_TMEOUT"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+ static
+ final
+ long
+ </span>
+ WAIT_FOR_WINDOW_TMEOUT
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ 5500
+ (0x000000000000157c)
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
+
<!-- Fields -->
@@ -949,33 +1416,31 @@
-<a id="UiObject(com.android.uiautomator.core.UiSelector)"></a>
+<A NAME="UiObject(com.android.uiautomator.core.UiSelector)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
-
+ public
+
+
+
+
+
</span>
<span class="sympad">UiObject</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Constructs a UiObject to represent a specific UI element matched by the specified
- <code><a href="UiSelector.html">UiSelector</a></code> selector properties.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Constructs a UiObject to represent a view that matches the specified
+ selector criteria.</p></div>
</div>
</div>
@@ -996,31 +1461,29 @@
-<a id="clearTextField()"></a>
+<A NAME="clearTextField()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
void
</span>
<span class="sympad">clearTextField</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Clears the existing text contents in an editable field.
The <code><a href="UiSelector.html">UiSelector</a></code> of this object must reference a UI element that is editable.
@@ -1037,7 +1500,8 @@
Also, not all editable fields support the long-press functionality.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1049,31 +1513,29 @@
</div>
-<a id="click()"></a>
+<A NAME="click()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">click</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Performs a click at the center of the visible bounds of the UI element represented
by this UiObject.</p></div>
<div class="jd-tagdata">
@@ -1082,7 +1544,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1094,31 +1557,29 @@
</div>
-<a id="clickAndWaitForNewWindow(long)"></a>
+<A NAME="clickAndWaitForNewWindow(long)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">clickAndWaitForNewWindow</span>
<span class="normal">(long timeout)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Performs a click at the center of the visible bounds of the UI element represented
by this UiObject and waits for window transitions.
@@ -1131,7 +1592,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>timeout</th>
+ <th>timeout</td>
<td>timeout before giving up on waiting for a new window</td>
</tr>
</table>
@@ -1142,7 +1603,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1154,41 +1616,40 @@
</div>
-<a id="clickAndWaitForNewWindow()"></a>
+<A NAME="clickAndWaitForNewWindow()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">clickAndWaitForNewWindow</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow(long)</a></code>
- This method is intended to reliably wait for window transitions that would typically take
- longer than the usual default timeouts.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Waits for window transitions that would typically take longer than the
+ usual default timeouts.
+ See <code><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow(long)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if the event was triggered, else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1200,31 +1661,29 @@
</div>
-<a id="clickBottomRight()"></a>
+<A NAME="clickBottomRight()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">clickBottomRight</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Clicks the bottom and right corner of the UI element</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1232,11 +1691,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>Exception</td>
- <td></td>
- </tr>
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1248,31 +1704,29 @@
</div>
-<a id="clickTopLeft()"></a>
+<A NAME="clickTopLeft()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">clickTopLeft</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Clicks the top and left corner of the UI element</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1280,11 +1734,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>Exception</td>
- <td></td>
- </tr>
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1296,134 +1747,243 @@
</div>
-<a id="exists()"></a>
+<A NAME="dragTo(com.android.uiautomator.core.UiObject, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">dragTo</span>
+ <span class="normal">(<a href="#">UiObject</a> destObj, int steps)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Drags this object to a destination UiObject.
+ The number of steps specified in your input parameter can influence the
+ drag speed, and varying speeds may impact the results. Consider
+ evaluating different speeds when using this method in your tests.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>destObj</td>
+ <td>the destination UiObject.</td>
+ </tr>
+ <tr>
+ <th>steps</td>
+ <td>usually 40 steps. You can increase or decrease the steps to change the speed.</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if successful</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Throws</h5>
+ <table class="jd-tagtable">
+
+ <tr>
+ <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="dragTo(int, int, int)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">dragTo</span>
+ <span class="normal">(int destX, int destY, int steps)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Drags this object to arbitrary coordinates.
+ The number of steps specified in your input parameter can influence the
+ drag speed, and varying speeds may impact the results. Consider
+ evaluating different speeds when using this method in your tests.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>destX</td>
+ <td>the X-axis coordinate.</td>
+ </tr>
+ <tr>
+ <th>destY</td>
+ <td>the Y-axis coordinate.</td>
+ </tr>
+ <tr>
+ <th>steps</td>
+ <td>usually 40 steps. You can increase or decrease the steps to change the speed.</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if successful</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Throws</h5>
+ <table class="jd-tagtable">
+
+ <tr>
+ <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="exists()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
boolean
</span>
<span class="sympad">exists</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if UI element exists.
+
+ <div class="jd-tagdata jd-tagdescr"><p>Check if view exists.
This methods performs a <code><a href="#waitForExists(long)">waitForExists(long)</a></code> with zero timeout. This
- basically returns immediately whether the UI element represented by this UiObject
- exists or not. If you need to wait longer for this UI element, then see
+ basically returns immediately whether the view represented by this UiObject
+ exists or not. If you need to wait longer for this view, then see
<code><a href="#waitForExists(long)">waitForExists(long)</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if the UI element represented by this UiObject does exist
-</li></ul>
+ <ul class="nolist"><li>true if the view represented by this UiObject does exist</li></ul>
</div>
</div>
</div>
-<a id="getBounds()"></a>
+<A NAME="getBounds()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
Rect
</span>
<span class="sympad">getBounds</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Returns the UI element's <code>bounds</code> property. See <code><a href="#getVisibleBounds()">getVisibleBounds()</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Returns the view's <code>bounds</code> property. See <code><a href="#getVisibleBounds()">getVisibleBounds()</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>Rect</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
+
</div>
</div>
-<a id="getChild(com.android.uiautomator.core.UiSelector)"></a>
+<A NAME="getChild(com.android.uiautomator.core.UiSelector)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ public
+
+
+
+
+ <a href="#">UiObject</a>
</span>
<span class="sympad">getChild</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject representing a child UI element of the element currently represented
- by this UiObject.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject for a child view that is under the present UiObject.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>selector</th>
- <td>for UI element to match</td>
+ <th>selector</td>
+ <td>for child view to match</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>a new UiObject representing the matched UI element
-</li></ul>
+ <ul class="nolist"><li>a new UiObject representing the child view</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1435,40 +1995,38 @@
</div>
-<a id="getChildCount()"></a>
+<A NAME="getChildCount()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
int
</span>
<span class="sympad">getChildCount</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Counts the child UI elements immediately under the UI element currently represented by
- this UiObject.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Counts the child views immediately under the present UiObject.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>the count of child UI elements.</li></ul>
+ <ul class="nolist"><li>the count of child views.</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1480,31 +2038,68 @@
</div>
-<a id="getContentDescription()"></a>
+<A NAME="getClassName()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ String
+ </span>
+ <span class="sympad">getClassName</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Retrieves the <code>className</code> property of the UI element.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>class name of the current node represented by this UiObject</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Throws</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
+ <td>if no match was found</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="getContentDescription()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
String
</span>
<span class="sympad">getContentDescription</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Reads the <code>content_desc</code> property of the UI element</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1512,7 +2107,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1524,51 +2120,48 @@
</div>
-<a id="getFromParent(com.android.uiautomator.core.UiSelector)"></a>
+<A NAME="getFromParent(com.android.uiautomator.core.UiSelector)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ public
+
+
+
+
+ <a href="#">UiObject</a>
</span>
<span class="sympad">getFromParent</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject representing a child UI element from the parent element currently
- represented by this object. Essentially this is starting the search from the parent
- element and can also be used to find sibling UI elements to the one currently represented
- by this UiObject.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject for a sibling view or a child of the sibling view,
+ relative to the present UiObject.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>selector</th>
- <td>for the UI element to match</td>
+ <th>selector</td>
+ <td>for a sibling view or children of the sibling view</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>a new UiObject representing the matched UI element</li></ul>
+ <ul class="nolist"><li>a new UiObject representing the matched view</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1580,39 +2173,38 @@
</div>
-<a id="getPackageName()"></a>
+<A NAME="getPackageName()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
String
</span>
<span class="sympad">getPackageName</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Reads the UI element's <code>package</code> property</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Reads the view's <code>package</code> property</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1624,68 +2216,63 @@
</div>
-<a id="getSelector()"></a>
+<A NAME="getSelector()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
- final
-
-
+ public
+
+ final
+
+
<a href="UiSelector.html">UiSelector</a>
</span>
<span class="sympad">getSelector</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Debugging helper. A test can dump the properties of a selector as a string
to its logs if needed. <code>getSelector().toString();</code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="UiSelector.html">UiSelector</a></code>
-</li></ul>
+ <ul class="nolist"><li><code><a href="UiSelector.html">UiSelector</a></code></li></ul>
</div>
</div>
</div>
-<a id="getText()"></a>
+<A NAME="getText()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
String
</span>
<span class="sympad">getText</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Reads the <code>text</code> property of the UI element</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1693,11 +2280,10 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
- <td>if no match could be found
-</td>
+ <td>if no match could be found</td>
</tr>
</table>
</div>
@@ -1706,34 +2292,26 @@
</div>
-<a id="getVisibleBounds()"></a>
+<A NAME="getVisibleBounds()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
Rect
</span>
<span class="sympad">getVisibleBounds</span>
<span class="normal">()</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Returns the visible bounds of the UI element.
- If a portion of the UI element is visible, only the bounds of the visible portion are
+ <div class="jd-tagdata jd-tagdescr"><p>Returns the visible bounds of the view.
+
+ If a portion of the view is visible, only the bounds of the visible portion are
reported.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -1741,58 +2319,59 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th></td>
- <td>UiObjectNotFoundException</td>
- </tr>
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
</tr>
</table>
</div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">See Also</h5>
+ <ul class="nolist"><li><code><a href="#getBounds()">getBounds()</a></code></li>
+ </ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="isCheckable()"></a>
+<A NAME="isCheckable()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isCheckable</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>checkable</code> property is currently true</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>checkable</code> property is currently true.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1804,40 +2383,37 @@
</div>
-<a id="isChecked()"></a>
+<A NAME="isChecked()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isChecked</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>checked</code> property is currently true</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if it is else false
-</li></ul>
+ <ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1849,39 +2425,38 @@
</div>
-<a id="isClickable()"></a>
+<A NAME="isClickable()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isClickable</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>clickable</code> property is currently true</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>clickable</code> property is currently true.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1893,39 +2468,38 @@
</div>
-<a id="isEnabled()"></a>
+<A NAME="isEnabled()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isEnabled</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>enabled</code> property is currently true</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>enabled</code> property is currently true.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1937,39 +2511,38 @@
</div>
-<a id="isFocusable()"></a>
+<A NAME="isFocusable()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isFocusable</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>focusable</code> property is currently true</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>focusable</code> property is currently true.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1981,31 +2554,29 @@
</div>
-<a id="isFocused()"></a>
+<A NAME="isFocused()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isFocused</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>focused</code> property is currently true</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2013,7 +2584,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2025,39 +2597,38 @@
</div>
-<a id="isLongClickable()"></a>
+<A NAME="isLongClickable()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isLongClickable</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>long-clickable</code> property is currently true</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Check if the view's <code>long-clickable</code> property is currently true</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2069,39 +2640,38 @@
</div>
-<a id="isScrollable()"></a>
+<A NAME="isScrollable()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isScrollable</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>scrollable</code> property is currently true</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Check if the view's <code>scrollable</code> property is currently true</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2113,39 +2683,38 @@
</div>
-<a id="isSelected()"></a>
+<A NAME="isSelected()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">isSelected</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>selected</code> property is currently true</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>selected</code> property is currently true.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if it is else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2157,31 +2726,29 @@
</div>
-<a id="longClick()"></a>
+<A NAME="longClick()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">longClick</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Long clicks the center of the visible bounds of the UI element</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2189,7 +2756,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2201,31 +2769,29 @@
</div>
-<a id="longClickBottomRight()"></a>
+<A NAME="longClickBottomRight()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">longClickBottomRight</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Long clicks bottom and right corner of the UI element</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2233,7 +2799,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2245,31 +2812,29 @@
</div>
-<a id="longClickTopLeft()"></a>
+<A NAME="longClickTopLeft()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">longClickTopLeft</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Long clicks on the top and left corner of the UI element</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
@@ -2277,7 +2842,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2289,31 +2855,254 @@
</div>
-<a id="setText(java.lang.String)"></a>
+<A NAME="performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">performMultiPointerGesture</span>
+ <span class="normal">(PointerCoords... touches)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a multi-touch gesture. You must specify touch coordinates for
+ at least 2 pointers. Each pointer must have all of its touch steps
+ defined in an array of <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code>. You can use this method to
+ specify complex gestures, like circles and irregular shapes, where each
+ pointer may take a different path.
+
+ To create a single point on a pointer's touch path:
+ <code>
+ PointerCoords p = new PointerCoords();
+ p.x = stepX;
+ p.y = stepY;
+ p.pressure = 1;
+ p.size = 1;
+ </code></p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>touches</td>
+ <td>represents the pointers' paths. Each <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code>
+ array represents a different pointer. Each <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code> in an
+ array element represents a touch point on a pointer's path.</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully,
+ <code>false</code> otherwise</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">performTwoPointerGesture</span>
+ <span class="normal">(Point startPoint1, Point startPoint2, Point endPoint1, Point endPoint2, int steps)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Generates a two-pointer gesture with arbitrary starting and ending points.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>startPoint1</td>
+ <td>start point of pointer 1</td>
+ </tr>
+ <tr>
+ <th>startPoint2</td>
+ <td>start point of pointer 2</td>
+ </tr>
+ <tr>
+ <th>endPoint1</td>
+ <td>end point of pointer 1</td>
+ </tr>
+ <tr>
+ <th>endPoint2</td>
+ <td>end point of pointer 2</td>
+ </tr>
+ <tr>
+ <th>steps</td>
+ <td>the number of steps for the gesture. Steps are injected
+ about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully,
+ <code>false</code> otherwise</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="pinchIn(int, int)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">pinchIn</span>
+ <span class="normal">(int percent, int steps)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a two-pointer gesture, where each pointer moves diagonally
+ toward the other, from the edges to the center of this UiObject .</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>percent</td>
+ <td>percentage of the object's diagonal length for the pinch gesture</td>
+ </tr>
+ <tr>
+ <th>steps</td>
+ <td>the number of steps for the gesture. Steps are injected
+ about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully,
+ <code>false</code> otherwise</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Throws</h5>
+ <table class="jd-tagtable">
+
+ <tr>
+ <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="pinchOut(int, int)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">pinchOut</span>
+ <span class="normal">(int percent, int steps)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a two-pointer gesture, where each pointer moves diagonally
+ opposite across the other, from the center out towards the edges of the
+ this UiObject.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>percent</td>
+ <td>percentage of the object's diagonal length for the pinch gesture</td>
+ </tr>
+ <tr>
+ <th>steps</td>
+ <td>the number of steps for the gesture. Steps are injected
+ about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully,
+ <code>false</code> otherwise</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Throws</h5>
+ <table class="jd-tagtable">
+
+ <tr>
+ <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="setText(java.lang.String)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
boolean
</span>
<span class="sympad">setText</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Sets the text in an editable field, after clearing the field's content.
The <code><a href="UiSelector.html">UiSelector</a></code> selector of this object must reference a UI element that is editable.
@@ -2328,7 +3117,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>text</th>
+ <th>text</td>
<td>string to set</td>
</tr>
</table>
@@ -2339,7 +3128,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2351,41 +3141,44 @@
</div>
-<a id="swipeDown(int)"></a>
+<A NAME="swipeDown(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">swipeDown</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Perform the action on the UI element that is represented by this object, Also see
- #scrollToBeginning(int), #scrollToEnd(int), #scrollBackward(),
- #scrollForward(). This method will perform the swipe gesture over any
- surface. The targeted UI element does not need to have the attribute
- <code>scrollable</code> set to <code>true</code> for this operation to be performed.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe down action on the UiObject.
+ The swipe gesture can be performed over any surface. The targeted
+ UI element does not need to be scrollable.
+ See also:
+ <ul>
+ <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li>
+ </ul></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
+ <th>steps</td>
<td>indicates the number of injected move steps into the system. Steps are
injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td>
</tr>
@@ -2397,7 +3190,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2409,41 +3203,44 @@
</div>
-<a id="swipeLeft(int)"></a>
+<A NAME="swipeLeft(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">swipeLeft</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Perform the action on the UI element that is represented by this object. Also see
- #scrollToBeginning(int), #scrollToEnd(int), #scrollBackward(),
- #scrollForward(). This method will perform the swipe gesture over any
- surface. The targeted UI element does not need to have the attribute
- <code>scrollable</code> set to <code>true</code> for this operation to be performed.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe left action on the UiObject.
+ The swipe gesture can be performed over any surface. The targeted
+ UI element does not need to be scrollable.
+ See also:
+ <ul>
+ <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li>
+ </ul></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
+ <th>steps</td>
<td>indicates the number of injected move steps into the system. Steps are
injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td>
</tr>
@@ -2455,7 +3252,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2467,41 +3265,44 @@
</div>
-<a id="swipeRight(int)"></a>
+<A NAME="swipeRight(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">swipeRight</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Perform the action on the UI element that is represented by this object. Also see
- #scrollToBeginning(int), #scrollToEnd(int), #scrollBackward(),
- #scrollForward(). This method will perform the swipe gesture over any
- surface. The targeted UI element does not need to have the attribute
- <code>scrollable</code> set to <code>true</code> for this operation to be performed.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe right action on the UiObject.
+ The swipe gesture can be performed over any surface. The targeted
+ UI element does not need to be scrollable.
+ See also:
+ <ul>
+ <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li>
+ </ul></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
+ <th>steps</td>
<td>indicates the number of injected move steps into the system. Steps are
injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td>
</tr>
@@ -2513,7 +3314,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2525,39 +3327,42 @@
</div>
-<a id="swipeUp(int)"></a>
+<A NAME="swipeUp(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">swipeUp</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Perform the action on the UI element that is represented by this UiObject. Also see
- #scrollToBeginning(int), #scrollToEnd(int), #scrollBackward(),
- #scrollForward().</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe up action on the UiObject.
+ See also:
+ <ul>
+ <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li>
+ <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li>
+ </ul></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
+ <th>steps</td>
<td>indicates the number of injected move steps into the system. Steps are
injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td>
</tr>
@@ -2569,7 +3374,8 @@
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2581,86 +3387,81 @@
</div>
-<a id="waitForExists(long)"></a>
+<A NAME="waitForExists(long)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">waitForExists</span>
<span class="normal">(long timeout)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a UI element to become visible.
- This method waits until the UI element becomes visible on the display, or
+ <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a view to become visible.
+
+ This method waits until the view becomes visible on the display, or
until the timeout has elapsed. You can use this method in situations where
the content that you want to select is not immediately displayed.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>timeout</th>
+ <th>timeout</td>
<td>the amount of time to wait (in milliseconds)</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if the UI element is displayed, else false if timeout elapsed while waiting
-</li></ul>
+ <ul class="nolist"><li>true if the view is displayed, else false if timeout elapsed while waiting</li></ul>
</div>
</div>
</div>
-<a id="waitUntilGone(long)"></a>
+<A NAME="waitUntilGone(long)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">waitUntilGone</span>
<span class="normal">(long timeout)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a UI element to become undetectable.
- This method waits until a UI element is no longer matchable, or until the
+ <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a view to become undetectable.
+
+ This method waits until a view is no longer matchable, or until the
timeout has elapsed.
- A UI element becomes undetectable when the <code><a href="UiSelector.html">UiSelector</a></code> of the object is
+ A view becomes undetectable when the <code><a href="UiSelector.html">UiSelector</a></code> of the object is
unable to find a match because the element has either changed its state or is no
longer displayed.
@@ -2670,7 +3471,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>timeout</th>
+ <th>timeout</td>
<td>time to wait (in milliseconds)</td>
</tr>
</table>
@@ -2678,10 +3479,65 @@
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>true if the element is gone before timeout elapsed, else false if timeout elapsed
- but a matching element is still found.
-</li></ul>
+ but a matching element is still found.</li></ul>
</div>
</div>
</div>
+
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+
+<h2>Protected Methods</h2>
+
+
+
+<A NAME="findAccessibilityNodeInfo(long)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+
+
+
+
+ AccessibilityNodeInfo
+ </span>
+ <span class="sympad">findAccessibilityNodeInfo</span>
+ <span class="normal">(long timeout)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Finds a matching UI element in the accessibility hierarchy, by
+ using the selector for this UiObject.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>timeout</td>
+ <td>in milliseconds</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>AccessibilityNodeInfo if found else null</li></ul>
+ </div>
+
+ </div>
+
+
+
+
+
+
diff --git a/docs/html/tools/help/uiautomator/UiObjectNotFoundException.jd b/docs/html/tools/help/uiautomator/UiObjectNotFoundException.jd
index 02c607d..b41cfe5 100644
--- a/docs/html/tools/help/uiautomator/UiObjectNotFoundException.jd
+++ b/docs/html/tools/help/uiautomator/UiObjectNotFoundException.jd
@@ -9,29 +9,6 @@
to any UI element displayed.
</p>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
<h2>Summary</h2>
@@ -627,4 +604,3 @@
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
-</div>
diff --git a/docs/html/tools/help/uiautomator/UiScrollable.jd b/docs/html/tools/help/uiautomator/UiScrollable.jd
index 33566a2..7405f3b 100644
--- a/docs/html/tools/help/uiautomator/UiScrollable.jd
+++ b/docs/html/tools/help/uiautomator/UiScrollable.jd
@@ -5,33 +5,9 @@
<style>
h4.jd-details-title {background-color: #DEE8F1;}
</style>
-<p>UiScrollable is a <code><a href="UiCollection.html">UiCollection</a></code> and provides support for searching for items in a
- scrollable user interface (UI) elements. This class can be used with horizontally or vertically scrollable controls..
-</p>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
+<p>A <code><a href="UiCollection.html">UiCollection</a></code>
+that supports searching for items in scrollable layout elements. This class can
+be used with horizontally or vertically scrollable controls.</p>
<h2>Summary</h2>
@@ -49,6 +25,90 @@
+<!-- =========== ENUM CONSTANT SUMMARY =========== -->
+<table id="inhconstants" class="jd-sumtable"><tr><th>
+ <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
+ <div style="clear:left;">Inherited Constants</div></th></tr>
+
+
+
+
+<tr class="api" >
+<td colspan="12">
+
+ <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-com.android.uiautomator.core.UiObject" class="jd-expando-trigger closed"
+ ><img id="inherited-constants-com.android.uiautomator.core.UiObject-trigger"
+ src="../../../../../assets/images/triangle-closed.png"
+ class="jd-expando-trigger-img" /></a>From class
+<a href="UiObject.html">com.android.uiautomator.core.UiObject</a>
+<div id="inherited-constants-com.android.uiautomator.core.UiObject">
+ <div id="inherited-constants-com.android.uiautomator.core.UiObject-list"
+ class="jd-inheritedlinks">
+ </div>
+ <div id="inherited-constants-com.android.uiautomator.core.UiObject-summary" style="display: none;">
+ <table class="jd-sumtable-expando">
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol">int</td>
+ <td class="jd-linkcol"><a href="UiObject.html#FINGER_TOUCH_HALF_WIDTH">FINGER_TOUCH_HALF_WIDTH</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">int</td>
+ <td class="jd-linkcol"><a href="UiObject.html#SWIPE_MARGIN_LIMIT">SWIPE_MARGIN_LIMIT</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_EVENT_TMEOUT">WAIT_FOR_EVENT_TMEOUT</a></td>
+ <td class="jd-descrcol" width="100%"><em>
+ This constant is deprecated.
+ use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code>
+</em></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_SELECTOR_POLL">WAIT_FOR_SELECTOR_POLL</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_SELECTOR_TIMEOUT">WAIT_FOR_SELECTOR_TIMEOUT</a></td>
+ <td class="jd-descrcol" width="100%"><em>
+ This constant is deprecated.
+ use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code>
+</em></td>
+ </tr>
+
+
+ <tr class="api" >
+ <td class="jd-typecol">long</td>
+ <td class="jd-linkcol"><a href="UiObject.html#WAIT_FOR_WINDOW_TMEOUT">WAIT_FOR_WINDOW_TMEOUT</a></td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+</table>
+ </div>
+</div>
+</td></tr>
+
+
+
+
+</table>
+
+
@@ -61,22 +121,21 @@
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
-
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ </nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#UiScrollable(com.android.uiautomator.core.UiSelector)">UiScrollable</a></span>(<a href="UiSelector.html">UiSelector</a> container)
-
- <div class="jd-descrdiv">UiScrollable is a <code><a href="UiCollection.html">UiCollection</a></code> and as such requires a <code><a href="UiSelector.html">UiSelector</a></code> to
- identify the container UI element of the scrollable collection.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#UiScrollable(com.android.uiautomator.core.UiSelector)">UiScrollable</a></span>(<a href="UiSelector.html">UiSelector</a> container)</nobr>
+
+ <div class="jd-descrdiv">Constructor.</div>
+
</td></tr>
@@ -93,480 +152,500 @@
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#flingBackward()">flingBackward</a></span>()
-
- <div class="jd-descrdiv">See <code><a href="#scrollBackward(int)">scrollBackward(int)</a></code></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#flingBackward()">flingBackward</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Performs a backwards fling action with the default number of fling
+ steps (5).</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#flingForward()">flingForward</a></span>()
-
- <div class="jd-descrdiv">A convenience version of <code><a href="#scrollForward(int)">scrollForward(int)</a></code>, performs a fling</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#flingForward()">flingForward</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Performs a forward fling with the default number of fling steps (5).</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#flingToBeginning(int)">flingToBeginning</a></span>(int maxSwipes)
-
- <div class="jd-descrdiv">See <code><a href="#scrollToBeginning(int, int)">scrollToBeginning(int, int)</a></code></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#flingToBeginning(int)">flingToBeginning</a></span>(int maxSwipes)</nobr>
+
+ <div class="jd-descrdiv">Performs a fling gesture to reach the beginning of a scrollable layout element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#flingToEnd(int)">flingToEnd</a></span>(int maxSwipes)
-
- <div class="jd-descrdiv">See <code><a href="#scrollToEnd(int, int)">scrollToEnd(int, int)</a></code></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#flingToEnd(int)">flingToEnd</a></span>(int maxSwipes)</nobr>
+
+ <div class="jd-descrdiv">Performs a fling gesture to reach the end of a scrollable layout element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)
-
- <div class="jd-descrdiv">See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription(UiSelector, String)</a></code></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</nobr>
+
+ <div class="jd-descrdiv">Searches for a child element in the present scrollable container.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)
-
- <div class="jd-descrdiv">Searches for child UI element within the constraints of this UiScrollable <code><a href="UiSelector.html">UiSelector</a></code>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
+
+ <div class="jd-descrdiv">Searches for a child element in the present scrollable container.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getChildByInstance(com.android.uiautomator.core.UiSelector, int)">getChildByInstance</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)</nobr>
+
+ <div class="jd-descrdiv">Searches for a child element in the present scrollable container that
+ matches the selector you provided.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</nobr>
+
+ <div class="jd-descrdiv">Searches for a child element in the present scrollable container.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
+
+ <div class="jd-descrdiv">Searches for a child element in the present scrollable
container.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getChildByInstance(com.android.uiautomator.core.UiSelector, int)">getChildByInstance</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)
-
- <div class="jd-descrdiv">Searches for child UI element within the constraints of this UiScrollable <code><a href="UiSelector.html">UiSelector</a></code>
- selector.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getMaxSearchSwipes()">getMaxSearchSwipes</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the maximum number of scrolls allowed when performing a
+ scroll action in search of a child element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ double</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)
-
- <div class="jd-descrdiv">See <code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText(UiSelector, String)</a></code></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#getSwipeDeadZonePercentage()">getSwipeDeadZonePercentage</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Returns the percentage of a widget's size that's considered as a no-touch
+ zone when swiping.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)
-
- <div class="jd-descrdiv">Searches for child UI element within the constraints of this UiScrollable <code><a href="UiSelector.html">UiSelector</a></code>
- container.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollBackward(int)">scrollBackward</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs a backward scroll.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- int
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getMaxSearchSwipes()">getMaxSearchSwipes</a></span>()
-
- <div class="jd-descrdiv">#getChildByDescription(String, boolean) and #getChildByText(String, boolean)
- use an arguments that specifies if scrolling is allowed while searching for the UI element.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollBackward()">scrollBackward</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Performs a backward scroll with the default number of scroll steps (55).</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- double
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#getSwipeDeadZonePercentage()">getSwipeDeadZonePercentage</a></span>()
-
- <div class="jd-descrdiv">Returns the percentage of a widget's size that's considered as a no touch zone when swiping.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollDescriptionIntoView(java.lang.String)">scrollDescriptionIntoView</a></span>(String text)</nobr>
+
+ <div class="jd-descrdiv">Performs a forward scroll action on the scrollable layout element until
+ the content-description is found, or until swipe attempts have been exhausted.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollBackward(int)">scrollBackward</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform a scroll backward.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollForward()">scrollForward</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Performs a forward scroll with the default number of scroll steps (55).</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollBackward()">scrollBackward</a></span>()
-
- <div class="jd-descrdiv">See <code><a href="#scrollBackward(int)">scrollBackward(int)</a></code></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollForward(int)">scrollForward</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs a forward scroll.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollDescriptionIntoView(java.lang.String)">scrollDescriptionIntoView</a></span>(String text)
-
- <div class="jd-descrdiv">Performs a swipe Up on the UI element until the requested content-description
- is visible or until swipe attempts have been exhausted.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollIntoView(com.android.uiautomator.core.UiSelector)">scrollIntoView</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
+
+ <div class="jd-descrdiv">Perform a scroll forward action to move through the scrollable layout
+ element until a visible item that matches the selector is found.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollForward()">scrollForward</a></span>()
-
- <div class="jd-descrdiv">A convenience version of <code><a href="#scrollForward(int)">scrollForward(int)</a></code>, performs a regular scroll</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollIntoView(com.android.uiautomator.core.UiObject)">scrollIntoView</a></span>(<a href="UiObject.html">UiObject</a> obj)</nobr>
+
+ <div class="jd-descrdiv">Perform a forward scroll action to move through the scrollable layout element until
+ a visible item that matches the <code><a href="UiObject.html">UiObject</a></code> is found.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollForward(int)">scrollForward</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform a scroll forward.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollTextIntoView(java.lang.String)">scrollTextIntoView</a></span>(String text)</nobr>
+
+ <div class="jd-descrdiv">Performs a forward scroll action on the scrollable layout element until
+ the text you provided is visible, or until swipe attempts have been exhausted.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollIntoView(com.android.uiautomator.core.UiSelector)">scrollIntoView</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
- <div class="jd-descrdiv">Perform a scroll search for a UI element matching the <code><a href="UiSelector.html">UiSelector</a></code> selector argument.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollToBeginning(int)">scrollToBeginning</a></span>(int maxSwipes)</nobr>
+
+ <div class="jd-descrdiv">Scrolls to the beginning of a scrollable layout element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollTextIntoView(java.lang.String)">scrollTextIntoView</a></span>(String text)
-
- <div class="jd-descrdiv">Performs a swipe up on the UI element until the requested text is visible
- or until swipe attempts have been exhausted.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollToBeginning(int, int)">scrollToBeginning</a></span>(int maxSwipes, int steps)</nobr>
+
+ <div class="jd-descrdiv">Scrolls to the beginning of a scrollable layout element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollToBeginning(int)">scrollToBeginning</a></span>(int maxSwipes)
-
- <div class="jd-descrdiv">See <code><a href="#scrollToBeginning(int, int)">scrollToBeginning(int, int)</a></code></div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollToEnd(int, int)">scrollToEnd</a></span>(int maxSwipes, int steps)</nobr>
+
+ <div class="jd-descrdiv">Scrolls to the end of a scrollable layout element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollToBeginning(int, int)">scrollToBeginning</a></span>(int maxSwipes, int steps)
-
- <div class="jd-descrdiv">Scrolls to the beginning of a scrollable UI element.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollToEnd(int)">scrollToEnd</a></span>(int maxSwipes)</nobr>
+
+ <div class="jd-descrdiv">Scrolls to the end of a scrollable layout element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiScrollable</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollToEnd(int, int)">scrollToEnd</a></span>(int maxSwipes, int steps)
-
- <div class="jd-descrdiv">Scrolls to the end of a scrollable UI element.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setAsHorizontalList()">setAsHorizontalList</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Set the direction of swipes to be horizontal when performing scroll actions.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiScrollable</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollToEnd(int)">scrollToEnd</a></span>(int maxSwipes)
-
- <div class="jd-descrdiv">See {@link UiScrollable#scrollToEnd(int, int)</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setAsVerticalList()">setAsVerticalList</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Set the direction of swipes to be vertical when performing scroll actions.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- void
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiScrollable</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setAsHorizontalList()">setAsHorizontalList</a></span>()
-
- <div class="jd-descrdiv">Set the direction of swipes when performing scroll search
-</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes</a></span>(int swipes)</nobr>
+
+ <div class="jd-descrdiv">Sets the maximum number of scrolls allowed when performing a
+ scroll action in search of a child element.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- void
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiScrollable</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setAsVerticalList()">setAsVerticalList</a></span>()
-
- <div class="jd-descrdiv">Set the direction of swipes when performing scroll search
-</div>
-
- </td></tr>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#setSwipeDeadZonePercentage(double)">setSwipeDeadZonePercentage</a></span>(double swipeDeadZonePercentage)</nobr>
+ <div class="jd-descrdiv">Sets the percentage of a widget's size that's considered as no-touch
+ zone when swiping.</div>
-
- <tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- void
- </td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes</a></span>(int swipes)
-
- <div class="jd-descrdiv">#getChildByDescription(String, boolean) and #getChildByText(String, boolean)
- use an arguments that specifies if scrolling is allowed while searching for the UI element.</div>
-
- </td></tr>
-
-
-
- <tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- void
- </td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#setSwipeDeadZonePercentage(double)">setSwipeDeadZonePercentage</a></span>(double swipeDeadZonePercentage)
-
- <div class="jd-descrdiv">Sets the percentage of a widget's size that's considered as a no touch zone when swiping.</div>
-
</td></tr>
@@ -576,6 +655,34 @@
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
+
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#exists(com.android.uiautomator.core.UiSelector)">exists</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
+
+ <div class="jd-descrdiv">Used privately when performing swipe searches to decide if an element has become
+ visible or not.</div>
+
+ </td></tr>
+
+
+
+</table>
+
+
@@ -585,7 +692,7 @@
<div style="clear:left;">Inherited Methods</div></th></tr>
-<tr class="api apilevel-" >
+<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.android.uiautomator.core.UiCollection" class="jd-expando-trigger closed"
><img id="inherited-methods-com.android.uiautomator.core.UiCollection-trigger"
@@ -601,82 +708,82 @@
</div>
<div id="inherited-methods-com.android.uiautomator.core.UiCollection-summary" style="display: none;">
<table class="jd-sumtable-expando">
-
-
+
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiCollection.html#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiCollection.html#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
+
<div class="jd-descrdiv">Searches for child UI element within the constraints of this UiCollection <code><a href="UiSelector.html">UiSelector</a></code>
selector.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiCollection.html#getChildByInstance(com.android.uiautomator.core.UiSelector, int)">getChildByInstance</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiCollection.html#getChildByInstance(com.android.uiautomator.core.UiSelector, int)">getChildByInstance</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)</nobr>
+
<div class="jd-descrdiv">Searches for child UI element within the constraints of this UiCollection <code><a href="UiSelector.html">UiSelector</a></code>
selector.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiCollection.html#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiCollection.html#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</nobr>
+
<div class="jd-descrdiv">Searches for child UI element within the constraints of this UiCollection <code><a href="UiSelector.html">UiSelector</a></code>
selector.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- int
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiCollection.html#getChildCount(com.android.uiautomator.core.UiSelector)">getChildCount</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiCollection.html#getChildCount(com.android.uiautomator.core.UiSelector)">getChildCount</a></span>(<a href="UiSelector.html">UiSelector</a> childPattern)</nobr>
+
<div class="jd-descrdiv">Counts child UI element instances matching the <code>childPattern</code>
argument.</div>
-
+
</td></tr>
@@ -687,7 +794,7 @@
-<tr class="api apilevel-" >
+<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.android.uiautomator.core.UiObject" class="jd-expando-trigger closed"
><img id="inherited-methods-com.android.uiautomator.core.UiObject-trigger"
@@ -703,645 +810,788 @@
</div>
<div id="inherited-methods-com.android.uiautomator.core.UiObject-summary" style="display: none;">
<table class="jd-sumtable-expando">
-
-
+
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- void
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#clearTextField()">clearTextField</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#clearTextField()">clearTextField</a></span>()</nobr>
+
<div class="jd-descrdiv">Clears the existing text contents in an editable field.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#click()">click</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#click()">click</a></span>()</nobr>
+
<div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented
by this UiObject.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)</nobr>
+
<div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented
by this UiObject and waits for window transitions.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()
-
- <div class="jd-descrdiv">See <code><a href="UiObject.html#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow(long)</a></code>
- This method is intended to reliably wait for window transitions that would typically take
- longer than the usual default timeouts.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Waits for window transitions that would typically take longer than the
+ usual default timeouts.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#clickBottomRight()">clickBottomRight</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#clickBottomRight()">clickBottomRight</a></span>()</nobr>
+
<div class="jd-descrdiv">Clicks the bottom and right corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#clickTopLeft()">clickTopLeft</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#clickTopLeft()">clickTopLeft</a></span>()</nobr>
+
<div class="jd-descrdiv">Clicks the top and left corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#exists()">exists</a></span>()
-
- <div class="jd-descrdiv">Check if UI element exists.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#dragTo(com.android.uiautomator.core.UiObject, int)">dragTo</a></span>(<a href="UiObject.html">UiObject</a> destObj, int steps)</nobr>
+
+ <div class="jd-descrdiv">Drags this object to a destination UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- Rect
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getBounds()">getBounds</a></span>()
-
- <div class="jd-descrdiv">Returns the UI element's <code>bounds</code> property.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#dragTo(int, int, int)">dragTo</a></span>(int destX, int destY, int steps)</nobr>
+
+ <div class="jd-descrdiv">Drags this object to arbitrary coordinates.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getChild(com.android.uiautomator.core.UiSelector)">getChild</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
- <div class="jd-descrdiv">Creates a new UiObject representing a child UI element of the element currently represented
- by this UiObject.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#exists()">exists</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if view exists.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- int
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ AccessibilityNodeInfo</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getChildCount()">getChildCount</a></span>()
-
- <div class="jd-descrdiv">Counts the child UI elements immediately under the UI element currently represented by
- this UiObject.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#findAccessibilityNodeInfo(long)">findAccessibilityNodeInfo</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Finds a matching UI element in the accessibility hierarchy, by
+ using the selector for this UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Rect</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getContentDescription()">getContentDescription</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getBounds()">getBounds</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Returns the view's <code>bounds</code> property.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getChild(com.android.uiautomator.core.UiSelector)">getChild</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
+
+ <div class="jd-descrdiv">Creates a new UiObject for a child view that is under the present UiObject.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getChildCount()">getChildCount</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Counts the child views immediately under the present UiObject.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getClassName()">getClassName</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Retrieves the <code>className</code> property of the UI element.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getContentDescription()">getContentDescription</a></span>()</nobr>
+
<div class="jd-descrdiv">Reads the <code>content_desc</code> property of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiObject.html">UiObject</a>
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="UiObject.html">UiObject</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getFromParent(com.android.uiautomator.core.UiSelector)">getFromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
- <div class="jd-descrdiv">Creates a new UiObject representing a child UI element from the parent element currently
- represented by this object.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getFromParent(com.android.uiautomator.core.UiSelector)">getFromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr>
+
+ <div class="jd-descrdiv">Creates a new UiObject for a sibling view or a child of the sibling view,
+ relative to the present UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getPackageName()">getPackageName</a></span>()
-
- <div class="jd-descrdiv">Reads the UI element's <code>package</code> property</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getPackageName()">getPackageName</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Reads the view's <code>package</code> property</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+
+ <a href="UiSelector.html">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getSelector()">getSelector</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getSelector()">getSelector</a></span>()</nobr>
+
<div class="jd-descrdiv">Debugging helper.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getText()">getText</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getText()">getText</a></span>()</nobr>
+
<div class="jd-descrdiv">Reads the <code>text</code> property of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- Rect
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Rect</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#getVisibleBounds()">getVisibleBounds</a></span>()
-
- <div class="jd-descrdiv">Returns the visible bounds of the UI element.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#getVisibleBounds()">getVisibleBounds</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Returns the visible bounds of the view.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isCheckable()">isCheckable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>checkable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isCheckable()">isCheckable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>checkable</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isChecked()">isChecked</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isChecked()">isChecked</a></span>()</nobr>
+
<div class="jd-descrdiv">Check if the UI element's <code>checked</code> property is currently true</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isClickable()">isClickable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>clickable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isClickable()">isClickable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>clickable</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isEnabled()">isEnabled</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>enabled</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isEnabled()">isEnabled</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>enabled</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isFocusable()">isFocusable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>focusable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isFocusable()">isFocusable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if the UI element's <code>focusable</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isFocused()">isFocused</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isFocused()">isFocused</a></span>()</nobr>
+
<div class="jd-descrdiv">Check if the UI element's <code>focused</code> property is currently true</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isLongClickable()">isLongClickable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>long-clickable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isLongClickable()">isLongClickable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if the view's <code>long-clickable</code> property is currently true</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isScrollable()">isScrollable</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>scrollable</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isScrollable()">isScrollable</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Check if the view's <code>scrollable</code> property is currently true</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#isSelected()">isSelected</a></span>()
-
- <div class="jd-descrdiv">Check if the UI element's <code>selected</code> property is currently true</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#isSelected()">isSelected</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Checks if the UI element's <code>selected</code> property is currently true.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#longClick()">longClick</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#longClick()">longClick</a></span>()</nobr>
+
<div class="jd-descrdiv">Long clicks the center of the visible bounds of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#longClickBottomRight()">longClickBottomRight</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#longClickBottomRight()">longClickBottomRight</a></span>()</nobr>
+
<div class="jd-descrdiv">Long clicks bottom and right corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#longClickTopLeft()">longClickTopLeft</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#longClickTopLeft()">longClickTopLeft</a></span>()</nobr>
+
<div class="jd-descrdiv">Long clicks on the top and left corner of the UI element</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#setText(java.lang.String)">setText</a></span>(String text)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)">performMultiPointerGesture</a></span>(PointerCoords... touches)</nobr>
+
+ <div class="jd-descrdiv">Performs a multi-touch gesture.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int)">performTwoPointerGesture</a></span>(Point startPoint1, Point startPoint2, Point endPoint1, Point endPoint2, int steps)</nobr>
+
+ <div class="jd-descrdiv">Generates a two-pointer gesture with arbitrary starting and ending points.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#pinchIn(int, int)">pinchIn</a></span>(int percent, int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally
+ toward the other, from the edges to the center of this UiObject .</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#pinchOut(int, int)">pinchOut</a></span>(int percent, int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally
+ opposite across the other, from the center out towards the edges of the
+ this UiObject.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#setText(java.lang.String)">setText</a></span>(String text)</nobr>
+
<div class="jd-descrdiv">Sets the text in an editable field, after clearing the field's content.</div>
-
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#swipeDown(int)">swipeDown</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this object, Also see
- #scrollToBeginning(int), #scrollToEnd(int), #scrollBackward(),
- #scrollForward().</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#swipeDown(int)">swipeDown</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe down action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#swipeLeft(int)">swipeLeft</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this object.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#swipeLeft(int)">swipeLeft</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe left action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#swipeRight(int)">swipeRight</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this object.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#swipeRight(int)">swipeRight</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe right action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#swipeUp(int)">swipeUp</a></span>(int steps)
-
- <div class="jd-descrdiv">Perform the action on the UI element that is represented by this UiObject.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#swipeUp(int)">swipeUp</a></span>(int steps)</nobr>
+
+ <div class="jd-descrdiv">Performs the swipe up action on the UiObject.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#waitForExists(long)">waitForExists</a></span>(long timeout)
-
- <div class="jd-descrdiv">Waits a specified length of time for a UI element to become visible.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#waitForExists(long)">waitForExists</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Waits a specified length of time for a view to become visible.</div>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="UiObject.html#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)
-
- <div class="jd-descrdiv">Waits a specified length of time for a UI element to become undetectable.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="UiObject.html#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)</nobr>
+
+ <div class="jd-descrdiv">Waits a specified length of time for a view to become undetectable.</div>
+
</td></tr>
@@ -1352,7 +1602,7 @@
-<tr class="api apilevel-" >
+<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
@@ -1368,150 +1618,182 @@
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
-
-
+
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Object</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">equals</span>(Object arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">clone</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">equals</span>(Object arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">finalize</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- Class<?>
+
+
+ Class<?></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">getClass</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getClass</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- int
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">hashCode</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">hashCode</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notify</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notify</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notifyAll</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notifyAll</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
-
-
-
- String
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">toString</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">toString</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>()</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0, int arg1)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
+
</td></tr>
-
+
<tr class="api" >
- <td class="jd-typecol">
-
-
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0)</nobr>
+
</td></tr>
@@ -1555,41 +1837,37 @@
-<a id="UiScrollable(com.android.uiautomator.core.UiSelector)"></a>
+<A NAME="UiScrollable(com.android.uiautomator.core.UiSelector)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
-
+ public
+
+
+
+
+
</span>
<span class="sympad">UiScrollable</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> container)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>UiScrollable is a <code><a href="UiCollection.html">UiCollection</a></code> and as such requires a <code><a href="UiSelector.html">UiSelector</a></code> to
- identify the container UI element of the scrollable collection. Further operations on
- the items in the container will require specifying UiSelector as an item selector.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Constructor.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>container</th>
- <td>a <code><a href="UiSelector.html">UiSelector</a></code> selector
-</td>
+ <th>container</td>
+ <td>a <code><a href="UiSelector.html">UiSelector</a></code> selector to identify the scrollable
+ layout element.</td>
</tr>
</table>
</div>
@@ -1613,40 +1891,42 @@
-<a id="flingBackward()"></a>
+<A NAME="flingBackward()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">flingBackward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#scrollBackward(int)">scrollBackward(int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a backwards fling action with the default number of fling
+ steps (5). If the swipe direction is set to vertical,
+ then the swipe will be performed from top to bottom. If the swipe
+ direction is set to horizontal, then the swipes will be performed from
+ left to right. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if scrolled and false if the control can't scroll anymore
-</li></ul>
+ <ul class="nolist"><li>true if scrolled, and false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1658,40 +1938,42 @@
</div>
-<a id="flingForward()"></a>
+<A NAME="flingForward()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">flingForward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>A convenience version of <code><a href="#scrollForward(int)">scrollForward(int)</a></code>, performs a fling</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a forward fling with the default number of fling steps (5).
+ If the swipe direction is set to vertical, then the swipes will be
+ performed from bottom to top. If the swipe
+ direction is set to horizontal, then the swipes will be performed from
+ right to left. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if scrolled and false if the control can't scroll anymore
-</li></ul>
+ <ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1703,40 +1985,40 @@
</div>
-<a id="flingToBeginning(int)"></a>
+<A NAME="flingToBeginning(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">flingToBeginning</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#scrollToBeginning(int, int)">scrollToBeginning(int, int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a fling gesture to reach the beginning of a scrollable layout element.
+ The beginning can be at the top-most edge in the case of vertical controls, or
+ the left-most edge for horizontal controls. Make sure to take into
+ account devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true on scrolled else false
-</li></ul>
+ <ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1748,40 +2030,40 @@
</div>
-<a id="flingToEnd(int)"></a>
+<A NAME="flingToEnd(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">flingToEnd</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#scrollToEnd(int, int)">scrollToEnd(int, int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a fling gesture to reach the end of a scrollable layout element.
+ The end can be at the bottom-most edge in the case of vertical controls, or
+ the right-most edge for horizontal controls. Make sure to take into
+ account devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true on scrolled else false
-</li></ul>
+ <ul class="nolist"><li>true on scrolled, else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1793,56 +2075,61 @@
</div>
-<a id="getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)"></a>
+<A NAME="getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByDescription</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription(UiSelector, String)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container.
+ The search first looks for a child element that matches the selector
+ you provided, then looks for the content-description in its children elements.
+ If both search conditions are fulfilled, the method returns a {@ link UiObject}
+ representing the element matching the selector (not the child element in its
+ subhierarchy containing the content-description).</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>childPattern</th>
- <td><code><a href="UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td>
+ <th>childPattern</td>
+ <td><code><a href="UiSelector.html">UiSelector</a></code> for a child in a scollable layout element</td>
</tr>
<tr>
- <th>text</th>
- <td>String may be a partial match for the content-description of a child element.</td>
+ <th>text</td>
+ <td>Content-description to find in the children of
+ the <code>childPattern</code> match (may be a partial match)</td>
</tr>
<tr>
- <th>allowScrollSearch</th>
+ <th>allowScrollSearch</td>
<td>set to true if scrolling is allowed</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code></li></ul>
+ <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1854,58 +2141,58 @@
</div>
-<a id="getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)"></a>
+<A NAME="getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByDescription</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Searches for child UI element within the constraints of this UiScrollable <code><a href="UiSelector.html">UiSelector</a></code>
- container. It looks for any child matching the <code>childPattern</code> argument within its
- hierarchy with a matching content-description text. The returned UiObject will represent the
- UI element matching the <code>childPattern</code> and not the sub element that matched the
- content description.</p>
- By default this operation will perform scroll search while attempting to find the UI element
+
+ <div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container.
+ The search first looks for a child element that matches the selector
+ you provided, then looks for the content-description in its children elements.
+ If both search conditions are fulfilled, the method returns a {@ link UiObject}
+ representing the element matching the selector (not the child element in its
+ subhierarchy containing the content-description). By default, this method performs a
+ scroll search.
See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByDescription(UiSelector, String, boolean)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>childPattern</th>
- <td><code><a href="UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td>
+ <th>childPattern</td>
+ <td><code><a href="UiSelector.html">UiSelector</a></code> for a child in a scollable layout element</td>
</tr>
<tr>
- <th>text</th>
- <td>String of the identifying child contents of of the <code>childPattern</code></td>
+ <th>text</td>
+ <td>Content-description to find in the children of
+ the <code>childPattern</code> match</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code></li></ul>
+ <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1917,56 +2204,53 @@
</div>
-<a id="getChildByInstance(com.android.uiautomator.core.UiSelector, int)"></a>
+<A NAME="getChildByInstance(com.android.uiautomator.core.UiSelector, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByInstance</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, int instance)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Searches for child UI element within the constraints of this UiScrollable <code><a href="UiSelector.html">UiSelector</a></code>
- selector. It looks for any child matching the <code>childPattern</code> argument and
- return the <code>instance</code> specified. The operation is performed only on the visible
- items and no scrolling is performed in this case.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container that
+ matches the selector you provided. The search is performed without
+ scrolling and only on visible elements.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>childPattern</th>
- <td><code><a href="UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td>
+ <th>childPattern</td>
+ <td><code><a href="UiSelector.html">UiSelector</a></code> for a child in a scollable layout element</td>
</tr>
<tr>
- <th>instance</th>
- <td>int the desired matched instance of this <code>childPattern</code></td>
+ <th>instance</td>
+ <td>int number representing the occurance of
+ a <code>childPattern</code> match</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code>
-</li></ul>
+ <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -1978,56 +2262,59 @@
</div>
-<a id="getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)"></a>
+<A NAME="getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByText</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text, boolean allowScrollSearch)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText(UiSelector, String)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable container. The
+ search first looks for a child element that matches the
+ selector you provided, then looks for the text in its children elements.
+ If both search conditions are fulfilled, the method returns a {@ link UiObject}
+ representing the element matching the selector (not the child element in its
+ subhierarchy containing the text).</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>childPattern</th>
- <td><code><a href="UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td>
+ <th>childPattern</td>
+ <td><code><a href="UiSelector.html">UiSelector</a></code> selector for a child in a scrollable layout element</td>
</tr>
<tr>
- <th>text</th>
- <td>String of the identifying child contents of of the <code>childPattern</code></td>
+ <th>text</td>
+ <td>String to find in the children of the <code>childPattern</code> match</td>
</tr>
<tr>
- <th>allowScrollSearch</th>
+ <th>allowScrollSearch</td>
<td>set to true if scrolling is allowed</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code></li></ul>
+ <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2039,59 +2326,58 @@
</div>
-<a id="getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)"></a>
+<A NAME="getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
<a href="UiObject.html">UiObject</a>
</span>
<span class="sympad">getChildByText</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> childPattern, String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Searches for child UI element within the constraints of this UiScrollable <code><a href="UiSelector.html">UiSelector</a></code>
- container. It looks for any child matching the <code>childPattern</code> argument that has
- a sub UI element anywhere within its sub hierarchy that has text attribute
- <code>text</code>. The returned UiObject will point at the <code>childPattern</code>
- instance that matched the search and not at the text matched sub element</p>
- By default this operation will perform scroll search while attempting to find the UI
- element.
+
+ <div class="jd-tagdata jd-tagdescr"><p>Searches for a child element in the present scrollable
+ container. The search first looks for a child element that matches the
+ selector you provided, then looks for the text in its children elements.
+ If both search conditions are fulfilled, the method returns a {@ link UiObject}
+ representing the element matching the selector (not the child element in its
+ subhierarchy containing the text). By default, this method performs a
+ scroll search.
See <code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean)">getChildByText(UiSelector, String, boolean)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>childPattern</th>
- <td><code><a href="UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td>
+ <th>childPattern</td>
+ <td><code><a href="UiSelector.html">UiSelector</a></code> selector for a child in a scrollable layout element</td>
</tr>
<tr>
- <th>text</th>
- <td>String of the identifying child contents of of the <code>childPattern</code></td>
+ <th>text</td>
+ <td>String to find in the children of the <code>childPattern</code> match</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code></li></ul>
+ <ul class="nolist"><li><code><a href="UiObject.html">UiObject</a></code> representing the child element that matches the search conditions</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
+
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2103,135 +2389,124 @@
</div>
-<a id="getMaxSearchSwipes()"></a>
+<A NAME="getMaxSearchSwipes()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
int
</span>
<span class="sympad">getMaxSearchSwipes</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>#getChildByDescription(String, boolean) and #getChildByText(String, boolean)
- use an arguments that specifies if scrolling is allowed while searching for the UI element.
- The number of scrolls currently allowed to perform a search can be read by this method.
- See <code><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes(int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the maximum number of scrolls allowed when performing a
+ scroll action in search of a child element.
+ See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription(UiSelector, String)</a></code> and
+ <code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText(UiSelector, String)</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>max value of the number of swipes currently allowed during a scroll search
-</li></ul>
+ <ul class="nolist"><li>max the number of search swipes to perform until giving up</li></ul>
</div>
</div>
</div>
-<a id="getSwipeDeadZonePercentage()"></a>
+<A NAME="getSwipeDeadZonePercentage()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
double
</span>
<span class="sympad">getSwipeDeadZonePercentage</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Returns the percentage of a widget's size that's considered as a no touch zone when swiping.
- Dead zones are set as percentage of a widget's total width or height, denoting a margin
- around the swipable area of the widget. Swipes must start and
- end inside this margin.
-
- This is important when the widget being swiped may not respond to the swipe if
- started at a point too near to the edge. The default is 10% from either edge.</p></div>
+ <div class="jd-tagdata jd-tagdescr"><p>Returns the percentage of a widget's size that's considered as a no-touch
+ zone when swiping. The no-touch zone is set as a percentage of a widget's total
+ width or height, denoting a margin around the swipable area of the widget.
+ Swipes must start and end inside this margin. This is important when the
+ widget being swiped may not respond to the swipe if started at a point
+ too near to the edge. The default is 10% from either edge.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>a value between 0 and 1
-</li></ul>
+ <ul class="nolist"><li>a value between 0 and 1</li></ul>
</div>
</div>
</div>
-<a id="scrollBackward(int)"></a>
+<A NAME="scrollBackward(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollBackward</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Perform a scroll backward. If this list is set to vertical (see <code><a href="#setAsVerticalList()">setAsVerticalList()</a></code>
- default) then the swipes will be executed from the top to bottom. If this list is set
- to horizontal (see <code><a href="#setAsHorizontalList()">setAsHorizontalList()</a></code>) then the swipes will be executed from
- the left to right. Caution is required on devices configured with right to left languages
- like Arabic and Hebrew.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a backward scroll. If the swipe direction is set to vertical,
+ then the swipes will be performed from top to bottom. If the swipe
+ direction is set to horizontal, then the swipes will be performed from
+ left to right. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
- <td>use steps to control the speed, so that it may be a scroll, or fling</td>
+ <th>steps</td>
+ <td>number of steps. Use this to control the speed of the scroll action.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if scrolled and false if the control can't scroll anymore
-</li></ul>
+ <ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2243,40 +2518,42 @@
</div>
-<a id="scrollBackward()"></a>
+<A NAME="scrollBackward()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollBackward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#scrollBackward(int)">scrollBackward(int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a backward scroll with the default number of scroll steps (55).
+ If the swipe direction is set to vertical,
+ then the swipes will be performed from top to bottom. If the swipe
+ direction is set to horizontal, then the swipes will be performed from
+ left to right. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if scrolled and false if the control can't scroll anymore
-</li></ul>
+ <ul class="nolist"><li>true if scrolled, and false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2288,50 +2565,48 @@
</div>
-<a id="scrollDescriptionIntoView(java.lang.String)"></a>
+<A NAME="scrollDescriptionIntoView(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollDescriptionIntoView</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Performs a swipe Up on the UI element until the requested content-description
- is visible or until swipe attempts have been exhausted. See <code><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes(int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll action on the scrollable layout element until
+ the content-description is found, or until swipe attempts have been exhausted.
+ See <code><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes(int)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>text</th>
- <td>to look for anywhere within the contents of this scrollable.</td>
+ <th>text</td>
+ <td>content-description to find within the contents of this scrollable layout element.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if item us found else false
-</li></ul>
+ <ul class="nolist"><li>true if item is found; else, false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2343,40 +2618,42 @@
</div>
-<a id="scrollForward()"></a>
+<A NAME="scrollForward()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollForward</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>A convenience version of <code><a href="#scrollForward(int)">scrollForward(int)</a></code>, performs a regular scroll</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll with the default number of scroll steps (55).
+ If the swipe direction is set to vertical,
+ then the swipes will be performed from bottom to top. If the swipe
+ direction is set to horizontal, then the swipes will be performed from
+ right to left. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if scrolled and false if the control can't scroll anymore
-</li></ul>
+ <ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2388,53 +2665,50 @@
</div>
-<a id="scrollForward(int)"></a>
+<A NAME="scrollForward(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollForward</span>
<span class="normal">(int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Perform a scroll forward. If this list is set to vertical (see <code><a href="#setAsVerticalList()">setAsVerticalList()</a></code>
- default) then the swipes will be executed from the bottom to top. If this list is set
- to horizontal (see <code><a href="#setAsHorizontalList()">setAsHorizontalList()</a></code>) then the swipes will be executed from
- the right to left. Caution is required on devices configured with right to left languages
- like Arabic and Hebrew.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll. If the swipe direction is set to vertical,
+ then the swipes will be performed from bottom to top. If the swipe
+ direction is set to horizontal, then the swipes will be performed from
+ right to left. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
- <td>use steps to control the speed, so that it may be a scroll, or fling</td>
+ <th>steps</td>
+ <td>number of steps. Use this to control the speed of the scroll action</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if scrolled and false if the control can't scroll anymore
-</li></ul>
+ <ul class="nolist"><li>true if scrolled, false if can't scroll anymore</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2446,50 +2720,49 @@
</div>
-<a id="scrollIntoView(com.android.uiautomator.core.UiSelector)"></a>
+<A NAME="scrollIntoView(com.android.uiautomator.core.UiSelector)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollIntoView</span>
<span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Perform a scroll search for a UI element matching the <code><a href="UiSelector.html">UiSelector</a></code> selector argument.
+
+ <div class="jd-tagdata jd-tagdescr"><p>Perform a scroll forward action to move through the scrollable layout
+ element until a visible item that matches the selector is found.
+
See <code><a href="#scrollDescriptionIntoView(java.lang.String)">scrollDescriptionIntoView(String)</a></code> and <code><a href="#scrollTextIntoView(java.lang.String)">scrollTextIntoView(String)</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>selector</th>
+ <th>selector</td>
<td><code><a href="UiSelector.html">UiSelector</a></code> selector</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if the item was found and now is in view else false
-</li></ul>
+ <ul class="nolist"><li>true if the item was found and now is in view; else, false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2501,50 +2774,100 @@
</div>
-<a id="scrollTextIntoView(java.lang.String)"></a>
+<A NAME="scrollIntoView(com.android.uiautomator.core.UiObject)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">scrollIntoView</span>
+ <span class="normal">(<a href="UiObject.html">UiObject</a> obj)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Perform a forward scroll action to move through the scrollable layout element until
+ a visible item that matches the <code><a href="UiObject.html">UiObject</a></code> is found.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>obj</td>
+ <td><code><a href="UiObject.html">UiObject</a></code></td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if the item was found and now is in view else false</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Throws</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+
+ </div>
+</div>
+
+
+<A NAME="scrollTextIntoView(java.lang.String)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollTextIntoView</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Performs a swipe up on the UI element until the requested text is visible
- or until swipe attempts have been exhausted. See <code><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes(int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Performs a forward scroll action on the scrollable layout element until
+ the text you provided is visible, or until swipe attempts have been exhausted.
+ See <code><a href="#setMaxSearchSwipes(int)">setMaxSearchSwipes(int)</a></code></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>text</th>
- <td>to look for</td>
+ <th>text</td>
+ <td>test to look for</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true if item us found else false
-</li></ul>
+ <ul class="nolist"><li>true if item is found; else, false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2556,40 +2879,40 @@
</div>
-<a id="scrollToBeginning(int)"></a>
+<A NAME="scrollToBeginning(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollToBeginning</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See <code><a href="#scrollToBeginning(int, int)">scrollToBeginning(int, int)</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Scrolls to the beginning of a scrollable layout element. The beginning
+ can be at the top-most edge in the case of vertical controls, or the
+ left-most edge for horizontal controls. Make sure to take into account
+ devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true on scrolled else false
-</li></ul>
+ <ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2601,51 +2924,49 @@
</div>
-<a id="scrollToBeginning(int, int)"></a>
+<A NAME="scrollToBeginning(int, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollToBeginning</span>
<span class="normal">(int maxSwipes, int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Scrolls to the beginning of a scrollable UI element. The beginning could be the top most
- in case of vertical lists or the left most in case of horizontal lists. Caution is required
- on devices configured with right to left languages like Arabic and Hebrew.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Scrolls to the beginning of a scrollable layout element. The beginning
+ can be at the top-most edge in the case of vertical controls, or the
+ left-most edge for horizontal controls. Make sure to take into account
+ devices configured with right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
+ <th>steps</td>
<td>use steps to control the speed, so that it may be a scroll, or fling</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true on scrolled else false
-</li></ul>
+ <ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2657,51 +2978,49 @@
</div>
-<a id="scrollToEnd(int, int)"></a>
+<A NAME="scrollToEnd(int, int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollToEnd</span>
<span class="normal">(int maxSwipes, int steps)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Scrolls to the end of a scrollable UI element. The end could be the bottom most
- in case of vertical controls or the right most for horizontal controls. Caution
- is required on devices configured with right to left languages like Arabic and Hebrew.</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Scrolls to the end of a scrollable layout element. The end can be at the
+ bottom-most edge in the case of vertical controls, or the right-most edge for
+ horizontal controls. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>steps</th>
+ <th>steps</td>
<td>use steps to control the speed, so that it may be a scroll, or fling</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true on scrolled else false
-</li></ul>
+ <ul class="nolist"><li>true on scrolled else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2713,40 +3032,40 @@
</div>
-<a id="scrollToEnd(int)"></a>
+<A NAME="scrollToEnd(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
boolean
</span>
<span class="sympad">scrollToEnd</span>
<span class="normal">(int maxSwipes)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>See {@link UiScrollable#scrollToEnd(int, int)</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Scrolls to the end of a scrollable layout element. The end can be at the
+ bottom-most edge in the case of vertical controls, or the right-most edge for
+ horizontal controls. Make sure to take into account devices configured with
+ right-to-left languages like Arabic and Hebrew.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>true on scrolled else false
-</li></ul>
+ <ul class="nolist"><li>true on scrolled, else false</li></ul>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
+ <table class="jd-tagtable">
<tr>
<th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td>
<td></td>
@@ -2758,157 +3077,207 @@
</div>
-<a id="setAsHorizontalList()"></a>
+<A NAME="setAsHorizontalList()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- void
+ public
+
+
+
+
+ <a href="#">UiScrollable</a>
</span>
<span class="sympad">setAsHorizontalList</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Set the direction of swipes when performing scroll search
-</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Set the direction of swipes to be horizontal when performing scroll actions.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>reference to itself</li></ul>
+ </div>
</div>
</div>
-<a id="setAsVerticalList()"></a>
+<A NAME="setAsVerticalList()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- void
+ public
+
+
+
+
+ <a href="#">UiScrollable</a>
</span>
<span class="sympad">setAsVerticalList</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Set the direction of swipes when performing scroll search
-</p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Set the direction of swipes to be vertical when performing scroll actions.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>reference to itself</li></ul>
+ </div>
</div>
</div>
-<a id="setMaxSearchSwipes(int)"></a>
+<A NAME="setMaxSearchSwipes(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- void
+ public
+
+
+
+
+ <a href="#">UiScrollable</a>
</span>
<span class="sympad">setMaxSearchSwipes</span>
<span class="normal">(int swipes)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>#getChildByDescription(String, boolean) and #getChildByText(String, boolean)
- use an arguments that specifies if scrolling is allowed while searching for the UI element.
- The number of scrolls allowed to perform a search can be modified by this method.
- The current value can be read by calling <code><a href="#getMaxSearchSwipes()">getMaxSearchSwipes()</a></code></p></div>
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the maximum number of scrolls allowed when performing a
+ scroll action in search of a child element.
+ See <code><a href="#getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByDescription(UiSelector, String)</a></code> and
+ <code><a href="#getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String)">getChildByText(UiSelector, String)</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>swipes</th>
- <td>is the number of search swipes until abort
-</td>
+ <th>swipes</td>
+ <td>the number of search swipes to perform until giving up</td>
</tr>
</table>
</div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>reference to itself</li></ul>
+ </div>
</div>
</div>
-<a id="setSwipeDeadZonePercentage(double)"></a>
+<A NAME="setSwipeDeadZonePercentage(double)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- void
+ public
+
+
+
+
+ <a href="#">UiScrollable</a>
</span>
<span class="sympad">setSwipeDeadZonePercentage</span>
<span class="normal">(double swipeDeadZonePercentage)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Sets the percentage of a widget's size that's considered as a no touch zone when swiping.
- Dead zones are set as percentage of a widget's total width or height, denoting a margin
- around the swipable area of the widget. Swipes must always start and
- end inside this margin.
-
- This is important when the widget being swiped may not respond to the swipe if
- started at a point too near to the edge. The default is 10% from either edge</p></div>
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the percentage of a widget's size that's considered as no-touch
+ zone when swiping.
+ The no-touch zone is set as percentage of a widget's total width or height,
+ denoting a margin around the swipable area of the widget. Swipes must
+ always start and end inside this margin. This is important when the
+ widget being swiped may not respond to the swipe if started at a point
+ too near to the edge. The default is 10% from either edge.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>swipeDeadZonePercentage</th>
- <td>is a value between 0 and 1
-</td>
+ <th>swipeDeadZonePercentage</td>
+ <td>is a value between 0 and 1</td>
</tr>
</table>
</div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>reference to itself</li></ul>
+ </div>
</div>
</div>
+
+
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+
+<h2>Protected Methods</h2>
+
+
+
+<A NAME="exists(com.android.uiautomator.core.UiSelector)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+
+
+
+
+ boolean
+ </span>
+ <span class="sympad">exists</span>
+ <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Used privately when performing swipe searches to decide if an element has become
+ visible or not.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>true if found else false</li></ul>
+ </div>
+
+ </div>
+
+
+
+
+
diff --git a/docs/html/tools/help/uiautomator/UiSelector.jd b/docs/html/tools/help/uiautomator/UiSelector.jd
index 96d3fd8..c9a1eed 100644
--- a/docs/html/tools/help/uiautomator/UiSelector.jd
+++ b/docs/html/tools/help/uiautomator/UiSelector.jd
@@ -5,40 +5,10 @@
<style>
h4.jd-details-title {background-color: #DEE8F1;}
</style>
-
-
-<h2>Class Overview</h2>
-<p>This class provides the mechanism for tests to describe the UI elements they
- intend to target. A UI element has many properties associated with it such as
- text value, content-description, class name and multiple state information like
- selected, enabled, checked etc. Additionally UiSelector allows targeting of UI
- elements within a specific display hierarchies to distinguish similar elements
- based in the hierarchies they're in.</p>
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
+<p>Specifies the elements in the layout hierarchy for tests to target, filtered
+by properties such as text value, content-description, class name, and state
+information. You can also target an element by its location in a layout
+hierarchy.</p>
<h2>Summary</h2>
@@ -68,19 +38,19 @@
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ </nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#UiSelector()">UiSelector</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#UiSelector()">UiSelector</a></span>()</nobr>
+
</td></tr>
@@ -97,486 +67,542 @@
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#checked(boolean)">checked</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#checkable(boolean)">checkable</a></span>(boolean val)</nobr>
+
+ <div class="jd-descrdiv">Set the search criteria to match widgets that are checkable.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#checked(boolean)">checked</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that
are currently checked (usually for checkboxes).</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#childSelector(com.android.uiautomator.core.UiSelector)">childSelector</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#childSelector(com.android.uiautomator.core.UiSelector)">childSelector</a></span>(<a href="#">UiSelector</a> selector)</nobr>
+
<div class="jd-descrdiv">Adds a child UiSelector criteria to this selector.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#className(java.lang.String)">className</a></span>(String className)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#className(java.lang.String)">className</a></span>(String className)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the class property
for a widget (for example, "android.widget.Button").</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
<T>
- <a href="UiSelector.html">UiSelector</a>
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#className(java.lang.Class<T>)">className</a></span>(Class<T> type)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#className(java.lang.Class<T>)">className</a></span>(Class<T> type)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the class property
for a widget (for example, "android.widget.Button").</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#classNameMatches(java.lang.String)">classNameMatches</a></span>(String regex)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#classNameMatches(java.lang.String)">classNameMatches</a></span>(String regex)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the class property
- for a widget (for example, "android.widget.Button").</div>
-
+ for a widget, using a regular expression.</div>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#clickable(boolean)">clickable</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#clickable(boolean)">clickable</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that are clickable.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#description(java.lang.String)">description</a></span>(String desc)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#description(java.lang.String)">description</a></span>(String desc)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the content-description
property for a widget.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#descriptionContains(java.lang.String)">descriptionContains</a></span>(String desc)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#descriptionContains(java.lang.String)">descriptionContains</a></span>(String desc)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the content-description
property for a widget.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#descriptionMatches(java.lang.String)">descriptionMatches</a></span>(String regex)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#descriptionMatches(java.lang.String)">descriptionMatches</a></span>(String regex)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the content-description
property for a widget.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#descriptionStartsWith(java.lang.String)">descriptionStartsWith</a></span>(String desc)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#descriptionStartsWith(java.lang.String)">descriptionStartsWith</a></span>(String desc)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the content-description
property for a widget.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#enabled(boolean)">enabled</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#enabled(boolean)">enabled</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that are enabled.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#focusable(boolean)">focusable</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#focusable(boolean)">focusable</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that are focusable.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#focused(boolean)">focused</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#focused(boolean)">focused</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that have focus.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#fromParent(com.android.uiautomator.core.UiSelector)">fromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#fromParent(com.android.uiautomator.core.UiSelector)">fromParent</a></span>(<a href="#">UiSelector</a> selector)</nobr>
+
<div class="jd-descrdiv">Adds a child UiSelector criteria to this selector which is used to
start search from the parent widget.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#index(int)">index</a></span>(int index)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#index(int)">index</a></span>(int index)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the widget by its node
index in the layout hierarchy.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#instance(int)">instance</a></span>(int instance)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#instance(int)">instance</a></span>(int instance)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the
widget by its instance number.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#longClickable(boolean)">longClickable</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#longClickable(boolean)">longClickable</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that are long-clickable.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#packageName(java.lang.String)">packageName</a></span>(String name)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#packageName(java.lang.String)">packageName</a></span>(String name)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the package name
of the application that contains the widget.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#packageNameMatches(java.lang.String)">packageNameMatches</a></span>(String regex)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#packageNameMatches(java.lang.String)">packageNameMatches</a></span>(String regex)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the package name
of the application that contains the widget.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#scrollable(boolean)">scrollable</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#resourceId(java.lang.String)">resourceId</a></span>(String id)</nobr>
+
+ <div class="jd-descrdiv">Set the search criteria to match the given resource ID.</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#resourceIdMatches(java.lang.String)">resourceIdMatches</a></span>(String regex)</nobr>
+
+ <div class="jd-descrdiv">Set the search criteria to match the resource ID
+ of the widget, using a regular expression.http://blog.bettersoftwaretesting.com/</div>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#scrollable(boolean)">scrollable</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that are scrollable.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#selected(boolean)">selected</a></span>(boolean val)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#selected(boolean)">selected</a></span>(boolean val)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match widgets that
are currently selected.</div>
-
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#text(java.lang.String)">text</a></span>(String text)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#text(java.lang.String)">text</a></span>(String text)</nobr>
+
<div class="jd-descrdiv">Set the search criteria to match the visible text displayed
- for a widget (for example, the text label to launch an app).</div>
-
+ in a widget (for example, the text label to launch an app).</div>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#textContains(java.lang.String)">textContains</a></span>(String text)
-
- <div class="jd-descrdiv">Set the search criteria to match the visible text displayed
- for a widget (for example, the text label to launch an app).</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#textContains(java.lang.String)">textContains</a></span>(String text)</nobr>
+
+ <div class="jd-descrdiv">Set the search criteria to match the visible text in a widget
+ where the visible text must contain the string in your input argument.</div>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#textMatches(java.lang.String)">textMatches</a></span>(String regex)
-
- <div class="jd-descrdiv">Set the search criteria to match the visible text displayed
- for a widget (for example, the text label to launch an app).</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#textMatches(java.lang.String)">textMatches</a></span>(String regex)</nobr>
+
+ <div class="jd-descrdiv">Set the search criteria to match the visible text displayed in a layout
+ element, using a regular expression.</div>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#textStartsWith(java.lang.String)">textStartsWith</a></span>(String text)
-
- <div class="jd-descrdiv">Text property is usually the widget's visible text on the display.</div>
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#textStartsWith(java.lang.String)">textStartsWith</a></span>(String text)</nobr>
+
+ <div class="jd-descrdiv">Set the search criteria to match visible text in a widget that is
+ prefixed by the text parameter.</div>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- String
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad"><a href="#toString()">toString</a></span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#toString()">toString</a></span>()</nobr>
+
</td></tr>
@@ -586,6 +612,31 @@
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
+
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="#">UiSelector</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="#cloneSelector()">cloneSelector</a></span>()</nobr>
+
+ </td></tr>
+
+
+
+</table>
+
+
@@ -595,7 +646,7 @@
<div style="clear:left;">Inherited Methods</div></th></tr>
-<tr class="api apilevel-" >
+<tr class="api" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
@@ -611,150 +662,182 @@
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
-
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- boolean
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Object</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">equals</span>(Object arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">clone</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">equals</span>(Object arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">finalize</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- Class<?>
+
+
+ Class<?></nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">getClass</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getClass</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- int
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">hashCode</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">hashCode</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notify</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notify</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">notifyAll</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notifyAll</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
-
-
-
- String
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">toString</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">toString</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>()
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>()</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0, int arg1)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
+
</td></tr>
-
- <tr class="api">
- <td class="jd-typecol">
-
-
+
+ <tr class="api" >
+ <td class="jd-typecol"><nobr>
+
+
final
-
-
- void
+
+
+ void</nobr>
</td>
- <td class="jd-linkcol" width="100%">
- <span class="sympad">wait</span>(long arg0)
-
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0)</nobr>
+
</td></tr>
@@ -798,31 +881,29 @@
-<a id="UiSelector()"></a>
+<A NAME="UiSelector()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
-
+ public
+
+
+
+
+
</span>
<span class="sympad">UiSelector</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
@@ -844,31 +925,76 @@
-<a id="checked(boolean)"></a>
+<A NAME="checkable(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
+ </span>
+ <span class="sympad">checkable</span>
+ <span class="normal">(boolean val)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that are checkable.
+
+ Typically, using this search criteria alone is not useful.
+ You should also include additional criteria, such as text,
+ content-description, or the class name for a widget.
+
+ If no other search criteria is specified, and there is more
+ than one matching widget, the first widget in the tree
+ is selected.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>val</td>
+ <td>Value to match</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="checked(boolean)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">checked</span>
<span class="normal">(boolean val)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that
are currently checked (usually for checkboxes).
@@ -883,7 +1009,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -897,31 +1023,29 @@
</div>
-<a id="childSelector(com.android.uiautomator.core.UiSelector)"></a>
+<A NAME="childSelector(com.android.uiautomator.core.UiSelector)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">childSelector</span>
- <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
+ <span class="normal">(<a href="#">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Adds a child UiSelector criteria to this selector.
Use this selector to narrow the search scope to
@@ -935,38 +1059,30 @@
</div>
-<a id="className(java.lang.String)"></a>
+<A NAME="className(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">className</span>
<span class="normal">(String className)</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the class property
for a widget (for example, "android.widget.Button").</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>className</th>
+ <th>className</td>
<td>Value to match</td>
</tr>
</table>
@@ -975,114 +1091,120 @@
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
</div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="className(java.lang.Class<T>)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
+ </span>
+ <span class="sympad">className</span>
+ <span class="normal">(Class<T> type)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the class property
+ for a widget (for example, "android.widget.Button").</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>type</td>
+ <td>type</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
+ </div>
</div>
</div>
-<a id="className(java.lang.Class<T>)"></a>
+<A NAME="classNameMatches(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
- </span>
- <span class="sympad">className</span>
- <span class="normal">(Class<T> type)</span>
- </h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the class property
- for a widget (for example, "android.widget.Button").</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
- </div>
-</div>
+ public
-<a id="classNameMatches(java.lang.String)"></a>
-<div class="jd-details api ">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">classNameMatches</span>
<span class="normal">(String regex)</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the class property
- for a widget (for example, "android.widget.Button").</p></div>
+ for a widget, using a regular expression.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>regex</td>
+ <td>a regular expression</td>
+ </tr>
+ </table>
+ </div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="clickable(boolean)"></a>
+<A NAME="clickable(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">clickable</span>
<span class="normal">(boolean val)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that are clickable.
Typically, using this search criteria alone is not useful.
@@ -1096,7 +1218,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -1110,31 +1232,29 @@
</div>
-<a id="description(java.lang.String)"></a>
+<A NAME="description(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">description</span>
<span class="normal">(String desc)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the content-description
property for a widget.
@@ -1150,7 +1270,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>desc</th>
+ <th>desc</td>
<td>Value to match</td>
</tr>
</table>
@@ -1164,31 +1284,29 @@
</div>
-<a id="descriptionContains(java.lang.String)"></a>
+<A NAME="descriptionContains(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">descriptionContains</span>
<span class="normal">(String desc)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the content-description
property for a widget.
@@ -1204,7 +1322,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>desc</th>
+ <th>desc</td>
<td>Value to match</td>
</tr>
</table>
@@ -1218,31 +1336,23 @@
</div>
-<a id="descriptionMatches(java.lang.String)"></a>
+<A NAME="descriptionMatches(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">descriptionMatches</span>
<span class="normal">(String regex)</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the content-description
property for a widget.
@@ -1253,42 +1363,49 @@
for the widget must match exactly
with the string in your input argument.</p></div>
<div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>regex</td>
+ <td>a regular expression</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="descriptionStartsWith(java.lang.String)"></a>
+<A NAME="descriptionStartsWith(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">descriptionStartsWith</span>
<span class="normal">(String desc)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the content-description
property for a widget.
@@ -1304,7 +1421,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>desc</th>
+ <th>desc</td>
<td>Value to match</td>
</tr>
</table>
@@ -1318,31 +1435,29 @@
</div>
-<a id="enabled(boolean)"></a>
+<A NAME="enabled(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">enabled</span>
<span class="normal">(boolean val)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that are enabled.
Typically, using this search criteria alone is not useful.
@@ -1356,7 +1471,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -1370,31 +1485,29 @@
</div>
-<a id="focusable(boolean)"></a>
+<A NAME="focusable(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">focusable</span>
<span class="normal">(boolean val)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that are focusable.
Typically, using this search criteria alone is not useful.
@@ -1408,7 +1521,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -1422,31 +1535,29 @@
</div>
-<a id="focused(boolean)"></a>
+<A NAME="focused(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">focused</span>
<span class="normal">(boolean val)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that have focus.
Typically, using this search criteria alone is not useful.
@@ -1460,7 +1571,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -1474,31 +1585,29 @@
</div>
-<a id="fromParent(com.android.uiautomator.core.UiSelector)"></a>
+<A NAME="fromParent(com.android.uiautomator.core.UiSelector)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">fromParent</span>
- <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span>
+ <span class="normal">(<a href="#">UiSelector</a> selector)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Adds a child UiSelector criteria to this selector which is used to
start search from the parent widget.
@@ -1513,31 +1622,29 @@
</div>
-<a id="index(int)"></a>
+<A NAME="index(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">index</span>
<span class="normal">(int index)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the widget by its node
index in the layout hierarchy.
@@ -1550,7 +1657,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>index</th>
+ <th>index</td>
<td>Value to match</td>
</tr>
</table>
@@ -1564,31 +1671,29 @@
</div>
-<a id="instance(int)"></a>
+<A NAME="instance(int)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">instance</span>
<span class="normal">(int instance)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the
widget by its instance number.
@@ -1609,7 +1714,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>instance</th>
+ <th>instance</td>
<td>Value to match</td>
</tr>
</table>
@@ -1623,31 +1728,23 @@
</div>
-<a id="longClickable(boolean)"></a>
+<A NAME="longClickable(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">longClickable</span>
<span class="normal">(boolean val)</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that are long-clickable.
Typically, using this search criteria alone is not useful.
@@ -1661,7 +1758,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -1671,45 +1768,43 @@
<ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="packageName(java.lang.String)"></a>
+<A NAME="packageName(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">packageName</span>
<span class="normal">(String name)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the package name
of the application that contains the widget.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>name</th>
+ <th>name</td>
<td>Value to match</td>
</tr>
</table>
@@ -1723,70 +1818,148 @@
</div>
-<a id="packageNameMatches(java.lang.String)"></a>
+<A NAME="packageNameMatches(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">packageNameMatches</span>
<span class="normal">(String regex)</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the package name
of the application that contains the widget.</p></div>
<div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>regex</td>
+ <td>a regular expression</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="scrollable(boolean)"></a>
+<A NAME="resourceId(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
+ </span>
+ <span class="sympad">resourceId</span>
+ <span class="normal">(String id)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the given resource ID.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>id</td>
+ <td>Value to match</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="resourceIdMatches(java.lang.String)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
+ </span>
+ <span class="sympad">resourceIdMatches</span>
+ <span class="normal">(String regex)</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the resource ID
+ of the widget, using a regular expression.http://blog.bettersoftwaretesting.com/</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>regex</td>
+ <td>a regular expression</td>
+ </tr>
+ </table>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Returns</h5>
+ <ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
+ </div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 18</li></ul>
+ </div>
+ </div>
+</div>
+
+
+<A NAME="scrollable(boolean)"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">scrollable</span>
<span class="normal">(boolean val)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that are scrollable.
Typically, using this search criteria alone is not useful.
@@ -1800,7 +1973,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -1814,31 +1987,29 @@
</div>
-<a id="selected(boolean)"></a>
+<A NAME="selected(boolean)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">selected</span>
<span class="normal">(boolean val)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match widgets that
are currently selected.
@@ -1853,7 +2024,7 @@
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>val</th>
+ <th>val</td>
<td>Value to match</td>
</tr>
</table>
@@ -1867,42 +2038,39 @@
</div>
-<a id="text(java.lang.String)"></a>
+<A NAME="text(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">text</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the visible text displayed
- for a widget (for example, the text label to launch an app).
- The text for the widget must match exactly
- with the string in your input argument.
- Matching is case-sensitive.</p></div>
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the visible text displayed
+ in a widget (for example, the text label to launch an app).
+
+ The text for the element must match exactly with the string in your input
+ argument. Matching is case-sensitive.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>text</th>
+ <th>text</td>
<td>Value to match</td>
</tr>
</table>
@@ -1916,41 +2084,38 @@
</div>
-<a id="textContains(java.lang.String)"></a>
+<A NAME="textContains(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">textContains</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the visible text displayed
- for a widget (for example, the text label to launch an app).
- The text for the widget must contain the string in
- your input argument. Matching is case-sensitive.</p></div>
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the visible text in a widget
+ where the visible text must contain the string in your input argument.
+
+ The matching is case-sensitive.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
- <th>text</th>
+ <th>text</td>
<td>Value to match</td>
</tr>
</table>
@@ -1964,113 +2129,117 @@
</div>
-<a id="textMatches(java.lang.String)"></a>
+<A NAME="textMatches(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">textMatches</span>
<span class="normal">(String regex)</span>
</h4>
- <div class="api-level">
- <div>
-
-</div>
-
-
-
- </div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the visible text displayed
- for a widget (for example, the text label to launch an app).
- The text for the widget must match exactly
- with the string in your input argument.</p></div>
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match the visible text displayed in a layout
+ element, using a regular expression.
+
+ The text in the widget must match exactly with the string in your
+ input argument.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>regex</td>
+ <td>a regular expression</td>
+ </tr>
+ </table>
+ </div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
</div>
<div class="jd-tagdata">
- <h5 class="jd-tagtitle">Since</h5>
- <ul class="nolist"><li>Android API Level 17</li></ul>
-</div>
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
</div>
</div>
-<a id="textStartsWith(java.lang.String)"></a>
+<A NAME="textStartsWith(java.lang.String)"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
- <a href="UiSelector.html">UiSelector</a>
+ public
+
+
+
+
+ <a href="#">UiSelector</a>
</span>
<span class="sympad">textStartsWith</span>
<span class="normal">(String text)</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Text property is usually the widget's visible text on the display.
- Adding this to the search criteria indicates that the search performed
- should match a widget with text value starting with the text parameter.
+ <div class="jd-tagdata jd-tagdescr"><p>Set the search criteria to match visible text in a widget that is
+ prefixed by the text parameter.
- The matching will be case-insensitive.</p></div>
+ The matching is case-insensitive.</p></div>
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Parameters</h5>
+ <table class="jd-tagtable">
+ <tr>
+ <th>text</td>
+ <td>Value to match</td>
+ </tr>
+ </table>
+ </div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>UiSelector with this added search criterion</li></ul>
+ <ul class="nolist"><li>UiSelector with the specified search criteria</li></ul>
</div>
</div>
</div>
-<a id="toString()"></a>
+<A NAME="toString()"></A>
-<div class="jd-details api ">
+<div class="jd-details api">
<h4 class="jd-details-title">
<span class="normal">
- public
-
-
-
-
+ public
+
+
+
+
String
</span>
<span class="sympad">toString</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
- <div>
+ <div></div>
-</div>
-
-
+
</div>
<div class="jd-details-descr">
-
+
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
@@ -2082,7 +2251,36 @@
<!-- ========= METHOD DETAIL ======== -->
+<h2>Protected Methods</h2>
-<!-- ========= END OF CLASS DATA ========= -->
+
+<A NAME="cloneSelector()"></A>
+
+<div class="jd-details api">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ protected
+
+
+
+
+ <a href="#">UiSelector</a>
+ </span>
+ <span class="sympad">cloneSelector</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata">
+ <h5 class="jd-tagtitle">Since</h5>
+ <ul class="nolist"><li>Android API Level 17</li></ul>
+ </div>
+
+ </div>
+
+
+
+
+
diff --git a/docs/html/tools/help/uiautomator/UiWatcher.jd b/docs/html/tools/help/uiautomator/UiWatcher.jd
index b416fad..9268c35 100644
--- a/docs/html/tools/help/uiautomator/UiWatcher.jd
+++ b/docs/html/tools/help/uiautomator/UiWatcher.jd
@@ -9,9 +9,6 @@
<p>Represents a conditional watcher on the target device. To learn how to register a conditional
watcher, see <code><a href="UiDevice.html#registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher)">UiDevice.registerWatcher()</a></code>.
</p>
-
-<div class="jd-descr">
-
<h2>Summary</h2>
<!-- ========== METHOD SUMMARY =========== -->
@@ -75,4 +72,3 @@
</div>
</div>
-</div>
diff --git a/docs/html/tools/help/uiautomator/index.jd b/docs/html/tools/help/uiautomator/index.jd
index e3899d6..4b3c255 100644
--- a/docs/html/tools/help/uiautomator/index.jd
+++ b/docs/html/tools/help/uiautomator/index.jd
@@ -26,7 +26,7 @@
<h2 id="syntax">Syntax</h2>
<p>To run your testcases on the target device, you can use the {@code adb shell} command to invoke the {@code uiautomator} tool. The syntax is:
<pre>
-adb shell uiautomator runtest <jar> -c <test_class_or_method> [options]
+adb shell uiautomator runtest <JARS> -c <CLASSES> [options]
</pre>
</p>
<p>Here’s an example:</p>
@@ -45,19 +45,26 @@
</tr>
<tr>
-<td rowspan="6"><code>runtest</code></td>
-<td><nobr>{@code <jar>}</nobr></td>
-<td><strong>Required</strong>. The {@code <jar>} argument is the name of one or more JAR files that you deployed to the target device which contain your uiautomator testcases. You can list more than one JAR file by using a space as a separator.</td>
+<td rowspan="7"><code>runtest</code></td>
+<td><nobr>{@code <JARS>}</nobr></td>
+<td><strong>Required</strong>. The {@code <JARS>} argument is the name of one or more JAR files that you deployed to the target device which contain your uiautomator testcases. You can list more than one JAR file by using a space as a separator.</td>
</tr>
<tr>
-<td><nobr><code>-c <test_class_or_method> </code></nobr></td>
-<td><strong>Required</strong>. The {@code <test_class_or_method>} argument is a list of one or more specific test classes or test methods from the JARs that you want {@code uiautomator} to run. <p>Each class or method must be fully qualified with the package name, in one of these formats:
+<td><nobr><code>-c <CLASSES> </code></nobr></td>
+<td><strong>Required (API 17 or lower)</strong>.The {@code <CLASSES>}
+argument is a list of test classes or test methods in {@code <JARS>} to run.
+<p>Each class or method must be fully
+qualified with the package name, in one of these formats:
<ul>
<li>{@code package_name.class_name}</li>
<li>{@code package_name.class_name#method_name}</li>
</ul>
-You can list multiple classes or methods by using a space as a separator.</p></td>
+You can list multiple classes or methods by using a space as a separator.</p>
+<p class="note"><strong>Note:</strong>This argument is not required for API 18
+and higher. If not specified, all test cases in {@code <JARS>} will be run.
+</p>
+</td>
</tr>
<tr>
@@ -76,12 +83,16 @@
</tr>
<tr>
-<td><code>dump</code></td>
-<td><code>[file]</code></td>
+<td><code>dump [file]</code></td>
<td>Generate an XML file with a dump of the current UI hierarchy. If a filepath is not specified, by default, the generated dump file is stored on the device in this location {@code /storage/sdcard0/window_dump.xml}.</td>
</tr>
<tr>
+<td><nobr><code>-e outputFormat simple | -s</code></nobr></td>
+<td>Enables less verbose JUnit style output.</td>
+</tr>
+
+<tr>
<td><code>events</code></td>
<td> </td>
<td>Prints out accessibility events to the console until the connection to the device is terminated</td>
@@ -123,6 +134,11 @@
<td>Represents a query for one or more target UI elements on a device screen. </td>
</tr>
+<tr>
+<td><nobr><a href="{@docRoot}tools/help/uiautomator/Configurator.html">{@code com.android.uiautomator.core.Configurator}</a></nobr></td>
+<td>Allows you to set key parameters for running uiautomator tests.</td>
+</tr>
+
</table>
<h3 id="interfaces">Interfaces</h3>
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index 6389880..c555f98 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -187,6 +187,7 @@
<li class="nav-section">
<div class="nav-section-header"><a href="<?cs var:toroot ?>tools/help/uiautomator/index.html"><span class="en">uiautomator</span></a></div>
<ul>
+ <li><a href="<?cs var:toroot ?>tools/help/uiautomator/Configurator.html"><span class="en">Configurator</span></a></li>
<li><a href="<?cs var:toroot ?>tools/help/uiautomator/IAutomationSupport.html"><span class="en">IAutomationSupport</span></a></li>
<li><a href="<?cs var:toroot ?>tools/help/uiautomator/UiAutomatorTestCase.html"><span class="en">UiAutomatorTestCase</span></a></li>
<li><a href="<?cs var:toroot ?>tools/help/uiautomator/UiCollection.html"><span class="en">UiCollection</span></a></li>
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 106f4bd..50231da 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -45,9 +45,13 @@
/**
* Backing buffer for the Bitmap.
+ * Made public for quick access from drawing methods -- do NOT modify
+ * from outside this class
+ *
+ * @hide
*/
@SuppressWarnings("UnusedDeclaration") // native code only
- private byte[] mBuffer;
+ public byte[] mBuffer;
@SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"}) // Keep to finalize native resources
private final BitmapFinalizer mFinalizer;
diff --git a/libs/hwui/ResourceCache.cpp b/libs/hwui/ResourceCache.cpp
index 58fa21c..3f77021 100644
--- a/libs/hwui/ResourceCache.cpp
+++ b/libs/hwui/ResourceCache.cpp
@@ -62,7 +62,7 @@
}
void ResourceCache::incrementRefcount(SkBitmap* bitmapResource) {
- SkSafeRef(bitmapResource->pixelRef());
+ bitmapResource->pixelRef()->globalRef();
SkSafeRef(bitmapResource->getColorTable());
incrementRefcount((void*) bitmapResource, kBitmap);
}
@@ -100,7 +100,7 @@
}
void ResourceCache::incrementRefcountLocked(SkBitmap* bitmapResource) {
- SkSafeRef(bitmapResource->pixelRef());
+ bitmapResource->pixelRef()->globalRef();
SkSafeRef(bitmapResource->getColorTable());
incrementRefcountLocked((void*) bitmapResource, kBitmap);
}
@@ -133,7 +133,7 @@
}
void ResourceCache::decrementRefcount(SkBitmap* bitmapResource) {
- SkSafeUnref(bitmapResource->pixelRef());
+ bitmapResource->pixelRef()->globalUnref();
SkSafeUnref(bitmapResource->getColorTable());
decrementRefcount((void*) bitmapResource);
}
@@ -174,7 +174,7 @@
}
void ResourceCache::decrementRefcountLocked(SkBitmap* bitmapResource) {
- SkSafeUnref(bitmapResource->pixelRef());
+ bitmapResource->pixelRef()->globalUnref();
SkSafeUnref(bitmapResource->getColorTable());
decrementRefcountLocked((void*) bitmapResource);
}
diff --git a/packages/InputDevices/res/raw/keyboard_layout_english_us_colemak.kcm b/packages/InputDevices/res/raw/keyboard_layout_english_us_colemak.kcm
new file mode 100644
index 0000000..72e6d04
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_english_us_colemak.kcm
@@ -0,0 +1,330 @@
+# Copyright (C) 2012 The Android Open Source Project
+#
+# 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.
+
+#
+# English (US), Colemak keyboard layout.
+# Unlike the default (generic) keyboard layout, English (US) does not contain any
+# special ALT characters.
+#
+
+type OVERLAY
+
+map key 18 F
+map key 19 P
+map key 20 G
+map key 21 J
+map key 22 L
+map key 23 U
+map key 24 Y
+map key 25 SEMICOLON
+map key 31 R
+map key 32 S
+map key 33 T
+map key 34 D
+map key 36 N
+map key 37 E
+map key 38 I
+map key 39 O
+map key 49 K
+map key 58 DEL
+
+### ROW 1
+
+key GRAVE {
+ label: '`'
+ base: '`'
+ shift: '~'
+}
+
+key 1 {
+ label: '1'
+ base: '1'
+ shift: '!'
+}
+
+key 2 {
+ label: '2'
+ base: '2'
+ shift: '@'
+}
+
+key 3 {
+ label: '3'
+ base: '3'
+ shift: '#'
+}
+
+key 4 {
+ label: '4'
+ base: '4'
+ shift: '$'
+}
+
+key 5 {
+ label: '5'
+ base: '5'
+ shift: '%'
+}
+
+key 6 {
+ label: '6'
+ base: '6'
+ shift: '^'
+}
+
+key 7 {
+ label: '7'
+ base: '7'
+ shift: '&'
+}
+
+key 8 {
+ label: '8'
+ base: '8'
+ shift: '*'
+}
+
+key 9 {
+ label: '9'
+ base: '9'
+ shift: '('
+}
+
+key 0 {
+ label: '0'
+ base: '0'
+ shift: ')'
+}
+
+key MINUS {
+ label: '-'
+ base: '-'
+ shift: '_'
+}
+
+key EQUALS {
+ label: '='
+ base: '='
+ shift: '+'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base: 'q'
+ shift, capslock: 'Q'
+}
+
+key W {
+ label: 'W'
+ base: 'w'
+ shift, capslock: 'W'
+}
+
+key F {
+ label: 'F'
+ base: 'f'
+ shift, capslock: 'F'
+}
+
+key P {
+ label: 'P'
+ base: 'p'
+ shift, capslock: 'P'
+}
+
+key G {
+ label: 'G'
+ base: 'g'
+ shift, capslock: 'G'
+}
+
+key J {
+ label: 'J'
+ base: 'j'
+ shift, capslock: 'J'
+}
+
+key L {
+ label: 'L'
+ base: 'l'
+ shift, capslock: 'L'
+}
+
+key U {
+ label: 'U'
+ base: 'u'
+ shift, capslock: 'U'
+}
+
+key Y {
+ label: 'Y'
+ base: 'y'
+ shift, capslock: 'Y'
+}
+
+key SEMICOLON {
+ label: ';'
+ base: ';'
+ shift, capslock: ':'
+}
+
+key LEFT_BRACKET {
+ label: '['
+ base: '['
+ shift: '{'
+}
+
+key RIGHT_BRACKET {
+ label: ']'
+ base: ']'
+ shift: '}'
+}
+
+key BACKSLASH {
+ label: '\\'
+ base: '\\'
+ shift: '|'
+}
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base: 'a'
+ shift, capslock: 'A'
+}
+
+key R {
+ label: 'R'
+ base: 'r'
+ shift, capslock: 'R'
+}
+
+key S {
+ label: 'S'
+ base: 's'
+ shift, capslock: 'S'
+}
+
+key T {
+ label: 'T'
+ base: 't'
+ shift, capslock: 'T'
+}
+
+key D {
+ label: 'D'
+ base: 'd'
+ shift, capslock: 'D'
+}
+
+key H {
+ label: 'H'
+ base: 'h'
+ shift, capslock: 'H'
+}
+
+key N {
+ label: 'N'
+ base: 'n'
+ shift, capslock: 'N'
+}
+
+key E {
+ label: 'E'
+ base: 'e'
+ shift, capslock: 'E'
+}
+
+key I {
+ label: 'I'
+ base: 'i'
+ shift, capslock: 'I'
+}
+
+key O {
+ label: 'O'
+ base: 'o'
+ shift: 'O'
+}
+
+key APOSTROPHE {
+ label: '\''
+ base: '\''
+ shift: '"'
+}
+
+### ROW 4
+
+key Z {
+ label: 'Z'
+ base: 'z'
+ shift, capslock: 'Z'
+}
+
+key X {
+ label: 'X'
+ base: 'x'
+ shift, capslock: 'X'
+}
+
+key C {
+ label: 'C'
+ base: 'c'
+ shift, capslock: 'C'
+}
+
+key V {
+ label: 'V'
+ base: 'v'
+ shift, capslock: 'V'
+}
+
+key B {
+ label: 'B'
+ base: 'b'
+ shift, capslock: 'B'
+}
+
+key K {
+ label: 'K'
+ base: 'k'
+ shift, capslock: 'K'
+}
+
+key M {
+ label: 'M'
+ base: 'm'
+ shift, capslock: 'M'
+}
+
+key COMMA {
+ label: ','
+ base: ','
+ shift: '<'
+}
+
+key PERIOD {
+ label: '.'
+ base: '.'
+ shift: '>'
+}
+
+key SLASH {
+ label: '/'
+ base: '/'
+ shift: '?'
+}
diff --git a/packages/InputDevices/res/values/strings.xml b/packages/InputDevices/res/values/strings.xml
index 32c665a..54c18f1 100644
--- a/packages/InputDevices/res/values/strings.xml
+++ b/packages/InputDevices/res/values/strings.xml
@@ -15,6 +15,9 @@
<!-- US English (International style) keyboard layout label. [CHAR LIMIT=35] -->
<string name="keyboard_layout_english_us_intl">English (US), International style</string>
+ <!-- US English (Colemak style) keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_english_us_colemak_label">English (US), Colemak style</string>
+
<!-- US English (Dvorak style) keyboard layout label. [CHAR LIMIT=35] -->
<string name="keyboard_layout_english_us_dvorak_label">English (US), Dvorak style</string>
diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml
index ffd1a23..1f48a36 100644
--- a/packages/InputDevices/res/xml/keyboard_layouts.xml
+++ b/packages/InputDevices/res/xml/keyboard_layouts.xml
@@ -12,6 +12,10 @@
android:label="@string/keyboard_layout_english_us_intl"
android:keyboardLayout="@raw/keyboard_layout_english_us_intl" />
+ <keyboard-layout android:name="keyboard_layout_english_us_colemak"
+ android:label="@string/keyboard_layout_english_us_colemak_label"
+ android:keyboardLayout="@raw/keyboard_layout_english_us_colemak" />
+
<keyboard-layout android:name="keyboard_layout_english_us_dvorak"
android:label="@string/keyboard_layout_english_us_dvorak_label"
android:keyboardLayout="@raw/keyboard_layout_english_us_dvorak" />
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
index a1d11cd..35bea26 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
@@ -171,8 +171,6 @@
private void maybeCreateKeyguardLocked(boolean enableScreenRotation, boolean force,
Bundle options) {
- final boolean isActivity = (mContext instanceof Activity); // for test activity
-
if (mKeyguardHost != null) {
mKeyguardHost.saveHierarchyState(mStateContainer);
}
@@ -190,9 +188,6 @@
if (!mNeedsInput) {
flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
}
- if (ActivityManager.isHighEndGfx()) {
- flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
- }
final int stretch = ViewGroup.LayoutParams.MATCH_PARENT;
final int type = WindowManager.LayoutParams.TYPE_KEYGUARD;
@@ -209,11 +204,8 @@
WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED;
}
lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SET_NEEDS_MENU_KEY;
- if (isActivity) {
- lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
- }
lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;
- lp.setTitle(isActivity ? "KeyguardMock" : "Keyguard");
+ lp.setTitle("Keyguard");
mWindowLayoutParams = lp;
mViewManager.addView(mKeyguardHost, lp);
}
@@ -233,9 +225,6 @@
if (v != null) {
mKeyguardHost.removeView(v);
}
- // TODO: Remove once b/7094175 is fixed
- if (false) Slog.d(TAG, "inflateKeyguardView: b/7094175 mContext.config="
- + mContext.getResources().getConfiguration());
final LayoutInflater inflater = LayoutInflater.from(mContext);
View view = inflater.inflate(R.layout.keyguard_host_view, mKeyguardHost, true);
mKeyguardView = (KeyguardHostView) view.findViewById(R.id.keyguard_host_view);
diff --git a/packages/SystemUI/res/anim/priority_alert_enter.xml b/packages/SystemUI/res/anim/heads_up_enter.xml
similarity index 100%
rename from packages/SystemUI/res/anim/priority_alert_enter.xml
rename to packages/SystemUI/res/anim/heads_up_enter.xml
diff --git a/packages/SystemUI/res/anim/priority_alert_exit.xml b/packages/SystemUI/res/anim/heads_up_exit.xml
similarity index 100%
rename from packages/SystemUI/res/anim/priority_alert_exit.xml
rename to packages/SystemUI/res/anim/heads_up_exit.xml
diff --git a/packages/SystemUI/res/drawable/intruder_row_bg.xml b/packages/SystemUI/res/drawable/heads_up_notification_row_bg.xml
similarity index 79%
rename from packages/SystemUI/res/drawable/intruder_row_bg.xml
rename to packages/SystemUI/res/drawable/heads_up_notification_row_bg.xml
index 1c7c9c4..59d9fcf 100644
--- a/packages/SystemUI/res/drawable/intruder_row_bg.xml
+++ b/packages/SystemUI/res/drawable/heads_up_notification_row_bg.xml
@@ -15,6 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
- <item android:state_pressed="true" android:drawable="@drawable/intruder_bg_pressed" />
+ android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/heads_up_notification_bg_pressed" />
</selector>
diff --git a/packages/SystemUI/res/drawable/intruder_window_bg.9.png b/packages/SystemUI/res/drawable/heads_up_window_bg.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable/intruder_window_bg.9.png
rename to packages/SystemUI/res/drawable/heads_up_window_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/layout/intruder_alert.xml b/packages/SystemUI/res/layout/heads_up.xml
similarity index 75%
rename from packages/SystemUI/res/layout/intruder_alert.xml
rename to packages/SystemUI/res/layout/heads_up.xml
index c4141ae..b7c1666 100644
--- a/packages/SystemUI/res/layout/intruder_alert.xml
+++ b/packages/SystemUI/res/layout/heads_up.xml
@@ -19,7 +19,7 @@
-->
<!-- android:background="@drawable/status_bar_closed_default_background" -->
-<com.android.systemui.statusbar.policy.IntruderAlertView
+<com.android.systemui.statusbar.policy.HeadsUpNotificationView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="match_parent"
@@ -29,12 +29,6 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/contentHolder"
- android:background="@drawable/intruder_window_bg"
+ android:background="@drawable/heads_up_window_bg"
/>
-<!-- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:src="@drawable/title_bar_shadow"
- android:scaleType="fitXY"
- /> -->
-</com.android.systemui.statusbar.policy.IntruderAlertView>
+</com.android.systemui.statusbar.policy.HeadsUpNotificationView>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 43cde46..8e13c57 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -196,7 +196,7 @@
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Kein Netz"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"WLAN aus"</string>
<string name="quick_settings_wifi_display_label" msgid="6893592964463624333">"WLAN-Display"</string>
- <string name="quick_settings_wifi_display_no_connection_label" msgid="2355298740765736918">"Kabellose Übertragung"</string>
+ <string name="quick_settings_wifi_display_no_connection_label" msgid="2355298740765736918">"Kabellose Übertragung (WiDi)"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helligkeit"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Benachrichtigungen erscheinen hier"</string>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index ca6e06d..4a7d090 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -27,7 +27,7 @@
<color name="notification_list_shadow_top">#80000000</color>
<drawable name="recents_callout_line">#99ffffff</drawable>
<drawable name="notification_item_background_legacy_color">#ffaaaaaa</drawable>
- <drawable name="intruder_bg_pressed">#ff33B5E5</drawable>
+ <drawable name="heads_up_notification_bg_pressed">#ff33B5E5</drawable>
<drawable name="notification_header_bg">#FF000000</drawable>
<color name="notification_panel_scrim_color">#B0000000</color>
</resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 7ddf261..11940a3 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -34,7 +34,7 @@
<item name="android:wallpaperIntraOpenExitAnimation">@anim/wallpaper_recents_launch_from_launcher_exit</item>
</style>
- <style name="TextAppearance.StatusBar.IntruderAlert"
+ <style name="TextAppearance.StatusBar.HeadsUp"
parent="@*android:style/TextAppearance.StatusBar">
</style>
@@ -154,9 +154,9 @@
<style name="Animation.StatusBar">
</style>
- <style name="Animation.StatusBar.IntruderAlert">
- <item name="android:windowEnterAnimation">@anim/priority_alert_enter</item>
- <item name="android:windowExitAnimation">@anim/priority_alert_exit</item>
+ <style name="Animation.StatusBar.HeadsUp">
+ <item name="android:windowEnterAnimation">@anim/heads_up_enter</item>
+ <item name="android:windowExitAnimation">@anim/heads_up_exit</item>
</style>
<style name="TextAppearance.StatusBar.PhoneTicker"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 3583081..69fc3cf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -35,10 +35,13 @@
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
+import android.os.PowerManager;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.provider.Settings;
+import android.service.dreams.DreamService;
+import android.service.dreams.IDreamManager;
import android.service.notification.StatusBarNotification;
import android.text.TextUtils;
import android.util.Log;
@@ -83,16 +86,19 @@
protected static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 1023;
protected static final int MSG_OPEN_SEARCH_PANEL = 1024;
protected static final int MSG_CLOSE_SEARCH_PANEL = 1025;
- protected static final int MSG_SHOW_INTRUDER = 1026;
- protected static final int MSG_HIDE_INTRUDER = 1027;
+ protected static final int MSG_SHOW_HEADS_UP = 1026;
+ protected static final int MSG_HIDE_HEADS_UP = 1027;
- protected static final boolean ENABLE_INTRUDERS = false;
+ protected static final boolean ENABLE_HEADS_UP = true;
+ // scores above this threshold should be displayed in heads up mode.
+ private static final int INTERRUPTION_THRESHOLD = 10;
// Should match the value in PhoneWindowManager
public static final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
public static final int EXPANDED_LEAVE_ALONE = -10000;
public static final int EXPANDED_FULL_OPEN = -10001;
+ private static final String SETTING_HEADS_UP = "heads_up_enabled";
protected CommandQueue mCommandQueue;
protected IStatusBarService mBarService;
@@ -102,7 +108,7 @@
protected NotificationData mNotificationData = new NotificationData();
protected NotificationRowLayout mPile;
- protected StatusBarNotification mCurrentlyIntrudingNotification;
+ protected StatusBarNotification mCurrentlyInterruptingNotification;
// used to notify status bar for suppressing notification LED
protected boolean mPanelSlightlyVisible;
@@ -116,6 +122,11 @@
protected int mLayoutDirection;
private Locale mLocale;
+ protected boolean mUseHeadsUp = true;
+
+ protected IDreamManager mDreamManager;
+ KeyguardManager mKeyguardManager;
+ PowerManager mPowerManager;
// UI-specific methods
@@ -155,6 +166,19 @@
}
};
+ final private ContentObserver mHeadsUpObserver = new ContentObserver(mHandler) {
+ @Override
+ public void onChange(boolean selfChange) {
+ mUseHeadsUp = ENABLE_HEADS_UP && 0 != Settings.Global.getInt(
+ mContext.getContentResolver(), SETTING_HEADS_UP, 0);
+ Log.d(TAG, "heads up is " + (mUseHeadsUp ? "enabled" : "disabled"));
+ if (!mUseHeadsUp) {
+ Log.d(TAG, "dismissing any existing heads up notification on disable event");
+ mHandler.sendEmptyMessage(MSG_HIDE_HEADS_UP);
+ }
+ }
+ };
+
private RemoteViews.OnClickHandler mOnClickHandler = new RemoteViews.OnClickHandler() {
@Override
public boolean onClickHandler(View view, PendingIntent pendingIntent, Intent fillInIntent) {
@@ -204,11 +228,21 @@
mWindowManagerService = WindowManagerGlobal.getWindowManagerService();
mDisplay = mWindowManager.getDefaultDisplay();
+ mDreamManager = IDreamManager.Stub.asInterface(
+ ServiceManager.checkService(DreamService.DREAM_SERVICE));
+ mKeyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
+ mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
+
mProvisioningObserver.onChange(false); // set up
mContext.getContentResolver().registerContentObserver(
Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONED), true,
mProvisioningObserver);
+ mHeadsUpObserver.onChange(false); // set up
+ mContext.getContentResolver().registerContentObserver(
+ Settings.Global.getUriFor(SETTING_HEADS_UP), true,
+ mHeadsUpObserver);
+
mBarService = IStatusBarService.Stub.asInterface(
ServiceManager.getService(Context.STATUS_BAR_SERVICE));
@@ -398,7 +432,7 @@
}
}
- public void dismissIntruder() {
+ public void dismissHeadsUp() {
// pass
}
@@ -677,13 +711,13 @@
return new NotificationClicker(intent, pkg, tag, id);
}
- private class NotificationClicker implements View.OnClickListener {
+ protected class NotificationClicker implements View.OnClickListener {
private PendingIntent mIntent;
private String mPkg;
private String mTag;
private int mId;
- NotificationClicker(PendingIntent intent, String pkg, String tag, int id) {
+ public NotificationClicker(PendingIntent intent, String pkg, String tag, int id) {
mIntent = intent;
mPkg = pkg;
mTag = tag;
@@ -730,9 +764,6 @@
// close the shade if it was open
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
visibilityChanged(false);
-
- // If this click was on the intruder alert, hide that instead
-// mHandler.sendEmptyMessage(MSG_HIDE_INTRUDER);
}
}
/**
@@ -997,18 +1028,30 @@
setAreThereNotifications();
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
- // See if we need to update the intruder.
- if (ENABLE_INTRUDERS && oldNotification == mCurrentlyIntrudingNotification) {
- if (DEBUG) Log.d(TAG, "updating the current intruder:" + notification);
+ // See if we need to update the heads up.
+ if (ENABLE_HEADS_UP && oldNotification == mCurrentlyInterruptingNotification) {
+ if (DEBUG) Log.d(TAG, "updating the current heads up:" + notification);
// XXX: this is a hack for Alarms. The real implementation will need to *update*
- // the intruder.
- if (notification.getNotification().fullScreenIntent == null) { // TODO(dsandler): consistent logic with add()
- if (DEBUG) Log.d(TAG, "no longer intrudes!");
- mHandler.sendEmptyMessage(MSG_HIDE_INTRUDER);
+ // the heads up.
+ if (!shouldInterrupt(notification)) {
+ if (DEBUG) Log.d(TAG, "no longer interrupts!");
+ mHandler.sendEmptyMessage(MSG_HIDE_HEADS_UP);
}
}
}
+ protected boolean shouldInterrupt(StatusBarNotification notification) {
+ boolean interrupt = notification.getNotification().fullScreenIntent == null
+ && notification.getScore() >= INTERRUPTION_THRESHOLD
+ && mPowerManager.isScreenOn() && !mKeyguardManager.isKeyguardLocked();
+ try {
+ interrupt = interrupt && !mDreamManager.isDreaming();
+ } catch (RemoteException e) {
+ Log.d(TAG, "failed to query dream manager", e);
+ }
+ return interrupt;
+ }
+
// Q: What kinds of notifications should show during setup?
// A: Almost none! Only things coming from the system (package is "android") that also
// have special "kind" tags marking them as relevant for setup (see below).
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index ee94cc8..fd99f5b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -45,12 +45,9 @@
import android.os.IBinder;
import android.os.Message;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
-import android.service.dreams.DreamService;
-import android.service.dreams.IDreamManager;
import android.service.notification.StatusBarNotification;
import android.util.DisplayMetrics;
import android.util.EventLog;
@@ -76,7 +73,6 @@
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
-
import com.android.internal.statusbar.StatusBarIcon;
import com.android.systemui.EventLogTags;
import com.android.systemui.R;
@@ -90,7 +86,7 @@
import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.BluetoothController;
import com.android.systemui.statusbar.policy.DateView;
-import com.android.systemui.statusbar.policy.IntruderAlertView;
+import com.android.systemui.statusbar.policy.HeadsUpNotificationView;
import com.android.systemui.statusbar.policy.LocationController;
import com.android.systemui.statusbar.policy.NetworkController;
import com.android.systemui.statusbar.policy.NotificationRowLayout;
@@ -127,7 +123,7 @@
// 1020-1030 reserved for BaseStatusBar
// will likely move to a resource or other tunable param at some point
- private static final int INTRUDER_ALERT_DECAY_MS = 0; // disabled, was 10000;
+ private static final int HEADS_UP_DECAY_MS = 0; // disabled, was 10000;
private static final boolean CLOSE_PANEL_WHEN_EMPTIED = true;
@@ -169,8 +165,6 @@
Display mDisplay;
Point mCurrentDisplaySize = new Point();
- IDreamManager mDreamManager;
-
StatusBarWindowView mStatusBarWindow;
PhoneStatusBarView mStatusBarView;
@@ -230,8 +224,8 @@
// the date view
DateView mDateView;
- // for immersive activities
- private IntruderAlertView mIntruderAlertView;
+ // for heads up notifications
+ private HeadsUpNotificationView mHeadsUpNotificationView;
// on-screen navigation buttons
private NavigationBarView mNavigationBarView = null;
@@ -358,14 +352,11 @@
.getDefaultDisplay();
mDisplay.getSize(mCurrentDisplaySize);
- mDreamManager = IDreamManager.Stub.asInterface(
- ServiceManager.checkService(DreamService.DREAM_SERVICE));
-
super.start(); // calls createAndAddWindows()
addNavigationBar();
- if (ENABLE_INTRUDERS) addIntruderView();
+ if (ENABLE_HEADS_UP) addHeadsUpView();
// Lastly, call to the icon policy to install/update all the icons.
mIconPolicy = new PhoneStatusBarPolicy(mContext);
@@ -424,10 +415,11 @@
mNotificationPanel.setBackground(new FastColorDrawable(context.getResources().getColor(
R.color.notification_panel_solid_background)));
}
- if (ENABLE_INTRUDERS) {
- mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null);
- mIntruderAlertView.setVisibility(View.GONE);
- mIntruderAlertView.setBar(this);
+ if (ENABLE_HEADS_UP) {
+ mHeadsUpNotificationView =
+ (HeadsUpNotificationView) View.inflate(context, R.layout.heads_up, null);
+ mHeadsUpNotificationView.setVisibility(View.GONE);
+ mHeadsUpNotificationView.setBar(this);
}
if (MULTIUSER_DEBUG) {
mNotificationPanelDebugText = (TextView) mNotificationPanel.findViewById(R.id.header_debug_info);
@@ -833,7 +825,7 @@
return lp;
}
- private void addIntruderView() {
+ private void addHeadsUpView() {
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT,
@@ -847,11 +839,11 @@
PixelFormat.TRANSLUCENT);
lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
//lp.y += height * 1.5; // FIXME
- lp.setTitle("IntruderAlert");
+ lp.setTitle("Heads Up");
lp.packageName = mContext.getPackageName();
- lp.windowAnimations = R.style.Animation_StatusBar_IntruderAlert;
+ lp.windowAnimations = R.style.Animation_StatusBar_HeadsUp;
- mWindowManager.addView(mIntruderAlertView, lp);
+ mWindowManager.addView(mHeadsUpNotificationView, lp);
}
public void refreshAllStatusBarIcons() {
@@ -895,52 +887,31 @@
StatusBarIconView iconView = addNotificationViews(key, notification);
if (iconView == null) return;
- boolean immersive = false;
- try {
- immersive = ActivityManagerNative.getDefault().isTopActivityImmersive();
- if (DEBUG) {
- Log.d(TAG, "Top activity is " + (immersive?"immersive":"not immersive"));
- }
- } catch (RemoteException ex) {
- }
-
- /*
- * DISABLED due to missing API
- if (ENABLE_INTRUDERS && (
- // TODO(dsandler): Only if the screen is on
- notification.notification.intruderView != null)) {
- Log.d(TAG, "Presenting high-priority notification");
- // special new transient ticker mode
- // 1. Populate mIntruderAlertView
-
- if (notification.notification.intruderView == null) {
- Log.e(TAG, notification.notification.toString() + " wanted to intrude but intruderView was null");
- return;
- }
+ if (mUseHeadsUp && shouldInterrupt(notification)) {
+ if (DEBUG) Log.d(TAG, "launching notification in heads up mode");
+ // 1. Populate mHeadsUpNotificationView
// bind the click event to the content area
- PendingIntent contentIntent = notification.notification.contentIntent;
+ PendingIntent contentIntent = notification.getNotification().contentIntent;
final View.OnClickListener listener = (contentIntent != null)
? new NotificationClicker(contentIntent,
- notification.pkg, notification.tag, notification.id)
+ notification.getPackageName(), notification.getTag(), notification.getId())
: null;
- mIntruderAlertView.applyIntruderContent(notification.notification.intruderView, listener);
+ if (mHeadsUpNotificationView.applyContent(notification.getNotification(), listener)) {
- mCurrentlyIntrudingNotification = notification;
+ mCurrentlyInterruptingNotification = notification;
- // 2. Animate mIntruderAlertView in
- mHandler.sendEmptyMessage(MSG_SHOW_INTRUDER);
+ // 2. Animate mHeadsUpNotificationView in
+ mHandler.sendEmptyMessage(MSG_SHOW_HEADS_UP);
- // 3. Set alarm to age the notification off (TODO)
- mHandler.removeMessages(MSG_HIDE_INTRUDER);
- if (INTRUDER_ALERT_DECAY_MS > 0) {
- mHandler.sendEmptyMessageDelayed(MSG_HIDE_INTRUDER, INTRUDER_ALERT_DECAY_MS);
+ // 3. Set alarm to age the notification off (TODO)
+ mHandler.removeMessages(MSG_HIDE_HEADS_UP);
+ if (HEADS_UP_DECAY_MS > 0) {
+ mHandler.sendEmptyMessageDelayed(MSG_HIDE_HEADS_UP, HEADS_UP_DECAY_MS);
+ }
}
- } else
- */
-
- if (notification.getNotification().fullScreenIntent != null) {
+ } else if (notification.getNotification().fullScreenIntent != null) {
// Stop screensaver if the notification has a full-screen intent.
// (like an incoming phone call)
awakenDreams();
@@ -954,8 +925,8 @@
} else {
// usual case: status bar visible & not immersive
- // show the ticker if there isn't an intruder too
- if (mCurrentlyIntrudingNotification == null) {
+ // show the ticker if there isn't already a heads up
+ if (mCurrentlyInterruptingNotification == null) {
tick(null, notification, true);
}
}
@@ -976,8 +947,8 @@
// Recalculate the position of the sliding windows and the titles.
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
- if (ENABLE_INTRUDERS && old == mCurrentlyIntrudingNotification) {
- mHandler.sendEmptyMessage(MSG_HIDE_INTRUDER);
+ if (ENABLE_HEADS_UP && old == mCurrentlyInterruptingNotification) {
+ mHandler.sendEmptyMessage(MSG_HIDE_HEADS_UP);
}
if (CLOSE_PANEL_WHEN_EMPTIED && mNotificationData.size() == 0) {
@@ -1359,12 +1330,12 @@
case MSG_CLOSE_PANELS:
animateCollapsePanels();
break;
- case MSG_SHOW_INTRUDER:
- setIntruderAlertVisibility(true);
+ case MSG_SHOW_HEADS_UP:
+ setHeadsUpVisibility(true);
break;
- case MSG_HIDE_INTRUDER:
- setIntruderAlertVisibility(false);
- mCurrentlyIntrudingNotification = null;
+ case MSG_HIDE_HEADS_UP:
+ setHeadsUpVisibility(false);
+ mCurrentlyInterruptingNotification = null;
break;
}
}
@@ -2487,22 +2458,20 @@
mCurrentUserId);
}
- private void setIntruderAlertVisibility(boolean vis) {
- if (!ENABLE_INTRUDERS) return;
- if (DEBUG) {
- Log.v(TAG, (vis ? "showing" : "hiding") + " intruder alert window");
- }
- mIntruderAlertView.setVisibility(vis ? View.VISIBLE : View.GONE);
+ private void setHeadsUpVisibility(boolean vis) {
+ if (!ENABLE_HEADS_UP) return;
+ if (DEBUG) Log.v(TAG, (vis ? "showing" : "hiding") + " heads up window");
+ mHeadsUpNotificationView.setVisibility(vis ? View.VISIBLE : View.GONE);
}
- public void dismissIntruder() {
- if (mCurrentlyIntrudingNotification == null) return;
+ public void dismissHeadsUp() {
+ if (mCurrentlyInterruptingNotification == null) return;
try {
mBarService.onNotificationClear(
- mCurrentlyIntrudingNotification.getPackageName(),
- mCurrentlyIntrudingNotification.getTag(),
- mCurrentlyIntrudingNotification.getId());
+ mCurrentlyInterruptingNotification.getPackageName(),
+ mCurrentlyInterruptingNotification.getTag(),
+ mCurrentlyInterruptingNotification.getId());
} catch (android.os.RemoteException ex) {
// oh well
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/IntruderAlertView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
similarity index 79%
rename from packages/SystemUI/src/com/android/systemui/statusbar/policy/IntruderAlertView.java
rename to packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
index dbd36af..dbf9957 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/IntruderAlertView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.policy;
+import android.app.Notification;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Rect;
@@ -27,14 +28,13 @@
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.widget.LinearLayout;
-import android.widget.RemoteViews;
import com.android.systemui.R;
import com.android.systemui.SwipeHelper;
import com.android.systemui.statusbar.BaseStatusBar;
-public class IntruderAlertView extends LinearLayout implements SwipeHelper.Callback {
- private static final String TAG = "IntruderAlertView";
+public class HeadsUpNotificationView extends LinearLayout implements SwipeHelper.Callback {
+ private static final String TAG = "HeadsUpNotificationView";
private static final boolean DEBUG = false;
Rect mTmpRect = new Rect();
@@ -44,14 +44,14 @@
BaseStatusBar mBar;
private ViewGroup mContentHolder;
- private RemoteViews mIntruderRemoteViews;
+ private Notification mHeadsUp;
private OnClickListener mOnClickListener;
- public IntruderAlertView(Context context, AttributeSet attrs) {
+ public HeadsUpNotificationView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
- public IntruderAlertView(Context context, AttributeSet attrs, int defStyle) {
+ public HeadsUpNotificationView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
setOrientation(LinearLayout.VERTICAL);
@@ -64,9 +64,9 @@
mSwipeHelper = new SwipeHelper(SwipeHelper.X, this, densityScale, pagingTouchSlop);
mContentHolder = (ViewGroup) findViewById(R.id.contentHolder);
- if (mIntruderRemoteViews != null) {
+ if (mHeadsUp != null) {
// whoops, we're on already!
- applyIntruderContent(mIntruderRemoteViews, mOnClickListener);
+ applyContent(mHeadsUp, mOnClickListener);
}
}
@@ -92,8 +92,8 @@
}
public void onChildDismissed(View v) {
- Log.v(TAG, "User swiped intruder to dismiss");
- mBar.dismissIntruder();
+ Log.v(TAG, "User swiped heads up to dismiss");
+ mBar.dismissHeadsUp();
}
public void onBeginDrag(View v) {
@@ -134,33 +134,34 @@
}
}
- public void applyIntruderContent(RemoteViews intruderView, OnClickListener listener) {
- if (DEBUG) {
- Log.v(TAG, "applyIntruderContent: view=" + intruderView + " listener=" + listener);
- }
- mIntruderRemoteViews = intruderView;
+ public boolean applyContent(Notification headsUp, OnClickListener listener) {
+ mHeadsUp = headsUp;
mOnClickListener = listener;
- if (mContentHolder == null) {
+ if (mContentHolder == null) {
// too soon!
- return;
+ return false;
+ }
+ if (headsUp.contentView == null) {
+ // bad data
+ return false;
}
mContentHolder.setX(0);
mContentHolder.setVisibility(View.VISIBLE);
mContentHolder.setAlpha(1f);
mContentHolder.removeAllViews();
- final View content = intruderView.apply(getContext(), mContentHolder);
+ final View content = headsUp.contentView.apply(getContext(), mContentHolder);
if (listener != null) {
content.setOnClickListener(listener);
-
- //content.setBackgroundResource(R.drawable.intruder_row_bg);
- Drawable bg = getResources().getDrawable(R.drawable.intruder_row_bg);
+
+ Drawable bg = getResources().getDrawable(R.drawable.heads_up_notification_row_bg);
if (bg == null) {
- Log.e(TAG, String.format("Can't find background drawable id=0x%08x", R.drawable.intruder_row_bg));
+ Log.e(TAG, String.format("Can't find background drawable id=0x%08x",
+ R.drawable.heads_up_notification_row_bg));
} else {
content.setBackgroundDrawable(bg);
}
}
mContentHolder.addView(content);
-
+ return true;
}
}
\ No newline at end of file
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 5a95f4c..459c92c 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -551,7 +551,6 @@
// System.out.println("Open panel: isOpen=" + st.isOpen);
// Already open, return
- Slog.d(TAG, "openPanel: b9404689 entry, st=" + st + " decorView=" + st.decorView);
if (st.isOpen || isDestroyed()) {
return;
}
@@ -665,8 +664,6 @@
lp.windowAnimations = st.windowAnimations;
wm.addView(st.decorView, lp);
- Slog.d(TAG, "openPanel: b9404689 setting isOpen true, st=" + st + " decorView="
- + st.decorView);
st.isOpen = true;
// Log.v(TAG, "Adding main menu to window manager.");
}
@@ -696,12 +693,9 @@
*/
public final void closePanel(PanelFeatureState st, boolean doCallback) {
// System.out.println("Close panel: isOpen=" + st.isOpen);
- Slog.d(TAG, "closePanel: b9404689 entry, st=" + st + " isOpen=" + st.isOpen
- + " decorView=" + st.decorView + " Callers=" + Debug.getCallers(4));
if (doCallback && st.featureId == FEATURE_OPTIONS_PANEL &&
mActionBar != null && mActionBar.isOverflowMenuShowing()) {
checkCloseActionMenu(st.menu);
- Slog.d(TAG, "closePanel: b9404689 early return");
return;
}
@@ -718,8 +712,6 @@
if (doCallback) {
callOnPanelClosed(st.featureId, st, null);
}
- } else {
- Slog.d(TAG, "closePanel: b9404689 not removing wm=" + wm);
}
st.isPrepared = false;
@@ -1108,7 +1100,6 @@
*/
protected boolean initializePanelDecor(PanelFeatureState st) {
st.decorView = new DecorView(getContext(), st.featureId);
- Slog.d(TAG, "initializePanelDecor: b9404689 st=" + st + " decorView=" + st.decorView);
st.gravity = Gravity.CENTER | Gravity.BOTTOM;
st.setStyle(getContext());
diff --git a/services/java/com/android/server/AlarmManagerService.java b/services/java/com/android/server/AlarmManagerService.java
index bc06561..0be9ca5 100644
--- a/services/java/com/android/server/AlarmManagerService.java
+++ b/services/java/com/android/server/AlarmManagerService.java
@@ -53,7 +53,7 @@
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
-import java.util.Iterator;
+import java.util.LinkedList;
import java.util.Map;
import java.util.TimeZone;
@@ -69,6 +69,7 @@
private static final int ELAPSED_REALTIME_WAKEUP_MASK = 1 << AlarmManager.ELAPSED_REALTIME_WAKEUP;
private static final int ELAPSED_REALTIME_MASK = 1 << AlarmManager.ELAPSED_REALTIME;
private static final int TIME_CHANGED_MASK = 1 << 16;
+ private static final int IS_WAKEUP_MASK = RTC_WAKEUP_MASK|ELAPSED_REALTIME_WAKEUP_MASK;
// Alignment quantum for inexact repeating alarms
private static final long QUANTUM = AlarmManager.INTERVAL_FIFTEEN_MINUTES;
@@ -82,6 +83,8 @@
private static final Intent mBackgroundIntent
= new Intent().addFlags(Intent.FLAG_FROM_BACKGROUND);
+ private static final boolean WAKEUP_STATS = true;
+
private final Context mContext;
private final LocalLog mLog = new LocalLog(TAG);
@@ -106,6 +109,21 @@
private final PendingIntent mTimeTickSender;
private final PendingIntent mDateChangeSender;
+ class WakeupEvent {
+ public long when;
+ public int uid;
+ public String action;
+
+ public WakeupEvent(long theTime, int theUid, String theAction) {
+ when = theTime;
+ uid = theUid;
+ action = theAction;
+ }
+ }
+
+ private final LinkedList<WakeupEvent> mRecentWakeups = new LinkedList<WakeupEvent>();
+ private final long RECENT_WAKEUP_PERIOD = 1000L * 60 * 60 * 24; // one day
+
private static final class InFlight extends Intent {
final PendingIntent mPendingIntent;
final Pair<String, ComponentName> mTarget;
@@ -640,6 +658,27 @@
pw.println();
}
}
+
+ if (WAKEUP_STATS) {
+ pw.println();
+ pw.println(" Recent Wakeup History:");
+ final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss.SSS");
+ long last = -1;
+ for (WakeupEvent event : mRecentWakeups) {
+ pw.print(" "); pw.print(sdf.format(new Date(event.when)));
+ pw.print('|');
+ if (last < 0) {
+ pw.print('0');
+ } else {
+ pw.print(event.when - last);
+ }
+ last = event.when;
+ pw.print('|'); pw.print(event.uid);
+ pw.print('|'); pw.print(event.action);
+ pw.println();
+ }
+ pw.println();
+ }
}
}
@@ -775,7 +814,20 @@
pw.print(prefix); pw.print("operation="); pw.println(operation);
}
}
-
+
+ void recordWakeupAlarms(ArrayList<Alarm> alarms, long now, long skewToRTC) {
+ for (Alarm a : alarms) {
+ if (a.when > now) {
+ break;
+ }
+
+ WakeupEvent e = new WakeupEvent(now + skewToRTC,
+ a.operation.getCreatorUid(),
+ a.operation.getIntent().getAction());
+ mRecentWakeups.add(e);
+ }
+ }
+
private class AlarmThread extends Thread
{
public AlarmThread()
@@ -809,6 +861,27 @@
TAG, "Checking for alarms... rtc=" + nowRTC
+ ", elapsed=" + nowELAPSED);
+ if (WAKEUP_STATS) {
+ if ((result & IS_WAKEUP_MASK) != 0) {
+ long newEarliest = nowRTC - RECENT_WAKEUP_PERIOD;
+ int n = 0;
+ for (WakeupEvent event : mRecentWakeups) {
+ if (event.when > newEarliest) break;
+ n++; // number of now-stale entries at the list head
+ }
+ for (int i = 0; i < n; i++) {
+ mRecentWakeups.remove();
+ }
+
+ recordWakeupAlarms(mRtcWakeupAlarms,
+ nowRTC,
+ 0);
+ recordWakeupAlarms(mElapsedRealtimeWakeupAlarms,
+ nowELAPSED,
+ nowRTC - nowELAPSED);
+ }
+ }
+
if ((result & RTC_WAKEUP_MASK) != 0)
triggerAlarmsLocked(mRtcWakeupAlarms, triggerList, nowRTC);
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 6e24d68..1c1b002 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1511,23 +1511,16 @@
final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
if (imi != null && iconVisibility && needsToShowImeSwitchOngoingNotification()) {
// Used to load label
- final PackageManager pm = mContext.getPackageManager();
final CharSequence title = mRes.getText(
com.android.internal.R.string.select_input_method);
- final CharSequence imiLabel = imi.loadLabel(pm);
- final CharSequence summary = mCurrentSubtype != null
- ? TextUtils.concat(mCurrentSubtype.getDisplayName(mContext,
- imi.getPackageName(), imi.getServiceInfo().applicationInfo),
- (TextUtils.isEmpty(imiLabel) ?
- "" : " - " + imiLabel))
- : imiLabel;
+ final CharSequence summary = InputMethodUtils.getImeAndSubtypeDisplayName(
+ mContext, imi, mCurrentSubtype);
mImeSwitcherNotification.setLatestEventInfo(
mContext, title, summary, mImeSwitchPendingIntent);
if (mNotificationManager != null) {
if (DEBUG) {
- Slog.d(TAG, "--- show notification: label = " + imiLabel
- + ", summary = " + summary);
+ Slog.d(TAG, "--- show notification: label = " + summary);
}
mNotificationManager.notifyAsUser(null,
com.android.internal.R.string.select_input_method,
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 6425693..39ce0c6 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -1795,7 +1795,7 @@
return;
}
- mActivityManagerService.dumpProcessTracker(fd, pw, args);
+ mActivityManagerService.mProcessTracker.dump(fd, pw, args);
}
}
@@ -1821,8 +1821,7 @@
: mBatteryStatsService.getActiveStatistics().getIsOnBattery();
mBatteryStatsService.getActiveStatistics().setCallback(this);
- mProcessTracker = new ProcessTracker(new File(systemDir, "procstats"));
- mProcessTracker.readLocked();
+ mProcessTracker = new ProcessTracker(this, new File(systemDir, "procstats"));
mUsageStatsService = new UsageStatsService(new File(systemDir, "usagestats").toString());
mAppOpsService = new AppOpsService(new File(systemDir, "appops.xml"));
@@ -10187,7 +10186,7 @@
TimeUtils.formatDuration(mLastPowerCheckUptime, pw);
pw.println("");
pw.println(" mGoingToSleep=" + mStackSupervisor.mGoingToSleep);
- pw.println(" mLaunchingActivity=" + getFocusedStack().mLaunchingActivity);
+ pw.println(" mLaunchingActivity=" + mStackSupervisor.mLaunchingActivity);
pw.println(" mAdjSeq=" + mAdjSeq + " mLruSeq=" + mLruSeq);
pw.println(" mNumNonCachedProcs=" + mNumNonCachedProcs
+ " (" + mLruProcesses.size() + " total)"
@@ -11346,12 +11345,6 @@
return false;
}
- final void dumpProcessTracker(FileDescriptor fd, PrintWriter pw, String[] args) {
- synchronized (this) {
- mProcessTracker.dumpLocked(fd, pw, args);
- }
- }
-
private final boolean removeDyingProviderLocked(ProcessRecord proc,
ContentProviderRecord cpr, boolean always) {
final boolean inLaunching = mLaunchingProviders.contains(cpr);
diff --git a/services/java/com/android/server/am/ActivityRecord.java b/services/java/com/android/server/am/ActivityRecord.java
index 83016df..4f09407 100644
--- a/services/java/com/android/server/am/ActivityRecord.java
+++ b/services/java/com/android/server/am/ActivityRecord.java
@@ -820,7 +820,7 @@
final long totalTime = stack.mFullyDrawnStartTime != 0
? (curTime - stack.mFullyDrawnStartTime) : thisTime;
if (ActivityManagerService.SHOW_ACTIVITY_START_TIME) {
- Trace.traceCounter(Trace.TRACE_TAG_ACTIVITY_MANAGER, "fully-drawn", (int)totalTime);
+ Trace.asyncTraceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER, "drawing", 0);
EventLog.writeEvent(EventLogTags.AM_ACTIVITY_FULLY_DRAWN_TIME,
userId, System.identityHashCode(this), shortComponentName,
thisTime, totalTime);
@@ -851,7 +851,7 @@
final long totalTime = stack.mLaunchStartTime != 0
? (curTime - stack.mLaunchStartTime) : thisTime;
if (ActivityManagerService.SHOW_ACTIVITY_START_TIME) {
- Trace.traceCounter(Trace.TRACE_TAG_ACTIVITY_MANAGER, "launch", (int)totalTime);
+ Trace.asyncTraceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER, "launching", 0);
EventLog.writeEvent(EventLogTags.AM_ACTIVITY_LAUNCH_TIME,
userId, System.identityHashCode(this), shortComponentName,
thisTime, totalTime);
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 9013b4a..98b3ce9 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -36,6 +36,7 @@
import static com.android.server.am.ActivityStackSupervisor.DEBUG_STATES;
import static com.android.server.am.ActivityStackSupervisor.HOME_STACK_ID;
+import android.os.Trace;
import com.android.internal.os.BatteryStatsImpl;
import com.android.internal.util.Objects;
import com.android.server.Watchdog;
@@ -69,7 +70,6 @@
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
-import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -102,9 +102,6 @@
// from the application in order to get its saved state.
static final int STOP_TIMEOUT = 10*1000;
- // How long we can hold the launch wake lock before giving up.
- static final int LAUNCH_TIMEOUT = 10*1000;
-
// How long we wait until giving up on an activity telling us it has
// finished destroying itself.
static final int DESTROY_TIMEOUT = 10*1000;
@@ -121,10 +118,6 @@
// is being started.
static final boolean SHOW_APP_STARTING_PREVIEW = true;
- // For debugging to make sure the caller when acquiring/releasing our
- // wake lock is the system process.
- static final boolean VALIDATE_WAKE_LOCK_CALLER = true;
-
enum ActivityState {
INITIALIZING,
RESUMED,
@@ -167,14 +160,6 @@
final ArrayList<ActivityRecord> mNoAnimActivities = new ArrayList<ActivityRecord>();
/**
- * We don't want to allow the device to go to sleep while in the process
- * of launching an activity. This is primarily to allow alarm intent
- * receivers to launch an activity and get that to run before the device
- * goes back to sleep.
- */
- final PowerManager.WakeLock mLaunchingActivity;
-
- /**
* When we are in the process of pausing an activity, before starting the
* next one, this variable holds the activity that is currently being paused.
*/
@@ -225,8 +210,7 @@
/** Run all ActivityStacks through this */
final ActivityStackSupervisor mStackSupervisor;
- static final int PAUSE_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG;
- static final int LAUNCH_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 1;
+ static final int PAUSE_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 1;
static final int DESTROY_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 2;
static final int LAUNCH_TICK_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 3;
static final int STOP_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 4;
@@ -285,23 +269,6 @@
activityDestroyedLocked(r != null ? r.appToken : null);
}
} break;
- case LAUNCH_TIMEOUT_MSG: {
- if (mService.mDidDexOpt) {
- mService.mDidDexOpt = false;
- mHandler.sendEmptyMessageDelayed(LAUNCH_TIMEOUT_MSG, LAUNCH_TIMEOUT);
- return;
- }
- synchronized (mService) {
- if (mLaunchingActivity.isHeld()) {
- Slog.w(TAG, "Launch timeout has expired, giving up wake lock!");
- if (VALIDATE_WAKE_LOCK_CALLER
- && Binder.getCallingUid() != Process.myUid()) {
- throw new IllegalStateException("Calling must be system uid");
- }
- mLaunchingActivity.release();
- }
- }
- } break;
case STOP_TIMEOUT_MSG: {
ActivityRecord r = (ActivityRecord)msg.obj;
// We don't at this point know if the activity is fullscreen,
@@ -338,12 +305,6 @@
mStackSupervisor = service.mStackSupervisor;
mContext = context;
PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
- if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) {
- throw new IllegalStateException("Calling must be system uid");
- }
- mLaunchingActivity =
- pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Launch");
- mLaunchingActivity.setReferenceCounted(false);
mStackId = stackId;
mCurrentUser = service.mCurrentUserId;
}
@@ -595,13 +556,30 @@
if (DEBUG_SAVED_STATE) Slog.i(TAG, "Launch completed; removing icicle of " + r.icicle);
}
+ private void startLaunchTraces() {
+ if (mFullyDrawnStartTime != 0) {
+ Trace.asyncTraceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER, "drawing", 0);
+ }
+ Trace.asyncTraceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "launching", 0);
+ Trace.asyncTraceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "drawing", 0);
+ }
+
+ private void stopFullyDrawnTraceIfNeeded() {
+ if (mFullyDrawnStartTime != 0 && mLaunchStartTime == 0) {
+ Trace.asyncTraceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER, "drawing", 0);
+ mFullyDrawnStartTime = 0;
+ }
+ }
+
void setLaunchTime(ActivityRecord r) {
if (r.displayStartTime == 0) {
r.fullyDrawnStartTime = r.displayStartTime = SystemClock.uptimeMillis();
if (mLaunchStartTime == 0) {
+ startLaunchTraces();
mLaunchStartTime = mFullyDrawnStartTime = r.displayStartTime;
}
} else if (mLaunchStartTime == 0) {
+ startLaunchTraces();
mLaunchStartTime = mFullyDrawnStartTime = SystemClock.uptimeMillis();
}
}
@@ -610,16 +588,6 @@
r.displayStartTime = r.fullyDrawnStartTime = 0;
}
- void stopIfSleepingLocked() {
- if (mLaunchingActivity.isHeld()) {
- if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) {
- throw new IllegalStateException("Calling must be system uid");
- }
- mLaunchingActivity.release();
- mService.mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
- }
- }
-
void awakeFromSleepingLocked() {
// Ensure activities are no longer sleeping.
for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
@@ -717,6 +685,7 @@
prev.task.touchActiveTime();
clearLaunchTime(prev);
prev.updateThumbnail(screenshotActivities(prev), null);
+ stopFullyDrawnTraceIfNeeded();
mService.updateCpuStats();
@@ -743,14 +712,7 @@
// If we are not going to sleep, we want to ensure the device is
// awake until the next activity is started.
if (!mService.isSleepingOrShuttingDown()) {
- if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) {
- throw new IllegalStateException("Calling must be system uid");
- }
- mLaunchingActivity.acquire();
- if (!mHandler.hasMessages(LAUNCH_TIMEOUT_MSG)) {
- // To be safe, don't allow the wake lock to be held for too long.
- mHandler.sendEmptyMessageDelayed(LAUNCH_TIMEOUT_MSG, LAUNCH_TIMEOUT);
- }
+ mStackSupervisor.acquireLaunchWakelock();
}
if (mPausingActivity != null) {
@@ -2121,29 +2083,6 @@
}
}
- final ActivityRecord activityIdleInternalLocked(final IBinder token) {
- if (localLOGV) Slog.v(TAG, "Activity idle: " + token);
-
- // Get the activity record.
- ActivityRecord res = isInStackLocked(token);
- if (res != null) {
- // No longer need to keep the device awake.
- if (mResumedActivity == res && mLaunchingActivity.isHeld()) {
- mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
- if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) {
- throw new IllegalStateException("Calling must be system uid");
- }
- mLaunchingActivity.release();
- }
-
- // If this activity is fullscreen, set up to hide those under it.
- if (DEBUG_VISBILITY) Slog.v(TAG, "Idle activity for " + res);
- mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
- }
-
- return res;
- }
-
/**
* @return Returns true if the activity is being finished, false if for
* some reason it is being left as-is.
diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java
index 9afac2c..63f91ac 100644
--- a/services/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/java/com/android/server/am/ActivityStackSupervisor.java
@@ -62,6 +62,7 @@
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.PowerManager;
+import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -98,10 +99,18 @@
/** How long we can hold the sleep wake lock before giving up. */
static final int SLEEP_TIMEOUT = 5*1000;
+ // How long we can hold the launch wake lock before giving up.
+ static final int LAUNCH_TIMEOUT = 10*1000;
+
static final int IDLE_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG;
static final int IDLE_NOW_MSG = FIRST_SUPERVISOR_STACK_MSG + 1;
static final int RESUME_TOP_ACTIVITY_MSG = FIRST_SUPERVISOR_STACK_MSG + 2;
static final int SLEEP_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG + 3;
+ static final int LAUNCH_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG + 4;
+
+ // For debugging to make sure the caller when acquiring/releasing our
+ // wake lock is the system process.
+ static final boolean VALIDATE_WAKE_LOCK_CALLER = false;
final ActivityManagerService mService;
final Context mContext;
@@ -183,6 +192,14 @@
boolean mSleepTimeout = false;
/**
+ * We don't want to allow the device to go to sleep while in the process
+ * of launching an activity. This is primarily to allow alarm intent
+ * receivers to launch an activity and get that to run before the device
+ * goes back to sleep.
+ */
+ final PowerManager.WakeLock mLaunchingActivity;
+
+ /**
* Set when the system is going to sleep, until we have
* successfully paused the current activity and released our wake lock.
* At that point the system is allowed to actually sleep.
@@ -197,6 +214,12 @@
PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
mGoingToSleep = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Sleep");
mHandler = new ActivityStackSupervisorHandler(looper);
+ if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) {
+ throw new IllegalStateException("Calling must be system uid");
+ }
+ mLaunchingActivity =
+ pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Launch");
+ mLaunchingActivity.setReferenceCounted(false);
}
void setWindowManager(WindowManagerService wm) {
@@ -388,7 +411,11 @@
boolean allResumedActivitiesIdle() {
for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
- final ActivityRecord resumedActivity = mStacks.get(stackNdx).mResumedActivity;
+ final ActivityStack stack = mStacks.get(stackNdx);
+ if (!isFrontStack(stack)) {
+ continue;
+ }
+ final ActivityRecord resumedActivity = stack.mResumedActivity;
if (resumedActivity == null || !resumedActivity.idle) {
return false;
}
@@ -1666,13 +1693,22 @@
return ActivityManager.START_SUCCESS;
}
+ void acquireLaunchWakelock() {
+ if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) {
+ throw new IllegalStateException("Calling must be system uid");
+ }
+ mLaunchingActivity.acquire();
+ if (!mHandler.hasMessages(LAUNCH_TIMEOUT_MSG)) {
+ // To be safe, don't allow the wake lock to be held for too long.
+ mHandler.sendEmptyMessageDelayed(LAUNCH_TIMEOUT_MSG, LAUNCH_TIMEOUT);
+ }
+ }
+
// Checked.
final ActivityRecord activityIdleInternalLocked(final IBinder token, boolean fromTimeout,
Configuration config) {
if (localLOGV) Slog.v(TAG, "Activity idle: " + token);
- ActivityRecord res = null;
-
ArrayList<ActivityRecord> stops = null;
ArrayList<ActivityRecord> finishes = null;
ArrayList<UserStartedState> startingUsers = null;
@@ -1689,41 +1725,50 @@
Debug.getCallers(4));
mHandler.removeMessages(IDLE_TIMEOUT_MSG, r);
r.finishLaunchTickingLocked();
- res = r.task.stack.activityIdleInternalLocked(token);
- if (res != null) {
- if (fromTimeout) {
- reportActivityLaunchedLocked(fromTimeout, r, -1, -1);
- }
-
- // This is a hack to semi-deal with a race condition
- // in the client where it can be constructed with a
- // newer configuration from when we asked it to launch.
- // We'll update with whatever configuration it now says
- // it used to launch.
- if (config != null) {
- r.configuration = config;
- }
-
- // We are now idle. If someone is waiting for a thumbnail from
- // us, we can now deliver.
- r.idle = true;
- if (allResumedActivitiesIdle()) {
- mService.scheduleAppGcsLocked();
- mService.requestPssLocked(r.app, SystemClock.uptimeMillis(), false);
- }
- if (r.thumbnailNeeded && r.app != null && r.app.thread != null) {
- sendThumbnail = r.app.thread;
- r.thumbnailNeeded = false;
- }
-
- //Slog.i(TAG, "IDLE: mBooted=" + mBooted + ", fromTimeout=" + fromTimeout);
- if (!mService.mBooted && isFrontStack(r.task.stack)) {
- mService.mBooted = true;
- enableScreen = true;
- }
- } else if (fromTimeout) {
- reportActivityLaunchedLocked(fromTimeout, null, -1, -1);
+ if (fromTimeout) {
+ reportActivityLaunchedLocked(fromTimeout, r, -1, -1);
}
+
+ // This is a hack to semi-deal with a race condition
+ // in the client where it can be constructed with a
+ // newer configuration from when we asked it to launch.
+ // We'll update with whatever configuration it now says
+ // it used to launch.
+ if (config != null) {
+ r.configuration = config;
+ }
+
+ // We are now idle. If someone is waiting for a thumbnail from
+ // us, we can now deliver.
+ r.idle = true;
+
+ if (r.thumbnailNeeded && r.app != null && r.app.thread != null) {
+ sendThumbnail = r.app.thread;
+ r.thumbnailNeeded = false;
+ }
+
+ //Slog.i(TAG, "IDLE: mBooted=" + mBooted + ", fromTimeout=" + fromTimeout);
+ if (!mService.mBooted && isFrontStack(r.task.stack)) {
+ mService.mBooted = true;
+ enableScreen = true;
+ }
+ }
+
+ if (allResumedActivitiesIdle()) {
+ if (r != null) {
+ mService.scheduleAppGcsLocked();
+ mService.requestPssLocked(r.app, SystemClock.uptimeMillis(), false);
+ }
+
+ if (mLaunchingActivity.isHeld()) {
+ mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
+ if (VALIDATE_WAKE_LOCK_CALLER &&
+ Binder.getCallingUid() != Process.myUid()) {
+ throw new IllegalStateException("Calling must be system uid");
+ }
+ mLaunchingActivity.release();
+ }
+ ensureActivitiesVisibleLocked(null, 0);
}
// Atomically retrieve all of the other things to do.
@@ -1814,7 +1859,7 @@
resumeTopActivitiesLocked();
}
- return res;
+ return r;
}
void handleAppDiedLocked(ProcessRecord app, boolean restarting) {
@@ -1882,7 +1927,7 @@
void findTaskToMoveToFrontLocked(int taskId, int flags, Bundle options) {
for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
if (mStacks.get(stackNdx).findTaskToMoveToFrontLocked(taskId, flags, options)) {
- if (DEBUG_STACK) Slog.d(TAG, "findTaskToMoveToFront: moved to front of stack=" +
+ if (DEBUG_STACK) Slog.d(TAG, "findTaskToMoveToFront: moved to front of stack=" +
mStacks.get(stackNdx));
return;
}
@@ -1956,11 +2001,12 @@
scheduleSleepTimeout();
if (!mGoingToSleep.isHeld()) {
mGoingToSleep.acquire();
- for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
- final ActivityStack stack = mStacks.get(stackNdx);
- if (stack.mResumedActivity != null) {
- stack.stopIfSleepingLocked();
+ if (mLaunchingActivity.isHeld()) {
+ if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) {
+ throw new IllegalStateException("Calling must be system uid");
}
+ mLaunchingActivity.release();
+ mService.mHandler.removeMessages(LAUNCH_TIMEOUT_MSG);
}
}
}
@@ -2423,8 +2469,8 @@
synchronized (mService) {
activityIdleInternalLocked(r != null ? r.appToken : null, true, null);
}
- }
-
+ }
+
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
@@ -2459,6 +2505,23 @@
}
}
} break;
+ case LAUNCH_TIMEOUT_MSG: {
+ if (mService.mDidDexOpt) {
+ mService.mDidDexOpt = false;
+ mHandler.sendEmptyMessageDelayed(LAUNCH_TIMEOUT_MSG, LAUNCH_TIMEOUT);
+ return;
+ }
+ synchronized (mService) {
+ if (mLaunchingActivity.isHeld()) {
+ Slog.w(TAG, "Launch timeout has expired, giving up wake lock!");
+ if (VALIDATE_WAKE_LOCK_CALLER
+ && Binder.getCallingUid() != Process.myUid()) {
+ throw new IllegalStateException("Calling must be system uid");
+ }
+ mLaunchingActivity.release();
+ }
+ }
+ } break;
}
}
}
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index 1671d24..14f4102 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -425,8 +425,14 @@
} else {
sb.append('u');
sb.append(userId);
- sb.append('a');
- sb.append(UserHandle.getAppId(info.uid));
+ int appId = UserHandle.getAppId(info.uid);
+ if (appId >= Process.FIRST_APPLICATION_UID) {
+ sb.append('a');
+ sb.append(appId - Process.FIRST_APPLICATION_UID);
+ } else {
+ sb.append('s');
+ sb.append(appId);
+ }
if (uid != info.uid) {
sb.append('i');
sb.append(UserHandle.getAppId(uid) - Process.FIRST_ISOLATED_UID);
diff --git a/services/java/com/android/server/am/ProcessTracker.java b/services/java/com/android/server/am/ProcessTracker.java
index fbdbdd9..0ea93e8 100644
--- a/services/java/com/android/server/am/ProcessTracker.java
+++ b/services/java/com/android/server/am/ProcessTracker.java
@@ -22,6 +22,7 @@
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
+import android.text.format.DateFormat;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.AtomicFile;
@@ -137,19 +138,24 @@
static final String CSV_SEP = "\t";
+ static final int MAX_HISTORIC_STATES = 4; // Maximum number of historic states we will keep.
+ static final String STATE_FILE_PREFIX = "state-"; // Prefix to use for state filenames.
+ static final String STATE_FILE_SUFFIX = ".bin"; // Suffix to use for state filenames.
+ static final String STATE_FILE_CHECKIN_SUFFIX = ".ci"; // State files that have checked in.
static long WRITE_PERIOD = 30*60*1000; // Write file every 30 minutes or so.
+ static long COMMIT_PERIOD = 24*60*60*1000; // Commit current stats every day.
+ final Object mLock;
final File mBaseDir;
- final AtomicFile mFile;
- final State mState = new State();
- long mLastWriteTime;
+ State mState;
+ boolean mCommitPending;
boolean mShuttingDown;
- final Object mPendingWriteLock = new Object();
- Parcel mPendingWrite;
final ReentrantLock mWriteLock = new ReentrantLock();
public static final class ProcessState {
+ static final int[] BAD_TABLE = new int[0];
+
final State mState;
final ProcessState mCommonProcess;
final String mPackage;
@@ -257,10 +263,14 @@
out.writeInt(mMultiPackage ? 1 : 0);
out.writeInt(mDurationsTableSize);
for (int i=0; i<mDurationsTableSize; i++) {
+ if (DEBUG) Slog.i(TAG, "Writing in " + mName + " dur #" + i + ": "
+ + State.printLongOffset(mDurationsTable[i]));
out.writeInt(mDurationsTable[i]);
}
out.writeInt(mPssTableSize);
for (int i=0; i<mPssTableSize; i++) {
+ if (DEBUG) Slog.i(TAG, "Writing in " + mName + " pss #" + i + ": "
+ + State.printLongOffset(mPssTable[i]));
out.writeInt(mPssTable[i]);
}
out.writeInt(mNumExcessiveWake);
@@ -268,17 +278,22 @@
}
private int[] readTable(Parcel in, String what) {
- int size = in.readInt();
+ final int size = in.readInt();
if (size < 0) {
Slog.w(TAG, "Ignoring existing stats; bad " + what + " table size: " + size);
+ return BAD_TABLE;
+ }
+ if (size == 0) {
return null;
}
- int[] table = new int[size];
+ final int[] table = new int[size];
for (int i=0; i<size; i++) {
table[i] = in.readInt();
+ if (DEBUG) Slog.i(TAG, "Reading in " + mName + " table #" + i + ": "
+ + State.printLongOffset(table[i]));
if (!mState.validateLongOffset(table[i])) {
- Slog.w(TAG, "Ignoring existing stats; bad " + what + " table entry: 0x"
- + Integer.toHexString(table[i]));
+ Slog.w(TAG, "Ignoring existing stats; bad " + what + " table entry: "
+ + State.printLongOffset(table[i]));
return null;
}
}
@@ -290,16 +305,18 @@
if (fully) {
mMultiPackage = multiPackage;
}
+ if (DEBUG) Slog.d(TAG, "Reading durations table...");
mDurationsTable = readTable(in, "durations");
- if (mDurationsTable == null) {
+ if (mDurationsTable == BAD_TABLE) {
return false;
}
- mDurationsTableSize = mDurationsTable.length;
+ mDurationsTableSize = mDurationsTable != null ? mDurationsTable.length : 0;
+ if (DEBUG) Slog.d(TAG, "Reading pss table...");
mPssTable = readTable(in, "pss");
- if (mPssTable == null) {
+ if (mPssTable == BAD_TABLE) {
return false;
}
- mPssTableSize = mPssTable.length;
+ mPssTableSize = mPssTable != null ? mPssTable.length : 0;
mNumExcessiveWake = in.readInt();
mNumExcessiveCpu = in.readInt();
return true;
@@ -334,19 +351,21 @@
void commitStateTime(long now) {
if (mCurState != STATE_NOTHING) {
long dur = now - mStartTime;
- int idx = State.binarySearch(mDurationsTable, mDurationsTableSize, mCurState);
- int off;
- if (idx >= 0) {
- off = mDurationsTable[idx];
- } else {
- mState.mAddLongTable = mDurationsTable;
- mState.mAddLongTableSize = mDurationsTableSize;
- off = mState.addLongData(~idx, mCurState, 1);
- mDurationsTable = mState.mAddLongTable;
- mDurationsTableSize = mState.mAddLongTableSize;
+ if (dur > 0) {
+ int idx = State.binarySearch(mDurationsTable, mDurationsTableSize, mCurState);
+ int off;
+ if (idx >= 0) {
+ off = mDurationsTable[idx];
+ } else {
+ mState.mAddLongTable = mDurationsTable;
+ mState.mAddLongTableSize = mDurationsTableSize;
+ off = mState.addLongData(~idx, mCurState, 1);
+ mDurationsTable = mState.mAddLongTable;
+ mDurationsTableSize = mState.mAddLongTableSize;
+ }
+ long[] longs = mState.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
+ longs[(off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK] += dur;
}
- long[] longs = mState.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
- longs[(off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK] += dur;
}
mStartTime = now;
}
@@ -570,12 +589,20 @@
static final class State {
// Current version of the parcel format.
- public static final int PARCEL_VERSION = 1;
+ private static final int PARCEL_VERSION = 3;
// In-memory Parcel magic number, used to detect attempts to unmarshall bad data
private static final int MAGIC = 0x50535453;
- long mTimePeriodStart;
- long mTimePeriodEnd;
+ final File mBaseDir;
+ final ProcessTracker mProcessTracker;
+ AtomicFile mFile;
+ String mReadError;
+
+ long mTimePeriodStartClock;
+ String mTimePeriodStartClockStr;
+ long mTimePeriodStartRealtime;
+ long mTimePeriodEndRealtime;
+ boolean mRunning;
final ProcessMap<PackageState> mPackages = new ProcessMap<PackageState>();
final ProcessMap<ProcessState> mProcesses = new ProcessMap<ProcessState>();
@@ -590,19 +617,36 @@
int[] mAddLongTable;
int mAddLongTableSize;
- State() {
+ final Object mPendingWriteLock = new Object();
+ Parcel mPendingWrite;
+ long mLastWriteTime;
+
+ State(File baseDir, ProcessTracker tracker) {
+ mBaseDir = baseDir;
reset();
+ mProcessTracker = tracker;
+ }
+
+ State(String file) {
+ mBaseDir = null;
+ reset();
+ mFile = new AtomicFile(new File(file));
+ mProcessTracker = null;
+ readLocked();
}
void reset() {
+ if (DEBUG && mFile != null) Slog.d(TAG, "Resetting state of " + mFile.getBaseFile());
resetCommon();
mPackages.getMap().clear();
mProcesses.getMap().clear();
mMemFactor = STATE_NOTHING;
mStartTime = 0;
+ if (DEBUG && mFile != null) Slog.d(TAG, "State reset; now " + mFile.getBaseFile());
}
void resetSafely() {
+ if (DEBUG && mFile != null) Slog.d(TAG, "Safely resetting state of " + mFile.getBaseFile());
resetCommon();
long now = SystemClock.uptimeMillis();
ArrayMap<String, SparseArray<ProcessState>> procMap = mProcesses.getMap();
@@ -632,10 +676,14 @@
}
}
mStartTime = SystemClock.uptimeMillis();
+ if (DEBUG && mFile != null) Slog.d(TAG, "State reset; now " + mFile.getBaseFile());
}
private void resetCommon() {
- mTimePeriodStart = mTimePeriodEnd = System.currentTimeMillis();
+ mLastWriteTime = SystemClock.uptimeMillis();
+ mTimePeriodStartClock = System.currentTimeMillis();
+ buildTimePeriodStartClockStr();
+ mTimePeriodStartRealtime = mTimePeriodEndRealtime = SystemClock.elapsedRealtime();
mLongs.clear();
mLongs.add(new long[LONGS_SIZE]);
mNextLong = 0;
@@ -644,6 +692,150 @@
mStartTime = 0;
}
+ private void buildTimePeriodStartClockStr() {
+ mTimePeriodStartClockStr = DateFormat.format("yyyy-MM-dd-HH-mm-ss",
+ mTimePeriodStartClock).toString();
+ if (mBaseDir != null) {
+ mFile = new AtomicFile(new File(mBaseDir,
+ STATE_FILE_PREFIX + mTimePeriodStartClockStr + STATE_FILE_SUFFIX));
+ }
+ }
+
+ static byte[] readFully(FileInputStream stream) throws java.io.IOException {
+ int pos = 0;
+ int avail = stream.available();
+ byte[] data = new byte[avail];
+ while (true) {
+ int amt = stream.read(data, pos, data.length-pos);
+ //Log.i("foo", "Read " + amt + " bytes at " + pos
+ // + " of avail " + data.length);
+ if (amt <= 0) {
+ //Log.i("foo", "**** FINISHED READING: pos=" + pos
+ // + " len=" + data.length);
+ return data;
+ }
+ pos += amt;
+ avail = stream.available();
+ if (avail > data.length-pos) {
+ byte[] newData = new byte[pos+avail];
+ System.arraycopy(data, 0, newData, 0, pos);
+ data = newData;
+ }
+ }
+ }
+
+ void readLocked() {
+ try {
+ FileInputStream stream = mFile.openRead();
+
+ byte[] raw = readFully(stream);
+ Parcel in = Parcel.obtain();
+ in.unmarshall(raw, 0, raw.length);
+ in.setDataPosition(0);
+ stream.close();
+
+ readFromParcel(in);
+ if (mReadError != null) {
+ Slog.w(TAG, "Ignoring existing stats; " + mReadError);
+ if (DEBUG) {
+ ArrayMap<String, SparseArray<ProcessState>> procMap = mProcesses.getMap();
+ final int NPROC = procMap.size();
+ for (int ip=0; ip<NPROC; ip++) {
+ Slog.w(TAG, "Process: " + procMap.keyAt(ip));
+ SparseArray<ProcessState> uids = procMap.valueAt(ip);
+ final int NUID = uids.size();
+ for (int iu=0; iu<NUID; iu++) {
+ Slog.w(TAG, " Uid " + uids.keyAt(iu) + ": " + uids.valueAt(iu));
+ }
+ }
+ ArrayMap<String, SparseArray<PackageState>> pkgMap = mPackages.getMap();
+ final int NPKG = pkgMap.size();
+ for (int ip=0; ip<NPKG; ip++) {
+ Slog.w(TAG, "Package: " + pkgMap.keyAt(ip));
+ SparseArray<PackageState> uids = pkgMap.valueAt(ip);
+ final int NUID = uids.size();
+ for (int iu=0; iu<NUID; iu++) {
+ Slog.w(TAG, " Uid: " + uids.keyAt(iu));
+ PackageState pkgState = uids.valueAt(iu);
+ final int NPROCS = pkgState.mProcesses.size();
+ for (int iproc=0; iproc<NPROCS; iproc++) {
+ Slog.w(TAG, " Process " + pkgState.mProcesses.keyAt(iproc)
+ + ": " + pkgState.mProcesses.valueAt(iproc));
+ }
+ final int NSRVS = pkgState.mServices.size();
+ for (int isvc=0; isvc<NSRVS; isvc++) {
+ Slog.w(TAG, " Service " + pkgState.mServices.keyAt(isvc)
+ + ": " + pkgState.mServices.valueAt(isvc));
+ }
+ }
+ }
+ }
+ }
+ } catch (Throwable e) {
+ mReadError = "error reading: " + e;
+ Slog.e(TAG, "Error reading process statistics", e);
+ }
+ }
+
+ private void writeStateLocked(boolean sync, final boolean commit) {
+ synchronized (mPendingWriteLock) {
+ long now = SystemClock.uptimeMillis();
+ mPendingWrite = Parcel.obtain();
+ mTimePeriodEndRealtime = SystemClock.elapsedRealtime();
+ writeToParcel(mPendingWrite);
+ mLastWriteTime = SystemClock.uptimeMillis();
+ Slog.i(TAG, "Prepared write state in " + (SystemClock.uptimeMillis()-now) + "ms");
+ if (!sync) {
+ BackgroundThread.getHandler().post(new Runnable() {
+ @Override public void run() {
+ performWriteState(commit);
+ }
+ });
+ return;
+ }
+ }
+
+ performWriteState(commit);
+ }
+
+ void performWriteState(boolean commit) {
+ if (DEBUG) Slog.d(TAG, "Performing write to " + mFile.getBaseFile()
+ + " commit=" + commit);
+ Parcel data;
+ synchronized (mPendingWriteLock) {
+ data = mPendingWrite;
+ if (data == null) {
+ return;
+ }
+ mPendingWrite = null;
+ if (mProcessTracker != null) {
+ mProcessTracker.mWriteLock.lock();
+ }
+ }
+
+ FileOutputStream stream = null;
+ try {
+ stream = mFile.startWrite();
+ stream.write(data.marshall());
+ stream.flush();
+ mFile.finishWrite(stream);
+ if (DEBUG) Slog.d(TAG, "Write completed successfully!");
+ } catch (IOException e) {
+ Slog.w(TAG, "Error writing process statistics", e);
+ mFile.failWrite(stream);
+ } finally {
+ data.recycle();
+ if (mProcessTracker != null) {
+ mProcessTracker.trimHistoricStatesWriteLocked();
+ mProcessTracker.mWriteLock.unlock();
+ }
+ }
+
+ if (commit) {
+ resetSafely();
+ }
+ }
+
void writeToParcel(Parcel out) {
long now = SystemClock.uptimeMillis();
out.writeInt(MAGIC);
@@ -653,8 +845,9 @@
out.writeInt(PSS_COUNT);
out.writeInt(LONGS_SIZE);
- out.writeLong(mTimePeriodStart);
- out.writeLong(mTimePeriodEnd);
+ out.writeLong(mTimePeriodStartClock);
+ out.writeLong(mTimePeriodStartRealtime);
+ out.writeLong(mTimePeriodEndRealtime);
out.writeInt(mLongs.size());
out.writeInt(mNextLong);
@@ -664,6 +857,7 @@
long[] lastLongs = mLongs.get(mLongs.size()-1);
for (int i=0; i<mNextLong; i++) {
out.writeLong(lastLongs[i]);
+ if (DEBUG) Slog.d(TAG, "Writing last long #" + i + ": " + lastLongs[i]);
}
if (mMemFactor != STATE_NOTHING) {
@@ -726,13 +920,13 @@
private boolean readCheckedInt(Parcel in, int val, String what) {
int got;
if ((got=in.readInt()) != val) {
- Slog.w(TAG, "Ignoring existing stats; bad " + ": " + got);
+ mReadError = "bad " + ": " + got;
return false;
}
return true;
}
- void readFromParcel(Parcel in) {
+ private void readFromParcel(Parcel in) {
final boolean hadData = mPackages.getMap().size() > 0
|| mProcesses.getMap().size() > 0;
if (hadData) {
@@ -758,11 +952,14 @@
return;
}
- mTimePeriodStart = in.readLong();
- mTimePeriodEnd = in.readLong();
+ mTimePeriodStartClock = in.readLong();
+ buildTimePeriodStartClockStr();
+ mTimePeriodStartRealtime = in.readLong();
+ mTimePeriodEndRealtime = in.readLong();
- int NLONGS = in.readInt();
- int NEXTLONG = in.readInt();
+ final int NLONGS = in.readInt();
+ final int NEXTLONG = in.readInt();
+ mLongs.clear();
for (int i=0; i<(NLONGS-1); i++) {
while (i >= mLongs.size()) {
mLongs.add(new long[LONGS_SIZE]);
@@ -773,6 +970,7 @@
mNextLong = NEXTLONG;
for (int i=0; i<NEXTLONG; i++) {
longs[i] = in.readLong();
+ if (DEBUG) Slog.d(TAG, "Reading last long #" + i + ": " + longs[i]);
}
mLongs.add(longs);
@@ -780,31 +978,31 @@
int NPROC = in.readInt();
if (NPROC < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad process count: " + NPROC);
+ mReadError = "bad process count: " + NPROC;
return;
}
while (NPROC > 0) {
NPROC--;
String procName = in.readString();
if (procName == null) {
- Slog.w(TAG, "Ignoring existing stats; bad process name");
+ mReadError = "bad process name";
return;
}
int NUID = in.readInt();
if (NUID < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad uid count: " + NUID);
+ mReadError = "bad uid count: " + NUID;
return;
}
while (NUID > 0) {
NUID--;
int uid = in.readInt();
if (uid < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad uid: " + uid);
+ mReadError = "bad uid: " + uid;
return;
}
String pkgName = in.readString();
if (pkgName == null) {
- Slog.w(TAG, "Ignoring existing stats; bad process package name");
+ mReadError = "bad process package name";
return;
}
ProcessState proc = hadData ? mProcesses.get(procName, uid) : null;
@@ -827,57 +1025,57 @@
int NPKG = in.readInt();
if (NPKG < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad package count: " + NPKG);
+ mReadError = "bad package count: " + NPKG;
return;
}
while (NPKG > 0) {
NPKG--;
String pkgName = in.readString();
if (pkgName == null) {
- Slog.w(TAG, "Ignoring existing stats; bad package name");
+ mReadError = "bad package name";
return;
}
int NUID = in.readInt();
if (NUID < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad uid count: " + NUID);
+ mReadError = "bad uid count: " + NUID;
return;
}
while (NUID > 0) {
NUID--;
int uid = in.readInt();
if (uid < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad uid: " + uid);
+ mReadError = "bad uid: " + uid;
return;
}
PackageState pkgState = new PackageState(uid);
mPackages.put(pkgName, uid, pkgState);
int NPROCS = in.readInt();
if (NPROCS < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad package process count: " + NPROCS);
+ mReadError = "bad package process count: " + NPROCS;
return;
}
while (NPROCS > 0) {
NPROCS--;
String procName = in.readString();
if (procName == null) {
- Slog.w(TAG, "Ignoring existing stats; bad package process name");
+ mReadError = "bad package process name";
return;
}
int hasProc = in.readInt();
if (DEBUG) Slog.d(TAG, "Reading package " + pkgName + " " + uid
+ " process " + procName + " hasProc=" + hasProc);
+ ProcessState commonProc = mProcesses.get(procName, uid);
+ if (DEBUG) Slog.d(TAG, "Got common proc " + procName + " " + uid
+ + ": " + commonProc);
+ if (commonProc == null) {
+ mReadError = "no common proc: " + procName;
+ return;
+ }
if (hasProc != 0) {
// The process for this package is unique to the package; we
// need to load it. We don't need to do anything about it if
// it is not unique because if someone later looks for it
// they will find and use it from the global procs.
- ProcessState commonProc = mProcesses.get(procName, uid);
- if (DEBUG) Slog.d(TAG, "Got common proc " + procName + " " + uid
- + ": " + commonProc);
- if (commonProc == null) {
- Slog.w(TAG, "Ignoring existing stats; no common proc: " + procName);
- return;
- }
ProcessState proc = hadData ? pkgState.mProcesses.get(procName) : null;
if (proc != null) {
if (!proc.readFromParcel(in, false)) {
@@ -892,18 +1090,22 @@
if (DEBUG) Slog.d(TAG, "Adding package " + pkgName + " process: "
+ procName + " " + uid + " " + proc);
pkgState.mProcesses.put(procName, proc);
+ } else {
+ if (DEBUG) Slog.d(TAG, "Adding package " + pkgName + " process: "
+ + procName + " " + uid + " " + commonProc);
+ pkgState.mProcesses.put(procName, commonProc);
}
}
int NSRVS = in.readInt();
if (NSRVS < 0) {
- Slog.w(TAG, "Ignoring existing stats; bad package service count: " + NSRVS);
+ mReadError = "bad package service count: " + NSRVS;
return;
}
while (NSRVS > 0) {
NSRVS--;
String serviceName = in.readString();
if (serviceName == null) {
- Slog.w(TAG, "Ignoring existing stats; bad package service name");
+ mReadError = "bad package service name";
return;
}
ServiceState serv = hadData ? pkgState.mServices.get(serviceName) : null;
@@ -966,9 +1168,19 @@
if (idx >= LONGS_SIZE) {
return false;
}
+ if (DEBUG) Slog.d(TAG, "Validated long " + printLongOffset(off)
+ + ": " + getLong(off, 0));
return true;
}
+ static String printLongOffset(int off) {
+ StringBuilder sb = new StringBuilder(16);
+ sb.append("a"); sb.append((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
+ sb.append("i"); sb.append((off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK);
+ sb.append("t"); sb.append((off>>OFFSET_TYPE_SHIFT)&OFFSET_TYPE_MASK);
+ return sb.toString();
+ }
+
void setLong(int off, int index, long value) {
long[] longs = mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
longs[index + ((off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK)] = value;
@@ -1032,7 +1244,7 @@
// The original package it was created for now needs to point
// to its own copy.
long now = SystemClock.uptimeMillis();
- pkgState.mProcesses.put(commonProc.mPackage, commonProc.clone(
+ pkgState.mProcesses.put(commonProc.mName, commonProc.clone(
commonProc.mPackage, now));
ps = new ProcessState(commonProc, packageName, uid, processName, now);
}
@@ -1046,8 +1258,7 @@
return ps;
}
- void dumpLocked(PrintWriter pw, String reqPackage, boolean dumpAll) {
- final long now = SystemClock.uptimeMillis();
+ void dumpLocked(PrintWriter pw, String reqPackage, long now, boolean dumpAll) {
ArrayMap<String, SparseArray<PackageState>> pkgMap = mPackages.getMap();
boolean printedHeader = false;
for (int ip=0; ip<pkgMap.size(); ip++) {
@@ -1109,49 +1320,78 @@
}
}
- dumpFilteredProcesses(pw, "Processes running while critical mem:", " ",
- new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
- new int[] {ADJ_MEM_FACTOR_CRITICAL},
- new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
- STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
- now, reqPackage);
- dumpFilteredProcesses(pw, "Processes running while low mem:", " ",
- new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
- new int[] {ADJ_MEM_FACTOR_LOW},
- new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
- STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
- now, reqPackage);
- dumpFilteredProcesses(pw, "Processes running while moderate mem:", " ",
- new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
- new int[] {ADJ_MEM_FACTOR_MODERATE},
- new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
- STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
- now, reqPackage);
- dumpFilteredProcesses(pw, "Processes running while normal mem:", " ",
- new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
- new int[] {ADJ_MEM_FACTOR_NORMAL},
- new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
- STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
+ if (reqPackage == null) {
+ ArrayMap<String, SparseArray<ProcessState>> procMap = mProcesses.getMap();
+ printedHeader = false;
+ for (int ip=0; ip<procMap.size(); ip++) {
+ String procName = procMap.keyAt(ip);
+ SparseArray<ProcessState> uids = procMap.valueAt(ip);
+ for (int iu=0; iu<uids.size(); iu++) {
+ int uid = uids.keyAt(iu);
+ ProcessState proc = uids.valueAt(iu);
+ if (proc.mDurationsTableSize == 0 && proc.mCurState == STATE_NOTHING
+ && proc.mPssTableSize == 0) {
+ continue;
+ }
+ if (!printedHeader) {
+ pw.println("Process Stats:");
+ printedHeader = true;
+ }
+ pw.print(" * "); pw.print(procName); pw.print(" / ");
+ UserHandle.formatUid(pw, uid);
+ pw.print(" ("); pw.print(proc.mDurationsTableSize);
+ pw.print(" entries)"); pw.println(":");
+ dumpProcessState(pw, " ", proc, ALL_SCREEN_ADJ, ALL_MEM_ADJ,
+ ALL_PROC_STATES, now);
+ dumpProcessPss(pw, " ", proc, ALL_SCREEN_ADJ, ALL_MEM_ADJ,
+ ALL_PROC_STATES);
+ }
+ }
+
+ pw.println();
+ pw.println("Summary:");
+ dumpSummaryLocked(pw, reqPackage, now);
+ }
+
+ if (dumpAll) {
+ pw.println();
+ pw.println("Internal state:");
+ pw.print(" mFile="); pw.println(mFile.getBaseFile());
+ pw.print(" Num long arrays: "); pw.println(mLongs.size());
+ pw.print(" Next long entry: "); pw.println(mNextLong);
+ pw.print(" mRunning="); pw.println(mRunning);
+ }
+ }
+
+ void dumpSummaryLocked(PrintWriter pw, String reqPackage, long now) {
+ dumpFilteredSummaryLocked(pw, null, " ", ALL_SCREEN_ADJ, ALL_MEM_ADJ,
+ new int[] { STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+ STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS },
now, reqPackage);
pw.println();
pw.println("Run time Stats:");
dumpSingleTime(pw, " ", mMemFactorDurations, mMemFactor, mStartTime, now);
- if (dumpAll) {
- pw.println();
- pw.println("Internal state:");
- pw.print(" Num long arrays: "); pw.println(mLongs.size());
- pw.print(" Next long entry: "); pw.println(mNextLong);
- }
+ pw.println();
+ pw.print(" Start time: ");
+ pw.print(DateFormat.format("yyyy-MM-dd HH:mm:ss", mTimePeriodStartClock));
+ pw.println();
+ pw.print(" Total elapsed time: ");
+ TimeUtils.formatDuration(
+ (mRunning ? SystemClock.elapsedRealtime() : mTimePeriodEndRealtime)
+ - mTimePeriodStartRealtime, pw);
+ pw.println();
}
- void dumpFilteredProcesses(PrintWriter pw, String header, String prefix,
+ void dumpFilteredSummaryLocked(PrintWriter pw, String header, String prefix,
int[] screenStates, int[] memStates, int[] procStates, long now, String reqPackage) {
ArrayList<ProcessState> procs = collectProcessesLocked(screenStates, memStates,
procStates, now, reqPackage);
if (procs.size() > 0) {
- pw.println();
- pw.println(header);
- dumpProcessList(pw, prefix, procs, screenStates, memStates, procStates, now);
+ if (header != null) {
+ pw.println();
+ pw.println(header);
+ }
+ dumpProcessSummary(pw, prefix, procs, screenStates, memStates, procStates, now);
}
}
@@ -1194,10 +1434,29 @@
return outProcs;
}
+ String collapseString(String pkgName, String itemName) {
+ if (itemName.startsWith(pkgName)) {
+ final int ITEMLEN = itemName.length();
+ final int PKGLEN = pkgName.length();
+ if (ITEMLEN == PKGLEN) {
+ return "";
+ } else if (ITEMLEN >= PKGLEN) {
+ if (itemName.charAt(PKGLEN) == '.') {
+ return itemName.substring(PKGLEN);
+ }
+ }
+ }
+ return itemName;
+ }
+
void dumpCheckinLocked(PrintWriter pw, String reqPackage) {
final long now = SystemClock.uptimeMillis();
ArrayMap<String, SparseArray<PackageState>> pkgMap = mPackages.getMap();
pw.println("vers,1");
+ pw.print("period,"); pw.print(mTimePeriodStartClockStr);
+ pw.print(","); pw.print(mTimePeriodStartRealtime); pw.print(",");
+ pw.print(mRunning ? SystemClock.elapsedRealtime() : mTimePeriodEndRealtime);
+ pw.println();
for (int ip=0; ip<pkgMap.size(); ip++) {
String pkgName = pkgMap.keyAt(ip);
if (reqPackage != null && !reqPackage.equals(pkgName)) {
@@ -1216,7 +1475,7 @@
pw.print(",");
pw.print(uid);
pw.print(",");
- pw.print(pkgState.mProcesses.keyAt(iproc));
+ pw.print(collapseString(pkgName, pkgState.mProcesses.keyAt(iproc)));
dumpAllProcessStateCheckin(pw, proc, now);
pw.println();
if (proc.mPssTableSize > 0) {
@@ -1225,7 +1484,7 @@
pw.print(",");
pw.print(uid);
pw.print(",");
- pw.print(pkgState.mProcesses.keyAt(iproc));
+ pw.print(collapseString(pkgName, pkgState.mProcesses.keyAt(iproc)));
dumpAllProcessPssCheckin(pw, proc);
pw.println();
}
@@ -1235,7 +1494,7 @@
pw.print(",");
pw.print(uid);
pw.print(",");
- pw.print(pkgState.mProcesses.keyAt(iproc));
+ pw.print(collapseString(pkgName, pkgState.mProcesses.keyAt(iproc)));
pw.print(",");
pw.print(proc.mNumExcessiveWake);
pw.print(",");
@@ -1244,7 +1503,8 @@
}
}
for (int isvc=0; isvc<NSRVS; isvc++) {
- String serviceName = pkgState.mServices.keyAt(isvc);
+ String serviceName = collapseString(pkgName,
+ pkgState.mServices.keyAt(isvc));
ServiceState svc = pkgState.mServices.valueAt(isvc);
dumpServiceTimeCheckin(pw, "pkgsvc-start", pkgName, uid, serviceName,
svc, svc.mStartedCount, svc.mStartedDurations, svc.mStartedState,
@@ -1302,10 +1562,12 @@
}
}
- public ProcessTracker(File file) {
+ public ProcessTracker(Object lock, File file) {
+ mLock = lock;
mBaseDir = file;
mBaseDir.mkdirs();
- mFile = new AtomicFile(new File(file, "current.bin"));
+ mState = new State(mBaseDir, this);
+ mState.mRunning = true;
}
public ProcessState getProcessStateLocked(String packageName, int uid, String processName) {
@@ -1359,48 +1621,18 @@
return mState.mMemFactor != STATE_NOTHING ? mState.mMemFactor : 0;
}
- static byte[] readFully(FileInputStream stream) throws java.io.IOException {
- int pos = 0;
- int avail = stream.available();
- byte[] data = new byte[avail];
- while (true) {
- int amt = stream.read(data, pos, data.length-pos);
- //Log.i("foo", "Read " + amt + " bytes at " + pos
- // + " of avail " + data.length);
- if (amt <= 0) {
- //Log.i("foo", "**** FINISHED READING: pos=" + pos
- // + " len=" + data.length);
- return data;
- }
- pos += amt;
- avail = stream.available();
- if (avail > data.length-pos) {
- byte[] newData = new byte[pos+avail];
- System.arraycopy(data, 0, newData, 0, pos);
- data = newData;
- }
- }
- }
-
public void readLocked() {
- try {
- FileInputStream stream = mFile.openRead();
-
- byte[] raw = readFully(stream);
- Parcel in = Parcel.obtain();
- in.unmarshall(raw, 0, raw.length);
- in.setDataPosition(0);
- stream.close();
-
- mState.readFromParcel(in);
- } catch(Throwable e) {
- Slog.e(TAG, "Error reading process statistics", e);
- }
-
+ mState.readLocked();
}
public boolean shouldWriteNowLocked(long now) {
- return now > (mLastWriteTime+WRITE_PERIOD);
+ if (now > (mState.mLastWriteTime+WRITE_PERIOD)) {
+ if (SystemClock.elapsedRealtime() > (mState.mTimePeriodStartRealtime+COMMIT_PERIOD)) {
+ mCommitPending = true;
+ }
+ return true;
+ }
+ return false;
}
public void shutdownLocked() {
@@ -1421,50 +1653,46 @@
if (mShuttingDown) {
return;
}
-
- synchronized (mPendingWriteLock) {
- long now = SystemClock.uptimeMillis();
- mPendingWrite = Parcel.obtain();
- mState.mTimePeriodEnd = System.currentTimeMillis();
- mState.writeToParcel(mPendingWrite);
- mLastWriteTime = SystemClock.uptimeMillis();
- Slog.i(TAG, "Prepared write state in " + (SystemClock.uptimeMillis()-now) + "ms");
- if (!sync) {
- BackgroundThread.getHandler().post(new Runnable() {
- @Override public void run() {
- commitWriteState();
- }
- });
- return;
- }
- }
-
- commitWriteState();
+ boolean commitPending = mCommitPending;
+ mCommitPending = false;
+ mState.writeStateLocked(sync, commitPending);
}
- void commitWriteState() {
- Parcel data;
- synchronized (mPendingWriteLock) {
- data = mPendingWrite;
- if (data == null) {
- return;
- }
- mPendingWrite = null;
- mWriteLock.lock();
+ private ArrayList<String> getCommittedFiles(int minNum, boolean inclAll) {
+ File[] files = mBaseDir.listFiles();
+ if (files == null || files.length <= minNum) {
+ return null;
}
+ ArrayList<String> filesArray = new ArrayList<String>(files.length);
+ String currentFile = mState.mFile.getBaseFile().getPath();
+ if (DEBUG) Slog.d(TAG, "Collecting " + files.length + " files except: " + currentFile);
+ for (int i=0; i<files.length; i++) {
+ File file = files[i];
+ String fileStr = file.getPath();
+ if (DEBUG) Slog.d(TAG, "Collecting: " + fileStr);
+ if (!inclAll && fileStr.endsWith(STATE_FILE_CHECKIN_SUFFIX)) {
+ if (DEBUG) Slog.d(TAG, "Skipping: already checked in");
+ continue;
+ }
+ if (fileStr.equals(currentFile)) {
+ if (DEBUG) Slog.d(TAG, "Skipping: current stats");
+ continue;
+ }
+ filesArray.add(fileStr);
+ }
+ Collections.sort(filesArray);
+ return filesArray;
+ }
- FileOutputStream stream = null;
- try {
- stream = mFile.startWrite();
- stream.write(data.marshall());
- stream.flush();
- mFile.finishWrite(stream);
- } catch (IOException e) {
- Slog.w(TAG, "Error writing process statistics", e);
- mFile.failWrite(stream);
- } finally {
- data.recycle();
- mWriteLock.unlock();
+ public void trimHistoricStatesWriteLocked() {
+ ArrayList<String> filesArray = getCommittedFiles(MAX_HISTORIC_STATES, true);
+ if (filesArray == null) {
+ return;
+ }
+ while (filesArray.size() > MAX_HISTORIC_STATES) {
+ String file = filesArray.remove(0);
+ Slog.i(TAG, "Pruning old procstats: " + file);
+ (new File(file)).delete();
}
}
@@ -1603,6 +1831,76 @@
pw.println();
}
+ static final class ProcessDataCollection {
+ final int[] screenStates;
+ final int[] memStates;
+ final int[] procStates;
+
+ long totalTime;
+ long numPss;
+ long minPss;
+ long avgPss;
+ long maxPss;
+
+ ProcessDataCollection(int[] _screenStates, int[] _memStates, int[] _procStates) {
+ screenStates = _screenStates;
+ memStates = _memStates;
+ procStates = _procStates;
+ }
+
+ void print(PrintWriter pw, boolean full) {
+ TimeUtils.formatDuration(totalTime, pw);
+ if (numPss > 0) {
+ pw.print(" (");
+ printSizeValue(pw, minPss * 1024);
+ pw.print("-");
+ printSizeValue(pw, avgPss * 1024);
+ pw.print("-");
+ printSizeValue(pw, maxPss * 1024);
+ if (full) {
+ pw.print(" over ");
+ pw.print(numPss);
+ }
+ pw.print(")");
+ }
+ }
+ }
+
+ static void computeProcessData(ProcessState proc, ProcessDataCollection data, long now) {
+ data.totalTime = 0;
+ data.numPss = data.minPss = data.avgPss = data.maxPss = 0;
+ for (int is=0; is<data.screenStates.length; is++) {
+ for (int im=0; im<data.memStates.length; im++) {
+ for (int ip=0; ip<data.procStates.length; ip++) {
+ int bucket = ((data.screenStates[is] + data.memStates[im]) * STATE_COUNT)
+ + data.procStates[ip];
+ data.totalTime += proc.getDuration(bucket, now);
+ long samples = proc.getPssSampleCount(bucket);
+ if (samples > 0) {
+ long minPss = proc.getPssMinimum(bucket);
+ long avgPss = proc.getPssAverage(bucket);
+ long maxPss = proc.getPssMaximum(bucket);
+ if (data.numPss == 0) {
+ data.minPss = minPss;
+ data.avgPss = avgPss;
+ data.maxPss = maxPss;
+ } else {
+ if (minPss < data.minPss) {
+ data.minPss = minPss;
+ }
+ data.avgPss = (long)( ((data.avgPss*(double)data.numPss)
+ + (avgPss*(double)samples)) / (data.numPss+samples) );
+ if (maxPss > data.maxPss) {
+ data.maxPss = maxPss;
+ }
+ }
+ data.numPss += samples;
+ }
+ }
+ }
+ }
+ }
+
static long computeProcessTimeLocked(ProcessState proc, int[] screenStates, int[] memStates,
int[] procStates, long now) {
long totalTime = 0;
@@ -1618,7 +1916,7 @@
for (int is=0; is<screenStates.length; is++) {
for (int im=0; im<memStates.length; im++) {
for (int ip=0; ip<procStates.length; ip++) {
- int bucket = ((screenStates[is]+ memStates[im]) * STATE_COUNT)
+ int bucket = ((screenStates[is] + memStates[im]) * STATE_COUNT)
+ procStates[ip];
totalTime += proc.getDuration(bucket, now);
}
@@ -1710,12 +2008,12 @@
pw.print(STATE_NAMES[procStates[ip]]); pw.print(": ");
pw.print(count);
pw.print(" samples ");
- pw.print(proc.getPssMinimum(bucket));
- pw.print("kB ");
- pw.print(proc.getPssAverage(bucket));
- pw.print("kB ");
- pw.print(proc.getPssMaximum(bucket));
- pw.println("kB");
+ printSizeValue(pw, proc.getPssMinimum(bucket) * 1024);
+ pw.print(" ");
+ printSizeValue(pw, proc.getPssAverage(bucket) * 1024);
+ pw.print(" ");
+ printSizeValue(pw, proc.getPssMaximum(bucket) * 1024);
+ pw.println();
}
}
}
@@ -1817,6 +2115,94 @@
}
}
+ static void dumpProcessSummaryDetails(PrintWriter pw, ProcessState proc, String prefix,
+ String label, int[] screenStates, int[] memStates, int[] procStates,
+ long now, boolean full) {
+ ProcessDataCollection totals = new ProcessDataCollection(screenStates,
+ memStates, procStates);
+ computeProcessData(proc, totals, now);
+ if (totals.totalTime != 0 || totals.numPss != 0) {
+ if (prefix != null) {
+ pw.print(prefix);
+ }
+ if (label != null) {
+ pw.print(label);
+ }
+ totals.print(pw, full);
+ if (prefix != null) {
+ pw.println();
+ }
+ }
+ }
+
+ static void dumpProcessSummary(PrintWriter pw, String prefix, ArrayList<ProcessState> procs,
+ int[] screenStates, int[] memStates, int[] procStates, long now) {
+ for (int i=procs.size()-1; i>=0; i--) {
+ ProcessState proc = procs.get(i);
+ pw.print(prefix);
+ pw.print("* ");
+ pw.print(proc.mName);
+ pw.print(" / ");
+ UserHandle.formatUid(pw, proc.mUid);
+ pw.println(":");
+ dumpProcessSummaryDetails(pw, proc, prefix, " TOTAL: ", screenStates, memStates,
+ procStates, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " Persistent: ", screenStates, memStates,
+ new int[] {STATE_PERSISTENT}, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " Top: ", screenStates, memStates,
+ new int[] {STATE_TOP}, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " Foreground: ", screenStates, memStates,
+ new int[] {STATE_FOREGROUND, STATE_VISIBLE, STATE_PERCEPTIBLE}, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " Backup: ", screenStates, memStates,
+ new int[] {STATE_BACKUP}, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " Service: ", screenStates, memStates,
+ new int[] {STATE_SERVICE}, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " Home: ", screenStates, memStates,
+ new int[] {STATE_HOME}, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " Previous: ", screenStates, memStates,
+ new int[] {STATE_PREVIOUS}, now, true);
+ dumpProcessSummaryDetails(pw, proc, prefix, " (Cached): ", screenStates, memStates,
+ new int[] {STATE_CACHED}, now, true);
+ }
+ }
+
+ private static void printSizeValue(PrintWriter pw, long number) {
+ float result = number;
+ String suffix = "";
+ if (result > 900) {
+ suffix = "KB";
+ result = result / 1024;
+ }
+ if (result > 900) {
+ suffix = "MB";
+ result = result / 1024;
+ }
+ if (result > 900) {
+ suffix = "GB";
+ result = result / 1024;
+ }
+ if (result > 900) {
+ suffix = "TB";
+ result = result / 1024;
+ }
+ if (result > 900) {
+ suffix = "PB";
+ result = result / 1024;
+ }
+ String value;
+ if (result < 1) {
+ value = String.format("%.2f", result);
+ } else if (result < 10) {
+ value = String.format("%.2f", result);
+ } else if (result < 100) {
+ value = String.format("%.2f", result);
+ } else {
+ value = String.format("%.0f", result);
+ }
+ pw.print(value);
+ pw.print(suffix);
+ }
+
static void dumpProcessListCsv(PrintWriter pw, ArrayList<ProcessState> procs,
boolean sepScreenStates, int[] screenStates, boolean sepMemStates, int[] memStates,
boolean sepProcStates, int[] procStates, long now) {
@@ -1970,15 +2356,18 @@
static private void dumpHelp(PrintWriter pw) {
pw.println("Process stats (procstats) dump options:");
- pw.println(" [--checkin|--csv] [csv-screen] [csv-proc] [csv-mem]");
- pw.println(" [--reset] [--write] [-h] [<package.name>]");
- pw.println(" --checkin: format output for a checkin report.");
+ pw.println(" [--checkin|-c|--csv] [--csv-screen] [--csv-proc] [--csv-mem]");
+ pw.println(" [--details] [--current] [--commit] [--write] [-h] [<package.name>]");
+ pw.println(" --checkin: perform a checkin: print and delete old committed states.");
+ pw.println(" --c: print only state in checkin format.");
pw.println(" --csv: output data suitable for putting in a spreadsheet.");
pw.println(" --csv-screen: on, off.");
pw.println(" --csv-mem: norm, mod, low, crit.");
pw.println(" --csv-proc: pers, top, fore, vis, precept, backup,");
pw.println(" service, home, prev, cached");
- pw.println(" --reset: reset the stats, clearing all current data.");
+ pw.println(" --details: dump all execution details, not just summary.");
+ pw.println(" --current: only dump current state.");
+ pw.println(" --commit: commit current stats to disk and reset to start new stats.");
pw.println(" --write: write current in-memory stats to disk.");
pw.println(" --read: replace current stats with last-written stats.");
pw.println(" -a: print everything.");
@@ -1986,11 +2375,14 @@
pw.println(" <package.name>: optional name of package to filter output by.");
}
- public void dumpLocked(FileDescriptor fd, PrintWriter pw, String[] args) {
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
final long now = SystemClock.uptimeMillis();
boolean isCheckin = false;
+ boolean isCompact = false;
boolean isCsv = false;
+ boolean currentOnly = false;
+ boolean dumpDetails = false;
boolean dumpAll = false;
String reqPackage = null;
boolean csvSepScreenStats = false;
@@ -2007,6 +2399,8 @@
String arg = args[i];
if ("--checkin".equals(arg)) {
isCheckin = true;
+ } else if ("-c".equals(arg)) {
+ isCompact = true;
} else if ("--csv".equals(arg)) {
isCsv = true;
} else if ("--csv-screen".equals(arg)) {
@@ -2058,9 +2452,13 @@
return;
}
csvSepProcStats = sep[0];
- } else if ("--reset".equals(arg)) {
- mState.resetSafely();
- pw.println("Process stats reset.");
+ } else if ("--details".equals(arg)) {
+ dumpDetails = true;
+ } else if ("--current".equals(arg)) {
+ currentOnly = true;
+ } else if ("--commit".equals(arg)) {
+ mState.writeStateLocked(true, true);
+ pw.println("Process stats committed.");
return;
} else if ("--write".equals(arg)) {
writeStateSyncLocked();
@@ -2074,6 +2472,7 @@
dumpHelp(pw);
return;
} else if ("-a".equals(arg)) {
+ dumpDetails = true;
dumpAll = true;
} else if (arg.length() > 0 && arg.charAt(0) == '-'){
pw.println("Unknown option: " + arg);
@@ -2085,6 +2484,11 @@
IPackageManager pm = AppGlobals.getPackageManager();
if (pm.getPackageUid(arg, UserHandle.getCallingUserId()) >= 0) {
reqPackage = arg;
+ // Include all details, since we know we are only going to
+ // be dumping a smaller set of data. In fact only the details
+ // container per-package data, so that are needed to be able
+ // to dump anything at all when filtering by package.
+ dumpDetails = true;
}
} catch (RemoteException e) {
}
@@ -2118,33 +2522,95 @@
}
}
pw.println();
- dumpFilteredProcessesCsvLocked(pw, null,
- csvSepScreenStats, csvScreenStats, csvSepMemStats, csvMemStats,
- csvSepProcStats, csvProcStats, now, reqPackage);
- /*
- dumpFilteredProcessesCsvLocked(pw, "Processes running while critical mem:",
- false, new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
- true, new int[] {ADJ_MEM_FACTOR_CRITICAL},
- true, new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
- STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME,
- STATE_PREVIOUS, STATE_CACHED},
- now, reqPackage);
- dumpFilteredProcessesCsvLocked(pw, "Processes running over all mem:",
- false, new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
- false, new int[] {ADJ_MEM_FACTOR_CRITICAL, ADJ_MEM_FACTOR_LOW,
- ADJ_MEM_FACTOR_MODERATE, ADJ_MEM_FACTOR_MODERATE},
- true, new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
- STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME,
- STATE_PREVIOUS, STATE_CACHED},
- now, reqPackage);
- */
+ synchronized (mLock) {
+ dumpFilteredProcessesCsvLocked(pw, null,
+ csvSepScreenStats, csvScreenStats, csvSepMemStats, csvMemStats,
+ csvSepProcStats, csvProcStats, now, reqPackage);
+ /*
+ dumpFilteredProcessesCsvLocked(pw, "Processes running while critical mem:",
+ false, new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+ true, new int[] {ADJ_MEM_FACTOR_CRITICAL},
+ true, new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+ STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME,
+ STATE_PREVIOUS, STATE_CACHED},
+ now, reqPackage);
+ dumpFilteredProcessesCsvLocked(pw, "Processes running over all mem:",
+ false, new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+ false, new int[] {ADJ_MEM_FACTOR_CRITICAL, ADJ_MEM_FACTOR_LOW,
+ ADJ_MEM_FACTOR_MODERATE, ADJ_MEM_FACTOR_MODERATE},
+ true, new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+ STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME,
+ STATE_PREVIOUS, STATE_CACHED},
+ now, reqPackage);
+ */
+ }
return;
}
- if (isCheckin) {
- mState.dumpCheckinLocked(pw, reqPackage);
- } else {
- mState.dumpLocked(pw, reqPackage, dumpAll);
+ boolean sepNeeded = false;
+ if (!currentOnly || isCheckin) {
+ mWriteLock.lock();
+ try {
+ ArrayList<String> files = getCommittedFiles(0, !isCheckin);
+ if (files != null) {
+ for (int i=0; i<files.size(); i++) {
+ if (DEBUG) Slog.d(TAG, "Retrieving state: " + files.get(i));
+ try {
+ State state = new State(files.get(i));
+ String fileStr = state.mFile.getBaseFile().getPath();
+ boolean checkedIn = fileStr.endsWith(STATE_FILE_CHECKIN_SUFFIX);
+ if (isCheckin || isCompact) {
+ // Don't really need to lock because we uniquely own this object.
+ state.dumpCheckinLocked(pw, reqPackage);
+ } else {
+ if (sepNeeded) {
+ pw.println();
+ } else {
+ sepNeeded = true;
+ }
+ pw.print("COMMITTED STATS FROM ");
+ pw.print(state.mTimePeriodStartClockStr);
+ if (checkedIn) pw.print(" (checked in)");
+ pw.println(":");
+ // Don't really need to lock because we uniquely own this object.
+ if (dumpDetails) {
+ state.dumpLocked(pw, reqPackage, now, dumpAll);
+ } else {
+ state.dumpSummaryLocked(pw, reqPackage, now);
+ }
+ }
+ if (isCheckin) {
+ // Rename file suffix to mark that it has checked in.
+ state.mFile.getBaseFile().renameTo(new File(
+ fileStr + STATE_FILE_CHECKIN_SUFFIX));
+ }
+ } catch (Throwable e) {
+ pw.print("**** FAILURE DUMPING STATE: "); pw.println(files.get(i));
+ e.printStackTrace(pw);
+ }
+ if (DEBUG) Slog.d(TAG, "Deleting state: " + files.get(i));
+ }
+ }
+ } finally {
+ mWriteLock.unlock();
+ }
+ }
+ if (!isCheckin) {
+ synchronized (mLock) {
+ if (isCompact) {
+ mState.dumpCheckinLocked(pw, reqPackage);
+ } else {
+ if (sepNeeded) {
+ pw.println();
+ pw.println("CURRENT STATS:");
+ }
+ if (dumpDetails) {
+ mState.dumpLocked(pw, reqPackage, now, dumpAll);
+ } else {
+ mState.dumpSummaryLocked(pw, reqPackage, now);
+ }
+ }
+ }
}
}
}
diff --git a/services/java/com/android/server/pm/KeySetManager.java b/services/java/com/android/server/pm/KeySetManager.java
index cc2473b..3480b19 100644
--- a/services/java/com/android/server/pm/KeySetManager.java
+++ b/services/java/com/android/server/pm/KeySetManager.java
@@ -42,7 +42,10 @@
static final String TAG = "KeySetManager";
- private static final long KEYSET_NOT_FOUND = -1;
+ /** Sentinel value returned when a {@code KeySet} is not found. */
+ public static final long KEYSET_NOT_FOUND = -1;
+
+ /** Sentinel value returned when public key is not found. */
private static final long PUBLIC_KEY_NOT_FOUND = -1;
private final Object mLockObject = new Object();
@@ -418,6 +421,21 @@
pw.print(" ["); pw.print(keySetPackage); pw.println("]");
if (pkg.keySetData != null) {
boolean printedLabel = false;
+ for (Map.Entry<String, Long> entry : pkg.keySetData.getAliases().entrySet()) {
+ if (!printedLabel) {
+ pw.print(" KeySets Aliases: ");
+ printedLabel = true;
+ } else {
+ pw.print(", ");
+ }
+ pw.print(entry.getKey());
+ pw.print('=');
+ pw.print(Long.toString(entry.getValue()));
+ }
+ if (printedLabel) {
+ pw.println("");
+ }
+ printedLabel = false;
for (long keySetId : pkg.keySetData.getDefinedKeySets()) {
if (!printedLabel) {
pw.print(" Defined KeySets: ");
@@ -433,12 +451,12 @@
printedLabel = false;
for (long keySetId : pkg.keySetData.getSigningKeySets()) {
if (!printedLabel) {
- pw.print(" Signing KeySets:");
+ pw.print(" Signing KeySets: ");
printedLabel = true;
} else {
pw.print(", ");
}
- pw.print(" "); pw.print(Long.toString(keySetId));
+ pw.print(Long.toString(keySetId));
}
if (printedLabel) {
pw.println("");
@@ -566,4 +584,4 @@
mPublicKeys.put(identifier, pub);
}
}
-}
\ No newline at end of file
+}
diff --git a/services/java/com/android/server/power/ShutdownThread.java b/services/java/com/android/server/power/ShutdownThread.java
index ba321bc..88a27f5 100644
--- a/services/java/com/android/server/power/ShutdownThread.java
+++ b/services/java/com/android/server/power/ShutdownThread.java
@@ -297,7 +297,9 @@
// First send the high-level shut down broadcast.
mActionDone = false;
- mContext.sendOrderedBroadcastAsUser(new Intent(Intent.ACTION_SHUTDOWN),
+ Intent intent = new Intent(Intent.ACTION_SHUTDOWN);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
+ mContext.sendOrderedBroadcastAsUser(intent,
UserHandle.ALL, null, br, mHandler, 0, null, null);
final long endTime = SystemClock.elapsedRealtime() + MAX_BROADCAST_TIME;
diff --git a/services/java/com/android/server/wifi/WifiController.java b/services/java/com/android/server/wifi/WifiController.java
index 4594fa67..87b4394 100644
--- a/services/java/com/android/server/wifi/WifiController.java
+++ b/services/java/com/android/server/wifi/WifiController.java
@@ -379,9 +379,6 @@
@Override
public void enter() {
-
- if (DBG) logd("Going to disabled without scan state");
-
mWifiStateMachine.setSupplicantRunning(false);
// Supplicant can't restart right away, so not the time we switched off
mDisabledTimestamp = SystemClock.elapsedRealtime();
@@ -499,9 +496,6 @@
@Override
public void enter() {
-
- if (DBG) logd("Enabling disabled with scan state");
-
mWifiStateMachine.setSupplicantRunning(true);
mWifiStateMachine.setOperationalMode(WifiStateMachine.SCAN_ONLY_WITH_WIFI_OFF_MODE);
mWifiStateMachine.setDriverStart(true);
diff --git a/services/java/com/android/server/wifi/WifiSettingsStore.java b/services/java/com/android/server/wifi/WifiSettingsStore.java
index f5c6ec3..3ff8061 100644
--- a/services/java/com/android/server/wifi/WifiSettingsStore.java
+++ b/services/java/com/android/server/wifi/WifiSettingsStore.java
@@ -51,7 +51,7 @@
mContext = context;
mAirplaneModeOn = getPersistedAirplaneModeOn();
mPersistWifiState = getPersistedWifiState();
- mScanAlwaysAvailable = false; // getPersistedScanAlwaysAvailable();
+ mScanAlwaysAvailable = getPersistedScanAlwaysAvailable();
}
synchronized boolean isWifiToggleEnabled() {
@@ -124,8 +124,7 @@
}
synchronized void handleWifiScanAlwaysAvailableToggled() {
- // mScanAlwaysAvailable = getPersistedScanAlwaysAvailable();
- mScanAlwaysAvailable = false;
+ mScanAlwaysAvailable = getPersistedScanAlwaysAvailable();
}
void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 7c6da92..dd19f89 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -363,7 +363,32 @@
mSubLayer = mPolicy.subWindowTypeToLayerLw(a.type);
mAttachedWindow = attachedWindow;
if (WindowManagerService.DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + this + " to " + mAttachedWindow);
- mAttachedWindow.mChildWindows.add(this);
+
+ int children_size = mAttachedWindow.mChildWindows.size();
+ if (children_size == 0) {
+ mAttachedWindow.mChildWindows.add(this);
+ } else {
+ for (int i = 0; i < children_size; i++) {
+ WindowState child = (WindowState)mAttachedWindow.mChildWindows.get(i);
+ if (this.mSubLayer < child.mSubLayer) {
+ mAttachedWindow.mChildWindows.add(i, this);
+ break;
+ } else if (this.mSubLayer > child.mSubLayer) {
+ continue;
+ }
+
+ if (this.mBaseLayer <= child.mBaseLayer) {
+ mAttachedWindow.mChildWindows.add(i, this);
+ break;
+ } else {
+ continue;
+ }
+ }
+ if (children_size == mAttachedWindow.mChildWindows.size()) {
+ mAttachedWindow.mChildWindows.add(this);
+ }
+ }
+
mLayoutAttached = mAttrs.type !=
WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
mIsImWindow = attachedWindow.mAttrs.type == TYPE_INPUT_METHOD