Merge "If an application calls System.exit() terminate it immediately."
diff --git a/api/current.txt b/api/current.txt
index c6c29a4..541ce51 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -18855,6 +18855,7 @@
method public static android.content.Intent createInstallIntent();
method public static java.security.cert.X509Certificate[] getCertificateChain(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException;
method public static java.security.PrivateKey getPrivateKey(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException;
+ field public static final java.lang.String ACTION_STORAGE_CHANGED = "android.security.STORAGE_CHANGED";
field public static final java.lang.String EXTRA_CERTIFICATE = "CERT";
field public static final java.lang.String EXTRA_NAME = "name";
field public static final java.lang.String EXTRA_PKCS12 = "PKCS12";
@@ -26379,7 +26380,6 @@
ctor public EdgeEffect(android.content.Context);
method public boolean draw(android.graphics.Canvas);
method public void finish();
- method public android.graphics.Rect getBounds();
method public boolean isFinished();
method public void onAbsorb(int);
method public void onPull(float);
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index 7bb9866..9c81c9e 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -1171,7 +1171,7 @@
syncs = new ArrayList<SyncInfo>();
mCurrentSyncs.put(userId, syncs);
}
- return new ArrayList<SyncInfo>(syncs);
+ return syncs;
}
}
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index aa92efb..83b6986 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -236,6 +236,50 @@
/**
* Creates a new Camera object to access a particular hardware camera.
*
+ * <p>When <code>force</code> is set to false, this will throw an exception
+ * if the same camera is already opened by other clients. If true, the other
+ * client will be disconnected from the camera they opened. If the device
+ * can only support one camera running at a time, all camera-using clients
+ * will be disconnected from their cameras.
+ *
+ * <p>A camera being held by an application can be taken away by other
+ * applications at any time. Before the camera is taken, applications will
+ * get {@link #CAMERA_ERROR_RELEASED} and have some time to clean up. Apps
+ * receiving this callback must immediately stop video recording and then
+ * call {@link #release()} on their camera object. Otherwise, it will be
+ * released by the frameworks in a short time. After receiving
+ * CAMERA_ERROR_RELEASED, apps should not call any method except <code>
+ * release</code> and {@link #isReleased()}. After a camera is taken away,
+ * all methods will throw exceptions except <code>isReleased</code> and
+ * <code>release</code>. Apps can use <code>isReleased</code> to see if the
+ * camera has been taken away. If the camera is taken away, the apps can
+ * silently finish themselves or show a dialog.
+ *
+ * <p>Applications with android.permission.KEEP_CAMERA can request to keep
+ * the camera. That is, the camera will not be taken by other applications
+ * while it is opened. The permission can only be obtained by trusted
+ * platform applications, such as those implementing lock screen security
+ * features.
+ *
+ * @param cameraId the hardware camera to access, between 0 and
+ * {@link #getNumberOfCameras()}-1.
+ * @param force true to take the ownership from the existing client if the
+ * camera has been opened by other clients.
+ * @param keep true if the applications do not want other apps to take the
+ * camera. Only the apps with android.permission.KEEP_CAMERA can keep
+ * the camera.
+ * @return a new Camera object, connected, locked and ready for use.
+ * @hide
+ */
+ public static Camera open(int cameraId, boolean force, boolean keep) {
+ return new Camera(cameraId, force, keep);
+ }
+
+ /**
+ * Creates a new Camera object to access a particular hardware camera. If
+ * the same camera is opened by other applications, this will throw a
+ * RuntimeException.
+ *
* <p>You must call {@link #release()} when you are done using the camera,
* otherwise it will remain locked and be unavailable to other applications.
*
@@ -255,13 +299,13 @@
* @param cameraId the hardware camera to access, between 0 and
* {@link #getNumberOfCameras()}-1.
* @return a new Camera object, connected, locked and ready for use.
- * @throws RuntimeException if connection to the camera service fails (for
- * example, if the camera is in use by another process or device policy
- * manager has disabled the camera).
+ * @throws RuntimeException if opening the camera fails (for example, if the
+ * camera is in use by another process or device policy manager has
+ * disabled the camera).
* @see android.app.admin.DevicePolicyManager#getCameraDisabled(android.content.ComponentName)
*/
public static Camera open(int cameraId) {
- return new Camera(cameraId);
+ return new Camera(cameraId, false, false);
}
/**
@@ -276,13 +320,13 @@
for (int i = 0; i < numberOfCameras; i++) {
getCameraInfo(i, cameraInfo);
if (cameraInfo.facing == CameraInfo.CAMERA_FACING_BACK) {
- return new Camera(i);
+ return new Camera(i, false, false);
}
}
return null;
}
- Camera(int cameraId) {
+ Camera(int cameraId, boolean force, boolean keep) {
mShutterCallback = null;
mRawImageCallback = null;
mJpegCallback = null;
@@ -299,7 +343,7 @@
mEventHandler = null;
}
- native_setup(new WeakReference<Camera>(this), cameraId);
+ native_setup(new WeakReference<Camera>(this), cameraId, force, keep);
}
/**
@@ -312,7 +356,8 @@
release();
}
- private native final void native_setup(Object camera_this, int cameraId);
+ private native final void native_setup(Object camera_this, int cameraId,
+ boolean force, boolean keep);
private native final void native_release();
@@ -327,6 +372,18 @@
}
/**
+ * Whether the camera is released. When any camera method throws an
+ * exception, applications can use this to check whether the camera has been
+ * taken by other clients. If true, it means other clients have taken the
+ * camera. The applications can silently finish themselves or show a dialog.
+ *
+ * @return whether the camera is released.
+ * @see #open(int, boolean, boolean)
+ * @hide
+ */
+ public native final boolean isReleased();
+
+ /**
* Unlocks the camera to allow another process to access it.
* Normally, the camera is locked to the process with an active Camera
* object until {@link #release()} is called. To allow rapid handoff
@@ -1322,6 +1379,17 @@
public static final int CAMERA_ERROR_UNKNOWN = 1;
/**
+ * Camera was released because another client has opened the camera. The
+ * application should call {@link #release()} after getting this. The apps
+ * should not call any method except <code>release</code> and {@link #isReleased()}
+ * after this.
+ *
+ * @see Camera.ErrorCallback
+ * @hide
+ */
+ public static final int CAMERA_ERROR_RELEASED = 2;
+
+ /**
* Media server died. In this case, the application must release the
* Camera object and instantiate a new one.
* @see Camera.ErrorCallback
diff --git a/core/java/android/hardware/GeomagneticField.java b/core/java/android/hardware/GeomagneticField.java
index 96fbe77..0369825 100644
--- a/core/java/android/hardware/GeomagneticField.java
+++ b/core/java/android/hardware/GeomagneticField.java
@@ -19,7 +19,7 @@
import java.util.GregorianCalendar;
/**
- * This class is used to estimated estimate magnetic field at a given point on
+ * Estimates magnetic field at a given point on
* Earth, and in particular, to compute the magnetic declination from true
* north.
*
diff --git a/core/java/android/text/DynamicLayout.java b/core/java/android/text/DynamicLayout.java
index 026af34..5f2d642 100644
--- a/core/java/android/text/DynamicLayout.java
+++ b/core/java/android/text/DynamicLayout.java
@@ -20,6 +20,8 @@
import android.text.style.UpdateLayout;
import android.text.style.WrapTogetherSpan;
+import com.android.internal.util.ArrayUtils;
+
import java.lang.ref.WeakReference;
/**
@@ -30,8 +32,7 @@
* {@link android.graphics.Canvas#drawText(java.lang.CharSequence, int, int, float, float, android.graphics.Paint)
* Canvas.drawText()} directly.</p>
*/
-public class DynamicLayout
-extends Layout
+public class DynamicLayout extends Layout
{
private static final int PRIORITY = 128;
@@ -116,6 +117,10 @@
mObjects = new PackedObjectVector<Directions>(1);
+ mBlockEnds = new int[] { 0 };
+ mBlockIndices = new int[] { INVALID_BLOCK_INDEX };
+ mNumberOfBlocks = 1;
+
mIncludePad = includepad;
/*
@@ -295,9 +300,9 @@
n--;
// remove affected lines from old layout
-
mInts.deleteAt(startline, endline - startline);
mObjects.deleteAt(startline, endline - startline);
+ updateBlocks(startline, endline - 1, n);
// adjust offsets in layout for new height and offsets
@@ -363,6 +368,124 @@
}
}
+ /**
+ * This method is called every time the layout is reflowed after an edition.
+ * It updates the internal block data structure. The text is split in blocks
+ * of contiguous lines, with at least one block for the entire text.
+ * When a range of lines is edited, new blocks (from 0 to 3 depending on the
+ * overlap structure) will replace the set of overlapping blocks.
+ * Blocks are listed in order and are represented by their ending line number.
+ * An index is associated to each block (which will be used by display lists),
+ * this class simply invalidates the index of blocks overlapping a modification.
+ *
+ * @param startLine the first line of the range of modified lines
+ * @param endLine the last line of the range, possibly equal to startLine, lower
+ * than getLineCount()
+ * @param newLineCount the number of lines that will replace the range, possibly 0
+ */
+ private void updateBlocks(int startLine, int endLine, int newLineCount) {
+ int firstBlock = -1;
+ int lastBlock = -1;
+ for (int i = 0; i < mNumberOfBlocks; i++) {
+ if (mBlockEnds[i] >= startLine) {
+ firstBlock = i;
+ break;
+ }
+ }
+ for (int i = firstBlock; i < mNumberOfBlocks; i++) {
+ if (mBlockEnds[i] >= endLine) {
+ lastBlock = i;
+ break;
+ }
+ }
+ final int lastBlockEndLine = mBlockEnds[lastBlock];
+
+ boolean createBlockBefore = startLine > (firstBlock == 0 ? 0 :
+ mBlockEnds[firstBlock - 1] + 1);
+ boolean createBlock = newLineCount > 0;
+ boolean createBlockAfter = endLine < mBlockEnds[lastBlock];
+
+ int numAddedBlocks = 0;
+ if (createBlockBefore) numAddedBlocks++;
+ if (createBlock) numAddedBlocks++;
+ if (createBlockAfter) numAddedBlocks++;
+
+ final int numRemovedBlocks = lastBlock - firstBlock + 1;
+ final int newNumberOfBlocks = mNumberOfBlocks + numAddedBlocks - numRemovedBlocks;
+
+ if (newNumberOfBlocks == 0) {
+ // Even when text is empty, there is actually one line and hence one block
+ mBlockEnds[0] = 0;
+ mBlockIndices[0] = INVALID_BLOCK_INDEX;
+ mNumberOfBlocks = 1;
+ return;
+ }
+
+ if (newNumberOfBlocks > mBlockEnds.length) {
+ final int newSize = ArrayUtils.idealIntArraySize(newNumberOfBlocks);
+ int[] blockEnds = new int[newSize];
+ int[] blockIndices = new int[newSize];
+ System.arraycopy(mBlockEnds, 0, blockEnds, 0, firstBlock);
+ System.arraycopy(mBlockIndices, 0, blockIndices, 0, firstBlock);
+ System.arraycopy(mBlockEnds, lastBlock + 1,
+ blockEnds, firstBlock + numAddedBlocks, mNumberOfBlocks - lastBlock - 1);
+ System.arraycopy(mBlockIndices, lastBlock + 1,
+ blockIndices, firstBlock + numAddedBlocks, mNumberOfBlocks - lastBlock - 1);
+ mBlockEnds = blockEnds;
+ mBlockIndices = blockIndices;
+ } else {
+ System.arraycopy(mBlockEnds, lastBlock + 1,
+ mBlockEnds, firstBlock + numAddedBlocks, mNumberOfBlocks - lastBlock - 1);
+ System.arraycopy(mBlockIndices, lastBlock + 1,
+ mBlockIndices, firstBlock + numAddedBlocks, mNumberOfBlocks - lastBlock - 1);
+ }
+
+ mNumberOfBlocks = newNumberOfBlocks;
+ final int deltaLines = newLineCount - (endLine - startLine + 1);
+ for (int i = firstBlock + numAddedBlocks; i < mNumberOfBlocks; i++) {
+ mBlockEnds[i] += deltaLines;
+ }
+
+ int blockIndex = firstBlock;
+ if (createBlockBefore) {
+ mBlockEnds[blockIndex] = startLine - 1;
+ mBlockIndices[blockIndex] = INVALID_BLOCK_INDEX;
+ blockIndex++;
+ }
+
+ if (createBlock) {
+ mBlockEnds[blockIndex] = startLine + newLineCount - 1;
+ mBlockIndices[blockIndex] = INVALID_BLOCK_INDEX;
+ blockIndex++;
+ }
+
+ if (createBlockAfter) {
+ mBlockEnds[blockIndex] = lastBlockEndLine + deltaLines;
+ mBlockIndices[blockIndex] = INVALID_BLOCK_INDEX;
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public int[] getBlockEnds() {
+ return mBlockEnds;
+ }
+
+ /**
+ * @hide
+ */
+ public int[] getBlockIndices() {
+ return mBlockIndices;
+ }
+
+ /**
+ * @hide
+ */
+ public int getNumberOfBlocks() {
+ return mNumberOfBlocks;
+ }
+
@Override
public int getLineCount() {
return mInts.size() - 1;
@@ -428,6 +551,7 @@
}
public void beforeTextChanged(CharSequence s, int where, int before, int after) {
+ // Intentionally empty
}
public void onTextChanged(CharSequence s, int where, int before, int after) {
@@ -435,6 +559,7 @@
}
public void afterTextChanged(Editable s) {
+ // Intentionally empty
}
public void onSpanAdded(Spannable s, Object o, int start, int end) {
@@ -486,6 +611,20 @@
private PackedIntVector mInts;
private PackedObjectVector<Directions> mObjects;
+ /**
+ * Value used in mBlockIndices when a block has been created or recycled and indicating that its
+ * display list needs to be re-created.
+ * @hide
+ */
+ public static final int INVALID_BLOCK_INDEX = -1;
+ // Stores the line numbers of the last line of each block
+ private int[] mBlockEnds;
+ // The indices of this block's display list in TextView's internal display list array or
+ // INVALID_BLOCK_INDEX if this block has been invalidated during an edition
+ private int[] mBlockIndices;
+ // Number of items actually currently being used in the above 2 arrays
+ private int mNumberOfBlocks;
+
private int mTopPadding, mBottomPadding;
private static StaticLayout sStaticLayout = new StaticLayout(null);
diff --git a/core/java/android/view/DisplayList.java b/core/java/android/view/DisplayList.java
index a50f09f..1dabad2 100644
--- a/core/java/android/view/DisplayList.java
+++ b/core/java/android/view/DisplayList.java
@@ -16,6 +16,8 @@
package android.view;
+import android.os.Handler;
+
/**
* A display lists records a series of graphics related operation and can replay
* them later. Display lists are usually built by recording operations on a
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index bf91700..d08a61f 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -960,6 +960,11 @@
Log.d(ViewDebug.DEBUG_LATENCY_TAG, "- getDisplayList() took " +
total + "ms");
}
+ if (View.USE_DISPLAY_LIST_PROPERTIES) {
+ Log.d("DLProperties", "getDisplayList():\t" +
+ mProfileData[mProfileCurrentFrame]);
+ }
+
}
if (displayList != null) {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 1edcff6..6d1f207 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -1503,7 +1503,7 @@
* apps.
* @hide
*/
- protected static final boolean USE_DISPLAY_LIST_PROPERTIES = false;
+ public static final boolean USE_DISPLAY_LIST_PROPERTIES = false;
/**
* Map used to store views' tags.
@@ -7349,8 +7349,7 @@
* @see #setRotationY(float)
*/
public void setCameraDistance(float distance) {
- invalidateParentCaches();
- invalidate(false);
+ invalidateViewProperty(true, false);
ensureTransformationInfo();
final float dpi = mResources.getDisplayMetrics().densityDpi;
@@ -7363,7 +7362,7 @@
info.mCamera.setLocation(0.0f, 0.0f, -Math.abs(distance) / dpi);
info.mMatrixDirty = true;
- invalidate(false);
+ invalidateViewProperty(false, false);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setCameraDistance(distance);
}
@@ -7401,13 +7400,11 @@
ensureTransformationInfo();
final TransformationInfo info = mTransformationInfo;
if (info.mRotation != rotation) {
- invalidateParentCaches();
// Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mRotation = rotation;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setRotation(rotation);
}
@@ -7451,13 +7448,10 @@
ensureTransformationInfo();
final TransformationInfo info = mTransformationInfo;
if (info.mRotationY != rotationY) {
- invalidateParentCaches();
- // Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mRotationY = rotationY;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setRotationY(rotationY);
}
@@ -7501,13 +7495,10 @@
ensureTransformationInfo();
final TransformationInfo info = mTransformationInfo;
if (info.mRotationX != rotationX) {
- invalidateParentCaches();
- // Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mRotationX = rotationX;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setRotationX(rotationX);
}
@@ -7543,13 +7534,10 @@
ensureTransformationInfo();
final TransformationInfo info = mTransformationInfo;
if (info.mScaleX != scaleX) {
- invalidateParentCaches();
- // Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mScaleX = scaleX;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setScaleX(scaleX);
}
@@ -7585,13 +7573,10 @@
ensureTransformationInfo();
final TransformationInfo info = mTransformationInfo;
if (info.mScaleY != scaleY) {
- invalidateParentCaches();
- // Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mScaleY = scaleY;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setScaleY(scaleY);
}
@@ -7633,13 +7618,10 @@
mPrivateFlags |= PIVOT_EXPLICITLY_SET;
final TransformationInfo info = mTransformationInfo;
if (info.mPivotX != pivotX) {
- invalidateParentCaches();
- // Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mPivotX = pivotX;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setPivotX(pivotX);
}
@@ -7680,13 +7662,10 @@
mPrivateFlags |= PIVOT_EXPLICITLY_SET;
final TransformationInfo info = mTransformationInfo;
if (info.mPivotY != pivotY) {
- invalidateParentCaches();
- // Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mPivotY = pivotY;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setPivotY(pivotY);
}
@@ -7728,14 +7707,14 @@
ensureTransformationInfo();
if (mTransformationInfo.mAlpha != alpha) {
mTransformationInfo.mAlpha = alpha;
- invalidateParentCaches();
if (onSetAlpha((int) (alpha * 255))) {
mPrivateFlags |= ALPHA_SET;
// subclass is handling alpha - don't optimize rendering cache invalidation
+ invalidateParentCaches();
invalidate(true);
} else {
mPrivateFlags &= ~ALPHA_SET;
- invalidate(false);
+ invalidateViewProperty(true, false);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setAlpha(alpha);
}
@@ -8102,13 +8081,11 @@
ensureTransformationInfo();
final TransformationInfo info = mTransformationInfo;
if (info.mTranslationX != translationX) {
- invalidateParentCaches();
// Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mTranslationX = translationX;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setTranslationX(translationX);
}
@@ -8142,13 +8119,10 @@
ensureTransformationInfo();
final TransformationInfo info = mTransformationInfo;
if (info.mTranslationY != translationY) {
- invalidateParentCaches();
- // Double-invalidation is necessary to capture view's old and new areas
- invalidate(false);
+ invalidateViewProperty(true, false);
info.mTranslationY = translationY;
info.mMatrixDirty = true;
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
+ invalidateViewProperty(false, true);
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.setTranslationY(translationY);
}
@@ -8260,39 +8234,43 @@
final boolean matrixIsIdentity = mTransformationInfo == null
|| mTransformationInfo.mMatrixIsIdentity;
if (matrixIsIdentity) {
- final ViewParent p = mParent;
- if (p != null && mAttachInfo != null) {
- final Rect r = mAttachInfo.mTmpInvalRect;
- int minTop;
- int maxBottom;
- int yLoc;
- if (offset < 0) {
- minTop = mTop + offset;
- maxBottom = mBottom;
- yLoc = offset;
- } else {
- minTop = mTop;
- maxBottom = mBottom + offset;
- yLoc = 0;
+ if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
+ invalidateViewProperty(false, false);
+ } else {
+ final ViewParent p = mParent;
+ if (p != null && mAttachInfo != null) {
+ final Rect r = mAttachInfo.mTmpInvalRect;
+ int minTop;
+ int maxBottom;
+ int yLoc;
+ if (offset < 0) {
+ minTop = mTop + offset;
+ maxBottom = mBottom;
+ yLoc = offset;
+ } else {
+ minTop = mTop;
+ maxBottom = mBottom + offset;
+ yLoc = 0;
+ }
+ r.set(0, yLoc, mRight - mLeft, maxBottom - minTop);
+ p.invalidateChild(this, r);
}
- r.set(0, yLoc, mRight - mLeft, maxBottom - minTop);
- p.invalidateChild(this, r);
}
} else {
- invalidate(false);
+ invalidateViewProperty(false, false);
}
mTop += offset;
mBottom += offset;
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.offsetTopBottom(offset);
+ invalidateViewProperty(false, false);
+ } else {
+ if (!matrixIsIdentity) {
+ invalidateViewProperty(false, true);
+ }
+ invalidateParentIfNeeded();
}
-
- if (!matrixIsIdentity) {
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
- }
- invalidateParentIfNeeded();
}
}
@@ -8307,36 +8285,40 @@
final boolean matrixIsIdentity = mTransformationInfo == null
|| mTransformationInfo.mMatrixIsIdentity;
if (matrixIsIdentity) {
- final ViewParent p = mParent;
- if (p != null && mAttachInfo != null) {
- final Rect r = mAttachInfo.mTmpInvalRect;
- int minLeft;
- int maxRight;
- if (offset < 0) {
- minLeft = mLeft + offset;
- maxRight = mRight;
- } else {
- minLeft = mLeft;
- maxRight = mRight + offset;
+ if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
+ invalidateViewProperty(false, false);
+ } else {
+ final ViewParent p = mParent;
+ if (p != null && mAttachInfo != null) {
+ final Rect r = mAttachInfo.mTmpInvalRect;
+ int minLeft;
+ int maxRight;
+ if (offset < 0) {
+ minLeft = mLeft + offset;
+ maxRight = mRight;
+ } else {
+ minLeft = mLeft;
+ maxRight = mRight + offset;
+ }
+ r.set(0, 0, maxRight - minLeft, mBottom - mTop);
+ p.invalidateChild(this, r);
}
- r.set(0, 0, maxRight - minLeft, mBottom - mTop);
- p.invalidateChild(this, r);
}
} else {
- invalidate(false);
+ invalidateViewProperty(false, false);
}
mLeft += offset;
mRight += offset;
if (USE_DISPLAY_LIST_PROPERTIES && mDisplayList != null) {
mDisplayList.offsetLeftRight(offset);
+ invalidateViewProperty(false, false);
+ } else {
+ if (!matrixIsIdentity) {
+ invalidateViewProperty(false, true);
+ }
+ invalidateParentIfNeeded();
}
-
- if (!matrixIsIdentity) {
- mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
- invalidate(false);
- }
- invalidateParentIfNeeded();
}
}
@@ -8741,6 +8723,62 @@
}
/**
+ * Quick invalidation for View property changes (alpha, translationXY, etc.). We don't want to
+ * set any flags or handle all of the cases handled by the default invalidation methods.
+ * Instead, we just want to schedule a traversal in ViewRootImpl with the appropriate
+ * dirty rect. This method calls into fast invalidation methods in ViewGroup that
+ * walk up the hierarchy, transforming the dirty rect as necessary.
+ *
+ * The method also handles normal invalidation logic if display list properties are not
+ * being used in this view. The invalidateParent and forceRedraw flags are used by that
+ * backup approach, to handle these cases used in the various property-setting methods.
+ *
+ * @param invalidateParent Force a call to invalidateParentCaches() if display list properties
+ * are not being used in this view
+ * @param forceRedraw Mark the view as DRAWN to force the invalidation to propagate, if display
+ * list properties are not being used in this view
+ */
+ void invalidateViewProperty(boolean invalidateParent, boolean forceRedraw) {
+ if (!USE_DISPLAY_LIST_PROPERTIES || mDisplayList == null ||
+ (mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION) {
+ if (invalidateParent) {
+ invalidateParentCaches();
+ }
+ if (forceRedraw) {
+ mPrivateFlags |= DRAWN; // force another invalidation with the new orientation
+ }
+ invalidate(false);
+ } else {
+ final AttachInfo ai = mAttachInfo;
+ final ViewParent p = mParent;
+ if (p != null && ai != null) {
+ final Rect r = ai.mTmpInvalRect;
+ r.set(0, 0, mRight - mLeft, mBottom - mTop);
+ if (mParent instanceof ViewGroup) {
+ ((ViewGroup) mParent).invalidateChildFast(this, r);
+ } else {
+ mParent.invalidateChild(this, r);
+ }
+ }
+ }
+ }
+
+ /**
+ * Utility method to transform a given Rect by the current matrix of this view.
+ */
+ void transformRect(final Rect rect) {
+ if (!getMatrix().isIdentity()) {
+ RectF boundingRect = mAttachInfo.mTmpTransformRect;
+ boundingRect.set(rect);
+ getMatrix().mapRect(boundingRect);
+ rect.set((int) (boundingRect.left - 0.5f),
+ (int) (boundingRect.top - 0.5f),
+ (int) (boundingRect.right + 0.5f),
+ (int) (boundingRect.bottom + 0.5f));
+ }
+ }
+
+ /**
* Used to indicate that the parent of this view should clear its caches. This functionality
* is used to force the parent to rebuild its display list (when hardware-accelerated),
* which is necessary when various parent-managed properties of the view change, such as
@@ -9974,12 +10012,16 @@
destroyLayer();
- if (mDisplayList != null) {
- mDisplayList.invalidate();
- }
-
if (mAttachInfo != null) {
+ if (mDisplayList != null) {
+ mAttachInfo.mViewRootImpl.invalidateDisplayList(mDisplayList);
+ }
mAttachInfo.mViewRootImpl.cancelInvalidate(this);
+ } else {
+ if (mDisplayList != null) {
+ // Should never happen
+ mDisplayList.invalidate();
+ }
}
mCurrentAnimation = null;
@@ -11473,7 +11515,7 @@
if (concatMatrix) {
// Undo the scroll translation, apply the transformation matrix,
// then redo the scroll translate to get the correct result.
- if (!hasDisplayList) {
+ if (!useDisplayListProperties) {
canvas.translate(-transX, -transY);
canvas.concat(transformToApply.getMatrix());
canvas.translate(transX, transY);
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 1993ce6..42426b98 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -3896,6 +3896,72 @@
}
/**
+ * Quick invalidation method called by View.invalidateViewProperty. This doesn't set the
+ * DRAWN flags and doesn't handle the Animation logic that the default invalidation methods
+ * do; all we want to do here is schedule a traversal with the appropriate dirty rect.
+ *
+ * @hide
+ */
+ public void invalidateChildFast(View child, final Rect dirty) {
+ ViewParent parent = this;
+
+ final AttachInfo attachInfo = mAttachInfo;
+ if (attachInfo != null) {
+ if (child.mLayerType != LAYER_TYPE_NONE) {
+ child.mLocalDirtyRect.union(dirty);
+ }
+
+ int left = child.mLeft;
+ int top = child.mTop;
+ if (!child.getMatrix().isIdentity()) {
+ child.transformRect(dirty);
+ }
+
+ do {
+ if (parent instanceof ViewGroup) {
+ ViewGroup parentVG = (ViewGroup) parent;
+ parent = parentVG.invalidateChildInParentFast(left, top, dirty);
+ left = parentVG.mLeft;
+ top = parentVG.mTop;
+ } else {
+ // Reached the top; this calls into the usual invalidate method in
+ // ViewRootImpl, which schedules a traversal
+ final int[] location = attachInfo.mInvalidateChildLocation;
+ location[0] = left;
+ location[1] = top;
+ parent = parent.invalidateChildInParent(location, dirty);
+ }
+ } while (parent != null);
+ }
+ }
+
+ /**
+ * Quick invalidation method that simply transforms the dirty rect into the parent's
+ * coordinate system, pruning the invalidation if the parent has already been invalidated.
+ */
+ private ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
+ if ((mPrivateFlags & DRAWN) == DRAWN ||
+ (mPrivateFlags & DRAWING_CACHE_VALID) == DRAWING_CACHE_VALID) {
+ dirty.offset(left - mScrollX, top - mScrollY);
+
+ if ((mGroupFlags & FLAG_CLIP_CHILDREN) == 0 ||
+ dirty.intersect(0, 0, mRight - mLeft, mBottom - mTop)) {
+
+ if (mLayerType != LAYER_TYPE_NONE) {
+ mLocalDirtyRect.union(dirty);
+ }
+ if (!getMatrix().isIdentity()) {
+ transformRect(dirty);
+ }
+
+ return mParent;
+ }
+ }
+
+ return null;
+ }
+
+ /**
* Offset a rectangle that is in a descendant's coordinate
* space into our coordinate space.
* @param descendant A descendant of this view
@@ -3986,6 +4052,7 @@
v.mBottom += offset;
if (USE_DISPLAY_LIST_PROPERTIES && v.mDisplayList != null) {
v.mDisplayList.offsetTopBottom(offset);
+ invalidateViewProperty(false, false);
}
}
}
diff --git a/core/java/android/view/ViewPropertyAnimator.java b/core/java/android/view/ViewPropertyAnimator.java
index fe0e659..623b567 100644
--- a/core/java/android/view/ViewPropertyAnimator.java
+++ b/core/java/android/view/ViewPropertyAnimator.java
@@ -986,17 +986,22 @@
// Shouldn't happen, but just to play it safe
return;
}
+ boolean useDisplayListProperties = View.USE_DISPLAY_LIST_PROPERTIES &&
+ mView.mDisplayList != null;
+
// alpha requires slightly different treatment than the other (transform) properties.
// The logic in setAlpha() is not simply setting mAlpha, plus the invalidation
// logic is dependent on how the view handles an internal call to onSetAlpha().
// We track what kinds of properties are set, and how alpha is handled when it is
// set, and perform the invalidation steps appropriately.
boolean alphaHandled = false;
- mView.invalidateParentCaches();
+ if (!useDisplayListProperties) {
+ mView.invalidateParentCaches();
+ }
float fraction = animation.getAnimatedFraction();
int propertyMask = propertyBundle.mPropertyMask;
if ((propertyMask & TRANSFORM_MASK) != 0) {
- mView.invalidate(false);
+ mView.invalidateViewProperty(false, false);
}
ArrayList<NameValuesHolder> valueList = propertyBundle.mNameValuesHolder;
if (valueList != null) {
@@ -1013,11 +1018,17 @@
}
if ((propertyMask & TRANSFORM_MASK) != 0) {
mView.mTransformationInfo.mMatrixDirty = true;
- mView.mPrivateFlags |= View.DRAWN; // force another invalidation
+ if (!useDisplayListProperties) {
+ mView.mPrivateFlags |= View.DRAWN; // force another invalidation
+ }
}
// invalidate(false) in all cases except if alphaHandled gets set to true
// via the call to setAlphaNoInvalidation(), above
- mView.invalidate(alphaHandled);
+ if (alphaHandled) {
+ mView.invalidate(true);
+ } else {
+ mView.invalidateViewProperty(false, false);
+ }
}
}
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 4472f8c..04ad649 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -117,6 +117,8 @@
private static final boolean DEBUG_CONFIGURATION = false || LOCAL_LOGV;
private static final boolean DEBUG_FPS = false;
+ private static final boolean USE_RENDER_THREAD = false;
+
/**
* Set this system property to true to force the view hierarchy to render
* at 60 Hz. This can be used to measure the potential framerate.
@@ -300,6 +302,8 @@
private long mFpsPrevTime = -1;
private int mFpsNumFrames;
+ private final ArrayList<DisplayList> mDisplayLists = new ArrayList<DisplayList>(24);
+
/**
* see {@link #playSoundEffect(int)}
*/
@@ -402,23 +406,27 @@
* false otherwise
*/
private static boolean isRenderThreadRequested(Context context) {
- synchronized (sRenderThreadQueryLock) {
- if (!sRenderThreadQueried) {
- final PackageManager packageManager = context.getPackageManager();
- final String packageName = context.getApplicationInfo().packageName;
- try {
- ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName,
- PackageManager.GET_META_DATA);
- if (applicationInfo.metaData != null) {
- sUseRenderThread = applicationInfo.metaData.getBoolean(
- "android.graphics.renderThread", false);
+ if (USE_RENDER_THREAD) {
+ synchronized (sRenderThreadQueryLock) {
+ if (!sRenderThreadQueried) {
+ final PackageManager packageManager = context.getPackageManager();
+ final String packageName = context.getApplicationInfo().packageName;
+ try {
+ ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName,
+ PackageManager.GET_META_DATA);
+ if (applicationInfo.metaData != null) {
+ sUseRenderThread = applicationInfo.metaData.getBoolean(
+ "android.graphics.renderThread", false);
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ } finally {
+ sRenderThreadQueried = true;
}
- } catch (PackageManager.NameNotFoundException e) {
- } finally {
- sRenderThreadQueried = true;
}
+ return sUseRenderThread;
}
- return sUseRenderThread;
+ } else {
+ return false;
}
}
@@ -690,7 +698,7 @@
return;
}
- boolean renderThread = isRenderThreadRequested(context);
+ final boolean renderThread = isRenderThreadRequested(context);
if (renderThread) {
Log.i(HardwareRenderer.LOG_TAG, "Render threat initiated");
}
@@ -2210,6 +2218,17 @@
}
}
+ void invalidateDisplayLists() {
+ final ArrayList<DisplayList> displayLists = mDisplayLists;
+ final int count = displayLists.size();
+
+ for (int i = 0; i < count; i++) {
+ displayLists.get(i).invalidate();
+ }
+
+ displayLists.clear();
+ }
+
boolean scrollToRectOrFocus(Rect rectangle, boolean immediate) {
final View.AttachInfo attachInfo = mAttachInfo;
final Rect ci = attachInfo.mContentInsets;
@@ -2516,6 +2535,7 @@
private final static int MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT = 22;
private final static int MSG_PROCESS_INPUT_EVENTS = 23;
private final static int MSG_DISPATCH_SCREEN_STATE = 24;
+ private final static int MSG_INVALIDATE_DISPLAY_LIST = 25;
final class ViewRootHandler extends Handler {
@Override
@@ -2567,6 +2587,10 @@
return "MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT";
case MSG_PROCESS_INPUT_EVENTS:
return "MSG_PROCESS_INPUT_EVENTS";
+ case MSG_DISPATCH_SCREEN_STATE:
+ return "MSG_DISPATCH_SCREEN_STATE";
+ case MSG_INVALIDATE_DISPLAY_LIST:
+ return "MSG_INVALIDATE_DISPLAY_LIST";
}
return super.getMessageName(message);
}
@@ -2777,9 +2801,13 @@
handleScreenStateChange(msg.arg1 == 1);
}
} break;
+ case MSG_INVALIDATE_DISPLAY_LIST: {
+ invalidateDisplayLists();
+ } break;
}
}
}
+
final ViewRootHandler mHandler = new ViewRootHandler();
/**
@@ -4136,6 +4164,14 @@
mInvalidateOnAnimationRunnable.addViewRect(info);
}
+ public void invalidateDisplayList(DisplayList displayList) {
+ mDisplayLists.add(displayList);
+
+ mHandler.removeMessages(MSG_INVALIDATE_DISPLAY_LIST);
+ Message msg = mHandler.obtainMessage(MSG_INVALIDATE_DISPLAY_LIST);
+ mHandler.sendMessage(msg);
+ }
+
public void cancelInvalidate(View view) {
mHandler.removeMessages(MSG_INVALIDATE, view);
// fixme: might leak the AttachInfo.InvalidateInfo objects instead of returning
diff --git a/core/java/android/webkit/AutoCompletePopup.java b/core/java/android/webkit/AutoCompletePopup.java
index 674428a..b26156c 100644
--- a/core/java/android/webkit/AutoCompletePopup.java
+++ b/core/java/android/webkit/AutoCompletePopup.java
@@ -16,7 +16,6 @@
package android.webkit;
import android.content.Context;
-import android.graphics.Rect;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
@@ -41,13 +40,10 @@
private boolean mIsAutoFillProfileSet;
private Handler mHandler;
private int mQueryId;
- private Rect mNodeBounds = new Rect();
- private int mNodeLayerId;
private ListPopupWindow mPopup;
private Filter mFilter;
private CharSequence mText;
private ListAdapter mAdapter;
- private boolean mIsFocused;
private View mAnchor;
private WebViewClassic.WebViewInputConnection mInputConnection;
private WebViewClassic mWebView;
@@ -102,13 +98,6 @@
return false;
}
- public void setFocused(boolean isFocused) {
- mIsFocused = isFocused;
- if (!mIsFocused) {
- mPopup.dismiss();
- }
- }
-
public void setText(CharSequence text) {
mText = text;
if (mFilter != null) {
@@ -139,20 +128,14 @@
resetRect();
}
- public void setNodeBounds(Rect nodeBounds, int layerId) {
- mNodeBounds.set(nodeBounds);
- mNodeLayerId = layerId;
- resetRect();
- }
-
public void resetRect() {
- int left = mWebView.contentToViewX(mNodeBounds.left);
- int right = mWebView.contentToViewX(mNodeBounds.right);
+ int left = mWebView.contentToViewX(mWebView.mEditTextBounds.left);
+ int right = mWebView.contentToViewX(mWebView.mEditTextBounds.right);
int width = right - left;
mPopup.setWidth(width);
- int bottom = mWebView.contentToViewY(mNodeBounds.bottom);
- int top = mWebView.contentToViewY(mNodeBounds.top);
+ int bottom = mWebView.contentToViewY(mWebView.mEditTextBounds.bottom);
+ int top = mWebView.contentToViewY(mWebView.mEditTextBounds.top);
int height = bottom - top;
AbsoluteLayout.LayoutParams lp =
@@ -178,13 +161,6 @@
}
}
- public void scrollDelta(int layerId, int dx, int dy) {
- if (layerId == mNodeLayerId) {
- mNodeBounds.offset(dx, dy);
- resetRect();
- }
- }
-
// AdapterView.OnItemClickListener implementation
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
@@ -230,11 +206,6 @@
@Override
public void onFilterComplete(int count) {
- if (!mIsFocused) {
- mPopup.dismiss();
- return;
- }
-
boolean showDropDown = (count > 0) &&
(mInputConnection.getIsAutoFillable() || mText.length() > 0);
if (showDropDown) {
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index 09ce1e2..ed43043 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -71,6 +71,8 @@
import android.util.EventLog;
import android.util.Log;
import android.view.Display;
+import android.view.GestureDetector;
+import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.Gravity;
import android.view.HapticFeedbackConstants;
import android.view.HardwareCanvas;
@@ -114,6 +116,7 @@
import android.widget.ListView;
import android.widget.OverScroller;
import android.widget.PopupWindow;
+import android.widget.Scroller;
import android.widget.TextView;
import android.widget.Toast;
@@ -802,6 +805,51 @@
}
}
+ private class TextScrollListener extends SimpleOnGestureListener {
+ @Override
+ public boolean onFling(MotionEvent e1, MotionEvent e2,
+ float velocityX, float velocityY) {
+ int maxScrollX = mEditTextContent.width() -
+ mEditTextBounds.width();
+ int maxScrollY = mEditTextContent.height() -
+ mEditTextBounds.height();
+
+ int contentVelocityX = viewToContentDimension((int)-velocityX);
+ int contentVelocityY = viewToContentDimension((int)-velocityY);
+ mEditTextScroller.fling(-mEditTextContent.left,
+ -mEditTextContent.top,
+ contentVelocityX, contentVelocityY,
+ 0, maxScrollX, 0, maxScrollY);
+ return true;
+ }
+
+ @Override
+ public boolean onScroll(MotionEvent e1, MotionEvent e2,
+ float distanceX, float distanceY) {
+ // Scrollable edit text. Scroll it.
+ int newScrollX = deltaToTextScroll(
+ -mEditTextContent.left, mEditTextContent.width(),
+ mEditTextBounds.width(),
+ (int) distanceX);
+ int newScrollY = deltaToTextScroll(
+ -mEditTextContent.top, mEditTextContent.height(),
+ mEditTextBounds.height(),
+ (int) distanceY);
+ scrollEditText(newScrollX, newScrollY);
+ return true;
+ }
+
+ private int deltaToTextScroll(int oldScroll, int contentSize,
+ int boundsSize, int delta) {
+ int newScroll = oldScroll +
+ viewToContentDimension(delta);
+ int maxScroll = contentSize - boundsSize;
+ newScroll = Math.min(maxScroll, newScroll);
+ newScroll = Math.max(0, newScroll);
+ return newScroll;
+ }
+ }
+
// The listener to capture global layout change event.
private InnerGlobalLayoutListener mGlobalLayoutListener = null;
@@ -829,7 +877,12 @@
WebViewInputConnection mInputConnection = null;
private int mFieldPointer;
private PastePopupWindow mPasteWindow;
- AutoCompletePopup mAutoCompletePopup;
+ private AutoCompletePopup mAutoCompletePopup;
+ private GestureDetector mGestureDetector;
+ Rect mEditTextBounds = new Rect();
+ Rect mEditTextContent = new Rect();
+ int mEditTextLayerId;
+ boolean mIsEditingText = false;
private static class OnTrimMemoryListener implements ComponentCallbacks2 {
private static OnTrimMemoryListener sInstance = null;
@@ -985,6 +1038,7 @@
// true when the touch movement exceeds the slop
private boolean mConfirmMove;
+ private boolean mTouchInEditText;
// if true, touch events will be first processed by WebCore, if prevent
// default is not set, the UI will continue handle them.
@@ -1033,6 +1087,9 @@
// pages with the space bar, in pixels.
private static final int PAGE_SCROLL_OVERLAP = 24;
+ // Time between successive calls to text scroll fling animation
+ private static final int TEXT_SCROLL_ANIMATION_DELAY_MS = 16;
+
/**
* These prevent calling requestLayout if either dimension is fixed. This
* depends on the layout parameters and the measure specs.
@@ -1066,6 +1123,7 @@
// Used by OverScrollGlow
OverScroller mScroller;
+ Scroller mEditTextScroller;
private boolean mInOverScrollMode = false;
private static Paint mOverScrollBackground;
@@ -1195,6 +1253,8 @@
static final int RELOCATE_AUTO_COMPLETE_POPUP = 146;
static final int FOCUS_NODE_CHANGED = 147;
static final int AUTOFILL_FORM = 148;
+ static final int ANIMATE_TEXT_SCROLL = 149;
+ static final int EDIT_TEXT_SIZE_CHANGED = 150;
private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID;
private static final int LAST_PACKAGE_MSG_ID = HIT_TEST_RESULT;
@@ -1429,6 +1489,8 @@
}
mAutoFillData = new WebViewCore.AutoFillData();
+ mGestureDetector = new GestureDetector(mContext, new TextScrollListener());
+ mEditTextScroller = new Scroller(context);
}
// === START: WebView Proxy binding ===
@@ -3915,8 +3977,10 @@
mSelectCursorExtent.offset(dx, dy);
}
}
- if (mAutoCompletePopup != null) {
- mAutoCompletePopup.scrollDelta(mCurrentScrollingLayerId, dx, dy);
+ if (mAutoCompletePopup != null &&
+ mCurrentScrollingLayerId == mEditTextLayerId) {
+ mEditTextBounds.offset(dx, dy);
+ mAutoCompletePopup.resetRect();
}
nativeScrollLayer(mCurrentScrollingLayerId, x, y);
mScrollingLayerRect.left = x;
@@ -5943,6 +6007,9 @@
mPreventDefault = PREVENT_DEFAULT_NO;
mConfirmMove = false;
mInitialHitTestResult = null;
+ if (!mEditTextScroller.isFinished()) {
+ mEditTextScroller.abortAnimation();
+ }
if (!mScroller.isFinished()) {
// stop the current scroll animation, but if this is
// the start of a fling, allow it to add to the current
@@ -6080,6 +6147,10 @@
}
}
startTouch(x, y, eventTime);
+ if (mIsEditingText) {
+ mTouchInEditText = mEditTextBounds.contains(contentX, contentY);
+ mGestureDetector.onTouchEvent(ev);
+ }
break;
}
case MotionEvent.ACTION_MOVE: {
@@ -6113,6 +6184,13 @@
invalidate();
}
break;
+ } else if (mConfirmMove && mTouchInEditText) {
+ ViewParent parent = mWebView.getParent();
+ if (parent != null) {
+ parent.requestDisallowInterceptTouchEvent(true);
+ }
+ mGestureDetector.onTouchEvent(ev);
+ break;
}
// pass the touch events from UI thread to WebCore thread
@@ -6282,6 +6360,10 @@
break;
}
case MotionEvent.ACTION_UP: {
+ mGestureDetector.onTouchEvent(ev);
+ if (mTouchInEditText && mConfirmMove) {
+ break; // We've been scrolling the edit text.
+ }
// pass the touch events from UI thread to WebCore thread
if (shouldForwardTouchEvent()) {
TouchEventData ted = new TouchEventData();
@@ -8328,8 +8410,9 @@
break;
case FOCUS_NODE_CHANGED:
- if (mAutoCompletePopup != null) {
- mAutoCompletePopup.setFocused(msg.arg1 == mFieldPointer);
+ mIsEditingText = (msg.arg1 == mFieldPointer);
+ if (mAutoCompletePopup != null && !mIsEditingText) {
+ mAutoCompletePopup.clearAdapter();
}
// fall through to HIT_TEST_RESULT
case HIT_TEST_RESULT:
@@ -8375,11 +8458,12 @@
mFieldPointer = initData.mFieldPointer;
mInputConnection.initEditorInfo(initData);
mInputConnection.setTextAndKeepSelection(initData.mText);
- nativeMapLayerRect(mNativeClass, initData.mNodeLayerId,
- initData.mNodeBounds);
- mAutoCompletePopup.setNodeBounds(initData.mNodeBounds,
- initData.mNodeLayerId);
- mAutoCompletePopup.setText(mInputConnection.getEditable());
+ mEditTextBounds.set(initData.mNodeBounds);
+ mEditTextLayerId = initData.mNodeLayerId;
+ nativeMapLayerRect(mNativeClass, mEditTextLayerId,
+ mEditTextBounds);
+ mEditTextContent.set(initData.mContentRect);
+ relocateAutoCompletePopup();
}
break;
@@ -8417,6 +8501,16 @@
msg.arg1, /* unused */0);
break;
+ case ANIMATE_TEXT_SCROLL:
+ computeEditTextScroll();
+ break;
+
+ case EDIT_TEXT_SIZE_CHANGED:
+ if (msg.arg1 == mFieldPointer) {
+ mEditTextContent.set((Rect)msg.obj);
+ }
+ break;
+
default:
super.handleMessage(msg);
break;
@@ -8730,6 +8824,25 @@
invalidate();
}
+ private void computeEditTextScroll() {
+ if (mEditTextScroller.computeScrollOffset()) {
+ scrollEditText(mEditTextScroller.getCurrX(),
+ mEditTextScroller.getCurrY());
+ }
+ }
+
+ private void scrollEditText(int scrollX, int scrollY) {
+ // Scrollable edit text. Scroll it.
+ float maxScrollX = (float)(mEditTextContent.width() -
+ mEditTextBounds.width());
+ float scrollPercentX = ((float)scrollX)/maxScrollX;
+ mEditTextContent.offsetTo(-scrollX, -scrollY);
+ mWebViewCore.sendMessageAtFrontOfQueue(EventHub.SCROLL_TEXT_INPUT, 0,
+ scrollY, (Float)scrollPercentX);
+ mPrivateHandler.sendEmptyMessageDelayed(ANIMATE_TEXT_SCROLL,
+ TEXT_SCROLL_ANIMATION_DELAY_MS);
+ }
+
// Class used to use a dropdown for a <select> element
private class InvokeListBox implements Runnable {
// Whether the listbox allows multiple selection.
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 77d2641..d784b08 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -951,36 +951,19 @@
}
static class TextFieldInitData {
- public TextFieldInitData(int fieldPointer,
- String text, int type, boolean isSpellCheckEnabled,
- boolean autoComplete, boolean isTextFieldNext,
- boolean isTextFieldPrev, String name, String label,
- int maxLength, Rect nodeBounds, int nodeLayerId) {
- mFieldPointer = fieldPointer;
- mText = text;
- mType = type;
- mIsAutoCompleteEnabled = autoComplete;
- mIsSpellCheckEnabled = isSpellCheckEnabled;
- mIsTextFieldNext = isTextFieldNext;
- mIsTextFieldPrev = isTextFieldPrev;
- mName = name;
- mLabel = label;
- mMaxLength = maxLength;
- mNodeBounds = nodeBounds;
- mNodeLayerId = nodeLayerId;
- }
- int mFieldPointer;
- String mText;
- int mType;
- boolean mIsSpellCheckEnabled;
- boolean mIsTextFieldNext;
- boolean mIsTextFieldPrev;
- boolean mIsAutoCompleteEnabled;
- String mName;
- String mLabel;
- int mMaxLength;
- Rect mNodeBounds;
- int mNodeLayerId;
+ public int mFieldPointer;
+ public String mText;
+ public int mType;
+ public boolean mIsSpellCheckEnabled;
+ public boolean mIsTextFieldNext;
+ public boolean mIsTextFieldPrev;
+ public boolean mIsAutoCompleteEnabled;
+ public String mName;
+ public String mLabel;
+ public int mMaxLength;
+ public Rect mNodeBounds;
+ public int mNodeLayerId;
+ public Rect mContentRect;
}
// mAction of TouchEventData can be MotionEvent.getAction() which uses the
@@ -1931,6 +1914,11 @@
mEventHub.sendMessage(Message.obtain(null, what));
}
+ void sendMessageAtFrontOfQueue(int what, int arg1, int arg2, Object obj) {
+ mEventHub.sendMessageAtFrontOfQueue(Message.obtain(
+ null, what, arg1, arg2, obj));
+ }
+
void sendMessage(int what, Object obj) {
mEventHub.sendMessage(Message.obtain(null, what, obj));
}
@@ -2791,6 +2779,18 @@
}
// called by JNI
+ private void updateTextSizeAndScroll(int pointer, int width, int height,
+ int scrollX, int scrollY) {
+ if (mWebView != null) {
+ Rect rect = new Rect(-scrollX, -scrollY, width - scrollX,
+ height - scrollY);
+ Message.obtain(mWebView.mPrivateHandler,
+ WebViewClassic.EDIT_TEXT_SIZE_CHANGED, pointer, 0, rect)
+ .sendToTarget();
+ }
+ }
+
+ // called by JNI
private void clearTextEntry() {
if (mWebView == null) return;
Message.obtain(mWebView.mPrivateHandler,
@@ -2798,23 +2798,17 @@
}
// called by JNI
- private void initEditField(int pointer, String text, int inputType,
- boolean isSpellCheckEnabled, boolean isAutoCompleteEnabled,
- boolean nextFieldIsText, boolean prevFieldIsText, String name,
- String label, int start, int end, int selectionPtr, int maxLength,
- Rect nodeRect, int nodeLayer) {
+ private void initEditField(int start, int end, int selectionPtr,
+ TextFieldInitData initData) {
if (mWebView == null) {
return;
}
- TextFieldInitData initData = new TextFieldInitData(pointer,
- text, inputType, isSpellCheckEnabled, isAutoCompleteEnabled,
- nextFieldIsText, prevFieldIsText, name, label, maxLength,
- nodeRect, nodeLayer);
Message.obtain(mWebView.mPrivateHandler,
WebViewClassic.INIT_EDIT_FIELD, initData).sendToTarget();
Message.obtain(mWebView.mPrivateHandler,
- WebViewClassic.REQUEST_KEYBOARD_WITH_SELECTION_MSG_ID, pointer,
- 0, new TextSelectionData(start, end, selectionPtr))
+ WebViewClassic.REQUEST_KEYBOARD_WITH_SELECTION_MSG_ID,
+ initData.mFieldPointer, 0,
+ new TextSelectionData(start, end, selectionPtr))
.sendToTarget();
}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 9e07151..057aabe 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2944,27 +2944,17 @@
mDirection = 0; // Reset when entering overscroll.
mTouchMode = TOUCH_MODE_OVERSCROLL;
if (rawDeltaY > 0) {
- if (!mEdgeGlowTop.isIdle()) {
- invalidate(mEdgeGlowTop.getBounds());
- } else {
- invalidate();
- }
-
mEdgeGlowTop.onPull((float) overscroll / getHeight());
if (!mEdgeGlowBottom.isFinished()) {
mEdgeGlowBottom.onRelease();
}
+ invalidate(mEdgeGlowTop.getBounds(false));
} else if (rawDeltaY < 0) {
- if (!mEdgeGlowBottom.isIdle()) {
- invalidate(mEdgeGlowBottom.getBounds());
- } else {
- invalidate();
- }
-
mEdgeGlowBottom.onPull((float) overscroll / getHeight());
if (!mEdgeGlowTop.isFinished()) {
mEdgeGlowTop.onRelease();
}
+ invalidate(mEdgeGlowBottom.getBounds(true));
}
}
}
@@ -3002,13 +2992,13 @@
if (!mEdgeGlowBottom.isFinished()) {
mEdgeGlowBottom.onRelease();
}
- invalidate(mEdgeGlowTop.getBounds());
+ invalidate(mEdgeGlowTop.getBounds(false));
} else if (rawDeltaY < 0) {
mEdgeGlowBottom.onPull((float) overScrollDistance / getHeight());
if (!mEdgeGlowTop.isFinished()) {
mEdgeGlowTop.onRelease();
}
- invalidate(mEdgeGlowBottom.getBounds());
+ invalidate(mEdgeGlowBottom.getBounds(true));
}
}
}
@@ -3485,7 +3475,7 @@
mEdgeGlowTop.setSize(width, getHeight());
if (mEdgeGlowTop.draw(canvas)) {
mEdgeGlowTop.setPosition(leftPadding, edgeY);
- invalidate(mEdgeGlowTop.getBounds());
+ invalidate(mEdgeGlowTop.getBounds(false));
}
canvas.restoreToCount(restoreCount);
}
@@ -3503,8 +3493,8 @@
mEdgeGlowBottom.setSize(width, height);
if (mEdgeGlowBottom.draw(canvas)) {
// Account for the rotation
- mEdgeGlowBottom.setPosition(edgeX + width, edgeY - mEdgeGlowBottom.getHeight());
- invalidate(mEdgeGlowBottom.getBounds());
+ mEdgeGlowBottom.setPosition(edgeX + width, edgeY);
+ invalidate(mEdgeGlowBottom.getBounds(true));
}
canvas.restoreToCount(restoreCount);
}
diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java
index c1f31bb..bb4a4cf 100644
--- a/core/java/android/widget/EdgeEffect.java
+++ b/core/java/android/widget/EdgeEffect.java
@@ -123,6 +123,11 @@
private final Rect mBounds = new Rect();
+ private final int mEdgeHeight;
+ private final int mGlowHeight;
+ private final int mGlowWidth;
+ private final int mMaxEffectHeight;
+
/**
* Construct a new EdgeEffect with a theme appropriate for the provided context.
* @param context Context used to provide theming and resource information for the EdgeEffect
@@ -132,6 +137,14 @@
mEdge = res.getDrawable(R.drawable.overscroll_edge);
mGlow = res.getDrawable(R.drawable.overscroll_glow);
+ mEdgeHeight = mEdge.getIntrinsicHeight();
+ mGlowHeight = mGlow.getIntrinsicHeight();
+ mGlowWidth = mGlow.getIntrinsicWidth();
+
+ mMaxEffectHeight = (int) (Math.min(
+ mGlowHeight * MAX_GLOW_HEIGHT * mGlowHeight / mGlowWidth * 0.6f,
+ mGlowHeight * MAX_GLOW_HEIGHT) + 0.5f);
+
mMinWidth = (int) (res.getDisplayMetrics().density * MIN_WIDTH + 0.5f);
mInterpolator = new DecelerateInterpolator();
}
@@ -149,7 +162,7 @@
/**
* Set the position of this edge effect in pixels. This position is
- * only used by {@link #getBounds()}.
+ * only used by {@link #getBounds(boolean)}.
*
* @param x The position of the edge effect on the X axis
* @param y The position of the edge effect on the Y axis
@@ -159,17 +172,6 @@
mY = y;
}
- boolean isIdle() {
- return mState == STATE_IDLE;
- }
-
- /**
- * Returns the height of the effect itself.
- */
- int getHeight() {
- return Math.max(mGlow.getBounds().height(), mEdge.getBounds().height());
- }
-
/**
* Reports if this EdgeEffect's animation is finished. If this method returns false
* after a call to {@link #draw(Canvas)} the host widget should schedule another
@@ -326,15 +328,11 @@
public boolean draw(Canvas canvas) {
update();
- final int edgeHeight = mEdge.getIntrinsicHeight();
- final int glowHeight = mGlow.getIntrinsicHeight();
- final int glowWidth = mGlow.getIntrinsicWidth();
-
mGlow.setAlpha((int) (Math.max(0, Math.min(mGlowAlpha, 1)) * 255));
int glowBottom = (int) Math.min(
- glowHeight * mGlowScaleY * glowHeight/ glowWidth * 0.6f,
- glowHeight * MAX_GLOW_HEIGHT);
+ mGlowHeight * mGlowScaleY * mGlowHeight / mGlowWidth * 0.6f,
+ mGlowHeight * MAX_GLOW_HEIGHT);
if (mWidth < mMinWidth) {
// Center the glow and clip it.
int glowLeft = (mWidth - mMinWidth)/2;
@@ -348,7 +346,7 @@
mEdge.setAlpha((int) (Math.max(0, Math.min(mEdgeAlpha, 1)) * 255));
- int edgeBottom = (int) (edgeHeight * mEdgeScaleY);
+ int edgeBottom = (int) (mEdgeHeight * mEdgeScaleY);
if (mWidth < mMinWidth) {
// Center the edge and clip it.
int edgeLeft = (mWidth - mMinWidth)/2;
@@ -368,11 +366,13 @@
/**
* Returns the bounds of the edge effect.
+ *
+ * @hide
*/
- public Rect getBounds() {
- mBounds.set(mGlow.getBounds());
- mBounds.union(mEdge.getBounds());
- mBounds.offset(mX, mY);
+ public Rect getBounds(boolean reverse) {
+ mBounds.set(0, 0, mWidth, mMaxEffectHeight);
+ mBounds.offset(mX, mY - (reverse ? mMaxEffectHeight : 0));
+
return mBounds;
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index e535170..9941c95 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -139,6 +139,7 @@
import android.widget.AdapterView.OnItemClickListener;
import android.widget.RemoteViews.RemoteView;
+import com.android.internal.util.ArrayUtils;
import com.android.internal.util.FastMath;
import com.android.internal.widget.EditableInputConnection;
@@ -1214,6 +1215,7 @@
if (imm != null) imm.restartInput(this);
}
+ // Will change text color
if (mEditor != null) getEditor().invalidateTextDisplayList();
prepareCursorControllers();
@@ -2328,7 +2330,6 @@
public void setHighlightColor(int color) {
if (mHighlightColor != color) {
mHighlightColor = color;
- if (mEditor != null) getEditor().invalidateTextDisplayList();
invalidate();
}
}
@@ -2349,6 +2350,7 @@
mShadowDx = dx;
mShadowDy = dy;
+ // Will change text clip region
if (mEditor != null) getEditor().invalidateTextDisplayList();
invalidate();
}
@@ -2841,6 +2843,7 @@
}
}
if (inval) {
+ // Text needs to be redrawn with the new color
if (mEditor != null) getEditor().invalidateTextDisplayList();
invalidate();
}
@@ -3332,7 +3335,7 @@
invalidate();
}
- // Invalidate display list if hint will be used
+ // Invalidate display list if hint is currently used
if (mEditor != null && mText.length() == 0 && mHint != null) {
getEditor().invalidateTextDisplayList();
}
@@ -8274,6 +8277,7 @@
if (getEditor().mPositionListener != null) {
getEditor().mPositionListener.onScrollChanged();
}
+ // Internal scroll affects the clip boundaries
getEditor().invalidateTextDisplayList();
}
}
@@ -11299,7 +11303,7 @@
InputContentType mInputContentType;
InputMethodState mInputMethodState;
- DisplayList mTextDisplayList;
+ DisplayList[] mTextDisplayLists;
boolean mFrozenWithFocus;
boolean mSelectionMoved;
@@ -11545,7 +11549,6 @@
void sendOnTextChanged(int start, int after) {
updateSpellCheckSpans(start, start + after, false);
- invalidateTextDisplayList();
// Hide the controllers as soon as text is modified (typing, procedural...)
// We do not hide the span controllers, since they can be added when a new text is
@@ -11702,36 +11705,91 @@
layout.drawBackground(canvas, highlight, mHighlightPaint, cursorOffsetVertical,
firstLine, lastLine);
- if (mTextDisplayList == null || !mTextDisplayList.isValid()) {
- boolean displayListCreated = false;
- if (mTextDisplayList == null) {
- mTextDisplayList = getHardwareRenderer().createDisplayList("Text");
- displayListCreated = true;
+ if (mTextDisplayLists == null) {
+ mTextDisplayLists = new DisplayList[ArrayUtils.idealObjectArraySize(0)];
+ }
+ if (! (layout instanceof DynamicLayout)) {
+ Log.e(LOG_TAG, "Editable TextView is not using a DynamicLayout");
+ return;
+ }
+
+ DynamicLayout dynamicLayout = (DynamicLayout) layout;
+ int[] blockEnds = dynamicLayout.getBlockEnds();
+ int[] blockIndices = dynamicLayout.getBlockIndices();
+ final int numberOfBlocks = dynamicLayout.getNumberOfBlocks();
+
+ canvas.translate(mScrollX, mScrollY);
+ int endOfPreviousBlock = -1;
+ int searchStartIndex = 0;
+ for (int i = 0; i < numberOfBlocks; i++) {
+ int blockEnd = blockEnds[i];
+ int blockIndex = blockIndices[i];
+
+ final boolean blockIsInvalid = blockIndex == DynamicLayout.INVALID_BLOCK_INDEX;
+ if (blockIsInvalid) {
+ blockIndex = getAvailableDisplayListIndex(blockIndices, numberOfBlocks,
+ searchStartIndex);
+ // Dynamic layout internal block indices structure is updated from Editor
+ blockIndices[i] = blockIndex;
+ searchStartIndex = blockIndex + 1;
}
- final HardwareCanvas hardwareCanvas = mTextDisplayList.start();
- try {
- hardwareCanvas.setViewport(width, height);
- // The dirty rect should always be null for a display list
- hardwareCanvas.onPreDraw(null);
- hardwareCanvas.translate(-mScrollX, -mScrollY);
- layout.drawText(hardwareCanvas, firstLine, lastLine);
- //layout.draw(hardwareCanvas, highlight, mHighlightPaint, cursorOffsetVertical);
- hardwareCanvas.translate(mScrollX, mScrollY);
- } finally {
- hardwareCanvas.onPostDraw();
- mTextDisplayList.end();
- if (displayListCreated && USE_DISPLAY_LIST_PROPERTIES) {
- mTextDisplayList.setLeftTopRightBottom(mLeft, mTop, mRight, mBottom);
+ DisplayList blockDisplayList = mTextDisplayLists[blockIndex];
+ if (blockDisplayList == null) {
+ blockDisplayList = mTextDisplayLists[blockIndex] =
+ getHardwareRenderer().createDisplayList("Text " + blockIndex);
+ } else {
+ if (blockIsInvalid) blockDisplayList.invalidate();
+ }
+
+ if (!blockDisplayList.isValid()) {
+ final HardwareCanvas hardwareCanvas = blockDisplayList.start();
+ try {
+ hardwareCanvas.setViewport(width, height);
+ // The dirty rect should always be null for a display list
+ hardwareCanvas.onPreDraw(null);
+ hardwareCanvas.translate(-mScrollX, -mScrollY);
+ layout.drawText(hardwareCanvas, endOfPreviousBlock + 1, blockEnd);
+ hardwareCanvas.translate(mScrollX, mScrollY);
+ } finally {
+ hardwareCanvas.onPostDraw();
+ blockDisplayList.end();
+ if (USE_DISPLAY_LIST_PROPERTIES) {
+ blockDisplayList.setLeftTopRightBottom(mLeft, mTop, mRight, mBottom);
+ }
}
}
+
+ ((HardwareCanvas) canvas).drawDisplayList(blockDisplayList, width, height, null,
+ DisplayList.FLAG_CLIP_CHILDREN);
+ endOfPreviousBlock = blockEnd;
}
- canvas.translate(mScrollX, mScrollY);
- ((HardwareCanvas) canvas).drawDisplayList(mTextDisplayList, width, height, null,
- DisplayList.FLAG_CLIP_CHILDREN);
canvas.translate(-mScrollX, -mScrollY);
}
+ private int getAvailableDisplayListIndex(int[] blockIndices, int numberOfBlocks,
+ int searchStartIndex) {
+ int length = mTextDisplayLists.length;
+ for (int i = searchStartIndex; i < length; i++) {
+ boolean blockIndexFound = false;
+ for (int j = 0; j < numberOfBlocks; j++) {
+ if (blockIndices[j] == i) {
+ blockIndexFound = true;
+ break;
+ }
+ }
+ if (blockIndexFound) continue;
+ return i;
+ }
+
+ // No available index found, the pool has to grow
+ int newSize = ArrayUtils.idealIntArraySize(length + 1);
+ DisplayList[] displayLists = new DisplayList[newSize];
+ System.arraycopy(mTextDisplayLists, 0, displayLists, 0, length);
+ mTextDisplayLists = displayLists;
+ return length;
+ }
+
private void drawCursor(Canvas canvas, int cursorOffsetVertical) {
final boolean translate = cursorOffsetVertical != 0;
if (translate) canvas.translate(0, cursorOffsetVertical);
@@ -11742,7 +11800,11 @@
}
private void invalidateTextDisplayList() {
- if (mTextDisplayList != null) mTextDisplayList.invalidate();
+ if (mTextDisplayLists != null) {
+ for (int i = 0; i < mTextDisplayLists.length; i++) {
+ if (mTextDisplayLists[i] != null) mTextDisplayLists[i].invalidate();
+ }
+ }
}
private void updateCursorsPositions() {
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 4b64bf3..c9eb640 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -79,18 +79,15 @@
}
static bool optionsPurgeable(JNIEnv* env, jobject options) {
- return options != NULL &&
- env->GetBooleanField(options, gOptions_purgeableFieldID);
+ return options != NULL && env->GetBooleanField(options, gOptions_purgeableFieldID);
}
static bool optionsShareable(JNIEnv* env, jobject options) {
- return options != NULL &&
- env->GetBooleanField(options, gOptions_shareableFieldID);
+ return options != NULL && env->GetBooleanField(options, gOptions_shareableFieldID);
}
static bool optionsJustBounds(JNIEnv* env, jobject options) {
- return options != NULL &&
- env->GetBooleanField(options, gOptions_justBoundsFieldID);
+ return options != NULL && env->GetBooleanField(options, gOptions_justBoundsFieldID);
}
static SkPixelRef* installPixelRef(SkBitmap* bitmap, SkStream* stream,
@@ -119,8 +116,7 @@
SkBitmap::Config prefConfig = SkBitmap::kARGB_8888_Config;
bool doDither = true;
bool isMutable = false;
- bool isPurgeable = forcePurgeable ||
- (allowPurgeable && optionsPurgeable(env, options));
+ bool isPurgeable = forcePurgeable || (allowPurgeable && optionsPurgeable(env, options));
bool preferQualityOverSpeed = false;
jobject javaBitmap = NULL;
@@ -437,23 +433,6 @@
return chunkObject;
}
-static void nativeSetDefaultConfig(JNIEnv* env, jobject, int nativeConfig) {
- SkBitmap::Config config = static_cast<SkBitmap::Config>(nativeConfig);
-
- // these are the only default configs that make sense for codecs right now
- static const SkBitmap::Config gValidDefConfig[] = {
- SkBitmap::kRGB_565_Config,
- SkBitmap::kARGB_8888_Config,
- };
-
- for (size_t i = 0; i < SK_ARRAY_COUNT(gValidDefConfig); i++) {
- if (config == gValidDefConfig[i]) {
- SkImageDecoder::SetDeviceConfig(config);
- break;
- }
- }
-}
-
static jboolean nativeIsSeekable(JNIEnv* env, jobject, jobject fileDescriptor) {
jint descriptor = jniGetFDFromFileDescriptor(env, fileDescriptor);
return ::lseek64(descriptor, 0, SEEK_CUR) != -1 ? JNI_TRUE : JNI_FALSE;
@@ -487,8 +466,6 @@
(void*)nativeScaleNinePatch
},
- { "nativeSetDefaultConfig", "(I)V", (void*)nativeSetDefaultConfig },
-
{ "nativeIsSeekable",
"(Ljava/io/FileDescriptor;)Z",
(void*)nativeIsSeekable
diff --git a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp
index 3b8fb79..294c626 100644
--- a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp
+++ b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp
@@ -196,7 +196,7 @@
struct sockaddr_rc raddr;
int alen = sizeof(raddr);
- int nsk = accept(ag_fd, (struct sockaddr *) &raddr, &alen);
+ int nsk = TEMP_FAILURE_RETRY(accept(ag_fd, (struct sockaddr *) &raddr, &alen));
if (nsk < 0) {
ALOGE("Error on accept from socket fd %d: %s (%d).",
ag_fd,
@@ -331,12 +331,12 @@
to.tv_sec = timeout_ms / 1000;
to.tv_usec = 1000 * (timeout_ms % 1000);
}
- n = select(MAX(nat->hf_ag_rfcomm_sock,
- nat->hs_ag_rfcomm_sock) + 1,
+ n = TEMP_FAILURE_RETRY(select(
+ MAX(nat->hf_ag_rfcomm_sock, nat->hs_ag_rfcomm_sock) + 1,
&rset,
NULL,
NULL,
- (timeout_ms < 0 ? NULL : &to));
+ (timeout_ms < 0 ? NULL : &to)));
if (timeout_ms > 0) {
jint remaining = to.tv_sec*1000 + to.tv_usec/1000;
ALOGI("Remaining time %ldms", (long)remaining);
@@ -391,7 +391,7 @@
ALOGE("Neither HF nor HS listening sockets are open!");
return JNI_FALSE;
}
- n = poll(fds, cnt, timeout_ms);
+ n = TEMP_FAILURE_RETRY(poll(fds, cnt, timeout_ms));
if (n <= 0) {
if (n < 0) {
ALOGE("listening poll() on RFCOMM sockets: %s (%d)",
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index 0c66b86..36b4b45 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -457,9 +457,9 @@
// connect to camera service
static void android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz,
- jobject weak_this, jint cameraId)
+ jobject weak_this, jint cameraId, jboolean force, jboolean keep)
{
- sp<Camera> camera = Camera::connect(cameraId);
+ sp<Camera> camera = Camera::connect(cameraId, force, keep);
if (camera == NULL) {
jniThrowRuntimeException(env, "Fail to connect to camera service");
@@ -700,7 +700,12 @@
sp<Camera> camera = get_native_camera(env, thiz, NULL);
if (camera == 0) return 0;
- return env->NewStringUTF(camera->getParameters().string());
+ String8 params8 = camera->getParameters();
+ if (params8.isEmpty()) {
+ jniThrowRuntimeException(env, "getParameters failed (empty parameters)");
+ return 0;
+ }
+ return env->NewStringUTF(params8.string());
}
static void android_hardware_Camera_reconnect(JNIEnv *env, jobject thiz)
@@ -816,6 +821,15 @@
}
}
+static bool android_hardware_Camera_isReleased(JNIEnv *env, jobject thiz)
+{
+ ALOGV("isReleased");
+ sp<Camera> camera = get_native_camera(env, thiz, NULL);
+ if (camera == 0) return true;
+
+ return (camera->sendCommand(CAMERA_CMD_PING, 0, 0) != NO_ERROR);
+}
+
//-------------------------------------------------
static JNINativeMethod camMethods[] = {
@@ -826,7 +840,7 @@
"(ILandroid/hardware/Camera$CameraInfo;)V",
(void*)android_hardware_Camera_getCameraInfo },
{ "native_setup",
- "(Ljava/lang/Object;I)V",
+ "(Ljava/lang/Object;IZZ)V",
(void*)android_hardware_Camera_native_setup },
{ "native_release",
"()V",
@@ -894,6 +908,9 @@
{ "enableFocusMoveCallback",
"(I)V",
(void *)android_hardware_Camera_enableFocusMoveCallback},
+ { "isReleased",
+ "()Z",
+ (void *)android_hardware_Camera_isReleased},
};
struct field {
diff --git a/core/res/res/drawable/activated_background.xml b/core/res/res/drawable/activated_background.xml
index 1047e5b..d92fba1 100644
--- a/core/res/res/drawable/activated_background.xml
+++ b/core/res/res/drawable/activated_background.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true" android:drawable="@android:drawable/list_selector_background_selected" />
<item android:drawable="@color/transparent" />
</selector>
diff --git a/core/res/res/drawable/activated_background_holo_dark.xml b/core/res/res/drawable/activated_background_holo_dark.xml
index a29bcb9..febf2c4 100644
--- a/core/res/res/drawable/activated_background_holo_dark.xml
+++ b/core/res/res/drawable/activated_background_holo_dark.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true" android:drawable="@android:drawable/list_activated_holo" />
<item android:drawable="@color/transparent" />
</selector>
diff --git a/core/res/res/drawable/activated_background_holo_light.xml b/core/res/res/drawable/activated_background_holo_light.xml
index a29bcb9..febf2c4 100644
--- a/core/res/res/drawable/activated_background_holo_light.xml
+++ b/core/res/res/drawable/activated_background_holo_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true" android:drawable="@android:drawable/list_activated_holo" />
<item android:drawable="@color/transparent" />
</selector>
diff --git a/core/res/res/drawable/activated_background_light.xml b/core/res/res/drawable/activated_background_light.xml
index 7d737db..5d5681d 100644
--- a/core/res/res/drawable/activated_background_light.xml
+++ b/core/res/res/drawable/activated_background_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true" android:drawable="@drawable/list_selector_background_selected_light" />
<item android:drawable="@color/transparent" />
</selector>
diff --git a/core/res/res/drawable/btn_cab_done_holo_dark.xml b/core/res/res/drawable/btn_cab_done_holo_dark.xml
index 65d3496..fe42951 100644
--- a/core/res/res/drawable/btn_cab_done_holo_dark.xml
+++ b/core/res/res/drawable/btn_cab_done_holo_dark.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/btn_cab_done_pressed_holo_dark" />
<item android:state_focused="true" android:state_enabled="true"
diff --git a/core/res/res/drawable/btn_cab_done_holo_light.xml b/core/res/res/drawable/btn_cab_done_holo_light.xml
index f6a63f4..f362774 100644
--- a/core/res/res/drawable/btn_cab_done_holo_light.xml
+++ b/core/res/res/drawable/btn_cab_done_holo_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/btn_cab_done_pressed_holo_light" />
<item android:state_focused="true" android:state_enabled="true"
diff --git a/core/res/res/drawable/item_background.xml b/core/res/res/drawable/item_background.xml
index f7fef82..a1c9ff8 100644
--- a/core/res/res/drawable/item_background.xml
+++ b/core/res/res/drawable/item_background.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@color/transparent" />
diff --git a/core/res/res/drawable/item_background_holo_dark.xml b/core/res/res/drawable/item_background_holo_dark.xml
index f188df7..7c8590c 100644
--- a/core/res/res/drawable/item_background_holo_dark.xml
+++ b/core/res/res/drawable/item_background_holo_dark.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_disabled_holo_dark" />
diff --git a/core/res/res/drawable/item_background_holo_light.xml b/core/res/res/drawable/item_background_holo_light.xml
index ee3f4d8..99b5ac2 100644
--- a/core/res/res/drawable/item_background_holo_light.xml
+++ b/core/res/res/drawable/item_background_holo_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_disabled_holo_light" />
diff --git a/core/res/res/drawable/list_selector_background.xml b/core/res/res/drawable/list_selector_background.xml
index 1222155..eaf86ca 100644
--- a/core/res/res/drawable/list_selector_background.xml
+++ b/core/res/res/drawable/list_selector_background.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@color/transparent" />
diff --git a/core/res/res/drawable/list_selector_background_light.xml b/core/res/res/drawable/list_selector_background_light.xml
index 50a821b..4da7e21 100644
--- a/core/res/res/drawable/list_selector_background_light.xml
+++ b/core/res/res/drawable/list_selector_background_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@color/transparent" />
diff --git a/core/res/res/drawable/list_selector_holo_dark.xml b/core/res/res/drawable/list_selector_holo_dark.xml
index 9a6cb89..e4c5c52 100644
--- a/core/res/res/drawable/list_selector_holo_dark.xml
+++ b/core/res/res/drawable/list_selector_holo_dark.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@color/transparent" />
diff --git a/core/res/res/drawable/list_selector_holo_light.xml b/core/res/res/drawable/list_selector_holo_light.xml
index 844259e..17631bd 100644
--- a/core/res/res/drawable/list_selector_holo_light.xml
+++ b/core/res/res/drawable/list_selector_holo_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@color/transparent" />
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index f558fc7..0141016 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Laat die program toe om enige private woorde, name en frases te lees wat die gebruiker in die gebruikerwoordeboek gestoor het."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"skryf na gebruikergedefinieerde woordeboek"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Laat die program toe om nuwe woorde in die gebruikerwoordeboek te skryf."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"Lees USB-geheue se inhoud"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"Lees SD-kaart se inhoud"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Laat die program toe om die USB-geheue se inhoud te lees."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Laat die program toe om die SD-kaart se inhoud te lees."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"verander/vee uit USB-berging se inhoud"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"wysig/vee uit SD-kaart se inhoud"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Laat die program toe om die USB-geheue te skryf."</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 59a4a19..f9e0a8a 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"የእውቂያ ውሂብ ፃፍ"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"በጡባዊ ተኮህ ላይ የተከማቹ የእውቂያ(አድራሻ) ውሂብ ለመቀየር ለመተግበሪያው ይፈቅዳሉ፡፡ የእውቅያ ውሂብህን ለመደምሰስ ወይም ለመቀየር ተንኮል አዘል መተግበሪያዎች ሊጠቀሙት ይችላሉ፡፡"</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"በስልክህ ላይ የተከማቹ የእውቂያ(አድራሻ) ውሂብ ለመቀየር ለመተግበሪያው ይፈቅዳሉ፡፡ የእውቅያ ውሂብህን ለመደምሰስ ወይም ለመቀየር ተንኮል አዘል መተግበሪያዎች ሊጠቀሙት ይችላሉ፡፡"</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"የጥሪ ምዝግብ ማስታወሻን አንብብ"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የጡባዊ ተኮህን ምዝግብ ማስታወሻ እንዲያነብ ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች ለሌሎች ሰዎች ውሂብህን ለመላክ ሊጠቀሙበት ይችላሉ፡፡"</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የስልክ ጥሪህን ምዝግብ ማስታወሻ እንዲያነብ ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች ለሌሎች ሰዎች ውሂብህን ለመላክ ሊጠቀሙበት ይችላሉ፡፡"</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"የጥሪ ምዝግብ ማስታወሻን ፃፍ"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የጡባዊተኮህን ምዝግብ ማስታወሻ ለመቀየር ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች የስልክህን ምዝግብ ማስታወሻ ለመሰረዝ ወይም ለመለወጥ ሊጠቀሙበት ይችላሉ፡፡"</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የስልክህን ምዝግብ ማስታወሻ ለመቀየር ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች የስልክህን ምዝግብ ማስታወሻ ለመሰረዝ ወይም ለመለወጥ ሊጠቀሙበት ይችላሉ፡፡"</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"የመገለጫ ውሂብዎን ያንብቡ"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"ልክ እንደ አንተ ስም እና የዕውቂያ መረጃ ፣ ባንተ መሳሪያ ወስጥ የተከማቹ የግል መገለጫ መረጃ ለማንበብ ለመተግበሪያው ይፈቅዳሉ፡፡ይሄም ማለት ሌሎች መተግበሪያዎች ሊለዩህ ይችላሉ እና ለሌሎች የመገለጫ መረጃህን ይልካሉ፡፡"</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"የአርስዎ መገለጫ ውሂብ ላይ ይፃፉ"</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 38ee729..a8868be 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"للسماح للتطبيق بقراءة أي كلمات وأسماء وعبارات خاصة ربما خزنها المستخدم في قاموس المستخدم."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"كتابة إلى القاموس المعرّف بواسطة المستخدم"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"للسماح للتطبيق بكتابة كلمات جديدة في قاموس المستخدم."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"قراءة محتويات وحدة تخزين USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"قراءة محتويات بطاقة SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"للسماح للتطبيق بقراءة محتويات وحدة تخزين USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"للسماح للتطبيق بقراءة محتويات بطاقة SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"تعديل/حذف محتويات وحدة تخزين USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"تعديل/حذف محتويات بطاقة SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"للسماح للتطبيق بالكتابة إلى وحدة تخزين USB."</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 4a6054f..cfeb360 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Дазваляе прыкладанню счытваць любыя прыватныя словы, імёны і фразы, якія карыстальнік можа захоўваць у карыстальніцкім слоўніку."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"запісаць у карыстальніцкі слоўнік"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Дазваляе прыкладанням запісваць новыя словы ў карыстальніцкі слоўнік."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"чытанне змесціва USB-назапашвальнiка"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"чытанне змесціва SD-карты"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Дазваляе прыкладаню счытваць змесцiва USB-назапашвальніка."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Дазваляе прыкладанню счытваць змесціва SD-карты."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"змяніць/выдаліць змесціва USB-назапашвальнiка"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"змяняць/выдаляць змесціва SD-карты"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Дазваляе прыкладаням выконваць запіс ва USB-назапашвальнік."</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index b477d04..2d74ffd 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Разрешава на приложението да чете частни думи, имена и фрази, които потребителят може да е съхранил в потребителския речник."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"запис в дефинирания от потребителя речник"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Разрешава на приложението да записва нови думи в потребителския речник."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"четене на съдържанието на USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"четене на съдържанието на SD картата"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Разрешава на прил. да чете съдърж. на USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Разрешава на приложението да чете съдържанието на SD картата."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"промяна/изтриване на съдържанието в USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"промяна/изтриване на съдържанието на SD картата"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Разрешава на приложението да записва в USB."</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 0cb35db..64d0f87 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"escriure dades de contacte"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permet que l\'aplicació modifiqui les dades de contacte (adreça) emmagatzemades a la tauleta. Les aplicacions malicioses poden utilitzar-ho per esborrar o modificar les dades de contacte."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permet que l\'aplicació modifiqui les dades de contacte (adreça) emmagatzemades al telèfon. Les aplicacions malicioses poden utilitzar-ho per esborrar o per modificar les dades de contacte."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"lectura del registre de trucades"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permet que l\'aplicació llegeixi el registre de trucades de la teva tauleta, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per enviar les teves dades a altres persones."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permet que l\'aplicació llegeixi el registre de trucades del teu telèfon, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per enviar les teves dades a altres persones."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"escriptura del registre de trucades"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permet que l\'aplicació modifiqui el registre de trucades de la teva tauleta, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per eliminar o per modificar el teu registre de trucades."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permet que l\'aplicació modifiqui el registre de trucades del teu telèfon, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per eliminar o per modificar el teu registre de trucades."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"lectura de dades del teu perfil"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permet que l\'aplicació pugui llegir informació del perfil personal emmagatzemada al dispositiu, com ara el teu nom i la teva informació de contacte. Això significa que l\'aplicació et pot identificar i enviar la informació del teu perfil a altres persones."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"escriptura a les teves dades del perfil"</string>
@@ -511,14 +505,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Permet que l\'aplicació llegeixi les paraules, els noms i les frases privats que l\'usuari pot haver emmagatzemat al seu diccionari."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"escriu al diccionari definit per l\'usuari"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permet que l\'aplicació escrigui paraules noves al diccionari de l\'usuari."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"llegeix el contingut de l\'emmagatzematge USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"llegeix el contingut de la targeta SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permet que l\'aplicació llegeixi el contingut de l\'emmagatzematge USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permet que l\'aplicació llegeixi el contingut de la targeta SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modificar/esborrar contingut USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/esborrar contingut de la targeta SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permet que l\'aplicació escrigui a l\'emmagatzematge USB."</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index d363f0c..08f4dc9 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Umožní aplikaci číst soukromá slova, jména a fráze, která uživatel mohl uložit do svého slovníku."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"zápis do slovníku definovaného uživatelem"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Umožňuje aplikaci zapisovat nová slova do uživatelského slovníku."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"čtení obsahu USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"čtení obsahu karty SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Umožňuje čtení obsahu USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Umožňuje aplikaci čtení obsahu karty SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"úprava/mazání obsahu úložiště USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"změna/smazání obsahu karty SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Umožňuje aplikaci zapisovat do úložiště USB."</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 7d12a27..f9ae61b 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -749,8 +749,7 @@
<string name="double_tap_toast" msgid="4595046515400268881">"Tipp: Zum Vergrößern und Verkleinern zweimal tippen"</string>
<string name="autofill_this_form" msgid="4616758841157816676">"AutoFill"</string>
<string name="setup_autofill" msgid="7103495070180590814">"AutoFill konfig."</string>
- <!-- no translation found for autofill_address_name_separator (6350145154779706772) -->
- <skip />
+ <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
<string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
<string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
<string name="autofill_address_summary_format" msgid="4874459455786827344">"$1$2$3"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index c3898ab..99883fb 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Επιτρέπει στην εφαρμογή την ανάγνωση ιδιωτικών λέξεων, ονομάτων και φράσεων, τα οποία ο χρήστης ενδέχεται να έχει αποθηκεύσει στο λεξικό χρήστη."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"εγγραφή σε λεξικό καθορισμένο από τον χρήστη"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Επιτρέπει στην εφαρμογή την εγγραφή νέων λέξεων στο λεξικό χρήστη."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"ανάγν. περιεχ. αποθ. χώρ. USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"ανάγνωση περιεχομένου κάρτας SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Επιτρ. η ανάγν. περιεχ. απ. χώρου USB"</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Επιτρέπει στην εφαρμογή την ανάγνωση περιεχομένου της κάρτας SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"τροπ./διαγρ. περ. απ. χώρ. USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"τροποποίηση/διαγραφή περιεχομένων κάρτας SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Επιτρέπει στην εφαρμογή την εγγραφή στον αποθηκευτικό χώρο USB."</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 5ad68fc..de92665 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"write contact data"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Allows the app to modify the contact (address) data stored on your tablet. Malicious apps may use this to erase or modify your contact data."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Allows the app to modify the contact (address) data stored on your phone. Malicious apps may use this to erase or modify your contact data."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"read call log"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Allows the app to read your tablet\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to send your data to other people."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Allows the app to read your phone\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to send your data to other people."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"write call log"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Allows the app to modify your tablet\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to erase or modify your call log."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Allows the app to modify your phone\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to erase or modify your call log."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"read your profile data"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Allows the app to read personal profile information stored on your device, such as your name and contact information. This means the app can identify you and send your profile information to others."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"write to your profile data"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 940e58a..9ede6a0 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"escribir datos de contacto"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite que la aplicación lea todos los datos (direcciones) de contactos almacenados en el tablet. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar los datos de contactos."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite que la aplicación consulte todos los datos (direcciones) de contactos almacenados en el teléfono. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar los datos de contactos."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"leer el registro de llamadas"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permite que la aplicación lea el registro de llamadas del tablet, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para enviar tus datos a otros usuarios."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permite que la aplicación lea el registro de llamadas del teléfono, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para enviar tus datos a otros usuarios."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"escribir en el registro de llamadas"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permite que la aplicación modifique el registro de llamadas del tablet, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar el registro de llamadas."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permite que la aplicación modifique el registro de llamadas del teléfono, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar el registro de llamadas."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"acceder a datos de tu perfil"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite que la aplicación acceda a información del perfil personal almacenada en el dispositivo (como el nombre o la información de contacto), lo que significa que la aplicación puede identificar al usuario y enviar la información de su perfil a otros usuarios."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"escribir en datos de tu perfil"</string>
@@ -511,14 +505,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Permite que la aplicación lea cualquier palabra, nombre o frase de carácter privado que el usuario haya almacenado en su diccionario."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"añadir al diccionario definido por el usuario"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permite que la aplicación escriba palabras nuevas en el diccionario de usuario."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"leer contenido del almacenamiento USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"leer contenido de la tarjeta SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permite que la aplicación lea contenido del almacenamiento USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permite que la aplicación lea contenidos de la tarjeta SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modificar/borrar contenido USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/eliminar contenido de la tarjeta SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permite escribir en el almacenamiento USB."</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 7b91d48..3c8079d 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Võimaldab rakendusel lugeda kõiki privaatseid sõnu, nimesid ja fraase, mille kasutaja võis salvestada kasutajasõnastikku."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"Kasutaja määratud sõnastikku kirjutamine"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Võimaldab rakendusel kirjutada kasutajasõnastikku uusi sõnu."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB-salvestusruumi sisu lugem."</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD-kaardi sisu lugemine"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Rak. loeb USB-s.-ruumi sisu."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Võimaldab rakendusel lugeda SD-kaardi sisu."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB-seadme sisu muutm./kustut."</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"muuda/kustuta SD-kaardi sisu"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Võimaldab rakendusel kirjutada USB-mäluseadmele."</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index bb4689c..164d213 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"به برنامه اجازه میدهد هر گونه کلمه، نام، عبارت خصوصی را که کاربر در فرهنگ لغت خود ذخیره کرده است بخواند."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"نوشتن در فرهنگ لغت تعریف شده از سوی کاربر"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"به برنامه اجازه میدهد تا کلمات جدید را در فهرست کاربر بنویسد."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"خواندن محتوای حافظه USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"خواندن محتوای کارت SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"به برنامه اجازه خواندن محتوای حافظه USB را میدهد."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"به برنامه اجازه خواندن محتوای کارت SD را میدهد."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"اصلاح/حذف محتواهای حافظه USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"اصلاح کردن/حذف محتویات کارت SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"به برنامه اجازه میدهد تا در حافظه USB بنویسد."</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 553b590..07f6118 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Antaa sovelluksen lukea yksityisiä sanoja, nimiä tai ilmauksia, joita käyttäjä on voinut tallentaa käyttäjän sanakirjaan."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"käyttäjän määrittelemään sanakirjaan kirjoittaminen"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Antaa sovelluksen kirjoittaa uusia sanoja käyttäjän sanakirjaan."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lue USB-tallennustilan sisältöä"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lue SD-kortin sisältöä"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Antaa sovelluksen lukea USB-tallennustilan sisältöä."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Antaa sovelluksen lukea SD-kortin sisältöä."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"muokkaa/poista USB-sisältöä"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"muokkaa/poista SD-kortin sisältöä"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Antaa sovelluksen kirjoittaa USB-tallennustilaan."</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 7e2c4c0..88fe721 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"Édition des données d\'un contact"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permet à l\'application de modifier les coordonnées (adresses) de vos contacts qui sont stockées sur votre tablette. Des applications malveillantes peuvent exploiter cette fonctionnalité pour effacer ou modifier ces coordonnées."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permet à l\'application de modifier les coordonnées (adresses) de vos contacts qui sont stockées sur votre téléphone. Des applications malveillantes peuvent exploiter cette fonctionnalité pour effacer ou modifier ces coordonnées."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"lire le journal d\'appels"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permet à l\'application de lire le journal d\'appels de votre tablette, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour envoyer vos données à des tiers."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permet à l\'application de lire le journal d\'appels de votre téléphone, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour envoyer vos données à des tiers."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"modifier le journal d\'appels"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permet à l\'application de lire le journal d\'appels de votre tablette, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permet à l\'application de lire le journal d\'appels de votre téléphone, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"lire vos données de profil"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permet à l\'application de lire les informations de profil stockées sur votre appareil, telles que votre nom et vos coordonnées, ou d\'en ajouter. D\'autres applications peuvent alors vous identifier et envoyer vos informations de profil à des tiers."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"modifier vos données de profil"</string>
@@ -511,14 +505,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Permet à l\'application de lire tous les mots, noms et expressions privés que l\'utilisateur a pu enregistrer dans son dictionnaire personnel."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"enregistrer dans le dictionnaire défini par l\'utilisateur"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permet à l\'application d\'enregistrer de nouveaux mots dans le dictionnaire personnel de l\'utilisateur."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lire contenu de la mémoire USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lire le contenu de la carte SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permet à l\'appli de lire contenu mémoire USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permet à l\'application de lire le contenu de la carte SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"Modifier/Supprimer contenu mémoire USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modifier/supprimer le contenu de la carte SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permet à l\'application de modifier le contenu de la mémoire de stockage USB."</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index bd56421..966c70d 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"एप्लिकेशन को ऐसे निजी शब्दों, नामों और वाक्यांशों को पढ़ने देता है जो संभवत: उपयोगकर्ता द्वारा उपयोगकर्ता डिक्शनरी में संग्रहीत किए गए हों."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"उपयोगकर्ता-निर्धारित डिक्शनरी में लिखें"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"एप्लिकेशन को उपयोगकर्ता डिक्शनरी में नए शब्द लिखने देता है."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB संग्रहण की सामग्री पढ़ें"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD कार्ड की सामग्री पढ़ें"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"एप्लि. को USB संग्रहण की सामग्री पढ़ने देता है."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"एप्लिकेशन को SD कार्ड की सामग्री पढ़ने देता है."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB संग्रहण सामग्रियों को संशोधित करें/हटाएं"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD कार्ड सामग्रियां संशोधित करें/हटाएं"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"एप्लि. को USB संग्रहण में लिखने देता है."</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 8b2e753..588de28 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Aplikaciji omogućuje čitanje svih privatnih riječi, imena i izraza koje je korisnik pohranio u korisničkom rječniku."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"pisanje u korisnički definiran rječnik"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Aplikaciji omogućuje pisanje novih riječi u korisnički rječnik."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"čitanje sadržaja USB pohrane"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"čitanje sadržaja SD kartice"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Aplikaciji omog. čitanje sadržaja USB pohrane."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Aplikaciji omogućuje čitanje sadržaja SD kartice."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"izmjeni/briši sadržaje memorije USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"izmjena/brisanje sadržaja SD kartice"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Dopušta pisanje u USB pohranu."</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index d55caee..637bdd2 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Lehetővé teszi az alkalmazás számára, hogy olvassa a felhasználói szótárban tárolt saját szavakat, neveket és kifejezéseket."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"a felhasználó által definiált szótár írása"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Lehetővé teszi az alkalmazás számára, hogy új szavakat írjon a felhasználói szótárba."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB-tár tartalmának beolvasása"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD-kártya tartalmának beolvasása"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Beolvashat USB-tartalmakat."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Lehetővé teszi az alkalmazás számára SD-kártyák tartalmának beolvasását."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB-tár tartalmának módosítása és törlése"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"az SD-kártya tartalmának módosítása és törlése"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Az alkalmazás USB-tárra írhat."</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 2fad7a1..b8b0867 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -277,7 +277,7 @@
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"mengikat ke wallpaper"</string>
<string name="permdesc_bindWallpaper" msgid="7108428692595491668">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu wallpaper. Tidak pernah diperlukan oleh apl normal."</string>
<string name="permlab_bindRemoteViews" msgid="5697987759897367099">"mengikat ke layanan widget"</string>
- <string name="permdesc_bindRemoteViews" msgid="4717987810137692572">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu layanan gawit. Tidak pernah diperlukan oleh apl normal."</string>
+ <string name="permdesc_bindRemoteViews" msgid="4717987810137692572">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu layanan widget. Tidak pernah diperlukan oleh apl normal."</string>
<string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"berinteraksi dengan admin perangkat"</string>
<string name="permdesc_bindDeviceAdmin" msgid="569715419543907930">"Mengizinkan pemegang mengirimkan tujuan kepada administrator perangkat. Tidak pernah diperlukan oleh apl normal."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"ubah orientasi layar"</string>
@@ -426,7 +426,7 @@
<string name="permlab_checkinProperties" msgid="7855259461268734914">"akses properti lapor masuk"</string>
<string name="permdesc_checkinProperties" msgid="4024526968630194128">"Mengizinkan apl membaca/menulis akses ke properti yang diunggah oleh layanan lapor masuk. Tidak untuk digunakan oleh apl normal."</string>
<string name="permlab_bindGadget" msgid="776905339015863471">"pilih widget"</string>
- <string name="permdesc_bindGadget" msgid="8261326938599049290">"Mengizinkan apl memberi tahu sistem tentang gawit mana yang dapat digunakan oleh suatu apl. Apl dengan izin ini dapat memberikan akses ke data pribadi untuk apl lain. Tidak untuk digunakan oleh apl normal."</string>
+ <string name="permdesc_bindGadget" msgid="8261326938599049290">"Mengizinkan apl memberi tahu sistem tentang widget mana yang dapat digunakan oleh suatu apl. Apl dengan izin ini dapat memberikan akses ke data pribadi untuk apl lain. Tidak untuk digunakan oleh apl normal."</string>
<string name="permlab_modifyPhoneState" msgid="8423923777659292228">"ubah kondisi ponsel"</string>
<string name="permdesc_modifyPhoneState" msgid="1029877529007686732">"Mengizinkan apl mengontrol fitur telepon perangkat. Apl dengan izin ini dapat mengalihkan jaringan, menyalakan dan mematikan radio ponsel, dan melakukan hal serupa lainnya tanpa pernah memberi tahu Anda."</string>
<string name="permlab_readPhoneState" msgid="2326172951448691631">"baca kondisi dan identitas ponsel"</string>
@@ -1098,7 +1098,7 @@
<string name="permlab_copyProtectedData" msgid="4341036311211406692">"menyalin konten"</string>
<string name="permdesc_copyProtectedData" msgid="4390697124288317831">"Mengizinkan apl menjalankan layanan kontainer default untuk menyalin konten. Tidak untuk digunakan oleh apl normal."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"Sentuh dua kali untuk mengontrol perbesar/perkecil"</string>
- <string name="gadget_host_error_inflating" msgid="4882004314906466162">"Tidak dapat menambahkan gawit."</string>
+ <string name="gadget_host_error_inflating" msgid="4882004314906466162">"Tidak dapat menambahkan widget."</string>
<string name="ime_action_go" msgid="8320845651737369027">"Buka"</string>
<string name="ime_action_search" msgid="658110271822807811">"Telusuri"</string>
<string name="ime_action_send" msgid="2316166556349314424">"Kirimkan"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 5a4f357..75ed4e8 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"scrittura dati di contatto"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Consente all\'applicazione di modificare i dati di contatto (indirizzi) memorizzati sul tablet. Le applicazioni dannose potrebbero farne uso per cancellare o modificare i tuoi dati di contatto."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Consente all\'applicazione di modificare i dati di contatto (indirizzi) memorizzati sul telefono. Le applicazioni dannose potrebbero farne uso per cancellare o modificare i tuoi dati di contatto."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"lettura del registro chiamate"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Consente all\'applicazione di leggere il registro chiamate del tablet, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero fare uso di questa funzione per inviare dati ad altre persone."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Consente all\'applicazione di leggere il registro chiamate del telefono, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero fare uso di questa funzione per inviare dati ad altre persone."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"scrittura del registro chiamate"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Consente all\'applicazione di modificare il registro chiamate del tablet, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero farne uso per cancellare o modificare il registro chiamate."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Consente all\'applicazione di modificare il registro chiamate del telefono, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero farne uso per cancellare o modificare il registro chiamate."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"lettura dei tuoi dati profilo"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Consente all\'applicazione di leggere informazioni del profilo personale memorizzate sul dispositivo, come il tuo nome e le tue informazioni di contatto. Ciò significa che l\'applicazione può identificarti e inviare le tue informazioni di profilo ad altri."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"scrittura dati del profilo"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 56a988f..40a4d01 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"כתוב נתונים של אנשי קשר"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"מאפשר ליישום לשנות את פרטי הקשר (כתובת) המאוחסנים בטבלט. יישומים זדוניים עלולים להשתמש בכך כדי למחוק או לשנות את פרטי הקשר שלך."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"מאפשר ליישום לשנות את פרטי הקשר (כתובת) המאוחסנים בטלפון. יישומים זדוניים עלולים להשתמש בכך כדי למחוק או לשנות את פרטי הקשר שלך."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"קריאת יומן שיחות"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"מאפשר ליישום לקרוא את יומן השיחות של הטבלט, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי לשלוח את הנתונים שלך לאנשים אחרים."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"מאפשר ליישום לקרוא את יומן השיחות של הטלפון, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי לשלוח את הנתונים שלך לאנשים אחרים."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"כתיבת יומן שיחות"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"מאפשר ליישום לשנות את יומן השיחות של הטבלט, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי למחוק או לשנות את יומן השיחות שלך."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"מאפשר ליישום לשנות את יומן השיחות של הטלפון, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי למחוק או לשנות את יומן השיחות שלך."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"קרא את נתוני הפרופיל שלך"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"מאפשר ליישום לקרוא נתונים בפרטי הפרופיל האישי המאוחסנים במכשיר, כגון שמך ופרטי הקשר שלך. משמעות הדבר שהיישום יוכל לזהות אותך ולשלוח את מידע הפרופיל שלך לאנשים אחרים."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"כתוב בנתוני הפרופיל שלך"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index c248040..5b09182 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"ユーザーが単語リストに個人情報として登録した可能性のある語句や名前を読み込むことをアプリに許可します。"</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"単語リストへの書き込み"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"単語リストに新しい語句を書き込むことをアプリに許可します。"</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USBストレージの読み取り"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SDカードのコンテンツの読み取り"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"USBストレージの読み取りをアプリに許可します。"</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"SDカードのコンテンツの読み取りをアプリに許可します。"</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USBストレージのコンテンツの変更/削除"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SDカードのコンテンツを修正/削除する"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"USBストレージへの書き込みをアプリに許可します。"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index cbd2e85..ed3cfc9 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"앱이 사용자 사전에 보관되어 있는 비공개 단어, 이름 및 구문을 읽도록 허용합니다."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"사용자 정의 사전에 작성"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"앱이 사용자 사전에 새 단어를 입력할 수 있도록 허용합니다."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB 저장소 콘텐츠 읽기"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD 카드 콘텐츠 읽기"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"앱 USB 콘텐츠 읽기 허용"</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"앱이 SD 카드의 콘텐츠를 읽을 수 있도록 허용합니다."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB 저장소 콘텐츠 수정/삭제"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD 카드 콘텐츠 수정/삭제"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"앱이 USB 저장소에 쓸 수 있도록 허용합니다."</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index b5afdd5..e0a1ddf 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Leidžiama programai skaityti privačius žodžius, vardus ir frazes, kuriuos naudotojas išsaugojo naudotojo žodyne."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"rašyti naudotojo nustatytame žodyne"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Leidžiama programai rašyti naujus žodžius į naudotojo žodyną."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"skaityti USB atminties turinį"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"skaityti SD kortelės turinį"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Leid. progr. skait. USB turin."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Leidžiama programai skaityti SD kortelės turinį."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"keisti / ištrinti USB atmintinės turinį"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"keisti / ištrinti SD kortelės turinį"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Leidž. progr. raš. į USB atm."</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 65b3d7e..6e1bb33 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Ļauj lietotnei lasīt jebkurus privātu vārdus, nosaukumus un frāzes, ko lietotājs saglabājis savā lietotāja vārdnīcā."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"rakstīt lietotāja noteiktā vārdnīcā"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Ļauj lietotnei rakstīt jaunus vārdus lietotāja vārdnīcā."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lasīt USB atmiņas saturu"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lasīt SD kartes saturu"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Ļauj liet. lasīt USB atm. sat."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Ļauj lietotnei lasīt SD kartes saturu."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"pārveidot/dzēst USB kr. sat."</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"pārveidot/dzēst SD kartes saturu"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Ļauj lietotnei rakstīt USB atmiņā."</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 39c733e..66ddfa8 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Lar appen lese eventuelle private ord, navn og uttrykk som brukeren kan ha lagret i brukerordlisten."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"skrive i brukerdefinert ordliste"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Lar appen skrive nye ord i brukerordlisten."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lese innhold på USB-lagr."</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lese innhold på SD-kortet"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Lar appen lese innhold på USB-lagringsenheten."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Lar appen lese innhold på SD-kortet."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"endre/slette innh. i USB-lagr."</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"redigere/slette innhold på minnekort"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Gir appen tillatelse til å skrive til USB-lagringen."</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index b4fc77b..b57e27d 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Pozwala aplikacji na odczytywanie wszelkich prywatnych słów, nazw i wyrażeń zapisanych w słowniku użytkownika."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"zapisywanie w słowniku zdefiniowanym przez użytkownika"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Pozwala aplikacji na zapisywanie nowych słów do słownika użytkownika."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"odczyt zawartości pamięci USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"odczyt zawartości karty SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Pozwala aplikacji na odczyt pamięci USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Pozwala aplikacji na odczyt zawartości karty SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"Modyfikowanie/usuwanie z nośnika USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modyfikowanie/usuwanie zawartości karty SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Pozwala aplikacji na zapis w pamięci USB."</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index f76be4c..e53a7c5 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"escrever dados de contacto"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite que a aplicação modifique os dados de contacto (endereço) armazenados no tablet. As aplicações maliciosas podem utilizar isto para apagar ou modificar os dados dos seus contactos."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite que uma aplicação modifique os dados de contacto (endereço) armazenados no telemóvel. As aplicações maliciosas podem utilizar isto para apagar ou modificar os dados dos seus contactos."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"ler registo de chamadas"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permite à aplicação ler o registo de chamadas do tablet, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para enviar os seus dados para outras pessoas."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permite à aplicação ler o registo de chamadas do telemóvel, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para enviar os seus dados para outras pessoas."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"escrever registo de chamadas"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permite à aplicação modificar o registo de chamadas do tablet, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para apagar ou modificar o registo de chamadas."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permite à aplicação modificar o registo de chamadas do telemóvel, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para apagar ou modificar o registo de chamadas."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"ler os dados do perfil"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite que a aplicação leia dados de perfil pessoais armazenados no seu aparelho, como o seu nome e dados de contacto. Isto significa que outras aplicações podem identificá-lo e enviar os seus dados de perfil a terceiros."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"escrever nos dados do seu perfil"</string>
@@ -511,14 +505,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Permite à aplicação ler quaisquer palavras, nomes e expressões privadas que o utilizador possa ter armazenado no dicionário do utilizador."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"escrever no dicionário definido pelo utilizador"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permite à aplicação escrever novas palavras no dicionário do utilizador."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"ler conteúdo da memória USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"ler conteúdo do cartão SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permite que a aplicação leia conteúdos da memória USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permite que a aplicação leia conteúdos do cartão SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"mod./elim. conteúdo do armaz. USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/eliminar conteúdo do cartão SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permite que a aplicação escreva na unidade de armazenamento USB."</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 46e445e..f91b25c 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"gravar dados de contato"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite que o aplicativo modifique os dados de contato (endereço) armazenados em seu tablet. Aplicativos maliciosos podem usar esse recurso para apagar ou modificar seus dados de contato."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite que o aplicativo modifique os dados de contato (endereço) armazenados em seu telefone. Aplicativos maliciosos podem usar esse recurso para apagar ou modificar seus dados de contato."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"ler registro de chamadas"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permite que o aplicativo leia o registro de chamadas de seu tablet, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para enviar seus dados para outras pessoas."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permite que o aplicativo leia o registro de chamadas de seu telefone, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para enviar seus dados para outras pessoas."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"salvar no registo de chamadas"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permite que o aplicativo modifique o registro de chamadas de seu tablet, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para apagar ou modificar seu registro de chamadas."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permite que o aplicativo modifique o registro de chamadas de seu telefone, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para apagar ou modificar seu registro de chamadas."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"ler dados de seu perfil"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite que o aplicativo leia informações de perfil pessoais armazenadas em seu dispositivo, como seu nome e informações de contato. Isso significa que o aplicativo pode identificá-lo e enviar suas informações de perfil para outros aplicativos."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"escrever nos dados do perfil"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 057b005..6d49acc 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Permite aplicaţiei să citească cuvinte, nume şi expresii private stocate de utilizator în dicţionarul său."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"scriere în dicţionarul definit de utilizator"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permite aplicaţiei să scrie cuvinte noi în dicţionarul utilizatorului."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"citeşte conţinutul stoc. USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"citeşte conţinutul cardului SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permite aplic. citirea conţinutului stoc. USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permite aplicaţiei să citească conţinutul cardului SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modificare/ştergere a conţinutului stocării USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificare/ştergere conţinut card SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permite scriere în stoc. USB."</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 4dc24f7..662bbbb 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Приложение получит доступ ко всем словам, именам и фразам, которые хранятся в пользовательском словаре."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"запись данных в пользовательский словарь"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Приложение сможет добавлять слова в пользовательский словарь."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"чтение данных с USB-накопителя"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"чтение данных с SD-карты"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Приложение сможет считывать данные с USB-накопителя."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Приложение сможет считывать данные с SD-карты."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"доступ к USB-накопителю"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"изменять/удалять содержимое SD-карты"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Приложение сможет записывать данные на USB-накопитель."</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 2be8c1f..242b78a 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Umožňuje aplikácii čítať súkromné slová, názvy a frázy, ktoré mohol používateľ uložiť do slovníka používateľa."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"zapisovať do slovníka definovaného používateľom"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Umožňuje aplikácii zapisovať nové slová do používateľského slovníka."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"čítanie obsahu ukl. pries. USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"čítanie obsahu karty SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Umožňuje apl. čítať obsah USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Umožňuje aplikácii čítať obsah karty SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"upraviť/odstrániť obsah ukl. pr. USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"Zmeniť/odstrániť obsah karty SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Umožňuje aplikácii zápis do ukladacieho priestoru USB."</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 144cbd3..32c55f1 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Programu omogoča branje morebitnih zasebnih besed, imen in izrazov, ki jih je uporabnik shranil v uporabniški slovar."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"pisanje v uporabniško določen slovar"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Programu omogoča pisanje nove besede v uporabniški slovar."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"branje vsebine pomnilnika USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"branje vsebine kartice SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Aplikaciji dovoli branje vsebine pomnilnika USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Aplikaciji dovoli branje vsebine kartice SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"spreminjanje vsebine pomnilnika USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"spreminjanje/brisanje vsebine kartice SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Programu omogoča zapisovanje v pomnilnik USB."</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 5c58d72..eee0d80 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"skriva kontaktuppgifter"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Tillåter att appen ändrar kontaktuppgifter (adresser) som lagras på pekdatorn. Skadliga appar kan använda detta för att radera eller ändra kontaktuppgifter."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Tillåter att appen ändrar kontaktuppgifter (adresser) som lagras på mobilen. Skadliga appar kan använda detta för att radera eller ändra kontaktuppgifter."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"läs samtalslogg"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Tillåter att appen läser pekdatorns samtalslista, inklusive uppgifter om inkommande och utgående samtal. Skadliga appar kan använda informationen för att skicka dina data till andra personer."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Tillåter att appen läser mobilens samtalslista, inklusive uppgifter om inkommande och utgående samtal. Skadliga appar kan använda informationen för att skicka dina data till andra personer."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"skriv samtalslogg"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Tillåter att appen gör ändringar i pekdatorns samtalslista, inklusive i uppgifter om inkommande och utgående samtal. Skadliga program kan använda detta för att radera eller ändra din samtalslista."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Tillåter att appen gör ändringar i mobilens samtalslista, inklusive i uppgifter om inkommande och utgående samtal. Skadliga program kan använda detta för att radera eller ändra din samtalslista."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"läser din profilinformation"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Tillåter att appen läser personlig profilinformation som lagras på din enhet, t.ex. ditt namn och kontaktuppgifter. Det innebär att appen kan identifiera dig och skicka profilinformation till andra."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"skriver till data för din profil"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index e62e1ab..4de56ed 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Inaruhusu programu kusoma maneno, majina na vifungu vyovyote vya kibinafsi, ambavyo huenda mtumiaji amehifadhi katika kamusi ya mtumiaji."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"andika kwa kamusi iliyobainishwa na mtumiaji"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Inaruhusu programu kuandika maneno mapya katika kamusi ya mtumiaji."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"soma maudhui ya hifadhi ya USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"soma maudhui ya kadi ya SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Huruhusu programu kusoma maudhui ya hifadhi ya USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Huruhusu programu kusoma maudhui ya kadi ya SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"rekebisha/futa maudhui ya hifadhi ya USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"rekebisha/futa maudhui ya kadi ya SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Inaruhusu programu kuandikia hifadhi ya USB."</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index ea6f572..30df3ab 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"อนุญาตให้แอปพลิเคชันอ่านคำ ชื่อ และวลีส่วนบุคคลที่ผู้ใช้อาจเก็บไว้ในพจนานุกรมของผู้ใช้"</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"เขียนลงในพจนานุกรมที่ผู้ใช้กำหนด"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"อนุญาตให้แอปพลิเคชันเขียนคำใหม่ลงในพจนานุกรมผู้ใช้"</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"อ่านเนื้อหาที่บันทึกใน USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"อ่านเนื้อหาในการ์ด SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"ให้แอปฯ อ่านเนื้อหาใน USB"</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"อนุญาตให้แอปพลิเคชันอ่านเนื้อหาของการ์ด SD"</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"แก้ไข/ลบเนื้อหาของที่เก็บข้อมูล USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"แก้ไข/ลบข้อมูลการ์ด SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"อนุญาตให้แอปฯ เขียนลงใน USB"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index f143b5f..ce79c70 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Pinapayagan ang app na magbasa ng anumang pribadong mga salita, pangalan at parirala na maaaring inimbak ng user sa diksyunaryo ng user."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"magsulat sa diksyunaryong tinukoy ng user"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Pinapayagan ang app na magsulat ng mga bagong salita sa diksyunaryo ng user."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"basahin nilalaman USB storage"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"basahin ang mga nilalaman ng SD card"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Payag app basa laman USB strg."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Binibigyang-daan ang app na basahin ang mga nilalaman ng SD card."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"baguhin/tanggalin laman ng USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"baguhin/tanggalin ang mga nilalaman ng SD card"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Pinapayagan ang app na magsulat sa USB storage."</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 9adc8aa..3fc02a9 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Uygulamaya, kullanıcının kullanıcı sözlüğünde depolamış olabileceği kişisel kelimeleri, adları ve kelime öbeklerini okuma izni verir."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"kullanıcı tanımlı sözlüğe yaz"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Uygulamaya, kullanıcı sözlüğüne yeni kelimeler yazma izni verir."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB depolama içeriklerini oku"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD kart içeriklerini oku"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Uygulamaya USB depolama içeriğini okuma izni verir."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Uygulamaya SD kart içeriğini okuma izni verir."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB dep birm içeriğini dğş/sil"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD kart içeriklerini değiştir/sil"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Uygulamaya USB depolama birimine yazma izni verir."</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index aa4e695..435ebbf 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"Cho phép ứng dụng đọc bất kỳ từ, tên và cụm từ riêng nào mà người dùng có thể đã lưu trữ trong từ điển của người dùng."</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"ghi vào từ điển do người dùng xác định"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Cho phép ứng dụng ghi từ mới vào từ điển của người dùng."</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"đọc nội dung của bộ nhớ USB"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"đọc nội dung của thẻ SD"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Cho phép ứng dụng đọc nội dung của bộ lưu trữ USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Cho phép ứng dụng đọc nội dung của thẻ SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"sửa đổi/xóa nội dung bộ nhớ USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"sửa đổi/xóa nội dung thẻ SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Cho phép ứng dụng ghi vào bộ lưu trữ USB."</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 67a78c6..70689e8 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -511,14 +511,10 @@
<string name="permdesc_readDictionary" msgid="8977815988329283705">"允許應用程式讀取使用者儲存在使用者字典內的任何私人字詞、名稱和詞組。"</string>
<string name="permlab_writeDictionary" msgid="2296383164914812772">"寫入使用者定義的字典"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"允許應用程式將新字詞寫入使用者的字典。"</string>
- <!-- no translation found for permlab_sdcardRead (4086221374639183281) -->
- <skip />
- <!-- no translation found for permlab_sdcardRead (8537875151845139539) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (1055302898999352339) -->
- <skip />
- <!-- no translation found for permdesc_sdcardRead (7947792373570683542) -->
- <skip />
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"讀取 USB 儲存裝置的內容"</string>
+ <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"讀取 SD 卡的內容"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"允許應用程式讀取 USB 儲存裝置的內容。"</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"允許應用程式讀取 SD 卡的內容。"</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"修改/刪除 USB 儲存裝置內容"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"修改/刪除 SD 卡的內容"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"允許應用程式寫入 USB 儲存裝置。"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index e7e6f6d..5411336 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -335,18 +335,12 @@
<string name="permlab_writeContacts" msgid="644616215860933284">"bhala idatha yothintana naye"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Ivumela insiza ukuthi iguqule imininingwane yekheli lokuxhumana eligcinwe ekhompyutheni yakho yepeni. Izinsiza ezinobungozi zingasebenzisa lokhu ukususa noma ziguqule ulwazi lwakho lokuxhuana."</string>
<string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Ivumela insiza ukuthi iguqule imininingwane yekheli lokuxhumana eligcinwe ocingweni lwakho. Izinsiza ezinobungozi zingasebenzisa lokhu ukususa noma ziguqule ulwazi lwakho lokuxhuana."</string>
- <!-- no translation found for permlab_readCallLog (3478133184624102739) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3995157599976515002) -->
- <skip />
- <!-- no translation found for permdesc_readCallLog (3452017559804750758) -->
- <skip />
- <!-- no translation found for permlab_writeCallLog (8552045664743499354) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (6661806062274119245) -->
- <skip />
- <!-- no translation found for permdesc_writeCallLog (683941736352787842) -->
- <skip />
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"funda ilogi yekholi"</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Ivumela uhlelo lokusebenza ukufunda irekhodi lwamakholi lethubhulethi yakho, kufaka phakathi idatha mayelana namakholi angenayo naphumayo. Izinhlelo zikusebenza ezingalungile zingasebenzisa lokhu ukuthumela idatha kwabanye abantu."</string>
+ <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Ivumela uhlelo lokusebenza ukufunda irekhodi lwamakholi wakho, kufaka phakathi idatha mayelana namakholi aphumayo nangenayo. Izinhlelo zokusebenza ezingalungile zingasebenzisa lokhu ukuthumela idatha kwabanye abantu."</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"bhala irekhodi lwamakholi"</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Ivumela uhlelo lokusebenza ukushintsha ilogi yekholi yethebulethi yakho, kufaka phakathi idatha mayelana namakholi angenayo naphumayo. Izinhlelo zikusebenza ezingalungile zingasebenzisa lokhu ukusula noma ukushintsha irekhodi lwamakholi wakho."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Ivumela uhlelo lokusebenza ukushintsha irekhodi lwamakholi lefoni yakho, kufaka phakathi idatha mayelana namakholi angenayo naphumayo. Izinhlelo zikusebenza ezingalungile zingasebenzisa lokhu ukusula noma ukushintsha irekhodi lwamakholi wakho."</string>
<string name="permlab_readProfile" msgid="6824681438529842282">"bhala imininingo yemininingwane yakho"</string>
<string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Ivumela insiza ukuthi ifunde ulwazi lomuntu lwephrofayli olugcinwe edivayisini yakho njengegama lakho kanye nemininingwane yokuxhumana nawe. Lokhu kuchaza ukuthi izinsa ingakuhlonza bese ithumelela abanye imininingwane yephrofayili yakho."</string>
<string name="permlab_writeProfile" msgid="4679878325177177400">"bhala imininingwane yemininingo yakho"</string>
@@ -513,8 +507,8 @@
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Ivumela insiza ukuthi ibhale amagama amasha esichazinimazwi."</string>
<string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"funda okuqukethwe kwesitoreji se-USB"</string>
<string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"funda okuqukethwe kwekhadi le-SD"</string>
- <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Ivumela uhlelo lokusebenza ukufunda okuqukethwe kwesitoreji se-USB."</string>
- <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Ivumela uhlelo lokusebenza kufunda okuqukethwe kwekhadi le-SD."</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Ivumela uhlelo lokusebenza ukufunda okuqukethwe kokugciniwe okufinyeleleka nge-USB."</string>
+ <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Ivumela uhlelo lokusebenza ukufunda okuqukethwe kwekhadi le-SD."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"guqula/susa okuqukethwe isitoreji se-USB"</string>
<string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"guqula/susa okuqukethwe kwekhadi le-SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Ivumela insiza ukuthi ibhalele ekulondolozweni kwe-USB."</string>
diff --git a/docs/html/guide/developing/device.jd b/docs/html/guide/developing/device.jd
index d22dca1..d91551a 100644
--- a/docs/html/guide/developing/device.jd
+++ b/docs/html/guide/developing/device.jd
@@ -134,11 +134,11 @@
</tr>
<tr>
<td>ASUS</td>
- <td><code>0B05</code></td>
+ <td><code>0b05</code></td>
</tr>
<tr>
<td>Dell</td>
- <td><code>413C</code></td>
+ <td><code>413c</code></td>
</tr>
<tr>
<td>Foxconn</td>
@@ -146,35 +146,35 @@
</tr>
<tr>
<td>Fujitsu</td>
- <td><code>04C5</code></td>
+ <td><code>04c5</code></td>
</tr>
<tr>
<td>Fujitsu Toshiba</td>
- <td><code>04C5</code></td>
+ <td><code>04c5</code></td>
</tr>
<tr>
<td>Garmin-Asus</td>
- <td><code>091E</code></td>
+ <td><code>091e</code></td>
</tr>
<tr>
<td>Google</td>
- <td><code>18D1</code></td>
+ <td><code>18d1</code></td>
</tr>
<tr>
<td>Hisense</td>
- <td><code>109B</code></td>
+ <td><code>109b</code></td>
</tr>
<tr>
<td>HTC</td>
- <td><code>0BB4</code></td>
+ <td><code>0bb4</code></td>
</tr>
<tr>
<td>Huawei</td>
- <td><code>12D1</code></td>
+ <td><code>12d1</code></td>
</tr>
<tr>
<td>K-Touch</td>
- <td><code>24E3</code></td>
+ <td><code>24e3</code></td>
</tr>
<tr>
<td>KT Tech</td>
@@ -185,8 +185,8 @@
<td><code>0482</code></td>
</tr>
<tr>
- <td>Lenevo</td>
- <td><code>17EF</code></td>
+ <td>Lenovo</td>
+ <td><code>17ef</code></td>
</tr>
<tr>
<td>LG</td>
@@ -194,7 +194,7 @@
</tr>
<tr>
<td>Motorola</td>
- <td><code>22B8</code></td>
+ <td><code>22b8</code></td>
</tr>
<tr>
<td>NEC</td>
@@ -214,11 +214,11 @@
</tr>
<tr>
<td>Pantech</td>
- <td><code>10A9</code></td>
+ <td><code>10a9</code></td>
</tr>
<tr>
<td>Pegatron</td>
- <td><code>1D4D</code></td>
+ <td><code>1d4d</code></td>
</tr>
<tr>
<td>Philips</td>
@@ -226,31 +226,31 @@
</tr>
<tr>
<td>PMC-Sierra</td>
- <td><code>04DA</code></td>
+ <td><code>04da</code></td>
</tr>
<tr>
<td>Qualcomm</td>
- <td><code>05C6</code></td>
+ <td><code>05c6</code></td>
</tr>
<tr>
<td>SK Telesys</td>
- <td><code>1F53</code></td>
+ <td><code>1f53</code></td>
</tr>
<tr>
<td>Samsung</td>
- <td><code>04E8</code></td>
+ <td><code>04e8</code></td>
</tr>
<tr>
<td>Sharp</td>
- <td><code>04DD</code></td>
+ <td><code>04dd</code></td>
</tr>
<tr>
<td>Sony</td>
- <td><code>054C</code></td>
+ <td><code>054c</code></td>
</tr>
<tr>
<td>Sony Ericsson</td>
- <td><code>0FCE</code></td>
+ <td><code>0fce</code></td>
</tr>
<tr>
<td>Teleepoch</td>
@@ -262,6 +262,6 @@
</tr>
<tr>
<td>ZTE</td>
- <td><code>19D2</code></td>
+ <td><code>19d2</code></td>
</tr>
</table>
diff --git a/docs/html/guide/developing/devices/emulator.jd b/docs/html/guide/developing/devices/emulator.jd
index c217790..5edd1f5 100644
--- a/docs/html/guide/developing/devices/emulator.jd
+++ b/docs/html/guide/developing/devices/emulator.jd
@@ -9,28 +9,58 @@
<h2>In this document</h2>
<ol>
<li><a href="#overview">Overview</a></li>
+ <li><a href="#avds">Android Virtual Devices and the Emulator</a></li>
<li><a href="#starting">Starting and Stopping the Emulator</a></li>
- <li><a href="#starting">Android Virtual Devices and the Emulator</a></li>
- <li><a href="#controlling">Controlling the Emulator</a></li>
- <li><a href="#startup-options">Emulator Startup Options</a></li>
+ <li><a href="#apps">Installing Applications on the Emulator</a></li>
+ <li><a href="#acceleration">Using Hardware Acceleration</a>
+ <ol>
+ <li><a href="#accel-graphics">Configuring Graphics Acceleration</a></li>
+ <li><a href="#accel-vm">Configuring Virtual Machine Acceleration</a></li>
+ </ol>
+ </li>
+ <li><a href="#sdcard">SD Card Emulation</a>
+ <ol>
+ <li><a href="#sdcard-creating">Creating an SD card image</a></li>
+ <li><a href="#sdcard-files">Copying files to an SD card image</a></li>
+ <li><a href="#sdcard-loading">Loading an SD card image</a></li>
+ </ol>
+ </li>
<li><a href="#diskimages">Working with Emulator Disk Images</a>
<ol>
- <li><a href="#defaultimages">Default Images</a></li>
- <li><a href="#runtimeimages">Runtime Images: User Data and SD Card</a></li>
- <li><a href="#temporaryimages">Temporary Images</a></li>
+ <li><a href="#defaultimages">Default image files</a></li>
+ <li><a href="#runtimeimages">Runtime images: user data and SD card</a></li>
+ <li><a href="#temporaryimages">Temporary images</a></li>
</ol>
</li>
<li><a href="#emulatornetworking">Emulator Networking</a>
<ol>
<li><a href="#networkaddresses">Network Address Space</a></li>
<li><a href="#networkinglimitations">Local Networking Limitations</a></li>
- <li><a href="#redirections">Using Network Redirections</a></li>
+ <li><a href="#redirection">Using Network Redirection</a></li>
<li><a href="#dns">Configuring the Emulator's DNS Settings</a></li>
<li><a href="#proxy">Using the Emulator with a Proxy</a></li>
<li><a href="#connecting">Interconnecting Emulator Instances</a></li>
<li><a href="#calling">Sending a Voice Call or SMS to Another Emulator Instance</a></li>
</ol>
</li>
+ <li><a href="#console">Using the Emulator Console</a>
+ <ol>
+ <li><a href="#portredirection">Port Redirection</a></li>
+ <li><a href="#geo">Geo Location Provider Emulation</a></li>
+ <li><a href="#events">Hardware Events Emulation</a></li>
+ <li><a href="#power">Device Power Characteristics</a></li>
+ <li><a href="#netstatus">Network Status</a></li>
+ <li><a href="#netdelay">Network Delay Emulation</a></li>
+ <li><a href="#netspeed">Network Speed Emulation</a></li>
+ <li><a href="#telephony">Telephony Emulation</a></li>
+ <li><a href="#sms">SMS Emulation</a></li>
+ <li><a href="#vm">VM State</a></li>
+ <li><a href="#window">Emulator Window</a></li>
+ <li><a href="#terminating">Terminating an Emulator Instance</a></li>
+ </ol>
+ </li>
+ <li><a href="#limitations">Emulator Limitations</a></li>
+ <li><a href="#troubleshooting">Troubleshooting Emulator Problems</a></li>
</ol>
<h2>See also</h2>
@@ -44,7 +74,7 @@
<img src="{@docRoot}images/emulator-wvga800l.png" alt="Image of the Android Emulator"
width="367" height="349" style="margin-left:2em;float:right;"/>
<p>The Android SDK includes a virtual mobile device emulator
-that runs on your computer. The emulator lets you prototype, develop, and test
+that runs on your computer. The emulator lets you prototype, develop and test
Android applications without using a physical device. </p>
<p>The Android emulator mimics all of the hardware and software features
@@ -52,7 +82,7 @@
calls. It provides a variety of navigation and control keys, which you can "press"
using your mouse or keyboard to generate events for your application. It also
provides a screen in which your application is displayed, together with any other
-Android applications running. </p>
+active Android applications. </p>
<p>To let you model and test your application more easily, the emulator utilizes
Android Virtual Device (AVD) configurations. AVDs let you define certain hardware
@@ -62,16 +92,16 @@
applications, access the network, play audio and video, store and retrieve data,
notify the user, and render graphical transitions and themes. </p>
-<p>The emulator also includes a variety of debug capabilities, such as a console
-from which you can log kernel output, simulate application interrupts (such as
-arriving SMS messages or phone calls), and simulate latency effects and dropouts
-on the data channel.</p>
+<p>The emulator also includes a variety of debug capabilities, such as a console
+from which you can log kernel output, simulate application interrupts (such as
+arriving SMS messages or phone calls), and simulate latency effects and dropouts
+on the data network.</p>
-<h2 id="overview">Overview</h2>
+<h2 id="overview">Overview</h2>
-<p>The Android emulator is a QEMU-based application that provides a virtual ARM
+<p>The Android emulator is an application that provides a virtual
mobile device on which you can run your Android applications. It runs a full
Android system stack, down to the kernel level, that includes a set of
preinstalled applications (such as the dialer) that you can access from your
@@ -81,16 +111,15 @@
you can use a variety of commands and options to control its behavior.
</p>
-<p>The Android system image distributed in the SDK contains ARM machine code for
-the Android Linux kernel, the native libraries, the Dalvik VM, and the various
-Android package files (such as for for the Android framework and preinstalled
-applications). The emulator's QEMU layers provide dynamic binary translation of
-the ARM machine code to the OS and processor architecture of your development
-machine. </p>
+<p>The Android system images available through the Android SDK Manager contain
+code for the Android Linux kernel, the native libraries, the Dalvik VM, and the
+various Android packages (such as the Android framework and preinstalled
+applications). The emulator provides dynamic binary translation of device
+machine code to the OS and processor architecture of your development
+machine.</p>
-<p>Adding custom capabilities to the underlying QEMU services, the Android
-emulator supports many hardware features likely to be found on mobile devices,
-including: </p>
+<p>The Android emulator supports many hardware features likely to be found on
+mobile devices, including: </p>
<ul>
<li>An ARMv5 CPU and the corresponding memory-management unit (MMU)</li>
@@ -101,41 +130,37 @@
<li>Flash memory partitions (emulated through disk image files on the
development machine)</li>
<li>A GSM modem, including a simulated SIM Card</li>
+ <li>A camera, using a webcam connected to your development computer.</li>
+ <li>Sensors like an accelerometer, using data from a USB-connected Android device.</li>
</ul>
-<p>The sections below provide more information about the emulator and how to use
-it for developing Android applications.</p>
+<p>The following sections describe the emulator and its use for development of Android
+applications in more detail.</p>
-<a name="avds"></a>
-
-<h2>Android Virtual Devices and the Emulator</h2>
+<h2 id="avds">Android Virtual Devices and the Emulator</h2>
<p>To use the emulator, you first must create one or more AVD configurations. In each
configuration, you specify an Android platform to run in the emulator and the set of hardware
options and emulator skin you want to use. Then, when you launch the emulator, you specify
the AVD configuration that you want to load. </p>
-<p>To specify the AVD you want to load when starting the emulator, you use the
-<code>-avd</code> argument, as shown in the previous section. </p>
-
<p>Each AVD functions as an independent device, with its own private storage for
user data, SD card, and so on. When you launch the emulator with an AVD configuration,
it automatically loads the user data and SD card data from the AVD directory. By default,
the emulator stores the user data, SD card data, and cache in the AVD directory.</p>
<p>To create and manage AVDs you use the AVD Manager UI or the <code>android</code> tool
-that is included in the SDK.
+that is included in the SDK.
For complete information about how to set up AVDs, see <a
href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a>.</p>
-<a name="starting"></a>
-<h2>Starting and Stopping the Emulator</h2>
+<h2 id="starting">Starting and Stopping the Emulator</h2>
<p>During development and testing of your application, you install and run your
application in the Android emulator. You can launch the emulator as a standalone
-application, from a command line, or you can use it as part of your Eclipse
+application from a command line, or you can run it from within your Eclipse
development environment. In either case, you specify the AVD configuration to
load and any startup options you want to use, as described in this document.
</p>
@@ -144,20 +169,24 @@
depending on your needs, you can start multiple emulator instances and run your
application in more than one emulated device. You can use the emulator's
built-in commands to simulate GSM phone calling or SMS between emulator
-instances, and you can set up network redirections that allow emulators to send
+instances, and you can set up network redirection that allows emulators to send
data to one another. For more information, see <a href="#telephony">Telephony
Emulation</a>, <a href="#sms">SMS Emulation</a>, and
<a href="#emulatornetworking">Emulator Networking</a></p>
-<p>To start an instance of the emulator from the command line, change to the
+<p>To start an instance of the emulator from the command line, navigate to the
<code>tools/</code> folder of the SDK. Enter <code>emulator</code> command
like this: </p>
-<pre>emulator -avd <avd_name></pre>
+<pre>emulator -avd <avd_name> [<options>]</pre>
-<p>This initializes the emulator and loads an AVD configuration (see the next
-section for more information about AVDs). You will see the emulator window
-appear on your screen. </p>
+<p>This initializes the emulator, loads an AVD configuration and displays the emulator
+window. For more information about command line options for the emulator, see the
+<a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a> tool reference.</p>
+
+<p class="note"><strong>Note:</strong> You can run multiple
+instances of the emulator concurrently, each with its own AVD configuration and
+storage area for user data, SD card, and so on.</p>
<p>If you are working in Eclipse, the ADT plugin for Eclipse installs your
application and starts the emulator automatically, when you run or debug
@@ -171,585 +200,435 @@
<p>To stop an emulator instance, just close the emulator's window.</p>
<p>For a reference of the emulator's startup commands and keyboard mapping, see
-the <a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a> document.</p>
+the <a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a> tool
+reference.</p>
+<h2 id="apps">Installing Applications on the Emulator</h2>
+
+<p>If you don't have access to Eclipse or the ADT Plugin, you can install your application on the
+emulator using the <a href="{@docRoot}guide/developing/tools/adb.html#move">adb</a> utility. Before
+installing the application, you need to build and package it into an <code>.apk</code> as described
+in <a href="{@docRoot}guide/developing/building/index.html">Building and
+Running Apps</a>. Once the application is installed, you can start the emulator from the command
+line as described previously, using any startup options necessary.
+When the emulator is running, you can also connect to the emulator instance's
+<a href="#console">console</a> to issue commands as needed.</p>
+
+<p>As you update your code, you periodically package and install it on the emulator.
+The emulator preserves the application and its state data across restarts,
+in a user-data disk partition. To ensure that the application runs properly
+as you update it, you may need to delete the emulator's user-data partition.
+To do so, start the emulator with the <code>-wipe-data</code> option.
+For more information about the user-data partition and other emulator storage,
+see <a href="#diskimages">Working with Emulator Disk Images</a>.</p>
+<h2 id="acceleration">Using Hardware Acceleration</h2>
-<a name="controlling"></a>
+<p>In order to make the Android emulator run faster and be more responsive, you can configure it to
+take advantage of hardware acceleration, using a combination of configuration options, specific
+Android system images and hardware drivers.</p>
-<h2>Controlling the Emulator</h2>
+<h3 id="accel-graphics">Configuring Graphics Acceleration</h3>
-<p>You can use emulator <a href="#startup-options">startup options</a> and <a
-href="#console">console commands</a> to control the behaviors and
-characteristics of the emulated environment itself.
+<p class="caution"><strong>Caution:</strong> As of SDK Tools Revision 17, the graphics
+acceleration feature for the emulator is experimental; be alert for incompatibilities and
+errors when using this feature. </p>
+
+<p>Graphics acceleration for the emulator takes advantage of your development computer's graphics
+hardware, specifically its graphics processing unit (GPU), to make screen drawing faster. To use
+the graphics acceleration feature, you must have the following versions of the Android development
+tools installed:</p>
+
+<ul>
+ <li>Android SDK Tools, Revision 17 or higher</li>
+ <li>Android SDK Platform API 15, Revision 3 or higher</li>
+</ul>
+
+<p>Use the <a href="{@docRoot}sdk/installing.html#AddingComponents">Android SDK
+Manager</a> to install these components:</p>
+
+<p class="note"><strong>Note:</strong> Not all applications are compatible with graphics hardware
+acceleration. In particular, the Browser application and applications using the {@link
+android.webkit.WebView} component are not compatible with graphics acceleration.</p>
+
+<p>To configure an AVD to use graphics acceleration:</p>
+
+<ol>
+ <li>Make sure you have the required SDK components installed (listed above).</li>
+ <li>Start the AVD Manager and create a new AVD with the <strong>Target</strong> value of
+<strong>Android 4.0.3 (API Level 15)</strong>, revision 3 or higher.</li>
+ <li>If you want to have graphics acceleration enabled by default for this AVD, in the
+<strong>Hardware</strong> section, click <strong>New</strong>, select <strong>GPU emulation</strong>
+and set the value to <strong>Yes</strong>.
+ <p class="note"><strong>Note:</strong> You can also enable graphics acceleration when you
+start an emulator using command line options as describe in the next section.</p>
+ </li>
+ <li>Name the AVD instance and select any other configuration options.
+ <p class="caution"><strong>Caution:</strong> Do not select the <strong>Snapshot: Enabled</strong>
+option. Snapshots are not supported for emulators with graphics acceleration enabled.</p>
+ </li>
+ <li>Click <strong>Create AVD</strong> to save the emulator configuration.</li>
+</ol>
+
+<p>If you set <strong>GPU emulation</strong> to <strong>Yes</strong> for your AVD, then graphics
+acceleration is automatically enabled when you run it. If you did not enable <strong>GPU
+emulation</strong> when you created the AVD, you can still enable it at runtime.</p>
+
+<p>To enable graphics acceleration at runtime for an AVD:</p>
+
+<ul>
+ <li>If you are running the emulator from the command line, just include the {@code -gpu on}
+option:
+<pre>emulator -avd <avd_name> -gpu on</pre>
+ <p class="note"><strong>Note:</strong> You must specify an AVD configuration that uses
+Android 4.0.3 (API Level 15, revision 3) or higher system image target. Graphics acceleration is not
+available for earlier system images.</p>
+ </li>
+ <li>If you are running the emulator from Eclipse, run your Android application using an AVD with
+the {@code -gpu on} option enabled:
+ <ol>
+ <li>In Eclipse, click your Android project folder and then select <strong>Run > Run
+Configurations...</strong></li>
+ <li>In the left panel of the <strong>Run Configurations</strong> dialog, select your Android
+project run configuration or create a new configuration.</li>
+ <li>Click the <strong>Target</strong> tab.</li>
+ <li>Select the AVD you created in the previous procedure.</li>
+ <li>In the <strong>Additional Emulator Command Line Options</strong> field, enter:<br>
+ {@code -gpu on}</li>
+ <li>Run your Android project using this run configuration.</li>
+ </ol>
+ </li>
+</ul>
+
+
+<h3 id="accel-vm">Configuring Virtual Machine Acceleration</h2>
+
+<p class="caution"><strong>Caution:</strong> As of SDK Tools Revision 17, the virtual machine
+acceleration feature for the emulator is experimental; be alert for incompatibilities and errors
+when using this feature.</p>
+
+<p>Many modern CPUs provide extensions for running virtual machines (VMs) more efficiently. Taking
+advantage of these extensions with the Android emulator requires some additional configuration of
+your development system, but can significantly improve the execution speed. Before attempting to use
+this type of acceleration, you should first determine if your development system’s CPU supports one
+of the following virtualization extensions technologies:</p>
+
+<ul>
+ <li>Intel Virtualization Technology (VT, VT-x, vmx) extensions</li>
+ <li>AMD Virtualization (AMD-V, SVM) extensions (only supported for Linux)</li>
+</ul>
+
+<p>The specifications from the manufacturer of your CPU should indicate if it supports
+virtualization extensions. If your CPU does not support one of these virtualization technologies,
+then you cannot use virtual machine acceleration.</p>
+
+<p class="note"><strong>Note:</strong> Virtualization extensions are typically enabled through
+your computer's BIOS and are frequently turned off by default. Check the documentation for your
+system's motherboard to find out how to enable virtualization extensions.</p>
+
+<p>Once you have determined that your CPU supports virtualization extensions, make sure you can work
+within these additional requirements of running an emulator inside an accelerated virtual
+machine:</p>
+
+<ul>
+ <li><strong>x86 AVD Only</strong> - You must use an AVD that is uses an x86 system image target.
+AVDs that use ARM-based system images cannot be accelerated using the emulator configurations
+described here.</li>
+ <li><strong>Not Inside a VM</strong> - You cannot run a VM-accelerated emulator inside another
+virtual machine, such as a VirtualBox or VMWare-hosted virtual machine. You must run the emulator
+directly on your system hardware.</li>
+ <li><strong>Other VM Drivers</strong> - If you are running another virtualization technology on
+your system such as VirtualBox or VMWare, you may need to unload the driver for that virtual machine
+hosting software before running an accelerated emulator.</li>
+ <li><strong>OpenGL® Graphics</strong> - Emulation of OpenGL ES graphics may not perform at the
+same level as an actual device.</li>
+</ul>
+
+<p>To use virtual machine acceleration with the emulator, you need the following version of Android
+development tools. Use the <a href="{@docRoot}sdk/installing.html#AddingComponents">Android SDK
+Manager</a> to install these components:</p>
+
+<ul>
+ <li>Android SDK Tools, Revision 17 or higher</li>
+ <li>Android x86-based system image</li>
+</ul>
+
+<p>If your development environment meets all of the requirements for running a VM-accelerated
+emulator, you can use the AVD Manager to create an x86-based AVD configuration:</p>
+
+<ol>
+ <li>In the Android SDK Manager, make sure you have an x86-based <strong>System Image</strong>
+ installed for your target Android version. If you do not have an x86 <strong>System
+ Image</strong> installed, select one in the Android SDK Manager and install it.
+ <p class="note"><strong>Tip:</strong> System images are listed under each API Level in the SDK
+ Manager. An x86 system image may not be available for all API levels.</p>
+ </li>
+ <li>Start the AVD Manager and create a new AVD with an x86 value for the
+<strong>CPU/ABI</strong> field. You may need to select a specific <strong>Target</strong> value, or
+select a <strong>Target</strong> value and then select a specific <strong>CPU/ABI</strong>
+option.</li>
+ <li>Name the emulator instance and select any other configuration options.</li>
+ <li>Click <strong>Create AVD</strong> to save the emulator configuration.</li>
+</ol>
+
+<h4 id="vm-windows">Configuring VM Acceleration on Windows</h4>
+
+<p>Virtual machine acceleration for Windows requires the installation of the Intel Hardware
+Accelerated Execution Manager (Intel HAXM). The software requires an Intel CPU with
+Virtualization Technology (VT) support and one of the following operating systems:</p>
+
+<ul>
+ <li>Windows 7 (32/64-bit)</li>
+ <li>Windows Vista (32/64-bit)</li>
+ <li>Windows XP (32-bit only)</li>
+</ul>
+
+<p>To install the virtualization driver:</p>
+
+<ol>
+ <li>Start the Android SDK Manager, select <strong>Extras</strong> and then select <strong>Intel
+Hardware Accelerated Execution Manager</strong>.</li>
+ <li>After the download completes, execute {@code
+<sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe}.</li>
+ <li>Follow the on-screen instructions to complete installation.</li>
+ <li>After installation completes, confirm that the virtualization driver is operating correctly by
+opening a command prompt window and running the following command:
+ <pre>sc query intelhaxm</pre>
+ <p>You should see a status message including the following information:</p>
+<pre>
+SERVICE_NAME: intelhaxm
+ ...
+ STATE : 4 RUNNING
+ ...
+</pre>
+ </li>
+</ol>
+
+<p>To run an x86-based emulator with VM acceleration:</p>
+<ul>
+ <li>If you are running the emulator from the command line, just specify an x86-based AVD:
+<pre>emulator -avd <avd_name></pre>
+ <p class="note"><strong>Note:</strong> You must provide an x86-based AVD configuration
+name, otherwise VM acceleration will not be enabled.</p>
+ </li>
+ <li>If you are running the emulator from Eclipse, run your Android application with an x86-based
+AVD:
+ <ol>
+ <li>In Eclipse, click your Android project folder and then select <strong>Run > Run
+Configurations...</strong></li>
+ <li>In the left panel of the <strong>Run Configurations</strong> dialog, select your Android
+project run configuration or create a new configuration.</li>
+ <li>Click the <strong>Target</strong> tab.</li>
+ <li>Select the x86-based AVD you created previously.</li>
+ <li>Run your Android project using this run configuration.</li>
+ </ol>
+ </li>
+</ul>
+
+<p>You can adjust the amount of memory available to the Intel HAXM kernel extension by re-running
+its installer.</p>
+
+<p>You can stop using the virtualization driver by uninstalling it. Re-run the installer or use
+the Control Panel to remove the software.</p>
+
+
+<h4 id="vm-mac">Configuring VM Acceleration on Mac</h4>
+
+<p>Virtual machine acceleration on a Mac requires the installation of the Intel Hardware Accelerated
+Execution Manager (Intel HAXM) kernel extension to allow the Android emulator to make use of CPU
+virtualization extensions. The kernel extension is compatible with Mac OS X Snow Leopard (version
+10.6.0) and higher.</p>
+
+<p>To install the Intel HAXM kernel extension:</p>
+
+<ol>
+ <li>Start the Android SDK Manager, select <strong>Extras</strong> and then select <strong>Intel
+Hardware Accelerated Execution Manager</strong>.
+ <li>After the download completes, execute
+ {@code <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.dmg}.</li>
+ <li>Double click the <strong>IntelHAXM.mpkg</strong> icon to begin installation.</li>
+ <li>Follow the on-screen instructions to complete installation.</li>
+ <li>After installation completes, confirm that the new kernel extension is operating correctly by
+opening a terminal window and running the following command:
+ <pre>kextstat | grep intel</pre>
+ <p>You should see a status message containing the following extension name, indicating that the
+ kernel extension is loaded:</p>
+ <pre>com.intel.kext.intelhaxm</pre>
+ </li>
+</ol>
+
+<p>To run an x86-based emulator with VM acceleration:</p>
+<ul>
+ <li>If you are running the emulator from the command line, just specify an x86-based AVD:
+<pre>emulator -avd <avd_name></pre>
+ <p class="note"><strong>Note:</strong> You must provide an x86-based AVD configuration
+name, otherwise VM acceleration will not be enabled.</p>
+ </li>
+ <li>If you are running the emulator from Eclipse, run your Android application with an x86-based
+AVD:
+ <ol>
+ <li>In Eclipse, click your Android project folder and then select <strong>Run > Run
+Configurations...</strong></li>
+ <li>In the left panel of the <strong>Run Configurations</strong> dialog, select your Android
+project run configuration or create a new configuration.</li>
+ <li>Click the <strong>Target</strong> tab.</li>
+ <li>Select the x86-based AVD you created previously.</li>
+ <li>Run your Android project using this run configuration.</li>
+ </ol>
+ </li>
+</ul>
+
+<p>You can adjust the amount of memory available to the Intel HAXM kernel extension by re-running
+the installer.</p>
+
+<p>You can stop using the virtualization kernel driver by uninstalling it. Before removing it, shut
+down any running x86 emulators. To unload the virtualization kernel driver, run the following
+command in a terminal window:</p>
+
+<pre>sudo /System/Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh</pre>
+
+<h4 id="vm-linux">Configuring VM Acceleration on Linux</h4>
+
+<p>Linux-based systems support virtual machine acceleration through the KVM software package. Follow
+<a href="https://www.google.com/?q=kvm+installation">instructions for installing KVM</a> on your
+Linux system, and verify that KVM is enabled. In addition to following the installation
+instructions, be aware of these configuration requirements:</p>
+
+<ul>
+ <li>Running KVM requires specific user permissions, make sure you have sufficient permissions
+according to the KVM installation instructions.</li>
+ <li>If you use another virtualization technology in your Linux platform, unload its kernel driver
+before running the x86 emulator. For example, the VirtualBox driver program is {@code vboxdrv}.</li>
+</ul>
+
+<p>To run an x86-based emulator with VM acceleration:</p>
+
+<ul>
+ <li>If you are running the emulator from the command line, start the emulator with an x86-based
+AVD and include the KVM options:
+<pre>emulator -avd <avd_name> -qemu -m 512 -enable-kvm</pre>
+ <p class="note"><strong>Note:</strong> You must provide an x86-based AVD configuration
+name, otherwise VM acceleration will not be enabled.</p>
+ </li>
+ <li>If you are running the emulator from Eclipse, run your Android application with an x86-based
+AVD and include the KVM options:
+ <ol>
+ <li>In Eclipse, click your Android project folder and then select <strong>Run > Run
+Configurations...</strong></li>
+ <li>In the left panel of the <strong>Run Configurations</strong> dialog, select your Android
+project run configuration or create a new configuration.</li>
+ <li>Click the <strong>Target</strong> tab.</li>
+ <li>Select the x86-based AVD you created previously.</li>
+ <li>In the <strong>Additional Emulator Command Line Options</strong> field, enter:
+ <pre>-qemu -m 512 -enable-kvm</pre>
+ </li>
+ <li>Run your Android project using this run configuration.</li>
+ </ol>
+ </li>
+</ul>
+
+<p class="note"><strong>Important:</strong> When using the {@code -qemu} command line option, make sure
+it is the last parameter in your command. All subsequent options are interpreted as qemu-specific
+parameters.</p>
+
+
+<h2 id="sdcard">SD Card Emulation</h2>
+
+<p>You can create a disk image and then load it to the emulator at startup, to
+simulate the presence of a user's SD card in the device. To do this, you can specify
+an SD card image when you create an AVD, or you can use the mksdcard utility included
+in the SDK.</p>
+
+<p>The following sections describe how to create an SD card disk image, how to copy
+files to it, and how to load it in the emulator at startup. </p>
+
+<p>Note that you can only load a disk image at emulator startup. Similarly, you
+can not remove a simulated SD card from a running emulator. However, you can
+browse, send files to, and copy/remove files from a simulated SD card either
+with adb or the emulator. </p>
+
+<p>The emulator supports emulated SDHC cards, so you can create an SD card image
+of any size up to 128 gigabytes.</p>
+
+
+<h3 id="sdcard-creating">Creating an SD card image</h3>
+
+<p>There are several ways of creating an SD card image. The easiest way is to use the
+<strong>AVD Manager</strong> to create a new SD card by specifying a size when you create an AVD.
+You can also use the {@code android} command line tool when creating an AVD. Just add the
+<code>-c</code> option to your command: </p>
+
+<pre>android create avd -n <avd_name> -t <targetID> -c <size>[K|M]</pre>
+
+<p>The <code>-c</code> option can also be used to to specify a path to an SD card
+image for the new AVD. For more information, see <a
+href="{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing Virtual Devices
+from the Command Line</a>.
</p>
-<p>When the emulator is running, you can interact with the emulated mobile
-device just as you would an actual mobile device, except that you use your mouse
-pointer to "touch" the touchscreen and your keyboard keys to
-"press" the simulated device keys. </p>
+<p>You can also use the mksdcard tool, included in the SDK, to create a FAT32 disk
+image that you can load in the emulator at startup. You can access mksdcard in
+the tools/ directory of the SDK and create a disk image like this: </p>
-<p>The table below summarizes the mappings between the emulator keys and and
-the keys of your keyboard. </p>
+<pre>mksdcard <size> <file></pre>
-<table border="0" style="clear:left;">
- <tr>
- <th>Emulated Device Key </th>
- <th>Keyboard Key </th>
- </tr>
- <tr>
- <td>Home</td>
- <td>HOME</td>
- </tr>
- <tr>
- <td>Menu (left softkey)</td>
- <td>F2 <em>or</em> Page-up button</td>
- </tr>
- <tr>
- <td>Star (right softkey)</td>
- <td>Shift-F2 <em>or </em>Page Down</td>
- </tr>
- <tr>
- <td>Back</td>
- <td>ESC</td>
- </tr>
- <tr>
- <td>Call/dial button </td>
- <td>F3</td>
- </tr>
- <tr>
- <td>Hangup/end call button</td>
- <td>F4</td>
- </tr>
- <tr>
- <td>Search</td>
- <td>F5 </td>
- </tr>
- <tr>
- <td>Power button</td>
- <td>F7 </td>
- </tr>
- <tr>
- <td>Audio volume up button</td>
- <td>KEYPAD_PLUS, Ctrl-5</td>
- </tr>
+<p>For example:</p>
- <tr>
- <td>Audio volume down button</td>
- <td>KEYPAD_MINUS, Ctrl-F6</td>
- </tr>
- <tr>
- <td>Camera button</td>
- <td>Ctrl-KEYPAD_5, Ctrl-F3</td>
- </tr>
- <tr>
- <td>Switch to previous layout orientation (for example, portrait, landscape)</td>
- <td>KEYPAD_7, Ctrl-F11</td>
- </tr>
- <tr>
- <td>Switch to next layout orientation (for example, portrait, landscape)</td>
- <td>KEYPAD_9, Ctrl-F12</td>
- </tr>
- <tr>
- <td>Toggle cell networking on/off</td>
- <td>F8</td>
- </tr>
- <tr>
- <td>Toggle code profiling</td>
- <td>F9 (only with <code>-trace</code> startup option)</td>
- </tr>
- <tr>
- <td>Toggle fullscreen mode</td>
- <td>Alt-Enter</td>
- </tr>
- <tr>
- <td>Toggle trackball mode</td>
- <td>F6</td>
- </tr>
- <tr>
- <td>Enter trackball mode temporarily (while key is pressed)</td>
- <td>Delete</td>
- </tr>
- <tr>
- <td>DPad left/up/right/down</td>
- <td>KEYPAD_4/8/6/2</td>
- </tr>
- <tr>
- <td>DPad center click</td>
- <td>KEYPAD_5</td>
- </tr>
- <tr>
- <td>Onion alpha increase/decrease</td>
- <td>KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)</td>
- </tr>
-</table>
+<pre>mksdcard 1024M sdcard1.iso</pre>
-<p>Note that, to use keypad keys, you must first disable NumLock on your development computer. </p>
-
-<h2 id="emulator">Emulator Startup Options</h2>
-
-<p>The emulator supports a variety of options that you can specify
-when launching the emulator, to control its appearance or behavior.
-Here's the command-line usage for launching the emulator with options: </p>
-
-<pre>emulator -avd <avd_name> [-<option> [<value>]] ... [-<qemu args>]</pre>
-
-<p>The table below summarizes the available options.</p>
-
-<table>
-<tr>
- <th width="10%" >Category</th>
- <th width="20%" >Option</th>
- <th width="30%" >Description</th>
- <th width="40%" >Comments</th>
-</tr>
-
-<tr>
- <td rowspan="9">Help</td>
- <td><code>-help</code></td>
- <td>Print a list of all emulator options.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-all</code></td>
- <td>Print help for all startup options.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-<option></code></td>
- <td>Print help for a specific startup option.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-debug-tags</code></td>
- <td>Print a list of all tags for <code>-debug <tags></code>.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-disk-images</code></td>
- <td>Print help for using emulator disk images.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-environment</code></td>
- <td>Print help for emulator environment variables.</td>
- <td> </td>
-</tr><tr>
- <td><code>-help-keys</code></td>
- <td>Print the current mapping of keys.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-keyset-file</code></td>
- <td>Print help for defining a custom key mappings file.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-virtual-device</code></td>
- <td>Print help for Android Virtual Device usage.</td>
- <td> </td>
-</tr>
-<tr>
- <td>AVD</td>
- <td><code>-avd <avd_name></code> or <br>
- <code>@<avd_name></code></td>
- <td><strong>Required</strong>. Specifies the AVD to load for this emulator
- instance.</td>
- <td>You must create an AVD configuration before launching the emulator. For
- information, see <a href="{@docRoot}guide/developing/devices/managing-avds.html">Managing
- Virtual Devices with AVD Manager</a>.</td>
-<tr>
- <td rowspan="7">Disk Images</td>
- <td><code>-cache <filepath></code></td>
- <td>Use <filepath> as the working cache partition image. </td>
- <td>Optionally, you can specify a path relative to the current working directory.
- If no cache file is specified, the emulator's default behavior is to use a temporary file instead.
- <p>For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td></tr>
-<tr>
- <td><code>-data <filepath></code></td>
- <td>Use <filepath> as the working user-data disk image. </td>
- <td>Optionally, you can specify a path relative to the current working directory.
- If <code>-data</code> is not used, the emulator looks for a file named "userdata-qemu.img"
- in the storage area of the AVD being used (see <code>-avd</code>).
-</td></tr>
-<!--
-<tr>
- <td><code>-datadir <dir></code></td>
- <td>Search for the user-data disk image specified in <code>-data</code> in <dir></td>
- <td><code><dir></code> is a path relative to the current working directory.
-
-<p>If you do not specify <code>-datadir</code>, the emulator looks for the user-data image
-in the storage area of the AVD being used (see <code>-avd</code>)</p><p>For more information
-on disk images, use <code>-help-disk-images</code>.</p>
-</td></tr>
--->
-<!--
-<tr>
- <td><code>-image <filepath></code></td>
- <td>Use <filepath> as the system image.</td>
- <td>Optionally, you can specify a path relative to the current working directory.
- Default is <system>/system.img.</td>
-</tr>
--->
-<tr>
- <td><code>-initdata <filepath></code></td>
- <td>When resetting the user-data image (through <code>-wipe-data</code>), copy the contents
- of this file to the new user-data disk image. By default, the emulator copies the <code><system>/userdata.img</code>.</td>
- <td>Optionally, you can specify a path relative to the current working directory. See also <code>-wipe-data</code>.
- <p>For more information on disk images, use <code>-help-disk-images</code>.</p></td>
-</tr>
-<!--
-<tr>
- <td><code>-kernel <filepath></code></td>
- <td>Use <filepath> as the emulated kernel.</td>
- <td>Optionally, you can specify a path relative to the current working directory. </td>
-</tr>
--->
-<tr>
- <td><code>-nocache</code></td>
- <td>Start the emulator without a cache partition.</td>
- <td>See also <code>-cache <file></code>.</td>
-</tr>
-<tr>
- <td><code>-ramdisk <filepath></code></td>
- <td>Use <filepath> as the ramdisk image.</td>
- <td>Default value is <code><system>/ramdisk.img</code>.
- <p>Optionally, you can specify a path relative to the current working directory.
- For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td>
-</tr>
-<tr>
- <td><code>-sdcard <filepath></code></td>
- <td>Use <file> as the SD card image.</td>
- <td>Default value is <code><system>/sdcard.img</code>.
- <p>Optionally, you can specify a path relative to the current working directory. For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td>
-</tr>
-<!--
-<tr>
- <td><code>-system <dirpath></code></td>
- <td>Search for system, ramdisk and user data images in <dir>.</td>
- <td><code><dir></code> is a directory path relative to the current
- working directory.</td>
-</tr>
--->
-<tr>
- <td><code>-wipe-data</code></td>
- <td>Reset the current user-data disk image (that is, the file specified by <code>-datadir</code> and
- <code>-data</code>, or the default file). The emulator deletes all data from the user data image file,
- then copies the contents of the file at <code>-inidata</code> data to the image file before starting.
- </td>
- <td>See also <code>-initdata</code>.
- <p>For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td>
-</tr>
-<tr>
- <td rowspan="9">Debug</td>
- <td><code>-debug <tags></code></td>
- <td>Enable/disable debug messages for the specified debug tags.</td>
- <td><code><tags></code> is a space/comma/column-separated list of debug component names.
- Use <code>-help-debug-tags</code> to print a list of debug component names that you can use. </td>
-</tr>
-<tr>
- <td><code>-debug-<tag></code></td>
- <td>Enable/disable debug messages for the specified debug tag.</td>
- <td rowspan="2">Use <code>-help-debug-tags</code> to print a list of debug component names that you can use in <code><tag></code>. </td>
-</tr>
-<tr>
- <td><code>-debug-no-<tag></code></td>
- <td>Disable debug messages for the specified debug tag.</td>
-</tr>
-<tr>
- <td><code>-logcat <logtags></code></td>
- <td>Enable logcat output with given tags.</td>
- <td>If the environment variable ANDROID_LOG_TAGS is defined and not
- empty, its value will be used to enable logcat output by default.</td>
-</tr>
-<tr>
- <td><code>-shell</code></td>
- <td>Create a root shell console on the current terminal.</td>
- <td>You can use this command even if the adb daemon in the emulated system is broken.
- Pressing Ctrl-c from the shell stops the emulator instead of the shell.</td>
-</tr>
-<tr>
- <td><code>-shell-serial <device></code></td>
- <td>Enable the root shell (as in <code>-shell</code> and specify the QEMU character
- device to use for communication with the shell.</td>
- <td><device> must be a QEMU device type. See the documentation for '-serial <em>dev</em>' at
- <a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>
- for a list of device types.
-
-<p>Here are some examples: </p>
-<ul>
- <li><code>-shell-serial stdio</code> is identical to <code>-shell</code></li>
- <li><code>-shell-serial tcp::4444,server,nowait</code> lets you communicate with the shell over TCP port 4444</li>
- <li><code>-shell-serial fdpair:3:6</code> lets a parent process communicate with the shell using fds 3 (in) and 6 (out)</li>
- <li><code>-shell-serial fdpair:0:1</code> uses the normal stdin and stdout fds, except that QEMU won't tty-cook the data.</li>
- </ul>
-</td>
-</tr>
-<tr>
- <td><code>-show-kernel <name></code></td>
- <td>Display kernel messages.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-trace <name></code></td>
- <td>Enable code profiling (press F9 to start), written to a specified file.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-verbose</code></td>
- <td>Enable verbose output.</td>
- <td>Equivalent to <code>-debug-init</code>.
-<p>You can define the default verbose output options used by emulator instances in the Android environment variable
-ANDROID_VERBOSE. Define the options you want to use in a comma-delimited list, specifying only the stem of each option:
-<code>-debug-<tags>.</code> </p>
-<p>Here's an example showing ANDROID_VERBOSE defined with the <code>-debug-init</code> and <code>-debug-modem</code> options:
-<p><code>ANDROID_VERBOSE=init,modem</code></p>
-<p>For more information about debug tags, use <code><-help-debug-tags></code>.</p>
-</td>
-</tr>
-<tr>
- <td rowspan="6">Media</td>
- <td><code>-audio <backend></code></td>
- <td>Use the specified audio backend.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-audio-in <backend></code></td>
- <td>Use the specified audio-input backend.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-audio-out <backend></code></td>
- <td>Use the specified audio-output backend.</td>
- <td> </td>
-</tr>
-<!--<tr>
- <td><code>-mic <device or file></code></td>
- <td>Use device or WAV file for audio input.</td>
- <td> </td>
-</tr>
--->
-<tr>
- <td><code>-noaudio</code></td>
- <td>Disable audio support in the current emulator instance.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-radio <device></code></td>
- <td>Redirect radio modem interface to a host character device.</td>
- <td> </td></tr>
-<tr>
- <td><code>-useaudio</code></td>
- <td>Enable audio support in the current emulator instance.</td>
- <td>Enabled by default. </td>
-</tr>
-
-<tr>
- <td rowspan="7">Network</td>
- <td><code>-dns-server <servers></code></td>
- <td>Use the specified DNS server(s). </td>
- <td>The value of <code><servers></code> must be a comma-separated list of up to 4 DNS server names or
- IP addresses.</td>
-</tr>
-<tr>
- <td><code>-http-proxy <proxy></code></td>
- <td>Make all TCP connections through a specified HTTP/HTTPS proxy</td>
- <td>The value of <code><proxy></code> can be one of the following:<br>
- <code>http://<server>:<port></code><br>
- <code>http://<username>:<password>@<server>:<port></code>
- <p>The <code>http://</code> prefix can be omitted. If the <code>-http-proxy <proxy></code> command is not supplied,
- the emulator looks up the <code>http_proxy</code> environment variable and automatically uses any value matching
- the <code><proxy></code> format described above.</p></td>
-</tr>
-<tr>
- <td><code>-netdelay <delay></code></td>
- <td>Set network latency emulation to <delay>.</td>
- <td>Default value is <code>none</code>. See the table in <a href="#netdelay">Network Delay Emulation</a> for
- supported <code><delay></code> values. </td>
-</tr>
-<tr>
- <td><code>-netfast</code></td>
- <td>Shortcut for <code>-netspeed full -netdelay none</code></td>
- <td> </td></tr>
-<tr>
- <td><code>-netspeed <speed></code></td>
- <td>Set network speed emulation to <speed>.</td>
- <td>Default value is <code>full</code>. See the table in <a href="#netspeed">Network Speed Emulation</a> for
- supported <code><speed></code> values. </td>
-</tr>
-<tr>
- <td><code>-port <port></code></td>
- <td>Set the console port number for this emulator instance to <code><port></code>.</td>
- <td>The console port number must be an even integer between 5554 and 5584, inclusive. <code><port></code>+1
- must also be free and will be reserved for ADB.</td>
-</tr>
-<tr>
- <td><code>-report-console <socket></code></td>
- <td>Report the assigned console port for this emulator instance to a remote third party
- before starting the emulation. </td>
- <td><code><socket></code> must use one of these formats:
-
-<p><code>tcp:<port>[,server][,max=<seconds>]</code></br>
-<code>unix:<port>[,server][,max=<seconds>]</code></p>
-
-<p>Use <code>-help-report-console</code></p> to view more information about this topic. </td>
-</tr>
-<tr>
- <td rowspan="8">System</td>
- <td><code>-cpu-delay <delay></code></td>
- <td>Slow down emulated CPU speed by <delay> </td>
- <td>Supported values for <delay> are integers between 0 and 1000.
-
-<p>Note that the <delay> does not correlate to clock speed or other absolute metrics
-— it simply represents an abstract, relative delay factor applied non-deterministically
-in the emulator. Effective performance does not always
-scale in direct relationship with <delay> values.</p>
-</td>
-</tr>
-<tr>
- <td><code>-gps <device></code></td>
- <td>Redirect NMEA GPS to character device.</td>
- <td>Use this command to emulate an NMEA-compatible GPS unit connected to
- an external character device or socket. The format of <code><device></code> must be QEMU-specific
- serial device specification. See the documentation for 'serial -dev' at
- <a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>.
-</td>
-</tr>
-<tr>
- <td><code>-nojni</code></td>
- <td>Disable JNI checks in the Dalvik runtime.</td><td> </td></tr>
-<tr>
- <td><code>-qemu</code></td>
- <td>Pass arguments to qemu.</td>
- <td> </td></tr>
-<tr>
- <td><code>-qemu -h</code></td>
- <td>Display qemu help.</td>
- <td></td></tr>
-<tr>
- <td><code>-radio <device></code></td>
- <td>Redirect radio mode to the specified character device.</td>
- <td>The format of <code><device></code> must be QEMU-specific
- serial device specification. See the documentation for 'serial -dev' at
-<a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>.
-</td>
-</tr>
-<tr>
- <td><code>-timezone <timezone></code></td>
- <td>Set the timezone for the emulated device to <timezone>, instead of the host's timezone.</td>
- <td><code><timezone></code> must be specified in zoneinfo format. For example:
-<p>"America/Los_Angeles"<br>
-"Europe/Paris"</p>
-</td>
-</tr>
-<tr>
- <td><code>-version</code></td>
- <td>Display the emulator's version number.</td>
- <td> </td>
-</tr>
-<tr>
- <td rowspan="12">UI</td>
- <td><code>-dpi-device <dpi></code></td>
- <td>Scale the resolution of the emulator to match the screen size
- of a physical device.</td>
- <td>The default value is 165. See also <code>-scale</code>.</td>
-</tr>
-<tr>
- <td><code>-no-boot-anim</code></td>
- <td>Disable the boot animation during emulator startup.</td>
- <td>Disabling the boot animation can speed the startup time for the emulator.</td>
-</tr>
-<tr>
- <td><code>-no-window</code></td>
- <td>Disable the emulator's graphical window display.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-scale <scale></code></td>
- <td>Scale the emulator window. </td>
- <td><code><scale></code> is a number between 0.1 and 3 that represents the desired scaling factor. You can
- also specify scale as a DPI value if you add the suffix "dpi" to the scale value. A value of "auto"
- tells the emulator to select the best window size.</td>
-</tr>
-<tr>
- <td><code>-raw-keys</code></td>
- <td>Disable Unicode keyboard reverse-mapping.</td>
- <td> </td></tr>
-<tr>
- <td><code>-noskin</code></td>
- <td>Don't use any emulator skin.</td>
- <td> </td></tr>
-<tr>
- <td><code>-keyset <file></code></td>
- <td>Use the specified keyset file instead of the default.</td>
- <td>The keyset file defines the list of key bindings between the emulator and the host keyboard.
- For more information, use <code>-help-keyset</code> to print information about this topic.
-</td>
-</tr>
-<tr>
- <td><code>-onion <image></code></td>
- <td>Use overlay image over screen.</td>
- <td>No support for JPEG. Only PNG is supported.</td></tr>
-<tr>
- <td><code>-onion-alpha <percent></code></td>
- <td>Specify onion skin translucency value (as percent).
- <td>Default is 50.</td>
-</tr>
-<tr>
- <td><code>-onion-rotation <position></code></td>
- <td>Specify onion skin rotation.
- <td><code><position></code> must be one of the values 0, 1, 2, 3.</td>
-</tr>
-<tr>
- <td><code>-skin <skinID></code></td>
- <td>This emulator option is deprecated. </td>
- <td>Please set skin options using AVDs, rather than by using this emulator
-option. Using this option may yield unexpected and in some cases misleading
-results, since the density with which to render the skin may not be defined.
-AVDs let you associate each skin with a default density and override the default
-as needed. For more information, see <a
-href="{@docRoot}guide/developing/devices/managing-avds.html">Managing Virtual Devices
-with AVD Manager</a>.
-</td>
-</tr>
-<tr>
- <td><code>-skindir <dir></code></td>
- <td>This emulator option is deprecated. </td>
- <td>See comments for <code>-skin</code>, above.</td></tr>
-</table>
+<p>For more information, see <a
+href="{@docRoot}guide/developing/tools/mksdcard.html"><code>mksdcard</code></a>.</p>
-<a name="diskimages"></a>
+<h3 id="sdcard-files">Copying files to an SD card image</h3>
-<h2>Working with Emulator Disk Images</h2>
+<p>Once you have created the disk image, you can copy files to it prior to
+loading it in the emulator. To copy files, you can mount the image as a loop
+device and then copy the files to it, or you can use a utility such as {@code mtools} to
+copy the files directly to the image. The {@code mtools} package is available for Linux,
+Mac, and Windows.</p>
+
+<p>Alternatively, you can use the {@code adb push} command to move files onto an SD card image
+while it is loaded in an emulator. For more information see the <a
+href="{@docRoot}guide/developing/tools/adb.html#copyfiles">{@code adb push}</a> documentation.</p>
+
+<h3 id="sdcard-loading">Loading an SD card image</h3>
+
+<p>By default, the emulator loads the SD card image that is stored with the active
+AVD (see the <code>-avd</code> startup option).</p>
+
+<p>Alternatively, you can start the emulator with the
+<code>-sdcard</code> flag and specify the name and path of your image (relative
+to the current working directory): </p>
+
+<pre>emulator -sdcard <filepath></pre>
+
+
+<h2 id="diskimages">Working with Emulator Disk Images</h2>
<p>The emulator uses mountable disk images stored on your development machine to
-simulate flash (or similar) partitions on an actual device. For example, it uses
+simulate flash (or similar) partitions on an actual device. For example, it uses a
disk image containing an emulator-specific kernel, the Android system, a
ramdisk image, and writeable images for user data and simulated SD card.</p>
<p>To run properly, the emulator requires access to a specific set of disk image
-files. By default, the Emulator always looks for the disk images in the
-private storage area of the AVD in use. If no images exist there when
-the Emulator is launched, it creates the images in the AVD directory based on
+files. By default, the Emulator always looks for the disk images in the
+private storage area of the AVD in use. If no images exist there when
+the Emulator is launched, it creates the images in the AVD directory based on
default versions stored in the SDK. </p>
-<p class="note"><strong>Note:</strong> The default storage location for
-AVDs is in <code>~/.android/avd</code> on OS X and Linux, <code>C:\Documents and
-Settings\<user>\.android\</code> on Windows XP, and
+<p class="note"><strong>Note:</strong> The default storage location for
+AVDs is in <code>~/.android/avd</code> on OS X and Linux, <code>C:\Documents and
+Settings\<user>\.android\</code> on Windows XP, and
<code>C:\Users\<user>\.android\</code>
on Windows Vista.</p>
<p>To let you use alternate or custom versions of the image files, the emulator
provides startup options that override the default locations and filenames of
-the image files. When you use the options, the emulator searches for the image
+the image files. When you use one of these options, the emulator searches for the image
file under the image name or location that you specify; if it can not locate the
image, it reverts to using the default names and location.</p>
@@ -757,20 +636,19 @@
image files, and temporary image files. The sections below describe how to
override the location/name of each type of file. </p>
-<a name="defaultimages"></a>
-<h3>Default Images</h3>
+<h3 id="defaultimages">Default image files</h3>
-<p>When the emulator launches but does not find an existing user data image in
+<p>When the emulator launches, but does not find an existing user data image in
the active AVD's storage area, it creates a new one from a default version
-included in the SDK. The default user data image is read-only. The image
+included in the SDK. The default user data image is read-only. The image
files are read-only.</p>
<p>The emulator provides the <code>-system <dir></code> startup option to
-let you override the location under which the emulator looks for the default
+let you override the location where the emulator looks for the default
user data image. </p>
<p>The emulator also provides a startup option that lets you override the name
-of the default user data image, as described in the table below. When you use the
+of the default user data image, as described in the following table. When you use the
option, the emulator looks in the default directory, or in a custom location
(if you specified <code>-system <dir></code>). </p>
@@ -810,25 +688,24 @@
</table>
-<a name="runtimeimages"></a>
-<h3>Runtime Images: User Data and SD Card</h3>
+<h3 id="runtimeimages">Runtime images: user data and SD card</h3>
-<p>At runtime, the emulator reads and writes data on two disk images: a
-user-data image and (optionally) an SD card image. This emulates the user-data
+<p>At runtime, the emulator reads and writes data to two disk images: a
+user-data image and (optionally) an SD card image. These images emulate the user-data
partition and removable storage media on actual device. </p>
-<p>The emulator provides a default user-data disk image. At startup, the emulator
-creates the default image as a copy of the system user-data image (user-data.img),
+<p>The emulator provides a default user-data disk image. At startup, the emulator
+creates the default image as a copy of the system user-data image (user-data.img),
described above. The emulator stores the new image with the files of the active AVD.</p>
<!--
-<p>The emulator provides a startup option, <code>-datadir <dir></code>,
+<p>The emulator provides a startup option, <code>-datadir <dir></code>,
that you can use to override the location under which the emulator looks for the runtime
image files. </p>
-->
-<p>The emulator provides startup options to let you override the actual names and storage
-locations of the runtime images to load, as described in the table below. When you use one
+<p>The emulator provides startup options to let you override the actual names and storage
+locations of the runtime images to load, as described in the following table. When you use one
of these options, the emulator looks for the specified file(s) in the current working directory,
in the AVD directory, or in a custom location (if you specified a path with the filename). </p>
@@ -842,7 +719,7 @@
<td><code>userdata-qemu.img</code></td>
<td>An image to which the emulator writes runtime user-data for a unique user.</td>
<td>Override using <code>-data <filepath></code>, where <code><filepath></code> is the
-path the image, relative to the current working directory. If you supply a filename only,
+path the image, relative to the current working directory. If you supply a filename only,
the emulator looks for the file in the current working directory. If the file at <code><filepath></code> does
not exist, the emulator creates an image from the default userdata.img, stores it under the name you
specified, and persists user data to it at shutdown. </td>
@@ -852,7 +729,7 @@
<td><code>sdcard.img</code></td>
<td>An image representing an SD card inserted into the emulated device.</td>
<td>Override using <code>-sdcard <filepath></code>, where <code><filepath></code> is the
-path the image, relative to the current working directory. If you supply a filename only,
+path the image, relative to the current working directory. If you supply a filename only,
the emulator looks for the file in the current working directory. </td>
</tr>
@@ -864,38 +741,38 @@
session-specific data. For example, it uses the image to store a unique user's
installed application data, settings, databases, and files. </p>
-<p>At startup, the emulator attempts to load a user-data image stored during
-a previous session. It looks for the file in the current working directory,
-in the AVD directory as described above, and at the custom location/name
+<p>At startup, the emulator attempts to load a user-data image stored during
+a previous session. It looks for the file in the current working directory,
+in the AVD directory described in a previous section and at the custom location/name
that you specified at startup. </p>
<ul>
-<li>If it finds a user-data image, it mounts the image and makes it available
-to the system for reading/writing of user data. </li>
+<li>If it finds a user-data image, it mounts the image and makes it available
+to the system for reading and writing of user data. </li>
<li>If it does not find one, it creates an image by copying the system user-data
image (userdata.img), described above. At device power-off, the system persists
-the user data to the image, so that it will be available in the next session.
+the user data to the image, so that it will be available in the next session.
Note that the emulator stores the new disk image at the location/name that you
specify in <code>-data</code> startup option.</li>
</ul>
<p class="note"><strong>Note:</strong> Because of the AVD configurations used in the emulator,
-each emulator instance now gets its own dedicated storage. There is no need
+each emulator instance gets its own dedicated storage. There is no longer a need
to use the <code>-d</code> option to specify an instance-specific storage area.</p>
<h4>SD Card</h4>
<P>Optionally, you can create a writeable disk image that the emulator can use
-to simulate removeable storage in an actual device. For information about how to create an
+to simulate removeable storage in an actual device. For information about how to create an
emulated SD card and load it in the emulator, see <a href="#sdcard">SD Card Emulation</a></p>
<p>You can also use the android tool to automatically create an SD Card image
-for you, when creating an AVD. For more information, see <a
+for you, when creating an AVD. For more information, see <a
href="{@docRoot}guide/developing/devices/managing-avds.html">Managing Virtual Devices with AVD
Manager</a>.
-<a name="temporaryimages"></a>
-<h3>Temporary Images</h3>
+
+<h3 id="temporaryimages">Temporary Images</h3>
<p>The emulator creates two writeable images at startup that it deletes at
device power-off. The images are: </p>
@@ -909,8 +786,8 @@
persisting it at device power-off. </p>
<p>The <code>/cache</code> partition image is initially empty, and is used by
-the browser to cache downloaded web pages and images. The emulator provides an
-<code>-cache <file></code>, which specifies the name of the file at which
+the browser to cache downloaded web pages and images. The emulator provides an
+<code>-cache <file></code>, which specifies the name of the file in which
to persist the <code>/cache</code> image at device power-off. If <code><file>
</code> does not exist, the emulator creates it as an empty file. </p>
@@ -918,16 +795,14 @@
<code>-nocache</code> option at startup. </p>
-<a name="emulatornetworking"></a>
-<h2>Emulator Networking</h2>
+<h2 id="emulatornetworking">Emulator Networking</h2>
<p>The emulator provides versatile networking capabilities that you can use to
set up complex modeling and testing environments for your application. The
sections below introduce the emulator's network architecture and capabilities.
</p>
-<a name="networkaddresses"></a>
-<h3>Network Address Space</h3>
+<h3 id="networkaddresses">Network Address Space</h3>
<p>Each instance of the emulator runs behind a virtual router/firewall service
that isolates it from your development machine's network interfaces and settings
@@ -990,14 +865,13 @@
devices (which are also very likely to be NAT-ed, i.e., behind a
router/firewall)</p>
-<a name="networkinglimitations"></a>
-<h3>Local Networking Limitations</h3>
-<p>Each emulator instance runs behind a virtual router, but unlike an actual
-device connected to a physical router, the emulated device doesn't have access
-to a physical network. Instead it runs as part of a normal application on your
-development machine. This means that it is subject to the same networking
-limitations as other applications on your machine:</p>
+<h3 id="networkinglimitations">Local Networking Limitations</h3>
+
+<p>Android applications running in an emulator can connect to the network available on your
+workstation. However, they connect through the emulator, not directly to hardware, and the emulator
+acts like a normal application on your workstation. This means that the emulator, and thus your
+Android applications, are subject to some limitations:</p>
<ul>
<li>Communication with the emulated device may be blocked by a firewall
@@ -1016,25 +890,24 @@
protocols (such as ICMP, used for "ping") might not be supported. Currently, the
emulator does not support IGMP or multicast. </p>
-<a name="redirections"></a>
-<h3>Using Network Redirections</h3>
+<h3 id="redirection">Using Network Redirection</h3>
<p>To communicate with an emulator instance behind its virtual router, you need
-to set up network redirections on the virtual router. Clients can then connect
+to set up network redirection on the virtual router. Clients can then connect
to a specified guest port on the router, while the router directs traffic
to/from that port to the emulated device's host port. </p>
-<p>To set up the network redirections, you create a mapping of host and guest
+<p>To set up the network redirection, you create a mapping of host and guest
ports/addresses on the the emulator instance. There are two ways to set up
-network redirections: using emulator console commands and using the ADB tool, as
+network redirection: using emulator console commands and using the ADB tool, as
described below. </p>
-<a name="consoleredir"></a>
-<h4>Setting up Redirections through the Emulator Console</h4>
+
+<h4 id="consoleredir">Setting up Redirection through the Emulator Console</h4>
<p>Each emulator instance provides a control console the you can connect to, to
issue commands that are specific to that instance. You can use the
-<code>redir</code> console command to set up redirections as needed for an
+<code>redir</code> console command to set up redirection as needed for an
emulator instance. </p>
<p>First, determine the console port number for the target emulator instance.
@@ -1044,25 +917,25 @@
<pre><code>telnet localhost 5554</code></pre>
-<p>Once connected, use the <code>redir</code> command to work with redirections.
+<p>Once connected, use the <code>redir</code> command to work with redirection.
To add a redirection, use:</p>
<pre><code>add <protocol>:<host-port>:<guest-port></code>
</pre>
-<p>where <code><protocol></code> is either <code>tcp</code> or <code>udp</code>,
-and <code><host-port></code> and <code><guest-port></code> sets the
+<p>where <code><protocol></code> is either <code>tcp</code> or <code>udp</code>,
+and <code><host-port></code> and <code><guest-port></code> sets the
mapping between your own machine and the emulated system, respectively. </p>
-<p>For example, the following command sets up a redirection that will handle all
+<p>For example, the following command sets up a redirection that handles all
incoming TCP connections to your host (development) machine on 127.0.0.1:5000
and will pass them through to the emulated system's 10.0.2.15:6000.:</p>
<pre>redir add tcp:5000:6000</pre>
<p>To delete a redirection, you can use the <code>redir del</code> command. To
-list all redirections for a specific instance, you can use <code>redir
-list</code>. For more information about these and other console commands, see
+list all redirection for a specific instance, you can use <code>redir
+list</code>. For more information about these and other console commands, see
<a href="#console">Using the Emulator Console</a>. </p>
<p>Note that port numbers are restricted by your local environment. this typically
@@ -1071,29 +944,28 @@
host port that is already in use by another process on your machine. In that
case, <code>redir</code> generates an error message to that effect. </p>
-<a name="adbredir"></a>
-<h4>Setting Up Redirections through ADB</h4>
+<h4 id="adbredir">Setting Up Redirection through ADB</h4>
<p>The Android Debug Bridge (ADB) tool provides port forwarding, an alternate
-way for you to set up network redirections. For more information, see <a
+way for you to set up network redirection. For more information, see <a
href="{@docRoot}guide/developing/tools/adb.html#forwardports">Forwarding Ports</a> in the ADB
documentation.</p>
<p>Note that ADB does not currently offer any way to remove a redirection,
except by killing the ADB server.</p>
-<a name="dns"></a>
-<h3>Configuring the Emulator's DNS Settings</h3>
+
+<h3 id="dns">Configuring the Emulator's DNS Settings</h3>
<p>At startup, the emulator reads the list of DNS servers that your system is
currently using. It then stores the IP addresses of up to four servers on this
list and sets up aliases to them on the emulated addresses 10.0.2.3, 10.0.2.4,
10.0.2.5 and 10.0.2.6 as needed. </p>
-<p>On Linux and OS X, the emulator obtains the DNS server addresses by parsing
-the file <code>/etc/resolv.conf</code>. On Windows, the emulator obtains the
-addresses by calling the <code>GetNetworkParams()</code> API. Note that this
-usually means that the emulator ignores the content of your "hosts" file
+<p>On Linux and OS X, the emulator obtains the DNS server addresses by parsing
+the file <code>/etc/resolv.conf</code>. On Windows, the emulator obtains the
+addresses by calling the <code>GetNetworkParams()</code> API. Note that this
+usually means that the emulator ignores the content of your "hosts" file
(<code>/etc/hosts</code> on Linux/OS X, <code>%WINDOWS%/system32/HOSTS</code>
on Windows).</P>
@@ -1104,8 +976,8 @@
encounter DNS resolution problems in the emulated network (for example, an
"Unknown Host error" message that appears when using the web browser).</p>
-<a name="proxy"></a>
-<h3>Using the Emulator with a Proxy</h3>
+
+<h3 id="proxy">Using the Emulator with a Proxy</h3>
<p>If your emulator must access the Internet through a proxy server, you can use
the <code>-http-proxy <proxy></code> option when starting the emulator, to
@@ -1132,18 +1004,18 @@
<p>You can use the <code>-verbose-proxy</code> option to diagnose proxy
connection problems.</p>
-<a name="connecting"></a>
-<h3>Interconnecting Emulator Instances</h3>
+
+<h3 id="connecting">Interconnecting Emulator Instances</h3>
<p>To allow one emulator instance to communicate with another, you must set up
-the necessary network redirections as illustrated below. </p>
+the necessary network redirection as illustrated below. </p>
<p>Assume that your environment is</p>
<ul>
<li>A is you development machine</li>
<li>B is your first emulator instance, running on A</li>
- <li>C is your second emulator instance, running on A too</li>
+ <li>C is your second emulator instance, also running on A</li>
</ul>
<p>and you want to run a server on B, to which C will connect, here is how you
@@ -1168,10 +1040,11 @@
<li>C connects to 10.0.2.2:8080</li>
</ul>
-<a name="calling"></a>
-<h3>Sending a Voice Call or SMS to Another Emulator Instance</h3>
+<h3 id="calling">Sending a Voice Call or SMS to Another Emulator Instance</h3>
-<p>The emulator automatically forwards simulated voice calls and SMS messages from one instance to another. To send a voice call or SMS, you use the dialer application and SMS application (if available) installed on one emulator </p>
+<p>The emulator automatically forwards simulated voice calls and SMS messages from one instance to
+another. To send a voice call or SMS, use the dialer application or SMS application, respectively,
+from one of the emulators.</p>
<p>To initiate a simulated voice call to another emulator instance:</p>
<ol>
@@ -1186,16 +1059,23 @@
<p>You can also connect to an emulator instance's console to simulate an incoming voice call or SMS. For more information, see <a href="#telephony">Telephony Emulation</a> and <a href="#sms">SMS Emulation</a>.
-<a name="console"></a>
-<h2>Using the Emulator Console</h2>
+<h2 id="console">Using the Emulator Console</h2>
-<p>Each running emulator instance includes a console facility that lets you dynamically query and control the simulated device environment. For example, you can use the console to dynamically manage port redirections and network characteristics and simulate telephony events. To access the console and enter commands, you use telnet to connect to the console's port number. </p>
+<p>Each running emulator instance provides a console that lets you query and control the emulated
+device environment. For example, you can use the console to manage port redirection, network
+characteristics, and telephony events while your application is running on the emulator. To
+access the console and enter commands, use telnet to connect to the console's port number.</p>
+
<p>To connect to the console of any running emulator instance at any time, use this command: </p>
<pre>telnet localhost <console-port></pre>
-<p>An emulator instance occupies a pair of adjacent ports: a console port and an adb port. The port numbers differ by 1, with the adb port having the higher port number. The console of the first emulator instance running on a given machine uses console port 5554 and adb port 5555. Subsequent instances use port numbers increasing by two — for example, 5556/5557, 5558/5559, and so on. Up to 16 concurrent emulator instances can run a console facility. </p>
+<p>An emulator instance occupies a pair of adjacent ports: a console port and an {@code adb} port.
+The port numbers differ by 1, with the {@code adb} port having the higher port number. The console
+of the first emulator instance running on a given machine uses console port 5554 and {@code adb}
+port 5555. Subsequent instances use port numbers increasing by two — for example, 5556/5557,
+5558/5559, and so on. Up to 16 concurrent emulator instances can run a console facility. </p>
<p>To connect to the emulator console, you must specify a valid console port. If multiple emulator instances are running, you need to determine the console port of the emulator instance you want to connect to. You can find the instance's console port listed in the title of the instance window. For example, here's the window title for an instance whose console port is 5554:</p>
@@ -1209,12 +1089,14 @@
<p>To exit the console session, use <code>quit</code> or <code>exit</code>.</p>
-<p>The sections below describe the major functional areas of the console.</p>
+<p>The following sections below describe the major functional areas of the console.</p>
-<a name="portredirection"></a>
-<h3>Port Redirection</h3>
-<p>You can use the console to add and remove port redirections while the emulator is running. After connecting to the console, you can manage port redirections in this way:</p>
+<h3 id="portredirection">Port Redirection</h3>
+
+<p>You can use the console to add and remove port redirection while the emulator is running. After
+you connect to the console, manage port redirection by entering the following command:</p>
+
<pre>redir <list|add|del> </pre>
<p>The <code>redir</code> command supports the subcommands listed in the table below. </p>
@@ -1225,14 +1107,14 @@
<th width="30%" >Description</th>
<th width="35%">Comments</th>
</tr>
-
+
<tr>
<td><code>list</code></td>
- <td>List the current port redirections.</td>
+ <td>List the current port redirection.</td>
<td> </td>
</tr>
-
+
<tr>
<td><code>add <protocol>:<host-port>:<guest-port></code></td>
<td>Add a new port redirection.</td>
@@ -1244,16 +1126,16 @@
<tr>
<td><code>del <protocol>:<host-port></code></td>
<td>Delete a port redirection.</td>
-<td>See above for meanings of <protocol> and <host-port>.</td>
+<td>The meanings of <protocol> and <host-port> are listed in the previous row.</td>
</tr>
</table>
-<a name="geo"></a>
-<h3>Geo Location Provider Emulation</h3>
-<p>The console provides commands to let you set the geo position used by an emulator emulated device.
-You can use the <code>geo</code> command to send a simple GPS fix to the emulator, without needing to
-use NMEA 1083 formatting. The usage for the command is:</p>
+<h3 id="geo">Geo Location Provider Emulation</h3>
+
+<p>You can use the console to set the geographic location reported to the applications running
+inside an emulator. Use the <code>geo</code> command to send a simple GPS fix to the
+emulator, with or without NMEA 1083 formatting:</p>
<pre>geo <fix|nmea></pre>
@@ -1261,11 +1143,11 @@
<table>
<tr>
- <th width="25%" >Subcommand
- <th width="30%" >Description</th>
+ <th width="25%">Subcommand</th>
+ <th width="30%">Description</th>
<th width="35%">Comments</th>
</tr>
-
+
<tr>
<td><code>fix <longitude> <latitude> [<altitude>]</code></td>
<td>Send a simple GPS fix to the emulator instance.</td>
@@ -1278,19 +1160,21 @@
</tr>
</table>
-<p>You can issue the <code>geo</code> command to fix the GPS location as soon as an emulator instance is running.
-The emulator creates a mock location provider that sends it to GPS-aware applications as soon as they start and
-register location listeners. Any application can query the location manager to obtain the current GPS fix for the
-emulated device by calling:
+<p>You can issue the <code>geo</code> command as soon as an emulator instance is running. The
+emulator sets the location you enter by creating a mock location provider. This provider responds to
+location listeners set by applications, and also supplies the location to the {@link
+android.location.LocationManager}. Any application can query the location manager to obtain the
+current GPS fix for the emulated device by calling:
<pre>LocationManager.getLastKnownLocation("gps")</pre>
-<p>For more information about the Location Manager, see {@link android.location.LocationManager} and its methods.</p>
+<p>For more information about the Location Manager, see {@link android.location.LocationManager}.
+</p>
-<a name="events"></a>
-<h3>Hardware Events Emulation</h3>
+<h3 id="events">Hardware Events Emulation</h3>
-<p>You can use the <code>event</code> command to send various events to the emulator.The usage for the command is: </p>
+<p>The {@code event} console commands sends hardware events to the emulator. The syntax for this
+command is as follows:</p>
<pre>event <send|types|codes|text></pre>
@@ -1302,7 +1186,7 @@
<th width="30%" >Description</th>
<th width="35%">Comments</th>
</tr>
-
+
<tr>
<td><code>send <type>:<code>:<value> [...]</code></td>
<td>Send one or more events to the Android kernel. </td>
@@ -1315,7 +1199,7 @@
</tr>
<tr>
<td><code>codes <type></code></td>
- <td>List all <code><codes></code> string aliases supported by the <code>event</code>
+ <td>List all <code><codes></code> string aliases supported by the <code>event</code>
subcommands for the specified <code><type></code>.</td>
<td> </td>
</tr>
@@ -1326,10 +1210,11 @@
</tr>
</table>
-<a name="power"></a>
-<h3>Device Power Characteristics</h3>
-<p>You can use the <code>power</code> command to control the simulated power state of the emulator instance.The usage for the command is: </p>
+<h3 id="power">Device Power Characteristics</h3>
+
+<p>The {@code power} command controls the power state reported by the emulator to applications. The
+syntax for this command is as follows: </p>
<pre>power <display|ac|status|present|health|capacity></pre>
@@ -1341,7 +1226,7 @@
<th width="30%" >Description</th>
<th width="35%">Comments</th>
</tr>
-
+
<tr>
<td><code>display</code></td>
<td>Display battery and charger state.</td>
@@ -1375,23 +1260,32 @@
</tr>
</table>
-<a name="netstatus"></a>
-<h3>Network Status</h3>
+
+<h3 id="netstatus">Network Status</h3>
<p>You can use the console to check the network status and current delay and speed characteristics. To do so, connect to the console and use the <code>netstatus</code> command. Here's an example of the command and its output. </p>
<pre>network status
</pre>
-<a name="netdelay"></a>
-<h3>Network Delay Emulation</h3>
-<p>The emulator lets you simulate various network latency levels, so that you can test your application in an environment more typical of the actual conditions in which it will run. You can set a latency level or range at emulator startup or you can use the console to change the latency dynamically, while the application is running in the emulator. </p>
-<p>To set latency at emulator startup, use the <code>-netdelay</code> emulator option with a supported <code><delay></code> value, as listed in the table below. Here are some examples:</p>
+<h3 id="netdelay">Network Delay Emulation</h3>
+
+<p>The emulator lets you simulate various network latency levels, so that you can test your
+application in an environment more typical of the actual conditions in which it will run. You can
+set a latency level or range at emulator startup or you can use the console to change the latency,
+while the application is running in the emulator. </p>
+
+<p>To set latency at emulator startup, use the <code>-netdelay</code> emulator option with a
+supported <code><delay></code> value, as listed in the table below. Here are some
+examples:</p>
+
<pre>emulator -netdelay gprs
emulator -netdelay 40 100</pre>
-<p>To make dynamic changes to network delay while the emulator is running, connect to the console and use the <code>netdelay</code> command with a supported <code><delay></code> value from the table below. </p>
+<p>To make changes to network delay while the emulator is running, connect to the console and use
+the <code>netdelay</code> command with a supported <code><delay></code> value from the table
+below.</p>
<pre>network delay gprs</pre>
@@ -1401,7 +1295,7 @@
<tr>
<th width="30%" >Value</th>
<th width="35%" >Description</th><th width="35%">Comments</th></tr>
-
+
<tr><td><code>gprs</code></td><td>GPRS</td>
<td>(min 150, max 550)</td>
</tr>
@@ -1421,19 +1315,22 @@
<td> </td></tr>
</table>
-<a name="netspeed"></a>
-<h3>Network Speed Emulation</h3>
-<p>The emulator also lets you simulate various network transfer rates.
-You can set a transfer rate or range at emulator startup or you can use the console to change the rate dynamically,
-while the application is running in the emulator.</p>
+<h3 id="netspeed">Network Speed Emulation</h3>
+
+<p>The emulator also lets you simulate various network transfer rates.
+You can set a transfer rate or range at emulator startup or you can use the console to change the
+rate, while the application is running in the emulator.</p>
<p>To set the network speed at emulator startup, use the <code>-netspeed</code> emulator option with a supported
<code><speed></code> value, as listed in the table below. Here are some examples:</p>
+
<pre>emulator -netspeed gsm
emulator -netspeed 14.4 80</pre>
-<p>To make dynamic changes to network speed while the emulator is running, connect to the console and use the <code>netspeed</code> command with a supported <code><speed></code> value from the table below. </p>
+<p>To make changes to network speed while the emulator is running, connect to the console and use
+the <code>netspeed</code> command with a supported <code><speed></code> value from the table
+below.</p>
<pre>network speed 14.4 80</pre>
@@ -1444,7 +1341,7 @@
<tr>
<th width="30%">Value</th>
<th width="35%">Description</th><th width="35%">Comments</th></tr>
-
+
<tr>
<td><code>gsm</code></td>
<td>GSM/CSD</td><td>(Up: 14.4, down: 14.4)</td></tr>
@@ -1476,14 +1373,19 @@
<td>Set exact rates for upload and download separately.</td><td></td></tr>
</table>
-<a name="telephony"></a>
-<h3>Telephony Emulation</h3>
+<h3 id="telephony">Telephony Emulation</h3>
-<p>The Android emulator includes its own GSM emulated modem that lets you simulate telephony functions in the emulator. For example, you can simulate inbound phone calls and establish/terminate data connections. The Android system handles simulated calls exactly as it would actual calls. The emulator does not support call audio in this release. </p>
-<p>You can use the console to access the emulator's telephony functions. After connecting to the console, you can use</p>
+<p>The Android emulator includes its own GSM emulated modem that lets you simulate telephony
+functions in the emulator. For example, you can simulate inbound phone calls, establish data
+connections and terminate them. The Android system handles simulated calls exactly as it would
+actual calls. The emulator does not support call audio.</p>
+
+<p>You can use the {@code gsm} command to access the emulator's telephony functions after connecting
+to the console. The syntax for this command is as follows:</p>
+
<pre>gsm <call|accept|busy|cancel|data|hold|list|voice|status> </pre>
-<p>to invoke telephony functions. </p>
+
<p>The <code>gsm</code> command supports the subcommands listed in the table below. </p>
<table>
<tr>
@@ -1559,11 +1461,12 @@
</tr>
</table>
-<a name="sms"></a>
-<h3>SMS Emulation</h3>
+<h3 id="sms">SMS Emulation</h3>
-<p>The Android emulator console lets you generate an SMS message and direct it to an emulator instance. Once you connect to an emulator instance, you can generate an emulated incoming SMS using this command:</p>
+<p>The Android emulator console lets you generate an SMS message and direct it to an emulator
+instance. Once you connect to an emulator instance, you can generate an emulated incoming SMS using
+the following command:</p>
<pre>sms send <senderPhoneNumber> <textmessage></pre>
@@ -1571,11 +1474,11 @@
<p>The console forwards the SMS message to the Android framework, which passes it through to an application that handles that message type. </p>
-<a name="vm"></a>
-<h3>VM State</h3>
+<h3 id="vm">VM State</h3>
-<p>You can use the <code>vm</code> command to control the VM on an emulator instance.The usage for the command is: </p>
+<p>You can use the <code>vm</code> command to control the VM on an emulator instance. The syntax for
+this command is as follows: </p>
<pre>vm <start|stop|status></pre>
@@ -1583,8 +1486,8 @@
<table>
<tr>
- <th width="25%" >Subcommand </th>
- <th width="30%" >Description</th>
+ <th width="25%">Subcommand</th>
+ <th width="30%">Description</th>
<th width="35%">Comments</th>
</tr>
<tr>
@@ -1605,11 +1508,10 @@
</table>
-<a name="window"></a>
+<h3 id="window">Emulator Window</h3>
-<h3>Emulator Window</h3>
-
-<p>You can use the <code>window</code> command to manage the emulator window. The usage for the command is: </p>
+<p>You can use the <code>window</code> command to manage the emulator window. The syntax for this
+command is as follows: </p>
<pre>window <scale></pre>
@@ -1617,158 +1519,53 @@
<table>
<tr>
- <th width="25%" >Subcommand
- <th width="30%" >Description</th>
+ <th width="25%">Subcommand</th>
+ <th width="30%">Description</th>
<th width="35%">Comments</th>
</tr>
<tr>
<td><code>scale <scale></code></td>
<td>Scale the emulator window.</td>
- <td><scale> must be a number between 0.1 and 3 that describes the desired scaling factor. You can
- also specify scale as a DPI value if you add the suffix "dpi" to the scale value. A value of "auto"
+ <td>A number between 0.1 and 3 that sets the scaling factor. You can
+ also specify scale as a DPI value if you add the suffix "dpi" to the scale value. A value of "auto"
tells the emulator to select the best window size.</td>
</tr>
</table>
-<a name="terminating"></a>
-
-<h3>Terminating an Emulator Instance</h3>
+<h3 id="terminating">Terminating an Emulator Instance</h3>
<p>You can terminate an emulator instance through the console, using the <code>kill</code> command.</p>
-<a name="skins"></a>
+<h2 id="limitations">Emulator Limitations</h2>
-<h2>Using Emulator Skins</h2>
-
-<p>The Android SDK includes several Emulator skins that you can use to control the resolution and density of the emulated device's screen. To select a specific skin for running the emulator, create an AVD that uses that skin. Please do not use deprecated emulator options such as <code>-skin</code> to control the skin used by an emulator instance. For more information about AVDs, see <a
-href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a>.</p>
+<p>The functional limitations of the emulator include: </p>
+<ul>
+ <li>No support for placing or receiving actual phone calls. You can simulate phone calls (placed
+ and received) through the emulator console, however. </li>
+ <li>No support for USB connections</li>
+ <li>No support for device-attached headphones</li>
+ <li>No support for determining network connected state</li>
+ <li>No support for determining battery charge level and AC charging state</li>
+ <li>No support for determining SD card insert/eject</li>
+ <li>No support for Bluetooth</li>
+</ul>
-<a name="multipleinstances"></a>
+<h2 id="troubleshooting">Troubleshooting Emulator Problems</h2>
-<h2>Running Multiple Emulator Instances</h2>
+<p>The {@code adb} utility sees the emulator as an actual physical device. For this reason, you
+might have to use the {@code -d} flag with some common {@code adb} commands, such as
+<code>install</code>. The {@code -d} flag lets you specify which of several connected devices to use
+as the target of a command. If you don't specify {@code -d}, the emulator targets the first
+device in its list. For more information about {@code adb}, see <a
+href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>.</p>
-<p>Through the AVDs configurations used by the emulator, you can run multiple
-instances of the emulator concurrently, each with its own AVD configuration and
-storage area for user data, SD card, and so on. You no longer need to use the
-<code>-d</code> option when launching the emulator, to point to an
-instance-specific storage area. </p>
-
-<a name="apps"></a>
-
-<h2>Installing Applications on the Emulator</h2>
-
-<p>If you don't have access to Eclipse or the ADT Plugin, you can install
-your application on the emulator <a href="{@docRoot}guide/developing/tools/adb.html#move">using
-the adb utility</a>. Before installing the application, you need to build and package it
-into an <code>.apk</code> as described in <a href="{@docRoot}guide/developing/building/index.html">Building and
-Running Apps</a>. Once the application is installed, you can start the emulator from the command
-line, as described in this document, using any startup options necessary.
-When the emulator is running, you can also connect to the emulator instance's
-console to issue commands as needed.</p>
-
-<p>As you update your code, you periodically package and install it on the emulator.
-The emulator preserves the application and its state data across restarts,
-in a user-data disk partition. To ensure that the application runs properly
-as you update it, you may need to delete the emulator's user-data partition.
-To do so, start the emulator with the <code>-wipe-data</code> option.
-For more information about the user-data partition and other emulator storage,
-see <a href="#diskimages">Working with Emulator Disk Images</a>.</p>
-
-<a name="sdcard"></a>
-<a name="creating"></a>
-
-<h2>SD Card Emulation</h2>
-
-<p>You can create a disk image and then load it to the emulator at startup, to
-simulate the presence of a user's SD card in the device. To do this, you can use
-the android tool to create a new SD card image with a new AVD, or you can use
-the mksdcard utility included in the SDK. </p>
-
-<p>The sections below describe how to create an SD card disk image, how to copy
-files to it, and how to load it in the emulator at startup. </p>
-
-<p>Note that you can only load disk image at emulator startup. Similarly, you
-can not remove a simulated SD card from a running emulator. However, you can
-browse, send files to, and copy/remove files from a simulated SD card either
-with adb or the emulator. </p>
-
-<p>The emulator supports emulated SDHC cards, so you can create an SD card image
-of any size up to 128 gigabytes.</p>
-
-<h3 id="creatinga">Creating an SD card image using the android tool</h3>
-
-<p>The easiest way to create a new SD card is to use the android tool. When
-creating an AVD, you simply specify the <code>-c</code> option, like this: </p>
-
-<pre>android create avd -n <avd_name> -t <targetID> -c <size>[K|M]</pre>
-
-<p>You can also use the <code>-c</code> option to specify a path to an SD card
-image to use in the new AVD. For more information, see <a
-href="{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing Virtual Devices
-from the Command Line</a>.
-</p>
-
-<h3 id="creatingm">Creating an SD card image using mksdcard</h3>
-
-<p>You can use the mksdcard tool, included in the SDK, to create a FAT32 disk
-image that you can load in the emulator at startup. You can access mksdcard in
-the tools/ directory of the SDK and create a disk image like this: </p>
-
-<pre>mksdcard <size> <file></pre>
-
-<p>For example:</p>
-
-<pre>mksdcard 1024M sdcard1.iso</pre>
-
-<p>For more information, see <a href="{@docRoot}guide/developing/tools/mksdcard.html"><code>mksdcard</code></a>.</p>
-
-<a name="copying"></a>
-<h3>Copying Files to a Disk Image</h3>
-
-<p>Once you have created the disk image, you can copy files to it prior to
-loading it in the emulator. To copy files, you can mount the image as a loop
-device and then copy the files to it, or you can use a utility such as mtools to
-copy the files directly to the image. The mtools package is available for Linux,
-Mac, and Windows.</p>
-
-<a name="loading"></a>
-<a name="step3" id="step3"></a>
-
-<h3>Loading the Disk Image at Emulator Startup</h3>
-
-<p>By default, the emulator loads the SD card image that is stored with the active
-AVD (see the <code>-avd</code> startup option).</p>
-
-<p>Alternatively, you ca start the emulator with the
-<code>-sdcard</code> flag and specify the name and path of your image (relative
-to the current working directory): </p>
-
-<pre>emulator -sdcard <filepath></pre>
-
-<a name="troubleshooting"></a>
-
-<h2>Troubleshooting Emulator Problems</h2>
-
-<p>The adb utility sees the emulator as an actual physical device. For this reason, you might have to use the -d flag with some common adb commands, such as <code>install</code>. The -d flag lets you specify which of several connected devices to use as the target of a command. If you don't specify -d, the emulator will target the first device in its list. For more information about adb, see <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>.</p>
-
-<p>For emulators running on Mac OS X, if you see an error "Warning: No DNS servers found" when starting the emulator, check to see whether you have an <code>/etc/resolv.conf</code> file. If not, please run the following line in a command window:</p>
+<p>For emulators running on Mac OS X, if you see an error {@code Warning: No DNS servers found}
+when starting the emulator, check to see whether you have an <code>/etc/resolv.conf</code> file. If
+not, please run the following line in a command window:</p>
<pre>ln -s /private/var/run/resolv.conf /etc/resolv.conf</pre>
-<p>See <a href="{@docRoot}resources/faq/index.html">Frequently Asked Questions</a> for more troubleshooting information. </p>
-
-<a name="limitations"></a>
- <h2>Emulator Limitations</h2>
- <p>In this release, the limitations of the emulator include: </p>
- <ul>
- <li>No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however. </li>
- <li>No support for USB connections</li>
- <li>No support for camera/video capture (input).</li>
- <li>No support for device-attached headphones</li>
- <li>No support for determining connected state</li>
- <li>No support for determining battery charge level and AC charging state</li>
- <li>No support for determining SD card insert/eject</li>
- <li>No support for Bluetooth</li>
- </ul>
+<p>See <a href="{@docRoot}resources/faq/index.html">Frequently Asked Questions</a> for more
+troubleshooting information. </p>
diff --git a/docs/html/guide/developing/tools/emulator.jd b/docs/html/guide/developing/tools/emulator.jd
index 09e41c3..21d4263 100644
--- a/docs/html/guide/developing/tools/emulator.jd
+++ b/docs/html/guide/developing/tools/emulator.jd
@@ -8,8 +8,8 @@
<h2>In this document</h2>
<ol>
- <li><a href="#startup-options">Emulator Startup Options</a></li>
- <li><a href="#KeyMapping">Emulator Keyboard Mapping</a></li>
+ <li><a href="#KeyMapping">Keyboard Commands</a></li>
+ <li><a href="#startup-options">Command Line Parameters</a></li>
</ol>
<h2>See also</h2>
@@ -22,461 +22,21 @@
</div>
-<p>The Android SDK includes a mobile device emulator — a virtual mobile device
+<p>The Android SDK includes a mobile device emulator — a virtual mobile device
that runs on your computer. The emulator lets you develop and test
Android applications without using a physical device.</p>
-<p>When the emulator is running, you can interact with the emulated mobile
-device just as you would an actual mobile device, except that you use your mouse
-pointer to "touch" the touchscreen and can use some keyboard keys to
-invoke certain keys on the device. </p>
-
-<p>This document is a reference to the available command line options and the keyboard mapping to device keys.
-For a complete guide to using the Android Emulator, see
+<p>This document is a reference to the available command line options and the keyboard mapping to
+device keys.
+For a complete guide to using the Android Emulator, see
<a href="{@docRoot}guide/developing/devices/emulator.html">Using the Android Emulator</a>.
-<h2 id="startup-options">Emulator Startup Options</h2>
+<h2 id="KeyMapping">Keyboard Commands</h2>
-<p>The emulator supports a variety of options that you can specify
-when launching the emulator, to control its appearance or behavior.
-Here's the command-line usage for launching the emulator with options: </p>
+<p>Table 1 summarizes the mappings between the emulator keys and the keys of your keyboard.</p>
-<pre>emulator -avd <avd_name> [-<option> [<value>]] ... [-<qemu args>]</pre>
-
-<p class="table-caption"><strong>Table 1.</strong>Emulator startup options</p>
-
-<table>
-<tr>
- <th width="10%" >Category</th>
- <th width="20%" >Option</th>
- <th width="30%" >Description</th>
- <th width="40%" >Comments</th>
-</tr>
-
-<tr>
- <td rowspan="9">Help</td>
- <td><code>-help</code></td>
- <td>Print a list of all emulator options.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-all</code></td>
- <td>Print help for all startup options.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-<option></code></td>
- <td>Print help for a specific startup option.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-debug-tags</code></td>
- <td>Print a list of all tags for <code>-debug <tags></code>.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-disk-images</code></td>
- <td>Print help for using emulator disk images.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-environment</code></td>
- <td>Print help for emulator environment variables.</td>
- <td> </td>
-</tr><tr>
- <td><code>-help-keys</code></td>
- <td>Print the current mapping of keys.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-keyset-file</code></td>
- <td>Print help for defining a custom key mappings file.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-help-virtual-device</code></td>
- <td>Print help for Android Virtual Device usage.</td>
- <td> </td>
-</tr>
-<tr>
- <td>AVD</td>
- <td><code>-avd <avd_name></code> or <br>
- <code>@<avd_name></code></td>
- <td><strong>Required</strong>. Specifies the AVD to load for this emulator
- instance.</td>
- <td>You must create an AVD configuration before launching the emulator. For
- information, see <a href="{@docRoot}guide/developing/devices/managing-avds.html#createavd">
- Managing AVDs with AVD Manager</a>.</td>
-<tr>
- <td rowspan="7">Disk Images</td>
- <td><code>-cache <filepath></code></td>
- <td>Use <filepath> as the working cache partition image. </td>
- <td>Optionally, you can specify a path relative to the current working directory.
- If no cache file is specified, the emulator's default behavior is to use a temporary file instead.
- <p>For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td></tr>
-<tr>
- <td><code>-data <filepath></code></td>
- <td>Use <filepath> as the working user-data disk image. </td>
- <td>Optionally, you can specify a path relative to the current working directory.
- If <code>-data</code> is not used, the emulator looks for a file named "userdata-qemu.img"
- in the storage area of the AVD being used (see <code>-avd</code>).
-</td></tr>
-<!--
-<tr>
- <td><code>-datadir <dir></code></td>
- <td>Search for the user-data disk image specified in <code>-data</code> in <dir></td>
- <td><code><dir></code> is a path relative to the current working directory.
-
-<p>If you do not specify <code>-datadir</code>, the emulator looks for the user-data image
-in the storage area of the AVD being used (see <code>-avd</code>)</p><p>For more information
-on disk images, use <code>-help-disk-images</code>.</p>
-</td></tr>
--->
-<!--
-<tr>
- <td><code>-image <filepath></code></td>
- <td>Use <filepath> as the system image.</td>
- <td>Optionally, you can specify a path relative to the current working directory.
- Default is <system>/system.img.</td>
-</tr>
--->
-<tr>
- <td><code>-initdata <filepath></code></td>
- <td>When resetting the user-data image (through <code>-wipe-data</code>), copy the contents
- of this file to the new user-data disk image. By default, the emulator copies the <code><system>/userdata.img</code>.</td>
- <td>Optionally, you can specify a path relative to the current working directory. See also <code>-wipe-data</code>. <p>For more information on disk images, use <code>-help-disk-images</code>.</p></td>
-</tr>
-<!--
-<tr>
- <td><code>-kernel <filepath></code></td>
- <td>Use <filepath> as the emulated kernel.</td>
- <td>Optionally, you can specify a path relative to the current working directory. </td>
-</tr>
--->
-<tr>
- <td><code>-nocache</code></td>
- <td>Start the emulator without a cache partition.</td>
- <td>See also <code>-cache <file></code>.</td>
-</tr>
-<tr>
- <td><code>-ramdisk <filepath></code></td>
- <td>Use <filepath> as the ramdisk image.</td>
- <td>Default value is <code><system>/ramdisk.img</code>.
- <p>Optionally, you can specify a path relative to the current working directory. For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td>
-</tr>
-<tr>
- <td><code>-sdcard <filepath></code></td>
- <td>Use <file> as the SD card image.</td>
- <td>Default value is <code><system>/sdcard.img</code>.
- <p>Optionally, you can specify a path relative to the current working directory. For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td>
-</tr>
-<!--
-<tr>
- <td><code>-system <dirpath></code></td>
- <td>Search for system, ramdisk and user data images in <dir>.</td>
- <td><code><dir></code> is a directory path relative to the current
- working directory.</td>
-</tr>
--->
-<tr>
- <td><code>-wipe-data</code></td>
- <td>Reset the current user-data disk image (that is, the file specified by <code>-datadir</code> and
- <code>-data</code>, or the default file). The emulator deletes all data from the user data image file,
- then copies the contents of the file at <code>-inidata</code> data to the image file before starting.
- </td>
- <td>See also <code>-initdata</code>.
- <p>For more information on disk images, use <code>-help-disk-images</code>.</p>
-</td>
-</tr>
-<tr>
- <td rowspan="9">Debug</td>
- <td><code>-debug <tags></code></td>
- <td>Enable/disable debug messages for the specified debug tags.</td>
- <td><code><tags></code> is a space/comma/column-separated list of debug component names.
- Use <code>-help-debug-tags</code> to print a list of debug component names that you can use. </td>
-</tr>
-<tr>
- <td><code>-debug-<tag></code></td>
- <td>Enable/disable debug messages for the specified debug tag.</td>
- <td rowspan="2">Use <code>-help-debug-tags</code> to print a list of debug component names that you can use in <code><tag></code>. </td>
-</tr>
-<tr>
- <td><code>-debug-no-<tag></code></td>
- <td>Disable debug messages for the specified debug tag.</td>
-</tr>
-<tr>
- <td><code>-logcat <logtags></code></td>
- <td>Enable logcat output with given tags.</td>
- <td>If the environment variable ANDROID_LOG_TAGS is defined and not
- empty, its value will be used to enable logcat output by default.</td>
-</tr>
-<tr>
- <td><code>-shell</code></td>
- <td>Create a root shell console on the current terminal.</td>
- <td>You can use this command even if the adb daemon in the emulated system is broken.
- Pressing Ctrl-c from the shell stops the emulator instead of the shell.</td>
-</tr>
-<tr>
- <td><code>-shell-serial <device></code></td>
- <td>Enable the root shell (as in <code>-shell</code> and specify the QEMU character
- device to use for communication with the shell.</td>
- <td><device> must be a QEMU device type. See the documentation for '-serial <em>dev</em>' at
- <a href="http://wiki.qemu.org/download/qemu-doc.html">wiki.qemu.org</a>
- for more information.</p>
-
-<p>Here are some examples: </p>
-<ul>
- <li><code>-shell-serial stdio</code> is identical to <code>-shell</code></li>
- <li><code>-shell-serial tcp::4444,server,nowait</code> lets you communicate with the shell over TCP port 4444</li>
- <li><code>-shell-serial fdpair:3:6</code> lets a parent process communicate with the shell using fds 3 (in) and 6 (out)</li>
- <li><code>-shell-serial fdpair:0:1</code> uses the normal stdin and stdout fds, except that QEMU won't tty-cook the data.</li>
- </ul>
-</td>
-</tr>
-<tr>
- <td><code>-show-kernel <name></code></td>
- <td>Display kernel messages.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-trace <name></code></td>
- <td>Enable code profiling (press F9 to start), written to a specified file.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-verbose</code></td>
- <td>Enable verbose output.</td>
- <td>Equivalent to <code>-debug-init</code>.
-<p>You can define the default verbose output options used by emulator instances in the Android environment variable
-ANDROID_VERBOSE. Define the options you want to use in a comma-delimited list, specifying only the stem of each option:
-<code>-debug-<tags>.</code> </p>
-<p>Here's an example showing ANDROID_VERBOSE defined with the <code>-debug-init</code> and <code>-debug-modem</code> options:
-<p><code>ANDROID_VERBOSE=init,modem</code></p>
-<p>For more information about debug tags, use <code><-help-debug-tags></code>.</p>
-</td>
-</tr>
-<tr>
- <td rowspan="6">Media</td>
- <td><code>-audio <backend></code></td>
- <td>Use the specified audio backend.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-audio-in <backend></code></td>
- <td>Use the specified audio-input backend.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-audio-out <backend></code></td>
- <td>Use the specified audio-output backend.</td>
- <td> </td>
-</tr>
-<!--<tr>
- <td><code>-mic <device or file></code></td>
- <td>Use device or WAV file for audio input.</td>
- <td> </td>
-</tr>
--->
-<tr>
- <td><code>-noaudio</code></td>
- <td>Disable audio support in the current emulator instance.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-radio <device></code></td>
- <td>Redirect radio modem interface to a host character device.</td>
- <td> </td></tr>
-<tr>
- <td><code>-useaudio</code></td>
- <td>Enable audio support in the current emulator instance.</td>
- <td>Enabled by default. </td>
-</tr>
-
-<tr>
- <td rowspan="7">Network</td>
- <td><code>-dns-server <servers></code></td>
- <td>Use the specified DNS server(s). </td>
- <td>The value of <code><servers></code> must be a comma-separated list of up to 4 DNS server names or
- IP addresses.</td>
-</tr>
-<tr>
- <td><code>-http-proxy <proxy></code></td>
- <td>Make all TCP connections through a specified HTTP/HTTPS proxy</td>
- <td>The value of <code><proxy></code> can be one of the following:<br>
- <code>http://<server>:<port></code><br>
- <code>http://<username>:<password>@<server>:<port></code>
- <p>The <code>http://</code> prefix can be omitted. If the <code>-http-proxy <proxy></code> command is not supplied,
- the emulator looks up the <code>http_proxy</code> environment variable and automatically uses any value matching
- the <code><proxy></code> format described above.</p></td>
-</tr>
-<tr>
- <td><code>-netdelay <delay></code></td>
- <td>Set network latency emulation to <delay>.</td>
- <td>Default value is <code>none</code>. See the table in <a href="#netdelay">Network Delay Emulation</a> for
- supported <code><delay></code> values. </td>
-</tr>
-<tr>
- <td><code>-netfast</code></td>
- <td>Shortcut for <code>-netspeed full -netdelay none</code></td>
- <td> </td></tr>
-<tr>
- <td><code>-netspeed <speed></code></td>
- <td>Set network speed emulation to <speed>.</td>
- <td>Default value is <code>full</code>. See the table in <a href="#netspeed">Network Speed Emulation</a> for
- supported <code><speed></code> values. </td>
-</tr>
-<tr>
- <td><code>-port <port></code></td>
- <td>Set the console port number for this emulator instance to <code><port></code>.</td>
- <td>The console port number must be an even integer between 5554 and 5584, inclusive. <code><port></code>+1
- must also be free and will be reserved for ADB.</td>
-</tr>
-<tr>
- <td><code>-report-console <socket></code></td>
- <td>Report the assigned console port for this emulator instance to a remote third party
- before starting the emulation. </td>
- <td><code><socket></code> must use one of these formats:
-
-<p><code>tcp:<port>[,server][,max=<seconds>]</code></br>
-<code>unix:<port>[,server][,max=<seconds>]</code></p>
-
-<p>Use <code>-help-report-console</code></p> to view more information about this topic. </td>
-</tr>
-<tr>
- <td rowspan="8">System</td>
- <td><code>-cpu-delay <delay></code></td>
- <td>Slow down emulated CPU speed by <delay> </td>
- <td>Supported values for <delay> are integers between 0 and 1000.
-
-<p>Note that the <delay> does not correlate to clock speed or other absolute metrics
-— it simply represents an abstract, relative delay factor applied non-deterministically
-in the emulator. Effective performance does not always
-scale in direct relationship with <delay> values.</p>
-</td>
-</tr>
-<tr>
- <td><code>-gps <device></code></td>
- <td>Redirect NMEA GPS to character device.</td>
- <td>Use this command to emulate an NMEA-compatible GPS unit connected to
- an external character device or socket. The format of <code><device></code> must be QEMU-specific
- serial device specification. See the documentation for 'serial -dev' at
- <a href="http://www.bellard.org/qemu/qemu-doc.html#SEC10">http://www.bellard.org/qemu/qemu-doc.html#SEC10</a>.
-</td>
-</tr>
-<tr>
- <td><code>-nojni</code></td>
- <td>Disable JNI checks in the Dalvik runtime.</td><td> </td></tr>
-<tr>
- <td><code>-qemu</code></td>
- <td>Pass arguments to qemu.</td>
- <td> </td></tr>
-<tr>
- <td><code>-qemu -h</code></td>
- <td>Display qemu help.</td>
- <td></td></tr>
-<tr>
- <td><code>-radio <device></code></td>
- <td>Redirect radio mode to the specified character device.</td>
- <td>The format of <code><device></code> must be QEMU-specific
- serial device specification. See the documentation for 'serial -dev' at
-<a href="http://www.bellard.org/qemu/qemu-doc.html#SEC10">http://www.bellard.org/qemu/qemu-doc.html#SEC10</a>.
-</td>
-</tr>
-<tr>
- <td><code>-timezone <timezone></code></td>
- <td>Set the timezone for the emulated device to <timezone>, instead of the host's timezone.</td>
- <td><code><timezone></code> must be specified in zoneinfo format. For example:
-<p>"America/Los_Angeles"<br>
-"Europe/Paris"</p>
-</td>
-</tr>
-<tr>
- <td><code>-version</code></td>
- <td>Display the emulator's version number.</td>
- <td> </td>
-</tr>
-<tr>
- <td rowspan="12">UI</td>
- <td><code>-dpi-device <dpi></code></td>
- <td>Scale the resolution of the emulator to match the screen size
- of a physical device.</td>
- <td>The default value is 165. See also <code>-scale</code>.</td>
-</tr>
-<tr>
- <td><code>-no-boot-anim</code></td>
- <td>Disable the boot animation during emulator startup.</td>
- <td>Disabling the boot animation can speed the startup time for the emulator.</td>
-</tr>
-<tr>
- <td><code>-no-window</code></td>
- <td>Disable the emulator's graphical window display.</td>
- <td> </td>
-</tr>
-<tr>
- <td><code>-scale <scale></code></td>
- <td>Scale the emulator window. </td>
- <td><code><scale></code> is a number between 0.1 and 3 that represents the desired scaling factor. You can
- also specify scale as a DPI value if you add the suffix "dpi" to the scale value. A value of "auto"
- tells the emulator to select the best window size.</td>
-</tr>
-<tr>
- <td><code>-raw-keys</code></td>
- <td>Disable Unicode keyboard reverse-mapping.</td>
- <td> </td></tr>
-<tr>
- <td><code>-noskin</code></td>
- <td>Don't use any emulator skin.</td>
- <td> </td></tr>
-<tr>
- <td><code>-keyset <file></code></td>
- <td>Use the specified keyset file instead of the default.</td>
- <td>The keyset file defines the list of key bindings between the emulator and the host keyboard.
- For more information, use <code>-help-keyset</code> to print information about this topic.
-</td>
-</tr>
-<tr>
- <td><code>-onion <image></code></td>
- <td>Use overlay image over screen.</td>
- <td>No support for JPEG. Only PNG is supported.</td></tr>
-<tr>
- <td><code>-onion-alpha <percent></code></td>
- <td>Specify onion skin translucency value (as percent).
- <td>Default is 50.</td>
-</tr>
-<tr>
- <td><code>-onion-rotation <position></code></td>
- <td>Specify onion skin rotation.
- <td><code><position></code> must be one of the values 0, 1, 2, 3.</td>
-</tr>
-<tr>
- <td><code>-skin <skinID></code></td>
- <td>This emulator option is deprecated. </td>
- <td>Please set skin options using AVDs, rather than by using this emulator
-option. Using this option may yield unexpected and in some cases misleading
-results, since the density with which to render the skin may not be defined.
-AVDs let you associate each skin with a default density and override the default
-as needed. For more information, see <a
-href="{@docRoot}guide/developing/devices/managing-avds.html#createavd">
-Managing Virtual Devices with AVD Manager</a>.
-</td>
-</tr>
-<tr>
- <td><code>-skindir <dir></code></td>
- <td>This emulator option is deprecated. </td>
- <td>See comments for <code>-skin</code>, above.</td></tr>
-</table>
-
-
-
-<h2 id="KeyMapping">Emulator Keyboard Mapping</h2>
-
-<p>The table below summarizes the mappings between the emulator keys and and
-the keys of your keyboard. </p>
-<p class="table-caption"><strong>Table 2.</strong> Emulator keyboard mapping</p>
+<p class="table-caption"><strong>Table 1.</strong> Emulator keyboard mapping</p>
<table border="0" style="clear:left;">
<tr>
<th>Emulated Device Key </th>
@@ -569,4 +129,453 @@
</tr>
</table>
-<p>Note that, to use keypad keys, you must first disable NumLock on your development computer. </p>
+
+<h2 id="startup-options">Command Line Parameters</h2>
+
+<p>The emulator supports a variety of options that you can specify
+when launching the emulator, to control its appearance or behavior.
+Here's the command-line syntax of the options available to the {@code emulator} program:</p>
+
+<pre>emulator -avd <avd_name> [-<option> [<value>]] ... [-<qemu args>]</pre>
+
+<p class="table-caption"><strong>Table 2.</strong> Emulator command line parameters</p>
+<table>
+<tr>
+ <th width="10%" >Category</th>
+ <th width="20%" >Option</th>
+ <th width="30%" >Description</th>
+ <th width="40%" >Comments</th>
+</tr>
+
+<tr>
+ <td>AVD</td>
+ <td><code>-avd <avd_name></code> or <br>
+ <code>@<avd_name></code></td>
+ <td><strong>Required</strong>. Specifies the AVD to load for this emulator
+ instance.</td>
+ <td>You must create an AVD configuration before launching the emulator. For
+ information, see <a href="{@docRoot}guide/developing/devices/managing-avds.html">Managing
+ AVDs with AVD Manager</a>.</td>
+<tr>
+ <td rowspan="7">Disk Images</td>
+ <td><code>-cache <filepath></code></td>
+ <td>Use <filepath> as the working cache partition image. </td>
+ <td>An absolute or relative path to the current working directory.
+ If no cache file is specified, the emulator's default behavior is to use a temporary file instead.
+ <p>For more information on disk images, use <code>-help-disk-images</code>.</p>
+</td></tr>
+<tr>
+ <td><code>-data <filepath></code></td>
+ <td>Use {@code <filepath>} as the working user-data disk image. </td>
+ <td>Optionally, you can specify a path relative to the current working directory.
+ If <code>-data</code> is not used, the emulator looks for a file named {@code userdata-qemu.img}
+ in the storage area of the AVD being used (see <code>-avd</code>).
+</td></tr>
+<!--
+<tr>
+ <td><code>-datadir <dir></code></td>
+ <td>Search for the user-data disk image specified in <code>-data</code> in <dir></td>
+ <td><code><dir></code> is a path relative to the current working directory.
+
+<p>If you do not specify <code>-datadir</code>, the emulator looks for the user-data image
+in the storage area of the AVD being used (see <code>-avd</code>)</p><p>For more information
+on disk images, use <code>-help-disk-images</code>.</p>
+</td></tr>
+-->
+<!--
+<tr>
+ <td><code>-image <filepath></code></td>
+ <td>Use <filepath> as the system image.</td>
+ <td>Optionally, you can specify a path relative to the current working directory.
+ Default is <system>/system.img.</td>
+</tr>
+-->
+<tr>
+ <td><code>-initdata <filepath></code></td>
+ <td>When resetting the user-data image (through <code>-wipe-data</code>), copy the contents
+ of this file to the new user-data disk image. By default, the emulator copies the <code><system>/userdata.img</code>.</td>
+ <td>Optionally, you can specify a path relative to the current working directory. See also <code>-wipe-data</code>.
+ <p>For more information on disk images, use <code>-help-disk-images</code>.</p></td>
+</tr>
+<tr>
+ <td><code>-nocache</code></td>
+ <td>Start the emulator without a cache partition.</td>
+ <td>See also <code>-cache <file></code>.</td>
+</tr>
+<tr>
+ <td><code>-ramdisk <filepath></code></td>
+ <td>Use <filepath> as the ramdisk image.</td>
+ <td>Default value is <code><system>/ramdisk.img</code>.
+ <p>Optionally, you can specify a path relative to the current working directory.
+ For more information on disk images, use <code>-help-disk-images</code>.</p>
+</td>
+</tr>
+<tr>
+ <td><code>-sdcard <filepath></code></td>
+ <td>Use <file> as the SD card image.</td>
+ <td>Default value is <code><system>/sdcard.img</code>.
+ <p>Optionally, you can specify a path relative to the current working directory. For more information on disk images, use <code>-help-disk-images</code>.</p>
+</td>
+</tr>
+<!--
+<tr>
+ <td><code>-system <dirpath></code></td>
+ <td>Search for system, ramdisk and user data images in <dir>.</td>
+ <td><code><dir></code> is a directory path relative to the current
+ working directory.</td>
+</tr>
+-->
+<tr>
+ <td><code>-wipe-data</code></td>
+ <td>Reset the current user-data disk image (that is, the file specified by <code>-datadir</code> and
+ <code>-data</code>, or the default file). The emulator deletes all data from the user data image file,
+ then copies the contents of the file at <code>-inidata</code> data to the image file before starting.
+ </td>
+ <td>See also <code>-initdata</code>.
+ <p>For more information on disk images, use <code>-help-disk-images</code>.</p>
+</td>
+</tr>
+<tr>
+ <td rowspan="9">Debug</td>
+ <td><code>-debug <tags></code></td>
+ <td>Enable/disable debug messages for the specified debug tags.</td>
+ <td><code><tags></code> is a space/comma/column-separated list of debug component names.
+ Use <code>-help-debug-tags</code> to print a list of debug component names that you can use. </td>
+</tr>
+<tr>
+ <td><code>-debug-<tag></code></td>
+ <td>Enable/disable debug messages for the specified debug tag.</td>
+ <td rowspan="2">Use <code>-help-debug-tags</code> to print a list of debug component names that you can use in <code><tag></code>. </td>
+</tr>
+<tr>
+ <td><code>-debug-no-<tag></code></td>
+ <td>Disable debug messages for the specified debug tag.</td>
+</tr>
+<tr>
+ <td><code>-logcat <logtags></code></td>
+ <td>Enable logcat output with given tags.</td>
+ <td>If the environment variable ANDROID_LOG_TAGS is defined and not
+ empty, its value will be used to enable logcat output by default.</td>
+</tr>
+<tr>
+ <td><code>-shell</code></td>
+ <td>Create a root shell console on the current terminal.</td>
+ <td>You can use this command even if the adb daemon in the emulated system is broken.
+ Pressing Ctrl-c from the shell stops the emulator instead of the shell.</td>
+</tr>
+<tr>
+ <td><code>-shell-serial <device></code></td>
+ <td>Enable the root shell (as in <code>-shell</code> and specify the QEMU character
+ device to use for communication with the shell.</td>
+ <td><device> must be a QEMU device type. See the documentation for '-serial <em>dev</em>' at
+ <a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>
+ for a list of device types.
+
+<p>Here are some examples: </p>
+<ul>
+ <li><code>-shell-serial stdio</code> is identical to <code>-shell</code></li>
+ <li><code>-shell-serial tcp::4444,server,nowait</code> lets you communicate with the shell over TCP port 4444</li>
+ <li><code>-shell-serial fdpair:3:6</code> lets a parent process communicate with the shell using fds 3 (in) and 6 (out)</li>
+ <li><code>-shell-serial fdpair:0:1</code> uses the normal stdin and stdout fds, except that QEMU won't tty-cook the data.</li>
+ </ul>
+</td>
+</tr>
+<tr>
+ <td><code>-show-kernel <name></code></td>
+ <td>Display kernel messages.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-trace <name></code></td>
+ <td>Enable code profiling (press F9 to start), written to a specified file.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-verbose</code></td>
+ <td>Enable verbose output.</td>
+ <td>Equivalent to <code>-debug-init</code>.
+<p>You can define the default verbose output options used by emulator instances in the Android environment variable
+ANDROID_VERBOSE. Define the options you want to use in a comma-delimited list, specifying only the stem of each option:
+<code>-debug-<tags>.</code> </p>
+<p>Here's an example showing ANDROID_VERBOSE defined with the <code>-debug-init</code> and <code>-debug-modem</code> options:
+<p><code>ANDROID_VERBOSE=init,modem</code></p>
+<p>For more information about debug tags, use <code><-help-debug-tags></code>.</p>
+</td>
+</tr>
+<tr>
+ <td rowspan="6">Media</td>
+ <td><code>-audio <backend></code></td>
+ <td>Use the specified audio backend.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-audio-in <backend></code></td>
+ <td>Use the specified audio-input backend.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-audio-out <backend></code></td>
+ <td>Use the specified audio-output backend.</td>
+ <td> </td>
+</tr>
+<!--<tr>
+ <td><code>-mic <device or file></code></td>
+ <td>Use device or WAV file for audio input.</td>
+ <td> </td>
+</tr>
+-->
+<tr>
+ <td><code>-noaudio</code></td>
+ <td>Disable audio support in the current emulator instance.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-radio <device></code></td>
+ <td>Redirect radio modem interface to a host character device.</td>
+ <td> </td></tr>
+<tr>
+ <td><code>-useaudio</code></td>
+ <td>Enable audio support in the current emulator instance.</td>
+ <td>Enabled by default. </td>
+</tr>
+
+<tr>
+ <td rowspan="7">Network</td>
+ <td><code>-dns-server <servers></code></td>
+ <td>Use the specified DNS server(s). </td>
+ <td>The value of <code><servers></code> must be a comma-separated list of up to 4 DNS server names or
+ IP addresses.</td>
+</tr>
+<tr>
+ <td><code>-http-proxy <proxy></code></td>
+ <td>Make all TCP connections through a specified HTTP/HTTPS proxy</td>
+ <td>The value of <code><proxy></code> can be one of the following:<br>
+ <code>http://<server>:<port></code><br>
+ <code>http://<username>:<password>@<server>:<port></code>
+ <p>The <code>http://</code> prefix can be omitted. If the <code>-http-proxy <proxy></code> command is not supplied,
+ the emulator looks up the <code>http_proxy</code> environment variable and automatically uses any value matching
+ the <code><proxy></code> format described above.</p></td>
+</tr>
+<tr>
+ <td><code>-netdelay <delay></code></td>
+ <td>Set network latency emulation to <delay>.</td>
+ <td>Default value is <code>none</code>. See the table in
+ <a href="{@docRoot}guide/developing/devices/emulator.html#netdelay">Network Delay Emulation</a>
+ for supported <code><delay></code> values. </td>
+</tr>
+<tr>
+ <td><code>-netfast</code></td>
+ <td>Shortcut for <code>-netspeed full -netdelay none</code></td>
+ <td> </td></tr>
+<tr>
+ <td><code>-netspeed <speed></code></td>
+ <td>Set network speed emulation to <speed>.</td>
+ <td>Default value is <code>full</code>. See the table in
+ <a href="{@docRoot}guide/developing/devices/emulator.html#netspeed">Network Speed Emulation</a> for
+ supported <code><speed></code> values. </td>
+</tr>
+<tr>
+ <td><code>-port <port></code></td>
+ <td>Set the console port number for this emulator instance to <code><port></code>.</td>
+ <td>The console port number must be an even integer between 5554 and 5584, inclusive. <code><port></code>+1
+ must also be free and will be reserved for ADB.</td>
+</tr>
+<tr>
+ <td><code>-report-console <socket></code></td>
+ <td>Report the assigned console port for this emulator instance to a remote third party
+ before starting the emulation. </td>
+ <td><code><socket></code> must use one of these formats:
+
+<p><code>tcp:<port>[,server][,max=<seconds>]</code></br>
+<code>unix:<port>[,server][,max=<seconds>]</code></p>
+
+<p>Use <code>-help-report-console</code></p> to view more information about this topic. </td>
+</tr>
+<tr>
+ <td rowspan="10">System</td>
+ <td><code>-cpu-delay <delay></code></td>
+ <td>Slow down emulated CPU speed by <delay> </td>
+ <td>Supported values for <delay> are integers between 0 and 1000.
+
+<p>Note that the <delay> does not correlate to clock speed or other absolute metrics
+— it simply represents an abstract, relative delay factor applied non-deterministically
+in the emulator. Effective performance does not always
+scale in direct relationship with <delay> values.</p>
+</td>
+</tr>
+<tr>
+ <td><code>-gps <device></code></td>
+ <td>Redirect NMEA GPS to character device.</td>
+ <td>Use this command to emulate an NMEA-compatible GPS unit connected to
+ an external character device or socket. The format of <code><device></code> must be QEMU-specific
+ serial device specification. See the documentation for 'serial -dev' at
+ <a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>.
+</td>
+</tr>
+<tr>
+ <td><code>-nojni</code></td>
+ <td>Disable JNI checks in the Dalvik runtime.</td><td> </td></tr>
+<tr>
+ <td><code>-qemu</code></td>
+ <td>Pass arguments to the qemu emulator software.</td>
+ <td><p class="caution"><strong>Important:</strong> When using this option, make sure it is the
+ <em>last option</em> specified, since all options after it are interpretted as qemu-specific
+ options.</p></td></tr>
+<tr>
+ <td><code>-qemu -enable-kvm</code></td>
+ <td>Enable KVM acceleration of the emulator virtual machine.</td>
+ <td>This option is only effective when your system is set up to use
+ <a href="{@docRoot}guide/developing/devices/emulator.html#vm-linux">KVM-based VM acceleration</a>.
+ You can optionally specify a memory size ({@code -m <size>}) for the VM, which should match
+ your emulator's memory size:</p>
+ {@code -qemu -m 512 -enable-kvm}<br>
+ {@code -qemu -m 1024 -enable-kvm}
+ </td></tr>
+<tr>
+ <td><code>-qemu -h</code></td>
+ <td>Display qemu help.</td>
+ <td></td></tr>
+<tr>
+ <td><code>-gpu on</code></td>
+ <td>Turn on graphics acceleration for the emulator.</td>
+ <td>This option is only available for emulators using a system image with API Level 15, revision 3
+ and higher. For more information, see
+ <a href="{@docRoot}guide/developing/devices/emulator.html#accel-graphics">Using the Android
+ Emulator</a>.</td></tr>
+<tr>
+ <td><code>-radio <device></code></td>
+ <td>Redirect radio mode to the specified character device.</td>
+ <td>The format of <code><device></code> must be QEMU-specific
+ serial device specification. See the documentation for 'serial -dev' at
+<a href="http://wiki.qemu.org/download/qemu-doc.html">http://wiki.qemu.org/download/qemu-doc.html</a>.
+</td>
+</tr>
+<tr>
+ <td><code>-timezone <timezone></code></td>
+ <td>Set the timezone for the emulated device to <timezone>, instead of the host's timezone.</td>
+ <td><code><timezone></code> must be specified in zoneinfo format. For example:
+<p>"America/Los_Angeles"<br>
+"Europe/Paris"</p>
+</td>
+</tr>
+<tr>
+ <td><code>-version</code></td>
+ <td>Display the emulator's version number.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td rowspan="12">UI</td>
+ <td><code>-dpi-device <dpi></code></td>
+ <td>Scale the resolution of the emulator to match the screen size
+ of a physical device.</td>
+ <td>The default value is 165. See also <code>-scale</code>.</td>
+</tr>
+<tr>
+ <td><code>-no-boot-anim</code></td>
+ <td>Disable the boot animation during emulator startup.</td>
+ <td>Disabling the boot animation can speed the startup time for the emulator.</td>
+</tr>
+<tr>
+ <td><code>-no-window</code></td>
+ <td>Disable the emulator's graphical window display.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-scale <scale></code></td>
+ <td>Scale the emulator window. </td>
+ <td><code><scale></code> is a number between 0.1 and 3 that represents the desired scaling factor. You can
+ also specify scale as a DPI value if you add the suffix "dpi" to the scale value. A value of "auto"
+ tells the emulator to select the best window size.</td>
+</tr>
+<tr>
+ <td><code>-raw-keys</code></td>
+ <td>Disable Unicode keyboard reverse-mapping.</td>
+ <td> </td></tr>
+<tr>
+ <td><code>-noskin</code></td>
+ <td>Don't use any emulator skin.</td>
+ <td> </td></tr>
+<tr>
+ <td><code>-keyset <file></code></td>
+ <td>Use the specified keyset file instead of the default.</td>
+ <td>The keyset file defines the list of key bindings between the emulator and the host keyboard.
+ For more information, use <code>-help-keyset</code> to print information about this topic.
+</td>
+</tr>
+<tr>
+ <td><code>-onion <image></code></td>
+ <td>Use overlay image over screen.</td>
+ <td>No support for JPEG. Only PNG is supported.</td></tr>
+<tr>
+ <td><code>-onion-alpha <percent></code></td>
+ <td>Specify onion skin translucency value (as percent).
+ <td>Default is 50.</td>
+</tr>
+<tr>
+ <td><code>-onion-rotation <position></code></td>
+ <td>Specify onion skin rotation.
+ <td><code><position></code> must be one of the values 0, 1, 2, 3.</td>
+</tr>
+<tr>
+ <td><code>-skin <skinID></code></td>
+ <td>This emulator option is deprecated. </td>
+ <td>Please set skin options using AVDs, rather than by using this emulator
+option. Using this option may yield unexpected and in some cases misleading
+results, since the density with which to render the skin may not be defined.
+AVDs let you associate each skin with a default density and override the default
+as needed. For more information, see <a
+href="{@docRoot}guide/developing/devices/managing-avds.html">Managing Virtual Devices
+with AVD Manager</a>.
+</td>
+</tr>
+<tr>
+ <td><code>-skindir <dir></code></td>
+ <td>This emulator option is deprecated. </td>
+ <td>See comments for <code>-skin</code>, above.</td>
+</tr>
+<tr>
+ <td rowspan="9">Help</td>
+ <td><code>-help</code></td>
+ <td>Print a list of all emulator options.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-help-all</code></td>
+ <td>Print help for all startup options.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-help-<option></code></td>
+ <td>Print help for a specific startup option.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-help-debug-tags</code></td>
+ <td>Print a list of all tags for <code>-debug <tags></code>.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-help-disk-images</code></td>
+ <td>Print help for using emulator disk images.</td>
+ <td> </td>
+ </tr>
+<tr>
+ <td><code>-help-environment</code></td>
+ <td>Print help for emulator environment variables.</td>
+ <td> </td>s
+</tr><tr>
+ <td><code>-help-keys</code></td>
+ <td>Print the current mapping of keys.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-help-keyset-file</code></td>
+ <td>Print help for defining a custom key mappings file.</td>
+ <td> </td>
+</tr>
+<tr>
+ <td><code>-help-virtual-device</code></td>
+ <td>Print help for Android Virtual Device usage.</td>
+ <td> </td>
+</tr>
+</table>
diff --git a/docs/html/guide/developing/tools/monkeyrunner_concepts.jd b/docs/html/guide/developing/tools/monkeyrunner_concepts.jd
index 499b610..346a0c6 100644
--- a/docs/html/guide/developing/tools/monkeyrunner_concepts.jd
+++ b/docs/html/guide/developing/tools/monkeyrunner_concepts.jd
@@ -236,7 +236,7 @@
You can generate an API reference for monkeyrunner by running:
</p>
<pre>
-monkeyrunner <format> help.py <outfile>
+monkeyrunner help.py <format> <outfile>
</pre>
<p>
The arguments are:
diff --git a/docs/html/guide/market/expansion-files.jd b/docs/html/guide/market/expansion-files.jd
index 01acb33..36b8f9c 100644
--- a/docs/html/guide/market/expansion-files.jd
+++ b/docs/html/guide/market/expansion-files.jd
@@ -1088,12 +1088,8 @@
<dd>Most applications don't need to use this class. This class defines a {@link
android.content.ContentProvider} that marshals the data from the ZIP files through a content
provider {@link android.net.Uri} in order to provide file access for certain Android APIs that
-expect {@link android.net.Uri} access to media files.
- <p>The sample application available in the
-Apk Expansion package demonstrates a scenario in which this class is useful
-to specify a video with {@link android.widget.VideoView#setVideoURI
-VideoView.setVideoURI()}. See the sample app's class {@code SampleZipfileProvider} for an
-example of how to extend this class to use in your application.</p></dd>
+expect {@link android.net.Uri} access to media files. For example, this is useful if you want to
+play a video with {@link android.widget.VideoView#setVideoURI VideoView.setVideoURI()}.</p></dd>
</dl>
<h4>Reading from a ZIP file</h4>
diff --git a/docs/html/guide/market/licensing/setting-up.jd b/docs/html/guide/market/licensing/setting-up.jd
index 15214d1..41e3bc4 100644
--- a/docs/html/guide/market/licensing/setting-up.jd
+++ b/docs/html/guide/market/licensing/setting-up.jd
@@ -177,12 +177,6 @@
<strong>Google APIs Add-On, API 8 (release 2) or higher</strong> includes the necessary Google
Play services.</p>
-
-<img src="{@docRoot}images/licensing_gapis_8.png" alt=""/>
-<p class="img-caption"><strong>Figure 2.</strong> Google APIs
-Add-On, API 8 (release 2) or higher lets you debug and test your licensing
-implementation in an emulator.</p>
-
<p>To set up an emulator for adding licensing to an application, follow
these steps: </p>
@@ -190,7 +184,7 @@
<li>Launch the Android SDK Manager. </li>
<li>In the <strong>Available Packages</strong> panel, select and download the
SDK component "Google APIs (Google Inc.) - API Level 8" (or higher) from the SDK
-repository, as shown in figure 2.
+repository.
<p>When the download is complete, use the Android SDK Manager to
create a new AVD based on that component, described next.</p></li>
<li>In the <strong>Virtual
@@ -256,11 +250,11 @@
<p>To download the LVL component into your development environment, use the
Android SDK Manager. Launch the Android SDK Manager and then
-select the "Google Market Licensing" component, as shown in figure 3.
+select the "Google Market Licensing" component, as shown in figure 2.
Accept the terms and click <strong>Install Selected</strong> to begin the download. </p>
<img src="{@docRoot}images/licensing_package.png" alt=""/>
-<p class="img-caption"><strong>Figure 3.</strong> The Licensing package contains the LVL and
+<p class="img-caption"><strong>Figure 2.</strong> The Licensing package contains the LVL and
the LVL sample application.</p>
<p>When the download is complete, the Android SDK Manager installs both
@@ -390,7 +384,7 @@
<img src="{@docRoot}images/licensing_add_library.png" alt=""/>
-<p class="img-caption"><strong>Figure 4.</strong> If you are
+<p class="img-caption"><strong>Figure 3.</strong> If you are
working in Eclipse with ADT, you can add the LVL library project to your
application from the application's project properties.</p>
@@ -494,7 +488,7 @@
href="{@docRoot}guide/market/licensing/licensing-reference.html">Licensing Reference</a>.</p>
<img src="{@docRoot}images/licensing_test_response.png" alt=""/>
-<p class="img-caption"><strong>Figure 5.</strong> The Licensing
+<p class="img-caption"><strong>Figure 4.</strong> The Licensing
panel of your account's Edit Profile page, showing the Test Accounts field and the
Test Response menu.</p>
@@ -586,7 +580,7 @@
<h4 id="reg-test-acct">Registering test accounts on the publisher account</h4>
<p>To get started, you need to register each test account in your publisher
-account. As shown in Figure 5, you
+account. As shown in Figure 4, you
register test accounts in the Licensing panel of your publisher account's Edit
Profile page. Simply enter the accounts as a comma-delimited list and click
<strong>Save</strong> to save your profile changes.</p>
diff --git a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd b/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd
index 465cf54..0880614 100644
--- a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd
+++ b/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd
@@ -154,7 +154,7 @@
<p>Because the activities in the back stack are never rearranged, if your application allows
users to start a particular activity from more than one activity, a new instance of
-that activity is created and popped onto the stack (rather than bringing any previous instance of
+that activity is created and pushed onto the stack (rather than bringing any previous instance of
the activity to the top). As such, one activity in your application might be instantiated multiple
times (even from different tasks), as shown in figure 3. As such, if the user navigates backward
using the <em>Back</em> button, each instance of the activity is revealed in the order they were
@@ -291,7 +291,7 @@
should associate with a task, then Activity A's request (as defined in the intent) is honored
over Activity B's request (as defined in its manifest).</p>
-<p class="note"><strong>Note:</strong> Some the launch modes available in the manifest
+<p class="note"><strong>Note:</strong> Some launch modes available for the manifest file
are not available as flags for an intent and, likewise, some launch modes available as flags
for an intent cannot be defined in the manifest.</p>
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index 9788945..98968d7 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -37,7 +37,7 @@
<dt>description:</dt>
<dd>The root element of the AndroidManifest.xml file. It must
contain an <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> element
-and specify {@code xlmns:android} and {@code package} attributes.</dd>
+and specify {@code xmlns:android} and {@code package} attributes.</dd>
<dt>attributes:</dt>
<dd>
diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd
index 40b5c3f..de89568 100644
--- a/docs/html/guide/topics/providers/content-provider-basics.jd
+++ b/docs/html/guide/topics/providers/content-provider-basics.jd
@@ -123,7 +123,7 @@
<!-- Intro paragraphs -->
<p>
- A content provider manages access to a central repository of data. The provider and
+ A content provider manages access to a central repository of data. A provider
is part of an Android application, which often provides its own UI for working with
the data. However, content providers are primarily intended to be used by other
applications, which access the provider using a provider client object. Together, providers
@@ -569,7 +569,7 @@
</pre>
<p>
A selection clause that uses <code>?</code> as a replaceable parameter and an array of
- selection arguments array are preferred way to specify a selection, even the provider isn't
+ selection arguments array are preferred way to specify a selection, even if the provider isn't
based on an SQL database.
</p>
<!-- Displaying the results -->
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index 380791a..b33a097 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -287,9 +287,8 @@
from the SIM card in the device. For example, <code>mcc310</code> is U.S. on any carrier,
<code>mcc310-mnc004</code> is U.S. on Verizon, and <code>mcc208-mnc00</code> is France on
Orange.</p>
- <p>If the device uses a radio connection (GSM phone), the MCC comes
- from the SIM, and the MNC comes from the network to which the
- device is connected.</p>
+ <p>If the device uses a radio connection (GSM phone), the MCC and MNC values come
+ from the SIM card.</p>
<p>You can also use the MCC alone (for example, to include country-specific legal
resources in your application). If you need to specify based on the language only, then use the
<em>language and region</em> qualifier instead (discussed next). If you decide to use the MCC and
diff --git a/docs/html/guide/topics/resources/string-resource.jd b/docs/html/guide/topics/resources/string-resource.jd
index ecd2d48..5f5484e 100644
--- a/docs/html/guide/topics/resources/string-resource.jd
+++ b/docs/html/guide/topics/resources/string-resource.jd
@@ -358,11 +358,14 @@
<pre>
int count = getNumberOfsongsAvailable();
Resources res = {@link android.content.Context#getResources()};
-String songsFound = res.{@link android.content.res.Resources#getQuantityString(int,int)
-getQuantityString}(R.plurals.numberOfSongsAvailable, count, count);
+String songsFound = res.<a
+href="{@docRoot}reference/android/content/res/Resources.html#getQuantityString(int, int, java.lang.Object...)"
+>getQuantityString</a>(R.plurals.numberOfSongsAvailable, count, count);
</pre>
-<p>When using the {@link android.content.res.Resources#getQuantityString(int,int)
-getQuantityString()} method, you need to pass the {@code count} twice if your string includes
+
+<p>When using the <a
+href="{@docRoot}reference/android/content/res/Resources.html#getQuantityString(int, int, java.lang.Object...)">{@code
+getQuantityString()}</a> method, you need to pass the {@code count} twice if your string includes
<a href="#FormattingAndStyling">string formatting</a> with a number. For example, for the string
{@code %d songs found}, the first {@code count} parameter selects the appropriate plural string and
the second {@code count} parameter is inserted into the {@code %d} placeholder. If your plural
diff --git a/docs/html/guide/topics/sensors/index.jd b/docs/html/guide/topics/sensors/index.jd
index 75a1716..43903dc 100644
--- a/docs/html/guide/topics/sensors/index.jd
+++ b/docs/html/guide/topics/sensors/index.jd
@@ -43,7 +43,7 @@
application might use the geomagnetic field sensor and accelerometer to report a compass
bearing.</p>
-<p>The Android platform supports four broad categories of sensors:</p>
+<p>The Android platform supports three broad categories of sensors:</p>
<ul>
<li>Motion sensors
diff --git a/docs/html/guide/topics/ui/layout-objects.jd b/docs/html/guide/topics/ui/layout-objects.jd
index 8b2792d..e251fe9 100644
--- a/docs/html/guide/topics/ui/layout-objects.jd
+++ b/docs/html/guide/topics/ui/layout-objects.jd
@@ -163,7 +163,7 @@
<td>
<pre>
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/blue"
diff --git a/docs/html/guide/topics/wireless/wifip2p.jd b/docs/html/guide/topics/wireless/wifip2p.jd
index 4dd3d26..ec8e71e 100644
--- a/docs/html/guide/topics/wireless/wifip2p.jd
+++ b/docs/html/guide/topics/wireless/wifip2p.jd
@@ -333,7 +333,7 @@
...
mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);
mChannel = mManager.initialize(this, getMainLooper(), null);
- Receiver = new WiFiDirectBroadcastReceiver(manager, channel, this);
+ mReceiver = new WiFiDirectBroadcastReceiver(manager, channel, this);
...
}
</pre>
@@ -364,13 +364,13 @@
@Override
protected void onResume() {
super.onResume();
- registerReceiver(receiver, intentFilter);
+ registerReceiver(mReceiver, mIntentFilter);
}
/* unregister the broadcast receiver */
@Override
protected void onPause() {
super.onPause();
- unregisterReceiver(receiver);
+ unregisterReceiver(mReceiver);
}
</pre>
diff --git a/docs/html/images/avd-manager.png b/docs/html/images/avd-manager.png
index c33d8a8..fd373f9 100644
--- a/docs/html/images/avd-manager.png
+++ b/docs/html/images/avd-manager.png
Binary files differ
diff --git a/docs/html/images/billing_package.png b/docs/html/images/billing_package.png
index 951e117..6e673c8 100644
--- a/docs/html/images/billing_package.png
+++ b/docs/html/images/billing_package.png
Binary files differ
diff --git a/docs/html/images/developing/avd-dialog.png b/docs/html/images/developing/avd-dialog.png
index d0e2eec..9dfbd68 100644
--- a/docs/html/images/developing/avd-dialog.png
+++ b/docs/html/images/developing/avd-dialog.png
Binary files differ
diff --git a/docs/html/images/developing/sdk-usb-driver.png b/docs/html/images/developing/sdk-usb-driver.png
index 207d3d7..3489991 100644
--- a/docs/html/images/developing/sdk-usb-driver.png
+++ b/docs/html/images/developing/sdk-usb-driver.png
Binary files differ
diff --git a/docs/html/images/emulator-wvga800l.png b/docs/html/images/emulator-wvga800l.png
index a214033..c92c1b9 100644
--- a/docs/html/images/emulator-wvga800l.png
+++ b/docs/html/images/emulator-wvga800l.png
Binary files differ
diff --git a/docs/html/images/licensing_add_library.png b/docs/html/images/licensing_add_library.png
index 3bbe6d5..257a628 100644
--- a/docs/html/images/licensing_add_library.png
+++ b/docs/html/images/licensing_add_library.png
Binary files differ
diff --git a/docs/html/images/licensing_gapis_8.png b/docs/html/images/licensing_gapis_8.png
deleted file mode 100644
index 480d989..0000000
--- a/docs/html/images/licensing_gapis_8.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/licensing_package.png b/docs/html/images/licensing_package.png
index eb2c5cf..dc34473 100644
--- a/docs/html/images/licensing_package.png
+++ b/docs/html/images/licensing_package.png
Binary files differ
diff --git a/docs/html/images/sdk_manager_packages.png b/docs/html/images/sdk_manager_packages.png
index 19a7cb9..a0e8108 100644
--- a/docs/html/images/sdk_manager_packages.png
+++ b/docs/html/images/sdk_manager_packages.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index cfd9ff1..787a655 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -12,10 +12,8 @@
</div><!-- end homeTitle -->
<div id="announcement-block">
<!-- total max width is 520px -->
- <a href="{@docRoot}design/index.html">
<img src="{@docRoot}images/home/play_logo.png"
alt="Google Play" width="120px" style="padding:10px 52px"/>
- </a>
<div id="announcement" style="width:275px">
<p>Introducing <strong>Google Play</strong>: An integrated digital content destination where
users buy and enjoy all of their favorite content in one place. It's the new destination for
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index 8483037..e1a5e0f 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -99,6 +99,27 @@
</li>
<li class="toggle-list">
+ <div><a href="<?cs var:toroot ?>training/search/index.html">
+ <span class="en">Adding Search Functionality</span>
+ </a> <span class="new">new!</span>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>training/search/setup.html">
+ <span class="en">Setting up the Search Interface</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/search/search.html">
+ <span class="en">Storing and Searching for Data</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/search/backward-compat.html">
+ <span class="en">Remaining Backward Compatible</span>
+ </a>
+ </li>
+ </ul>
+ </li>
+
+ <li class="toggle-list">
<div><a href="<?cs var:toroot ?>training/id-auth/index.html">
<span class="en">Remembering Users</span>
</a></div>
diff --git a/docs/html/resources/tutorials/views/hello-webview.jd b/docs/html/resources/tutorials/views/hello-webview.jd
index 2d07647..f6a6a71 100644
--- a/docs/html/resources/tutorials/views/hello-webview.jd
+++ b/docs/html/resources/tutorials/views/hello-webview.jd
@@ -52,7 +52,7 @@
<li>While you're in the manifest, give some more space for web pages by removing the title
bar, with the "NoTitleBar" theme:
<pre>
-<activity android:name=".HelloGoogleMaps" android:label="@string/app_name"
+<activity android:name=".HelloWebView" android:label="@string/app_name"
<strong>android:theme="@android:style/Theme.NoTitleBar"</strong>>
</pre>
</li>
diff --git a/docs/html/sdk/android-4.0-highlights.jd b/docs/html/sdk/android-4.0-highlights.jd
index 50e9a14..98f467d 100644
--- a/docs/html/sdk/android-4.0-highlights.jd
+++ b/docs/html/sdk/android-4.0-highlights.jd
@@ -343,7 +343,7 @@
<p>The Camera app includes many new features that let users capture special moments
with great photos and videos. After capturing images, they can edit and share
-them easily with friemds. </p>
+them easily with friends. </p>
<p>When taking pictures, <strong>continuous focus</strong>, <strong>zero shutter
lag exposure</strong>, and decreased shot-to-shot speed help capture clear,
diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd
index 2bd031e..6869d74 100644
--- a/docs/html/sdk/win-usb.jd
+++ b/docs/html/sdk/win-usb.jd
@@ -147,7 +147,7 @@
<h2 id="WinUsbDriver">Downloading the Google USB Driver</h2>
-<div class="figure" style="width:498px;margin:0">
+<div class="figure" style="width:536px;margin:0">
<img src="{@docRoot}images/developing/sdk-usb-driver.png" alt="" />
<p class="img-caption"><strong>Figure 1.</strong> The SDK and AVD Manager
with the Google USB Driver selected.</p>
diff --git a/docs/html/training/monitoring-device-state/docking-monitoring.jd b/docs/html/training/monitoring-device-state/docking-monitoring.jd
index 392ce30..82d655e 100644
--- a/docs/html/training/monitoring-device-state/docking-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/docking-monitoring.jd
@@ -15,7 +15,7 @@
<h2>This lesson teaches you to</h2>
<ol>
- <li><a href="#CurrentDockState">Request the Audio Focus</a></li>
+ <li><a href="#CurrentDockState">Determine the Current Docking State</a></li>
<li><a href="#DockType">Determine the Current Dock Type</a></li>
<li><a href="#MonitorDockState">Monitor for Changes in the Dock State or Type</a></li>
</ol>
diff --git a/docs/html/training/search/backward-compat.jd b/docs/html/training/search/backward-compat.jd
new file mode 100644
index 0000000..0894fa9
--- /dev/null
+++ b/docs/html/training/search/backward-compat.jd
@@ -0,0 +1,87 @@
+page.title=Remaining Backward Compatible
+trainingnavtop=true
+previous.title=Storing and Searching for Data
+previous.link=search.html
+
+@jd:body
+
+ <div id="tb-wrapper">
+ <div id="tb">
+ <h2>This lesson teaches you to</h2>
+
+ <ul>
+ <li><a href="{@docRoot}training/search/backward-compat.html#set-sdk">Set Minimum
+ and Target API levels</a></li>
+
+ <li><a href="{@docRoot}training/search/backward-compat.html#provide-sd">Provide the Search
+ Dialog for Older Devices</a></li>
+
+ <li><a href="{@docRoot}training/search/backward-compat.html#check-ver">Check the Android Build
+ Version at Runtime</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <p>The {@link android.widget.SearchView} and action bar are only available on Android 3.0 and
+ later. To support older platforms, you can fall back to the search dialog. The search dialog is a
+ system provided UI that overlays on top of your application when invoked.</p>
+
+ <h2 id="set-sdk">Set Minimum and Target API levels</h2>
+
+ <p>To setup the search dialog, first declare in your manifest that you want to support older
+ devices, but want to target Android 3.0 or later versions. When you do this, your application
+ automatically uses the action bar on Android 3.0 or later and uses the traditional menu system on
+ older devices:</p>
+ <pre>
+<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15" />
+
+<application>
+...
+</pre>
+
+ <h2 id="provide-sd">Provide the Search Dialog for Older Devices</h2>
+
+ <p>To invoke the search dialog on older devices, call {@link
+ android.app.Activity#onSearchRequested onSearchRequested()} whenever a user selects the search
+ menu item from the options menu. Because Android 3.0 and higher devices show the
+ {@link android.widget.SearchView} in the action bar (as demonstrated in the first lesson), only versions
+ older than 3.0 call {@link android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} when the
+ user selects the search menu item.
+ </p>
+ <pre>
+@Override
+public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.search:
+ onSearchRequested();
+ return true;
+ default:
+ return false;
+ }
+}
+</pre>
+
+ <h2 id="check-ver">Check the Android Build Version at Runtime</h2>
+
+ <p>At runtime, check the device version to make sure an unsupported use of {@link
+ android.widget.SearchView} does not occur on older devices. In our example code, this happens in
+ the {@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method:</p>
+ <pre>
+@Override
+public boolean onCreateOptionsMenu(Menu menu) {
+
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.options_menu, menu);
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ SearchManager searchManager =
+ (SearchManager) getSystemService(Context.SEARCH_SERVICE);
+ SearchView searchView =
+ (SearchView) menu.findItem(R.id.search).getActionView();
+ searchView.setSearchableInfo(
+ searchManager.getSearchableInfo(getComponentName()));
+ searchView.setIconifiedByDefault(false);
+ }
+ return true;
+}
+</pre>
diff --git a/docs/html/training/search/index.jd b/docs/html/training/search/index.jd
new file mode 100644
index 0000000..bfd1618
--- /dev/null
+++ b/docs/html/training/search/index.jd
@@ -0,0 +1,53 @@
+page.title=Adding Search Functionality
+trainingnavtop=true
+startpage=true
+next.title=Setting Up the Search Interface
+next.link=setup.html
+
+@jd:body
+
+ <div id="tb-wrapper">
+ <div id="tb">
+ <h2>Dependencies and prerequisites</h2>
+
+ <ul>
+ <li>Android 3.0 or later (with some support for Android 2.1)</li>
+
+ <li>Experience building an Android <a href="{@docRoot}guide/topics/ui/index.html">User
+ Interface</a></li>
+ </ul>
+
+ <h2>You should also read</h2>
+
+ <ul>
+ <li><a href="{@docRoot}guide/topics/search/index.html">Search</a></li>
+
+ <li><a href="{@docRoot}resources/samples/SearchableDictionary/index.html">Searchable
+ Dictionary Sample App</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <p>Android's built-in search features offer apps an easy way to provide a
+ consistent search experience for all users. There are two ways to implement search in your app
+ depending on the version of Android that is running on the device. This class covers how to add
+ search with {@link android.widget.SearchView}, which was introduced in Android 3.0, while
+ maintaining backward compatibility with older versions of Android by using the default search
+ dialog provided by the system.</p>
+
+ <h2>Lessons</h2>
+
+ <dl>
+ <dt><b><a href="setup.html">Setting Up the Search Interface</a></b></dt>
+
+ <dd>Learn how to add a search interface to your app and how to configure an activity to handle
+ search queries.</dd>
+
+ <dt><b><a href="search.html">Storing and Searching for Data</a></b></dt>
+
+ <dd>Learn a simple way to store and search for data in a SQLite virtual database table.</dd>
+
+ <dt><b><a href="backward-compat.html">Remaining Backward Compatible</a></b></dt>
+
+ <dd>Learn how to keep search features backward compatible with older devices by using.</dd>
+ </dl>
\ No newline at end of file
diff --git a/docs/html/training/search/search.jd b/docs/html/training/search/search.jd
new file mode 100644
index 0000000..17e7640
--- /dev/null
+++ b/docs/html/training/search/search.jd
@@ -0,0 +1,217 @@
+page.title=Storing and Searching for Data
+trainingnavtop=true
+previous.title=Setting Up the Search Interface
+previous.link=setup.html
+next.title=Remaining Backward Compatible
+next.link=backward-compat.html
+
+@jd:body
+
+ <div id="tb-wrapper">
+ <div id="tb">
+ <h2>This lesson teaches you to</h2>
+
+ <ul>
+ <li><a href="{@docRoot}training/search/search.html#create">Create the Virtual
+ Table</a></li>
+
+ <li><a href="{@docRoot}training/search/search.html#populate">Populate the Virtual
+ Table</a></li>
+
+ <li><a href="{@docRoot}training/search/search.html#search">Search for the Query</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <p>There are many ways to store your data, such as in an online database, in a local SQLite
+ database, or even in a text file. It is up to you to decide what is the best solution for your
+ application. This lesson shows you how to create a SQLite virtual table that can provide robust
+ full-text searching. The table is populated with data from a text file that contains a word and
+ definition pair on each line in the file.</p>
+
+ <h2 id="create">Create the Virtual Table</h2>
+
+ <p>A virtual table behaves similarly to a SQLite table, but reads and writes to an object in
+ memory via callbacks, instead of to a database file. To create a virtual table, create a class
+ for the table:</p>
+ <pre>
+public class DatabaseTable {
+ private final DatabaseOpenHelper mDatabaseOpenHelper;
+
+ public DatabaseTable(Context context) {
+ mDatabaseOpenHelper = new DatabaseOpenHelper(context);
+ }
+}
+</pre>
+
+ <p>Create an inner class in <code>DatabaseTable</code> that extends {@link
+ android.database.sqlite.SQLiteOpenHelper}. The {@link android.database.sqlite.SQLiteOpenHelper} class
+ defines abstract methods that you must override so that your database table can be created and
+ upgraded when necessary. For example, here is some code that declares a database table that will
+ contain words for a dictionary app:</p>
+ <pre>
+public class DatabaseTable {
+
+ private static final String TAG = "DictionaryDatabase";
+
+ //The columns we'll include in the dictionary table
+ public static final String COL_WORD = "WORD";
+ public static final String COL_DEFINITION = "DEFINITION";
+
+ private static final String DATABASE_NAME = "DICTIONARY";
+ private static final String FTS_VIRTUAL_TABLE = "FTS";
+ private static final int DATABASE_VERSION = 1;
+
+ private final DatabaseOpenHelper mDatabaseOpenHelper;
+
+ public DatabaseTable(Context context) {
+ mDatabaseOpenHelper = new DatabaseOpenHelper(context);
+ }
+
+ private static class DatabaseOpenHelper extends SQLiteOpenHelper {
+
+ private final Context mHelperContext;
+ private SQLiteDatabase mDatabase;
+
+ private static final String FTS_TABLE_CREATE =
+ "CREATE VIRTUAL TABLE " + FTS_VIRTUAL_TABLE +
+ " USING fts3 (" +
+ COL_WORD + ", " +
+ COL_DEFINITION + ")";
+
+ DatabaseOpenHelper(Context context) {
+ super(context, DATABASE_NAME, null, DATABASE_VERSION);
+ mHelperContext = context;
+ }
+
+ @Override
+ public void onCreate(SQLiteDatabase db) {
+ mDatabase = db;
+ mDatabase.execSQL(FTS_TABLE_CREATE);
+ }
+
+ @Override
+ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+ Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
+ + newVersion + ", which will destroy all old data");
+ db.execSQL("DROP TABLE IF EXISTS " + FTS_VIRTUAL_TABLE);
+ onCreate(db);
+ }
+ }
+}
+</pre>
+
+ <h2 id="populate">Populate the Virtual Table</h2>
+
+ <p>The table now needs data to store. The following code shows you how to read a text file
+ (located in <code>res/raw/definitions.txt</code>) that contains words and their definitions, how
+ to parse that file, and how to insert each line of that file as a row in the virtual table. This
+ is all done in another thread to prevent the UI from locking. Add the following code to your
+ <code>DatabaseOpenHelper</code> inner class.</p>
+
+ <p class="note"><strong>Tip:</strong> You also might want to set up a callback to notify your UI
+ activity of this thread's completion.</p>
+ <pre>
+private void loadDictionary() {
+ new Thread(new Runnable() {
+ public void run() {
+ try {
+ loadWords();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }).start();
+ }
+
+private void loadWords() throws IOException {
+ final Resources resources = mHelperContext.getResources();
+ InputStream inputStream = resources.openRawResource(R.raw.definitions);
+ BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+
+ try {
+ String line;
+ while ((line = reader.readLine()) != null) {
+ String[] strings = TextUtils.split(line, "-");
+ if (strings.length < 2) continue;
+ long id = addWord(strings[0].trim(), strings[1].trim());
+ if (id < 0) {
+ Log.e(TAG, "unable to add word: " + strings[0].trim());
+ }
+ }
+ } finally {
+ reader.close();
+ }
+}
+
+public long addWord(String word, String definition) {
+ ContentValues initialValues = new ContentValues();
+ initialValues.put(COL_WORD, word);
+ initialValues.put(COL_DEFINITION, definition);
+
+ return mDatabase.insert(FTS_VIRTUAL_TABLE, null, initialValues);
+}
+</pre>
+
+ <p>Call the <code>loadDictionary()</code> method wherever appropriate to populate the table. A
+ good place would be in the {@link android.database.sqlite.SQLiteOpenHelper#onCreate onCreate()}
+ method of the <code>DatabaseOpenHelper</code> class, right after you create the table:</p>
+ <pre>
+@Override
+public void onCreate(SQLiteDatabase db) {
+ mDatabase = db;
+ mDatabase.execSQL(FTS_TABLE_CREATE);
+ loadDictionary();
+}
+</pre>
+
+ <h2 id="search">Search for the Query</h2>
+
+ <p>When you have the virtual table created and populated, use the query supplied by your {@link
+ android.widget.SearchView} to search the data. Add the following methods to the
+ <code>DatabaseTable</code> class to build a SQL statement that searches for the query:</p>
+ <pre>
+public Cursor getWordMatches(String query, String[] columns) {
+ String selection = COL_WORD + " MATCH ?";
+ String[] selectionArgs = new String[] {query+"*"};
+
+ return query(selection, selectionArgs, columns);
+}
+
+private Cursor query(String selection, String[] selectionArgs, String[] columns) {
+ SQLiteQueryBuilder builder = new SQLiteQueryBuilder();
+ builder.setTables(FTS_VIRTUAL_TABLE);
+
+ Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(),
+ columns, selection, selectionArgs, null, null, null);
+
+ if (cursor == null) {
+ return null;
+ } else if (!cursor.moveToFirst()) {
+ cursor.close();
+ return null;
+ }
+ return cursor;
+}
+</pre>
+
+ <p>Search for a query by calling <code>getWordMatches()</code>. Any matching results are returned
+ in a {@link android.database.Cursor} that you can iterate through or use to build a {@link android.widget.ListView}.
+ This example calls <code>getWordMatches()</code> in the <code>handleIntent()</code> method of the searchable
+ activity. Remember that the searchable activity receives the query inside of the {@link
+ android.content.Intent#ACTION_SEARCH} intent as an extra, because of the intent filter that you
+ previously created:</p>
+ <pre>
+DatabaseTable db = new DatabaseTable(this);
+
+...
+
+private void handleIntent(Intent intent) {
+
+ if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
+ String query = intent.getStringExtra(SearchManager.QUERY);
+ Cursor c = db.getWordMatches(query, null);
+ //process Cursor and display results
+ }
+}
+</pre>
\ No newline at end of file
diff --git a/docs/html/training/search/setup.jd b/docs/html/training/search/setup.jd
new file mode 100644
index 0000000..044e422
--- /dev/null
+++ b/docs/html/training/search/setup.jd
@@ -0,0 +1,197 @@
+page.title=Setting Up the Search Interface
+trainingnavtop=true
+next.title=Storing and Searching for Data
+next.link=search.html
+
+@jd:body
+
+ <div id="tb-wrapper">
+ <div id="tb">
+ <h2>This lesson teaches you to</h2>
+
+ <ul>
+ <li><a href="{@docRoot}training/search/setup.html#add-sv">Add the Search View to the Action
+ Bar</a></li>
+
+ <li><a href="{@docRoot}training/search/setup.html#create-sc">Create a Searchable
+ Configuration</a></li>
+
+ <li><a href="{@docRoot}training/search/setup.html#create-sa">Create a Searchable
+ Activity</a></li>
+ </ul>
+
+ <h2>You should also read:</h2>
+
+ <ul>
+ <li><a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <p>Beginning in Android 3.0, using the {@link android.widget.SearchView} widget as an item in
+ the action bar is the preferred way to provide search in your app. Like with all items in
+ the action bar, you can define the {@link android.widget.SearchView} to show at all times, only
+ when there is room, or as a collapsible action, which displays the {@link
+ android.widget.SearchView} as an icon initially, then takes up the entire action bar as a search
+ field when the user clicks the icon.</p>
+
+ <p class="note"><strong>Note:</strong> Later in this class, you will learn how to make your
+ app compatible down to Android 2.1 (API level 7) for devices that do not support
+ {@link android.widget.SearchView}.</p>
+
+ <h2 id="add-sv">Add the Search View to the Action Bar</h2>
+
+ <p>To add a {@link android.widget.SearchView} widget to the action bar, create a file named
+ <code>res/menu/options_menu.xml</code> in your project and add the following code to the file.
+ This code defines how to create the search item, such as the icon to use and the title of the
+ item. The <code>collapseActionView</code> attribute allows your {@link android.widget.SearchView}
+ to expand to take up the whole action bar and collapse back down into a
+ normal action bar item when not in use. Because of the limited action bar space on handset devices,
+ using the <code>collapsibleActionView</code> attribute is recommended to provide a better
+ user experience.</p>
+ <pre>
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/search"
+ android:title="@string/search_title"
+ android:icon="@drawable/ic_search"
+ android:showAsAction="collapseActionView|ifRoom"
+ android:actionViewClass="android.widget.SearchView" />
+</menu>
+</pre>
+
+ <p class="note"><strong>Note:</strong> If you already have an existing XML file for your menu
+ items, you can add the <code><item></code> element to that file instead.</p>
+
+ <p>To display the {@link android.widget.SearchView} in the action bar, inflate the XML menu
+ resource (<code>res/menu/options_menu.xml</code>) in the {@link
+ android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method of your activity:</p>
+ <pre>
+@Override
+public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.options_menu, menu);
+
+ return true;
+}
+</pre>
+
+ <p>If you run your app now, the {@link android.widget.SearchView} appears in your app's action
+ bar, but it isn't functional. You now need to define <em>how</em> the {@link
+ android.widget.SearchView} behaves.</p>
+
+ <h2 id="create-sc">Create a Searchable Configuration</h2>
+
+ <p>A <a href="http://developer.android.com/guide/topics/search/searchable-config.html">searchable
+ configuration</a> defines how the {@link android.widget.SearchView} behaves and is defined in a
+ <code>res/xml/searchable.xml</code> file. At a minimum, a searchable configuration must contain
+ an <code>android:label</code> attribute that has the same value as the
+ <code>android:label</code> attribute of the <a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> or
+ <a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a> element in your Android manifest.
+ However, we also recommend adding an <code>android:hint</code> attribute to give the user an idea of what to enter into the search
+ box:</p>
+ <pre>
+<?xml version="1.0" encoding="utf-8"?>
+
+<searchable xmlns:android="http://schemas.android.com/apk/res/android"
+ android:label="@string/app_name"
+ android:hint="@string/search_hint" />
+</pre>
+
+ <p>In your application's manifest file, declare a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">
+ <code><meta-data></code></a> element that points to the <code>res/xml/searchable.xml</code> file,
+ so that your application knows where to find it. Declare the element in an <code><activity></code>
+ that you want to display the {@link android.widget.SearchView} in:</p>
+ <pre>
+<activity ... >
+ ...
+ <meta-data android:name="android.app.searchable"
+ android:resource="@xml/searchable" />
+
+</activity>
+</pre>
+
+ <p>In the {@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method that you
+ created before, associate the searchable configuration with the {@link android.widget.SearchView}
+ by calling {@link android.widget.SearchView#setSearchableInfo}:</p>
+ <pre>
+@Override
+public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.options_menu, menu);
+
+ // Associate searchable configuration with the SearchView
+ SearchManager searchManager =
+ (SearchManager) getSystemService(Context.SEARCH_SERVICE);
+ SearchView searchView =
+ (SearchView) menu.findItem(R.id.search).getActionView();
+ searchView.setSearchableInfo(
+ searchManager.getSearchableInfo(getComponentName()));
+
+ return true;
+}
+</pre>
+
+ <p>The call to {@link android.app.SearchManager#getSearchableInfo getSearchableInfo()} obtains a
+ {@link android.app.SearchableInfo} object that is created from the searchable configuration XML
+ file. When the searchable configuration is correctly associated with your {@link
+ android.widget.SearchView}, the {@link android.widget.SearchView} starts an activity with the
+ {@link android.content.Intent#ACTION_SEARCH} intent when a user submits a query. You now need an
+ activity that can filter for this intent and handle the search query.</p>
+
+ <h2 id="create-sa">Create a Searchable Activity</h2>
+
+ <p>A {@link android.widget.SearchView} tries to start an activity with the {@link
+ android.content.Intent#ACTION_SEARCH} when a user submits a search query. A searchable activity
+ filters for the {@link android.content.Intent#ACTION_SEARCH} intent and searches for the query in
+ some sort of data set. To create a searchable activity, declare an activity of your choice to
+ filter for the {@link android.content.Intent#ACTION_SEARCH} intent:</p>
+ <pre>
+<activity android:name=".SearchResultsActivity" ... >
+ ...
+ <intent-filter>
+ <action android:name="android.intent.action.SEARCH" />
+ </intent-filter>
+ ...
+</activity>
+</pre>
+
+ <p>In your searchable activity, handle the {@link android.content.Intent#ACTION_SEARCH} intent by
+ checking for it in your {@link android.app.Activity#onCreate onCreate()} method.</p>
+
+ <p class="note"><strong>Note:</strong> If your searchable activity launches in single top mode
+ (<code>android:launchMode="singleTop"</code>), also handle the {@link
+ android.content.Intent#ACTION_SEARCH} intent in the {@link android.app.Activity#onNewIntent
+ onNewIntent()} method. In single top mode, only one instance of your activity is created and
+ subsequent calls to start your activity do not create a new activity on the
+ stack. This launch mode is useful so users can perform searches from the same activity
+ without creating a new activity instance every time.</p>
+ <pre>
+public class SearchResultsActivity extends Activity {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ ...
+ handleIntent(getIntent());
+ }
+
+ @Override
+ protected void onNewIntent(Intent intent) {
+ ...
+ handleIntent(intent);
+ }
+
+ private void handleIntent(Intent intent) {
+
+ if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
+ String query = intent.getStringExtra(SearchManager.QUERY);
+ //use the query to search your data somehow
+ }
+ }
+ ...
+}
+</pre>
+
+ <p>If you run your app now, the {@link android.widget.SearchView} can accept the user's query and
+ start your searchable activity with the {@link android.content.Intent#ACTION_SEARCH} intent. It
+ is now up to you to figure out how to store and search your data given a query.</p>
\ No newline at end of file
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index bff2a76..f0d1643 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -595,30 +595,6 @@
return decodeFileDescriptor(fd, null, null);
}
- /**
- * Set the default config used for decoding bitmaps. This config is
- * presented to the codec if the caller did not specify a preferred config
- * in their call to decode...
- *
- * The default value is chosen by the system to best match the device's
- * screen and memory constraints.
- *
- * @param config The preferred config for decoding bitmaps. If null, then
- * a suitable default is chosen by the system.
- *
- * @hide - only called by the browser at the moment, but should be stable
- * enough to expose if needed
- */
- public static void setDefaultConfig(Bitmap.Config config) {
- if (config == null) {
- // pick this for now, as historically it was our default.
- // However, if we have a smarter algorithm, we can change this.
- config = Bitmap.Config.RGB_565;
- }
- nativeSetDefaultConfig(config.nativeInt);
- }
-
- private static native void nativeSetDefaultConfig(int nativeConfig);
private static native Bitmap nativeDecodeStream(InputStream is, byte[] storage,
Rect padding, Options opts);
private static native Bitmap nativeDecodeFileDescriptor(FileDescriptor fd,
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index 234e165..3fedea0 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -72,7 +72,7 @@
static int32_t getNumberOfCameras();
static status_t getCameraInfo(int cameraId,
struct CameraInfo* cameraInfo);
- static sp<Camera> connect(int cameraId);
+ static sp<Camera> connect(int cameraId, bool force, bool keep);
virtual ~Camera();
void init();
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
deleted file mode 100644
index 7edf6b4..0000000
--- a/include/camera/CameraParameters.h
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * Copyright (C) 2008 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.
- */
-
-#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_H
-#define ANDROID_HARDWARE_CAMERA_PARAMETERS_H
-
-#include <utils/KeyedVector.h>
-#include <utils/String8.h>
-
-namespace android {
-
-struct Size {
- int width;
- int height;
-
- Size() {
- width = 0;
- height = 0;
- }
-
- Size(int w, int h) {
- width = w;
- height = h;
- }
-};
-
-class CameraParameters
-{
-public:
- CameraParameters();
- CameraParameters(const String8 ¶ms) { unflatten(params); }
- ~CameraParameters();
-
- String8 flatten() const;
- void unflatten(const String8 ¶ms);
-
- void set(const char *key, const char *value);
- void set(const char *key, int value);
- void setFloat(const char *key, float value);
- const char *get(const char *key) const;
- int getInt(const char *key) const;
- float getFloat(const char *key) const;
-
- void remove(const char *key);
-
- void setPreviewSize(int width, int height);
- void getPreviewSize(int *width, int *height) const;
- void getSupportedPreviewSizes(Vector<Size> &sizes) const;
-
- // Set the dimensions in pixels to the given width and height
- // for video frames. The given width and height must be one
- // of the supported dimensions returned from
- // getSupportedVideoSizes(). Must not be called if
- // getSupportedVideoSizes() returns an empty Vector of Size.
- void setVideoSize(int width, int height);
- // Retrieve the current dimensions (width and height)
- // in pixels for video frames, which must be one of the
- // supported dimensions returned from getSupportedVideoSizes().
- // Must not be called if getSupportedVideoSizes() returns an
- // empty Vector of Size.
- void getVideoSize(int *width, int *height) const;
- // Retrieve a Vector of supported dimensions (width and height)
- // in pixels for video frames. If sizes returned from the method
- // is empty, the camera does not support calls to setVideoSize()
- // or getVideoSize(). In adddition, it also indicates that
- // the camera only has a single output, and does not have
- // separate output for video frames and preview frame.
- void getSupportedVideoSizes(Vector<Size> &sizes) const;
- // Retrieve the preferred preview size (width and height) in pixels
- // for video recording. The given width and height must be one of
- // supported preview sizes returned from getSupportedPreviewSizes().
- // Must not be called if getSupportedVideoSizes() returns an empty
- // Vector of Size. If getSupportedVideoSizes() returns an empty
- // Vector of Size, the width and height returned from this method
- // is invalid, and is "-1x-1".
- void getPreferredPreviewSizeForVideo(int *width, int *height) const;
-
- void setPreviewFrameRate(int fps);
- int getPreviewFrameRate() const;
- void getPreviewFpsRange(int *min_fps, int *max_fps) const;
- void setPreviewFormat(const char *format);
- const char *getPreviewFormat() const;
- void setPictureSize(int width, int height);
- void getPictureSize(int *width, int *height) const;
- void getSupportedPictureSizes(Vector<Size> &sizes) const;
- void setPictureFormat(const char *format);
- const char *getPictureFormat() const;
-
- void dump() const;
- status_t dump(int fd, const Vector<String16>& args) const;
-
- // Parameter keys to communicate between camera application and driver.
- // The access (read/write, read only, or write only) is viewed from the
- // perspective of applications, not driver.
-
- // Preview frame size in pixels (width x height).
- // Example value: "480x320". Read/Write.
- static const char KEY_PREVIEW_SIZE[];
- // Supported preview frame sizes in pixels.
- // Example value: "800x600,480x320". Read only.
- static const char KEY_SUPPORTED_PREVIEW_SIZES[];
- // The current minimum and maximum preview fps. This controls the rate of
- // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and
- // maximum fps must be one of the elements from
- // KEY_SUPPORTED_PREVIEW_FPS_RANGE parameter.
- // Example value: "10500,26623"
- static const char KEY_PREVIEW_FPS_RANGE[];
- // The supported preview fps (frame-per-second) ranges. Each range contains
- // a minimum fps and maximum fps. If minimum fps equals to maximum fps, the
- // camera outputs frames in fixed frame rate. If not, the camera outputs
- // frames in auto frame rate. The actual frame rate fluctuates between the
- // minimum and the maximum. The list has at least one element. The list is
- // sorted from small to large (first by maximum fps and then minimum fps).
- // Example value: "(10500,26623),(15000,26623),(30000,30000)"
- static const char KEY_SUPPORTED_PREVIEW_FPS_RANGE[];
- // The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in
- // frameworks/base/include/camera/Camera.h.
- // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read/write.
- static const char KEY_PREVIEW_FORMAT[];
- // Supported image formats for preview frames.
- // Example value: "yuv420sp,yuv422i-yuyv". Read only.
- static const char KEY_SUPPORTED_PREVIEW_FORMATS[];
- // Number of preview frames per second. This is the target frame rate. The
- // actual frame rate depends on the driver.
- // Example value: "15". Read/write.
- static const char KEY_PREVIEW_FRAME_RATE[];
- // Supported number of preview frames per second.
- // Example value: "24,15,10". Read.
- static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[];
- // The dimensions for captured pictures in pixels (width x height).
- // Example value: "1024x768". Read/write.
- static const char KEY_PICTURE_SIZE[];
- // Supported dimensions for captured pictures in pixels.
- // Example value: "2048x1536,1024x768". Read only.
- static const char KEY_SUPPORTED_PICTURE_SIZES[];
- // The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE
- // in frameworks/base/include/camera/Camera.h.
- // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write.
- static const char KEY_PICTURE_FORMAT[];
- // Supported image formats for captured pictures.
- // Example value: "jpeg,rgb565". Read only.
- static const char KEY_SUPPORTED_PICTURE_FORMATS[];
- // The width (in pixels) of EXIF thumbnail in Jpeg picture.
- // Example value: "512". Read/write.
- static const char KEY_JPEG_THUMBNAIL_WIDTH[];
- // The height (in pixels) of EXIF thumbnail in Jpeg picture.
- // Example value: "384". Read/write.
- static const char KEY_JPEG_THUMBNAIL_HEIGHT[];
- // Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail
- // in EXIF.
- // Example value: "512x384,320x240,0x0". Read only.
- static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[];
- // The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100,
- // with 100 being the best.
- // Example value: "90". Read/write.
- static const char KEY_JPEG_THUMBNAIL_QUALITY[];
- // Jpeg quality of captured picture. The range is 1 to 100, with 100 being
- // the best.
- // Example value: "90". Read/write.
- static const char KEY_JPEG_QUALITY[];
- // The rotation angle in degrees relative to the orientation of the camera.
- // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The
- // camera driver may set orientation in the EXIF header without rotating the
- // picture. Or the driver may rotate the picture and the EXIF thumbnail. If
- // the Jpeg picture is rotated, the orientation in the EXIF header will be
- // missing or 1 (row #0 is top and column #0 is left side).
- //
- // Note that the JPEG pictures of front-facing cameras are not mirrored
- // as in preview display.
- //
- // For example, suppose the natural orientation of the device is portrait.
- // The device is rotated 270 degrees clockwise, so the device orientation is
- // 270. Suppose a back-facing camera sensor is mounted in landscape and the
- // top side of the camera sensor is aligned with the right edge of the
- // display in natural orientation. So the camera orientation is 90. The
- // rotation should be set to 0 (270 + 90).
- //
- // Example value: "0" or "90" or "180" or "270". Write only.
- static const char KEY_ROTATION[];
- // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in
- // JPEG EXIF header.
- // Example value: "25.032146" or "-33.462809". Write only.
- static const char KEY_GPS_LATITUDE[];
- // GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored
- // in JPEG EXIF header.
- // Example value: "121.564448" or "-70.660286". Write only.
- static const char KEY_GPS_LONGITUDE[];
- // GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF
- // header.
- // Example value: "21.0" or "-5". Write only.
- static const char KEY_GPS_ALTITUDE[];
- // GPS timestamp (UTC in seconds since January 1, 1970). This should be
- // stored in JPEG EXIF header.
- // Example value: "1251192757". Write only.
- static const char KEY_GPS_TIMESTAMP[];
- // GPS Processing Method
- // Example value: "GPS" or "NETWORK". Write only.
- static const char KEY_GPS_PROCESSING_METHOD[];
- // Current white balance setting.
- // Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write.
- static const char KEY_WHITE_BALANCE[];
- // Supported white balance settings.
- // Example value: "auto,incandescent,daylight". Read only.
- static const char KEY_SUPPORTED_WHITE_BALANCE[];
- // Current color effect setting.
- // Example value: "none" or EFFECT_XXX constants. Read/write.
- static const char KEY_EFFECT[];
- // Supported color effect settings.
- // Example value: "none,mono,sepia". Read only.
- static const char KEY_SUPPORTED_EFFECTS[];
- // Current antibanding setting.
- // Example value: "auto" or ANTIBANDING_XXX constants. Read/write.
- static const char KEY_ANTIBANDING[];
- // Supported antibanding settings.
- // Example value: "auto,50hz,60hz,off". Read only.
- static const char KEY_SUPPORTED_ANTIBANDING[];
- // Current scene mode.
- // Example value: "auto" or SCENE_MODE_XXX constants. Read/write.
- static const char KEY_SCENE_MODE[];
- // Supported scene mode settings.
- // Example value: "auto,night,fireworks". Read only.
- static const char KEY_SUPPORTED_SCENE_MODES[];
- // Current flash mode.
- // Example value: "auto" or FLASH_MODE_XXX constants. Read/write.
- static const char KEY_FLASH_MODE[];
- // Supported flash modes.
- // Example value: "auto,on,off". Read only.
- static const char KEY_SUPPORTED_FLASH_MODES[];
- // Current focus mode. This will not be empty. Applications should call
- // CameraHardwareInterface.autoFocus to start the focus if focus mode is
- // FOCUS_MODE_AUTO or FOCUS_MODE_MACRO.
- // Example value: "auto" or FOCUS_MODE_XXX constants. Read/write.
- static const char KEY_FOCUS_MODE[];
- // Supported focus modes.
- // Example value: "auto,macro,fixed". Read only.
- static const char KEY_SUPPORTED_FOCUS_MODES[];
- // The maximum number of focus areas supported. This is the maximum length
- // of KEY_FOCUS_AREAS.
- // Example value: "0" or "2". Read only.
- static const char KEY_MAX_NUM_FOCUS_AREAS[];
- // Current focus areas.
- //
- // Before accessing this parameter, apps should check
- // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas
- // first. If the value is 0, focus area is not supported.
- //
- // Each focus area is a five-element int array. The first four elements are
- // the rectangle of the area (left, top, right, bottom). The direction is
- // relative to the sensor orientation, that is, what the sensor sees. The
- // direction is not affected by the rotation or mirroring of
- // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000.
- // (-1000,-1000) is the upper left point. (1000, 1000) is the lower right
- // point. The width and height of focus areas cannot be 0 or negative.
- //
- // The fifth element is the weight. Values for weight must range from 1 to
- // 1000. The weight should be interpreted as a per-pixel weight - all
- // pixels in the area have the specified weight. This means a small area
- // with the same weight as a larger area will have less influence on the
- // focusing than the larger area. Focus areas can partially overlap and the
- // driver will add the weights in the overlap region.
- //
- // A special case of single focus area (0,0,0,0,0) means driver to decide
- // the focus area. For example, the driver may use more signals to decide
- // focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they
- // want the driver to decide focus areas.
- //
- // Focus areas are relative to the current field of view (KEY_ZOOM). No
- // matter what the zoom level is, (-1000,-1000) represents the top of the
- // currently visible camera frame. The focus area cannot be set to be
- // outside the current field of view, even when using zoom.
- //
- // Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO,
- // FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or
- // FOCUS_MODE_CONTINUOUS_PICTURE.
- // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
- static const char KEY_FOCUS_AREAS[];
- // Focal length in millimeter.
- // Example value: "4.31". Read only.
- static const char KEY_FOCAL_LENGTH[];
- // Horizontal angle of view in degrees.
- // Example value: "54.8". Read only.
- static const char KEY_HORIZONTAL_VIEW_ANGLE[];
- // Vertical angle of view in degrees.
- // Example value: "42.5". Read only.
- static const char KEY_VERTICAL_VIEW_ANGLE[];
- // Exposure compensation index. 0 means exposure is not adjusted.
- // Example value: "0" or "5". Read/write.
- static const char KEY_EXPOSURE_COMPENSATION[];
- // The maximum exposure compensation index (>=0).
- // Example value: "6". Read only.
- static const char KEY_MAX_EXPOSURE_COMPENSATION[];
- // The minimum exposure compensation index (<=0).
- // Example value: "-6". Read only.
- static const char KEY_MIN_EXPOSURE_COMPENSATION[];
- // The exposure compensation step. Exposure compensation index multiply by
- // step eqals to EV. Ex: if exposure compensation index is 6 and step is
- // 0.3333, EV is -2.
- // Example value: "0.333333333" or "0.5". Read only.
- static const char KEY_EXPOSURE_COMPENSATION_STEP[];
- // The state of the auto-exposure lock. "true" means that
- // auto-exposure is locked to its current value and will not
- // change. "false" means the auto-exposure routine is free to
- // change exposure values. If auto-exposure is already locked,
- // setting this to true again has no effect (the driver will not
- // recalculate exposure values). Changing exposure compensation
- // settings will still affect the exposure settings while
- // auto-exposure is locked. Stopping preview or taking a still
- // image will not change the lock. In conjunction with
- // exposure compensation, this allows for capturing multi-exposure
- // brackets with known relative exposure values. Locking
- // auto-exposure after open but before the first call to
- // startPreview may result in severely over- or under-exposed
- // images. The driver will not change the AE lock after
- // auto-focus completes.
- static const char KEY_AUTO_EXPOSURE_LOCK[];
- // Whether locking the auto-exposure is supported. "true" means it is, and
- // "false" or this key not existing means it is not supported.
- static const char KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[];
- // The state of the auto-white balance lock. "true" means that
- // auto-white balance is locked to its current value and will not
- // change. "false" means the auto-white balance routine is free to
- // change white balance values. If auto-white balance is already
- // locked, setting this to true again has no effect (the driver
- // will not recalculate white balance values). Stopping preview or
- // taking a still image will not change the lock. In conjunction
- // with exposure compensation, this allows for capturing
- // multi-exposure brackets with fixed white balance. Locking
- // auto-white balance after open but before the first call to
- // startPreview may result in severely incorrect color. The
- // driver will not change the AWB lock after auto-focus
- // completes.
- static const char KEY_AUTO_WHITEBALANCE_LOCK[];
- // Whether locking the auto-white balance is supported. "true"
- // means it is, and "false" or this key not existing means it is
- // not supported.
- static const char KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[];
-
- // The maximum number of metering areas supported. This is the maximum
- // length of KEY_METERING_AREAS.
- // Example value: "0" or "2". Read only.
- static const char KEY_MAX_NUM_METERING_AREAS[];
- // Current metering areas. Camera driver uses these areas to decide
- // exposure.
- //
- // Before accessing this parameter, apps should check
- // KEY_MAX_NUM_METERING_AREAS first to know the maximum number of metering
- // areas first. If the value is 0, metering area is not supported.
- //
- // Each metering area is a rectangle with specified weight. The direction is
- // relative to the sensor orientation, that is, what the sensor sees. The
- // direction is not affected by the rotation or mirroring of
- // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range
- // from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000)
- // is the lower right point. The width and height of metering areas cannot
- // be 0 or negative.
- //
- // The fifth element is the weight. Values for weight must range from 1 to
- // 1000. The weight should be interpreted as a per-pixel weight - all
- // pixels in the area have the specified weight. This means a small area
- // with the same weight as a larger area will have less influence on the
- // metering than the larger area. Metering areas can partially overlap and
- // the driver will add the weights in the overlap region.
- //
- // A special case of all-zero single metering area means driver to decide
- // the metering area. For example, the driver may use more signals to decide
- // metering areas and change them dynamically. Apps can set all-zero if they
- // want the driver to decide metering areas.
- //
- // Metering areas are relative to the current field of view (KEY_ZOOM).
- // No matter what the zoom level is, (-1000,-1000) represents the top of the
- // currently visible camera frame. The metering area cannot be set to be
- // outside the current field of view, even when using zoom.
- //
- // No matter what metering areas are, the final exposure are compensated
- // by KEY_EXPOSURE_COMPENSATION.
- // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
- static const char KEY_METERING_AREAS[];
- // Current zoom value.
- // Example value: "0" or "6". Read/write.
- static const char KEY_ZOOM[];
- // Maximum zoom value.
- // Example value: "6". Read only.
- static const char KEY_MAX_ZOOM[];
- // The zoom ratios of all zoom values. The zoom ratio is in 1/100
- // increments. Ex: a zoom of 3.2x is returned as 320. The number of list
- // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last
- // element is the zoom ratio of zoom value KEY_MAX_ZOOM.
- // Example value: "100,150,200,250,300,350,400". Read only.
- static const char KEY_ZOOM_RATIOS[];
- // Whether zoom is supported. Zoom is supported if the value is "true". Zoom
- // is not supported if the value is not "true" or the key does not exist.
- // Example value: "true". Read only.
- static const char KEY_ZOOM_SUPPORTED[];
- // Whether if smooth zoom is supported. Smooth zoom is supported if the
- // value is "true". It is not supported if the value is not "true" or the
- // key does not exist.
- // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and
- // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h.
- // Example value: "true". Read only.
- static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
-
- // The distances (in meters) from the camera to where an object appears to
- // be in focus. The object is sharpest at the optimal focus distance. The
- // depth of field is the far focus distance minus near focus distance.
- //
- // Focus distances may change after starting auto focus, canceling auto
- // focus, or starting the preview. Applications can read this anytime to get
- // the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS,
- // focus distances may change from time to time.
- //
- // This is intended to estimate the distance between the camera and the
- // subject. After autofocus, the subject distance may be within near and far
- // focus distance. However, the precision depends on the camera hardware,
- // autofocus algorithm, the focus area, and the scene. The error can be
- // large and it should be only used as a reference.
- //
- // Far focus distance > optimal focus distance > near focus distance. If
- // the far focus distance is infinity, the value should be "Infinity" (case
- // sensitive). The format is three float values separated by commas. The
- // first is near focus distance. The second is optimal focus distance. The
- // third is far focus distance.
- // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
- static const char KEY_FOCUS_DISTANCES[];
-
- // The current dimensions in pixels (width x height) for video frames.
- // The width and height must be one of the supported sizes retrieved
- // via KEY_SUPPORTED_VIDEO_SIZES.
- // Example value: "1280x720". Read/write.
- static const char KEY_VIDEO_SIZE[];
- // A list of the supported dimensions in pixels (width x height)
- // for video frames. See CAMERA_MSG_VIDEO_FRAME for details in
- // frameworks/base/include/camera/Camera.h.
- // Example: "176x144,1280x720". Read only.
- static const char KEY_SUPPORTED_VIDEO_SIZES[];
-
- // The maximum number of detected faces supported by hardware face
- // detection. If the value is 0, hardware face detection is not supported.
- // Example: "5". Read only
- static const char KEY_MAX_NUM_DETECTED_FACES_HW[];
-
- // The maximum number of detected faces supported by software face
- // detection. If the value is 0, software face detection is not supported.
- // Example: "5". Read only
- static const char KEY_MAX_NUM_DETECTED_FACES_SW[];
-
- // Preferred preview frame size in pixels for video recording.
- // The width and height must be one of the supported sizes retrieved
- // via KEY_SUPPORTED_PREVIEW_SIZES. This key can be used only when
- // getSupportedVideoSizes() does not return an empty Vector of Size.
- // Camcorder applications are recommended to set the preview size
- // to a value that is not larger than the preferred preview size.
- // In other words, the product of the width and height of the
- // preview size should not be larger than that of the preferred
- // preview size. In addition, we recommend to choos a preview size
- // that has the same aspect ratio as the resolution of video to be
- // recorded.
- // Example value: "800x600". Read only.
- static const char KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[];
-
- // The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in
- // frameworks/base/include/camera/Camera.h.
- // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only.
- static const char KEY_VIDEO_FRAME_FORMAT[];
-
- // Sets the hint of the recording mode. If this is true, MediaRecorder.start
- // may be faster or has less glitches. This should be called before starting
- // the preview for the best result. But it is allowed to change the hint
- // while the preview is active. The default value is false.
- //
- // The apps can still call Camera.takePicture when the hint is true. The
- // apps can call MediaRecorder.start when the hint is false. But the
- // performance may be worse.
- // Example value: "true" or "false". Read/write.
- static const char KEY_RECORDING_HINT[];
-
- // Returns true if video snapshot is supported. That is, applications
- // can call Camera.takePicture during recording. Applications do not need to
- // call Camera.startPreview after taking a picture. The preview will be
- // still active. Other than that, taking a picture during recording is
- // identical to taking a picture normally. All settings and methods related
- // to takePicture work identically. Ex: KEY_PICTURE_SIZE,
- // KEY_SUPPORTED_PICTURE_SIZES, KEY_JPEG_QUALITY, KEY_ROTATION, and etc.
- // The picture will have an EXIF header. FLASH_MODE_AUTO and FLASH_MODE_ON
- // also still work, but the video will record the flash.
- //
- // Applications can set shutter callback as null to avoid the shutter
- // sound. It is also recommended to set raw picture and post view callbacks
- // to null to avoid the interrupt of preview display.
- //
- // Field-of-view of the recorded video may be different from that of the
- // captured pictures.
- // Example value: "true" or "false". Read only.
- static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[];
-
- // The state of the video stabilization. If set to true, both the
- // preview stream and the recorded video stream are stabilized by
- // the camera. Only valid to set if KEY_VIDEO_STABILIZATION_SUPPORTED is
- // set to true.
- //
- // The value of this key can be changed any time the camera is
- // open. If preview or recording is active, it is acceptable for
- // there to be a slight video glitch when video stabilization is
- // toggled on and off.
- //
- // This only stabilizes video streams (between-frames stabilization), and
- // has no effect on still image capture.
- static const char KEY_VIDEO_STABILIZATION[];
-
- // Returns true if video stabilization is supported. That is, applications
- // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview
- // stream and record stabilized videos.
- static const char KEY_VIDEO_STABILIZATION_SUPPORTED[];
-
- // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
- static const char TRUE[];
- static const char FALSE[];
-
- // Value for KEY_FOCUS_DISTANCES.
- static const char FOCUS_DISTANCE_INFINITY[];
-
- // Values for white balance settings.
- static const char WHITE_BALANCE_AUTO[];
- static const char WHITE_BALANCE_INCANDESCENT[];
- static const char WHITE_BALANCE_FLUORESCENT[];
- static const char WHITE_BALANCE_WARM_FLUORESCENT[];
- static const char WHITE_BALANCE_DAYLIGHT[];
- static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[];
- static const char WHITE_BALANCE_TWILIGHT[];
- static const char WHITE_BALANCE_SHADE[];
-
- // Values for effect settings.
- static const char EFFECT_NONE[];
- static const char EFFECT_MONO[];
- static const char EFFECT_NEGATIVE[];
- static const char EFFECT_SOLARIZE[];
- static const char EFFECT_SEPIA[];
- static const char EFFECT_POSTERIZE[];
- static const char EFFECT_WHITEBOARD[];
- static const char EFFECT_BLACKBOARD[];
- static const char EFFECT_AQUA[];
-
- // Values for antibanding settings.
- static const char ANTIBANDING_AUTO[];
- static const char ANTIBANDING_50HZ[];
- static const char ANTIBANDING_60HZ[];
- static const char ANTIBANDING_OFF[];
-
- // Values for flash mode settings.
- // Flash will not be fired.
- static const char FLASH_MODE_OFF[];
- // Flash will be fired automatically when required. The flash may be fired
- // during preview, auto-focus, or snapshot depending on the driver.
- static const char FLASH_MODE_AUTO[];
- // Flash will always be fired during snapshot. The flash may also be
- // fired during preview or auto-focus depending on the driver.
- static const char FLASH_MODE_ON[];
- // Flash will be fired in red-eye reduction mode.
- static const char FLASH_MODE_RED_EYE[];
- // Constant emission of light during preview, auto-focus and snapshot.
- // This can also be used for video recording.
- static const char FLASH_MODE_TORCH[];
-
- // Values for scene mode settings.
- static const char SCENE_MODE_AUTO[];
- static const char SCENE_MODE_ACTION[];
- static const char SCENE_MODE_PORTRAIT[];
- static const char SCENE_MODE_LANDSCAPE[];
- static const char SCENE_MODE_NIGHT[];
- static const char SCENE_MODE_NIGHT_PORTRAIT[];
- static const char SCENE_MODE_THEATRE[];
- static const char SCENE_MODE_BEACH[];
- static const char SCENE_MODE_SNOW[];
- static const char SCENE_MODE_SUNSET[];
- static const char SCENE_MODE_STEADYPHOTO[];
- static const char SCENE_MODE_FIREWORKS[];
- static const char SCENE_MODE_SPORTS[];
- static const char SCENE_MODE_PARTY[];
- static const char SCENE_MODE_CANDLELIGHT[];
- // Applications are looking for a barcode. Camera driver will be optimized
- // for barcode reading.
- static const char SCENE_MODE_BARCODE[];
-
- // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT,
- // and KEY_VIDEO_FRAME_FORMAT
- static const char PIXEL_FORMAT_YUV422SP[];
- static const char PIXEL_FORMAT_YUV420SP[]; // NV21
- static const char PIXEL_FORMAT_YUV422I[]; // YUY2
- static const char PIXEL_FORMAT_YUV420P[]; // YV12
- static const char PIXEL_FORMAT_RGB565[];
- static const char PIXEL_FORMAT_RGBA8888[];
- static const char PIXEL_FORMAT_JPEG[];
- // Raw bayer format used for images, which is 10 bit precision samples
- // stored in 16 bit words. The filter pattern is RGGB.
- static const char PIXEL_FORMAT_BAYER_RGGB[];
-
- // Values for focus mode settings.
- // Auto-focus mode. Applications should call
- // CameraHardwareInterface.autoFocus to start the focus in this mode.
- static const char FOCUS_MODE_AUTO[];
- // Focus is set at infinity. Applications should not call
- // CameraHardwareInterface.autoFocus in this mode.
- static const char FOCUS_MODE_INFINITY[];
- // Macro (close-up) focus mode. Applications should call
- // CameraHardwareInterface.autoFocus to start the focus in this mode.
- static const char FOCUS_MODE_MACRO[];
- // Focus is fixed. The camera is always in this mode if the focus is not
- // adjustable. If the camera has auto-focus, this mode can fix the
- // focus, which is usually at hyperfocal distance. Applications should
- // not call CameraHardwareInterface.autoFocus in this mode.
- static const char FOCUS_MODE_FIXED[];
- // Extended depth of field (EDOF). Focusing is done digitally and
- // continuously. Applications should not call
- // CameraHardwareInterface.autoFocus in this mode.
- static const char FOCUS_MODE_EDOF[];
- // Continuous auto focus mode intended for video recording. The camera
- // continuously tries to focus. This is the best choice for video
- // recording because the focus changes smoothly . Applications still can
- // call CameraHardwareInterface.takePicture in this mode but the subject may
- // not be in focus. Auto focus starts when the parameter is set.
- //
- // Applications can call CameraHardwareInterface.autoFocus in this mode. The
- // focus callback will immediately return with a boolean that indicates
- // whether the focus is sharp or not. The focus position is locked after
- // autoFocus call. If applications want to resume the continuous focus,
- // cancelAutoFocus must be called. Restarting the preview will not resume
- // the continuous autofocus. To stop continuous focus, applications should
- // change the focus mode to other modes.
- static const char FOCUS_MODE_CONTINUOUS_VIDEO[];
- // Continuous auto focus mode intended for taking pictures. The camera
- // continuously tries to focus. The speed of focus change is more aggressive
- // than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is
- // set.
- //
- // Applications can call CameraHardwareInterface.autoFocus in this mode. If
- // the autofocus is in the middle of scanning, the focus callback will
- // return when it completes. If the autofocus is not scanning, focus
- // callback will immediately return with a boolean that indicates whether
- // the focus is sharp or not. The apps can then decide if they want to take
- // a picture immediately or to change the focus mode to auto, and run a full
- // autofocus cycle. The focus position is locked after autoFocus call. If
- // applications want to resume the continuous focus, cancelAutoFocus must be
- // called. Restarting the preview will not resume the continuous autofocus.
- // To stop continuous focus, applications should change the focus mode to
- // other modes.
- static const char FOCUS_MODE_CONTINUOUS_PICTURE[];
-
-private:
- DefaultKeyedVector<String8,String8> mMap;
-};
-
-}; // namespace android
-
-#endif
diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h
index 7d70c1e..97e3169 100644
--- a/include/camera/ICameraService.h
+++ b/include/camera/ICameraService.h
@@ -42,7 +42,7 @@
virtual status_t getCameraInfo(int cameraId,
struct CameraInfo* cameraInfo) = 0;
virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient,
- int cameraId) = 0;
+ int cameraId, bool force, bool keep) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java
index fba5bab..fe03437 100644
--- a/keystore/java/android/security/KeyChain.java
+++ b/keystore/java/android/security/KeyChain.java
@@ -169,7 +169,6 @@
/**
- * @hide TODO This is temporary and will be removed
* Broadcast Action: Indicates the trusted storage has changed. Sent when
* one of this happens:
*
diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp
index d43cb0b..b81fe86 100644
--- a/libs/camera/Camera.cpp
+++ b/libs/camera/Camera.cpp
@@ -116,13 +116,13 @@
return cs->getCameraInfo(cameraId, cameraInfo);
}
-sp<Camera> Camera::connect(int cameraId)
+sp<Camera> Camera::connect(int cameraId, bool force, bool keep)
{
ALOGV("connect");
sp<Camera> c = new Camera();
const sp<ICameraService>& cs = getCameraService();
if (cs != 0) {
- c->mCamera = cs->connect(c, cameraId);
+ c->mCamera = cs->connect(c, cameraId, force, keep);
}
if (c->mCamera != 0) {
c->mCamera->asBinder()->linkToDeath(c);
diff --git a/libs/camera/ICameraService.cpp b/libs/camera/ICameraService.cpp
index 85f1a29..c74298a 100644
--- a/libs/camera/ICameraService.cpp
+++ b/libs/camera/ICameraService.cpp
@@ -56,12 +56,15 @@
}
// connect to camera service
- virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, int cameraId)
+ virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, int cameraId,
+ bool force, bool keep)
{
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
data.writeStrongBinder(cameraClient->asBinder());
data.writeInt32(cameraId);
+ data.writeInt32(force);
+ data.writeInt32(keep);
remote()->transact(BnCameraService::CONNECT, data, &reply);
return interface_cast<ICamera>(reply.readStrongBinder());
}
@@ -93,7 +96,10 @@
case CONNECT: {
CHECK_INTERFACE(ICameraService, data, reply);
sp<ICameraClient> cameraClient = interface_cast<ICameraClient>(data.readStrongBinder());
- sp<ICamera> camera = connect(cameraClient, data.readInt32());
+ const int cameraId = data.readInt32();
+ const int force = data.readInt32();
+ const int keep = data.readInt32();
+ sp<ICamera> camera = connect(cameraClient, cameraId, force, keep);
reply->writeStrongBinder(camera->asBinder());
return NO_ERROR;
} break;
@@ -105,4 +111,3 @@
// ----------------------------------------------------------------------------
}; // namespace android
-
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index a884d8e..118608d 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -671,18 +671,6 @@
if (mLeft != 0 || mTop != 0) {
ALOGD("%s%s %d, %d", indent, "Translate", mLeft, mTop);
}
- if (mAlpha < 1) {
- // TODO: should be able to store the size of a DL at record time and not
- // have to pass it into this call. In fact, this information might be in the
- // location/size info that we store with the new native transform data.
- int flags = SkCanvas::kHasAlphaLayer_SaveFlag;
- if (mClipChildren) {
- flags |= SkCanvas::kClipToLayer_SaveFlag;
- }
- ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", indent, "SaveLayerAlpha",
- (float) 0, (float) 0, (float) mRight - mLeft, (float) mBottom - mTop,
- mMultipliedAlpha, flags);
- }
if (mMatrixFlags != 0) {
if (mMatrixFlags == TRANSLATION) {
ALOGD("%s%s %f, %f", indent, "Translate", mTranslationX, mTranslationY);
@@ -696,6 +684,18 @@
mTransformMatrix->get(8));
}
}
+ if (mAlpha < 1) {
+ // TODO: should be able to store the size of a DL at record time and not
+ // have to pass it into this call. In fact, this information might be in the
+ // location/size info that we store with the new native transform data.
+ int flags = SkCanvas::kHasAlphaLayer_SaveFlag;
+ if (mClipChildren) {
+ flags |= SkCanvas::kClipToLayer_SaveFlag;
+ }
+ ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", indent, "SaveLayerAlpha",
+ (float) 0, (float) 0, (float) mRight - mLeft, (float) mBottom - mTop,
+ mMultipliedAlpha, flags);
+ }
if (mClipChildren) {
ALOGD("%s%s %.2f, %.2f, %.2f, %.2f", indent, "ClipRect", 0.0f, 0.0f,
(float) mRight - mLeft, (float) mBottom - mTop);
@@ -724,20 +724,6 @@
mApplicationScale, mApplicationScale);
renderer.scale(mApplicationScale, mApplicationScale);
}
- if (mAlpha < 1 && !mCaching) {
- // TODO: should be able to store the size of a DL at record time and not
- // have to pass it into this call. In fact, this information might be in the
- // location/size info that we store with the new native transform data.
- int flags = SkCanvas::kHasAlphaLayer_SaveFlag;
- if (mClipChildren) {
- flags |= SkCanvas::kClipToLayer_SaveFlag;
- }
- DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", indent, "SaveLayerAlpha",
- (float) 0, (float) 0, (float) mRight - mLeft, (float) mBottom - mTop,
- mMultipliedAlpha, flags);
- renderer.saveLayerAlpha(0, 0, mRight - mLeft, mBottom - mTop,
- mMultipliedAlpha, flags);
- }
if (mMatrixFlags != 0) {
if (mMatrixFlags == TRANSLATION) {
DISPLAY_LIST_LOGD("%s%s %f, %f", indent, "Translate", mTranslationX, mTranslationY);
@@ -754,6 +740,20 @@
renderer.concatMatrix(mTransformMatrix);
}
}
+ if (mAlpha < 1 && !mCaching) {
+ // TODO: should be able to store the size of a DL at record time and not
+ // have to pass it into this call. In fact, this information might be in the
+ // location/size info that we store with the new native transform data.
+ int flags = SkCanvas::kHasAlphaLayer_SaveFlag;
+ if (mClipChildren) {
+ flags |= SkCanvas::kClipToLayer_SaveFlag;
+ }
+ DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", indent, "SaveLayerAlpha",
+ (float) 0, (float) 0, (float) mRight - mLeft, (float) mBottom - mTop,
+ mMultipliedAlpha, flags);
+ renderer.saveLayerAlpha(0, 0, mRight - mLeft, mBottom - mTop,
+ mMultipliedAlpha, flags);
+ }
if (mClipChildren) {
DISPLAY_LIST_LOGD("%s%s %.2f, %.2f, %.2f, %.2f", indent, "ClipRect", 0.0f, 0.0f,
(float) mRight - mLeft, (float) mBottom - mTop);
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 43617e7..4bbb04f 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -574,7 +574,7 @@
virtual void drawLines(float* points, int count, SkPaint* paint);
virtual void drawPoints(float* points, int count, SkPaint* paint);
virtual void drawText(const char* text, int bytesCount, int count, float x, float y,
- SkPaint* paint, float length = 1.0f);
+ SkPaint* paint, float length = -1.0f);
virtual void drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
float hOffset, float vOffset, SkPaint* paint);
virtual void drawPosText(const char* text, int bytesCount, int count, const float* positions,
diff --git a/libs/rs/driver/rsdCore.cpp b/libs/rs/driver/rsdCore.cpp
index 403393f..35a5c08 100644
--- a/libs/rs/driver/rsdCore.cpp
+++ b/libs/rs/driver/rsdCore.cpp
@@ -228,7 +228,12 @@
int cpu = sysconf(_SC_NPROCESSORS_ONLN);
ALOGV("%p Launching thread(s), CPUs %i", rsc, cpu);
- if (cpu < 2) cpu = 0;
+ if(rsc->props.mDebugMaxThreads && (cpu > (int)rsc->props.mDebugMaxThreads)) {
+ cpu = rsc->props.mDebugMaxThreads;
+ }
+ if (cpu < 2) {
+ cpu = 0;
+ }
dc->mWorkers.mCount = (uint32_t)cpu;
dc->mWorkers.mThreadId = (pthread_t *) calloc(dc->mWorkers.mCount, sizeof(pthread_t));
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 1b51872..5e21763 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -178,10 +178,10 @@
mFragmentStore->setup(this, &mStateFragmentStore);
}
-static bool getProp(const char *str) {
+static uint32_t getProp(const char *str) {
char buf[PROPERTY_VALUE_MAX];
property_get(str, buf, "0");
- return 0 != strcmp(buf, "0");
+ return atoi(buf);
}
void Context::displayDebugStats() {
@@ -211,13 +211,14 @@
setpriority(PRIO_PROCESS, rsc->mNativeThreadId, ANDROID_PRIORITY_DISPLAY);
rsc->mThreadPriority = ANDROID_PRIORITY_DISPLAY;
#endif //ANDROID_RS_SERIALIZE
- rsc->props.mLogTimes = getProp("debug.rs.profile");
- rsc->props.mLogScripts = getProp("debug.rs.script");
- rsc->props.mLogObjects = getProp("debug.rs.object");
- rsc->props.mLogShaders = getProp("debug.rs.shader");
- rsc->props.mLogShadersAttr = getProp("debug.rs.shader.attributes");
- rsc->props.mLogShadersUniforms = getProp("debug.rs.shader.uniforms");
- rsc->props.mLogVisual = getProp("debug.rs.visual");
+ rsc->props.mLogTimes = getProp("debug.rs.profile") != 0;
+ rsc->props.mLogScripts = getProp("debug.rs.script") != 0;
+ rsc->props.mLogObjects = getProp("debug.rs.object") != 0;
+ rsc->props.mLogShaders = getProp("debug.rs.shader") != 0;
+ rsc->props.mLogShadersAttr = getProp("debug.rs.shader.attributes") != 0;
+ rsc->props.mLogShadersUniforms = getProp("debug.rs.shader.uniforms") != 0;
+ rsc->props.mLogVisual = getProp("debug.rs.visual") != 0;
+ rsc->props.mDebugMaxThreads = getProp("debug.rs.max-threads");
if (!rsdHalInit(rsc, 0, 0)) {
rsc->setError(RS_ERROR_FATAL_DRIVER, "Failed initializing GL");
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 0f44267..de110c6 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -184,6 +184,7 @@
bool mLogShadersAttr;
bool mLogShadersUniforms;
bool mLogVisual;
+ uint32_t mDebugMaxThreads;
} props;
mutable struct {
diff --git a/media/jni/audioeffect/Android.mk b/media/jni/audioeffect/Android.mk
index 3e493b1..b5d8b7b 100644
--- a/media/jni/audioeffect/Android.mk
+++ b/media/jni/audioeffect/Android.mk
@@ -13,7 +13,7 @@
libmedia
LOCAL_C_INCLUDES := \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
LOCAL_MODULE:= libaudioeffect_jni
diff --git a/media/libeffects/downmix/Android.mk b/media/libeffects/downmix/Android.mk
index 0348e1e..95ca6fd 100644
--- a/media/libeffects/downmix/Android.mk
+++ b/media/libeffects/downmix/Android.mk
@@ -20,8 +20,8 @@
endif
LOCAL_C_INCLUDES := \
- system/media/audio_effects/include \
- system/media/audio_utils/include
+ $(call include-path-for, audio-effects) \
+ $(call include-path-for, audio-utils)
LOCAL_PRELINK_MODULE := false
diff --git a/media/libeffects/factory/Android.mk b/media/libeffects/factory/Android.mk
index 2f2b974..6e69151 100644
--- a/media/libeffects/factory/Android.mk
+++ b/media/libeffects/factory/Android.mk
@@ -15,6 +15,6 @@
LOCAL_SHARED_LIBRARIES += libdl
LOCAL_C_INCLUDES := \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libeffects/lvm/wrapper/Android.mk b/media/libeffects/lvm/wrapper/Android.mk
index f097dd0..4313424 100644
--- a/media/libeffects/lvm/wrapper/Android.mk
+++ b/media/libeffects/lvm/wrapper/Android.mk
@@ -26,7 +26,7 @@
$(LOCAL_PATH)/Bundle \
$(LOCAL_PATH)/../lib/Common/lib/ \
$(LOCAL_PATH)/../lib/Bundle/lib/ \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
include $(BUILD_SHARED_LIBRARY)
@@ -55,6 +55,6 @@
$(LOCAL_PATH)/Reverb \
$(LOCAL_PATH)/../lib/Common/lib/ \
$(LOCAL_PATH)/../lib/Reverb/lib/ \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
-include $(BUILD_SHARED_LIBRARY)
\ No newline at end of file
+include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libeffects/preprocessing/Android.mk b/media/libeffects/preprocessing/Android.mk
index 7f7c7e1..c13b9d4 100755
--- a/media/libeffects/preprocessing/Android.mk
+++ b/media/libeffects/preprocessing/Android.mk
@@ -14,7 +14,7 @@
external/webrtc/src \
external/webrtc/src/modules/interface \
external/webrtc/src/modules/audio_processing/interface \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
LOCAL_C_INCLUDES += $(call include-path-for, speex)
diff --git a/media/libeffects/testlibs/Android.mk_ b/media/libeffects/testlibs/Android.mk_
index 249ebf4..2954908 100644
--- a/media/libeffects/testlibs/Android.mk_
+++ b/media/libeffects/testlibs/Android.mk_
@@ -23,7 +23,7 @@
endif
LOCAL_C_INCLUDES := \
- system/media/audio_effects/include \
+ $(call include-path-for, audio-effects) \
$(call include-path-for, graphics corecg)
LOCAL_MODULE_TAGS := optional
@@ -60,7 +60,7 @@
LOCAL_C_INCLUDES := \
$(call include-path-for, graphics corecg) \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
LOCAL_MODULE_TAGS := optional
diff --git a/media/libeffects/visualizer/Android.mk b/media/libeffects/visualizer/Android.mk
index 2160177..76b5110 100644
--- a/media/libeffects/visualizer/Android.mk
+++ b/media/libeffects/visualizer/Android.mk
@@ -17,7 +17,7 @@
LOCAL_C_INCLUDES := \
$(call include-path-for, graphics corecg) \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk
index 5ecc8f5..8b009aa 100644
--- a/media/libmedia/Android.mk
+++ b/media/libmedia/Android.mk
@@ -60,7 +60,7 @@
$(TOP)/frameworks/native/include/media/openmax \
external/icu4c/common \
external/expat/lib \
- system/media/audio_effects/include \
- system/media/audio_utils/include
+ $(call include-path-for, audio-effects) \
+ $(call include-path-for, audio-utils)
include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libmedia_native/Android.mk b/media/libmedia_native/Android.mk
new file mode 100644
index 0000000..065a90f
--- /dev/null
+++ b/media/libmedia_native/Android.mk
@@ -0,0 +1,11 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=
+
+LOCAL_MODULE:= libmedia_native
+
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index b4cb1ab..f96a4df 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -2280,16 +2280,8 @@
mTextDriver = new TimedTextDriver(mListener);
}
// String values written in Parcel are UTF-16 values.
- String16 uri16 = request.readString16();
- const char *uri = NULL;
- if (uri16 != NULL) {
- uri = String8(uri16).string();
- }
- String16 mimeType16 = request.readString16();
- const char *mimeType = NULL;
- if (mimeType16 != NULL) {
- mimeType = String8(mimeType16).string();
- }
+ String8 uri(request.readString16());
+ String8 mimeType(request.readString16());
return mTextDriver->addOutOfBandTextSource(uri, mimeType);
}
case INVOKE_ID_ADD_EXTERNAL_SOURCE_FD:
@@ -2301,12 +2293,7 @@
int fd = request.readFileDescriptor();
off64_t offset = request.readInt64();
size_t length = request.readInt64();
- String16 mimeType16 = request.readString16();
- const char *mimeType = NULL;
- if (mimeType16 != NULL) {
- mimeType = String8(mimeType16).string();
- }
-
+ String8 mimeType(request.readString16());
return mTextDriver->addOutOfBandTextSource(
fd, offset, length, mimeType);
}
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 2df55282..0d67800 100755
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -182,7 +182,7 @@
int32_t cameraId) {
if (camera == 0) {
- mCamera = Camera::connect(cameraId);
+ mCamera = Camera::connect(cameraId, false, false);
if (mCamera == 0) return -EBUSY;
mCameraFlags &= ~FLAGS_HOT_CAMERA;
} else {
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index 2215c07..69209b5 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -317,6 +317,13 @@
mSeeker = VBRISeeker::CreateFromSource(mDataSource, post_id3_pos);
}
+ if (mSeeker != NULL) {
+ // While it is safe to send the XING/VBRI frame to the decoder, this will
+ // result in an extra 1152 samples being output. The real first frame to
+ // decode is after the XING/VBRI frame, so skip there.
+ mFirstFramePos += frame_size;
+ }
+
int64_t durationUs;
if (mSeeker == NULL || !mSeeker->getDuration(&durationUs)) {
diff --git a/media/libstagefright/VBRISeeker.cpp b/media/libstagefright/VBRISeeker.cpp
index 6ac5a83..bcba874 100644
--- a/media/libstagefright/VBRISeeker.cpp
+++ b/media/libstagefright/VBRISeeker.cpp
@@ -92,7 +92,7 @@
}
sp<VBRISeeker> seeker = new VBRISeeker;
- seeker->mBasePos = post_id3_pos;
+ seeker->mBasePos = post_id3_pos + frameSize;
seeker->mDurationUs = durationUs;
off64_t offset = post_id3_pos;
diff --git a/media/libstagefright/XINGSeeker.cpp b/media/libstagefright/XINGSeeker.cpp
index e36d619..8c99c76 100644
--- a/media/libstagefright/XINGSeeker.cpp
+++ b/media/libstagefright/XINGSeeker.cpp
@@ -15,35 +15,13 @@
*/
#include "include/XINGSeeker.h"
+#include "include/avc_utils.h"
#include <media/stagefright/DataSource.h>
#include <media/stagefright/Utils.h>
namespace android {
-static bool parse_xing_header(
- const sp<DataSource> &source, off64_t first_frame_pos,
- int32_t *frame_number = NULL, int32_t *byte_number = NULL,
- unsigned char *table_of_contents = NULL, bool *toc_is_valid = NULL,
- int32_t *quality_indicator = NULL, int64_t *duration = NULL);
-
-// static
-sp<XINGSeeker> XINGSeeker::CreateFromSource(
- const sp<DataSource> &source, off64_t first_frame_pos) {
- sp<XINGSeeker> seeker = new XINGSeeker;
-
- seeker->mFirstFramePos = first_frame_pos;
-
- if (!parse_xing_header(
- source, first_frame_pos,
- NULL, &seeker->mSizeBytes, seeker->mTOC, &seeker->mTOCValid,
- NULL, &seeker->mDurationUs)) {
- return NULL;
- }
-
- return seeker;
-}
-
XINGSeeker::XINGSeeker()
: mDurationUs(-1),
mSizeBytes(0) {
@@ -91,60 +69,50 @@
return true;
}
-static bool parse_xing_header(
- const sp<DataSource> &source, off64_t first_frame_pos,
- int32_t *frame_number, int32_t *byte_number,
- unsigned char *table_of_contents, bool *toc_valid,
- int32_t *quality_indicator,
- int64_t *duration) {
- if (frame_number) {
- *frame_number = 0;
- }
- if (byte_number) {
- *byte_number = 0;
- }
- if (toc_valid) {
- *toc_valid = false;
- }
- if (quality_indicator) {
- *quality_indicator = 0;
- }
- if (duration) {
- *duration = 0;
- }
+// static
+sp<XINGSeeker> XINGSeeker::CreateFromSource(
+ const sp<DataSource> &source, off64_t first_frame_pos) {
+ sp<XINGSeeker> seeker = new XINGSeeker;
+
+ seeker->mFirstFramePos = first_frame_pos;
+
+ ALOGI("xingseeker first frame pos: %lld", first_frame_pos);
+
+ seeker->mSizeBytes = 0;
+ seeker->mTOCValid = false;
+ seeker->mDurationUs = 0;
uint8_t buffer[4];
int offset = first_frame_pos;
if (source->readAt(offset, &buffer, 4) < 4) { // get header
- return false;
+ return NULL;
}
offset += 4;
- uint8_t id, layer, sr_index, mode;
- layer = (buffer[1] >> 1) & 3;
- id = (buffer[1] >> 3) & 3;
- sr_index = (buffer[2] >> 2) & 3;
- mode = (buffer[3] >> 6) & 3;
- if (layer == 0) {
- return false;
+ int header = U32_AT(buffer);;
+ size_t xingframesize = 0;
+ int sampling_rate = 0;
+ int num_channels;
+ int samples_per_frame = 0;
+ if (!GetMPEGAudioFrameSize(header, &xingframesize, &sampling_rate, &num_channels,
+ NULL, &samples_per_frame)) {
+ return NULL;
}
- if (id == 1) {
- return false;
- }
- if (sr_index == 3) {
- return false;
- }
+ seeker->mFirstFramePos += xingframesize;
+
+ uint8_t version = (buffer[1] >> 3) & 3;
+
// determine offset of XING header
- if(id&1) { // mpeg1
- if (mode != 3) offset += 32;
+ if(version & 1) { // mpeg1
+ if (num_channels != 1) offset += 32;
else offset += 17;
- } else { // mpeg2
- if (mode != 3) offset += 17;
+ } else { // mpeg 2 or 2.5
+ if (num_channels != 1) offset += 17;
else offset += 9;
}
if (source->readAt(offset, &buffer, 4) < 4) { // XING header ID
- return false;
+ return NULL;
}
offset += 4;
// Check XING ID
@@ -152,73 +120,50 @@
|| (buffer[2] != 'n') || (buffer[3] != 'g')) {
if ((buffer[0] != 'I') || (buffer[1] != 'n')
|| (buffer[2] != 'f') || (buffer[3] != 'o')) {
- return false;
+ return NULL;
}
}
if (source->readAt(offset, &buffer, 4) < 4) { // flags
- return false;
+ return NULL;
}
offset += 4;
uint32_t flags = U32_AT(buffer);
if (flags & 0x0001) { // Frames field is present
if (source->readAt(offset, buffer, 4) < 4) {
- return false;
+ return NULL;
}
- if (frame_number) {
- *frame_number = U32_AT(buffer);
- }
- int32_t frame = U32_AT(buffer);
- // Samples per Frame: 1. index = MPEG Version ID, 2. index = Layer
- const int samplesPerFrames[2][3] =
- {
- { 384, 1152, 576 }, // MPEG 2, 2.5: layer1, layer2, layer3
- { 384, 1152, 1152 }, // MPEG 1: layer1, layer2, layer3
- };
- // sampling rates in hertz: 1. index = MPEG Version ID, 2. index = sampling rate index
- const int samplingRates[4][3] =
- {
- { 11025, 12000, 8000, }, // MPEG 2.5
- { 0, 0, 0, }, // reserved
- { 22050, 24000, 16000, }, // MPEG 2
- { 44100, 48000, 32000, } // MPEG 1
- };
- if (duration) {
- *duration = (int64_t)frame * samplesPerFrames[id&1][3-layer] * 1000000LL
- / samplingRates[id][sr_index];
- }
+ int32_t frames = U32_AT(buffer);
+ seeker->mDurationUs = (int64_t)frames * samples_per_frame * 1000000LL / sampling_rate;
offset += 4;
}
if (flags & 0x0002) { // Bytes field is present
- if (byte_number) {
- if (source->readAt(offset, buffer, 4) < 4) {
- return false;
- }
- *byte_number = U32_AT(buffer);
+ if (source->readAt(offset, buffer, 4) < 4) {
+ return NULL;
}
+ seeker->mSizeBytes = U32_AT(buffer);
offset += 4;
}
if (flags & 0x0004) { // TOC field is present
- if (table_of_contents) {
- if (source->readAt(offset + 1, table_of_contents, 99) < 99) {
- return false;
- }
- if (toc_valid) {
- *toc_valid = true;
- }
+ if (source->readAt(offset + 1, seeker->mTOC, 99) < 99) {
+ return NULL;
}
+ seeker->mTOCValid = true;
offset += 100;
}
+
+#if 0
if (flags & 0x0008) { // Quality indicator field is present
- if (quality_indicator) {
- if (source->readAt(offset, buffer, 4) < 4) {
- return false;
- }
- *quality_indicator = U32_AT(buffer);
+ if (source->readAt(offset, buffer, 4) < 4) {
+ return NULL;
}
+ // do something with the quality indicator
+ offset += 4;
}
- return true;
+#endif
+
+ return seeker;
}
} // namespace android
diff --git a/media/libstagefright/omx/Android.mk b/media/libstagefright/omx/Android.mk
index f587a9c..083c7ef 100644
--- a/media/libstagefright/omx/Android.mk
+++ b/media/libstagefright/omx/Android.mk
@@ -5,7 +5,6 @@
LOCAL_SRC_FILES:= \
OMX.cpp \
- OMXComponentBase.cpp \
OMXMaster.cpp \
OMXNodeInstance.cpp \
SimpleSoftOMXComponent.cpp \
diff --git a/media/libstagefright/omx/OMXComponentBase.cpp b/media/libstagefright/omx/OMXComponentBase.cpp
deleted file mode 100644
index 7d11dce..0000000
--- a/media/libstagefright/omx/OMXComponentBase.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-#include "OMXComponentBase.h"
-
-#include <stdlib.h>
-
-#include <media/stagefright/foundation/ADebug.h>
-
-namespace android {
-
-OMXComponentBase::OMXComponentBase(
- const OMX_CALLBACKTYPE *callbacks,
- OMX_PTR appData)
- : mCallbacks(callbacks),
- mAppData(appData),
- mComponentHandle(NULL) {
-}
-
-OMXComponentBase::~OMXComponentBase() {}
-
-void OMXComponentBase::setComponentHandle(OMX_COMPONENTTYPE *handle) {
- CHECK(mComponentHandle == NULL);
- mComponentHandle = handle;
-}
-
-void OMXComponentBase::postEvent(
- OMX_EVENTTYPE event, OMX_U32 param1, OMX_U32 param2) {
- (*mCallbacks->EventHandler)(
- mComponentHandle, mAppData, event, param1, param2, NULL);
-}
-
-void OMXComponentBase::postFillBufferDone(OMX_BUFFERHEADERTYPE *bufHdr) {
- (*mCallbacks->FillBufferDone)(mComponentHandle, mAppData, bufHdr);
-}
-
-void OMXComponentBase::postEmptyBufferDone(OMX_BUFFERHEADERTYPE *bufHdr) {
- (*mCallbacks->EmptyBufferDone)(mComponentHandle, mAppData, bufHdr);
-}
-
-static OMXComponentBase *getBase(OMX_HANDLETYPE hComponent) {
- return (OMXComponentBase *)
- ((OMX_COMPONENTTYPE *)hComponent)->pComponentPrivate;
-}
-
-static OMX_ERRORTYPE SendCommandWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_COMMANDTYPE Cmd,
- OMX_IN OMX_U32 nParam1,
- OMX_IN OMX_PTR pCmdData) {
- return getBase(hComponent)->sendCommand(Cmd, nParam1, pCmdData);
-}
-
-static OMX_ERRORTYPE GetParameterWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_INDEXTYPE nParamIndex,
- OMX_INOUT OMX_PTR pComponentParameterStructure) {
- return getBase(hComponent)->getParameter(
- nParamIndex, pComponentParameterStructure);
-}
-
-static OMX_ERRORTYPE SetParameterWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_INDEXTYPE nIndex,
- OMX_IN OMX_PTR pComponentParameterStructure) {
- return getBase(hComponent)->getParameter(
- nIndex, pComponentParameterStructure);
-}
-
-static OMX_ERRORTYPE GetConfigWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_INDEXTYPE nIndex,
- OMX_INOUT OMX_PTR pComponentConfigStructure) {
- return getBase(hComponent)->getConfig(nIndex, pComponentConfigStructure);
-}
-
-static OMX_ERRORTYPE SetConfigWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_INDEXTYPE nIndex,
- OMX_IN OMX_PTR pComponentConfigStructure) {
- return getBase(hComponent)->setConfig(nIndex, pComponentConfigStructure);
-}
-
-static OMX_ERRORTYPE GetExtensionIndexWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_STRING cParameterName,
- OMX_OUT OMX_INDEXTYPE* pIndexType) {
- return getBase(hComponent)->getExtensionIndex(cParameterName, pIndexType);
-}
-
-static OMX_ERRORTYPE GetStateWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_OUT OMX_STATETYPE* pState) {
- return getBase(hComponent)->getState(pState);
-}
-
-static OMX_ERRORTYPE UseBufferWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
- OMX_IN OMX_U32 nPortIndex,
- OMX_IN OMX_PTR pAppPrivate,
- OMX_IN OMX_U32 nSizeBytes,
- OMX_IN OMX_U8* pBuffer) {
- return getBase(hComponent)->useBuffer(
- ppBufferHdr, nPortIndex, pAppPrivate, nSizeBytes, pBuffer);
-}
-
-static OMX_ERRORTYPE AllocateBufferWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_INOUT OMX_BUFFERHEADERTYPE** ppBuffer,
- OMX_IN OMX_U32 nPortIndex,
- OMX_IN OMX_PTR pAppPrivate,
- OMX_IN OMX_U32 nSizeBytes) {
- return getBase(hComponent)->allocateBuffer(
- ppBuffer, nPortIndex, pAppPrivate, nSizeBytes);
-}
-
-static OMX_ERRORTYPE FreeBufferWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_U32 nPortIndex,
- OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
- return getBase(hComponent)->freeBuffer(nPortIndex, pBuffer);
-}
-
-static OMX_ERRORTYPE EmptyThisBufferWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
- return getBase(hComponent)->emptyThisBuffer(pBuffer);
-}
-
-static OMX_ERRORTYPE FillThisBufferWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
- return getBase(hComponent)->fillThisBuffer(pBuffer);
-}
-
-static OMX_ERRORTYPE ComponentDeInitWrapper(
- OMX_IN OMX_HANDLETYPE hComponent) {
- delete getBase(hComponent);
- delete (OMX_COMPONENTTYPE *)hComponent;
-
- return OMX_ErrorNone;
-}
-
-static OMX_ERRORTYPE ComponentRoleEnumWrapper(
- OMX_IN OMX_HANDLETYPE hComponent,
- OMX_OUT OMX_U8 *cRole,
- OMX_IN OMX_U32 nIndex) {
- return getBase(hComponent)->enumerateRoles(cRole, nIndex);
-}
-
-// static
-OMX_COMPONENTTYPE *OMXComponentBase::MakeComponent(OMXComponentBase *base) {
- OMX_COMPONENTTYPE *result = new OMX_COMPONENTTYPE;
-
- result->nSize = sizeof(OMX_COMPONENTTYPE);
- result->nVersion.s.nVersionMajor = 1;
- result->nVersion.s.nVersionMinor = 0;
- result->nVersion.s.nRevision = 0;
- result->nVersion.s.nStep = 0;
- result->pComponentPrivate = base;
- result->pApplicationPrivate = NULL;
-
- result->GetComponentVersion = NULL;
- result->SendCommand = SendCommandWrapper;
- result->GetParameter = GetParameterWrapper;
- result->SetParameter = SetParameterWrapper;
- result->GetConfig = GetConfigWrapper;
- result->SetConfig = SetConfigWrapper;
- result->GetExtensionIndex = GetExtensionIndexWrapper;
- result->GetState = GetStateWrapper;
- result->ComponentTunnelRequest = NULL;
- result->UseBuffer = UseBufferWrapper;
- result->AllocateBuffer = AllocateBufferWrapper;
- result->FreeBuffer = FreeBufferWrapper;
- result->EmptyThisBuffer = EmptyThisBufferWrapper;
- result->FillThisBuffer = FillThisBufferWrapper;
- result->SetCallbacks = NULL;
- result->ComponentDeInit = ComponentDeInitWrapper;
- result->UseEGLImage = NULL;
- result->ComponentRoleEnum = ComponentRoleEnumWrapper;
-
- base->setComponentHandle(result);
-
- return result;
-}
-
-} // namespace android
diff --git a/media/libstagefright/omx/OMXComponentBase.h b/media/libstagefright/omx/OMXComponentBase.h
deleted file mode 100644
index fd0df0b..0000000
--- a/media/libstagefright/omx/OMXComponentBase.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-#ifndef OMX_COMPONENT_BASE_H_
-
-#define OMX_COMPONENT_BASE_H_
-
-#include <OMX_Component.h>
-
-namespace android {
-
-struct OMXComponentBase {
- OMXComponentBase(
- const OMX_CALLBACKTYPE *callbacks,
- OMX_PTR appData);
-
- virtual ~OMXComponentBase();
-
- virtual OMX_ERRORTYPE sendCommand(
- OMX_COMMANDTYPE cmd, OMX_U32 param, OMX_PTR cmdData) = 0;
-
- virtual OMX_ERRORTYPE getParameter(
- OMX_INDEXTYPE index, OMX_PTR params) = 0;
-
- virtual OMX_ERRORTYPE setParameter(
- OMX_INDEXTYPE index, const OMX_PTR params) = 0;
-
- virtual OMX_ERRORTYPE getConfig(
- OMX_INDEXTYPE index, OMX_PTR config) = 0;
-
- virtual OMX_ERRORTYPE setConfig(
- OMX_INDEXTYPE index, const OMX_PTR config) = 0;
-
- virtual OMX_ERRORTYPE getExtensionIndex(
- const OMX_STRING name, OMX_INDEXTYPE *index) = 0;
-
- virtual OMX_ERRORTYPE useBuffer(
- OMX_BUFFERHEADERTYPE **bufHdr,
- OMX_U32 portIndex,
- OMX_PTR appPrivate,
- OMX_U32 size,
- OMX_U8 *buffer) = 0;
-
- virtual OMX_ERRORTYPE allocateBuffer(
- OMX_BUFFERHEADERTYPE **bufHdr,
- OMX_U32 portIndex,
- OMX_PTR appPrivate,
- OMX_U32 size) = 0;
-
- virtual OMX_ERRORTYPE freeBuffer(
- OMX_U32 portIndex,
- OMX_BUFFERHEADERTYPE *buffer) = 0;
-
- virtual OMX_ERRORTYPE emptyThisBuffer(OMX_BUFFERHEADERTYPE *buffer) = 0;
- virtual OMX_ERRORTYPE fillThisBuffer(OMX_BUFFERHEADERTYPE *buffer) = 0;
-
- virtual OMX_ERRORTYPE enumerateRoles(OMX_U8 *role, OMX_U32 index) = 0;
-
- virtual OMX_ERRORTYPE getState(OMX_STATETYPE *state) = 0;
-
- // Wraps a given OMXComponentBase instance into an OMX_COMPONENTTYPE
- // as required by OpenMAX APIs.
- static OMX_COMPONENTTYPE *MakeComponent(OMXComponentBase *base);
-
-protected:
- void postEvent(OMX_EVENTTYPE event, OMX_U32 param1, OMX_U32 param2);
- void postFillBufferDone(OMX_BUFFERHEADERTYPE *bufHdr);
- void postEmptyBufferDone(OMX_BUFFERHEADERTYPE *bufHdr);
-
-private:
- void setComponentHandle(OMX_COMPONENTTYPE *handle);
-
- const OMX_CALLBACKTYPE *mCallbacks;
- OMX_PTR mAppData;
- OMX_COMPONENTTYPE *mComponentHandle;
-
- OMXComponentBase(const OMXComponentBase &);
- OMXComponentBase &operator=(const OMXComponentBase &);
-};
-
-} // namespace android
-
-#endif // OMX_COMPONENT_BASE_H_
diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp
index ed83894..8ee15f8 100644
--- a/media/libstagefright/timedtext/TimedTextDriver.cpp
+++ b/media/libstagefright/timedtext/TimedTextDriver.cpp
@@ -175,7 +175,7 @@
}
sp<TimedTextSource> source;
- if (strcasecmp(mimeType, MEDIA_MIMETYPE_TEXT_SUBRIP)) {
+ if (strcasecmp(mimeType, MEDIA_MIMETYPE_TEXT_SUBRIP) == 0) {
source = TimedTextSource::CreateTimedTextSource(
dataSource, TimedTextSource::OUT_OF_BAND_FILE_SRT);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
index b794826..72fdfad 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
@@ -31,9 +31,7 @@
public class BrightnessController implements ToggleSlider.Listener {
private static final String TAG = "StatusBar.BrightnessController";
- // Backlight range is from 0 - 255. Need to make sure that user
- // doesn't set the backlight to 0 and get stuck
- private static final int MINIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_DIM + 10;
+ private static final int MINIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_DIM;
private static final int MAXIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_ON;
private Context mContext;
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk
index 86692e7..5164213 100644
--- a/services/audioflinger/Android.mk
+++ b/services/audioflinger/Android.mk
@@ -12,8 +12,8 @@
# AudioResamplerCubic.cpp.arm
LOCAL_C_INCLUDES := \
- system/media/audio_effects/include \
- system/media/audio_utils/include
+ $(call include-path-for, audio-effects) \
+ $(call include-path-for, audio-utils)
LOCAL_SHARED_LIBRARIES := \
libaudioutils \
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index adf1d49..22836e3 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <pthread.h>
+#include <time.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
@@ -33,6 +34,7 @@
#include <hardware/hardware.h>
#include <media/AudioSystem.h>
#include <media/mediaplayer.h>
+#include <utils/Condition.h>
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/String16.h>
@@ -42,6 +44,8 @@
namespace android {
+#define WAIT_RELEASE_TIMEOUT 250 // 250ms
+
// ----------------------------------------------------------------------------
// Logging support -- this is for debugging only
// Use "adb shell dumpsys media.camera -v 1" to change it.
@@ -64,6 +68,13 @@
return IPCThreadState::self()->getCallingUid();
}
+static long long getTimeInMs() {
+ struct timeval t;
+ t.tv_sec = t.tv_usec = 0;
+ gettimeofday(&t, NULL);
+ return t.tv_sec * 1000LL + t.tv_usec / 1000;
+}
+
// ----------------------------------------------------------------------------
// This is ugly and only safe if we never re-create the CameraService, but
@@ -131,7 +142,7 @@
}
sp<ICamera> CameraService::connect(
- const sp<ICameraClient>& cameraClient, int cameraId) {
+ const sp<ICameraClient>& cameraClient, int cameraId, bool force, bool keep) {
int callingPid = getCallingPid();
sp<CameraHardwareInterface> hardware = NULL;
@@ -157,27 +168,73 @@
return NULL;
}
- Mutex::Autolock lock(mServiceLock);
- if (mClient[cameraId] != 0) {
- client = mClient[cameraId].promote();
- if (client != 0) {
- if (cameraClient->asBinder() == client->getCameraClient()->asBinder()) {
- LOG1("CameraService::connect X (pid %d) (the same client)",
- callingPid);
- return client;
- } else {
- ALOGW("CameraService::connect X (pid %d) rejected (existing client).",
- callingPid);
- return NULL;
- }
- }
- mClient[cameraId].clear();
+ if (keep && !checkCallingPermission(String16("android.permission.KEEP_CAMERA"))) {
+ ALOGE("connect X (pid %d) rejected (no KEEP_CAMERA permission).", callingPid);
+ return NULL;
}
- if (mBusy[cameraId]) {
- ALOGW("CameraService::connect X (pid %d) rejected"
- " (camera %d is still busy).", callingPid, cameraId);
- return NULL;
+ Mutex::Autolock lock(mServiceLock);
+ // Check if there is an existing client.
+ client = mClient[cameraId].promote();
+ if (client != 0 &&
+ cameraClient->asBinder() == client->getCameraClient()->asBinder()) {
+ LOG1("connect X (pid %d) (the same client)", callingPid);
+ return client;
+ }
+
+ if (!force) {
+ if (mClient[cameraId].promote() != 0) {
+ ALOGW("connect X (pid %d) rejected (existing client).", callingPid);
+ return NULL;
+ }
+ mClient[cameraId].clear();
+ if (mBusy[cameraId]) {
+ ALOGW("connect X (pid %d) rejected (camera %d is still busy).",
+ callingPid, cameraId);
+ return NULL;
+ }
+ } else { // force == true
+ int i = 0;
+ long long start_time = getTimeInMs();
+ while (i < mNumberOfCameras) {
+ if (getTimeInMs() - start_time >= 3000LL) {
+ ALOGE("connect X (pid %d) rejected (timeout 3s)", callingPid);
+ return NULL;
+ }
+
+ client = mClient[i].promote();
+ if (client != 0) {
+ if (client->keep()) {
+ ALOGW("connect X (pid %d) rejected (existing client wants to keeps the camera)",
+ callingPid);
+ return NULL;
+ } else {
+ ALOGW("New client (pid %d, id=%d). Disconnect the existing client (id=%d).",
+ callingPid, cameraId, i);
+ // Do not hold mServiceLock because disconnect will try to get it.
+ mServiceLock.unlock();
+ client->notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_RELEASED, 0, &i);
+ client->waitRelease(WAIT_RELEASE_TIMEOUT);
+ client->disconnectInternal(false);
+ mServiceLock.lock();
+ // Restart from the first client because a new client may have connected
+ // when mServiceLock is unlocked.
+ i = 0;
+ continue;
+ }
+ }
+
+ if (mBusy[i]) {
+ // Give the client a chance to release the hardware.
+ mServiceLock.unlock();
+ usleep(10 * 1000);
+ mServiceLock.lock();
+ i = 0; // Restart from the first client
+ continue;
+ }
+
+ i++;
+ }
}
struct camera_info info;
@@ -195,9 +252,15 @@
return NULL;
}
- client = new Client(this, cameraClient, hardware, cameraId, info.facing, callingPid);
+ client = new Client(this, cameraClient, hardware, cameraId, info.facing,
+ callingPid, keep);
+ // We need to clear the hardware here. After the destructor of mServiceLock
+ // finishes, a new client may connect and disconnect this client. If this
+ // reference is not cleared, the destructor of CameraHardwareInterface
+ // cannot run. The new client will not be able to connect.
+ hardware.clear();
mClient[cameraId] = client;
- LOG1("CameraService::connect X");
+ LOG1("CameraService::connect X (id %d)", cameraId);
return client;
}
@@ -331,9 +394,9 @@
CameraService::Client::Client(const sp<CameraService>& cameraService,
const sp<ICameraClient>& cameraClient,
const sp<CameraHardwareInterface>& hardware,
- int cameraId, int cameraFacing, int clientPid) {
+ int cameraId, int cameraFacing, int clientPid, bool keep) {
int callingPid = getCallingPid();
- LOG1("Client::Client E (pid %d)", callingPid);
+ LOG1("Client::Client E (pid %d, id %d)", callingPid, cameraId);
mCameraService = cameraService;
mCameraClient = cameraClient;
@@ -341,6 +404,7 @@
mCameraId = cameraId;
mCameraFacing = cameraFacing;
mClientPid = clientPid;
+ mKeep = keep;
mMsgEnabled = 0;
mSurface = 0;
mPreviewWindow = 0;
@@ -359,7 +423,7 @@
mPlayShutterSound = true;
cameraService->setCameraBusy(cameraId);
cameraService->loadSound();
- LOG1("Client::Client X (pid %d)", callingPid);
+ LOG1("Client::Client X (pid %d, id %d)", callingPid, cameraId);
}
// tear down the client
@@ -468,18 +532,24 @@
}
void CameraService::Client::disconnect() {
+ disconnectInternal(true);
+}
+
+void CameraService::Client::disconnectInternal(bool needCheckPid) {
int callingPid = getCallingPid();
- LOG1("disconnect E (pid %d)", callingPid);
+ LOG1("disconnectInternal E (pid %d)", callingPid);
Mutex::Autolock lock(mLock);
- if (checkPid() != NO_ERROR) {
- ALOGW("different client - don't disconnect");
- return;
- }
+ if (needCheckPid) {
+ if (checkPid() != NO_ERROR) {
+ ALOGW("different client - don't disconnect");
+ return;
+ }
- if (mClientPid <= 0) {
- LOG1("camera is unlocked (mClientPid = %d), don't tear down hardware", mClientPid);
- return;
+ if (mClientPid <= 0) {
+ LOG1("camera is unlocked (mClientPid = %d), don't tear down hardware", mClientPid);
+ return;
+ }
}
// Make sure disconnect() is done once and once only, whether it is called
@@ -506,8 +576,16 @@
mCameraService->removeClient(mCameraClient);
mCameraService->setCameraFree(mCameraId);
+ mReleaseCondition.signal();
- LOG1("disconnect X (pid %d)", callingPid);
+ LOG1("disconnectInternal X (pid %d)", callingPid);
+}
+
+void CameraService::Client::waitRelease(int ms) {
+ Mutex::Autolock lock(mLock);
+ if (mHardware != 0) {
+ mReleaseCondition.waitRelative(mLock, ms * 1000000);
+ }
}
// ----------------------------------------------------------------------------
@@ -874,6 +952,9 @@
return OK;
} else if (cmd == CAMERA_CMD_PLAY_RECORDING_SOUND) {
mCameraService->playSound(SOUND_RECORDING);
+ } else if (cmd == CAMERA_CMD_PING) {
+ // If mHardware is 0, checkPidAndHardware will return error.
+ return OK;
}
return mHardware->sendCommand(cmd, arg1, arg2);
@@ -1217,6 +1298,10 @@
return -1;
}
+// Whether the client wants to keep the camera from taking
+bool CameraService::Client::keep() const {
+ return mKeep;
+}
// ----------------------------------------------------------------------------
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index bad41f5..457c79b 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -46,7 +46,8 @@
virtual int32_t getNumberOfCameras();
virtual status_t getCameraInfo(int cameraId,
struct CameraInfo* cameraInfo);
- virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, int cameraId);
+ virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, int cameraId,
+ bool force, bool keep);
virtual void removeClient(const sp<ICameraClient>& cameraClient);
virtual sp<Client> getClientById(int cameraId);
@@ -114,7 +115,8 @@
const sp<CameraHardwareInterface>& hardware,
int cameraId,
int cameraFacing,
- int clientPid);
+ int clientPid,
+ bool keep);
~Client();
// return our camera client
@@ -172,12 +174,19 @@
const sp<IBinder>& binder,
const sp<ANativeWindow>& window);
+ void disconnectInternal(bool needCheckPid);
+ bool keep() const;
+ void waitRelease(int ms);
+
+
// these are initialized in the constructor.
sp<CameraService> mCameraService; // immutable after constructor
sp<ICameraClient> mCameraClient;
int mCameraId; // immutable after constructor
int mCameraFacing; // immutable after constructor
pid_t mClientPid;
+ // Client wants to keep the camera from taking by other clients.
+ bool mKeep;
sp<CameraHardwareInterface> mHardware; // cleared after disconnect()
int mPreviewCallbackFlag;
int mOrientation; // Current display orientation
@@ -185,6 +194,8 @@
// Ensures atomicity among the public methods
mutable Mutex mLock;
+ // This will get notified when the hardware is released.
+ Condition mReleaseCondition;
// This is a binder of Surface or SurfaceTexture.
sp<IBinder> mSurface;
sp<ANativeWindow> mPreviewWindow;
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 6f89f6e..0c5a827 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -5443,15 +5443,16 @@
"removeSubTask()");
long ident = Binder.clearCallingIdentity();
try {
- return mMainStack.removeTaskActivitiesLocked(taskId, subTaskIndex) != null;
+ return mMainStack.removeTaskActivitiesLocked(taskId, subTaskIndex,
+ true) != null;
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
- private void cleanUpRemovedTaskLocked(ActivityRecord root, boolean killProcesses) {
- TaskRecord tr = root.task;
+ private void cleanUpRemovedTaskLocked(TaskRecord tr, int flags) {
+ final boolean killProcesses = (flags&ActivityManager.REMOVE_TASK_KILL_PROCESS) != 0;
Intent baseIntent = new Intent(
tr.intent != null ? tr.intent : tr.affinityIntent);
ComponentName component = baseIntent.getComponent();
@@ -5462,7 +5463,7 @@
// Find any running services associated with this app.
ArrayList<ServiceRecord> services = new ArrayList<ServiceRecord>();
- for (ServiceRecord sr : mServiceMap.getAllServices(root.userId)) {
+ for (ServiceRecord sr : mServiceMap.getAllServices(tr.userId)) {
if (sr.packageName.equals(component.getPackageName())) {
services.add(sr);
}
@@ -5517,11 +5518,11 @@
"removeTask()");
long ident = Binder.clearCallingIdentity();
try {
- ActivityRecord r = mMainStack.removeTaskActivitiesLocked(taskId, -1);
+ ActivityRecord r = mMainStack.removeTaskActivitiesLocked(taskId, -1,
+ false);
if (r != null) {
mRecentTasks.remove(r.task);
- cleanUpRemovedTaskLocked(r,
- (flags&ActivityManager.REMOVE_TASK_KILL_PROCESS) != 0);
+ cleanUpRemovedTaskLocked(r.task, flags);
return true;
} else {
TaskRecord tr = null;
@@ -5539,6 +5540,8 @@
// Caller is just removing a recent task that is
// not actively running. That is easy!
mRecentTasks.remove(i);
+ cleanUpRemovedTaskLocked(tr, flags);
+ return true;
} else {
Slog.w(TAG, "removeTask: task " + taskId
+ " does not have activities to remove, "
@@ -9360,7 +9363,7 @@
boolean dumpProvidersLocked(FileDescriptor fd, PrintWriter pw, String[] args,
int opti, boolean dumpAll, String dumpPackage) {
- boolean needSep = false;
+ boolean needSep = true;
ItemMatcher matcher = new ItemMatcher();
matcher.build(args, opti);
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index edebbac..a375d30 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -4011,10 +4011,13 @@
return info;
}
- public ActivityRecord removeTaskActivitiesLocked(int taskId, int subTaskIndex) {
+ public ActivityRecord removeTaskActivitiesLocked(int taskId, int subTaskIndex,
+ boolean taskRequired) {
TaskAccessInfo info = getTaskAccessInfoLocked(taskId, false);
if (info.root == null) {
- Slog.w(TAG, "removeTaskLocked: unknown taskId " + taskId);
+ if (taskRequired) {
+ Slog.w(TAG, "removeTaskLocked: unknown taskId " + taskId);
+ }
return null;
}
@@ -4025,7 +4028,9 @@
}
if (subTaskIndex >= info.subtasks.size()) {
- Slog.w(TAG, "removeTaskLocked: unknown subTaskIndex " + subTaskIndex);
+ if (taskRequired) {
+ Slog.w(TAG, "removeTaskLocked: unknown subTaskIndex " + subTaskIndex);
+ }
return null;
}
diff --git a/services/java/com/android/server/am/ContentProviderRecord.java b/services/java/com/android/server/am/ContentProviderRecord.java
index f338cfc..608b09a 100644
--- a/services/java/com/android/server/am/ContentProviderRecord.java
+++ b/services/java/com/android/server/am/ContentProviderRecord.java
@@ -157,7 +157,7 @@
sb.append("ContentProviderRecord{");
sb.append(Integer.toHexString(System.identityHashCode(this)));
sb.append(' ');
- sb.append(info.name);
+ sb.append(name.flattenToShortString());
sb.append('}');
return stringName = sb.toString();
}
diff --git a/services/java/com/android/server/am/ProviderMap.java b/services/java/com/android/server/am/ProviderMap.java
index 2021e0d..ccc928f 100644
--- a/services/java/com/android/server/am/ProviderMap.java
+++ b/services/java/com/android/server/am/ProviderMap.java
@@ -183,16 +183,20 @@
r.dump(pw, " ");
} else {
pw.print(" * ");
- pw.print(r.name.toShortString());
- /*
- if (r.app != null) {
- pw.println(":");
- pw.print(" ");
- pw.println(r.app);
- } else {
- pw.println();
+ pw.println(r);
+ if (r.proc != null) {
+ pw.print(" proc=");
+ pw.println(r.proc);
}
- */
+ if (r.launchingApp != null) {
+ pw.print(" launchingApp=");
+ pw.println(r.launchingApp);
+ }
+ if (r.clients.size() > 0 || r.externalProcessNoHandleCount > 0) {
+ pw.print(" "); pw.print(r.clients.size());
+ pw.print(" clients, "); pw.print(r.externalProcessNoHandleCount);
+ pw.println(" external handles");
+ }
}
}
}
@@ -217,7 +221,7 @@
pw.println(" ");
pw.println(" Published content providers (by class):");
dumpProvidersByClassLocked(pw, dumpAll, mGlobalByClass);
- pw.println(" ");
+ pw.println("");
}
if (mProvidersByClassPerUser.size() > 1) {
diff --git a/services/java/com/android/server/am/TaskRecord.java b/services/java/com/android/server/am/TaskRecord.java
index 67873cc..e3ebcc61 100644
--- a/services/java/com/android/server/am/TaskRecord.java
+++ b/services/java/com/android/server/am/TaskRecord.java
@@ -39,7 +39,7 @@
boolean askedCompatMode;// Have asked the user about compat mode for this task.
String stringName; // caching of toString() result.
- int userId; // user for which this task was created
+ int userId; // user for which this task was created
TaskRecord(int _taskId, ActivityInfo info, Intent _intent) {
taskId = _taskId;
diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java
index 58187b6..ab084f9 100644
--- a/services/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -41,7 +41,6 @@
BlackFrame mBlackFrame;
int mWidth, mHeight;
- int mSnapshotRotation;
int mSnapshotDeltaRotation;
int mOriginalRotation;
int mOriginalWidth, mOriginalHeight;
@@ -125,8 +124,7 @@
if (mBlackFrame != null) {
mBlackFrame.printTo(prefix + " ", pw);
}
- pw.print(prefix); pw.print("mSnapshotRotation="); pw.print(mSnapshotRotation);
- pw.print(" mSnapshotDeltaRotation="); pw.print(mSnapshotDeltaRotation);
+ pw.print(prefix); pw.print(" mSnapshotDeltaRotation="); pw.print(mSnapshotDeltaRotation);
pw.print(" mCurRotation="); pw.println(mCurRotation);
pw.print(prefix); pw.print("mOriginalRotation="); pw.print(mOriginalRotation);
pw.print(" mOriginalWidth="); pw.print(mOriginalWidth);
@@ -173,7 +171,6 @@
mContext = context;
// Screenshot does NOT include rotation!
- mSnapshotRotation = 0;
if (originalRotation == Surface.ROTATION_90
|| originalRotation == Surface.ROTATION_270) {
mWidth = originalHeight;
@@ -197,7 +194,7 @@
try {
mSurface = new Surface(session, 0, "FreezeSurface",
-1, mWidth, mHeight, PixelFormat.OPAQUE, Surface.FX_SURFACE_SCREENSHOT | Surface.HIDDEN);
- if (mSurface == null || !mSurface.isValid()) {
+ if (!mSurface.isValid()) {
// Screenshot failed, punt.
mSurface = null;
return;
@@ -281,7 +278,7 @@
// Compute the transformation matrix that must be applied
// to the snapshot to make it stay in the same original position
// with the current screen rotation.
- int delta = deltaRotation(rotation, mSnapshotRotation);
+ int delta = deltaRotation(rotation, Surface.ROTATION_0);
createRotationMatrix(delta, mWidth, mHeight, mSnapshotInitialMatrix);
if (DEBUG_STATE) Slog.v(TAG, "**** ROTATION: " + delta);
@@ -703,20 +700,18 @@
}
void updateSurfaces() {
- if (!mMoreStartExit && !mMoreFinishExit && !mMoreRotateExit) {
- if (mSurface != null) {
+ if (mSurface != null) {
+ if (!mMoreStartExit && !mMoreFinishExit && !mMoreRotateExit) {
if (DEBUG_STATE) Slog.v(TAG, "Exit animations done, hiding screenshot surface");
mSurface.hide();
}
}
- if (!mMoreStartFrame && !mMoreFinishFrame && !mMoreRotateFrame) {
- if (mBlackFrame != null) {
+ if (mBlackFrame != null) {
+ if (!mMoreStartFrame && !mMoreFinishFrame && !mMoreRotateFrame) {
if (DEBUG_STATE) Slog.v(TAG, "Frame animations done, hiding black frame");
mBlackFrame.hide();
- }
- } else {
- if (mBlackFrame != null) {
+ } else {
mBlackFrame.setMatrix(mFrameTransformation.getMatrix());
}
}
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 4f55217..f4c4069 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -1581,8 +1581,7 @@
+ w.isReadyForDisplay() + " drawpending=" + w.mDrawPending
+ " commitdrawpending=" + w.mCommitDrawPending);
if ((w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 && w.isReadyForDisplay()
- && (mWallpaperTarget == w
- || (!w.mDrawPending && !w.mCommitDrawPending))) {
+ && (mWallpaperTarget == w || w.isDrawnLw())) {
if (DEBUG_WALLPAPER) Slog.v(TAG,
"Found wallpaper activity: #" + i + "=" + w);
foundW = w;
@@ -2688,8 +2687,7 @@
win.mEnterAnimationPending = true;
}
if (displayed) {
- if (win.mSurface != null && !win.mDrawPending
- && !win.mCommitDrawPending && !mDisplayFrozen
+ if (win.isDrawnLw() && !mDisplayFrozen
&& mDisplayEnabled && mPolicy.isScreenOnFully()) {
applyEnterAnimationLocked(win);
}
@@ -3983,8 +3981,7 @@
// If we are being set visible, and the starting window is
// not yet displayed, then make sure it doesn't get displayed.
WindowState swin = wtoken.startingWindow;
- if (swin != null && (swin.mDrawPending
- || swin.mCommitDrawPending)) {
+ if (swin != null && !swin.isDrawnLw()) {
swin.mPolicyVisibility = false;
swin.mPolicyVisibilityAfterAnim = false;
}
@@ -7669,21 +7666,76 @@
}
}
- if (mScreenRotationAnimation != null) {
- if (mScreenRotationAnimation.isAnimating() ||
- mScreenRotationAnimation.mFinishAnimReady) {
- if (mScreenRotationAnimation.stepAnimationLocked(currentTime)) {
- mInnerFields.mUpdateRotation = false;
- mInnerFields.mAnimating = true;
- } else {
- mInnerFields.mUpdateRotation = true;
- mScreenRotationAnimation.kill();
- mScreenRotationAnimation = null;
- }
+ if (mScreenRotationAnimation != null &&
+ (mScreenRotationAnimation.isAnimating() ||
+ mScreenRotationAnimation.mFinishAnimReady)) {
+ if (mScreenRotationAnimation.stepAnimationLocked(currentTime)) {
+ mInnerFields.mUpdateRotation = false;
+ mInnerFields.mAnimating = true;
+ } else {
+ mInnerFields.mUpdateRotation = true;
+ mScreenRotationAnimation.kill();
+ mScreenRotationAnimation = null;
}
}
}
+ private void animateAndUpdateSurfaces(final long currentTime, final int dw, final int dh,
+ final int innerDw, final int innerDh,
+ final boolean recoveringMemory) {
+ // Update animations of all applications, including those
+ // associated with exiting/removed apps
+ Surface.openTransaction();
+
+ try {
+ mPendingLayoutChanges = performAnimationsLocked(currentTime, dw, dh,
+ innerDw, innerDh);
+ updateWindowsAppsAndRotationAnimationsLocked(currentTime, innerDw, innerDh);
+
+ // THIRD LOOP: Update the surfaces of all windows.
+
+ if (mScreenRotationAnimation != null) {
+ mScreenRotationAnimation.updateSurfaces();
+ }
+
+ final int N = mWindows.size();
+ for (int i=N-1; i>=0; i--) {
+ WindowState w = mWindows.get(i);
+ prepareSurfaceLocked(w, recoveringMemory);
+ }
+
+ if (mDimAnimator != null && mDimAnimator.mDimShown) {
+ mInnerFields.mAnimating |=
+ mDimAnimator.updateSurface(mInnerFields.mDimming, currentTime,
+ mDisplayFrozen || !mDisplayEnabled || !mPolicy.isScreenOnFully());
+ }
+
+ if (!mInnerFields.mBlurring && mBlurShown) {
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " BLUR " + mBlurSurface
+ + ": HIDE");
+ try {
+ mBlurSurface.hide();
+ } catch (IllegalArgumentException e) {
+ Slog.w(TAG, "Illegal argument exception hiding blur surface");
+ }
+ mBlurShown = false;
+ }
+
+ if (mBlackFrame != null) {
+ if (mScreenRotationAnimation != null) {
+ mBlackFrame.setMatrix(
+ mScreenRotationAnimation.getEnterTransformation().getMatrix());
+ } else {
+ mBlackFrame.clearMatrix();
+ }
+ }
+ } catch (RuntimeException e) {
+ Log.wtf(TAG, "Unhandled exception in Window Manager", e);
+ } finally {
+ Surface.closeTransaction();
+ }
+ }
+
/**
* Extracted from {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method.
*
@@ -8357,7 +8409,7 @@
mResizingWindows.add(w);
}
} else if (w.mOrientationChanging) {
- if (!w.mDrawPending && !w.mCommitDrawPending) {
+ if (w.isDrawnLw()) {
if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation not waiting for draw in "
+ w + ", surface " + w.mSurface);
@@ -8388,6 +8440,16 @@
// cases while they are hidden such as when first showing a
// window.
+ if (w.mSurface == null) {
+ if (w.mOrientationChanging) {
+ if (DEBUG_ORIENTATION) {
+ Slog.v(TAG, "Orientation change skips hidden " + w);
+ }
+ w.mOrientationChanging = false;
+ }
+ return;
+ }
+
boolean displayed = false;
w.computeShownFrameLocked();
@@ -8521,8 +8583,7 @@
}
}
- if (w.mLastHidden && !w.mDrawPending
- && !w.mCommitDrawPending
+ if (w.mLastHidden && w.isDrawnLw()
&& !w.mReadyToShow) {
if (SHOW_TRANSACTIONS) logSurface(w,
"SHOW (performLayout)", null);
@@ -8544,7 +8605,7 @@
if (displayed) {
if (w.mOrientationChanging) {
- if (w.mDrawPending || w.mCommitDrawPending) {
+ if (!w.isDrawnLw()) {
mInnerFields.mOrientationChangeComplete = false;
if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation continue waiting for draw in " + w);
@@ -8832,48 +8893,20 @@
} while (mPendingLayoutChanges != 0);
- // Update animations of all applications, including those
- // associated with exiting/removed apps
-
- mPendingLayoutChanges = performAnimationsLocked(currentTime, dw, dh,
- innerDw, innerDh);
- updateWindowsAppsAndRotationAnimationsLocked(currentTime, innerDw, innerDh);
-
- // THIRD LOOP: Update the surfaces of all windows.
-
- final boolean someoneLosingFocus = mLosingFocus.size() != 0;
+ final boolean someoneLosingFocus = !mLosingFocus.isEmpty();
mInnerFields.mObscured = false;
mInnerFields.mBlurring = false;
mInnerFields.mDimming = false;
mInnerFields.mSyswin = false;
-
- if (mScreenRotationAnimation != null) {
- mScreenRotationAnimation.updateSurfaces();
- }
-
+
final int N = mWindows.size();
-
for (i=N-1; i>=0; i--) {
WindowState w = mWindows.get(i);
+ //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
+ w.mContentChanged = false;
- if (w.mSurface != null) {
- prepareSurfaceLocked(w, recoveringMemory);
- } else if (w.mOrientationChanging) {
- if (DEBUG_ORIENTATION) {
- Slog.v(TAG, "Orientation change skips hidden " + w);
- }
- w.mOrientationChanging = false;
- }
-
- if (w.mContentChanged) {
- //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
- w.mContentChanged = false;
- }
-
- final boolean canBeSeen = w.isDisplayedLw();
-
- if (someoneLosingFocus && w == mCurrentFocus && canBeSeen) {
+ if (someoneLosingFocus && w == mCurrentFocus && w.isDisplayedLw()) {
focusDisplayed = true;
}
@@ -8892,37 +8925,15 @@
updateWallpaperVisibilityLocked();
}
}
-
- if (mDimAnimator != null && mDimAnimator.mDimShown) {
- mInnerFields.mAnimating |=
- mDimAnimator.updateSurface(mInnerFields.mDimming, currentTime,
- mDisplayFrozen || !mDisplayEnabled || !mPolicy.isScreenOnFully());
- }
-
- if (!mInnerFields.mBlurring && mBlurShown) {
- if (SHOW_TRANSACTIONS) Slog.i(TAG, " BLUR " + mBlurSurface
- + ": HIDE");
- try {
- mBlurSurface.hide();
- } catch (IllegalArgumentException e) {
- Slog.w(TAG, "Illegal argument exception hiding blur surface");
- }
- mBlurShown = false;
- }
-
- if (mBlackFrame != null) {
- if (mScreenRotationAnimation != null) {
- mBlackFrame.setMatrix(
- mScreenRotationAnimation.getEnterTransformation().getMatrix());
- } else {
- mBlackFrame.clearMatrix();
- }
- }
} catch (RuntimeException e) {
Log.wtf(TAG, "Unhandled exception in Window Manager", e);
+ } finally {
+ Surface.closeTransaction();
}
- Surface.closeTransaction();
+ // Update animations of all applications, including those
+ // associated with exiting/removed apps
+ animateAndUpdateSurfaces(currentTime, dw, dh, innerDw, innerDh, recoveringMemory);
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
"<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces");
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 48788e7..42ce291 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -1018,7 +1018,7 @@
if (!mService.mDisplayFrozen && mService.mPolicy.isScreenOnFully()) {
// We will run animations as long as the display isn't frozen.
- if (!mDrawPending && !mCommitDrawPending && mAnimation != null) {
+ if (isDrawnLw() && mAnimation != null) {
mHasTransformation = true;
mHasLocalTransformation = true;
if (!mLocalAnimating) {
@@ -1478,8 +1478,7 @@
*/
public boolean isDisplayedLw() {
final AppWindowToken atoken = mAppToken;
- return mSurface != null && mPolicyVisibility && !mDestroying
- && !mDrawPending && !mCommitDrawPending
+ return isDrawnLw() && mPolicyVisibility
&& ((!mAttachedHidden &&
(atoken == null || !atoken.hiddenRequested))
|| mAnimating);
@@ -1500,7 +1499,6 @@
* complete UI in to.
*/
public boolean isDrawnLw() {
- final AppWindowToken atoken = mAppToken;
return mSurface != null && !mDestroying
&& !mDrawPending && !mCommitDrawPending;
}
@@ -1512,9 +1510,8 @@
boolean isOpaqueDrawn() {
return (mAttrs.format == PixelFormat.OPAQUE
|| mAttrs.type == TYPE_WALLPAPER)
- && mSurface != null && mAnimation == null
- && (mAppToken == null || mAppToken.animation == null)
- && !mDrawPending && !mCommitDrawPending;
+ && isDrawnLw() && mAnimation == null
+ && (mAppToken == null || mAppToken.animation == null);
}
/**
diff --git a/tools/layoutlib/bridge/src/com/android/internal/policy/PolicyManager.java b/tools/layoutlib/bridge/src/com/android/internal/policy/PolicyManager.java
new file mode 100644
index 0000000..0100dc5
--- /dev/null
+++ b/tools/layoutlib/bridge/src/com/android/internal/policy/PolicyManager.java
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+package com.android.internal.policy;
+
+import com.android.ide.common.rendering.api.LayoutLog;
+import com.android.layoutlib.bridge.Bridge;
+import com.android.layoutlib.bridge.impl.RenderAction;
+
+import android.content.Context;
+import android.view.BridgeInflater;
+import android.view.FallbackEventHandler;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManagerPolicy;
+
+/**
+ * Custom implementation of PolicyManager that does nothing to run in LayoutLib.
+ *
+ */
+public class PolicyManager {
+
+ public static Window makeNewWindow(Context context) {
+ // this will likely crash somewhere beyond so we log it.
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
+ "Call to PolicyManager.makeNewWindow is not supported", null);
+ return null;
+ }
+
+ public static LayoutInflater makeNewLayoutInflater(Context context) {
+ return new BridgeInflater(context, RenderAction.getCurrentContext().getProjectCallback());
+ }
+
+ public static WindowManagerPolicy makeNewWindowManager() {
+ // this will likely crash somewhere beyond so we log it.
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
+ "Call to PolicyManager.makeNewWindowManager is not supported", null);
+ return null;
+ }
+
+ public static FallbackEventHandler makeNewFallbackEventHandler(Context context) {
+ return new FallbackEventHandler() {
+ @Override
+ public void setView(View v) {
+ }
+
+ @Override
+ public void preDispatchKeyEvent(KeyEvent event) {
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ return false;
+ }
+ };
+ }
+}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index ff88209..66481fd 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -29,6 +29,7 @@
import com.android.layoutlib.bridge.impl.FontLoader;
import com.android.layoutlib.bridge.impl.RenderDrawable;
import com.android.layoutlib.bridge.impl.RenderSessionImpl;
+import com.android.layoutlib.bridge.util.DynamicIdMap;
import com.android.ninepatch.NinePatchChunk;
import com.android.resources.ResourceType;
import com.android.tools.layoutlib.create.MethodAdapter;
@@ -78,7 +79,7 @@
private final static ReentrantLock sLock = new ReentrantLock();
/**
- * Maps from id to resource type/name. This is for android.R only.
+ * Maps from id to resource type/name. This is for com.android.internal.R
*/
private final static Map<Integer, Pair<ResourceType, String>> sRMap =
new HashMap<Integer, Pair<ResourceType, String>>();
@@ -89,11 +90,17 @@
private final static Map<IntArray, String> sRArrayMap = new HashMap<IntArray, String>();
/**
* Reverse map compared to sRMap, resource type -> (resource name -> id).
- * This is for android.R only.
+ * This is for com.android.internal.R.
*/
- private final static Map<ResourceType, Map<String, Integer>> sRFullMap =
+ private final static Map<ResourceType, Map<String, Integer>> sRevRMap =
new EnumMap<ResourceType, Map<String,Integer>>(ResourceType.class);
+ // framework resources are defined as 0x01XX#### where XX is the resource type (layout,
+ // drawable, etc...). Using FF as the type allows for 255 resource types before we get a
+ // collision which should be fine.
+ private final static int DYNAMIC_ID_SEED_START = 0x01ff0000;
+ private final static DynamicIdMap sDynamicIds = new DynamicIdMap(DYNAMIC_ID_SEED_START);
+
private final static Map<Object, Map<String, SoftReference<Bitmap>>> sProjectBitmapCache =
new HashMap<Object, Map<String, SoftReference<Bitmap>>>();
private final static Map<Object, Map<String, SoftReference<NinePatchChunk>>> sProject9PatchCache =
@@ -257,7 +264,7 @@
ResourceType resType = ResourceType.getEnum(resTypeName);
if (resType != null) {
Map<String, Integer> fullMap = new HashMap<String, Integer>();
- sRFullMap.put(resType, fullMap);
+ sRevRMap.put(resType, fullMap);
for (Field f : inner.getDeclaredFields()) {
// only process static final fields. Since the final attribute may have
@@ -459,7 +466,14 @@
* does not match any resource.
*/
public static Pair<ResourceType, String> resolveResourceId(int value) {
- return sRMap.get(value);
+ Pair<ResourceType, String> pair = sRMap.get(value);
+ if (pair == null) {
+ pair = sDynamicIds.resolveId(value);
+ if (pair == null) {
+ System.out.println(String.format("Missing id: %1$08X (%1$d)", value));
+ }
+ }
+ return pair;
}
/**
@@ -478,12 +492,17 @@
* @return an {@link Integer} containing the resource id, or null if no resource were found.
*/
public static Integer getResourceId(ResourceType type, String name) {
- Map<String, Integer> map = sRFullMap.get(type);
+ Map<String, Integer> map = sRevRMap.get(type);
+ Integer value = null;
if (map != null) {
- return map.get(name);
+ value = map.get(name);
}
- return null;
+ if (value == null) {
+ value = sDynamicIds.getId(type, name);
+ }
+
+ return value;
}
/**
@@ -598,6 +617,4 @@
sFramework9PatchCache.put(value, new SoftReference<NinePatchChunk>(ninePatch));
}
}
-
-
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index 6c49bab..1555d6124 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -60,6 +60,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
+import android.os.PowerManager;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
@@ -431,6 +432,10 @@
return null;
}
+ if (POWER_SERVICE.equals(service)) {
+ return new PowerManager(new BridgePowerManager(), new Handler());
+ }
+
throw new UnsupportedOperationException("Unsupported Service: " + service);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java
new file mode 100644
index 0000000..6071a6b
--- /dev/null
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java
@@ -0,0 +1,132 @@
+/*
+ * 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.
+ */
+
+package com.android.layoutlib.bridge.android;
+
+import android.os.IBinder;
+import android.os.IPowerManager;
+import android.os.RemoteException;
+import android.os.WorkSource;
+
+/**
+ * Fake implementation of IPowerManager.
+ *
+ */
+public class BridgePowerManager implements IPowerManager {
+
+ @Override
+ public boolean isScreenOn() throws RemoteException {
+ return true;
+ }
+
+ @Override
+ public IBinder asBinder() {
+ // pass for now.
+ return null;
+ }
+
+ @Override
+ public void acquireWakeLock(int arg0, IBinder arg1, String arg2, WorkSource arg3)
+ throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void clearUserActivityTimeout(long arg0, long arg1) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void crash(String arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public int getSupportedWakeLockFlags() throws RemoteException {
+ // pass for now.
+ return 0;
+ }
+
+ @Override
+ public void goToSleep(long arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void goToSleepWithReason(long arg0, int arg1) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void preventScreenOn(boolean arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void reboot(String arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void releaseWakeLock(IBinder arg0, int arg1) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void setAttentionLight(boolean arg0, int arg1) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void setAutoBrightnessAdjustment(float arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void setBacklightBrightness(int arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void setMaximumScreenOffTimeount(int arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void setPokeLock(int arg0, IBinder arg1, String arg2) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void setStayOnSetting(int arg0) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void updateWakeLockWorkSource(IBinder arg0, WorkSource arg1) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void userActivity(long arg0, boolean arg1) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
+ public void userActivityWithForce(long arg0, boolean arg1, boolean arg2) throws RemoteException {
+ // pass for now.
+ }
+}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java
new file mode 100644
index 0000000..a1fae95
--- /dev/null
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+package com.android.layoutlib.bridge.util;
+
+import com.android.resources.ResourceType;
+import com.android.util.Pair;
+
+import android.util.SparseArray;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class DynamicIdMap {
+
+ private final Map<Pair<ResourceType, String>, Integer> mDynamicIds = new HashMap<Pair<ResourceType, String>, Integer>();
+ private final SparseArray<Pair<ResourceType, String>> mRevDynamicIds = new SparseArray<Pair<ResourceType, String>>();
+ private int mDynamicSeed;
+
+ public DynamicIdMap(int seed) {
+ mDynamicSeed = seed;
+ }
+
+ public void reset(int seed) {
+ mDynamicIds.clear();
+ mRevDynamicIds.clear();
+ mDynamicSeed = seed;
+ }
+
+ /**
+ * Returns a dynamic integer for the given resource type/name, creating it if it doesn't
+ * already exist.
+ *
+ * @param type the type of the resource
+ * @param name the name of the resource
+ * @return an integer.
+ */
+ public Integer getId(ResourceType type, String name) {
+ return getId(Pair.of(type, name));
+ }
+
+ /**
+ * Returns a dynamic integer for the given resource type/name, creating it if it doesn't
+ * already exist.
+ *
+ * @param resource the type/name of the resource
+ * @return an integer.
+ */
+ public Integer getId(Pair<ResourceType, String> resource) {
+ Integer value = mDynamicIds.get(resource);
+ if (value == null) {
+ value = Integer.valueOf(++mDynamicSeed);
+ mDynamicIds.put(resource, value);
+ mRevDynamicIds.put(value, resource);
+ }
+
+ return value;
+ }
+
+ public Pair<ResourceType, String> resolveId(int id) {
+ return mRevDynamicIds.get(id);
+ }
+}
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
index 4b33474..170cd6a 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
@@ -183,10 +183,11 @@
*/
private final static String[] RENAMED_CLASSES =
new String[] {
- "android.os.ServiceManager", "android.os._Original_ServiceManager",
- "android.view.SurfaceView", "android.view._Original_SurfaceView",
+ "android.os.ServiceManager", "android.os._Original_ServiceManager",
+ "android.view.SurfaceView", "android.view._Original_SurfaceView",
"android.view.accessibility.AccessibilityManager", "android.view.accessibility._Original_AccessibilityManager",
- "android.webkit.WebView", "android.webkit._Original_WebView",
+ "android.webkit.WebView", "android.webkit._Original_WebView",
+ "com.android.internal.policy.PolicyManager", "com.android.internal.policy._Original_PolicyManager",
};
/**
diff --git a/voip/jni/rtp/Android.mk b/voip/jni/rtp/Android.mk
index 0815294..49b711d 100644
--- a/voip/jni/rtp/Android.mk
+++ b/voip/jni/rtp/Android.mk
@@ -50,7 +50,7 @@
frameworks/base/media/libstagefright/codecs/amrnb/enc/src \
frameworks/base/media/libstagefright/codecs/amrnb/dec/include \
frameworks/base/media/libstagefright/codecs/amrnb/dec/src \
- system/media/audio_effects/include
+ $(call include-path-for, audio-effects)
LOCAL_CFLAGS += -fvisibility=hidden