Merge "Save input method subtype even if the current IME is not running." into honeycomb
diff --git a/api/11.xml b/api/11.xml
index 1bcf563..16b792a 100644
--- a/api/11.xml
+++ b/api/11.xml
@@ -168910,52 +168910,6 @@
>
</method>
</class>
-<class name="FileA3D.ClassID"
- extends="java.lang.Enum"
- abstract="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="toClassID"
- return="android.renderscript.FileA3D.ClassID"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="intID" type="int">
-</parameter>
-</method>
-<method name="valueOf"
- return="android.renderscript.FileA3D.ClassID"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="name" type="java.lang.String">
-</parameter>
-</method>
-<method name="values"
- return="android.renderscript.FileA3D.ClassID[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-</class>
<class name="FileA3D.EntryType"
extends="java.lang.Enum"
abstract="false"
@@ -168997,17 +168951,6 @@
deprecated="not deprecated"
visibility="public"
>
-<method name="getClassID"
- return="android.renderscript.FileA3D.ClassID"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getEntryType"
return="android.renderscript.FileA3D.EntryType"
abstract="false"
diff --git a/api/current.xml b/api/current.xml
index 9cc3370..4a96512 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -7616,6 +7616,17 @@
visibility="public"
>
</field>
+<field name="queryHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843610"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="quickContactBadgeStyleSmallWindowLarge"
type="int"
transient="false"
@@ -86209,6 +86220,19 @@
<parameter name="texName" type="int">
</parameter>
</constructor>
+<method name="getTransformMatrix"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="mtx" type="float[]">
+</parameter>
+</method>
<method name="setOnFrameAvailableListener"
return="void"
abstract="false"
@@ -167152,7 +167176,7 @@
</parameter>
<parameter name="type" type="android.renderscript.Type">
</parameter>
-<parameter name="mc" type="android.renderscript.Allocation.MipmapControl">
+<parameter name="mips" type="android.renderscript.Allocation.MipmapControl">
</parameter>
<parameter name="usage" type="int">
</parameter>
@@ -169015,52 +169039,6 @@
>
</method>
</class>
-<class name="FileA3D.ClassID"
- extends="java.lang.Enum"
- abstract="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="toClassID"
- return="android.renderscript.FileA3D.ClassID"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="intID" type="int">
-</parameter>
-</method>
-<method name="valueOf"
- return="android.renderscript.FileA3D.ClassID"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="name" type="java.lang.String">
-</parameter>
-</method>
-<method name="values"
- return="android.renderscript.FileA3D.ClassID[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-</class>
<class name="FileA3D.EntryType"
extends="java.lang.Enum"
abstract="false"
@@ -169102,17 +169080,6 @@
deprecated="not deprecated"
visibility="public"
>
-<method name="getClassID"
- return="android.renderscript.FileA3D.ClassID"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="getEntryType"
return="android.renderscript.FileA3D.EntryType"
abstract="false"
@@ -260202,7 +260169,7 @@
deprecated="not deprecated"
visibility="public"
>
-<parameter name="t" type="T">
+<parameter name="arg0" type="T">
</parameter>
</method>
</interface>
diff --git a/core/java/android/bluetooth/BluetoothDeviceProfileState.java b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
index 21144f2..3280d39 100644
--- a/core/java/android/bluetooth/BluetoothDeviceProfileState.java
+++ b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
@@ -102,7 +102,6 @@
private BluetoothDevice mDevice;
private int mHeadsetState = BluetoothProfile.STATE_DISCONNECTED;
private int mA2dpState = BluetoothProfile.STATE_DISCONNECTED;
- private int mHidState = BluetoothProfile.STATE_DISCONNECTED;
private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@Override
@@ -140,7 +139,7 @@
int newState = intent.getIntExtra(BluetoothInputDevice.EXTRA_INPUT_DEVICE_STATE, 0);
int oldState =
intent.getIntExtra(BluetoothInputDevice.EXTRA_PREVIOUS_INPUT_DEVICE_STATE, 0);
- mHidState = newState;
+
if (oldState == BluetoothInputDevice.STATE_CONNECTED &&
newState == BluetoothInputDevice.STATE_DISCONNECTED) {
sendMessage(DISCONNECT_HID_INCOMING);
@@ -286,7 +285,8 @@
sendMessage(DISCONNECT_A2DP_OUTGOING);
deferMessage(message);
break;
- } else if (mHidState != BluetoothInputDevice.STATE_DISCONNECTED) {
+ } else if (mService.getInputDeviceState(mDevice) !=
+ BluetoothInputDevice.STATE_DISCONNECTED) {
sendMessage(DISCONNECT_HID_OUTGOING);
deferMessage(message);
break;
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index e314fce..0f062cc 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -1632,7 +1632,6 @@
*/
public static void noteDiskRead() {
BlockGuard.Policy policy = BlockGuard.getThreadPolicy();
- Log.d(TAG, "noteDiskRead; policy=" + policy);
if (!(policy instanceof AndroidBlockGuardPolicy)) {
// StrictMode not enabled.
return;
diff --git a/core/java/android/os/storage/IMountService.java b/core/java/android/os/storage/IMountService.java
index 23ed31f..b9d4711 100644
--- a/core/java/android/os/storage/IMountService.java
+++ b/core/java/android/os/storage/IMountService.java
@@ -603,6 +603,23 @@
}
return _result;
}
+
+ public int encryptStorage(String password) throws RemoteException {
+ Parcel _data = Parcel.obtain();
+ Parcel _reply = Parcel.obtain();
+ int _result;
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ _data.writeString(password);
+ mRemote.transact(Stub.TRANSACTION_encryptStorage, _data, _reply, 0);
+ _reply.readException();
+ _result = _reply.readInt();
+ } finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ return _result;
+ }
}
private static final String DESCRIPTOR = "IMountService";
@@ -661,6 +678,8 @@
static final int TRANSACTION_decryptStorage = IBinder.FIRST_CALL_TRANSACTION + 26;
+ static final int TRANSACTION_encryptStorage = IBinder.FIRST_CALL_TRANSACTION + 27;
+
/**
* Cast an IBinder object into an IMountService interface, generating a
* proxy if needed.
@@ -950,6 +969,14 @@
reply.writeInt(result);
return true;
}
+ case TRANSACTION_encryptStorage: {
+ data.enforceInterface(DESCRIPTOR);
+ String password = data.readString();
+ int result = encryptStorage(password);
+ reply.writeNoException();
+ reply.writeInt(result);
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
}
@@ -1114,4 +1141,9 @@
* Decrypts any encrypted volumes.
*/
public int decryptStorage(String password) throws RemoteException;
+
+ /**
+ * Encrypts storage.
+ */
+ public int encryptStorage(String password) throws RemoteException;
}
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index 31bc3fc..539a696 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -717,6 +717,8 @@
private void onDiscoverServicesResult(String deviceObjectPath, boolean result) {
String address = mBluetoothService.getAddressFromObjectPath(deviceObjectPath);
+ if (address == null) return;
+
// We don't parse the xml here, instead just query Bluez for the properties.
if (result) {
mBluetoothService.updateRemoteDevicePropertiesCache(address);
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index 32e609c..dd88838 100644
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -1755,7 +1755,8 @@
"Need BLUETOOTH_ADMIN permission");
String objectPath = getObjectPathFromAddress(device.getAddress());
- if (objectPath == null || getConnectedInputDevices().size() == 0) {
+ if (objectPath == null ||
+ getInputDeviceState(device) == BluetoothInputDevice.STATE_DISCONNECTED) {
return false;
}
BluetoothDeviceProfileState state = mDeviceProfileState.get(device.getAddress());
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index 7dd6cc6..5fac525 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -83,9 +83,9 @@
/**
* Creates a canvas to render into an FBO.
*/
- GLES20Canvas(int fbo, boolean translucent) {
+ GLES20Canvas(int layer, boolean translucent) {
mOpaque = !translucent;
- mRenderer = nCreateLayerRenderer(fbo);
+ mRenderer = nCreateLayerRenderer(layer);
setupFinalizer();
}
@@ -114,7 +114,7 @@
}
private static native int nCreateRenderer();
- private static native int nCreateLayerRenderer(int fbo);
+ private static native int nCreateLayerRenderer(int layer);
private static native int nGetDisplayListRenderer(int renderer);
private static native void nDestroyRenderer(int renderer);
@@ -156,11 +156,10 @@
// Hardware layers
///////////////////////////////////////////////////////////////////////////
- static native int nCreateLayer(int width, int height, int[] layerInfo);
- static native void nResizeLayer(int layerId, int layerTextureId, int width, int height,
- int[] layerInfo);
- static native void nDestroyLayer(int layerId, int layerTextureId);
- static native void nDestroyLayerDeferred(int layerId, int layerTextureId);
+ static native int nCreateLayer(int width, int height, boolean isOpaque, int[] layerInfo);
+ static native void nResizeLayer(int layerId, int width, int height, int[] layerInfo);
+ static native void nDestroyLayer(int layerId);
+ static native void nDestroyLayerDeferred(int layerId);
///////////////////////////////////////////////////////////////////////////
// Canvas management
@@ -257,18 +256,15 @@
// Hardware layer
///////////////////////////////////////////////////////////////////////////
- void drawHardwareLayer(float left, float top, float right, float bottom,
- HardwareLayer layer, Paint paint) {
+ void drawHardwareLayer(HardwareLayer layer, float x, float y, Paint paint) {
final GLES20Layer glLayer = (GLES20Layer) layer;
boolean hasColorFilter = paint != null && setupColorFilter(paint);
final int nativePaint = paint == null ? 0 : paint.mNativePaint;
- nDrawLayer(mRenderer, left, top, right, bottom, glLayer.mLayerTextureId,
- glLayer.getU(), glLayer.getV(), nativePaint);
+ nDrawLayer(mRenderer, glLayer.getLayer(), x, y, nativePaint);
if (hasColorFilter) nResetModifiers(mRenderer);
}
- private native void nDrawLayer(int renderer, float left, float top, float right, float bottom,
- int layerTexture, float u, float v, int paint);
+ private native void nDrawLayer(int renderer, int layer, float x, float y, int paint);
void interrupt() {
nInterrupt(mRenderer);
diff --git a/core/java/android/view/GLES20Layer.java b/core/java/android/view/GLES20Layer.java
index 7587657..0230430 100644
--- a/core/java/android/view/GLES20Layer.java
+++ b/core/java/android/view/GLES20Layer.java
@@ -22,52 +22,45 @@
* An OpenGL ES 2.0 implementation of {@link HardwareLayer}.
*/
class GLES20Layer extends HardwareLayer {
- private int mLayerId;
- int mLayerTextureId;
+ private int mLayer;
private int mLayerWidth;
private int mLayerHeight;
private final GLES20Canvas mCanvas;
- private float mU;
- private float mV;
-
@SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
private final Finalizer mFinalizer;
GLES20Layer(int width, int height, boolean isOpaque) {
super(width, height, isOpaque);
- int[] layerInfo = new int[3];
- mLayerId = GLES20Canvas.nCreateLayer(width, height, layerInfo);
- if (mLayerId != 0) {
+ int[] layerInfo = new int[2];
+ mLayer = GLES20Canvas.nCreateLayer(width, height, isOpaque, layerInfo);
+ if (mLayer != 0) {
mLayerWidth = layerInfo[0];
mLayerHeight = layerInfo[1];
- mLayerTextureId = layerInfo[2];
- mCanvas = new GLES20Canvas(mLayerId, !isOpaque);
- mFinalizer = new Finalizer(mLayerId, mLayerTextureId);
-
- mU = mWidth / (float) mLayerWidth;
- mV = mHeight/ (float) mLayerHeight;
+ mCanvas = new GLES20Canvas(mLayer, !isOpaque);
+ mFinalizer = new Finalizer(mLayer);
} else {
mCanvas = null;
mFinalizer = null;
}
}
- float getU() {
- return mU;
- }
-
- float getV() {
- return mV;
+ /**
+ * Returns the native layer object used to render this layer.
+ *
+ * @return A pointer to the native layer object, or 0 if the object is NULL
+ */
+ public int getLayer() {
+ return mLayer;
}
@Override
boolean isValid() {
- return mLayerId != 0 && mLayerWidth > 0 && mLayerHeight > 0;
+ return mLayer != 0 && mLayerWidth > 0 && mLayerHeight > 0;
}
@Override
@@ -77,15 +70,12 @@
mWidth = width;
mHeight = height;
- int[] layerInfo = new int[3];
+ int[] layerInfo = new int[2];
- GLES20Canvas.nResizeLayer(mLayerId, mLayerTextureId, width, height, layerInfo);
+ GLES20Canvas.nResizeLayer(mLayer, width, height, layerInfo);
mLayerWidth = layerInfo[0];
mLayerHeight = layerInfo[1];
-
- mU = mWidth / (float) mLayerWidth;
- mV = mHeight/ (float) mLayerHeight;
}
}
@@ -112,23 +102,21 @@
@Override
void destroy() {
mFinalizer.destroy();
- mLayerId = mLayerTextureId = 0;
+ mLayer = 0;
}
private static class Finalizer {
private int mLayerId;
- private int mLayerTextureId;
- public Finalizer(int layerId, int layerTextureId) {
+ public Finalizer(int layerId) {
mLayerId = layerId;
- mLayerTextureId = layerTextureId;
}
@Override
protected void finalize() throws Throwable {
try {
- if (mLayerId != 0 || mLayerTextureId != 0) {
- GLES20Canvas.nDestroyLayerDeferred(mLayerId, mLayerTextureId);
+ if (mLayerId != 0) {
+ GLES20Canvas.nDestroyLayerDeferred(mLayerId);
}
} finally {
super.finalize();
@@ -136,8 +124,8 @@
}
void destroy() {
- GLES20Canvas.nDestroyLayer(mLayerId, mLayerTextureId);
- mLayerId = mLayerTextureId = 0;
+ GLES20Canvas.nDestroyLayer(mLayerId);
+ mLayerId = 0;
}
}
}
diff --git a/core/java/android/view/HardwareCanvas.java b/core/java/android/view/HardwareCanvas.java
index 1a5df98..2273238 100644
--- a/core/java/android/view/HardwareCanvas.java
+++ b/core/java/android/view/HardwareCanvas.java
@@ -54,13 +54,10 @@
/**
* Draws the specified layer onto this canvas.
*
- * @param left The left coordinate of the layer
- * @param top The top coordinate of the layer
- * @param right The right coordinate of the layer
- * @param bottom The bottom coordinate of the layer
* @param layer The layer to composite on this canvas
+ * @param x The left coordinate of the layer
+ * @param y The top coordinate of the layer
* @param paint The paint used to draw the layer
*/
- abstract void drawHardwareLayer(float left, float top, float right, float bottom,
- HardwareLayer layer, Paint paint);
+ abstract void drawHardwareLayer(HardwareLayer layer, float x, float y, Paint paint);
}
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index e81aa98..db2cd50 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -1550,6 +1550,7 @@
@Override
public String toString() {
return "MotionEvent{" + Integer.toHexString(System.identityHashCode(this))
+ + " pointerId=" + getPointerId(0)
+ " action=" + actionToString(mAction)
+ " x=" + getX()
+ " y=" + getY()
@@ -1567,6 +1568,8 @@
+ " edgeFlags=0x" + Integer.toHexString(mEdgeFlags)
+ " device=" + mDeviceId
+ " source=0x" + Integer.toHexString(mSource)
+ + (getPointerCount() > 1 ?
+ " pointerId2=" + getPointerId(1) + " x2=" + getX(2) + " y2=" + getY(2) : "")
+ "}";
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 45c35f0..c4bd1de 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -58,6 +58,7 @@
import android.util.Pools;
import android.util.SparseArray;
import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View.MeasureSpec;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityEventSource;
import android.view.accessibility.AccessibilityManager;
@@ -3260,6 +3261,9 @@
* {@inheritDoc}
*/
public void sendAccessibilityEventUnchecked(AccessibilityEvent event) {
+ if (!isShown()) {
+ return;
+ }
event.setClassName(getClass().getName());
event.setPackageName(getContext().getPackageName());
event.setEnabled(isEnabled());
@@ -7822,6 +7826,9 @@
*
* <p>Note: if this view's parent addStateFromChildren property is enabled and this
* property is enabled, an exception will be thrown.</p>
+ *
+ * <p>Note: if the child view uses and updates additionnal states which are unknown to the
+ * parent, these states should not be affected by this method.</p>
*
* @param enabled True to enable duplication of the parent's drawable state, false
* to disable it.
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index d586043..0186f21 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -2397,8 +2397,7 @@
if (!layerSaved && layerType == LAYER_TYPE_HARDWARE) {
final HardwareLayer layer = child.getHardwareLayer(canvas);
if (layer != null && layer.isValid()) {
- ((HardwareCanvas) canvas).drawHardwareLayer(0, 0, cr - cl, cb - ct,
- layer, child.mLayerPaint);
+ ((HardwareCanvas) canvas).drawHardwareLayer(layer, 0, 0, child.mLayerPaint);
layerRendered = true;
} else {
canvas.saveLayer(sx, sy, sx + cr - cl, sy + cb - ct, child.mLayerPaint,
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index d480bbc..ad9e6863 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -486,16 +486,16 @@
mAttachInfo.mHardwareAccelerated = false;
mAttachInfo.mHardwareAccelerationRequested = false;
- // Don't enable hardware acceleration when we're not on the main thread
- if (Looper.getMainLooper() != Looper.myLooper()) {
- Log.w(HardwareRenderer.LOG_TAG, "Attempting to initialize hardware acceleration "
- + "outside of the main thread, aborting");
- return;
- }
-
// Try to enable hardware acceleration if requested
if (attrs != null &&
(attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0) {
+ // Don't enable hardware acceleration when we're not on the main thread
+ if (Looper.getMainLooper() != Looper.myLooper()) {
+ Log.w(HardwareRenderer.LOG_TAG, "Attempting to initialize hardware acceleration "
+ + "outside of the main thread, aborting");
+ return;
+ }
+
// Only enable hardware acceleration if we are not in the system process
// The window manager creates ViewRoots to display animated preview windows
// of launching apps and we don't want those to be hardware accelerated
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index cb0a2a9..e8d67da 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -23,6 +23,9 @@
import android.os.LocalPowerManager;
import android.view.animation.Animation;
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+
/**
* This interface supplies all UI-specific behavior of the window manager. An
* instance of it is created by the window manager when it starts up, and allows
@@ -817,4 +820,15 @@
* {@link Surface#ROTATION_180}, {@link Surface#ROTATION_270}.
*/
public void setUserRotationMode(int mode, int rotation);
+
+ /**
+ * Print the WindowManagerPolicy's state into the given stream.
+ *
+ * @param prefix Text to print at the front of each line.
+ * @param fd The raw file descriptor that the dump is being sent to.
+ * @param writer The PrintWriter to which you should dump your state. This will be
+ * closed for you after you return.
+ * @param args additional arguments to the dump request.
+ */
+ public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args);
}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index b893af8..43e7ef6 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -5471,6 +5471,8 @@
if (shouldForwardTouchEvent()) {
TouchEventData ted = new TouchEventData();
ted.mAction = action;
+ ted.mIds = new int[1];
+ ted.mIds[0] = ev.getPointerId(0);
ted.mPoints = new Point[1];
ted.mPoints[0] = new Point(contentX, contentY);
ted.mMetaState = ev.getMetaState();
@@ -5513,6 +5515,8 @@
|| eventTime - mLastSentTouchTime > mCurrentTouchInterval)) {
TouchEventData ted = new TouchEventData();
ted.mAction = action;
+ ted.mIds = new int[1];
+ ted.mIds[0] = ev.getPointerId(0);
ted.mPoints = new Point[1];
ted.mPoints[0] = new Point(contentX, contentY);
ted.mMetaState = ev.getMetaState();
@@ -5682,6 +5686,8 @@
// pass the touch events from UI thread to WebCore thread
if (shouldForwardTouchEvent()) {
TouchEventData ted = new TouchEventData();
+ ted.mIds = new int[1];
+ ted.mIds[0] = ev.getPointerId(0);
ted.mAction = action;
ted.mPoints = new Point[1];
ted.mPoints[0] = new Point(contentX, contentY);
@@ -5699,6 +5705,8 @@
mPrivateHandler.removeMessages(SWITCH_TO_LONGPRESS);
if (inFullScreenMode() || mDeferTouchProcess) {
TouchEventData ted = new TouchEventData();
+ ted.mIds = new int[1];
+ ted.mIds[0] = ev.getPointerId(0);
ted.mAction = WebViewCore.ACTION_DOUBLETAP;
ted.mPoints = new Point[1];
ted.mPoints[0] = new Point(contentX, contentY);
@@ -5832,8 +5840,10 @@
TouchEventData ted = new TouchEventData();
ted.mAction = ev.getAction() & MotionEvent.ACTION_MASK;
final int count = ev.getPointerCount();
+ ted.mIds = new int[count];
ted.mPoints = new Point[count];
for (int c = 0; c < count; c++) {
+ ted.mIds[c] = ev.getPointerId(c);
int x = viewToContentX((int) ev.getX(c) + mScrollX);
int y = viewToContentY((int) ev.getY(c) + mScrollY);
ted.mPoints[c] = new Point(x, y);
@@ -5927,6 +5937,8 @@
mWebViewCore.removeMessages(EventHub.TOUCH_EVENT);
}
TouchEventData ted = new TouchEventData();
+ ted.mIds = new int[1];
+ ted.mIds[0] = 0;
ted.mPoints = new Point[1];
ted.mPoints[0] = new Point(x, y);
ted.mAction = MotionEvent.ACTION_CANCEL;
@@ -7054,6 +7066,8 @@
if (inFullScreenMode() || mDeferTouchProcess) {
TouchEventData ted = new TouchEventData();
ted.mAction = WebViewCore.ACTION_LONGPRESS;
+ ted.mIds = new int[1];
+ ted.mIds[0] = 0;
ted.mPoints = new Point[1];
ted.mPoints[0] = new Point(viewToContentX((int) mLastTouchX + mScrollX),
viewToContentY((int) mLastTouchY + mScrollY));
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 2ea20ee..c56f252 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -562,8 +562,8 @@
private native void nativeTouchUp(int touchGeneration,
int framePtr, int nodePtr, int x, int y);
- private native boolean nativeHandleTouchEvent(int action, int[] x, int[] y,
- int count, int metaState);
+ private native boolean nativeHandleTouchEvent(int action, int[] idArray,
+ int[] xArray, int[] yArray, int count, int metaState);
private native void nativeUpdateFrameCache();
@@ -828,6 +828,7 @@
static class TouchEventData {
int mAction;
+ int[] mIds; // Ids of the touch points
Point[] mPoints;
int mMetaState;
boolean mReprocess;
@@ -1336,8 +1337,8 @@
mWebView.mPrivateHandler,
WebView.PREVENT_TOUCH_ID,
ted.mAction,
- nativeHandleTouchEvent(ted.mAction, xArray,
- yArray, count, ted.mMetaState) ? 1 : 0,
+ nativeHandleTouchEvent(ted.mAction, ted.mIds,
+ xArray, yArray, count, ted.mMetaState) ? 1 : 0,
ted.mReprocess ? ted : null).sendToTarget();
break;
}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 2e38743..7631df4 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -4106,8 +4106,7 @@
final int topLimit = getPaddingTop();
final int bottomLimit = getHeight() - getPaddingBottom();
- if (distance == 0 ||
- firstPos == INVALID_POSITION ||
+ if (distance == 0 || mItemCount == 0 || childCount == 0 ||
(firstPos == 0 && getChildAt(0).getTop() == topLimit && distance < 0) ||
(lastPos == mItemCount - 1 &&
getChildAt(childCount - 1).getBottom() == bottomLimit && distance > 0)) {
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java
index fce2449..dbcf1e9 100644
--- a/core/java/android/widget/DatePicker.java
+++ b/core/java/android/widget/DatePicker.java
@@ -471,8 +471,9 @@
*/
public void init(int year, int monthOfYear, int dayOfMonth,
OnDateChangedListener onDateChangedListener) {
- mOnDateChangedListener = onDateChangedListener;
updateDate(year, monthOfYear, dayOfMonth);
+ // register the callback after updating the date
+ mOnDateChangedListener = onDateChangedListener;
}
/**
diff --git a/core/java/android/widget/QuickContactBadge.java b/core/java/android/widget/QuickContactBadge.java
index bc89507..5f3d21f 100644
--- a/core/java/android/widget/QuickContactBadge.java
+++ b/core/java/android/widget/QuickContactBadge.java
@@ -112,6 +112,16 @@
mBadgeBackground = getBackground();
}
+ @Override
+ protected void drawableStateChanged() {
+ super.drawableStateChanged();
+ Drawable d = mOverlay;
+ if (d != null && d.isStateful()) {
+ d.setState(getDrawableState());
+ invalidate();
+ }
+ }
+
private void init() {
mQueryHandler = new QueryHandler(mContext.getContentResolver());
setOnClickListener(this);
@@ -130,7 +140,8 @@
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
- if (mOverlay == null || mOverlay.getIntrinsicWidth() == 0 || mOverlay.getIntrinsicHeight() == 0) {
+ if (mOverlay == null || mOverlay.getIntrinsicWidth() == 0 ||
+ mOverlay.getIntrinsicHeight() == 0) {
return; // nothing to draw
}
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index 3bf5af3..2c96056 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -217,6 +217,10 @@
if (maxWidth != -1) {
setMaxWidth(maxWidth);
}
+ CharSequence queryHint = a.getText(R.styleable.SearchView_queryHint);
+ if (!TextUtils.isEmpty(queryHint)) {
+ setQueryHint(queryHint);
+ }
a.recycle();
// Save voice intent for later queries/launching
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index b892fe2..623cd41 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4135,9 +4135,12 @@
@Override
protected int[] onCreateDrawableState(int extraSpace) {
- final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
+ final int[] drawableState;
- if (!mSingleLine) {
+ if (mSingleLine) {
+ drawableState = super.onCreateDrawableState(extraSpace);
+ } else {
+ drawableState = super.onCreateDrawableState(extraSpace + 1);
mergeDrawableStates(drawableState, MULTILINE_STATE_SET);
}
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp
index 2645045..c1229f3 100644
--- a/core/jni/android/graphics/SurfaceTexture.cpp
+++ b/core/jni/android/graphics/SurfaceTexture.cpp
@@ -82,6 +82,15 @@
surfaceTexture->updateTexImage();
}
+static void SurfaceTexture_getTransformMatrix(JNIEnv* env, jobject clazz,
+ jfloatArray jmtx)
+{
+ sp<SurfaceTexture> surfaceTexture(getSurfaceTexture(env, clazz));
+ float* mtx = env->GetFloatArrayElements(jmtx, NULL);
+ surfaceTexture->getTransformMatrix(mtx);
+ env->ReleaseFloatArrayElements(jmtx, mtx, 0);
+}
+
// ----------------------------------------------------------------------------
const char* const kSurfaceTextureClassPathName = "android/graphics/SurfaceTexture";
@@ -91,6 +100,7 @@
{"nativeClassInit", "()V", (void*)nativeClassInit },
{"init", "(I)V", (void*)SurfaceTexture_init },
{"updateTexImage", "()V", (void*)SurfaceTexture_updateTexImage },
+ {"getTransformMatrixImpl", "([F)V", (void*)SurfaceTexture_getTransformMatrix },
};
static void nativeClassInit(JNIEnv* env, jclass clazz)
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 4aed9b1..40cec3e 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -458,59 +458,49 @@
}
static OpenGLRenderer* android_view_GLES20Canvas_createLayerRenderer(JNIEnv* env,
- jobject clazz, jint fbo) {
- return new LayerRenderer(fbo);
+ jobject clazz, Layer* layer) {
+ if (layer) {
+ return new LayerRenderer(layer);
+ }
+ return NULL;
}
-static jint android_view_GLES20Canvas_createLayer(JNIEnv* env,
- jobject clazz, jint width, jint height, jintArray layerInfo) {
- uint32_t layerWidth = 0;
- uint32_t layerHeight = 0;
- GLuint textureId = 0;
+static Layer* android_view_GLES20Canvas_createLayer(JNIEnv* env, jobject clazz,
+ jint width, jint height, jboolean isOpaque, jintArray layerInfo) {
+ Layer* layer = LayerRenderer::createLayer(width, height, isOpaque);
- jint layerId = LayerRenderer::createLayer(width, height,
- &layerWidth, &layerHeight, &textureId);
-
- if (layerId) {
+ if (layer) {
jint* storage = env->GetIntArrayElements(layerInfo, NULL);
- storage[0] = layerWidth;
- storage[1] = layerHeight;
- storage[2] = textureId;
+ storage[0] = layer->width;
+ storage[1] = layer->height;
env->ReleaseIntArrayElements(layerInfo, storage, 0);
}
- return layerId;
+ return layer;
}
-static void android_view_GLES20Canvas_resizeLayer(JNIEnv* env,
- jobject clazz, jint layerId, jint layerTextureId, jint width, jint height,
- jintArray layerInfo) {
- uint32_t layerWidth = 0;
- uint32_t layerHeight = 0;
-
- LayerRenderer::resizeLayer(layerId, layerTextureId, width, height, &layerWidth, &layerHeight);
+static void android_view_GLES20Canvas_resizeLayer(JNIEnv* env, jobject clazz,
+ Layer* layer, jint width, jint height, jintArray layerInfo) {
+ LayerRenderer::resizeLayer(layer, width, height);
jint* storage = env->GetIntArrayElements(layerInfo, NULL);
- storage[0] = layerWidth;
- storage[1] = layerHeight;
+ storage[0] = layer->width;
+ storage[1] = layer->height;
env->ReleaseIntArrayElements(layerInfo, storage, 0);
}
-static void android_view_GLES20Canvas_destroyLayer(JNIEnv* env,
- jobject clazz, jint layerId, jint layerTextureId) {
- LayerRenderer::destroyLayer(layerId, layerTextureId);
+static void android_view_GLES20Canvas_destroyLayer(JNIEnv* env, jobject clazz, Layer* layer) {
+ LayerRenderer::destroyLayer(layer);
}
static void android_view_GLES20Canvas_destroyLayerDeferred(JNIEnv* env,
- jobject clazz, jint layerId, jint layerTextureId) {
- LayerRenderer::destroyLayerDeferred(layerId, layerTextureId);
+ jobject clazz, Layer* layer) {
+ LayerRenderer::destroyLayerDeferred(layer);
}
-static void android_view_GLES20Canvas_drawLayer(JNIEnv* env,
- jobject canvas, OpenGLRenderer* renderer,
- jfloat left, jfloat top, jfloat right, jfloat bottom,
- jint layerTexture, jfloat u, jfloat v, SkPaint* paint) {
- renderer->drawLayer(layerTexture, left, top, right, bottom, u, v, paint);
+static void android_view_GLES20Canvas_drawLayer(JNIEnv* env, jobject canvas,
+ OpenGLRenderer* renderer, Layer* layer, jfloat x, jfloat y, SkPaint* paint) {
+ renderer->drawLayer(layer, x, y, paint);
}
#endif // USE_OPENGL_RENDERER
@@ -602,12 +592,11 @@
{ "nResume", "(I)V", (void*) android_view_GLES20Canvas_resume },
{ "nCreateLayerRenderer", "(I)I", (void*) android_view_GLES20Canvas_createLayerRenderer },
- { "nCreateLayer", "(II[I)I", (void*) android_view_GLES20Canvas_createLayer },
- { "nResizeLayer", "(IIII[I)V", (void*) android_view_GLES20Canvas_resizeLayer },
- { "nDestroyLayer", "(II)V", (void*) android_view_GLES20Canvas_destroyLayer },
- { "nDestroyLayerDeferred", "(II)V", (void*) android_view_GLES20Canvas_destroyLayerDeferred },
- { "nDrawLayer", "(IFFFFIFFI)V",
- (void*) android_view_GLES20Canvas_drawLayer },
+ { "nCreateLayer", "(IIZ[I)I", (void*) android_view_GLES20Canvas_createLayer },
+ { "nResizeLayer", "(III[I)V" , (void*) android_view_GLES20Canvas_resizeLayer },
+ { "nDestroyLayer", "(I)V", (void*) android_view_GLES20Canvas_destroyLayer },
+ { "nDestroyLayerDeferred", "(I)V", (void*) android_view_GLES20Canvas_destroyLayerDeferred },
+ { "nDrawLayer", "(IIFFI)V", (void*) android_view_GLES20Canvas_drawLayer },
#endif
};
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index a9b907d8..080d66d 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"وضع الطائرة"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"وضع الطائرة قيد التشغيل"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"وضع الطائرة متوقف"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"الوضع الآمن"</string>
<string name="android_system_label" msgid="6577375335728551336">"نظام Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"الخدمات التي تكلفك المال"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"للسماح للتطبيق بالتحكم في الضوء الوامض."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"الدخول إلى أجهزة USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"للسماح للتطبيق بالدخول إلى أجهزة USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"اختبار الأجهزة"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"للسماح للتطبيق بالتحكم في الأجهزة الطرفية المتنوعة بغرض اختبار الأجهزة."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"اتصال مباشر بأرقام الهواتف"</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 0797e28..d1176b8e 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Самолетен режим"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Самолетният режим е ВКЛЮЧЕН"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Самолетният режим е ИЗКЛЮЧЕН"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Безопасен режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Системно от Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Услуги, които ви струват пари"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Разрешава на приложението да контролира фенерчето."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"достъп до USB устройства"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Разрешава на приложението достъп до USB устройства."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"тест на хардуера"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Разрешава на приложението да контролира различни периферни устройства с цел тестване на хардуера."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"директно обаждане до телефонни номера"</string>
@@ -991,7 +997,7 @@
<string name="media_unknown_state" msgid="729192782197290385">"Външният носител е в неизвестно състояние."</string>
<string name="share" msgid="1778686618230011964">"Споделяне"</string>
<string name="find" msgid="4808270900322985960">"Намиране"</string>
- <string name="websearch" msgid="4337157977400211589">"Търсене в мреж."</string>
+ <string name="websearch" msgid="4337157977400211589">"Уеб търсене"</string>
<!-- no translation found for gpsNotifTicker (5622683912616496172) -->
<skip />
<!-- no translation found for gpsNotifTitle (5446858717157416839) -->
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index c31d76f..e352fc0 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Mode d\'avió"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Mode d\'avió activat"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Mode d\'avió desactivat"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Mode segur"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Serveis de pagament"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Permet a l\'aplicació controlar el flaix."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"accedeix a dispositius USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Permet que l\'aplicació accedeixi als dispositius USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"provar el maquinari"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Permet a l\'aplicació controlar diversos perifèrics per fer proves de maquinari."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"trucar directament a números de telèfon"</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index ba9ef89..441ad01 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Režim V letadle"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Režim V letadle je ZAPNUTÝ"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Režim V letadle je VYPNUTÝ"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Nouzový režim"</string>
<string name="android_system_label" msgid="6577375335728551336">"Systém Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Zpoplatněné služby"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Umožňuje aplikaci ovládat kontrolku."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"přístup k zařízením USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Umožní aplikaci přístup k zařízením USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testování hardwaru"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Umožňuje aplikaci ovládat různé periferie pro účely testování hardwaru."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"přímé volání na telefonní čísla"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 7bd864b..0242ee9 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flytilstand"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flytilstand er TIL"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flytilstand er slået FRA"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Sikker tilstand"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Tjenester, der koster dig penge"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Tillader, at programmet kontrollerer lommelygten."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"adgang til USB-enheder."</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Tillader, at programmet har adgang til USB-enheder."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"test hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Tillader, at et program kontrollerer forskellige perifere enheder for at teste hardwaren."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"ring direkte op til telefonnumre"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index cee3504..87f14c5 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flugmodus"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flugmodus ist AN"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flugmodus ist aus"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Abgesicherter Modus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Kostenpflichtige Dienste"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Ermöglicht der Anwendung, die Lichtanzeige zu steuern."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"auf USB-Geräte zugreifen"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Ermöglicht der Anwendung den Zugriff auf USB-Geräte."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"Hardware testen"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Ermöglicht einer Anwendung, verschiedene Peripherie-Geräte zu Hardware-Testzwecken zu steuern."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"Telefonnummern direkt anrufen"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 8e22d70..6b8db1e 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Λειτουργία πτήσης"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Η λειτουργία πτήσης είναι ενεργοποιημένη."</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Η λειτουργία πτήσης είναι απενεργοποιημένη"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Ασφαλής λειτουργία"</string>
<string name="android_system_label" msgid="6577375335728551336">"Σύστημα Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Υπηρεσίες επί πληρωμή"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Επιτρέπει στην εφαρμογή τον έλεγχο του φακού."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"πρόσβαση σε συσκευές USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Επιτρέπει στην εφαρμογή την πρόσβαση σε συσκευές USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"δοκιμή υλικού"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Επιτρέπει σε μια εφαρμογή τον έλεγχο διαφόρων περιφερειακών για την εκτέλεση δοκιμών υλικού."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"απευθείας κλήση τηλεφωνικών αριθμών"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 1302cf3..a981ed6 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Airplane mode"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Aiplane mode is ON"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Airplane mode is OFF"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Services that cost you money"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Allows the application to control the flashlight."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"access USB devices"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Allows the application to access USB devices."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"test hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Allows the application to control various peripherals for the purpose of hardware testing."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"directly call phone numbers"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 794a7a2..5e6645d 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modo avión"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"El modo avión está Encendido"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"El modo avión está Apagado"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servicios que te cuestan dinero"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Admite que la aplicación controle la linterna."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"acceder a dispositivos USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Permite que la aplicación acceda a dispositivos USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"probar el hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Admite que la aplicación controle diversos periféricos con el fin de probar el hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"llamar directamente a números de teléfono"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index e46e0d1..4f02c4b 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modo avión"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modo avión activado. Desactivar."</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modo avión desactivado. Activar."</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servicios por los que tienes que pagar"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Permite que la aplicación controle la función de linterna."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"acceso a dispositivos USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"La aplicación puede acceder a dispositivos USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"probar hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Permite que la aplicación controle distintos periféricos con fines de prueba del hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"llamar directamente a números de teléfono"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 621332c..95871a4 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"حالت هواپیما"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"حالت هواپیما روشن است"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"حالت هواپیما خاموش است"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"حالت ایمن"</string>
<string name="android_system_label" msgid="6577375335728551336">"سیستم Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"سرویس های غیر رایگان"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"به برنامه کاربردی اجازه می دهد چراغ قوه را کنترل کند."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"دسترسی به دستگاه های USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"به برنامه کاربردی اجازه می دهد به دستگاه های USB دسترسی پیدا کند."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"تست سخت افزار"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"به برنامه کاربردی اجازه می دهد سایر برنامه های جانبی را برای تست سخت افزاری کنترل کند."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"تماس مستقیم با شماره تلفن ها"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 3149028..1392ebb 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Lentokonetila"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Lentokonetila on KÄYTÖSSÄ"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Lentokonetila on POIS KÄYTÖSTÄ"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Suojattu tila"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-järjestelmä"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Maksulliset palvelut"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Antaa sovelluksen hallita lamppua."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"käytä USB-tiloja"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Antaa sovelluksen käyttää USB-tiloja."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testaa laitteistoa"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Antaa sovelluksen hallita useita liitännäislaitteita laitteistotestaustarkoituksessa."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"soittaa puhelinnumeroihin suoraan"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 3ea7e0d..361d193 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Mode Avion"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Le mode Avion est activé."</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Le mode Avion est désactivé."</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Mode sécurisé"</string>
<string name="android_system_label" msgid="6577375335728551336">"Système Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Services payants"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Permet à l\'application de contrôler la lampe de poche."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"accéder aux périphériques USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Autorise l\'application à accéder aux périphériques USB"</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"Tests du matériel"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Permet à l\'application de contrôler différents périphériques à des fins de test matériel."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"Appel direct des numéros de téléphone"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 40e8dff..befb526 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Način rada u zrakoplovu"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Uključen je način rada u zrakoplovu"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Isključen je način rada u zrakoplovu"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Siguran način rada"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sustav Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Usluge koje se plaćaju"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Aplikaciji omogućuje nadzor nad bljeskalicom."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"pristupi USB uređajima"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Omogućuje aplikaciji pristup USB uređajima."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testiranje hardvera"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Aplikacijama omogućuje nadzor nad raznim vanjskim jedinicama u svrhu hardverskog testiranja."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"izravno pozivanje telefonskog broja"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 3af0925..0ee1bbc 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Repülőgép üzemmód"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Repülőgép üzemmód bekapcsolva"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Repülőgép üzemmód kikapcsolva"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Biztonsági üzemmód"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android rendszer"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Fizetős szolgáltatások"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Lehetővé teszi az alkalmazás számára a vaku vezérlését."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"USB-eszközök elérése"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Lehetővé teszi az alkalmazások számára az USB-eszközök elérését."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"hardver tesztelése"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Lehetővé teszi az alkalmazás számára különböző perifériák vezérlését hardvertesztelés céljából."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"telefonszámok közvetlen hívása"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 509e70e..304ef90 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Mode pesawat"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Mode pesawat HIDUP"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Mode pesawat MATI"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Mode aman"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Layanan berbayar"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Mengizinkan aplikasi mengontrol lampu senter."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"akses perangkat USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Mengizinkan aplikasi untuk perangkat USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"uji perangkat keras"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Mengizinkan aplikasi mengontrol berbagai perangkat periferal untuk tujuan menguji perangkat keras."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"panggil nomor telepon secara langsung"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 3f36563..282d375 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modalità aereo"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modalità aereo attiva"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modalità aereo non attiva"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Modalità provvisoria"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servizi che prevedono un costo"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Consente all\'applicazione di controllare il flash."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"accesso a dispositivi USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Consente all\'applicazione di accedere ai dispositivi USB"</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"esecuzione test hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Consente all\'applicazione di controllare varie periferiche per il test dell\'hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"chiamata diretta n. telefono"</string>
@@ -654,7 +660,7 @@
<string name="factorytest_not_system" msgid="4435201656767276723">"L\'azione FACTORY_TEST è supportata soltanto per i pacchetti installati in /system/app."</string>
<string name="factorytest_no_action" msgid="872991874799998561">"Nessun pacchetto trovato che fornisca l\'azione FACTORY_TEST."</string>
<string name="factorytest_reboot" msgid="6320168203050791643">"Riavvia"</string>
- <string name="js_dialog_title" msgid="8143918455087008109">"La pagina all\'indirizzo <xliff:g id="TITLE">%s</xliff:g> indica:"</string>
+ <string name="js_dialog_title" msgid="8143918455087008109">"Avviso relativo alla pagina <xliff:g id="TITLE">%s</xliff:g>:"</string>
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Uscire da questa pagina?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Seleziona OK per continuare o Annulla per rimanere nella pagina corrente."</string>
<string name="save_password_label" msgid="6860261758665825069">"Conferma"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 6396ec1..ea48002 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"מצב טיסה"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"מצב טיסה מופעל"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"מצב טיסה כבוי"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"מצב בטוח"</string>
<string name="android_system_label" msgid="6577375335728551336">"מערכת Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"שירותים שעולים לך כסף"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"מאפשר ליישום לשלוט בפנס."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"גישה להתקני USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"מאפשר ליישום גישה להתקני USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"בדוק חומרה"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"מאפשר ליישום לשלוט בציוד היקפי מסוגים שונים לצורך בדיקת חומרה."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"התקשר ישירות למספרי טלפון"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index ec9b578..6df5f3d 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"機内モード"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"機内モードON"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"機内モードOFF"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"セーフモード"</string>
<string name="android_system_label" msgid="6577375335728551336">"Androidシステム"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"料金の発生するサービス"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"ライトの制御をアプリケーションに許可します。"</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"USBデバイスへのアクセス"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"USBデバイスへのアクセスをアプリケーションに許可します。"</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"ハードウェアのテスト"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"ハードウェアのテストのためにさまざまな周辺機器を制御することをアプリケーションに許可します。"</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"電話番号発信"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index a6d93f8..10eba59 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"비행기 모드"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"비행기 모드 사용"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"비행기 모드 사용 안함"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"안전 모드"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 시스템"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"요금이 부과되는 서비스"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"애플리케이션이 카메라 플래시를 제어할 수 있도록 합니다."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"USB 장치 액세스"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"애플리케이션이 USB 장치에 액세스하도록 허용합니다."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"하드웨어 테스트"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"애플리케이션이 하드웨어를 테스트할 목적으로 다양한 주변장치를 제어할 수 있도록 합니다."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"전화번호 자동 연결"</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index f866e62..bbb629d 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Lėktuvo režimas"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"ĮJUNGTAS lėktuvo režimas"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"lėktuvo režimas IŠJUNGTAS"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Saugos režimas"</string>
<string name="android_system_label" msgid="6577375335728551336">"„Android“ sistema"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Paslaugos, už kurias mokėjote"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Leidžia programai valdyti šviesos signalą."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"pasiekti USB įrenginius"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Leidžiama programai pasiekti USB įrenginius."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"bandyti aparatinę įrangą"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Leidžia programai valdyti įvairius išorinius įrenginius aparatinės įrangos bandymo tikslais."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"skambinti tiesiogiai telefono numeriais"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 39962b0..7ef1e0a 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Lidojuma režīms"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Lidojuma režīms ir IESLĒGTS."</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Lidojuma režīms ir IZSLĒGTS."</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Drošais režīms"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android sistēma"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Maksas pakalpojumi"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Ļauj lietojumprogrammai kontrolēt uzliesmojumu."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"piekļuve USB ierīcēm"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Ļauj lietojumprogrammai piekļūt USB ierīcēm."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"pārbaudīt aparatūru"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Ļauj lietojumprogrammai kontrolēt dažādas perifērijas ierīces aparatūras pārbaudīšanas nolūkos."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"tieši zvanīt uz tālruņa numuriem"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 357d5ef..83fd2d3c 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flymodus"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flymodus er på"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flymodus er av"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Sikkermodus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Betaltjenester"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Lar applikasjonen kontrollere lommelykten."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"tilgang til USB-enheter"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Tillater programmet å få tilgang til USB-enheter."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"teste maskinvare"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Lar applikasjonen styre diverse enheter med det formål å teste maskinvaren."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"ringe telefonnummer direkte"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 7810900..3c03980 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Vliegmodus"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Vliegmodus is AAN"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Vliegmodus is UIT"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Veilige modus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-systeem"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Services waarvoor u moet betalen"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Hiermee kan de toepassing de zaklamp bedienen."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"toegang krijgen tot USB-apparaten"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Hiermee kan de toepassing toegang krijgen tot USB-apparaten."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"hardware testen"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Hiermee kan de toepassing verschillende randapparaten beheren om de hardware te testen."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"telefoonnummers rechtstreeks bellen"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 50a46a7..e82dbca 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Tryb samolotowy"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Tryb samolotowy jest włączony"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Tryb samolotowy jest wyłączony"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Tryb awaryjny"</string>
<string name="android_system_label" msgid="6577375335728551336">"System Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Usługi płatne"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Pozwala aplikacji kontrolować latarkę."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"dostęp do urządzeń USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Zezwala aplikacji na dostęp do urządzeń USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testowanie sprzętu"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Pozwala aplikacji na kontrolowanie różnych urządzeń peryferyjnych w celu testowania sprzętu."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"bezpośrednie wybieranie numerów telefonów"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 84bf0d0..41634f8 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modo de avião"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"O modo de voo está activado"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"O modo de voo está desactivado"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Serviços que implicam pagamento"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Permite à aplicação controlar a lanterna."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"aceder a dispositivos USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Permite à aplicação aceder a dispositivos USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testar hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Permite à aplicação controlar vários periféricos para fins de teste de hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"marcar números de telefone directamente"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 31d4b16..572cbce 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modo de avião"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modo de avião ATIVADO"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modo de avião DESATIVADO"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Modo de segurança"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Serviços que geram gastos"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Permite que o aplicativo controle a lanterna."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"acessar dispositivos USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Permitir que o aplicativo acesse dispositivos USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testar hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Permite que o aplicativo controle diversos periféricos para teste do hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"chamar diretamente os números de telefone"</string>
diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml
index cec239c..9a879c7 100644
--- a/core/res/res/values-rm/strings.xml
+++ b/core/res/res/values-rm/strings.xml
@@ -154,6 +154,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modus d\'aviun"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Il modus d\'aviun è activà"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Il modus d\'aviun è deactivà."</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Modus segirà"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servetschs che custan"</string>
@@ -363,6 +365,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Permetta a l\'applicaziun da controllar la glischina."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"acceder ad apparats USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Permetta a l\'applicaziun dad acceder als apparats periferics USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testar la hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Permetta ad ina applicaziun da controllar differents apparats periferics per motivs da test da hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"telefonar directamain a numers da telefon"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index f2a9aca..d0e1dc6 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Mod Avion"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modul Avion este ACTIVAT"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modul avion este DEZACTIVAT"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Mod sigur"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistemul Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servicii cu plată"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Permite aplicaţiei să controleze lanterna."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"accesare dispozitive USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Permite aplicaţiei să acceseze dispozitive USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testare hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Permite aplicaţiei să controleze diverse periferice în scopul testării componentelor hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"apelare directă numere de telefon"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index daed822..22ee02a 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Режим полета"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Режим полета ВКЛЮЧЕН"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Режим полета ВЫКЛЮЧЕН"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Безопасный режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Система Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Платные услуги"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Позволяет приложению управлять вспышкой."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"доступ к USB-устройствам"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Позволяет приложению получать доступ к USB-устройствам."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"проверять аппаратное обеспечение"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Позволяет приложению управлять различными периферийными устройствами для проверки аппаратного обеспечения."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"посылать прямые вызовы на номера телефонов"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 11323f6..397688d 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Režim V lietadle"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Režim V lietadle je ZAPNUTÝ"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Režim V lietadle je VYPNUTÝ"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Núdzový režim"</string>
<string name="android_system_label" msgid="6577375335728551336">"Systém Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Spoplatnené služby"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Umožňuje aplikácii ovládať kontrolku."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"prístup k zariadeniam USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Umožní aplikácii prístup k zariadeniam USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testovanie hardvéru"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Umožňuje aplikácii ovládať rôzne periférie na účely testovania hardvéru."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"priame volanie na telefónne čísla"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 0cbd8bf..91c42a8 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Način za letalo"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Način za letalo je VKLOPLJEN"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Način za letalo je IZKLOPLJEN"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Varni način"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Plačljive storitve"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Programu dovoljuje nadzor svetilke."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"dostop do naprav USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Programu omogoča dostop do naprav USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"preskušanje strojne opreme"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Programu dovoljuje nadzor različnih zunanjih naprav za preskušanje strojne opreme."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"neposredno klicanje telefonskih številk"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 08ea8ed..c5c1e43 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Режим рада у авиону"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Режим рада у авиону је УКЉУЧЕН"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Режим рада у авиону је ИСКЉУЧЕН"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Безбедни режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android систем"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Услуге које се плаћају"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Омогућава да апликација контролише осветљење."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"приступ USB уређајима"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Омогућава апликацији приступ USB уређајима."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"тестирање хардвера"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Омогућава да апликација контролише разноврсне периферне уређаје у сврхе тестирања хардвера."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"директно позивање бројева телефона"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index e4c3eb8..bda3863 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flygplansläge"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flygplansläge är AKTIVERAT"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flygplansläge är INAKTIVERAT"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Säkert läge"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Tjänster som kostar pengar"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Tillåter att programmet styr lampan."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"åtkomst till USB-enheter"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Tillåter att programmet använder USB-enheter."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"testa maskinvara"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Tillåter att ett program styr kringutrustning i syfte att testa maskinvara."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"ringa telefonnummer direkt"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 418c104..41593f2 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"โหมดใช้งานบนเครื่องบิน"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"เปิดโหมดใช้งานบนเครื่องบิน"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"โหมดใช้งานบนเครื่องบินปิดทำงานอยู่"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"โหมดปลอดภัย"</string>
<string name="android_system_label" msgid="6577375335728551336">"ระบบ Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"บริการที่ต้องเสียค่าใช้จ่าย"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"อนุญาตให้แอปพลิเคชันควบคุมไฟฉาย"</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"เข้าถึงอุปกรณ์ USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"อนุญาตให้แอปพลิเคชันเข้าถึงอุปกรณ์ USB"</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"ทดสอบฮาร์ดแวร์"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"อนุญาตให้แอปพลิเคชันควบคุมอุปกรณ์ต่อพ่วงหลายอย่างเพื่อการทดสอบฮาร์ดแวร์"</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"โทรติดต่อหมายเลขโทรศัพท์โดยตรง"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 7165a73..f65d77e 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Airplane mode"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Naka-ON ang airplane mode"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Naka-OFF ang airplane mode"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Mga serbisyong ginagastusan mo"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Pinapayagan ang application na kontrolin ang flashlight."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"i-access ang mga USB device"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Pinapayagan ang application na i-access ang mga USB device."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"subukan ang hardware"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Pinapayagan ang application na kontrolin ang iba\'t ibang peripheral para sa layunin ng pagsubok ng hardware."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"direktang tawagan ang mga numero ng telepono"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 0d07234..762ea47 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Uçak modu"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Uçak modu AÇIK"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Uçak modu KAPALI"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Güvenli mod"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android Sistemi"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Size maliyet getiren hizmetler"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Uygulamaların flaş ışığını denetlemesine izin verir."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"USB cihazlarına erişme"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Uygulamaların USB cihazlarına erişimine izin verir"</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"donanımı test et"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Uygulamanın donanım testi için çeşitli çevre birimlerini denetlemesine izin verir."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"telefon numaralarına doğrudan çağrı yap"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 93f41fd..a2ad6dc 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Режим польоту"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Режим польоту ВВІМК."</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Режим польоту ВИМК."</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Безп. режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Система Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Служби, які потребують оплати"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Дозволяє програмі контролювати світловий сигнал."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"отр.дост.до прист.USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Дозволяє програмі отрим. доступ до пристр. USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"тест-ти обладн."</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Дозволяє програмі контрол. різні периферійні пристрої для тестування апаратного забезпечення."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"прямо набирати номери тел."</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 997eb37..4e5220a 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -151,6 +151,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Chế độ trên máy bay"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Chế độ trên máy bay BẬT"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Chế độ trên máy bay TẮT"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"Chế độ an toàn"</string>
<string name="android_system_label" msgid="6577375335728551336">"Hệ thống Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Dịch vụ tính tiền của bạn"</string>
@@ -360,6 +362,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Cho phép ứng dụng kiểm soát đèn nháy."</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"truy cập bộ nhớ USB"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"Cho phép ứng dụng truy cập thiết bị USB."</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"kiểm tra phần cứng"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Cho phép ứng dụng kiểm soát các thiết bị ngoại vi khác nhau nhằm mục đích kiểm tra phần cứng."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"gọi trực tiếp số điện thoại"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 51f9568..1cfc5cf 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"飞行模式"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"已开启飞行模式"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"已关闭飞行模式"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 系统"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"需要您付费的服务"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"允许应用程序控制闪光灯。"</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"访问 USB 设备"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"允许应用程序访问 USB 设备。"</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"测试硬件"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"允许应用程序控制各外围设备以进行硬件测试。"</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"直接拨打电话号码"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 47cccea..d0f460f 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -152,6 +152,8 @@
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"飛航模式"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"飛航模式為 [開啟]"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"飛航模式為 [關閉]"</string>
+ <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
+ <skip />
<string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 系統"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"需要額外費用的服務。"</string>
@@ -361,6 +363,10 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"允許應用程式控制閃光燈。"</string>
<string name="permlab_accessUsb" msgid="7362327818655760496">"存取 USB 裝置"</string>
<string name="permdesc_accessUsb" msgid="2414271762914049292">"允許應用程式存取 USB 裝置。"</string>
+ <!-- no translation found for permlab_accessMtp (4953468676795917042) -->
+ <skip />
+ <!-- no translation found for permdesc_accessMtp (6532961200486791570) -->
+ <skip />
<string name="permlab_hardware_test" msgid="4148290860400659146">"測試硬體"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"允許應用程式控制各種週邊設備,以供測試用。"</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"直接撥打電話號碼"</string>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 3a3ca36..a29f4172 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -4664,6 +4664,8 @@
<attr name="iconifiedByDefault" format="boolean"/>
<!-- An optional maximum width of the SearchView. -->
<attr name="maxWidth" />
+ <!-- An optional query hint string to be displayed in the empty query field. -->
+ <attr name="queryHint" format="string" />
</declare-styleable>
<declare-styleable name="ActionBar_LayoutParams">
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 6d79569..a4834b2 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1424,6 +1424,7 @@
<public type="attr" name="alertDialogIcon" />
<public type="attr" name="windowMinWidthMajor" />
<public type="attr" name="windowMinWidthMinor" />
+ <public type="attr" name="queryHint" />
<!-- A simple fade-in animation. -->
<public type="animator" name="fade_in" id="0x010b0000" />
diff --git a/core/tests/coretests/src/android/webkit/AccessibilityInjectorTest.java b/core/tests/coretests/src/android/webkit/AccessibilityInjectorTest.java
index 955f5e8..4edd127 100644
--- a/core/tests/coretests/src/android/webkit/AccessibilityInjectorTest.java
+++ b/core/tests/coretests/src/android/webkit/AccessibilityInjectorTest.java
@@ -19,6 +19,7 @@
import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.ComponentName;
+import android.content.ContentResolver;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
@@ -29,6 +30,8 @@
import android.view.KeyEvent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
/**
* This is a test for the behavior of the {@link AccessibilityInjector}
@@ -60,6 +63,17 @@
/** Lock for locking the test. */
private static final Object sTestLock = new Object();
+ /** Key bindings used for testing. */
+ private static final String TEST_KEY_DINDINGS =
+ "0x13=0x01000100;" +
+ "0x14=0x01010100;" +
+ "0x15=0x04000000;" +
+ "0x16=0x04000000;" +
+ "0x200000013=0x03020701:0x03010201:0x03000101:0x03030001:0x03040001:0x03050001:0x03060001;" +
+ "0x200000014=0x03010001:0x03020101:0x03070201:0x03030701:0x03040701:0x03050701:0x03060701;" +
+ "0x200000015=0x03040301:0x03050401:0x03060501:0x03000601:0x03010601:0x03020601:0x03070601;" +
+ "0x200000016=0x03050601:0x03040501:0x03030401:0x03020301:0x03070301:0x03010301:0x03000301;";
+
/** Handle to the test for use by the mock service. */
private static AccessibilityInjectorTest sInstance;
@@ -75,6 +89,9 @@
/** Handle to the {@link WebView} to load data in. */
private WebView mWebView;
+ /** Used for caching the default bindings so they can be restored. */
+ private String mDefaultKeyBindings;
+
/** The received selection string for assertion checking. */
private static String sReceivedSelectionString = SELECTION_STRING_UNKNOWN;
@@ -87,6 +104,7 @@
// until JUnit4 comes to play with @BeforeTest
disableAccessibilityAndMockAccessibilityService();
enableAccessibilityAndMockAccessibilityService();
+ injectTestWebContentKeyBindings();
}
}
@@ -98,6 +116,7 @@
if (sExecutedTestCount == TEST_CASE_COUNT) {
// until JUnit4 comes to play with @AfterTest
disableAccessibilityAndMockAccessibilityService();
+ restoreDefaultWebContentKeyBindings();
}
super.tearDown();
}
@@ -852,6 +871,26 @@
}
/**
+ * Injects web content key bindings used for testing. This is required
+ * to ensure that this test will be agnostic to changes of the bindings.
+ */
+ private void injectTestWebContentKeyBindings() {
+ ContentResolver contentResolver = getContext().getContentResolver();
+ mDefaultKeyBindings = Settings.Secure.getString(contentResolver,
+ Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS);
+ Settings.Secure.putString(contentResolver,
+ Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS, TEST_KEY_DINDINGS);
+ }
+
+ /**
+ * Restores the default web content key bindings.
+ */
+ private void restoreDefaultWebContentKeyBindings() {
+ Settings.Secure.putString(getContext().getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS, mDefaultKeyBindings);
+ }
+
+ /**
* This is a worker thread responsible for creating the {@link WebView}.
*/
private class Worker implements Runnable {
diff --git a/graphics/java/android/graphics/SurfaceTexture.java b/graphics/java/android/graphics/SurfaceTexture.java
index 883c4eb..3eb0b03 100644
--- a/graphics/java/android/graphics/SurfaceTexture.java
+++ b/graphics/java/android/graphics/SurfaceTexture.java
@@ -79,6 +79,31 @@
*/
public native void updateTexImage();
+
+ /**
+ * Retrieve the 4x4 texture coordinate transform matrix associated with the texture image set by
+ * the most recent call to updateTexImage.
+ *
+ * This transform matrix maps 2D homogeneous texture coordinates of the form (s, t, 0, 1) with s
+ * and t in the inclusive range [0, 1] to the texture coordinate that should be used to sample
+ * that location from the texture. Sampling the texture outside of the range of this transform
+ * is undefined.
+ *
+ * The matrix is stored in column-major order so that it may be passed directly to OpenGL ES via
+ * the glLoadMatrixf or glUniformMatrix4fv functions.
+ *
+ * @param mtx the array into which the 4x4 matrix will be stored. The array must have exactly
+ * 16 elements.
+ */
+ public void getTransformMatrix(float[] mtx) {
+ if (mtx.length != 16) {
+ throw new IllegalArgumentException();
+ }
+ getTransformMatrixImpl(mtx);
+ }
+
+ private native void getTransformMatrixImpl(float[] mtx);
+
private native void init(int texName);
/*
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index 6b309e1..579f314 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -479,26 +479,67 @@
mBitmapOptions.inScaled = false;
}
- static public Allocation createTyped(RenderScript rs, Type type, MipmapControl mc, int usage) {
+ /**
+ *
+ * @param type renderscript type describing data layout
+ * @param mips specifies desired mipmap behaviour for the
+ * allocation
+ * @param usage bit field specifying how the allocation is
+ * utilized
+ */
+ static public Allocation createTyped(RenderScript rs, Type type, MipmapControl mips, int usage) {
rs.validate();
if (type.getID() == 0) {
throw new RSInvalidStateException("Bad Type");
}
- int id = rs.nAllocationCreateTyped(type.getID(), mc.mID, usage);
+ int id = rs.nAllocationCreateTyped(type.getID(), mips.mID, usage);
if (id == 0) {
throw new RSRuntimeException("Allocation creation failed.");
}
return new Allocation(id, rs, type, usage);
}
+ /**
+ * Creates a renderscript allocation with the size specified by
+ * the type and no mipmaps generated by default
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param type renderscript type describing data layout
+ * @param usage bit field specifying how the allocation is
+ * utilized
+ *
+ * @return allocation
+ */
static public Allocation createTyped(RenderScript rs, Type type, int usage) {
return createTyped(rs, type, MipmapControl.MIPMAP_NONE, usage);
}
+ /**
+ * Creates a renderscript allocation for use by the script with
+ * the size specified by the type and no mipmaps generated by
+ * default
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param type renderscript type describing data layout
+ *
+ * @return allocation
+ */
static public Allocation createTyped(RenderScript rs, Type type) {
return createTyped(rs, type, MipmapControl.MIPMAP_NONE, USAGE_SCRIPT);
}
+ /**
+ * Creates a renderscript allocation with a specified number of
+ * given elements
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param e describes what each element of an allocation is
+ * @param count specifies the number of element in the allocation
+ * @param usage bit field specifying how the allocation is
+ * utilized
+ *
+ * @return allocation
+ */
static public Allocation createSized(RenderScript rs, Element e,
int count, int usage) {
rs.validate();
@@ -513,6 +554,16 @@
return new Allocation(id, rs, t, usage);
}
+ /**
+ * Creates a renderscript allocation with a specified number of
+ * given elements
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param e describes what each element of an allocation is
+ * @param count specifies the number of element in the allocation
+ *
+ * @return allocation
+ */
static public Allocation createSized(RenderScript rs, Element e, int count) {
return createSized(rs, e, count, USAGE_SCRIPT);
}
@@ -544,6 +595,19 @@
return tb.create();
}
+ /**
+ * Creates a renderscript allocation from a bitmap
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param b bitmap source for the allocation data
+ * @param mips specifies desired mipmap behaviour for the
+ * allocation
+ * @param usage bit field specifying how the allocation is
+ * utilized
+ *
+ * @return renderscript allocation containing bitmap data
+ *
+ */
static public Allocation createFromBitmap(RenderScript rs, Bitmap b,
MipmapControl mips,
int usage) {
@@ -557,23 +621,35 @@
return new Allocation(id, rs, t, usage);
}
+ /**
+ * Creates a non-mipmapped renderscript allocation to use as a
+ * graphics texture
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param b bitmap source for the allocation data
+ *
+ * @return renderscript allocation containing bitmap data
+ *
+ */
static public Allocation createFromBitmap(RenderScript rs, Bitmap b) {
return createFromBitmap(rs, b, MipmapControl.MIPMAP_NONE,
USAGE_GRAPHICS_TEXTURE);
}
/**
- * Creates a cubemap allocation from a bitmap containing the
- * horizontal list of cube faces. Each individual face must be
- * the same size and power of 2
- *
- * @param rs
- * @param b bitmap with cubemap faces layed out in the following
- * format: right, left, top, bottom, front, back
- * @param mips specifies desired mipmap behaviour for the cubemap
- * @param usage bitfield specifying how the cubemap is utilized
- *
- **/
+ * Creates a cubemap allocation from a bitmap containing the
+ * horizontal list of cube faces. Each individual face must be
+ * the same size and power of 2
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param b bitmap with cubemap faces layed out in the following
+ * format: right, left, top, bottom, front, back
+ * @param mips specifies desired mipmap behaviour for the cubemap
+ * @param usage bit field specifying how the cubemap is utilized
+ *
+ * @return allocation containing cubemap data
+ *
+ */
static public Allocation createCubemapFromBitmap(RenderScript rs, Bitmap b,
MipmapControl mips,
int usage) {
@@ -608,12 +684,43 @@
return new Allocation(id, rs, t, usage);
}
+ /**
+ * Creates a non-mipmapped cubemap allocation for use as a
+ * graphics texture from a bitmap containing the horizontal list
+ * of cube faces. Each individual face must be the same size and
+ * power of 2
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param b bitmap with cubemap faces layed out in the following
+ * format: right, left, top, bottom, front, back
+ *
+ * @return allocation containing cubemap data
+ *
+ */
static public Allocation createCubemapFromBitmap(RenderScript rs,
Bitmap b) {
return createCubemapFromBitmap(rs, b, MipmapControl.MIPMAP_NONE,
USAGE_GRAPHICS_TEXTURE);
}
+ /**
+ * Creates a cubemap allocation from 6 bitmaps containing
+ * the cube faces. All the faces must be the same size and
+ * power of 2
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param xpos cubemap face in the positive x direction
+ * @param xneg cubemap face in the negative x direction
+ * @param ypos cubemap face in the positive y direction
+ * @param yneg cubemap face in the negative y direction
+ * @param zpos cubemap face in the positive z direction
+ * @param zneg cubemap face in the negative z direction
+ * @param mips specifies desired mipmap behaviour for the cubemap
+ * @param usage bit field specifying how the cubemap is utilized
+ *
+ * @return allocation containing cubemap data
+ *
+ */
static public Allocation createCubemapFromCubeFaces(RenderScript rs,
Bitmap xpos,
Bitmap xneg,
@@ -663,6 +770,23 @@
return cubemap;
}
+ /**
+ * Creates a non-mipmapped cubemap allocation for use as a
+ * graphics texture from 6 bitmaps containing
+ * the cube faces. All the faces must be the same size and
+ * power of 2
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param xpos cubemap face in the positive x direction
+ * @param xneg cubemap face in the negative x direction
+ * @param ypos cubemap face in the positive y direction
+ * @param yneg cubemap face in the negative y direction
+ * @param zpos cubemap face in the positive z direction
+ * @param zneg cubemap face in the negative z direction
+ *
+ * @return allocation containing cubemap data
+ *
+ */
static public Allocation createCubemapFromCubeFaces(RenderScript rs,
Bitmap xpos,
Bitmap xneg,
@@ -675,6 +799,21 @@
USAGE_GRAPHICS_TEXTURE);
}
+ /**
+ * Creates a renderscript allocation from the bitmap referenced
+ * by resource id
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param res application resources
+ * @param id resource id to load the data from
+ * @param mips specifies desired mipmap behaviour for the
+ * allocation
+ * @param usage bit field specifying how the allocation is
+ * utilized
+ *
+ * @return renderscript allocation containing resource data
+ *
+ */
static public Allocation createFromBitmapResource(RenderScript rs,
Resources res,
int id,
@@ -688,6 +827,17 @@
return alloc;
}
+ /**
+ * Creates a non-mipmapped renderscript allocation to use as a
+ * graphics texture from the bitmap referenced by resource id
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param res application resources
+ * @param id resource id to load the data from
+ *
+ * @return renderscript allocation containing resource data
+ *
+ */
static public Allocation createFromBitmapResource(RenderScript rs,
Resources res,
int id) {
@@ -696,6 +846,16 @@
USAGE_GRAPHICS_TEXTURE);
}
+ /**
+ * Creates a renderscript allocation containing string data
+ * encoded in UTF-8 format
+ *
+ * @param rs Context to which the allocation will belong.
+ * @param str string to create the allocation from
+ * @param usage bit field specifying how the allocaiton is
+ * utilized
+ *
+ */
static public Allocation createFromString(RenderScript rs,
String str,
int usage) {
diff --git a/graphics/java/android/renderscript/FileA3D.java b/graphics/java/android/renderscript/FileA3D.java
index 90d102c..fe3971a 100644
--- a/graphics/java/android/renderscript/FileA3D.java
+++ b/graphics/java/android/renderscript/FileA3D.java
@@ -28,22 +28,22 @@
import android.util.TypedValue;
/**
+ * FileA3D allows users to load renderscript objects from files
+ * or resources stored on disk. It could be used to load items
+ * such as 3d geometry data converted a renderscript format from
+ * content creation tools. Currently only meshes are supported
+ * in FileA3D.
+ *
+ * When successfully loaded, FileA3D will contain a list of
+ * index entries for all the objects stored inside it.
*
**/
public class FileA3D extends BaseObj {
- // This will go away in the clean up pass,
- // trying to avoid multiproject submits
- public enum ClassID {
-
- UNKNOWN,
- MESH;
-
- public static ClassID toClassID(int intID) {
- return ClassID.values()[intID];
- }
- }
-
+ /**
+ * Specifies what renderscript object type is contained within
+ * the FileA3D IndexEntry
+ **/
public enum EntryType {
UNKNOWN (0),
@@ -59,34 +59,48 @@
}
}
- // Read only class with index entries
+ /**
+ * IndexEntry contains information about one of the renderscript
+ * objects inside the file's index. It could be used to query the
+ * object's type and name and load the object itself if
+ * necessary.
+ */
public static class IndexEntry {
RenderScript mRS;
int mIndex;
int mID;
String mName;
- ClassID mClassID;
EntryType mEntryType;
BaseObj mLoadedObj;
+ /**
+ * @return name of a renderscript object the index entry
+ * describes
+ */
public String getName() {
return mName;
}
- public ClassID getClassID() {
- return mClassID;
- }
-
+ /**
+ * @return type of a renderscript object the index entry
+ * describes
+ */
public EntryType getEntryType() {
return mEntryType;
}
+ /**
+ * @return renderscript object described by the entry
+ */
public BaseObj getObject() {
mRS.validate();
BaseObj obj = internalCreate(mRS, this);
return obj;
}
+ /**
+ * @return renderscript mesh object described by the entry
+ */
public Mesh getMesh() {
return (Mesh)getObject();
}
@@ -122,7 +136,6 @@
mID = id;
mName = name;
mEntryType = type;
- mClassID = mEntryType == EntryType.MESH ? ClassID.MESH : ClassID.UNKNOWN;
mLoadedObj = null;
}
}
@@ -152,6 +165,9 @@
}
}
+ /**
+ * @return the numberof objects stored inside a FileA3D
+ */
public int getIndexEntryCount() {
if(mFileEntries == null) {
return 0;
@@ -159,6 +175,12 @@
return mFileEntries.length;
}
+ /**
+ * Returns an index entry from the list of all objects inside
+ * FileA3D
+ *
+ * @param index number of the entry from the list to return
+ */
public IndexEntry getIndexEntry(int index) {
if(getIndexEntryCount() == 0 || index < 0 || index >= mFileEntries.length) {
return null;
@@ -166,6 +188,14 @@
return mFileEntries[index];
}
+ /**
+ * Creates a FileA3D object from an asset stored on disk
+ *
+ * @param rs Context to which the object will belong.
+ * @param mgr asset manager used to load asset
+ * @param path location of the file to load
+ *
+ */
static public FileA3D createFromAsset(RenderScript rs, AssetManager mgr, String path) {
rs.validate();
int fileId = rs.nFileA3DCreateFromAsset(mgr, path);
@@ -178,6 +208,13 @@
return fa3d;
}
+ /**
+ * Creates a FileA3D object from a file stored on disk
+ *
+ * @param rs Context to which the object will belong.
+ * @param path location of the file to load
+ *
+ */
static public FileA3D createFromFile(RenderScript rs, String path) {
int fileId = rs.nFileA3DCreateFromFile(path);
@@ -189,10 +226,25 @@
return fa3d;
}
+ /**
+ * Creates a FileA3D object from a file stored on disk
+ *
+ * @param rs Context to which the object will belong.
+ * @param path location of the file to load
+ *
+ */
static public FileA3D createFromFile(RenderScript rs, File path) {
return createFromFile(rs, path.getAbsolutePath());
}
+ /**
+ * Creates a FileA3D object from an application resource
+ *
+ * @param rs Context to which the object will belong.
+ * @param res resource manager used for loading
+ * @param id resource to create FileA3D from
+ *
+ */
static public FileA3D createFromResource(RenderScript rs, Resources res, int id) {
rs.validate();
diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java
index f1f1237..fcf8178 100644
--- a/graphics/java/android/renderscript/Mesh.java
+++ b/graphics/java/android/renderscript/Mesh.java
@@ -172,7 +172,7 @@
/**
* Creates builder object
- * @param rs
+ * @param rs Context to which the mesh will belong.
* @param usage specifies how the mesh allocations are to be
* handled, whether they need to be uploaded to a
* buffer on the gpu, maintain a cpu copy, etc
@@ -512,7 +512,7 @@
public static final int TEXTURE_0 = 0x0100;
/**
- * @param rs
+ * @param rs Context to which the mesh will belong.
* @param vtxSize specifies whether the vertex is a float2 or
* float3
* @param flags bitfield that is a combination of COLOR, NORMAL,
diff --git a/graphics/java/android/renderscript/ProgramFragment.java b/graphics/java/android/renderscript/ProgramFragment.java
index 14c0c01..333880d 100644
--- a/graphics/java/android/renderscript/ProgramFragment.java
+++ b/graphics/java/android/renderscript/ProgramFragment.java
@@ -36,7 +36,7 @@
/**
* Create a builder object.
*
- * @param rs
+ * @param rs Context to which the program will belong.
*/
public Builder(RenderScript rs) {
super(rs);
diff --git a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
index 663bc9f..1af31f8 100644
--- a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
+++ b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
@@ -194,7 +194,7 @@
/**
* Creates a builder for fixed function fragment program
*
- * @param rs
+ * @param rs Context to which the program will belong.
*/
public Builder(RenderScript rs) {
mRS = rs;
diff --git a/graphics/java/android/renderscript/ProgramStore.java b/graphics/java/android/renderscript/ProgramStore.java
index 0e2227e..9128f9b 100644
--- a/graphics/java/android/renderscript/ProgramStore.java
+++ b/graphics/java/android/renderscript/ProgramStore.java
@@ -22,16 +22,61 @@
/**
+ * ProgarmStore contains a set of parameters that control how
+ * the graphics hardware handles writes to the framebuffer.
+ *
+ * It could be used to:
+ * - enable/diable depth testing
+ * - specify wheather depth writes are performed
+ * - setup various blending modes for use in effects like
+ * transparency
+ * - define write masks for color components written into the
+ * framebuffer
*
**/
public class ProgramStore extends BaseObj {
+ /**
+ * Specifies the function used to determine whether a fragment
+ * will be drawn during the depth testing stage in the rendering
+ * pipeline by comparing its value with that already in the depth
+ * buffer. DepthFunc is only valid when depth buffer is present
+ * and depth testing is enabled
+ */
public enum DepthFunc {
+
+ /**
+ * Always drawn
+ */
ALWAYS (0),
+ /**
+ * Drawn if the incoming depth value is less than that in the
+ * depth buffer
+ */
LESS (1),
+ /**
+ * Drawn if the incoming depth value is less or equal to that in
+ * the depth buffer
+ */
LESS_OR_EQUAL (2),
+ /**
+ * Drawn if the incoming depth value is greater than that in the
+ * depth buffer
+ */
GREATER (3),
+ /**
+ * Drawn if the incoming depth value is greater or equal to that
+ * in the depth buffer
+ */
GREATER_OR_EQUAL (4),
+ /**
+ * Drawn if the incoming depth value is equal to that in the
+ * depth buffer
+ */
EQUAL (5),
+ /**
+ * Drawn if the incoming depth value is not equal to that in the
+ * depth buffer
+ */
NOT_EQUAL (6);
int mID;
@@ -40,6 +85,14 @@
}
}
+ /**
+ * Specifies the functions used to combine incoming pixels with
+ * those already in the frame buffer.
+ *
+ * BlendSrcFunc describes how the coefficient used to scale the
+ * source pixels during the blending operation is computed
+ *
+ */
public enum BlendSrcFunc {
ZERO (0),
ONE (1),
@@ -57,6 +110,15 @@
}
}
+ /**
+ * Specifies the functions used to combine incoming pixels with
+ * those already in the frame buffer.
+ *
+ * BlendDstFunc describes how the coefficient used to scale the
+ * pixels already in the framebuffer is computed during the
+ * blending operation
+ *
+ */
public enum BlendDstFunc {
ZERO (0),
ONE (1),
@@ -78,6 +140,17 @@
super(id, rs);
}
+ /**
+ * Returns a pre-defined program store object with the following
+ * characteristics:
+ * - incoming pixels are drawn if their depth value is less than
+ * the stored value in the depth buffer. If the pixel is
+ * drawn, its value is also stored in the depth buffer
+ * - incoming pixels override the value stored in the color
+ * buffer if it passes the depth test
+ *
+ * @param rs Context to which the program will belong.
+ **/
public static ProgramStore BLEND_NONE_DEPTH_TEST(RenderScript rs) {
if(rs.mProgramStore_BLEND_NONE_DEPTH_TEST == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
@@ -89,6 +162,16 @@
}
return rs.mProgramStore_BLEND_NONE_DEPTH_TEST;
}
+ /**
+ * Returns a pre-defined program store object with the following
+ * characteristics:
+ * - incoming pixels always pass the depth test and their value
+ * is not stored in the depth buffer
+ * - incoming pixels override the value stored in the color
+ * buffer
+ *
+ * @param rs Context to which the program will belong.
+ **/
public static ProgramStore BLEND_NONE_DEPTH_NONE(RenderScript rs) {
if(rs.mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
@@ -100,7 +183,19 @@
}
return rs.mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH;
}
-
+ /**
+ * Returns a pre-defined program store object with the following
+ * characteristics:
+ * - incoming pixels are drawn if their depth value is less than
+ * the stored value in the depth buffer. If the pixel is
+ * drawn, its value is also stored in the depth buffer
+ * - if the incoming (Source) pixel passes depth test, its value
+ * is combined with the stored color (Dest) using the
+ * following formula
+ * Final.RGB = Source.RGB * Source.A + Dest.RGB * (1 - Source.A)
+ *
+ * @param rs Context to which the program will belong.
+ **/
public static ProgramStore BLEND_ALPHA_DEPTH_TEST(RenderScript rs) {
if(rs.mProgramStore_BLEND_ALPHA_DEPTH_TEST == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
@@ -112,6 +207,17 @@
}
return rs.mProgramStore_BLEND_ALPHA_DEPTH_TEST;
}
+ /**
+ * Returns a pre-defined program store object with the following
+ * characteristics:
+ * - incoming pixels always pass the depth test and their value
+ * is not stored in the depth buffer
+ * - incoming pixel's value is combined with the stored color
+ * (Dest) using the following formula
+ * Final.RGB = Source.RGB * Source.A + Dest.RGB * (1 - Source.A)
+ *
+ * @param rs Context to which the program will belong.
+ **/
public static ProgramStore BLEND_ALPHA_DEPTH_NONE(RenderScript rs) {
if(rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
@@ -124,6 +230,11 @@
return rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH;
}
+ /**
+ * Builder class for ProgramStore object. If the builder is left
+ * empty, the equivalent of BLEND_NONE_DEPTH_NONE would be
+ * returned
+ */
public static class Builder {
RenderScript mRS;
DepthFunc mDepthFunc;
@@ -148,16 +259,41 @@
mBlendDst = BlendDstFunc.ZERO;
}
+ /**
+ * Specifies the depth testing behavior
+ *
+ * @param func function used for depth testing
+ *
+ * @return this
+ */
public Builder setDepthFunc(DepthFunc func) {
mDepthFunc = func;
return this;
}
+ /**
+ * Enables writes into the depth buffer
+ *
+ * @param enable specifies whether depth writes are
+ * enabled or disabled
+ *
+ * @return this
+ */
public Builder setDepthMaskEnabled(boolean enable) {
mDepthMask = enable;
return this;
}
+ /**
+ * Enables writes into the color buffer
+ *
+ * @param r specifies whether red channel is written
+ * @param g specifies whether green channel is written
+ * @param b specifies whether blue channel is written
+ * @param a specifies whether alpha channel is written
+ *
+ * @return this
+ */
public Builder setColorMaskEnabled(boolean r, boolean g, boolean b, boolean a) {
mColorMaskR = r;
mColorMaskG = g;
@@ -166,12 +302,31 @@
return this;
}
+ /**
+ * Specifies how incoming pixels are combined with the pixels
+ * stored in the framebuffer
+ *
+ * @param src specifies how the source blending factor is
+ * computed
+ * @param dst specifies how the destination blending factor is
+ * computed
+ *
+ * @return this
+ */
public Builder setBlendFunc(BlendSrcFunc src, BlendDstFunc dst) {
mBlendSrc = src;
mBlendDst = dst;
return this;
}
+ /**
+ * Enables dithering
+ *
+ * @param enable specifies whether dithering is enabled or
+ * disabled
+ *
+ * @return this
+ */
public Builder setDitherEnabled(boolean enable) {
mDither = enable;
return this;
@@ -192,6 +347,9 @@
return new ProgramStore(id, rs);
}
+ /**
+ * Creates a program store from the current state of the builder
+ */
public ProgramStore create() {
mRS.validate();
return internalCreate(mRS, this);
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java
index 7ba8b82..a965b81 100644
--- a/graphics/java/android/renderscript/ProgramVertex.java
+++ b/graphics/java/android/renderscript/ProgramVertex.java
@@ -46,7 +46,7 @@
/**
* Create a builder object.
*
- * @param rs
+ * @param rs Context to which the program will belong.
*/
public Builder(RenderScript rs) {
super(rs);
diff --git a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
index b9537c7..666c7ec 100644
--- a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
+++ b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
@@ -105,7 +105,7 @@
/**
* Creates a builder for fixed function vertex program
*
- * @param rs
+ * @param rs Context to which the program will belong.
*/
public Builder(RenderScript rs) {
mRS = rs;
@@ -196,9 +196,9 @@
private FieldPacker mIOBuffer;
/**
- * Creates buffer to store fixed function emulation matrices
+ * Creates a buffer to store fixed function emulation matrices
*
- * @param rs
+ * @param rs Context to which the allocation will belong.
**/
public Constants(RenderScript rs) {
Type constInputType = ProgramVertexFixedFunction.Builder.getConstantInputType(rs);
diff --git a/graphics/java/android/renderscript/Sampler.java b/graphics/java/android/renderscript/Sampler.java
index 57a9889..c656d75 100644
--- a/graphics/java/android/renderscript/Sampler.java
+++ b/graphics/java/android/renderscript/Sampler.java
@@ -56,7 +56,7 @@
* Retrieve a sampler with min and mag set to nearest and wrap modes set to
* clamp.
*
- * @param rs
+ * @param rs Context to which the sampler will belong.
*
* @return Sampler
*/
@@ -76,7 +76,7 @@
* Retrieve a sampler with min and mag set to linear and wrap modes set to
* clamp.
*
- * @param rs
+ * @param rs Context to which the sampler will belong.
*
* @return Sampler
*/
@@ -96,7 +96,7 @@
* Retrieve a sampler with ag set to linear, min linear mipmap linear, and
* to and wrap modes set to clamp.
*
- * @param rs
+ * @param rs Context to which the sampler will belong.
*
* @return Sampler
*/
@@ -116,7 +116,7 @@
* Retrieve a sampler with min and mag set to nearest and wrap modes set to
* wrap.
*
- * @param rs
+ * @param rs Context to which the sampler will belong.
*
* @return Sampler
*/
@@ -136,7 +136,7 @@
* Retrieve a sampler with min and mag set to nearest and wrap modes set to
* wrap.
*
- * @param rs
+ * @param rs Context to which the sampler will belong.
*
* @return Sampler
*/
@@ -156,7 +156,7 @@
* Retrieve a sampler with ag set to linear, min linear mipmap linear, and
* to and wrap modes set to wrap.
*
- * @param rs
+ * @param rs Context to which the sampler will belong.
*
* @return Sampler
*/
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h
index 09cf2a2..002e48b 100644
--- a/include/gui/SurfaceTexture.h
+++ b/include/gui/SurfaceTexture.h
@@ -26,12 +26,15 @@
#include <ui/GraphicBuffer.h>
#include <utils/threads.h>
+#include <utils/Vector.h>
#define ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID "mSurfaceTexture"
namespace android {
// ----------------------------------------------------------------------------
+class IGraphicBufferAlloc;
+
class SurfaceTexture : public BnSurfaceTexture {
public:
enum { MIN_BUFFER_SLOTS = 3 };
@@ -140,6 +143,12 @@
// reset mCurrentTexture to INVALID_BUFFER_SLOT.
int mCurrentTexture;
+ // mCurrentTextureBuf is the graphic buffer of the current texture. It's
+ // possible that this buffer is not associated with any buffer slot, so we
+ // must track it separately in order to properly use
+ // IGraphicBufferAlloc::freeAllGraphicBuffersExcept.
+ sp<GraphicBuffer> mCurrentTextureBuf;
+
// mCurrentCrop is the crop rectangle that applies to the current texture.
// It gets set to mLastQueuedCrop each time updateTexImage is called.
Rect mCurrentCrop;
@@ -176,6 +185,16 @@
// changed with a call to setTexName.
const GLuint mTexName;
+ // mGraphicBufferAlloc is the connection to SurfaceFlinger that is used to
+ // allocate new GraphicBuffer objects.
+ sp<IGraphicBufferAlloc> mGraphicBufferAlloc;
+
+ // mAllocdBuffers is mirror of the list of buffers that SurfaceFlinger is
+ // referencing. This is kept so that gralloc implementations do not need to
+ // properly handle the case where SurfaceFlinger no longer holds a reference
+ // to a buffer, but other processes do.
+ Vector<sp<GraphicBuffer> > mAllocdBuffers;
+
// mMutex is the mutex used to prevent concurrent access to the member
// variables of SurfaceTexture objects. It must be locked whenever the
// member variables are accessed.
diff --git a/include/storage/IMountService.h b/include/storage/IMountService.h
index 68ccd95..472d8e5 100644
--- a/include/storage/IMountService.h
+++ b/include/storage/IMountService.h
@@ -67,6 +67,7 @@
virtual bool isObbMounted(const String16& filename) = 0;
virtual bool getMountedObbPath(const String16& filename, String16& path) = 0;
virtual int32_t decryptStorage(const String16& password) = 0;
+ virtual int32_t encryptStorage(const String16& password) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/surfaceflinger/IGraphicBufferAlloc.h b/include/surfaceflinger/IGraphicBufferAlloc.h
new file mode 100644
index 0000000..d996af7
--- /dev/null
+++ b/include/surfaceflinger/IGraphicBufferAlloc.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2011 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_SF_IGRAPHIC_BUFFER_ALLOC_H
+#define ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/RefBase.h>
+
+#include <binder/IInterface.h>
+
+namespace android {
+// ----------------------------------------------------------------------------
+
+class IGraphicBufferAlloc : public IInterface
+{
+public:
+ DECLARE_META_INTERFACE(GraphicBufferAlloc);
+
+ /* Create a new GraphicBuffer for the client to use. The server will
+ * maintain a reference to the newly created GraphicBuffer until
+ * freeAllGraphicBuffers is called.
+ */
+ virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
+ PixelFormat format, uint32_t usage) = 0;
+
+ /* Free all but one of the GraphicBuffer objects that the server is
+ * currently referencing. If bufIndex is not a valid index of the buffers
+ * the server is referencing, then all buffers are freed.
+ */
+ virtual void freeAllGraphicBuffersExcept(int bufIndex) = 0;
+};
+
+// ----------------------------------------------------------------------------
+
+class BnGraphicBufferAlloc : public BnInterface<IGraphicBufferAlloc>
+{
+public:
+ virtual status_t onTransact( uint32_t code,
+ const Parcel& data,
+ Parcel* reply,
+ uint32_t flags = 0);
+};
+
+// ----------------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/surfaceflinger/ISurfaceComposer.h
index 1bab7d7..56ed3a4 100644
--- a/include/surfaceflinger/ISurfaceComposer.h
+++ b/include/surfaceflinger/ISurfaceComposer.h
@@ -28,6 +28,7 @@
#include <ui/PixelFormat.h>
#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <surfaceflinger/IGraphicBufferAlloc.h>
namespace android {
// ----------------------------------------------------------------------------
@@ -96,6 +97,10 @@
*/
virtual sp<ISurfaceComposerClient> createClientConnection() = 0;
+ /* create a graphic buffer allocator
+ */
+ virtual sp<IGraphicBufferAlloc> createGraphicBufferAlloc() = 0;
+
/* retrieve the control block */
virtual sp<IMemoryHeap> getCblk() const = 0;
@@ -131,13 +136,6 @@
* This is an ASYNCHRONOUS call.
*/
virtual void signal() const = 0;
-
- /* Create a new GraphicBuffer for the client to use. SurfaceFlinger will
- * not maintain a reference to the GraphicBuffer, so the underlying native
- * handle will be freed once the client references are released.
- */
- virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
- PixelFormat format, uint32_t usage) const = 0;
};
// ----------------------------------------------------------------------------
@@ -151,7 +149,7 @@
BOOT_FINISHED = IBinder::FIRST_CALL_TRANSACTION,
CREATE_CONNECTION,
CREATE_CLIENT_CONNECTION,
- CREATE_GRAPHIC_BUFFER,
+ CREATE_GRAPHIC_BUFFER_ALLOC,
GET_CBLK,
OPEN_GLOBAL_TRANSACTION,
CLOSE_GLOBAL_TRANSACTION,
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index 28f3dc2..447de76 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -29,6 +29,7 @@
#include <surfaceflinger/ISurfaceComposer.h>
#include <surfaceflinger/SurfaceComposerClient.h>
+#include <surfaceflinger/IGraphicBufferAlloc.h>
#include <utils/Log.h>
@@ -83,6 +84,8 @@
mSlots[i].mEglDisplay = EGL_NO_DISPLAY;
mSlots[i].mOwnedByClient = false;
}
+ sp<ISurfaceComposer> composer(ComposerService::getComposerService());
+ mGraphicBufferAlloc = composer->createGraphicBufferAlloc();
}
SurfaceTexture::~SurfaceTexture() {
@@ -110,9 +113,8 @@
return 0;
}
usage |= GraphicBuffer::USAGE_HW_TEXTURE;
- sp<ISurfaceComposer> composer(ComposerService::getComposerService());
- sp<GraphicBuffer> graphicBuffer(composer->createGraphicBuffer(w, h,
- format, usage));
+ sp<GraphicBuffer> graphicBuffer(
+ mGraphicBufferAlloc->createGraphicBuffer(w, h, format, usage));
if (graphicBuffer == 0) {
LOGE("requestBuffer: SurfaceComposer::createGraphicBuffer failed");
} else {
@@ -122,6 +124,7 @@
mSlots[buf].mEglImage = EGL_NO_IMAGE_KHR;
mSlots[buf].mEglDisplay = EGL_NO_DISPLAY;
}
+ mAllocdBuffers.add(graphicBuffer);
}
return graphicBuffer;
}
@@ -131,7 +134,7 @@
Mutex::Autolock lock(mMutex);
int found = INVALID_BUFFER_SLOT;
for (int i = 0; i < mBufferCount; i++) {
- if (!mSlots[i].mOwnedByClient && i != mCurrentTexture) {
+ if (!mSlots[i].mOwnedByClient && i != mCurrentTexture && i != mLastQueued) {
mSlots[i].mOwnedByClient = true;
found = i;
break;
@@ -204,27 +207,28 @@
// Initially both mCurrentTexture and mLastQueued are INVALID_BUFFER_SLOT,
// so this check will fail until a buffer gets queued.
if (mCurrentTexture != mLastQueued) {
- // Update the SurfaceTexture state.
- mCurrentTexture = mLastQueued;
- mCurrentCrop = mLastQueuedCrop;
- mCurrentTransform = mLastQueuedTransform;
-
// Update the GL texture object.
- EGLImageKHR image = mSlots[mCurrentTexture].mEglImage;
+ EGLImageKHR image = mSlots[mLastQueued].mEglImage;
if (image == EGL_NO_IMAGE_KHR) {
EGLDisplay dpy = eglGetCurrentDisplay();
- sp<GraphicBuffer> graphicBuffer = mSlots[mCurrentTexture].mGraphicBuffer;
+ sp<GraphicBuffer> graphicBuffer = mSlots[mLastQueued].mGraphicBuffer;
image = createImage(dpy, graphicBuffer);
- mSlots[mCurrentTexture].mEglImage = image;
- mSlots[mCurrentTexture].mEglDisplay = dpy;
+ mSlots[mLastQueued].mEglImage = image;
+ mSlots[mLastQueued].mEglDisplay = dpy;
}
glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, (GLeglImageOES)image);
GLint error = glGetError();
if (error != GL_NO_ERROR) {
LOGE("error binding external texture image %p (slot %d): %#04x",
- image, mCurrentTexture, error);
+ image, mLastQueued, error);
return -EINVAL;
}
+
+ // Update the SurfaceTexture state.
+ mCurrentTexture = mLastQueued;
+ mCurrentTextureBuf = mSlots[mCurrentTexture].mGraphicBuffer;
+ mCurrentCrop = mLastQueuedCrop;
+ mCurrentTransform = mLastQueuedTransform;
}
return OK;
}
@@ -282,6 +286,19 @@
mSlots[i].mEglDisplay = EGL_NO_DISPLAY;
}
}
+
+ int exceptBuf = -1;
+ for (size_t i = 0; i < mAllocdBuffers.size(); i++) {
+ if (mAllocdBuffers[i] == mCurrentTextureBuf) {
+ exceptBuf = i;
+ break;
+ }
+ }
+ mAllocdBuffers.clear();
+ if (exceptBuf >= 0) {
+ mAllocdBuffers.add(mCurrentTextureBuf);
+ }
+ mGraphicBufferAlloc->freeAllGraphicBuffersExcept(exceptBuf);
}
EGLImageKHR SurfaceTexture::createImage(EGLDisplay dpy,
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp
index 8a59144..24cee24 100644
--- a/libs/gui/SurfaceTextureClient.cpp
+++ b/libs/gui/SurfaceTextureClient.cpp
@@ -15,6 +15,7 @@
*/
#define LOG_TAG "SurfaceTextureClient"
+//#define LOG_NDEBUG 0
#include <gui/SurfaceTextureClient.h>
@@ -82,10 +83,12 @@
}
int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) {
+ LOGV("SurfaceTextureClient::dequeueBuffer");
Mutex::Autolock lock(mMutex);
int buf = -1;
status_t err = mSurfaceTexture->dequeueBuffer(&buf);
if (err < 0) {
+ LOGE("dequeueBuffer: ISurfaceTexture::dequeueBuffer failed: %d", err);
return err;
}
sp<GraphicBuffer>& gbuf(mSlots[buf]);
@@ -96,6 +99,7 @@
gbuf = mSurfaceTexture->requestBuffer(buf, mReqWidth, mReqHeight,
mReqFormat, mReqUsage);
if (gbuf == 0) {
+ LOGE("dequeueBuffer: ISurfaceTexture::requestBuffer failed");
return NO_MEMORY;
}
}
@@ -104,6 +108,7 @@
}
int SurfaceTextureClient::cancelBuffer(android_native_buffer_t* buffer) {
+ LOGV("SurfaceTextureClient::cancelBuffer");
Mutex::Autolock lock(mMutex);
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
if (mSlots[i].get() == buffer) {
@@ -115,11 +120,13 @@
}
int SurfaceTextureClient::lockBuffer(android_native_buffer_t* buffer) {
+ LOGV("SurfaceTextureClient::lockBuffer");
Mutex::Autolock lock(mMutex);
return OK;
}
int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
+ LOGV("SurfaceTextureClient::queueBuffer");
Mutex::Autolock lock(mMutex);
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
if (mSlots[i].get() == GraphicBuffer::getSelf(buffer)) {
@@ -131,6 +138,7 @@
}
int SurfaceTextureClient::query(int what, int* value) {
+ LOGV("SurfaceTextureClient::query");
Mutex::Autolock lock(mMutex);
// XXX: Implement this!
return INVALID_OPERATION;
@@ -206,17 +214,20 @@
}
int SurfaceTextureClient::connect(int api) {
+ LOGV("SurfaceTextureClient::connect");
// XXX: Implement this!
return INVALID_OPERATION;
}
int SurfaceTextureClient::disconnect(int api) {
+ LOGV("SurfaceTextureClient::disconnect");
// XXX: Implement this!
return INVALID_OPERATION;
}
int SurfaceTextureClient::setUsage(uint32_t reqUsage)
{
+ LOGV("SurfaceTextureClient::setUsage");
Mutex::Autolock lock(mMutex);
mReqUsage = reqUsage;
return OK;
@@ -224,6 +235,7 @@
int SurfaceTextureClient::setCrop(Rect const* rect)
{
+ LOGV("SurfaceTextureClient::setCrop");
Mutex::Autolock lock(mMutex);
// empty/invalid rects are not allowed
@@ -239,6 +251,7 @@
int SurfaceTextureClient::setBufferCount(int bufferCount)
{
+ LOGV("SurfaceTextureClient::setBufferCount");
Mutex::Autolock lock(mMutex);
status_t err = mSurfaceTexture->setBufferCount(bufferCount);
@@ -254,6 +267,7 @@
int SurfaceTextureClient::setBuffersGeometry(int w, int h, int format)
{
+ LOGV("SurfaceTextureClient::setBuffersGeometry");
Mutex::Autolock lock(mMutex);
if (w<0 || h<0 || format<0)
@@ -271,6 +285,7 @@
int SurfaceTextureClient::setBuffersTransform(int transform)
{
+ LOGV("SurfaceTextureClient::setBuffersTransform");
Mutex::Autolock lock(mMutex);
status_t err = mSurfaceTexture->setTransform(transform);
return err;
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 3563064..fde4f96 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -109,29 +109,22 @@
Mutex::Autolock _l(mGarbageLock);
- size_t count = mFboGarbage.size();
+ size_t count = mLayerGarbage.size();
for (size_t i = 0; i < count; i++) {
- GLuint fbo = mFboGarbage.itemAt(i);
- if (fbo) glDeleteFramebuffers(1, &fbo);
- }
- mFboGarbage.clear();
+ Layer* layer = mLayerGarbage.itemAt(i);
+ if (layer) {
+ if (layer->fbo) glDeleteFramebuffers(1, &layer->fbo);
+ if (layer->texture) glDeleteTextures(1, &layer->texture);
- count = mTextureGarbage.size();
- for (size_t i = 0; i < count; i++) {
- GLuint texture = mTextureGarbage.itemAt(i);
- if (texture) glDeleteTextures(1, &texture);
+ delete layer;
+ }
}
- mTextureGarbage.clear();
+ mLayerGarbage.clear();
}
-void Caches::deleteFboDeferred(GLuint fbo) {
+void Caches::deleteLayerDeferred(Layer* layer) {
Mutex::Autolock _l(mGarbageLock);
- mFboGarbage.push(fbo);
-}
-
-void Caches::deleteTextureDeferred(GLuint texture) {
- Mutex::Autolock _l(mGarbageLock);
- mTextureGarbage.push(texture);
+ mLayerGarbage.push(layer);
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h
index 34f48c9..a11b6bc 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -91,8 +91,7 @@
GLuint mRegionMeshIndices;
mutable Mutex mGarbageLock;
- Vector<GLuint> mFboGarbage;
- Vector<GLuint> mTextureGarbage;
+ Vector<Layer*> mLayerGarbage;
public:
/**
@@ -110,14 +109,9 @@
void clearGarbage();
/**
- * Can be used to delete an FBO from a non EGL thread.
+ * Can be used to delete a layer from a non EGL thread.
*/
- void deleteFboDeferred(GLuint fbo);
-
- /**
- * Can be used to delete a texture from a non EGL thread.
- */
- void deleteTextureDeferred(GLuint texture);
+ void deleteLayerDeferred(Layer* layer);
/**
* Binds the VBO used to render simple textured quads.
diff --git a/libs/hwui/Debug.h b/libs/hwui/Debug.h
index a194cbe..bdd8e73 100644
--- a/libs/hwui/Debug.h
+++ b/libs/hwui/Debug.h
@@ -47,4 +47,7 @@
// Turn on to display debug info about the layer renderer
#define DEBUG_LAYER_RENDERER 0
+// Turn on to dump display list state
+#define DEBUG_DISPLAY_LIST 0
+
#endif // ANDROID_HWUI_DEBUG_H
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index fdb4e8c..75b1671 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -81,6 +81,39 @@
// Display list
///////////////////////////////////////////////////////////////////////////////
+const char* DisplayList::OP_NAMES[] = {
+ "AcquireContext",
+ "ReleaseContext",
+ "Save",
+ "Restore",
+ "RestoreToCount",
+ "SaveLayer",
+ "SaveLayerAlpha",
+ "Translate",
+ "Rotate",
+ "Scale",
+ "SetMatrix",
+ "ConcatMatrix",
+ "ClipRect",
+ "DrawDisplayList",
+ "DrawLayer",
+ "DrawBitmap",
+ "DrawBitmapMatrix",
+ "DrawBitmapRect",
+ "DrawPatch",
+ "DrawColor",
+ "DrawRect",
+ "DrawPath",
+ "DrawLines",
+ "DrawText",
+ "ResetShader",
+ "SetupShader",
+ "ResetColorFilter",
+ "SetupColorFilter",
+ "ResetShadow",
+ "SetupShadow"
+};
+
DisplayList::DisplayList(const DisplayListRenderer& recorder) {
initFromDisplayListRenderer(recorder);
}
@@ -173,14 +206,25 @@
mPathHeap = NULL;
}
-void DisplayList::replay(OpenGLRenderer& renderer) {
+void DisplayList::replay(OpenGLRenderer& renderer, uint32_t level) {
TextContainer text;
mReader.rewind();
- int saveCount = renderer.getSaveCount() - 1;
+#if DEBUG_DISPLAY_LIST
+ uint32_t count = (level + 1) * 2;
+ char indent[count + 1];
+ for (uint32_t i = 0; i < count; i++) {
+ indent[i] = ' ';
+ }
+ indent[count] = '\0';
+ DISPLAY_LIST_LOGD("%sStart display list (%p)", (char*) indent + 2, this);
+#endif
+ int saveCount = renderer.getSaveCount() - 1;
while (!mReader.eof()) {
int op = mReader.readInt();
+ DISPLAY_LIST_LOGD("%s%s", (char*) indent, OP_NAMES[op]);
+
switch (op) {
case AcquireContext: {
renderer.acquireContext();
@@ -238,12 +282,11 @@
}
break;
case DrawDisplayList: {
- renderer.drawDisplayList(getDisplayList());
+ renderer.drawDisplayList(getDisplayList(), level + 1);
}
break;
case DrawLayer: {
- renderer.drawLayer(getInt(), getFloat(), getFloat(), getFloat(), getFloat(),
- getFloat(), getFloat(), getPaint());
+ renderer.drawLayer((Layer*) getInt(), getFloat(), getFloat(), getPaint());
}
break;
case DrawBitmap: {
@@ -327,6 +370,8 @@
break;
}
}
+
+ DISPLAY_LIST_LOGD("%sDone", (char*) indent + 2);
}
///////////////////////////////////////////////////////////////////////////////
@@ -483,18 +528,15 @@
return OpenGLRenderer::clipRect(left, top, right, bottom, op);
}
-void DisplayListRenderer::drawDisplayList(DisplayList* displayList) {
+void DisplayListRenderer::drawDisplayList(DisplayList* displayList, uint32_t level) {
addOp(DisplayList::DrawDisplayList);
addDisplayList(displayList);
}
-void DisplayListRenderer::drawLayer(int texture, float left, float top, float right, float bottom,
- float u, float v, SkPaint* paint) {
+void DisplayListRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
addOp(DisplayList::DrawLayer);
- addInt(texture);
- addBounds(left, top, right, bottom);
- addFloat(u);
- addFloat(v);
+ addInt((int) layer);
+ addPoint(x, y);
addPaint(paint);
}
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 62cb0e8..cc52309 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -39,6 +39,13 @@
#define MIN_WRITER_SIZE 16384
#define HEAP_BLOCK_SIZE 4096
+// Debug
+#if DEBUG_DISPLAY_LIST
+ #define DISPLAY_LIST_LOGD(...) LOGD(__VA_ARGS__)
+#else
+ #define DISPLAY_LIST_LOGD(...)
+#endif
+
///////////////////////////////////////////////////////////////////////////////
// Helpers
///////////////////////////////////////////////////////////////////////////////
@@ -78,8 +85,10 @@
DisplayList(const DisplayListRenderer& recorder);
~DisplayList();
+ // IMPORTANT: Update the intialization of OP_NAMES in the .cpp file
+ // when modifying this file
enum Op {
- AcquireContext,
+ AcquireContext = 0,
ReleaseContext,
Save,
Restore,
@@ -108,12 +117,14 @@
ResetColorFilter,
SetupColorFilter,
ResetShadow,
- SetupShadow
+ SetupShadow,
};
+ static const char* OP_NAMES[];
+
void initFromDisplayListRenderer(const DisplayListRenderer& recorder);
- void replay(OpenGLRenderer& renderer);
+ void replay(OpenGLRenderer& renderer, uint32_t level = 0);
private:
void init();
@@ -245,9 +256,8 @@
bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op);
- void drawDisplayList(DisplayList* displayList);
- void drawLayer(int texture, float left, float top, float right, float bottom,
- float u, float v, SkPaint* paint);
+ void drawDisplayList(DisplayList* displayList, uint32_t level = 0);
+ void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index b838764..a25c95e 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -27,10 +27,10 @@
///////////////////////////////////////////////////////////////////////////////
void LayerRenderer::prepare(bool opaque) {
- LAYER_RENDERER_LOGD("Rendering into layer, fbo = %d", mFbo);
+ LAYER_RENDERER_LOGD("Rendering into layer, fbo = %d", mLayer->fbo);
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*) &mPreviousFbo);
- glBindFramebuffer(GL_FRAMEBUFFER, mFbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, mLayer->fbo);
OpenGLRenderer::prepare(opaque);
}
@@ -39,33 +39,33 @@
OpenGLRenderer::finish();
glBindFramebuffer(GL_FRAMEBUFFER, mPreviousFbo);
- LAYER_RENDERER_LOGD("Finished rendering into layer, fbo = %d", mFbo);
+ LAYER_RENDERER_LOGD("Finished rendering into layer, fbo = %d", mLayer->mFbo);
}
///////////////////////////////////////////////////////////////////////////////
// Static functions
///////////////////////////////////////////////////////////////////////////////
-GLuint LayerRenderer::createLayer(uint32_t width, uint32_t height,
- uint32_t* layerWidth, uint32_t* layerHeight, GLuint* texture) {
+Layer* LayerRenderer::createLayer(uint32_t width, uint32_t height, bool isOpaque) {
LAYER_RENDERER_LOGD("Creating new layer %dx%d", width, height);
+ Layer* layer = new Layer(width, height);
+
GLuint previousFbo;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*) &previousFbo);
- GLuint fbo = 0;
- glGenFramebuffers(1, &fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+ glGenFramebuffers(1, &layer->fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, layer->fbo);
if (glGetError() != GL_NO_ERROR) {
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
- glDeleteBuffers(1, &fbo);
+ glDeleteBuffers(1, &layer->fbo);
return 0;
}
glActiveTexture(GL_TEXTURE0);
- glGenTextures(1, texture);
- glBindTexture(GL_TEXTURE_2D, *texture);
+ glGenTextures(1, &layer->texture);
+ glBindTexture(GL_TEXTURE_2D, layer->texture);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
@@ -80,66 +80,81 @@
if (glGetError() != GL_NO_ERROR) {
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
- glDeleteBuffers(1, &fbo);
- glDeleteTextures(1, texture);
+ glDeleteBuffers(1, &layer->fbo);
+ glDeleteTextures(1, &layer->texture);
+ delete layer;
return 0;
}
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
- *texture, 0);
+ layer->texture, 0);
if (glGetError() != GL_NO_ERROR) {
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
- glDeleteBuffers(1, &fbo);
- glDeleteTextures(1, texture);
+ glDeleteBuffers(1, &layer->fbo);
+ glDeleteTextures(1, &layer->texture);
+ delete layer;
return 0;
}
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
- *layerWidth = width;
- *layerHeight = height;
+ layer->layer.set(0.0f, 0.0f, width, height);
+ layer->texCoords.set(0.0f, 1.0f, 1.0f, 0.0f);
+ layer->alpha = 255;
+ layer->mode = SkXfermode::kSrcOver_Mode;
+ layer->blend = !isOpaque;
+ layer->empty = false;
+ layer->colorFilter = NULL;
- return fbo;
+ return layer;
}
-void LayerRenderer::resizeLayer(GLuint fbo, GLuint texture, uint32_t width, uint32_t height,
- uint32_t* layerWidth, uint32_t* layerHeight) {
- LAYER_RENDERER_LOGD("Resizing layer fbo = %d to %dx%d", fbo, width, height);
+bool LayerRenderer::resizeLayer(Layer* layer, uint32_t width, uint32_t height) {
+ if (layer) {
+ LAYER_RENDERER_LOGD("Resizing layer fbo = %d to %dx%d", layer->fbo, width, height);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, texture);
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, layer->texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- if (glGetError() != GL_NO_ERROR) {
- glDeleteBuffers(1, &fbo);
- glDeleteTextures(1, &texture);
+ if (glGetError() != GL_NO_ERROR) {
+ glDeleteBuffers(1, &layer->fbo);
+ glDeleteTextures(1, &layer->texture);
- *layerWidth = 0;
- *layerHeight = 0;
+ layer->width = 0;
+ layer->height = 0;
+ layer->fbo = 0;
+ layer->texture = 0;
- return;
+ return false;
+ }
+
+ layer->width = width;
+ layer->height = height;
}
-
- *layerWidth = width;
- *layerHeight = height;
+ return true;
}
-void LayerRenderer::destroyLayer(GLuint fbo, GLuint texture) {
- LAYER_RENDERER_LOGD("Destroying layer, fbo = %d", fbo);
+void LayerRenderer::destroyLayer(Layer* layer) {
+ if (layer) {
+ LAYER_RENDERER_LOGD("Destroying layer, fbo = %d", layer->fbo);
- if (fbo) glDeleteFramebuffers(1, &fbo);
- if (texture) glDeleteTextures(1, &texture);
+ if (layer->fbo) glDeleteFramebuffers(1, &layer->fbo);
+ if (layer->texture) glDeleteTextures(1, &layer->texture);
+
+ delete layer;
+ }
}
-void LayerRenderer::destroyLayerDeferred(GLuint fbo, GLuint texture) {
- LAYER_RENDERER_LOGD("Deferring layer destruction, fbo = %d", fbo);
+void LayerRenderer::destroyLayerDeferred(Layer* layer) {
+ if (layer) {
+ LAYER_RENDERER_LOGD("Deferring layer destruction, fbo = %d", layer->fbo);
- Caches& caches = Caches::getInstance();
- if (fbo) caches.deleteFboDeferred(fbo);
- if (texture) caches.deleteTextureDeferred(texture);
+ Caches::getInstance().deleteLayerDeferred(layer);
+ }
}
}; // namespace uirenderer
diff --git a/libs/hwui/LayerRenderer.h b/libs/hwui/LayerRenderer.h
index be68412..ed5d960 100644
--- a/libs/hwui/LayerRenderer.h
+++ b/libs/hwui/LayerRenderer.h
@@ -18,6 +18,7 @@
#define ANDROID_HWUI_LAYER_RENDERER_H
#include "OpenGLRenderer.h"
+#include "Layer.h"
namespace android {
namespace uirenderer {
@@ -39,7 +40,7 @@
class LayerRenderer: public OpenGLRenderer {
public:
- LayerRenderer(GLuint fbo): mFbo(fbo) {
+ LayerRenderer(Layer* layer): mLayer(layer) {
}
~LayerRenderer() {
@@ -48,15 +49,13 @@
void prepare(bool opaque);
void finish();
- static GLuint createLayer(uint32_t width, uint32_t height,
- uint32_t* layerWidth, uint32_t* layerHeight, GLuint* texture);
- static void resizeLayer(GLuint fbo, GLuint texture, uint32_t width, uint32_t height,
- uint32_t* layerWidth, uint32_t* layerHeight);
- static void destroyLayer(GLuint fbo, GLuint texture);
- static void destroyLayerDeferred(GLuint fbo, GLuint texture);
+ static Layer* createLayer(uint32_t width, uint32_t height, bool isOpaque = false);
+ static bool resizeLayer(Layer* layer, uint32_t width, uint32_t height);
+ static void destroyLayer(Layer* layer);
+ static void destroyLayerDeferred(Layer* layer);
private:
- GLuint mFbo;
+ Layer* mLayer;
GLuint mPreviousFbo;
}; // class LayerRenderer
diff --git a/libs/hwui/OpenGLDebugRenderer.cpp b/libs/hwui/OpenGLDebugRenderer.cpp
index 1cf3d20..29bcde8 100644
--- a/libs/hwui/OpenGLDebugRenderer.cpp
+++ b/libs/hwui/OpenGLDebugRenderer.cpp
@@ -48,12 +48,18 @@
return OpenGLRenderer::saveLayer(left, top, right, bottom, p, flags);
}
-void OpenGLDebugRenderer::drawDisplayList(DisplayList* displayList) {
+void OpenGLDebugRenderer::drawDisplayList(DisplayList* displayList, uint32_t level) {
mPrimitivesCount++;
StopWatch w("drawDisplayList");
OpenGLRenderer::drawDisplayList(displayList);
}
+void OpenGLDebugRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
+ mPrimitivesCount++;
+ StopWatch w("drawLayer");
+ OpenGLRenderer::drawLayer(layer, x, y, paint);
+}
+
void OpenGLDebugRenderer::drawBitmap(SkBitmap* bitmap, float left, float top,
SkPaint* paint) {
mPrimitivesCount++;
diff --git a/libs/hwui/OpenGLDebugRenderer.h b/libs/hwui/OpenGLDebugRenderer.h
index ee34d73..aefa7bf 100644
--- a/libs/hwui/OpenGLDebugRenderer.h
+++ b/libs/hwui/OpenGLDebugRenderer.h
@@ -40,7 +40,8 @@
int saveLayer(float left, float top, float right, float bottom,
SkPaint* p, int flags);
- void drawDisplayList(DisplayList* displayList);
+ void drawDisplayList(DisplayList* displayList, uint32_t level = 0);
+ void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 9beb227..98eb11e 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -622,10 +622,12 @@
setupDraw();
setupDrawWithTexture();
setupDrawColor(alpha, alpha, alpha, alpha);
+ setupDrawColorFilter();
setupDrawBlending(layer->blend || layer->alpha < 255, layer->mode, false);
setupDrawProgram();
setupDrawDirtyRegionsDisabled();
setupDrawPureColorUniforms();
+ setupDrawColorFilterUniforms();
setupDrawTexture(layer->texture);
setupDrawModelViewTranslate(rect.left, rect.top, rect.right, rect.bottom);
setupDrawMesh(&mesh[0].position[0], &mesh[0].texture[0]);
@@ -1022,11 +1024,11 @@
// Drawing
///////////////////////////////////////////////////////////////////////////////
-void OpenGLRenderer::drawDisplayList(DisplayList* displayList) {
+void OpenGLRenderer::drawDisplayList(DisplayList* displayList, uint32_t level) {
// All the usual checks and setup operations (quickReject, setupDraw, etc.)
// will be performed by the display list itself
if (displayList) {
- displayList->replay(*this);
+ displayList->replay(*this, level);
}
}
@@ -1485,28 +1487,22 @@
finishDrawTexture();
}
-void OpenGLRenderer::drawLayer(int texture, float left, float top, float right, float bottom,
- float u, float v, SkPaint* paint) {
- if (quickReject(left, top, right, bottom)) {
+void OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
+ if (!layer || quickReject(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight())) {
return;
}
glActiveTexture(gTextureUnits[0]);
- if (!texture) return;
-
- mCaches.unbindMeshBuffer();
- resetDrawTextureTexCoords(0.0f, v, u, 0.0f);
int alpha;
SkXfermode::Mode mode;
getAlphaAndMode(paint, &alpha, &mode);
- // TODO: Should get the blend info from the caller
- drawTextureMesh(left, top, right, bottom, texture, alpha / 255.0f, mode, true,
- &mMeshVertices[0].position[0], &mMeshVertices[0].texture[0],
- GL_TRIANGLE_STRIP, gMeshCount);
+ layer->alpha = alpha;
+ layer->mode = mode;
- resetDrawTextureTexCoords(0.0f, 0.0f, 1.0f, 1.0f);
+ const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight());
+ composeLayerRect(layer, r);
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 5f45915..8cec8f1 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -94,9 +94,8 @@
bool quickReject(float left, float top, float right, float bottom);
virtual bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op);
- virtual void drawDisplayList(DisplayList* displayList);
- virtual void drawLayer(int texture, float left, float top, float right, float bottom,
- float u, float v, SkPaint* paint);
+ virtual void drawDisplayList(DisplayList* displayList, uint32_t level = 0);
+ virtual void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
virtual void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
virtual void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
virtual void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
@@ -133,6 +132,19 @@
*/
virtual void composeLayer(sp<Snapshot> current, sp<Snapshot> previous);
+ /**
+ * Mark the layer as dirty at the specified coordinates. The coordinates
+ * are transformed with the supplied matrix.
+ */
+ virtual void dirtyLayer(const float left, const float top,
+ const float right, const float bottom, const mat4 transform);
+
+ /**
+ * Mark the layer as dirty at the specified coordinates.
+ */
+ virtual void dirtyLayer(const float left, const float top,
+ const float right, const float bottom);
+
private:
/**
* Saves the current state of the renderer as a new snapshot.
@@ -402,18 +414,6 @@
mDirtyClip = true;
}
- /**
- * Mark the layer as dirty at the specified coordinates. The coordinates
- * are transformed with the supplied matrix.
- */
- void dirtyLayer(const float left, const float top, const float right, const float bottom,
- const mat4 transform);
-
- /**
- * Mark the layer as dirty at the specified coordinates.
- */
- void dirtyLayer(const float left, const float top, const float right, const float bottom);
-
// Dimensions of the drawing surface
int mWidth, mHeight;
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index bb38825..2e0c491 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -236,6 +236,7 @@
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &mGL.mMaxFragmentUniformVectors);
mGL.OES_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_OES_texture_npot");
+ mGL.GL_IMG_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_IMG_texture_npot");
mGL.GL_NV_texture_npot_2D_mipmap = NULL != strstr((const char *)mGL.mExtensions, "GL_NV_texture_npot_2D_mipmap");
mGL.EXT_texture_max_aniso = 1.0f;
bool hasAniso = NULL != strstr((const char *)mGL.mExtensions, "GL_EXT_texture_filter_anisotropic");
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index df275bc..9f94f26 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -205,6 +205,7 @@
mutable const ObjectBase * mObjHead;
bool ext_OES_texture_npot() const {return mGL.OES_texture_npot;}
+ bool ext_GL_IMG_texture_npot() const {return mGL.GL_IMG_texture_npot;}
bool ext_GL_NV_texture_npot_2D_mipmap() const {return mGL.GL_NV_texture_npot_2D_mipmap;}
float ext_texture_max_aniso() const {return mGL.EXT_texture_max_aniso; }
uint32_t getMaxFragmentTextures() const {return mGL.mMaxFragmentTextureImageUnits;}
@@ -249,6 +250,7 @@
int32_t mMaxVertexTextureUnits;
bool OES_texture_npot;
+ bool GL_IMG_texture_npot;
bool GL_NV_texture_npot_2D_mipmap;
float EXT_texture_max_aniso;
} mGL;
diff --git a/libs/rs/rsContextHostStub.h b/libs/rs/rsContextHostStub.h
index c22647f..8cfb38b 100644
--- a/libs/rs/rsContextHostStub.h
+++ b/libs/rs/rsContextHostStub.h
@@ -119,11 +119,12 @@
mutable const ObjectBase * mObjHead;
bool ext_OES_texture_npot() const {return mGL.OES_texture_npot;}
- bool ext_GL_NV_texture_npot_2D_mipmap() const {return false;}
- float ext_texture_max_aniso() const {return 1.0f;}
+ bool ext_GL_NV_texture_npot_2D_mipmap() const {return mGL.GL_NV_texture_npot_2D_mipmap;}
+ float ext_texture_max_aniso() const {return mGL.EXT_texture_max_aniso; }
uint32_t getMaxFragmentTextures() const {return mGL.mMaxFragmentTextureImageUnits;}
uint32_t getMaxFragmentUniformVectors() const {return mGL.mMaxFragmentUniformVectors;}
uint32_t getMaxVertexUniformVectors() const {return mGL.mMaxVertexUniformVectors;}
+ uint32_t getMaxVertexAttributes() const {return mGL.mMaxVertexAttribs;}
protected:
@@ -147,6 +148,8 @@
int32_t mMaxVertexTextureUnits;
bool OES_texture_npot;
+ bool GL_NV_texture_npot_2D_mipmap;
+ float EXT_texture_max_aniso;
} mGL;
};
diff --git a/libs/rs/rsSampler.cpp b/libs/rs/rsSampler.cpp
index e2757df..c80aecc 100644
--- a/libs/rs/rsSampler.cpp
+++ b/libs/rs/rsSampler.cpp
@@ -77,8 +77,20 @@
GLenum target = (GLenum)tex->getGLTarget();
if (!rsc->ext_OES_texture_npot() && tex->getType()->getIsNp2()) {
- if (tex->getHasGraphicsMipmaps() && rsc->ext_GL_NV_texture_npot_2D_mipmap()) {
- glTexParameteri(target, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
+ if (tex->getHasGraphicsMipmaps() &&
+ (rsc->ext_GL_NV_texture_npot_2D_mipmap() || rsc->ext_GL_IMG_texture_npot())) {
+ if (rsc->ext_GL_NV_texture_npot_2D_mipmap()) {
+ glTexParameteri(target, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
+ } else {
+ switch (trans[mMinFilter]) {
+ case GL_LINEAR_MIPMAP_LINEAR:
+ glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
+ break;
+ default:
+ glTexParameteri(target, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
+ break;
+ }
+ }
} else {
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, transNP[mMinFilter]);
}
diff --git a/libs/storage/IMountService.cpp b/libs/storage/IMountService.cpp
index a7ab824..7fbf67a 100644
--- a/libs/storage/IMountService.cpp
+++ b/libs/storage/IMountService.cpp
@@ -49,6 +49,7 @@
TRANSACTION_getMountedObbPath,
TRANSACTION_isExternalStorageEmulated,
TRANSACTION_decryptStorage,
+ TRANSACTION_encryptStorage,
};
class BpMountService: public BpInterface<IMountService>
@@ -505,7 +506,7 @@
path = reply.readString16();
return true;
}
-
+
int32_t decryptStorage(const String16& password)
{
Parcel data, reply;
@@ -522,6 +523,23 @@
}
return reply.readInt32();
}
+
+ int32_t encryptStorage(const String16& password)
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(IMountService::getInterfaceDescriptor());
+ data.writeString16(password);
+ if (remote()->transact(TRANSACTION_encryptStorage, data, &reply) != NO_ERROR) {
+ LOGD("encryptStorage could not contact remote\n");
+ return -1;
+ }
+ int32_t err = reply.readExceptionCode();
+ if (err < 0) {
+ LOGD("encryptStorage caught exception %d\n", err);
+ return err;
+ }
+ return reply.readInt32();
+ }
};
IMPLEMENT_META_INTERFACE(MountService, "IMountService");
diff --git a/libs/surfaceflinger_client/Android.mk b/libs/surfaceflinger_client/Android.mk
index ce3c71a..4a0faf0 100644
--- a/libs/surfaceflinger_client/Android.mk
+++ b/libs/surfaceflinger_client/Android.mk
@@ -5,6 +5,7 @@
ISurfaceComposer.cpp \
ISurface.cpp \
ISurfaceComposerClient.cpp \
+ IGraphicBufferAlloc.cpp \
LayerState.cpp \
SharedBufferStack.cpp \
Surface.cpp \
diff --git a/libs/surfaceflinger_client/IGraphicBufferAlloc.cpp b/libs/surfaceflinger_client/IGraphicBufferAlloc.cpp
new file mode 100644
index 0000000..e05da72
--- /dev/null
+++ b/libs/surfaceflinger_client/IGraphicBufferAlloc.cpp
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+// tag as surfaceflinger
+#define LOG_TAG "SurfaceFlinger"
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <binder/Parcel.h>
+
+#include <ui/GraphicBuffer.h>
+
+#include <surfaceflinger/IGraphicBufferAlloc.h>
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+
+enum {
+ CREATE_GRAPHIC_BUFFER = IBinder::FIRST_CALL_TRANSACTION,
+ FREE_ALL_GRAPHIC_BUFFERS_EXCEPT,
+};
+
+class BpGraphicBufferAlloc : public BpInterface<IGraphicBufferAlloc>
+{
+public:
+ BpGraphicBufferAlloc(const sp<IBinder>& impl)
+ : BpInterface<IGraphicBufferAlloc>(impl)
+ {
+ }
+
+ virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
+ PixelFormat format, uint32_t usage) {
+ Parcel data, reply;
+ data.writeInterfaceToken(
+ IGraphicBufferAlloc::getInterfaceDescriptor());
+ data.writeInt32(w);
+ data.writeInt32(h);
+ data.writeInt32(format);
+ data.writeInt32(usage);
+ remote()->transact(CREATE_GRAPHIC_BUFFER, data, &reply);
+ sp<GraphicBuffer> graphicBuffer;
+ bool nonNull = (bool)reply.readInt32();
+ if (nonNull) {
+ graphicBuffer = new GraphicBuffer();
+ reply.read(*graphicBuffer);
+ }
+ return graphicBuffer;
+ }
+
+ virtual void freeAllGraphicBuffersExcept(int bufIdx) {
+ Parcel data, reply;
+ data.writeInterfaceToken(
+ IGraphicBufferAlloc::getInterfaceDescriptor());
+ data.writeInt32(bufIdx);
+ remote()->transact(FREE_ALL_GRAPHIC_BUFFERS_EXCEPT, data, &reply);
+ }
+};
+
+IMPLEMENT_META_INTERFACE(GraphicBufferAlloc, "android.ui.IGraphicBufferAlloc");
+
+// ----------------------------------------------------------------------
+
+status_t BnGraphicBufferAlloc::onTransact(
+ uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+ // codes that don't require permission check
+
+ switch(code) {
+ case CREATE_GRAPHIC_BUFFER: {
+ CHECK_INTERFACE(IGraphicBufferAlloc, data, reply);
+ uint32_t w = data.readInt32();
+ uint32_t h = data.readInt32();
+ PixelFormat format = data.readInt32();
+ uint32_t usage = data.readInt32();
+ sp<GraphicBuffer> result(createGraphicBuffer(w, h, format, usage));
+ reply->writeInt32(result != 0);
+ if (result != 0) {
+ reply->write(*result);
+ }
+ return NO_ERROR;
+ } break;
+ case FREE_ALL_GRAPHIC_BUFFERS_EXCEPT: {
+ CHECK_INTERFACE(IGraphicBufferAlloc, data, reply);
+ int bufIdx = data.readInt32();
+ freeAllGraphicBuffersExcept(bufIdx);
+ return NO_ERROR;
+ } break;
+ default:
+ return BBinder::onTransact(code, data, reply, flags);
+ }
+}
+
+}; // namespace android
diff --git a/libs/surfaceflinger_client/ISurfaceComposer.cpp b/libs/surfaceflinger_client/ISurfaceComposer.cpp
index a42b49d..2216824 100644
--- a/libs/surfaceflinger_client/ISurfaceComposer.cpp
+++ b/libs/surfaceflinger_client/ISurfaceComposer.cpp
@@ -26,7 +26,6 @@
#include <binder/IServiceManager.h>
#include <ui/DisplayInfo.h>
-#include <ui/GraphicBuffer.h>
#include <surfaceflinger/ISurfaceComposer.h>
@@ -65,6 +64,15 @@
return interface_cast<ISurfaceComposerClient>(reply.readStrongBinder());
}
+ virtual sp<IGraphicBufferAlloc> createGraphicBufferAlloc()
+ {
+ uint32_t n;
+ Parcel data, reply;
+ data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+ remote()->transact(BnSurfaceComposer::CREATE_GRAPHIC_BUFFER_ALLOC, data, &reply);
+ return interface_cast<IGraphicBufferAlloc>(reply.readStrongBinder());
+ }
+
virtual sp<IMemoryHeap> getCblk() const
{
Parcel data, reply;
@@ -170,25 +178,6 @@
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
remote()->transact(BnSurfaceComposer::SIGNAL, data, &reply, IBinder::FLAG_ONEWAY);
}
-
- virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
- PixelFormat format, uint32_t usage) const {
- Parcel data, reply;
- data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
- data.writeInt32(w);
- data.writeInt32(h);
- data.writeInt32(format);
- data.writeInt32(usage);
- remote()->transact(BnSurfaceComposer::CREATE_GRAPHIC_BUFFER, data,
- &reply);
- sp<GraphicBuffer> graphicBuffer;
- bool nonNull = (bool)reply.readInt32();
- if (nonNull) {
- graphicBuffer = new GraphicBuffer();
- reply.read(*graphicBuffer);
- }
- return graphicBuffer;
- }
};
IMPLEMENT_META_INTERFACE(SurfaceComposer, "android.ui.ISurfaceComposer");
@@ -209,6 +198,11 @@
sp<IBinder> b = createClientConnection()->asBinder();
reply->writeStrongBinder(b);
} break;
+ case CREATE_GRAPHIC_BUFFER_ALLOC: {
+ CHECK_INTERFACE(ISurfaceComposer, data, reply);
+ sp<IBinder> b = createGraphicBufferAlloc()->asBinder();
+ reply->writeStrongBinder(b);
+ } break;
case OPEN_GLOBAL_TRANSACTION: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);
openGlobalTransaction();
@@ -267,18 +261,6 @@
reply->writeInt32(f);
reply->writeInt32(res);
} break;
- case CREATE_GRAPHIC_BUFFER: {
- CHECK_INTERFACE(ISurfaceComposer, data, reply);
- uint32_t w = data.readInt32();
- uint32_t h = data.readInt32();
- PixelFormat format = data.readInt32();
- uint32_t usage = data.readInt32();
- sp<GraphicBuffer> result(createGraphicBuffer(w, h, format, usage));
- reply->writeInt32(result != 0);
- if (result != 0) {
- reply->write(*result);
- }
- } break;
case TURN_ELECTRON_BEAM_OFF: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);
int32_t mode = data.readInt32();
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index f6c55e4..ad9a94f 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -774,6 +774,9 @@
self->mExitPending = true;
self->mLock.lock();
self->mRunning = false;
+ // clear thread ID so that requestExitAndWait() does not exit if
+ // called by a new thread using the same thread ID as this one.
+ self->mThread = thread_id_t(-1);
self->mThreadExitedCondition.broadcast();
self->mLock.unlock();
break;
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index db308c7..11900d4 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -453,8 +453,9 @@
* the specified audio sampling rate is applicable. The sampling rate really depends
* on the format for the audio recording, as well as the capabilities of the platform.
* For instance, the sampling rate supported by AAC audio coding standard ranges
- * from 8 to 96 kHz. Please consult with the related audio coding standard for the
- * supported audio sampling rate.
+ * from 8 to 96 kHz, the sampling rate supported by AMRNB is 8kHz, and the sampling
+ * rate supported by AMRWB is 16kHz. Please consult with the related audio coding
+ * standard for the supported audio sampling rate.
*
* @param samplingRate the sampling rate for audio in samples per second.
*/
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 6b438bf..8929393 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -400,6 +400,7 @@
private long mLastModified;
private long mFileSize;
private String mWriter;
+ private int mCompilation;
public FileCacheEntry beginFile(String path, String mimeType, long lastModified,
long fileSize, boolean isDirectory) {
@@ -509,6 +510,7 @@
mPath = path;
mLastModified = lastModified;
mWriter = null;
+ mCompilation = 0;
return entry;
}
@@ -620,6 +622,8 @@
mDuration = parseSubstring(value, 0, 0);
} else if (name.equalsIgnoreCase("writer") || name.startsWith("writer;")) {
mWriter = value.trim();
+ } else if (name.equalsIgnoreCase("compilation")) {
+ mCompilation = parseSubstring(value, 0, 0);
}
}
@@ -670,6 +674,7 @@
}
map.put(Audio.Media.TRACK, mTrack);
map.put(Audio.Media.DURATION, mDuration);
+ map.put(Audio.Media.COMPILATION, mCompilation);
}
return map;
}
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index d372ee6..992abd7 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -846,27 +846,12 @@
mAudioEncoder);
return BAD_VALUE;
}
- if (mSampleRate != 8000) {
- LOGE("Invalid sampling rate %d used for AMRNB recording",
- mSampleRate);
- return BAD_VALUE;
- }
} else { // mOutputFormat must be OUTPUT_FORMAT_AMR_WB
if (mAudioEncoder != AUDIO_ENCODER_AMR_WB) {
LOGE("Invlaid encoder %d used for AMRWB recording",
mAudioEncoder);
return BAD_VALUE;
}
- if (mSampleRate != 16000) {
- LOGE("Invalid sample rate %d used for AMRWB recording",
- mSampleRate);
- return BAD_VALUE;
- }
- }
- if (mAudioChannels != 1) {
- LOGE("Invalid number of audio channels %d used for amr recording",
- mAudioChannels);
- return BAD_VALUE;
}
if (mAudioSource >= AUDIO_SOURCE_LIST_END) {
@@ -874,8 +859,12 @@
return BAD_VALUE;
}
- sp<MediaSource> audioEncoder = createAudioSource();
+ status_t status = BAD_VALUE;
+ if (OK != (status = checkAudioEncoderCapabilities())) {
+ return status;
+ }
+ sp<MediaSource> audioEncoder = createAudioSource();
if (audioEncoder == NULL) {
return UNKNOWN_ERROR;
}
@@ -1050,6 +1039,79 @@
return OK;
}
+status_t StagefrightRecorder::checkAudioEncoderCapabilities() {
+ clipAudioBitRate();
+ clipAudioSampleRate();
+ clipNumberOfAudioChannels();
+ return OK;
+}
+
+void StagefrightRecorder::clipAudioBitRate() {
+ LOGV("clipAudioBitRate: encoder %d", mAudioEncoder);
+
+ int minAudioBitRate =
+ mEncoderProfiles->getAudioEncoderParamByName(
+ "enc.aud.bps.min", mAudioEncoder);
+ if (mAudioBitRate < minAudioBitRate) {
+ LOGW("Intended audio encoding bit rate (%d) is too small"
+ " and will be set to (%d)", mAudioBitRate, minAudioBitRate);
+ mAudioBitRate = minAudioBitRate;
+ }
+
+ int maxAudioBitRate =
+ mEncoderProfiles->getAudioEncoderParamByName(
+ "enc.aud.bps.max", mAudioEncoder);
+ if (mAudioBitRate > maxAudioBitRate) {
+ LOGW("Intended audio encoding bit rate (%d) is too large"
+ " and will be set to (%d)", mAudioBitRate, maxAudioBitRate);
+ mAudioBitRate = maxAudioBitRate;
+ }
+}
+
+void StagefrightRecorder::clipAudioSampleRate() {
+ LOGV("clipAudioSampleRate: encoder %d", mAudioEncoder);
+
+ int minSampleRate =
+ mEncoderProfiles->getAudioEncoderParamByName(
+ "enc.aud.hz.min", mAudioEncoder);
+ if (mSampleRate < minSampleRate) {
+ LOGW("Intended audio sample rate (%d) is too small"
+ " and will be set to (%d)", mSampleRate, minSampleRate);
+ mSampleRate = minSampleRate;
+ }
+
+ int maxSampleRate =
+ mEncoderProfiles->getAudioEncoderParamByName(
+ "enc.aud.hz.max", mAudioEncoder);
+ if (mSampleRate > maxSampleRate) {
+ LOGW("Intended audio sample rate (%d) is too large"
+ " and will be set to (%d)", mSampleRate, maxSampleRate);
+ mSampleRate = maxSampleRate;
+ }
+}
+
+void StagefrightRecorder::clipNumberOfAudioChannels() {
+ LOGV("clipNumberOfAudioChannels: encoder %d", mAudioEncoder);
+
+ int minChannels =
+ mEncoderProfiles->getAudioEncoderParamByName(
+ "enc.aud.ch.min", mAudioEncoder);
+ if (mAudioChannels < minChannels) {
+ LOGW("Intended number of audio channels (%d) is too small"
+ " and will be set to (%d)", mAudioChannels, minChannels);
+ mAudioChannels = minChannels;
+ }
+
+ int maxChannels =
+ mEncoderProfiles->getAudioEncoderParamByName(
+ "enc.aud.ch.max", mAudioEncoder);
+ if (mAudioChannels > maxChannels) {
+ LOGW("Intended number of audio channels (%d) is too large"
+ " and will be set to (%d)", mAudioChannels, maxChannels);
+ mAudioChannels = maxChannels;
+ }
+}
+
void StagefrightRecorder::clipVideoFrameHeight() {
LOGV("clipVideoFrameHeight: encoder %d", mVideoEncoder);
int minFrameHeight = mEncoderProfiles->getVideoEncoderParamByName(
@@ -1206,18 +1268,23 @@
}
status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) {
- sp<MediaSource> audioEncoder;
+ status_t status = BAD_VALUE;
+ if (OK != (status = checkAudioEncoderCapabilities())) {
+ return status;
+ }
+
switch(mAudioEncoder) {
case AUDIO_ENCODER_AMR_NB:
case AUDIO_ENCODER_AMR_WB:
case AUDIO_ENCODER_AAC:
- audioEncoder = createAudioSource();
break;
+
default:
LOGE("Unsupported audio encoder: %d", mAudioEncoder);
return UNKNOWN_ERROR;
}
+ sp<MediaSource> audioEncoder = createAudioSource();
if (audioEncoder == NULL) {
return UNKNOWN_ERROR;
}
diff --git a/media/libmediaplayerservice/StagefrightRecorder.h b/media/libmediaplayerservice/StagefrightRecorder.h
index 36a15a8..72225db 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.h
+++ b/media/libmediaplayerservice/StagefrightRecorder.h
@@ -123,6 +123,7 @@
status_t startMPEG2TSRecording();
sp<MediaSource> createAudioSource();
status_t checkVideoEncoderCapabilities();
+ status_t checkAudioEncoderCapabilities();
status_t setupCameraSource(sp<CameraSource> *cameraSource);
status_t setupAudioEncoder(const sp<MediaWriter>& writer);
status_t setupVideoEncoder(
@@ -158,6 +159,9 @@
void clipVideoFrameRate();
void clipVideoFrameWidth();
void clipVideoFrameHeight();
+ void clipAudioBitRate();
+ void clipAudioSampleRate();
+ void clipNumberOfAudioChannels();
StagefrightRecorder(const StagefrightRecorder &);
StagefrightRecorder &operator=(const StagefrightRecorder &);
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index ec5f853..5981139 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -81,26 +81,34 @@
<!-- Default for Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS -->
<string name="def_accessibility_web_content_key_bindings" translatable="false">
- <!-- DPAD/Trackball UP maps to traverse previous on current axis and send an event. -->
+ <!-- DPAD/Trackball UP - traverse previous on current axis and send an event. -->
0x13=0x01000100;
- <!-- DPAD/Trackball DOWN maps to traverse next on current axis and send an event. -->
+ <!-- DPAD/Trackball DOWN - traverse next on current axis and send an event. -->
0x14=0x01010100;
- <!-- DPAD/Trackball LEFT maps to action in the android default navigation axis. -->
- 0x15=0x04000100;
- <!-- DPAD/Trackball RIGHT maps to no action in the android default navigation axis. -->
- 0x16=0x04010100;
- <!-- Left Alt+DPAD/Trackball UP transitions from an axis to another and sends an event. -->
- <!-- Axis transitions: 2 -> 7; 1 -> 2; 0 -> 1; 3 -> 0; 4 -> 0; 5 -> 0; 6 -> 0; -->
- 0x200000013=0x03020701:0x03010201:0x03000101:0x03030001:0x03040001:0x03050001:0x03060001;
- <!-- Left Alt+DPAD/Trackball DOWN transitions from an axis to another and sends an event. -->
- <!-- Axis transitions: 1 -> 0; 2 -> 1; 7 -> 2; 3 -> 7; 4 -> 7; 5 -> 7; 6 -> 7; -->
- 0x200000014=0x03010001:0x03020101:0x03070201:0x03030701:0x03040701:0x03050701:0x03060701;
- <!-- Left Alt+DPAD/Trackball LEFT transitions from an axis to another and sends an event. -->
- <!-- Axis transitions: 4 -> 3; 5 -> 4; 6 -> 5; 0 -> 6; 1 -> 6; 2 -> 6; 7 -> 6; -->
- 0x200000015=0x03040301:0x03050401:0x03060501:0x03000601:0x03010601:0x03020601:0x03070601;
- <!-- Left Alt+DPAD/Trackball RIGHT transitions from an axis to another and sends an event. -->
- <!-- Axis transitions: 5 -> 6; 4 -> 5; 3 -> 4; 2 -> 3; 7 -> 3; 1 -> 3; 0 -> 3; -->
- 0x200000016=0x03050601:0x03040501:0x03030401:0x03020301:0x03070301:0x03010301:0x03000301;
+ <!-- DPAD/Trackball LEFT - traverse previous on the character navigation axis and send event. -->
+ 0x15=0x02000001;
+ <!-- DPAD/Trackball RIGHT - traverse next on the character navigation axis end send event. -->
+ 0x16=0x02010001;
+ <!-- Alt+DPAD/Trackball UP - go to the top of the document. -->
+ 0x200000013=0x02000601;
+ <!-- Alt+DPAD/Trackball DOWN - go to the bottom of the document. -->
+ 0x200000014=0x02010601;
+ <!-- Alt+DPAD/Trackball LEFT - transition from an axis to another and sends an event.-->
+ <!-- Axis transitions: 2 -> 1; -->
+ 0x200000015=0x03020101;
+ <!-- Alt+DPAD/Trackball RIGHT - transition from an axis to another and sends an event. -->
+ <!-- Axis transitions: 1 -> 2; -->
+ 0x200000016=0x03010201;
+ <!-- Alt+g - go to the previous heading and send an event. -->
+ 0x200000023=0x02000301;
+ <!-- Alt+h - go to the next heading and send an event. -->
+ 0x200000024=0x02010301;
+ <!-- Alt+COMMA - transition to sentence navigation axis and send an event. -->
+ <!-- Axis transitions: 7 -> 2; -->
+ 0x200000037=0x03070201;
+ <!-- Alt+PERIOD - transition to default web view behavior axis and send an event. -->
+ <!-- Axis transitions: 0 -> 7; 1 - > 7; 2 -> 7; -->
+ 0x200000038=0x03000701:0x03010701:0x03020701;
</string>
<!-- Default for Settings.System.USER_ROTATION -->
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 85c6d72..5f01f4d 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"ليس هناك أية تطبيقات حديثة."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"سيتم تدوير الشاشة تلقائيًا."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"تم قفل تدوير الشاشة الآن."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 54314c7..aa98f7d 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Няма скорошни приложения."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Екранът ще се завърта автоматично."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Завъртането на екрана е заключено."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 77f3b30..583044d 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"No hi ha aplicacions recents."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"La pantalla girarà automàticament."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Ara la rotació de pantalla està bloquejada."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index e2a35e0..ea5694d 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Žádné nedávno použité aplikace."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Obrazovka se automaticky otočí."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Otáčení obrazovky je uzamčeno."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 50ffd23..b95c6cb 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Der er ingen nye programmer."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Skærmen roterer automatisk."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Skærmrotationen er nu låst."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index a4194ad..4043c2e 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Keine neuen Anwendungen"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Bildschirm wird automatisch gedreht."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Bildschirmrotation ist jetzt gesperrt."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 8eb8f22..39a462c 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Δεν υπάρχουν πρόσφατες εφαρμογές."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Θα γίνεται αυτόματη περιστροφή της οθόνης."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Η περιστροφή οθόνης είναι κλειδωμένη."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 92a693b..72373bb 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"No recent applications."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Screen will rotate automatically."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Screen rotation is now locked."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index ed5be32..8013a19 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"No hay aplicaciones recientes."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"La pantalla rotará automáticamente."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"La rotación de la pantalla se encuentra actualmente bloqueada."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 04e3d5f..3acfb45 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"No hay aplicaciones recientes."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"La pantalla girará automáticamente."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"La rotación de la pantalla esta bloqueada."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index ac9fbf1..0528d68 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"برنامه اخیری موجود نیست."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"صفحه به صورت خودکار می چرخد."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"چرخش صفحه اکنون قفل است."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index ca22c63..1ce102a 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Ei viimeaikaisia sovelluksia."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Ruutu kiertyy automaattisesti."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Ruudun kierto on lukittu."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index b610fd2..12308fb 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Aucune application récente"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"L\'écran pivote automatiquement."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"La rotation de l\'écran est verrouillée."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 9b4f0e7..411336a 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nema nedavnih aplikacija."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Zaslon će se rotirati automatski."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Rotacija zaslona sada je zaključana."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 3988934..b82aa77 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nincsenek nemrég használt alkalmazások"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"A képernyő automatikusan forogni fog."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"A képernyőforgatás zárolva van."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 5eaad75..db170ab 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Tidak ada aplikasi terbaru."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Layar akan diputar secara otomatis."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Sekarang layar rotasi dikunci."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 022af67..ca99d86 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nessuna applicazione recente."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Lo schermo ruoterà automaticamente."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"La rotazione dello schermo è bloccata."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 75c53a9..f2d5621 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"אין יישומים חדשים."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"המסך יסתובב באופן אוטומטי."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"סיבוב המסך נעול כעת."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 11ed8a0..25d8873 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"新着のアプリケーションはありません。"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"画面は自動的に回転します。"</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"画面の回転をロックしました。"</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 1c4b476..6c5970a 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"최근에 사용한 애플리케이션이 없습니다."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"화면은 자동으로 회전합니다."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"현재 화면 회전이 잠겨 있습니다."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 2b74f29..90a5e44 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nėra naujausių programų."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Ekranas bus sukamas automatiškai."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Dabar ekrano sukimo funkcija užrakinta."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index cca94dc..fb33329 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nav nesenu lietojumprogrammu."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Ekrāns rotēs automātiski."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Ekrāna rotēšana tagad ir bloķēta."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index a9d1b3a..82405a8 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Ingen nylig brukte programmer."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Skjermen vil rotere automatisk."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Skjermrotering er låst."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 552f19c..4efdcbb 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Geen recente toepassingen."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Scherm wordt automatisch geroteerd."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Schermrotatie is nu vergrendeld."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 84decd3..07ef5ef 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Brak ostatnio używanych aplikacji."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Ekran zostanie obrócony automatycznie."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Obracanie ekranu zostało zablokowane."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 9734af5..aa14cce 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nenhuma aplicação recente."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"O ecrã será rodado automaticamente."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"A rotação do ecrã está agora bloqueada."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index d1c5e1d..17be76a 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nenhum aplicativo recente."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"A tela girará automaticamente."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"A rotação da tela está bloqueada."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-rm/strings.xml b/packages/SystemUI/res/values-rm/strings.xml
index 6f49c5c..e3fec88 100644
--- a/packages/SystemUI/res/values-rm/strings.xml
+++ b/packages/SystemUI/res/values-rm/strings.xml
@@ -55,8 +55,6 @@
<skip />
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <!-- no translation found for toast_rotation_free (2700542202836832631) -->
- <skip />
- <!-- no translation found for toast_rotation_locked (7484691306949652450) -->
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
<skip />
</resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 825b91e..2bb3c14 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Nu există aplicaţii recente."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Ecranul se va roti în mod automat."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Rotaţia ecranului este blocată."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 586ee42..89b9cc8 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Новых приложений нет"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Экран будет поворачиваться автоматически."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Поворот экрана заблокирован."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 1201f2f..9716327 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Žiadne nedávno použité aplikácie."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Obrazovka sa automaticky otočí."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Otáčanie obrazovky je uzamknuté."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index ee90450..b05b93c 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -43,6 +43,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Ni novih programov."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Zaslon se bo samodejno zasukal."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Vrtenje zaslona je zaklenjeno."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 05dfe49..ff1d3fb 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Нема недавних апликација"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Екран ће се аутоматски ротирати."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Ротирање екрана је сада закључано."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index db61d27..06b6880 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Inga nya program."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Skärmen roteras automatiskt."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Skärmrotationen är nu låst."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 9cdcaff..2d337a90 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"ไม่มีแอปพลิเคชันล่าสุด"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"หน้าจอจะหมุนโดยอัตโนมัติ"</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"ขณะนี้การหมุนหน้าจอถูกล็อก"</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 0b7fa1d..e94d3cc 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Walang kamakailang mga application."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Awtomatikong iikot ang screen."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Naka-lock na ngayon ang pag-ikot ng screen."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index f015320..4c3f818 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Hiçbir yeni uygulama yok."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Ekran otomatik olarak dönecektir."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Ekran dönüşü şimdi kilitlendi."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index fd41596..85ead1c 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Немає останніх програм."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Екран обертатиметься автоматично."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Обертання екрана зараз заблоковано."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 819b3ea..71df0c3 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"Không có ứng dụng nào gần đây."</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"Màn hinh sẽ xoay tự động."</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"Xoay màn hình hiện đã bị khóa."</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 75454f3..0cdc38d 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"没有最近使用的应用程序。"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"屏幕会自动旋转。"</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"屏幕旋转现已锁定。"</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 5094b3e..c85020f 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -42,6 +42,6 @@
<string name="recent_tasks_empty" msgid="1905484479067697884">"沒有最近用過的應用程式。"</string>
<!-- no translation found for recent_tasks_app_label (3796483981246752469) -->
<skip />
- <string name="toast_rotation_free" msgid="2700542202836832631">"螢幕會自動旋轉。"</string>
- <string name="toast_rotation_locked" msgid="7484691306949652450">"螢幕旋轉功能現已鎖定。"</string>
+ <!-- no translation found for bluetooth_tethered (7094101612161133267) -->
+ <skip />
</resources>
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 243fa07..a6037aa 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -122,8 +122,10 @@
import android.media.AudioManager;
import java.io.File;
+import java.io.FileDescriptor;
import java.io.FileReader;
import java.io.IOException;
+import java.io.PrintWriter;
import java.util.ArrayList;
/**
@@ -2808,4 +2810,70 @@
// disable key repeat when screen is off
return mScreenOn;
}
+
+ public void dump(String prefix, FileDescriptor fd, PrintWriter pw, String[] args) {
+ pw.print(prefix); pw.print("mSafeMode="); pw.print(mSafeMode);
+ pw.print(" mSystemRead="); pw.println(mSystemReady);
+ pw.print(prefix); pw.print("mLidOpen="); pw.print(mLidOpen);
+ pw.print(" mLidOpenRotation="); pw.print(mLidOpenRotation);
+ pw.print(" mHdmiPlugged="); pw.println(mHdmiPlugged);
+ pw.print(prefix); pw.print("mUiMode="); pw.print(mUiMode);
+ pw.print(" mDockMode="); pw.print(mDockMode);
+ pw.print(" mCarDockRotation="); pw.print(mCarDockRotation);
+ pw.print(" mDeskDockRotation="); pw.println(mDeskDockRotation);
+ pw.print(prefix); pw.print("mUserRotationMode="); pw.print(mUserRotationMode);
+ pw.print(" mUserRotation="); pw.print(mUserRotation);
+ pw.print("mAllowAllRotations="); pw.println(mAllowAllRotations);
+ pw.print(prefix); pw.print("mAccelerometerDefault="); pw.print(mAccelerometerDefault);
+ pw.print(" mCurrentAppOrientation="); pw.println(mCurrentAppOrientation);
+ pw.print(prefix); pw.print("mCarDockEnablesAccelerometer=");
+ pw.print(mCarDockEnablesAccelerometer);
+ pw.print(" mDeskDockEnablesAccelerometer=");
+ pw.println(mDeskDockEnablesAccelerometer);
+ pw.print(prefix); pw.print("mLidKeyboardAccessibility=");
+ pw.print(mLidKeyboardAccessibility);
+ pw.print(" mLidNavigationAccessibility="); pw.print(mLidNavigationAccessibility);
+ pw.print(" mLongPressOnPowerBehavior="); pw.println(mLongPressOnPowerBehavior);
+ pw.print(prefix); pw.print("mScreenOn="); pw.print(mScreenOn);
+ pw.print(" mOrientationSensorEnabled="); pw.print(mOrientationSensorEnabled);
+ pw.print(" mHasSoftInput="); pw.println(mHasSoftInput);
+ pw.print(prefix); pw.print("mUnrestrictedScreen=("); pw.print(mUnrestrictedScreenLeft);
+ pw.print(","); pw.print(mUnrestrictedScreenTop);
+ pw.print(") "); pw.print(mUnrestrictedScreenWidth);
+ pw.print("x"); pw.println(mUnrestrictedScreenHeight);
+ pw.print(prefix); pw.print("mRestrictedScreen=("); pw.print(mRestrictedScreenLeft);
+ pw.print(","); pw.print(mRestrictedScreenTop);
+ pw.print(") "); pw.print(mRestrictedScreenWidth);
+ pw.print("x"); pw.println(mRestrictedScreenHeight);
+ pw.print(prefix); pw.print("mCur=("); pw.print(mCurLeft);
+ pw.print(","); pw.print(mCurTop);
+ pw.print(")-("); pw.print(mCurRight);
+ pw.print(","); pw.print(mCurBottom); pw.println(")");
+ pw.print(prefix); pw.print("mContent=("); pw.print(mContentLeft);
+ pw.print(","); pw.print(mContentTop);
+ pw.print(")-("); pw.print(mContentRight);
+ pw.print(","); pw.print(mContentBottom); pw.println(")");
+ pw.print(prefix); pw.print("mDock=("); pw.print(mDockLeft);
+ pw.print(","); pw.print(mDockTop);
+ pw.print(")-("); pw.print(mDockRight);
+ pw.print(","); pw.print(mDockBottom); pw.println(")");
+ pw.print(prefix); pw.print("mDockLayer="); pw.println(mDockLayer);
+ pw.print(prefix); pw.print("mTopFullscreenOpaqueWindowState=");
+ pw.println(mTopFullscreenOpaqueWindowState);
+ pw.print(prefix); pw.print("mTopIsFullscreen="); pw.print(mTopIsFullscreen);
+ pw.print(" mForceStatusBar="); pw.print(mForceStatusBar);
+ pw.print(" mHideLockScreen="); pw.println(mHideLockScreen);
+ pw.print(prefix); pw.print("mDismissKeyguard="); pw.print(mDismissKeyguard);
+ pw.print(" mHomePressed="); pw.println(mHomePressed);
+ pw.print(prefix); pw.print("mAllowLockscreenWhenOn="); pw.print(mAllowLockscreenWhenOn);
+ pw.print(" mLockScreenTimeout="); pw.print(mLockScreenTimeout);
+ pw.print(" mLockScreenTimerActive="); pw.println(mLockScreenTimerActive);
+ pw.print(prefix); pw.print("mEndcallBehavior="); pw.print(mEndcallBehavior);
+ pw.print(" mIncallPowerBehavior="); pw.print(mIncallPowerBehavior);
+ pw.print(" mLongPressOnHomeBehavior="); pw.println(mLongPressOnHomeBehavior);
+ pw.print(prefix); pw.print("mLandscapeRotation="); pw.print(mLandscapeRotation);
+ pw.print(" mSeascapeRotation="); pw.println(mSeascapeRotation);
+ pw.print(prefix); pw.print("mPortraitRotation="); pw.print(mPortraitRotation);
+ pw.print(" mUpsideDownRotation="); pw.println(mUpsideDownRotation);
+ }
}
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index cb1d775..c48f360 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -2768,6 +2768,15 @@
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ long identityToken = Binder.clearCallingIdentity();
+ try {
+ dumpInternal(pw);
+ } finally {
+ Binder.restoreCallingIdentity(identityToken);
+ }
+ }
+
+ private void dumpInternal(PrintWriter pw) {
synchronized (mQueueLock) {
pw.println("Backup Manager is " + (mEnabled ? "enabled" : "disabled")
+ " / " + (!mProvisioned ? "not " : "") + "provisioned / "
@@ -2781,12 +2790,15 @@
for (String t : listAllTransports()) {
pw.println((t.equals(mCurrentTransport) ? " * " : " ") + t);
try {
- File dir = new File(mBaseStateDir, getTransport(t).transportDirName());
+ IBackupTransport transport = getTransport(t);
+ File dir = new File(mBaseStateDir, transport.transportDirName());
+ pw.println(" destination: " + transport.currentDestinationString());
+ pw.println(" intent: " + transport.configurationIntent());
for (File f : dir.listFiles()) {
pw.println(" " + f.getName() + " - " + f.length() + " state bytes");
}
- } catch (RemoteException e) {
- Slog.e(TAG, "Error in transportDirName()", e);
+ } catch (Exception e) {
+ Slog.e(TAG, "Error in transport", e);
pw.println(" Error: " + e);
}
}
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index a3d8ac9..2321e30 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -849,7 +849,8 @@
usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
- } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN)) {
+ } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) ||
+ TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN;
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
@@ -870,6 +871,8 @@
return 1;
}
callTeardown = true;
+ } else {
+ if (DBG) log("not a known feature - dropping");
}
}
if (DBG) log("Doing network teardown");
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index bf81457..d6804f9 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -1653,6 +1653,29 @@
return 0;
}
+ public int encryptStorage(String password) {
+ if (password == null) {
+ throw new IllegalArgumentException("password cannot be null");
+ }
+
+ // TODO: Enforce a permission
+
+ waitForReady();
+
+ if (DEBUG_EVENTS) {
+ Slog.i(TAG, "decrypting storage...");
+ }
+
+ try {
+ mConnector.doCommand(String.format("cryptfs enablecrypto wipe %s", password));
+ } catch (NativeDaemonConnectorException e) {
+ // Encryption failed
+ return e.getCode();
+ }
+
+ return 0;
+ }
+
private void addObbStateLocked(ObbState obbState) throws RemoteException {
final IBinder binder = obbState.getBinder();
List<ObbState> obbStates = mObbMounts.get(binder);
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index b196f74..26060e6 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -7453,6 +7453,10 @@
static class PackageSignatures {
private Signature[] mSignatures;
+ PackageSignatures(PackageSignatures orig) {
+ mSignatures = orig.mSignatures.clone();
+ }
+
PackageSignatures(Signature[] sigs) {
assignSignatures(sigs);
}
@@ -7788,6 +7792,12 @@
setFlags(pkgFlags);
}
+ GrantedPermissions(GrantedPermissions base) {
+ pkgFlags = base.pkgFlags;
+ grantedPermissions = (HashSet<String>) base.grantedPermissions.clone();
+ gids = base.gids.clone();
+ }
+
void setFlags(int pkgFlags) {
this.pkgFlags = pkgFlags & (
ApplicationInfo.FLAG_SYSTEM |
@@ -7815,7 +7825,7 @@
int versionCode;
boolean uidError;
-
+
PackageSignatures signatures = new PackageSignatures();
boolean permissionsFixed;
@@ -7841,6 +7851,44 @@
init(codePath, resourcePath, nativeLibraryPathString, pVersionCode);
}
+ /**
+ * New instance of PackageSetting with one-level-deep cloning.
+ */
+ PackageSettingBase(PackageSettingBase base) {
+ super(base);
+
+ name = base.name;
+ realName = base.realName;
+ codePath = base.codePath;
+ codePathString = base.codePathString;
+ resourcePath = base.resourcePath;
+ resourcePathString = base.resourcePathString;
+ nativeLibraryPathString = base.nativeLibraryPathString;
+ obbPathString = base.obbPathString;
+ timeStamp = base.timeStamp;
+ firstInstallTime = base.firstInstallTime;
+ lastUpdateTime = base.lastUpdateTime;
+ versionCode = base.versionCode;
+
+ uidError = base.uidError;
+
+ signatures = new PackageSignatures(base.signatures);
+
+ permissionsFixed = base.permissionsFixed;
+ haveGids = base.haveGids;
+
+ disabledComponents = (HashSet<String>) base.disabledComponents.clone();
+
+ enabledComponents = (HashSet<String>) base.enabledComponents.clone();
+
+ enabled = base.enabled;
+ installStatus = base.installStatus;
+
+ origPackage = base.origPackage;
+
+ installerPackageName = base.installerPackageName;
+ }
+
void init(File codePath, File resourcePath, String nativeLibraryPathString,
int pVersionCode) {
this.codePath = codePath;
@@ -7871,6 +7919,9 @@
timeStamp = newStamp;
}
+ /**
+ * Make a shallow copy of this package settings.
+ */
public void copyFrom(PackageSettingBase base) {
grantedPermissions = base.grantedPermissions;
gids = base.gids;
@@ -7930,18 +7981,16 @@
pkgFlags);
}
+ /**
+ * New instance of PackageSetting replicating the original settings.
+ * Note that it keeps the same PackageParser.Package instance.
+ */
PackageSetting(PackageSetting orig) {
- super(orig.name, orig.realName, orig.codePath, orig.resourcePath,
- orig.nativeLibraryPathString, orig.versionCode, orig.pkgFlags);
- copyFrom(orig);
- }
+ super(orig);
- public void copyFrom(PackageSetting base) {
- super.copyFrom((PackageSettingBase) base);
-
- userId = base.userId;
- sharedUser = base.sharedUser;
- pkg = base.pkg;
+ userId = orig.userId;
+ pkg = orig.pkg;
+ sharedUser = orig.sharedUser;
}
@Override
@@ -8173,7 +8222,7 @@
// a little trick... when we install the new package, we don't
// want to modify the existing PackageSetting for the built-in
// version. so at this point we need a new PackageSetting that
- // is okay to much with.
+ // is okay to muck with.
PackageSetting newp = new PackageSetting(p);
replacePackageLP(name, newp);
return true;
diff --git a/services/java/com/android/server/ScreenRotationAnimation.java b/services/java/com/android/server/ScreenRotationAnimation.java
index 19cc203..2ad9cbe 100644
--- a/services/java/com/android/server/ScreenRotationAnimation.java
+++ b/services/java/com/android/server/ScreenRotationAnimation.java
@@ -60,7 +60,8 @@
final Matrix mSnapshotFinalMatrix = new Matrix();
final float[] mTmpFloats = new float[9];
- public ScreenRotationAnimation(Context context, Display display, SurfaceSession session) {
+ public ScreenRotationAnimation(Context context, Display display, SurfaceSession session,
+ boolean inTransaction) {
mContext = context;
mDisplay = display;
@@ -84,60 +85,70 @@
mOriginalWidth = mDisplayMetrics.widthPixels;
mOriginalHeight = mDisplayMetrics.heightPixels;
- Surface.openTransaction();
+ if (!inTransaction) {
+ if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
+ ">>> OPEN TRANSACTION ScreenRotationAnimation");
+ Surface.openTransaction();
+ }
try {
- mSurface = new Surface(session, 0, "FreezeSurface",
- -1, mWidth, mHeight, PixelFormat.OPAQUE, 0);
- mSurface.setLayer(WindowManagerService.TYPE_LAYER_MULTIPLIER * 200);
- } catch (Surface.OutOfResourcesException e) {
- Slog.w(TAG, "Unable to allocate freeze surface", e);
- }
-
- if (false) {
try {
- int size = mOriginalWidth > mOriginalHeight ? mOriginalWidth : mOriginalHeight;
- mBlackSurface = new Surface(session, 0, "BlackSurface",
- -1, size, size, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
- mBlackSurface.setAlpha(1.0f);
- mBlackSurface.setLayer(0);
+ mSurface = new Surface(session, 0, "FreezeSurface",
+ -1, mWidth, mHeight, PixelFormat.OPAQUE, 0);
+ mSurface.setLayer(WindowManagerService.TYPE_LAYER_MULTIPLIER * 200);
} catch (Surface.OutOfResourcesException e) {
- Slog.w(TAG, "Unable to allocate black surface", e);
+ Slog.w(TAG, "Unable to allocate freeze surface", e);
}
- }
-
- setRotation(display.getRotation());
- if (mSurface != null) {
- Rect dirty = new Rect(0, 0, mWidth, mHeight);
- Canvas c = null;
- try {
- c = mSurface.lockCanvas(dirty);
- } catch (IllegalArgumentException e) {
- Slog.w(TAG, "Unable to lock surface", e);
- return;
- } catch (Surface.OutOfResourcesException e) {
- Slog.w(TAG, "Unable to lock surface", e);
- return;
+ if (false) {
+ try {
+ int size = mOriginalWidth > mOriginalHeight ? mOriginalWidth : mOriginalHeight;
+ mBlackSurface = new Surface(session, 0, "BlackSurface",
+ -1, size, size, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
+ mBlackSurface.setAlpha(1.0f);
+ mBlackSurface.setLayer(0);
+ } catch (Surface.OutOfResourcesException e) {
+ Slog.w(TAG, "Unable to allocate black surface", e);
+ }
}
- if (c == null) {
- Slog.w(TAG, "Null surface");
- return;
+
+ setRotation(display.getRotation());
+
+ if (mSurface != null) {
+ Rect dirty = new Rect(0, 0, mWidth, mHeight);
+ Canvas c = null;
+ try {
+ c = mSurface.lockCanvas(dirty);
+ } catch (IllegalArgumentException e) {
+ Slog.w(TAG, "Unable to lock surface", e);
+ return;
+ } catch (Surface.OutOfResourcesException e) {
+ Slog.w(TAG, "Unable to lock surface", e);
+ return;
+ }
+ if (c == null) {
+ Slog.w(TAG, "Null surface");
+ return;
+ }
+
+ if (screenshot != null) {
+ c.drawBitmap(screenshot, 0, 0, new Paint(0));
+ } else {
+ c.drawColor(Color.GREEN);
+ }
+
+ mSurface.unlockCanvasAndPost(c);
+ }
+ } finally {
+ if (!inTransaction) {
+ Surface.closeTransaction();
+ if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
+ "<<< CLOSE TRANSACTION ScreenRotationAnimation");
}
if (screenshot != null) {
- c.drawBitmap(screenshot, 0, 0, new Paint(0));
- } else {
- c.drawColor(Color.GREEN);
+ screenshot.recycle();
}
-
- mSurface.unlockCanvasAndPost(c);
- }
-
- Surface.closeTransaction();
-
- if (screenshot != null) {
- screenshot.recycle();
}
}
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index e881523..eb14180 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -43,6 +43,7 @@
import com.android.internal.telephony.IPhoneStateListener;
import com.android.internal.telephony.DefaultPhoneNotifier;
import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.ServiceStateTracker;
import com.android.internal.telephony.TelephonyIntents;
import com.android.server.am.BatteryStatsService;
@@ -103,7 +104,7 @@
private int mDataConnectionNetworkType;
- private int mOtaspMode;
+ private int mOtaspMode = ServiceStateTracker.OTASP_UNKNOWN;
static final int PHONE_STATE_PERMISSION_MASK =
PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR |
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 1e3b102..8d9cb31 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -149,6 +149,7 @@
implements Watchdog.Monitor {
static final String TAG = "WindowManager";
static final boolean DEBUG = false;
+ static final boolean DEBUG_ADD_REMOVE = false;
static final boolean DEBUG_FOCUS = false;
static final boolean DEBUG_ANIM = false;
static final boolean DEBUG_LAYOUT = false;
@@ -158,6 +159,7 @@
static final boolean DEBUG_INPUT_METHOD = false;
static final boolean DEBUG_VISIBILITY = false;
static final boolean DEBUG_WINDOW_MOVEMENT = false;
+ static final boolean DEBUG_TOKEN_MOVEMENT = false;
static final boolean DEBUG_ORIENTATION = false;
static final boolean DEBUG_CONFIGURATION = false;
static final boolean DEBUG_APP_TRANSITIONS = false;
@@ -296,12 +298,6 @@
new HashMap<IBinder, WindowToken>();
/**
- * The same tokens as mTokenMap, stored in a list for efficient iteration
- * over them.
- */
- final ArrayList<WindowToken> mTokenList = new ArrayList<WindowToken>();
-
- /**
* Window tokens that are in the process of exiting, but still
* on screen for animations.
*/
@@ -310,7 +306,7 @@
/**
* Z-ordered (bottom-most first) list of all application tokens, for
* controlling the ordering of windows in different applications. This
- * contains WindowToken objects.
+ * contains AppWindowToken objects.
*/
final ArrayList<AppWindowToken> mAppTokens = new ArrayList<AppWindowToken>();
@@ -344,6 +340,11 @@
final ArrayList<WindowState> mPendingRemove = new ArrayList<WindowState>();
/**
+ * Used when processing mPendingRemove to avoid working on the original array.
+ */
+ WindowState[] mPendingRemoveTmp = new WindowState[20];
+
+ /**
* Windows whose surface should be destroyed.
*/
final ArrayList<WindowState> mDestroySurface = new ArrayList<WindowState>();
@@ -360,6 +361,12 @@
*/
ArrayList<WindowState> mForceRemoves;
+ /**
+ * Used when rebuilding window list to keep track of windows that have
+ * been removed.
+ */
+ WindowState[] mRebuildTmp = new WindowState[20];
+
IInputMethodManager mInputMethodManager;
SurfaceSession mFxSession;
@@ -505,6 +512,10 @@
ArrayList<WindowState> mNotifiedWindows;
boolean mDragInProgress;
+ boolean mPerformDeferredRotation;
+ int mRotation;
+ int mAnimFlags;
+
private final Rect tmpRect = new Rect();
DragState(IBinder token, Surface surface, int flags, IBinder localWin) {
@@ -526,6 +537,7 @@
mData = null;
mThumbOffsetX = mThumbOffsetY = 0;
mNotifiedWindows = null;
+ mPerformDeferredRotation = false;
}
void register() {
@@ -666,18 +678,39 @@
mDragState.unregister();
mInputMonitor.updateInputWindowsLw();
+ // Retain the parameters of any deferred rotation operation so
+ // that we can perform it after the reset / unref of the drag state
+ final boolean performRotation = mPerformDeferredRotation;
+ final int rotation = mRotation;
+ final int animFlags = mAnimFlags;
+
// free our resources and drop all the object references
mDragState.reset();
mDragState = null;
+
+ // Now that we've officially ended the drag, execute any
+ // deferred rotation
+ if (performRotation) {
+ if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-drag rotation");
+ boolean changed = setRotationUncheckedLocked(rotation, animFlags, false);
+ if (changed) {
+ sendNewConfiguration();
+ }
+ }
}
void notifyMoveLw(float x, float y) {
final int myPid = Process.myPid();
// Move the surface to the given touch
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION notifyMoveLw");
mSurface.openTransaction();
- mSurface.setPosition((int)(x - mThumbOffsetX), (int)(y - mThumbOffsetY));
- mSurface.closeTransaction();
+ try {
+ mSurface.setPosition((int)(x - mThumbOffsetX), (int)(y - mThumbOffsetY));
+ } finally {
+ mSurface.closeTransaction();
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION notifyMoveLw");
+ }
// Tell the affected window
WindowState touchedWin = getTouchedWinAtPointLw(x, y);
@@ -812,6 +845,12 @@
return touchedWin;
}
+
+ void setDeferredRotation(int rotation, int animFlags) {
+ mRotation = rotation;
+ mAnimFlags = animFlags;
+ mPerformDeferredRotation = true;
+ }
}
DragState mDragState = null;
@@ -1062,7 +1101,7 @@
private void placeWindowAfter(WindowState pos, WindowState window) {
final int i = mWindows.indexOf(pos);
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(
TAG, "Adding window " + window + " at "
+ (i+1) + " of " + mWindows.size() + " (after " + pos + ")");
mWindows.add(i+1, window);
@@ -1071,7 +1110,7 @@
private void placeWindowBefore(WindowState pos, WindowState window) {
final int i = mWindows.indexOf(pos);
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(
TAG, "Adding window " + window + " at "
+ i + " of " + mWindows.size() + " (before " + pos + ")");
mWindows.add(i, window);
@@ -1129,9 +1168,10 @@
//apptoken note that the window could be a floating window
//that was created later or a window at the top of the list of
//windows associated with this token.
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
- TAG, "Adding window " + win + " at "
- + (newIdx+1) + " of " + N);
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) {
+ Slog.v(TAG, "Adding window " + win + " at "
+ + (newIdx+1) + " of " + N);
+ }
localmWindows.add(newIdx+1, win);
mWindowsChanged = true;
}
@@ -1210,9 +1250,10 @@
break;
}
}
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
- TAG, "Adding window " + win + " at "
- + i + " of " + N);
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) {
+ Slog.v(TAG, "Adding window " + win + " at "
+ + i + " of " + N);
+ }
localmWindows.add(i, win);
mWindowsChanged = true;
}
@@ -1228,13 +1269,14 @@
}
}
if (i < 0) i = 0;
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(
TAG, "Adding window " + win + " at "
+ i + " of " + N);
localmWindows.add(i, win);
mWindowsChanged = true;
}
if (addToToken) {
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(tokenWindowsPos, win);
}
@@ -1257,6 +1299,7 @@
// in the same sublayer.
if (wSublayer >= sublayer) {
if (addToToken) {
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(i, win);
}
placeWindowBefore(
@@ -1268,6 +1311,7 @@
// in the same sublayer.
if (wSublayer > sublayer) {
if (addToToken) {
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(i, win);
}
placeWindowBefore(w, win);
@@ -1277,6 +1321,7 @@
}
if (i >= NA) {
if (addToToken) {
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(win);
}
if (sublayer < 0) {
@@ -1451,7 +1496,7 @@
int pos = findDesiredInputMethodWindowIndexLocked(true);
if (pos >= 0) {
win.mTargetAppToken = mInputMethodTarget.mAppToken;
- if (DEBUG_WINDOW_MOVEMENT) Slog.v(
+ if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(
TAG, "Adding input method window " + win + " at " + pos);
mWindows.add(pos, win);
mWindowsChanged = true;
@@ -2001,9 +2046,10 @@
}
// Now stick it in.
- if (DEBUG_WALLPAPER || DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
- "Moving wallpaper " + wallpaper
- + " from " + oldIndex + " to " + foundI);
+ if (DEBUG_WALLPAPER || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) {
+ Slog.v(TAG, "Moving wallpaper " + wallpaper
+ + " from " + oldIndex + " to " + foundI);
+ }
localmWindows.add(foundI, wallpaper);
mWindowsChanged = true;
@@ -2322,7 +2368,6 @@
if (addToken) {
mTokenMap.put(attrs.token, token);
- mTokenList.add(token);
}
win.attach();
mWindowMap.put(client.asBinder(), win);
@@ -2390,7 +2435,7 @@
TAG, "New client " + client.asBinder()
+ ": window=" + win);
- if (win.isVisibleOrAdding() && updateOrientationFromAppTokensLocked()) {
+ if (win.isVisibleOrAdding() && updateOrientationFromAppTokensLocked(false)) {
reportNewConfig = true;
}
}
@@ -2477,7 +2522,7 @@
// So just update orientation if needed.
if (wasVisible && computeForcedAppOrientationLocked()
!= mForcedAppOrientation
- && updateOrientationFromAppTokensLocked()) {
+ && updateOrientationFromAppTokensLocked(false)) {
mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
}
updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL);
@@ -2485,6 +2530,18 @@
}
private void removeWindowInnerLocked(Session session, WindowState win) {
+ if (win.mRemoved) {
+ // Nothing to do.
+ return;
+ }
+
+ for (int i=win.mChildWindows.size()-1; i>=0; i--) {
+ WindowState cwin = win.mChildWindows.get(i);
+ Slog.w(TAG, "Force-removing child win " + cwin + " from container "
+ + win);
+ removeWindowInnerLocked(cwin.mSession, cwin);
+ }
+
win.mRemoved = true;
if (mInputMethodTarget == win) {
@@ -2500,8 +2557,10 @@
mPolicy.removeWindowLw(win);
win.removeLocked();
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "removeWindowInnerLocked: " + win);
mWindowMap.remove(win.mClient.asBinder());
mWindows.remove(win);
+ mPendingRemove.remove(win);
mWindowsChanged = true;
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Final remove of window: " + win);
@@ -2513,6 +2572,7 @@
final WindowToken token = win.mToken;
final AppWindowToken atoken = win.mAppToken;
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Removing " + win + " from " + token);
token.windows.remove(win);
if (atoken != null) {
atoken.allAppWindows.remove(win);
@@ -2523,7 +2583,6 @@
if (token.windows.size() == 0) {
if (!token.explicit) {
mTokenMap.remove(token.token);
- mTokenList.remove(token);
} else if (atoken != null) {
atoken.firstWindowDrawn = false;
}
@@ -2583,15 +2642,17 @@
synchronized (mWindowMap) {
WindowState w = windowForClientLocked(session, client, false);
if ((w != null) && (w.mSurface != null)) {
- if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION");
+ if (SHOW_TRANSACTIONS) Slog.i(TAG,
+ ">>> OPEN TRANSACTION setTransparentRegion");
Surface.openTransaction();
try {
if (SHOW_TRANSACTIONS) logSurface(w,
"transparentRegionHint=" + region, null);
w.mSurface.setTransparentRegionHint(region);
} finally {
- if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION");
Surface.closeTransaction();
+ if (SHOW_TRANSACTIONS) Slog.i(TAG,
+ "<<< CLOSE TRANSACTION setTransparentRegion");
}
}
}
@@ -2929,7 +2990,7 @@
if (assignLayers) {
assignLayersLocked();
}
- configChanged = updateOrientationFromAppTokensLocked();
+ configChanged = updateOrientationFromAppTokensLocked(false);
performLayoutAndPlaceSurfacesLocked();
if (displayed && win.mIsWallpaper) {
updateWallpaperOffsetLocked(win, mDisplay.getWidth(),
@@ -3286,7 +3347,6 @@
}
wtoken = new WindowToken(token, type, true);
mTokenMap.put(token, wtoken);
- mTokenList.add(wtoken);
if (type == TYPE_WALLPAPER) {
mWallpaperTokens.add(wtoken);
}
@@ -3302,7 +3362,6 @@
final long origId = Binder.clearCallingIdentity();
synchronized(mWindowMap) {
WindowToken wtoken = mTokenMap.remove(token);
- mTokenList.remove(wtoken);
if (wtoken != null) {
boolean delayed = false;
if (!wtoken.hidden) {
@@ -3378,10 +3437,9 @@
wtoken.groupId = groupId;
wtoken.appFullscreen = fullscreen;
wtoken.requestedOrientation = requestedOrientation;
+ if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG, "addAppToken: " + wtoken);
mAppTokens.add(addPos, wtoken);
- if (localLOGV) Slog.v(TAG, "Adding new app token: " + wtoken);
mTokenMap.put(token.asBinder(), wtoken);
- mTokenList.add(wtoken);
// Application tokens start out hidden.
wtoken.hidden = true;
@@ -3498,7 +3556,7 @@
long ident = Binder.clearCallingIdentity();
synchronized(mWindowMap) {
- if (updateOrientationFromAppTokensLocked()) {
+ if (updateOrientationFromAppTokensLocked(false)) {
if (freezeThisOneIfNeeded != null) {
AppWindowToken wtoken = findAppWindowToken(
freezeThisOneIfNeeded);
@@ -3520,7 +3578,7 @@
if (currentConfig.diff(mTempConfiguration) != 0) {
mWaitingForConfig = true;
mLayoutNeeded = true;
- startFreezingDisplayLocked();
+ startFreezingDisplayLocked(false);
config = new Configuration(mTempConfiguration);
}
}
@@ -3545,8 +3603,8 @@
* @see android.view.IWindowManager#updateOrientationFromAppTokens(
* android.os.IBinder)
*/
- boolean updateOrientationFromAppTokensLocked() {
- if (mDisplayFrozen) {
+ boolean updateOrientationFromAppTokensLocked(boolean inTransaction) {
+ if (mDisplayFrozen || mOpeningApps.size() > 0 || mClosingApps.size() > 0) {
// If the display is frozen, some activities may be in the middle
// of restarting, and thus have removed their old window. If the
// window has the flag to hide the lock screen, then the lock screen
@@ -3566,7 +3624,8 @@
//action like disabling/enabling sensors etc.,
mPolicy.setCurrentOrientationLw(req);
if (setRotationUncheckedLocked(WindowManagerPolicy.USE_LAST_ROTATION,
- mLastRotationFlags | Surface.FLAGS_ORIENTATION_ANIMATION_DISABLE)) {
+ mLastRotationFlags | Surface.FLAGS_ORIENTATION_ANIMATION_DISABLE,
+ inTransaction)) {
changed = true;
}
}
@@ -3792,10 +3851,12 @@
startingWindow.mToken = wtoken;
startingWindow.mRootToken = wtoken;
startingWindow.mAppToken = wtoken;
- if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
+ if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG,
"Removing starting window: " + startingWindow);
mWindows.remove(startingWindow);
mWindowsChanged = true;
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Removing starting " + startingWindow
+ + " from " + ttoken);
ttoken.windows.remove(startingWindow);
ttoken.allAppWindows.remove(startingWindow);
addWindowToListInOrderLocked(startingWindow, true);
@@ -4141,7 +4202,7 @@
wtoken.freezingScreen = true;
mAppsFreezingScreen++;
if (mAppsFreezingScreen == 1) {
- startFreezingDisplayLocked();
+ startFreezingDisplayLocked(false);
mH.removeMessages(H.APP_FREEZE_TIMEOUT);
mH.sendMessageDelayed(mH.obtainMessage(H.APP_FREEZE_TIMEOUT),
5000);
@@ -4210,7 +4271,6 @@
final long origId = Binder.clearCallingIdentity();
synchronized(mWindowMap) {
WindowToken basewtoken = mTokenMap.remove(token);
- mTokenList.remove(basewtoken);
if (basewtoken != null && (wtoken=basewtoken.appWindowToken) != null) {
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Removing app token: " + wtoken);
delayed = setTokenVisibilityLocked(wtoken, null, false, WindowManagerPolicy.TRANSIT_UNSET, true);
@@ -4230,6 +4290,8 @@
+ " animating=" + wtoken.animating);
if (delayed) {
// set the token aside because it has an active animation to be finished
+ if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG,
+ "removeAppToken make exiting: " + wtoken);
mExitingAppTokens.add(wtoken);
} else {
// Make sure there is no animation running on this token,
@@ -4238,6 +4300,8 @@
wtoken.animation = null;
wtoken.animating = false;
}
+ if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG,
+ "removeAppToken: " + wtoken);
mAppTokens.remove(wtoken);
wtoken.removed = true;
if (wtoken.startingData != null) {
@@ -4364,18 +4428,21 @@
if (!added && cwin.mSubLayer >= 0) {
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Re-adding child window at "
+ index + ": " + cwin);
+ win.mRebuilding = false;
mWindows.add(index, win);
index++;
added = true;
}
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Re-adding window at "
+ index + ": " + cwin);
+ cwin.mRebuilding = false;
mWindows.add(index, cwin);
index++;
}
if (!added) {
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Re-adding window at "
+ index + ": " + win);
+ win.mRebuilding = false;
mWindows.add(index, win);
index++;
}
@@ -4401,6 +4468,9 @@
if (DEBUG_REORDER) Slog.v(TAG, "Initial app tokens:");
if (DEBUG_REORDER) dumpAppTokensLocked();
final AppWindowToken wtoken = findAppWindowToken(token);
+ if (DEBUG_TOKEN_MOVEMENT || DEBUG_REORDER) Slog.v(TAG,
+ "Start moving token " + wtoken + " initially at "
+ + mAppTokens.indexOf(wtoken));
if (wtoken == null || !mAppTokens.remove(wtoken)) {
Slog.w(TAG, "Attempting to reorder token that doesn't exist: "
+ token + " (" + wtoken + ")");
@@ -4408,6 +4478,7 @@
}
mAppTokens.add(index, wtoken);
if (DEBUG_REORDER) Slog.v(TAG, "Moved " + token + " to " + index + ":");
+ else if (DEBUG_TOKEN_MOVEMENT) Slog.v(TAG, "Moved " + token + " to " + index);
if (DEBUG_REORDER) dumpAppTokensLocked();
final long origId = Binder.clearCallingIdentity();
@@ -4435,6 +4506,8 @@
for (int i=0; i<N; i++) {
IBinder token = tokens.get(i);
final AppWindowToken wtoken = findAppWindowToken(token);
+ if (DEBUG_REORDER || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG,
+ "Temporarily removing " + wtoken + " from " + mAppTokens.indexOf(wtoken));
if (!mAppTokens.remove(wtoken)) {
Slog.w(TAG, "Attempting to reorder token that doesn't exist: "
+ token + " (" + wtoken + ")");
@@ -4508,6 +4581,8 @@
for (int i=0; i<N; i++) {
AppWindowToken wt = findAppWindowToken(tokens.get(i));
if (wt != null) {
+ if (DEBUG_TOKEN_MOVEMENT || DEBUG_REORDER) Slog.v(TAG,
+ "Adding next to top: " + wt);
mAppTokens.add(wt);
if (mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) {
mToTopApps.remove(wt);
@@ -4540,6 +4615,8 @@
for (int i=0; i<N; i++) {
AppWindowToken wt = findAppWindowToken(tokens.get(i));
if (wt != null) {
+ if (DEBUG_TOKEN_MOVEMENT) Slog.v(TAG,
+ "Adding next to bottom: " + wt + " at " + pos);
mAppTokens.add(pos, wt);
if (mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) {
mToTopApps.remove(wt);
@@ -4907,12 +4984,17 @@
}
}
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION showStrictModeViolation");
Surface.openTransaction();
- if (mStrictModeFlash == null) {
- mStrictModeFlash = new StrictModeFlash(mDisplay, mFxSession);
+ try {
+ if (mStrictModeFlash == null) {
+ mStrictModeFlash = new StrictModeFlash(mDisplay, mFxSession);
+ }
+ mStrictModeFlash.setVisibility(on);
+ } finally {
+ Surface.closeTransaction();
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION showStrictModeViolation");
}
- mStrictModeFlash.setVisibility(on);
- Surface.closeTransaction();
}
}
@@ -5057,7 +5139,7 @@
long origId = Binder.clearCallingIdentity();
boolean changed;
synchronized(mWindowMap) {
- changed = setRotationUncheckedLocked(rotation, animFlags);
+ changed = setRotationUncheckedLocked(rotation, animFlags, false);
}
if (changed || alwaysSendConfiguration) {
@@ -5075,7 +5157,15 @@
* Returns null if the rotation has been changed. In this case YOU
* MUST CALL setNewConfiguration() TO UNFREEZE THE SCREEN.
*/
- public boolean setRotationUncheckedLocked(int rotation, int animFlags) {
+ public boolean setRotationUncheckedLocked(int rotation, int animFlags, boolean inTransaction) {
+ if (mDragState != null) {
+ // Potential rotation during a drag. Don't do the rotation now, but make
+ // a note to perform the rotation later.
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "Deferring rotation during drag");
+ mDragState.setDeferredRotation(rotation, animFlags);
+ return false;
+ }
+
boolean changed;
if (rotation == WindowManagerPolicy.USE_LAST_ROTATION) {
rotation = mRequestedRotation;
@@ -5102,17 +5192,28 @@
2000);
mWaitingForConfig = true;
mLayoutNeeded = true;
- startFreezingDisplayLocked();
+ startFreezingDisplayLocked(inTransaction);
Slog.i(TAG, "Setting rotation to " + rotation + ", animFlags=" + animFlags);
mInputManager.setDisplayOrientation(0, rotation);
if (mDisplayEnabled) {
if (CUSTOM_SCREEN_ROTATION) {
Surface.freezeDisplay(0);
- Surface.openTransaction();
- if (mScreenRotationAnimation != null) {
- mScreenRotationAnimation.setRotation(rotation);
+ if (!inTransaction) {
+ if (SHOW_TRANSACTIONS) Slog.i(TAG,
+ ">>> OPEN TRANSACTION setRotationUnchecked");
+ Surface.openTransaction();
}
- Surface.closeTransaction();
+ try {
+ if (mScreenRotationAnimation != null) {
+ mScreenRotationAnimation.setRotation(rotation);
+ }
+ } finally {
+ if (!inTransaction) {
+ Surface.closeTransaction();
+ if (SHOW_TRANSACTIONS) Slog.i(TAG,
+ "<<< CLOSE TRANSACTION setRotationUnchecked");
+ }
+ }
Surface.setOrientation(0, rotation, animFlags);
Surface.unfreezeDisplay(0);
} else {
@@ -5531,7 +5632,13 @@
public Configuration computeNewConfiguration() {
synchronized (mWindowMap) {
- return computeNewConfigurationLocked();
+ Configuration config = computeNewConfigurationLocked();
+ if (config == null && mWaitingForConfig) {
+ // Nothing changed but we are waiting for something... stop that!
+ mWaitingForConfig = false;
+ performLayoutAndPlaceSurfacesLocked();
+ }
+ return config;
}
}
@@ -5917,7 +6024,7 @@
* ordinary dispatch. */
public boolean interceptKeyBeforeDispatching(
InputWindowHandle focus, KeyEvent event, int policyFlags) {
- WindowState windowState = (WindowState) focus.windowState;
+ WindowState windowState = focus != null ? (WindowState) focus.windowState : null;
return mPolicy.interceptKeyBeforeDispatching(windowState, event, policyFlags);
}
@@ -5925,7 +6032,7 @@
* the application did not handle. */
public KeyEvent dispatchUnhandledKey(
InputWindowHandle focus, KeyEvent event, int policyFlags) {
- WindowState windowState = (WindowState) focus.windowState;
+ WindowState windowState = focus != null ? (WindowState) focus.windowState : null;
return mPolicy.dispatchUnhandledKey(windowState, event, policyFlags);
}
@@ -6474,6 +6581,7 @@
// Make the surface visible at the proper location
final Surface surface = mDragState.mSurface;
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION performDrag");
Surface.openTransaction();
try {
surface.setPosition((int)(touchX - thumbCenterX),
@@ -6483,6 +6591,7 @@
surface.show();
} finally {
Surface.closeTransaction();
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION performDrag");
}
}
@@ -6496,24 +6605,28 @@
}
synchronized (mWindowMap) {
- if (mDragState.mToken != token) {
- Slog.w(TAG, "Invalid drop-result claim by " + window);
- throw new IllegalStateException("reportDropResult() by non-recipient");
+ long ident = Binder.clearCallingIdentity();
+ try {
+ if (mDragState.mToken != token) {
+ Slog.w(TAG, "Invalid drop-result claim by " + window);
+ throw new IllegalStateException("reportDropResult() by non-recipient");
+ }
+
+ // The right window has responded, even if it's no longer around,
+ // so be sure to halt the timeout even if the later WindowState
+ // lookup fails.
+ mH.removeMessages(H.DRAG_END_TIMEOUT, window.asBinder());
+ WindowState callingWin = windowForClientLocked(null, window, false);
+ if (callingWin == null) {
+ Slog.w(TAG, "Bad result-reporting window " + window);
+ return; // !!! TODO: throw here?
+ }
+
+ mDragState.mDragResult = consumed;
+ mDragState.endDragLw();
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
-
- // The right window has responded, even if it's no longer around,
- // so be sure to halt the timeout even if the later WindowState
- // lookup fails.
- mH.removeMessages(H.DRAG_END_TIMEOUT, window.asBinder());
-
- WindowState callingWin = windowForClientLocked(null, window, false);
- if (callingWin == null) {
- Slog.w(TAG, "Bad result-reporting window " + window);
- return; // !!! TODO: throw here?
- }
-
- mDragState.mDragResult = consumed;
- mDragState.endDragLw();
}
}
@@ -6801,6 +6914,10 @@
// Is this window now (or just being) removed?
boolean mRemoved;
+ // Temp for keeping track of windows that have been removed when
+ // rebuilding window list.
+ boolean mRebuilding;
+
// For debugging, this is the last information given to the surface flinger.
boolean mSurfaceShown;
int mSurfaceX, mSurfaceY, mSurfaceW, mSurfaceH;
@@ -6853,6 +6970,7 @@
+ TYPE_LAYER_OFFSET;
mSubLayer = mPolicy.subWindowTypeToLayerLw(a.type);
mAttachedWindow = attachedWindow;
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + this + " to " + mAttachedWindow);
mAttachedWindow.mChildWindows.add(this);
mLayoutAttached = mAttrs.type !=
WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
@@ -7158,9 +7276,8 @@
+ ", set left=" + mFrame.left + " top=" + mFrame.top
+ ", animLayer=" + mAnimLayer);
if (SHOW_TRANSACTIONS) {
- Slog.i(TAG, ">>> OPEN TRANSACTION");
- if (SHOW_TRANSACTIONS) logSurface(this,
- "CREATE pos=(" + mFrame.left + "," + mFrame.top + ") (" +
+ Slog.i(TAG, ">>> OPEN TRANSACTION createSurfaceLocked");
+ logSurface(this, "CREATE pos=(" + mFrame.left + "," + mFrame.top + ") (" +
mFrame.width() + "x" + mFrame.height() + "), layer=" +
mAnimLayer + " HIDE", null);
}
@@ -7185,8 +7302,8 @@
}
mLastHidden = true;
} finally {
- if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION");
Surface.closeTransaction();
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION createSurfaceLocked");
}
if (localLOGV) Slog.v(
TAG, "Created surface " + this);
@@ -7858,6 +7975,7 @@
disposeInputChannel();
if (mAttachedWindow != null) {
+ if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Removing " + this + " from " + mAttachedWindow);
mAttachedWindow.mChildWindows.remove(this);
}
destroySurfaceLocked();
@@ -9107,12 +9225,18 @@
int lastWallpaper = -1;
int numRemoved = 0;
+ if (mRebuildTmp.length < NW) {
+ mRebuildTmp = new WindowState[NW+10];
+ }
+
// First remove all existing app windows.
i=0;
while (i < NW) {
WindowState w = mWindows.get(i);
if (w.mAppToken != null) {
WindowState win = mWindows.remove(i);
+ win.mRebuilding = true;
+ mRebuildTmp[numRemoved] = win;
mWindowsChanged = true;
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
"Rebuild removing window: " + win);
@@ -9150,6 +9274,21 @@
if (i != numRemoved) {
Slog.w(TAG, "Rebuild removed " + numRemoved
+ " windows but added " + i);
+ for (i=0; i<numRemoved; i++) {
+ WindowState ws = mRebuildTmp[i];
+ if (ws.mRebuilding) {
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw);
+ ws.dump(pw, "");
+ pw.flush();
+ Slog.w(TAG, "This window was lost: " + ws);
+ Slog.w(TAG, sw.toString());
+ }
+ }
+ Slog.w(TAG, "Current app token list:");
+ dumpAppTokensLocked();
+ Slog.w(TAG, "Final window list:");
+ dumpWindowsLocked();
}
}
@@ -9222,7 +9361,7 @@
try {
if (mForceRemoves != null) {
recoveringMemory = true;
- // Wait a little it for things to settle down, and off we go.
+ // Wait a little bit for things to settle down, and off we go.
for (int i=0; i<mForceRemoves.size(); i++) {
WindowState ws = mForceRemoves.get(i);
Slog.i(TAG, "Force removing: " + ws);
@@ -9245,14 +9384,17 @@
try {
performLayoutAndPlaceSurfacesLockedInner(recoveringMemory);
- int i = mPendingRemove.size()-1;
- if (i >= 0) {
- while (i >= 0) {
- WindowState w = mPendingRemove.get(i);
- removeWindowInnerLocked(w.mSession, w);
- i--;
+ int N = mPendingRemove.size();
+ if (N > 0) {
+ if (mPendingRemoveTmp.length < N) {
+ mPendingRemoveTmp = new WindowState[N+10];
}
+ mPendingRemove.toArray(mPendingRemoveTmp);
mPendingRemove.clear();
+ for (int i=0; i<N; i++) {
+ WindowState w = mPendingRemoveTmp[i];
+ removeWindowInnerLocked(w.mSession, w);
+ }
mInLayout = false;
assignLayersLocked();
@@ -9430,7 +9572,7 @@
createWatermark = true;
}
- if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION");
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION performLayoutAndPlaceSurfaces");
Surface.openTransaction();
@@ -9468,7 +9610,7 @@
}
if ((changes&WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) {
if (DEBUG_LAYOUT) Slog.v(TAG, "Computing new config from layout");
- if (updateOrientationFromAppTokensLocked()) {
+ if (updateOrientationFromAppTokensLocked(true)) {
mLayoutNeeded = true;
mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
}
@@ -9696,12 +9838,9 @@
if (tokenMayBeDrawn) {
// See if any windows have been drawn, so they (and others
// associated with them) can now be shown.
- final int NT = mTokenList.size();
+ final int NT = mAppTokens.size();
for (i=0; i<NT; i++) {
- AppWindowToken wtoken = mTokenList.get(i).appWindowToken;
- if (wtoken == null) {
- continue;
- }
+ AppWindowToken wtoken = mAppTokens.get(i);
if (wtoken.freezingScreen) {
int numInteresting = wtoken.numInterestingWindows;
if (numInteresting > 0 && wtoken.numDrawnWindows >= numInteresting) {
@@ -9927,7 +10066,8 @@
// This has changed the visibility of windows, so perform
// a new layout to get them all up-to-date.
- changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT;
+ changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT
+ | WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG;
mLayoutNeeded = true;
if (!moveInputMethodWindowsIfNeededLocked(true)) {
assignLayersLocked();
@@ -10153,7 +10293,7 @@
// as running out of memory), don't take down the
// entire system.
Slog.e(TAG, "Failure updating surface of " + w
- + "size=(" + width + "x" + height
+ + " size=(" + width + "x" + height
+ "), pos=(" + w.mShownFrame.left
+ "," + w.mShownFrame.top + ")", e);
if (!recoveringMemory) {
@@ -10504,8 +10644,6 @@
}
mBlurShown = false;
}
-
- if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION");
} catch (RuntimeException e) {
Slog.e(TAG, "Unhandled exception in Window Manager", e);
}
@@ -10514,6 +10652,8 @@
Surface.closeTransaction();
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces");
+
if (mWatermark != null) {
mWatermark.drawIfNeeded();
}
@@ -10603,6 +10743,8 @@
// soon as their animations are complete
token.animation = null;
token.animating = false;
+ if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG,
+ "performLayout: App token exiting now removed" + token);
mAppTokens.remove(token);
mExitingAppTokens.remove(i);
}
@@ -10714,7 +10856,7 @@
}
return true;
} catch (RuntimeException e) {
- Slog.w(TAG, "Failure showing surface " + win.mSurface + " in " + win);
+ Slog.w(TAG, "Failure showing surface " + win.mSurface + " in " + win, e);
}
reclaimSomeSurfaceMemoryLocked(win, "show");
@@ -10749,6 +10891,7 @@
+ " token=" + win.mToken
+ " pid=" + ws.mSession.mPid
+ " uid=" + ws.mSession.mUid);
+ if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null);
ws.mSurface.destroy();
ws.mSurfaceShown = false;
ws.mSurface = null;
@@ -10756,10 +10899,11 @@
i--;
N--;
leakedSurface = true;
- } else if (win.mAppToken != null && win.mAppToken.clientHidden) {
+ } else if (ws.mAppToken != null && ws.mAppToken.clientHidden) {
Slog.w(TAG, "LEAKED SURFACE (app token hidden): "
+ ws + " surface=" + ws.mSurface
+ " token=" + win.mAppToken);
+ if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null);
ws.mSurface.destroy();
ws.mSurfaceShown = false;
ws.mSurface = null;
@@ -10797,6 +10941,7 @@
// surface and ask the app to request another one.
Slog.w(TAG, "Looks like we have reclaimed some memory, clearing surface for retry.");
if (surface != null) {
+ if (SHOW_TRANSACTIONS) logSurface(win, "RECOVER DESTROY", null);
surface.destroy();
win.mSurfaceShown = false;
win.mSurface = null;
@@ -10924,7 +11069,7 @@
return result;
}
- private void startFreezingDisplayLocked() {
+ private void startFreezingDisplayLocked(boolean inTransaction) {
if (mDisplayFrozen) {
return;
}
@@ -10966,7 +11111,7 @@
}
if (mScreenRotationAnimation == null) {
mScreenRotationAnimation = new ScreenRotationAnimation(mContext,
- mDisplay, mFxSession);
+ mDisplay, mFxSession, inTransaction);
}
} else {
Surface.freezeDisplay(0);
@@ -11007,7 +11152,7 @@
// to avoid inconsistent states. However, something interesting
// could have actually changed during that time so re-evaluate it
// now to catch that.
- if (updateOrientationFromAppTokensLocked()) {
+ if (updateOrientationFromAppTokensLocked(false)) {
mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
}
@@ -11312,14 +11457,6 @@
token.dump(pw, " ");
}
}
- if (mTokenList.size() > 0) {
- pw.println(" ");
- pw.println(" Window token list:");
- for (int i=0; i<mTokenList.size(); i++) {
- pw.print(" #"); pw.print(i); pw.print(": ");
- pw.println(mTokenList.get(i));
- }
- }
if (mWallpaperTokens.size() > 0) {
pw.println(" ");
pw.println(" Wallpaper tokens:");
@@ -11443,6 +11580,8 @@
} else {
pw.println(" NO DISPLAY");
}
+ pw.println(" Policy:");
+ mPolicy.dump(" ", fd, pw, args);
}
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 761dcd1..17ef88d 100755
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2612,6 +2612,7 @@
if (localLOGV) Slog.v(
TAG, "Removing this entry! frozen=" + r.haveState
+ " finishing=" + r.finishing);
+ r.makeFinishing();
mMainStack.mHistory.remove(i);
r.inHistory = false;
@@ -6607,7 +6608,7 @@
if (r.state == ActivityState.RESUMED
|| r.state == ActivityState.PAUSING
|| r.state == ActivityState.PAUSED) {
- if (!r.isHomeActivity) {
+ if (!r.isHomeActivity || mHomeProcess != r.app) {
Slog.w(TAG, " Force finishing activity "
+ r.intent.getComponent().flattenToShortString());
r.stack.finishActivityLocked(r, index,
diff --git a/services/java/com/android/server/am/ActivityRecord.java b/services/java/com/android/server/am/ActivityRecord.java
index 72ea7ce..e29da1c 100644
--- a/services/java/com/android/server/am/ActivityRecord.java
+++ b/services/java/com/android/server/am/ActivityRecord.java
@@ -321,6 +321,15 @@
}
}
+ void makeFinishing() {
+ if (!finishing) {
+ finishing = true;
+ if (task != null) {
+ task.numActivities--;
+ }
+ }
+ }
+
UriPermissionOwner getUriPermissionsLocked() {
if (uriPermissions == null) {
uriPermissions = new UriPermissionOwner(service, this);
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index eee9f7e..bc00478 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -50,7 +50,6 @@
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Binder;
-import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
@@ -3071,7 +3070,7 @@
return false;
}
- r.finishing = true;
+ r.makeFinishing();
EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY,
System.identityHashCode(r),
r.task.taskId, r.shortComponentName, reason);
@@ -3276,6 +3275,7 @@
private final void removeActivityFromHistoryLocked(ActivityRecord r) {
if (r.state != ActivityState.DESTROYED) {
+ r.makeFinishing();
mHistory.remove(r);
r.inHistory = false;
r.state = ActivityState.DESTROYED;
@@ -3440,6 +3440,7 @@
ActivityRecord hr = (ActivityRecord)mHistory.get(i);
if (hr.isHomeActivity) {
homeTask = hr.task;
+ break;
}
}
if (homeTask != null) {
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index fc1b2c4..134b91e 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -1165,7 +1165,7 @@
IConnectivityManager.Stub.asInterface(b);
try {
service.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
- (mDunRequired? Phone.FEATURE_ENABLE_DUN :
+ (mDunRequired? Phone.FEATURE_ENABLE_DUN_ALWAYS :
Phone.FEATURE_ENABLE_HIPRI));
} catch (Exception e) {
return false;
@@ -1354,10 +1354,11 @@
}
class TetherModeAliveState extends TetherMasterUtilState {
- boolean mTryCell = WAIT_FOR_NETWORK_TO_SETTLE;
+ boolean mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE;
@Override
public void enter() {
- mTryCell = WAIT_FOR_NETWORK_TO_SETTLE; // first pass lets just see what we have.
+ mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE; // better try something first pass
+ // or crazy tests cases will fail
chooseUpstreamType(mTryCell);
mTryCell = !mTryCell;
turnOnMasterTetherSettings(); // may transition us out
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index c982ea5..967ff1a 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -144,6 +144,11 @@
return bclient;
}
+sp<IGraphicBufferAlloc> SurfaceFlinger::createGraphicBufferAlloc()
+{
+ sp<GraphicBufferAlloc> gba(new GraphicBufferAlloc());
+ return gba;
+}
const GraphicPlane& SurfaceFlinger::graphicPlane(int dpy) const
{
@@ -2267,25 +2272,6 @@
// ---------------------------------------------------------------------------
-sp<GraphicBuffer> SurfaceFlinger::createGraphicBuffer(uint32_t w, uint32_t h,
- PixelFormat format, uint32_t usage) const {
- // XXX: HACK HACK HACK!!! This should NOT be static, but it is to fix a
- // race between SurfaceFlinger unref'ing the buffer and the client ref'ing
- // it.
- static sp<GraphicBuffer> graphicBuffer(new GraphicBuffer(w, h, format, usage));
- status_t err = graphicBuffer->initCheck();
- if (err != 0) {
- LOGE("createGraphicBuffer: init check failed: %d", err);
- return 0;
- } else if (graphicBuffer->handle == 0) {
- LOGE("createGraphicBuffer: unable to create GraphicBuffer");
- return 0;
- }
- return graphicBuffer;
-}
-
-// ---------------------------------------------------------------------------
-
Client::Client(const sp<SurfaceFlinger>& flinger)
: mFlinger(flinger), mNameGenerator(1)
{
@@ -2465,6 +2451,39 @@
// ---------------------------------------------------------------------------
+GraphicBufferAlloc::GraphicBufferAlloc() {}
+
+GraphicBufferAlloc::~GraphicBufferAlloc() {}
+
+sp<GraphicBuffer> GraphicBufferAlloc::createGraphicBuffer(uint32_t w, uint32_t h,
+ PixelFormat format, uint32_t usage) {
+ sp<GraphicBuffer> graphicBuffer(new GraphicBuffer(w, h, format, usage));
+ status_t err = graphicBuffer->initCheck();
+ if (err != 0) {
+ LOGE("createGraphicBuffer: init check failed: %d", err);
+ return 0;
+ } else if (graphicBuffer->handle == 0) {
+ LOGE("createGraphicBuffer: unable to create GraphicBuffer");
+ return 0;
+ }
+ Mutex::Autolock _l(mLock);
+ mBuffers.add(graphicBuffer);
+ return graphicBuffer;
+}
+
+void GraphicBufferAlloc::freeAllGraphicBuffersExcept(int bufIdx) {
+ Mutex::Autolock _l(mLock);
+ if (0 <= bufIdx && bufIdx < mBuffers.size()) {
+ sp<GraphicBuffer> b(mBuffers[bufIdx]);
+ mBuffers.clear();
+ mBuffers.add(b);
+ } else {
+ mBuffers.clear();
+ }
+}
+
+// ---------------------------------------------------------------------------
+
GraphicPlane::GraphicPlane()
: mHw(0)
{
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 48642d4..2f2977a 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -34,6 +34,7 @@
#include <ui/PixelFormat.h>
#include <surfaceflinger/ISurfaceComposer.h>
#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <surfaceflinger/IGraphicBufferAlloc.h>
#include "Barrier.h"
#include "Layer.h"
@@ -119,6 +120,21 @@
sp<SurfaceFlinger> mFlinger;
};
+class GraphicBufferAlloc : public BnGraphicBufferAlloc
+{
+public:
+ GraphicBufferAlloc();
+ virtual ~GraphicBufferAlloc();
+
+ virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
+ PixelFormat format, uint32_t usage);
+ virtual void freeAllGraphicBuffersExcept(int bufIdx);
+
+private:
+ Vector<sp<GraphicBuffer> > mBuffers;
+ Mutex mLock;
+};
+
// ---------------------------------------------------------------------------
class GraphicPlane
@@ -184,6 +200,7 @@
// ISurfaceComposer interface
virtual sp<ISurfaceComposerClient> createConnection();
virtual sp<ISurfaceComposerClient> createClientConnection();
+ virtual sp<IGraphicBufferAlloc> createGraphicBufferAlloc();
virtual sp<IMemoryHeap> getCblk() const;
virtual void bootFinished();
virtual void openGlobalTransaction();
@@ -322,8 +339,6 @@
status_t electronBeamOnAnimationImplLocked();
status_t renderScreenToTextureLocked(DisplayID dpy,
GLuint* textureName, GLfloat* uOut, GLfloat* vOut);
- sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
- PixelFormat format, uint32_t usage) const;
friend class FreezeLock;
sp<FreezeLock> getFreezeLock() const;
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 737342f..2343dd8 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -358,7 +358,7 @@
return new ArrayList<DataConnection>(mDataConnections.values());
}
- protected boolean isApnTypeActive(String type) {
+ public boolean isApnTypeActive(String type) {
// TODO: support simultaneous with List instead
return mActiveApn != null && mActiveApn.canHandleType(type);
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index 1e77589..a1d5121 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -610,7 +610,8 @@
// If we're out of service, open TCP sockets may still work
// but no data will flow
ret = DataState.DISCONNECTED;
- } else if (mDataConnection.isApnTypeEnabled(apnType) == false) {
+ } else if (mDataConnection.isApnTypeEnabled(apnType) == false ||
+ mDataConnection.isApnTypeActive(apnType) == false) {
ret = DataState.DISCONNECTED;
} else {
switch (mDataConnection.getState()) {
diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
index 628f11a..e8ad0f2 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
@@ -300,7 +300,8 @@
// If we're out of service, open TCP sockets may still work
// but no data will flow
ret = DataState.DISCONNECTED;
- } else if (mDataConnection.isApnTypeEnabled(apnType) == false) {
+ } else if (mDataConnection.isApnTypeEnabled(apnType) == false ||
+ mDataConnection.isApnTypeActive(apnType) == false) {
ret = DataState.DISCONNECTED;
} else { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */
switch (mDataConnection.getState()) {
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
index 4982c46..e5a46b9 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
@@ -93,11 +93,8 @@
final VMRuntime runtime = VMRuntime.getRuntime();
runtime.gcSoftReferences();
- runtime.runFinalizationSync();
runtime.gcSoftReferences();
- runtime.runFinalizationSync();
runtime.gcSoftReferences();
- runtime.runFinalizationSync();
Runtime.getRuntime().runFinalization();
Runtime.getRuntime().gc();
Runtime.getRuntime().gc();
diff --git a/tests/DumpRenderTree2/assets/run_layout_tests.py b/tests/DumpRenderTree2/assets/run_layout_tests.py
index 0dfd229..3b8c09a 100755
--- a/tests/DumpRenderTree2/assets/run_layout_tests.py
+++ b/tests/DumpRenderTree2/assets/run_layout_tests.py
@@ -42,6 +42,7 @@
cmd += "-w com.android.dumprendertree2/com.android.dumprendertree2.scriptsupport.ScriptTestRunner"
logging.info("Running the tests...")
+ logging.debug("Command = %s" % cmd)
(stdoutdata, stderrdata) = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
if re.search("^INSTRUMENTATION_STATUS_CODE: -1", stdoutdata, re.MULTILINE) != None:
logging.info("Failed to run the tests. Is DumpRenderTree2 installed on the device?")
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java
index 6c33a21..5360e3d 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java
@@ -68,8 +68,8 @@
public void loadTestExpectations() {
URL url = null;
try {
- url = new URL(ForwarderManager.getHostSchemePort(false) + "LayoutTests/" +
- TEST_EXPECTATIONS_TXT_PATH);
+ url = new URL(ForwarderManager.getHostSchemePort(false) +
+ "LayoutTests/" + TEST_EXPECTATIONS_TXT_PATH);
} catch (MalformedURLException e) {
assert false;
}
@@ -78,9 +78,14 @@
InputStream inputStream = null;
BufferedReader bufferedReader = null;
try {
- bufferedReader = new BufferedReader(new StringReader(new String(
- FsUtils.readDataFromUrl(url))));
-
+ byte[] httpAnswer = FsUtils.readDataFromUrl(url);
+ if (httpAnswer == null) {
+ Log.w(LOG_TAG, "loadTestExpectations(): File not found: " +
+ TEST_EXPECTATIONS_TXT_PATH);
+ return;
+ }
+ bufferedReader = new BufferedReader(new StringReader(
+ new String(httpAnswer)));
String line;
String entry;
String[] parts;
@@ -113,7 +118,8 @@
path = trimTrailingSlashIfPresent(parts[0]);
/** Split on whitespace */
- tokens = new HashSet<String>(Arrays.asList(parts[1].split("\\s", 0)));
+ tokens = new HashSet<String>(Arrays.asList(
+ parts[1].split("\\s", 0)));
/** Chose the right collections to add to */
if (tokens.contains(TOKEN_CRASH)) {
@@ -138,8 +144,6 @@
bufferedReader.close();
}
}
- } catch (FileNotFoundException e) {
- Log.w(LOG_TAG, "reloadConfiguration(): File not found: " + e.getMessage());
} catch (IOException e) {
Log.e(LOG_TAG, "url=" + url, e);
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java
index eb9487e..7020d9c 100644
--- a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java
+++ b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java
@@ -16,9 +16,9 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceDensity;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import android.content.res.AssetManager;
import android.content.res.Resources;
@@ -352,7 +352,7 @@
If the exception happened on open, bm will be null.
If it happened on close, bm is still valid.
*/
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
String.format("Error decoding bitmap of id 0x%x", id), e);
} finally {
try {
@@ -452,7 +452,7 @@
Bitmap bm;
if (is instanceof AssetManager.AssetInputStream) {
- Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
"Bitmap.decodeStream: " +
"InputStream is unsupported (AssetManager.AssetInputStream)");
return null;
diff --git a/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java
index 9d62415..03d65b2 100644
--- a/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.graphics.Shader.TileMode;
@@ -113,7 +113,7 @@
try {
canvasMatrix = xform.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in BitmapShader", e);
canvasMatrix = new java.awt.geom.AffineTransform();
}
@@ -122,7 +122,7 @@
try {
localMatrix = localMatrix.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in BitmapShader", e);
localMatrix = new java.awt.geom.AffineTransform();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
index 6acae7c..18bf4b5 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
@@ -16,9 +16,9 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceDensity;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.graphics.Bitmap.Config;
@@ -249,7 +249,7 @@
/*package*/ static boolean nativeCompress(int nativeBitmap, int format, int quality,
OutputStream stream, byte[] tempStorage) {
- Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
"Bitmap.compress() is not supported");
return true;
}
@@ -385,7 +385,7 @@
/*package*/ static Bitmap nativeCreateFromParcel(Parcel p) {
// This is only called by Bitmap.CREATOR (Parcelable.Creator<Bitmap>), which is only
// used during aidl call so really this should not be called.
- Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
"AIDL is not suppored, and therefore Bitmaps cannot be created from parcels.");
return null;
}
@@ -394,7 +394,7 @@
int density, Parcel p) {
// This is only called when sending a bitmap through aidl, so really this should not
// be called.
- Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
"AIDL is not suppored, and therefore Bitmaps cannot be written to parcels.");
return false;
}
@@ -410,7 +410,7 @@
Paint_Delegate paint = Paint_Delegate.getDelegate(nativePaint);
if (paint != null && paint.getMaskFilter() != null) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MASKFILTER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MASKFILTER,
"MaskFilter not supported in Bitmap.extractAlpha",
null);
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index cafe52d..8bfaf40 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import com.android.layoutlib.bridge.impl.GcSnapshot;
@@ -423,7 +423,7 @@
if (matrixDelegate.hasPerspective()) {
assert false;
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_AFFINE,
"android.graphics.Canvas#setMatrix(android.graphics.Matrix) only " +
"supports affine transformations.", null);
}
@@ -493,7 +493,7 @@
}
if (filterDelegate.isSupported() == false) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_DRAWFILTER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_DRAWFILTER,
filterDelegate.getSupportMessage(), null);
}
}
@@ -1009,7 +1009,7 @@
/*package*/ static void native_drawTextRun(int nativeCanvas, char[] text,
int start, int count, int contextStart, int contextCount,
float x, float y, int flags, int paint) {
- native_drawText(nativeCanvas, text, 0, count, x, y, flags, paint);
+ native_drawText(nativeCanvas, text, start, count, x, y, flags, paint);
}
/*package*/ static void native_drawPosText(int nativeCanvas,
diff --git a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
index 37d2c81..aab310a 100644
--- a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.graphics.Shader.TileMode;
@@ -136,7 +136,7 @@
try {
canvasMatrix = xform.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in LinearGradient", e);
canvasMatrix = new java.awt.geom.AffineTransform();
}
@@ -145,7 +145,7 @@
try {
localMatrix = localMatrix.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in LinearGradient", e);
localMatrix = new java.awt.geom.AffineTransform();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
index 6d6c599..0c934fc 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
@@ -17,8 +17,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.graphics.Matrix.ScaleToFit;
@@ -613,7 +613,7 @@
/*package*/ static boolean native_setPolyToPoly(int native_object, float[] src, int srcIndex,
float[] dst, int dstIndex, int pointCount) {
// FIXME
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Matrix.setPolyToPoly is not supported.",
null);
return false;
diff --git a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
index 385def3..049ac45 100644
--- a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import com.android.layoutlib.bridge.impl.GcSnapshot;
import com.android.ninepatch.NinePatchChunk;
@@ -197,11 +197,11 @@
sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk));
}
} catch (IOException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to deserialize NinePatchChunk content.", e);
return null;
} catch (ClassNotFoundException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to deserialize NinePatchChunk class.", e);
return null;
} finally {
diff --git a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
index 7db3486..67afeca 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.graphics.Paint.FontMetrics;
@@ -180,7 +180,7 @@
return stroke;
}
} else {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_PATHEFFECT,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_PATHEFFECT,
effectDelegate.getSupportMessage(),
null);
}
@@ -376,7 +376,7 @@
/*package*/ static void nSetShadowLayer(Paint thisPaint, float radius, float dx, float dy,
int color) {
// FIXME
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Paint.setShadowLayer is not supported.", null);
}
@@ -693,7 +693,7 @@
// since none of those are supported, display a fidelity warning right away
ColorFilter_Delegate filterDelegate = delegate.getColorFilter();
if (filterDelegate != null && filterDelegate.isSupported() == false) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_COLORFILTER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_COLORFILTER,
filterDelegate.getSupportMessage(), null);
}
@@ -732,7 +732,7 @@
// since none of those are supported, display a fidelity warning right away
MaskFilter_Delegate filterDelegate = delegate.getMaskFilter();
if (filterDelegate != null && filterDelegate.isSupported() == false) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MASKFILTER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MASKFILTER,
filterDelegate.getSupportMessage(), null);
}
@@ -763,7 +763,7 @@
// since none of those are supported, display a fidelity warning right away
Rasterizer_Delegate rasterizerDelegate = delegate.getRasterizer();
if (rasterizerDelegate != null && rasterizerDelegate.isSupported() == false) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_RASTERIZER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_RASTERIZER,
rasterizerDelegate.getSupportMessage(), null);
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
index ad9c9f9..62ea622 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.graphics.Path.Direction;
@@ -696,7 +696,7 @@
public void transform(Matrix_Delegate matrix, Path_Delegate dst) {
if (matrix.hasPerspective()) {
assert false;
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_AFFINE,
"android.graphics.Path#transform() only " +
"supports affine transformations.", null);
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java
index b09806c..314dcff 100644
--- a/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import java.awt.AlphaComposite;
@@ -73,7 +73,7 @@
}
}
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
String.format("Unknown PorterDuff.Mode: %d", mode));
assert false;
return PorterDuff.Mode.SRC_OVER;
@@ -116,7 +116,7 @@
return AlphaComposite.getInstance(AlphaComposite.XOR, falpha);
}
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_BROKEN,
String.format("Unsupported PorterDuff Mode: %s", mode.name()),
null);
diff --git a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
index c86e808..2c26175 100644
--- a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.graphics.Shader.TileMode;
@@ -125,7 +125,7 @@
try {
canvasMatrix = xform.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in RadialGradient", e);
canvasMatrix = new java.awt.geom.AffineTransform();
}
@@ -134,7 +134,7 @@
try {
localMatrix = localMatrix.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in RadialGradient", e);
localMatrix = new java.awt.geom.AffineTransform();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
index b587563..f86c56c 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import android.os.Parcel;
@@ -416,7 +416,7 @@
/*package*/ static int nativeCreateFromParcel(Parcel p) {
// This is only called by Region.CREATOR (Parcelable.Creator<Region>), which is only
// used during aidl call so really this should not be called.
- Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
"AIDL is not suppored, and therefore Regions cannot be created from parcels.");
return 0;
}
@@ -425,7 +425,7 @@
Parcel p) {
// This is only called when sending a region through aidl, so really this should not
// be called.
- Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
"AIDL is not suppored, and therefore Regions cannot be written to parcels.");
return false;
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java
index 9a84bdd..e812f7f 100644
--- a/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
/**
@@ -117,7 +117,7 @@
try {
canvasMatrix = xform.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in SweepGradient", e);
canvasMatrix = new java.awt.geom.AffineTransform();
}
@@ -126,7 +126,7 @@
try {
localMatrix = localMatrix.createInverse();
} catch (java.awt.geom.NoninvertibleTransformException e) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
"Unable to inverse matrix in SweepGradient", e);
localMatrix = new java.awt.geom.AffineTransform();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
index c7d5490..44275d6 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
@@ -16,8 +16,8 @@
package android.graphics;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import com.android.layoutlib.bridge.impl.FontLoader;
@@ -126,13 +126,13 @@
}
/*package*/ static synchronized int nativeCreateFromAsset(AssetManager mgr, String path) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Typeface.createFromAsset() is not supported.", null);
return 0;
}
/*package*/ static synchronized int nativeCreateFromFile(String path) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Typeface.createFromFile() is not supported.", null);
return 0;
}
diff --git a/tools/layoutlib/bridge/src/android/view/SurfaceView.java b/tools/layoutlib/bridge/src/android/view/SurfaceView.java
index f7db98a..ce32da9 100644
--- a/tools/layoutlib/bridge/src/android/view/SurfaceView.java
+++ b/tools/layoutlib/bridge/src/android/view/SurfaceView.java
@@ -16,7 +16,7 @@
package android.view;
-import com.android.layoutlib.bridge.android.MockView;
+import com.android.layoutlib.bridge.MockView;
import android.content.Context;
import android.graphics.Canvas;
diff --git a/tools/layoutlib/bridge/src/android/webkit/WebView.java b/tools/layoutlib/bridge/src/android/webkit/WebView.java
index a20a9d1..3b66188 100644
--- a/tools/layoutlib/bridge/src/android/webkit/WebView.java
+++ b/tools/layoutlib/bridge/src/android/webkit/WebView.java
@@ -16,7 +16,7 @@
package android.webkit;
-import com.android.layoutlib.bridge.android.MockView;
+import com.android.layoutlib.bridge.MockView;
import android.content.Context;
import android.graphics.Bitmap;
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 e42f51c..6e9f4d5 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -262,7 +262,7 @@
}
} catch (Throwable throwable) {
if (log != null) {
- log.error(BridgeConstants.TAG_BROKEN,
+ log.error(LayoutLog.TAG_BROKEN,
"Failed to load com.android.internal.R from the layout library jar",
throwable);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
index f8e7592..194687e 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
@@ -64,18 +64,4 @@
public final static String MATCH_PARENT = "match_parent";
public final static String FILL_PARENT = "fill_parent";
public final static String WRAP_CONTENT = "wrap_content";
-
- public final static String TAG_UNSUPPORTED = "unsupported";
- public static final String TAG_BROKEN = "broken";
- public final static String TAG_RESOURCES_RESOLVE = "resources.resolve";
- public final static String TAG_RESOURCES_READ = "resources.read";
- public final static String TAG_RESOURCES_FORMAT = "resources.format";
- public static final String TAG_MATRIX = "matrix";
- public final static String TAG_MASKFILTER = "maskfilter";
- public static final String TAG_DRAWFILTER = "drawfilter";
- public static final String TAG_PATHEFFECT = "patheffect";
- public static final String TAG_COLORFILTER = "colorfilter";
- public static final String TAG_RASTERIZER = "rasterizer";
- public static final String TAG_SHADER = "shader";
- public static final String TAG_XFERMODE = "xfermode";
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
index 4c4eedb..bc2301d 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
@@ -22,10 +22,12 @@
import com.android.ide.common.rendering.api.RenderSession;
import com.android.ide.common.rendering.api.Result;
import com.android.ide.common.rendering.api.ViewInfo;
+import com.android.ide.common.rendering.api.Result.Status;
import com.android.layoutlib.bridge.impl.RenderSessionImpl;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewParent;
import java.awt.image.BufferedImage;
import java.util.Map;
@@ -63,6 +65,43 @@
}
@Override
+ public Result getProperty(Object objectView, String propertyName) {
+ // TODO Auto-generated method stub
+ return super.getProperty(objectView, propertyName);
+ }
+
+ @Override
+ public Result setProperty(Object objectView, String propertyName, String propertyValue) {
+ // TODO Auto-generated method stub
+ return super.setProperty(objectView, propertyName, propertyValue);
+ }
+
+ @Override
+ public Result getViewParent(Object viewObject) {
+ if (viewObject instanceof View) {
+ return Status.SUCCESS.createResult(((View)viewObject).getParent());
+ }
+
+ throw new IllegalArgumentException("viewObject is not a View");
+ }
+
+ @Override
+ public Result getViewIndex(Object viewObject) {
+ if (viewObject instanceof View) {
+ View view = (View) viewObject;
+ ViewParent parentView = view.getParent();
+
+ if (parentView instanceof ViewGroup) {
+ Status.SUCCESS.createResult(((ViewGroup) parentView).indexOfChild(view));
+ }
+
+ return Status.SUCCESS.createResult();
+ }
+
+ throw new IllegalArgumentException("viewObject is not a View");
+ }
+
+ @Override
public Result render(long timeout) {
try {
Bridge.prepareThread();
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/MockView.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java
similarity index 96%
rename from tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/MockView.java
rename to tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java
index e5bddcb..1ca3182 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/MockView.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.layoutlib.bridge.android;
+package com.android.layoutlib.bridge;
import android.content.Context;
import android.graphics.Canvas;
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 11a0552..dc027b7 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
@@ -17,6 +17,7 @@
package com.android.layoutlib.bridge.android;
import com.android.ide.common.rendering.api.IProjectCallback;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.rendering.api.StyleResourceValue;
import com.android.layoutlib.bridge.Bridge;
@@ -336,7 +337,7 @@
isPlatformFile = false;
} else if (set != null) { // null parser is ok
// really this should not be happening since its instantiated in Bridge
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Parser is not a BridgeXmlBlockParser!");
return null;
}
@@ -706,7 +707,7 @@
// This is normal if the resource is an ID that is generated automatically.
// For other resources, we output a warning
if ("+id".equals(resType) == false && "+android:id".equals(resType) == false) { //$NON-NLS-1$ //$NON-NLS-2$
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
"Couldn't resolve resource @" +
(frameworkOnly ? "android:" : "") + resType + "/" + resName);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
index c739b4f..61ac81b 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
@@ -17,6 +17,7 @@
package com.android.layoutlib.bridge.android;
import com.android.ide.common.rendering.api.IProjectCallback;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
@@ -178,7 +179,7 @@
return inflate(bridgeParser, root);
} catch (Exception e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed to parse file " + f.getAbsolutePath(), e);
return null;
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
index eacfed6..8446a99 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
@@ -17,6 +17,7 @@
package com.android.layoutlib.bridge.android;
import com.android.ide.common.rendering.api.IProjectCallback;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
@@ -142,7 +143,7 @@
try {
return ResourceHelper.getColor(value.getValue());
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT, e.getMessage(), e);
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e);
return 0;
}
}
@@ -174,13 +175,13 @@
return ColorStateList.createFromXml(this,
new BridgeXmlBlockParser(parser, mContext, resValue.isFramework()));
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value, e);
// we'll return null below.
} catch (Exception e) {
// this is an error and not warning since the file existence is checked before
// attempting to parse it.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed to parse file " + value, e);
return null;
@@ -191,7 +192,7 @@
int color = ResourceHelper.getColor(value);
return ColorStateList.valueOf(color);
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT,
"Failed to convert " + value + " into a ColorStateList", e);
return null;
}
@@ -251,7 +252,7 @@
return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
}
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value.getValue(), e);
// we'll return null below.
} catch (FileNotFoundException e) {
@@ -286,7 +287,7 @@
return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
}
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value.getValue(), e);
// we'll return null below.
} catch (FileNotFoundException e) {
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
index 79b3a73..42f05e3 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
@@ -16,6 +16,7 @@
package com.android.layoutlib.bridge.android;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.rendering.api.StyleResourceValue;
import com.android.internal.util.XmlUtils;
@@ -206,7 +207,7 @@
if (i != null) {
result |= i.intValue();
} else {
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unknown constant \"%s\" in attribute \"%2$s\"",
keyword, mNames[index]));
@@ -237,7 +238,7 @@
try {
return Float.parseFloat(s);
} catch (NumberFormatException e) {
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to convert \"%s\" into a float in attribute \"%2$s\"",
s, mNames[index]));
@@ -270,7 +271,7 @@
try {
return ResourceHelper.getColor(s);
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT, e.getMessage(), e);
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e);
// we'll return the default value below.
}
@@ -313,13 +314,13 @@
new BridgeXmlBlockParser(parser, mContext, false));
return colorStateList;
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value, e);
return null;
} catch (Exception e) {
// this is an error and not warning since the file existence is checked before
// attempting to parse it.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed to parse file " + value, e);
return null;
@@ -330,7 +331,7 @@
int color = ResourceHelper.getColor(value);
return ColorStateList.valueOf(color);
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT, e.getMessage(), e);
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e);
}
assert false;
@@ -359,7 +360,7 @@
try {
return Integer.parseInt(s);
} catch (NumberFormatException e) {
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to convert \"%s\" into a integer in attribute \"%2$s\"",
s, mNames[index]));
@@ -409,7 +410,7 @@
}
// looks like we were unable to resolve the dimension value
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve dimension value \"%1$s\" in attribute \"%2$s\"",
s, mNames[index]));
@@ -541,7 +542,7 @@
}
// looks like we were unable to resolve the fraction value
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve fraction value \"%1$s\" in attribute \"%2$s\"",
value, mNames[index]));
@@ -653,7 +654,7 @@
return idValue.intValue();
}
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve id \"%1$s\" for attribute \"%2$s\"", value, mNames[index]));
@@ -691,7 +692,7 @@
}
// looks like we were unable to resolve the drawable
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve drawable \"%1$s\" in attribute \"%2$s\"", stringValue,
mNames[index]));
@@ -723,7 +724,7 @@
return new CharSequence[] { value };
}
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
String.format("Unknown value for getTextArray(%d) => %s", //DEBUG
index, mResourceData[index].getName())));
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
index ff46e7c..443d881 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
@@ -160,4 +160,10 @@
// pass for now.
return null;
}
+
+ public IBinder prepareDrag(IWindow arg0, boolean arg1, int arg2, int arg3, Surface arg4)
+ throws RemoteException {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
index 94075dc..b3f1fff 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
@@ -16,8 +16,8 @@
package com.android.layoutlib.bridge.impl;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import android.graphics.Bitmap_Delegate;
import android.graphics.Canvas;
@@ -729,7 +729,7 @@
customShader = true;
}
} else {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_SHADER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_SHADER,
shaderDelegate.getSupportMessage(),
null);
}
@@ -763,7 +763,7 @@
customXfermode = true;
}
} else {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_XFERMODE,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_XFERMODE,
xfermodeDelegate.getSupportMessage(),
null);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
index a690777..566d4d4 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
@@ -1045,7 +1045,7 @@
}
assert false;
- mParams.getLog().error(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ mParams.getLog().error(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format("Unable to resolve parent style name: %s", parentName));
return null;
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
index b9aa80c..4e331d1 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
@@ -17,10 +17,10 @@
package com.android.layoutlib.bridge.impl;
import com.android.ide.common.rendering.api.DensityBasedResourceValue;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceDensity;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.android.BridgeContext;
import com.android.layoutlib.bridge.android.BridgeXmlBlockParser;
import com.android.ninepatch.NinePatch;
@@ -165,7 +165,7 @@
// URL is wrong, we'll return null below
} catch (IOException e) {
// failed to read the file, we'll return null below.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed lot load " + file.getAbsolutePath(), e);
}
}
@@ -200,7 +200,7 @@
Bridge.getLog().error(null, "Failed to parse file " + value, e);
}
} else {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
String.format("File %s does not exist (or is not a file)", stringValue));
}
@@ -227,7 +227,7 @@
return new BitmapDrawable(context.getResources(), bitmap);
} catch (IOException e) {
// we'll return null below
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed lot load " + bmpFile.getAbsolutePath(), e);
}
} else {
@@ -237,7 +237,7 @@
return new ColorDrawable(color);
} catch (NumberFormatException e) {
// we'll return null below.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT,
"Failed to convert " + stringValue + " into a drawable", e);
}
}
diff --git a/tools/layoutlib/bridge/src/com/google/android/maps/MapView.java b/tools/layoutlib/bridge/src/com/google/android/maps/MapView.java
index 1ec6262..6d013bb 100644
--- a/tools/layoutlib/bridge/src/com/google/android/maps/MapView.java
+++ b/tools/layoutlib/bridge/src/com/google/android/maps/MapView.java
@@ -16,7 +16,7 @@
package com.google.android.maps;
-import com.android.layoutlib.bridge.android.MockView;
+import com.android.layoutlib.bridge.MockView;
import android.content.Context;
import android.os.Bundle;