Merge "surfaceflinger / GL extensions cleanup" into gingerbread
diff --git a/Android.mk b/Android.mk
index 84376ce..566b36f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -352,6 +352,7 @@
# The since flag (-since N.xml API_LEVEL) is used to add API Level information
# to the reference documentation. Must be in order of oldest to newest.
framework_docs_LOCAL_DROIDDOC_OPTIONS := \
+ -knowntags ./frameworks/base/docs/knowntags.txt \
-since ./frameworks/base/api/1.xml 1 \
-since ./frameworks/base/api/2.xml 2 \
-since ./frameworks/base/api/3.xml 3 \
@@ -360,10 +361,13 @@
-since ./frameworks/base/api/6.xml 6 \
-since ./frameworks/base/api/7.xml 7 \
-since ./frameworks/base/api/8.xml 8 \
- -error 1 -error 2 -warning 3 -error 4 -error 6 -error 8 -error 14 \
- -overview $(LOCAL_PATH)/core/java/overview.html
+ -werror -hide 13 \
+ -overview $(LOCAL_PATH)/core/java/overview.html
-framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:=$(call intermediates-dir-for,JAVA_LIBRARIES,framework)
+framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= $(call intermediates-dir-for,JAVA_LIBRARIES,framework)
+
+framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
+ frameworks/base/docs/knowntags.txt
sample_dir := development/samples
@@ -423,25 +427,12 @@
framework_docs_SDK_VERSION:=2.2
# release version (ie "Release x") (full releases only)
framework_docs_SDK_REL_ID:=1
- # name of current SDK directory (full releases only)
-framework_docs_SDK_CURRENT_DIR:=$(framework_docs_SDK_VERSION)_r$(framework_docs_SDK_REL_ID)
# flag to build offline docs for a preview release
framework_docs_SDK_PREVIEW:=0
-## Latest ADT version identifiers, for reference from published docs
-framework_docs_ADT_VERSION:=0.9.8
-framework_docs_ADT_DOWNLOAD:=ADT-0.9.8.zip
-framework_docs_ADT_BYTES:=8301417
-framework_docs_ADT_CHECKSUM:=27e0de800512f13feae46fb554e6ee2f
-
framework_docs_LOCAL_DROIDDOC_OPTIONS += \
-hdf sdk.version $(framework_docs_SDK_VERSION) \
- -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
- -hdf sdk.current $(framework_docs_SDK_CURRENT_DIR) \
- -hdf adt.zip.version $(framework_docs_ADT_VERSION) \
- -hdf adt.zip.download $(framework_docs_ADT_DOWNLOAD) \
- -hdf adt.zip.bytes $(framework_docs_ADT_BYTES) \
- -hdf adt.zip.checksum $(framework_docs_ADT_CHECKSUM)
+ -hdf sdk.rel.id $(framework_docs_SDK_REL_ID)
# ==== the api stubs and current.xml ===========================
include $(CLEAR_VARS)
@@ -453,6 +444,7 @@
LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
LOCAL_MODULE := api-stubs
@@ -481,6 +473,7 @@
LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
LOCAL_MODULE := doc-comment-check
@@ -508,6 +501,7 @@
LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
LOCAL_MODULE := offline-sdk
@@ -522,7 +516,7 @@
-hdf android.whichdoc offline
ifeq ($(framework_docs_SDK_PREVIEW),true)
- LOCAL_DROIDDOC_OPTIONS += -hdf sdk.current preview
+ LOCAL_DROIDDOC_OPTIONS += -hdf sdk.preview true
endif
LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
@@ -551,6 +545,7 @@
LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
LOCAL_MODULE := online-sdk
@@ -579,6 +574,7 @@
LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
LOCAL_ADDITIONAL_JAVA_DIR:=$(call intermediates-dir-for,JAVA_LIBRARIES,framework)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
LOCAL_MODULE := hidden
LOCAL_DROIDDOC_OPTIONS:=\
@@ -608,7 +604,7 @@
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core
-
+LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := ext
LOCAL_NO_EMMA_INSTRUMENT := true
diff --git a/api/current.xml b/api/current.xml
index 8e8a671..aff615c 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -33609,7 +33609,7 @@
value="2743"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -75759,7 +75759,7 @@
visibility="public"
>
</field>
-<field name="mFacing"
+<field name="facing"
type="int"
transient="false"
volatile="false"
@@ -75769,7 +75769,7 @@
visibility="public"
>
</field>
-<field name="mOrientation"
+<field name="orientation"
type="int"
transient="false"
volatile="false"
@@ -136919,7 +136919,7 @@
visibility="public"
>
</field>
-<field name="TYPE_MAINDEN_NAME"
+<field name="TYPE_MAIDEN_NAME"
type="int"
transient="false"
volatile="false"
@@ -136930,6 +136930,17 @@
visibility="public"
>
</field>
+<field name="TYPE_MAINDEN_NAME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
<field name="TYPE_OTHER_NAME"
type="int"
transient="false"
@@ -137685,8 +137696,40 @@
deprecated="not deprecated"
visibility="public"
>
+<implements name="android.provider.ContactsContract.CommonDataKinds.CommonColumns">
+</implements>
<implements name="android.provider.ContactsContract.DataColumnsWithJoins">
</implements>
+<method name="getTypeLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.res.Resources">
+</parameter>
+<parameter name="type" type="int">
+</parameter>
+<parameter name="label" type="java.lang.CharSequence">
+</parameter>
+</method>
+<method name="getTypeLabelResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="int">
+</parameter>
+</method>
<field name="CONTENT_ITEM_TYPE"
type="java.lang.String"
transient="false"
@@ -137709,6 +137752,39 @@
visibility="public"
>
</field>
+<field name="TYPE_HOME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_OTHER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_WORK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
</class>
<class name="ContactsContract.CommonDataKinds.StructuredName"
extends="java.lang.Object"
@@ -177675,17 +177751,6 @@
visibility="public"
>
</field>
-<field name="SOURCE_CLASS_JOYSTICK"
- type="int"
- transient="false"
- volatile="false"
- value="16"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="SOURCE_CLASS_MASK"
type="int"
transient="false"
@@ -177741,39 +177806,6 @@
visibility="public"
>
</field>
-<field name="SOURCE_GAMEPAD"
- type="int"
- transient="false"
- volatile="false"
- value="1025"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="SOURCE_JOYSTICK_LEFT"
- type="int"
- transient="false"
- volatile="false"
- value="16777232"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="SOURCE_JOYSTICK_RIGHT"
- type="int"
- transient="false"
- volatile="false"
- value="33554448"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="SOURCE_KEYBOARD"
type="int"
transient="false"
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 4a1d27b..8ab94ad 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -60,7 +60,7 @@
return (int64_t)tv.tv_usec + tv.tv_sec * 1000000ll;
}
-static void playSource(OMXClient *client, const sp<MediaSource> &source) {
+static void playSource(OMXClient *client, sp<MediaSource> &source) {
sp<MetaData> meta = source->getFormat();
const char *mime;
@@ -81,6 +81,8 @@
}
}
+ source.clear();
+
status_t err = rawSource->start();
if (err != OK) {
diff --git a/core/java/android/content/AbstractThreadedSyncAdapter.java b/core/java/android/content/AbstractThreadedSyncAdapter.java
index 9dd7b9f..c0a268f 100644
--- a/core/java/android/content/AbstractThreadedSyncAdapter.java
+++ b/core/java/android/content/AbstractThreadedSyncAdapter.java
@@ -37,8 +37,9 @@
public abstract class AbstractThreadedSyncAdapter {
/**
* Kernel event log tag. Also listed in data/etc/event-log-tags.
- * @Deprecated
+ * @deprecated Private constant. May go away in the next release.
*/
+ @Deprecated
public static final int LOG_SYNC_DETAILS = 2743;
private final Context mContext;
diff --git a/core/java/android/content/ContentProviderOperation.java b/core/java/android/content/ContentProviderOperation.java
index 7945f3f..12e9bab 100644
--- a/core/java/android/content/ContentProviderOperation.java
+++ b/core/java/android/content/ContentProviderOperation.java
@@ -272,13 +272,14 @@
* The ContentValues back references are represented as a ContentValues object where the
* key refers to a column and the value is an index of the back reference whose
* valued should be associated with the column.
+ * <p>
+ * This is intended to be a private method but it is exposed for
+ * unit testing purposes
* @param backRefs an array of previous results
* @param numBackRefs the number of valid previous results in backRefs
* @return the ContentValues that should be used in this operation application after
* expansion of back references. This can be called if either mValues or mValuesBackReferences
* is null
- * @VisibleForTesting this is intended to be a private method but it is exposed for
- * unit testing purposes
*/
public ContentValues resolveValueBackReferences(
ContentProviderResult[] backRefs, int numBackRefs) {
@@ -308,13 +309,14 @@
* the key is an index into the selection argument array (see {@link Builder#withSelection})
* and the value is the index of the previous result that should be used for that selection
* argument array slot.
+ * <p>
+ * This is intended to be a private method but it is exposed for
+ * unit testing purposes
* @param backRefs an array of previous results
* @param numBackRefs the number of valid previous results in backRefs
* @return the ContentValues that should be used in this operation application after
* expansion of back references. This can be called if either mValues or mValuesBackReferences
* is null
- * @VisibleForTesting this is intended to be a private method but it is exposed for
- * unit testing purposes
*/
public String[] resolveSelectionArgsBackReferences(
ContentProviderResult[] backRefs, int numBackRefs) {
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 3cc89e5..26600f3 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -154,14 +154,21 @@
* Information about a camera
*/
public static class CameraInfo {
+ /**
+ * The facing of the camera is opposite to that of the screen.
+ */
public static final int CAMERA_FACING_BACK = 0;
+
+ /**
+ * The facing of the camera is the same as that of the screen.
+ */
public static final int CAMERA_FACING_FRONT = 1;
/**
* The direction that the camera faces to. It should be
* CAMERA_FACING_BACK or CAMERA_FACING_FRONT.
*/
- public int mFacing;
+ public int facing;
/**
* The orientation of the camera image. The value is the angle that the
@@ -175,7 +182,7 @@
*
* @see #setDisplayOrientation(int)
*/
- public int mOrientation;
+ public int orientation;
};
/**
@@ -210,12 +217,14 @@
/**
* The id for the default camera.
+ * @see #open(int)
*/
public static int CAMERA_ID_DEFAULT = 0;
/**
* Equivalent to Camera.open(Camera.CAMERA_ID_DEFAULT).
* Creates a new Camera object to access the default camera.
+ * @see #open(int)
*/
public static Camera open() {
return new Camera(CAMERA_ID_DEFAULT);
@@ -787,7 +796,7 @@
* case Surface.ROTATION_270: degrees = 270; break;
* }
*
- * int result = (info.mOrientation - degrees + 360) % 360;
+ * int result = (info.orientation - degrees + 360) % 360;
* camera.setDisplayOrientation(result);
* }
* </pre>
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index 0068724..a271075 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -24,6 +24,7 @@
import android.os.ServiceManager;
import android.util.Log;
import android.util.SparseArray;
+import android.util.SparseBooleanArray;
import android.view.IRotationWatcher;
import android.view.IWindowManager;
import android.view.Surface;
@@ -446,12 +447,12 @@
int accuracy = status[0];
synchronized (sListeners) {
if (sensor == -1 || sListeners.isEmpty()) {
- if (sensor == -1) {
- // we lost the connection to the event stream. this happens
- // when the last listener is removed.
- Log.d(TAG, "_sensors_data_poll() failed, we bail out.");
+ // we lost the connection to the event stream. this happens
+ // when the last listener is removed or if there is an error
+ if (sensor == -1 && !sListeners.isEmpty()) {
+ // log a warning in case of abnormal termination
+ Log.e(TAG, "_sensors_data_poll() failed, we bail out: sensors=" + sensor);
}
-
// we have no more listeners or polling failed, terminate the thread
sensors_destroy_queue(sQueue);
sQueue = 0;
@@ -487,7 +488,7 @@
private final ArrayList<Sensor> mSensorList = new ArrayList<Sensor>();
private final Handler mHandler;
private SensorEvent mValuesPool;
- public int mSensors;
+ public SparseBooleanArray mSensors = new SparseBooleanArray();
ListenerDelegate(SensorEventListener listener, Sensor sensor, Handler handler) {
mSensorEventListener = listener;
@@ -541,18 +542,17 @@
return mSensorEventListener;
}
- int addSensor(Sensor sensor) {
- mSensors |= 1<<sensor.getHandle();
+ void addSensor(Sensor sensor) {
+ mSensors.put(sensor.getHandle(), true);
mSensorList.add(sensor);
- return mSensors;
}
int removeSensor(Sensor sensor) {
- mSensors &= ~(1<<sensor.getHandle());
+ mSensors.delete(sensor.getHandle());
mSensorList.remove(sensor);
- return mSensors;
+ return mSensors.size();
}
boolean hasSensor(Sensor sensor) {
- return ((mSensors & (1<<sensor.getHandle())) != 0);
+ return mSensors.get(sensor.getHandle());
}
List<Sensor> getSensors() {
return mSensorList;
@@ -971,6 +971,31 @@
return registerListener(listener, sensor, rate, null);
}
+ private boolean enableSensorLocked(Sensor sensor, int delay) {
+ boolean result = false;
+ for (ListenerDelegate i : sListeners) {
+ if (i.hasSensor(sensor)) {
+ String name = sensor.getName();
+ int handle = sensor.getHandle();
+ result = sensors_enable_sensor(sQueue, name, handle, delay);
+ break;
+ }
+ }
+ return result;
+ }
+
+ private boolean disableSensorLocked(Sensor sensor) {
+ for (ListenerDelegate i : sListeners) {
+ if (i.hasSensor(sensor)) {
+ // not an error, it's just that this sensor is still in use
+ return true;
+ }
+ }
+ String name = sensor.getName();
+ int handle = sensor.getHandle();
+ return sensors_enable_sensor(sQueue, name, handle, SENSOR_DISABLE);
+ }
+
/**
* Registers a {@link android.hardware.SensorEventListener
* SensorEventListener} for the given sensor.
@@ -1008,7 +1033,7 @@
if (listener == null || sensor == null) {
return false;
}
- boolean result;
+ boolean result = true;
int delay = -1;
switch (rate) {
case SENSOR_DELAY_FASTEST:
@@ -1029,6 +1054,7 @@
}
synchronized (sListeners) {
+ // look for this listener in our list
ListenerDelegate l = null;
for (ListenerDelegate i : sListeners) {
if (i.getListener() == listener) {
@@ -1037,29 +1063,37 @@
}
}
- String name = sensor.getName();
- int handle = sensor.getHandle();
+ // if we don't find it, add it to the list
if (l == null) {
- result = false;
l = new ListenerDelegate(listener, sensor, handler);
sListeners.add(l);
+ // if the list is not empty, start our main thread
if (!sListeners.isEmpty()) {
- result = sSensorThread.startLocked();
- if (result) {
- result = sensors_enable_sensor(sQueue, name, handle, delay);
- if (!result) {
- // there was an error, remove the listeners
+ if (sSensorThread.startLocked()) {
+ if (!enableSensorLocked(sensor, delay)) {
+ // oops. there was an error
sListeners.remove(l);
+ result = false;
}
+ } else {
+ // there was an error, remove the listener
+ sListeners.remove(l);
+ result = false;
}
+ } else {
+ // weird, we couldn't add the listener
+ result = false;
}
} else {
- result = sensors_enable_sensor(sQueue, name, handle, delay);
- if (result) {
- l.addSensor(sensor);
+ l.addSensor(sensor);
+ if (!enableSensorLocked(sensor, delay)) {
+ // oops. there was an error
+ l.removeSensor(sensor);
+ result = false;
}
}
}
+
return result;
}
@@ -1067,23 +1101,21 @@
if (listener == null || sensor == null) {
return;
}
+
synchronized (sListeners) {
final int size = sListeners.size();
for (int i=0 ; i<size ; i++) {
ListenerDelegate l = sListeners.get(i);
if (l.getListener() == listener) {
- // disable these sensors
- String name = sensor.getName();
- int handle = sensor.getHandle();
- sensors_enable_sensor(sQueue, name, handle, SENSOR_DISABLE);
- // if we have no more sensors enabled on this listener,
- // take it off the list.
if (l.removeSensor(sensor) == 0) {
+ // if we have no more sensors enabled on this listener,
+ // take it off the list.
sListeners.remove(i);
}
break;
}
}
+ disableSensorLocked(sensor);
}
}
@@ -1091,18 +1123,17 @@
if (listener == null) {
return;
}
+
synchronized (sListeners) {
final int size = sListeners.size();
for (int i=0 ; i<size ; i++) {
ListenerDelegate l = sListeners.get(i);
if (l.getListener() == listener) {
+ sListeners.remove(i);
// disable all sensors for this listener
for (Sensor sensor : l.getSensors()) {
- String name = sensor.getName();
- int handle = sensor.getHandle();
- sensors_enable_sensor(sQueue, name, handle, SENSOR_DISABLE);
+ disableSensorLocked(sensor);
}
- sListeners.remove(i);
break;
}
}
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 331ce10..39681912 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -123,6 +123,17 @@
public static final String ACTION_BACKGROUND_DATA_SETTING_CHANGED =
"android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
+
+ /**
+ * Broadcast Action: The network connection may not be good
+ * uses {@code ConnectivityManager.EXTRA_INET_CONDITION} and
+ * {@code ConnectivityManager.EXTRA_NETWORK_INFO} to specify
+ * the network and it's condition.
+ * @hide
+ */
+ public static final String INET_CONDITION_ACTION =
+ "android.net.conn.INET_CONDITION_ACTION";
+
/**
* Broadcast Action: A tetherable connection has come or gone
* TODO - finish the doc
diff --git a/core/java/android/net/DownloadManager.java b/core/java/android/net/DownloadManager.java
index e8237c9..5320da3 100644
--- a/core/java/android/net/DownloadManager.java
+++ b/core/java/android/net/DownloadManager.java
@@ -17,6 +17,7 @@
package android.net;
import android.content.ContentResolver;
+import android.content.ContentUris;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.CursorWrapper;
@@ -536,12 +537,12 @@
* @param projection the projection to pass to ContentResolver.query()
* @return the Cursor returned by ContentResolver.query()
*/
- Cursor runQuery(ContentResolver resolver, String[] projection) {
- Uri uri = Downloads.CONTENT_URI;
+ Cursor runQuery(ContentResolver resolver, String[] projection, Uri baseUri) {
+ Uri uri = baseUri;
List<String> selectionParts = new ArrayList<String>();
if (mId != null) {
- uri = Uri.withAppendedPath(uri, mId.toString());
+ uri = ContentUris.withAppendedId(uri, mId);
}
if (mStatusFlags != null) {
@@ -597,6 +598,7 @@
private ContentResolver mResolver;
private String mPackageName;
+ private Uri mBaseUri = Downloads.Impl.CONTENT_URI;
/**
* @hide
@@ -607,6 +609,19 @@
}
/**
+ * Makes this object access the download provider through /all_downloads URIs rather than
+ * /my_downloads URIs, for clients that have permission to do so.
+ * @hide
+ */
+ public void setAccessAllDownloads(boolean accessAllDownloads) {
+ if (accessAllDownloads) {
+ mBaseUri = Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI;
+ } else {
+ mBaseUri = Downloads.Impl.CONTENT_URI;
+ }
+ }
+
+ /**
* Enqueue a new download. The download will start automatically once the download manager is
* ready to execute it and connectivity is available.
*
@@ -642,11 +657,11 @@
* COLUMN_* constants.
*/
public Cursor query(Query query) {
- Cursor underlyingCursor = query.runQuery(mResolver, UNDERLYING_COLUMNS);
+ Cursor underlyingCursor = query.runQuery(mResolver, UNDERLYING_COLUMNS, mBaseUri);
if (underlyingCursor == null) {
return null;
}
- return new CursorTranslator(underlyingCursor);
+ return new CursorTranslator(underlyingCursor, mBaseUri);
}
/**
@@ -690,9 +705,8 @@
/**
* Get the DownloadProvider URI for the download with the given ID.
*/
- private Uri getDownloadUri(long id) {
- Uri downloadUri = Uri.withAppendedPath(Downloads.CONTENT_URI, Long.toString(id));
- return downloadUri;
+ Uri getDownloadUri(long id) {
+ return ContentUris.withAppendedId(mBaseUri, id);
}
/**
@@ -702,8 +716,11 @@
* underlying data.
*/
private static class CursorTranslator extends CursorWrapper {
- public CursorTranslator(Cursor cursor) {
+ private Uri mBaseUri;
+
+ public CursorTranslator(Cursor cursor, Uri baseUri) {
super(cursor);
+ mBaseUri = baseUri;
}
@Override
@@ -799,11 +816,24 @@
}
assert column.equals(COLUMN_LOCAL_URI);
- String localUri = getUnderlyingString(Downloads._DATA);
+ return getLocalUri();
+ }
+
+ private String getLocalUri() {
+ String localUri = getUnderlyingString(Downloads.Impl._DATA);
if (localUri == null) {
return null;
}
- return Uri.fromFile(new File(localUri)).toString();
+
+ long destinationType = getUnderlyingLong(Downloads.Impl.COLUMN_DESTINATION);
+ if (destinationType == Downloads.Impl.DESTINATION_FILE_URI) {
+ // return file URI for external download
+ return Uri.fromFile(new File(localUri)).toString();
+ }
+
+ // return content URI for cache download
+ long downloadId = getUnderlyingLong(Downloads.Impl._ID);
+ return ContentUris.withAppendedId(mBaseUri, downloadId).toString();
}
private long translateLong(String column) {
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 13cbda8..09cc3e0 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -3552,7 +3552,7 @@
* <li>{@link #TYPE_CUSTOM}. Put the actual type in {@link #LABEL}.</li>
* <li>{@link #TYPE_DEFAULT}</li>
* <li>{@link #TYPE_OTHER_NAME}</li>
- * <li>{@link #TYPE_MAINDEN_NAME}</li>
+ * <li>{@link #TYPE_MAIDEN_NAME}</li>
* <li>{@link #TYPE_SHORT_NAME}</li>
* <li>{@link #TYPE_INITIALS}</li>
* </ul>
@@ -3578,6 +3578,9 @@
public static final int TYPE_DEFAULT = 1;
public static final int TYPE_OTHER_NAME = 2;
+ public static final int TYPE_MAIDEN_NAME = 3;
+ /** @deprecated Use TYPE_MAIDEN_NAME instead. */
+ @Deprecated
public static final int TYPE_MAINDEN_NAME = 3;
public static final int TYPE_SHORT_NAME = 4;
public static final int TYPE_INITIALS = 5;
@@ -4882,17 +4885,30 @@
* <td>{@link #DATA1}</td>
* <td></td>
* </tr>
+ * <tr>
+ * <td>int</td>
+ * <td>{@link #TYPE}</td>
+ * <td>{@link #DATA2}</td>
+ * <td>Allowed values are:
+ * <p>
+ * <ul>
+ * <li>{@link #TYPE_CUSTOM}. Put the actual type in {@link #LABEL}.</li>
+ * <li>{@link #TYPE_HOME}</li>
+ * <li>{@link #TYPE_WORK}</li>
+ * <li>{@link #TYPE_OTHER}</li>
+ * </ul>
+ * </p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>String</td>
+ * <td>{@link #LABEL}</td>
+ * <td>{@link #DATA3}</td>
+ * <td></td>
+ * </tr>
* </table>
*/
- public static final class SipAddress implements DataColumnsWithJoins {
- // TODO: Ultimately this class will probably implement
- // CommonColumns too (in addition to DataColumnsWithJoins)
- // since it may make sense to have multiple SIP addresses with
- // different types+labels, just like with phone numbers.
- //
- // But that can be extended in the future without breaking any
- // public API, so let's keep this class ultra-simple for now.
-
+ public static final class SipAddress implements DataColumnsWithJoins, CommonColumns {
/**
* This utility class cannot be instantiated
*/
@@ -4901,11 +4917,44 @@
/** MIME type used when storing this in data table. */
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/sip_address";
+ public static final int TYPE_HOME = 1;
+ public static final int TYPE_WORK = 2;
+ public static final int TYPE_OTHER = 3;
+
/**
* The SIP address.
* <P>Type: TEXT</P>
*/
public static final String SIP_ADDRESS = DATA1;
+ // ...and TYPE and LABEL come from the CommonColumns interface.
+
+ /**
+ * Return the string resource that best describes the given
+ * {@link #TYPE}. Will always return a valid resource.
+ */
+ public static final int getTypeLabelResource(int type) {
+ switch (type) {
+ case TYPE_HOME: return com.android.internal.R.string.sipAddressTypeHome;
+ case TYPE_WORK: return com.android.internal.R.string.sipAddressTypeWork;
+ case TYPE_OTHER: return com.android.internal.R.string.sipAddressTypeOther;
+ default: return com.android.internal.R.string.sipAddressTypeCustom;
+ }
+ }
+
+ /**
+ * Return a {@link CharSequence} that best describes the given type,
+ * possibly substituting the given {@link #LABEL} value
+ * for {@link #TYPE_CUSTOM}.
+ */
+ public static final CharSequence getTypeLabel(Resources res, int type,
+ CharSequence label) {
+ if (type == TYPE_CUSTOM && !TextUtils.isEmpty(label)) {
+ return label;
+ } else {
+ final int labelRes = getTypeLabelResource(type);
+ return res.getText(labelRes);
+ }
+ }
}
}
diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java
index 603e598..74c7372 100644
--- a/core/java/android/provider/Downloads.java
+++ b/core/java/android/provider/Downloads.java
@@ -60,7 +60,7 @@
* @hide
*/
public static final Uri CONTENT_URI =
- Uri.parse("content://downloads/download");
+ Uri.parse("content://downloads/my_downloads");
/**
* Broadcast Action: this is sent by the download manager to the app
@@ -637,10 +637,17 @@
"android.permission.DOWNLOAD_WITHOUT_NOTIFICATION";
/**
- * The content:// URI for the data table in the provider
+ * The content:// URI to access downloads owned by the caller's UID.
*/
public static final Uri CONTENT_URI =
- Uri.parse("content://downloads/download");
+ Uri.parse("content://downloads/my_downloads");
+
+ /**
+ * The content URI for accessing all downloads across all UIDs (requires the
+ * ACCESS_ALL_DOWNLOADS permission).
+ */
+ public static final Uri ALL_DOWNLOADS_CONTENT_URI =
+ Uri.parse("content://downloads/all_downloads");
/**
* Broadcast Action: this is sent by the download manager to the app
diff --git a/core/java/android/util/CalendarUtils.java b/core/java/android/util/CalendarUtils.java
index 9a4a67d..3d340d9 100644
--- a/core/java/android/util/CalendarUtils.java
+++ b/core/java/android/util/CalendarUtils.java
@@ -110,6 +110,7 @@
}
}
}
+ cursor.close();
if (writePrefs) {
SharedPreferences prefs = getSharedPreferences((Context)cookie, mPrefsName);
// Write the prefs
@@ -205,11 +206,11 @@
// Update the db
ContentValues values = new ContentValues();
- if (mHandler == null) {
- mHandler = new AsyncTZHandler(context.getContentResolver());
+ if (mHandler != null) {
+ mHandler.cancelOperation(mToken);
}
- mHandler.cancelOperation(mToken);
+ mHandler = new AsyncTZHandler(context.getContentResolver());
// skip 0 so query can use it
if (++mToken == 0) {
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index 7468579..dd04975 100755
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -28,8 +28,7 @@
* keyboard may compose the capabilities of a standard keyboard together with a track pad mouse
* or other pointing device.
* </p><p>
- * Some input devices present multiple distinguishable sources of input. For example, a
- * game pad may have two analog joysticks, a directional pad and a full complement of buttons.
+ * Some input devices present multiple distinguishable sources of input.
* Applications can query the framework about the characteristics of each distinct source.
* </p><p>
* As a further wrinkle, different kinds of input sources uses different coordinate systems
@@ -55,7 +54,7 @@
/**
* The input source has buttons or keys.
- * Examples: {@link #SOURCE_KEYBOARD}, {@link #SOURCE_GAMEPAD}, {@link #SOURCE_DPAD}.
+ * Examples: {@link #SOURCE_KEYBOARD}, {@link #SOURCE_DPAD}.
*
* A {@link KeyEvent} should be interpreted as a button or key press.
*
@@ -101,18 +100,6 @@
public static final int SOURCE_CLASS_POSITION = 0x00000008;
/**
- * The input source is a joystick.
- *
- * A {@link KeyEvent} should be interpreted as a joystick button press.
- *
- * A {@link MotionEvent} should be interpreted in absolute coordinates as a joystick
- * position in normalized device-specific units nominally between -1.0 and 1.0.
- *
- * Use {@link #getMotionRange} to query the range and precision of motion.
- */
- public static final int SOURCE_CLASS_JOYSTICK = 0x00000010;
-
- /**
* The input source is unknown.
*/
public static final int SOURCE_UNKNOWN = 0x00000000;
@@ -132,13 +119,6 @@
public static final int SOURCE_DPAD = 0x00000200 | SOURCE_CLASS_BUTTON;
/**
- * The input source is a gamepad.
- *
- * @see #SOURCE_CLASS_BUTTON
- */
- public static final int SOURCE_GAMEPAD = 0x00000400 | SOURCE_CLASS_BUTTON;
-
- /**
* The input source is a touch screen pointing device.
*
* @see #SOURCE_CLASS_POINTER
@@ -168,20 +148,6 @@
* @see #SOURCE_CLASS_POSITION
*/
public static final int SOURCE_TOUCHPAD = 0x00100000 | SOURCE_CLASS_POSITION;
-
- /**
- * The input source is a joystick mounted on the left or is a standalone joystick.
- *
- * @see #SOURCE_CLASS_JOYSTICK
- */
- public static final int SOURCE_JOYSTICK_LEFT = 0x01000000 | SOURCE_CLASS_JOYSTICK;
-
- /**
- * The input source is a joystick mounted on the right.
- *
- * @see #SOURCE_CLASS_JOYSTICK
- */
- public static final int SOURCE_JOYSTICK_RIGHT = 0x02000000 | SOURCE_CLASS_JOYSTICK;
/**
* A special input source constant that is used when filtering input devices
@@ -411,7 +377,7 @@
/**
* Gets the extent of the center flat position with respect to this coordinate.
* For example, a flat value of 8 means that the center position is between -8 and +8.
- * This value is mainly useful for calibrating joysticks.
+ * This value is mainly useful for calibrating self-centering devices.
* @return The extent of the center flat position.
*/
public float getFlat() {
@@ -506,13 +472,10 @@
description.append(" Sources:");
appendSourceDescriptionIfApplicable(description, SOURCE_KEYBOARD, "keyboard");
appendSourceDescriptionIfApplicable(description, SOURCE_DPAD, "dpad");
- appendSourceDescriptionIfApplicable(description, SOURCE_GAMEPAD, "gamepad");
appendSourceDescriptionIfApplicable(description, SOURCE_TOUCHSCREEN, "touchscreen");
appendSourceDescriptionIfApplicable(description, SOURCE_MOUSE, "mouse");
appendSourceDescriptionIfApplicable(description, SOURCE_TRACKBALL, "trackball");
appendSourceDescriptionIfApplicable(description, SOURCE_TOUCHPAD, "touchpad");
- appendSourceDescriptionIfApplicable(description, SOURCE_JOYSTICK_LEFT, "joystick_left");
- appendSourceDescriptionIfApplicable(description, SOURCE_JOYSTICK_RIGHT, "joystick_right");
description.append("\n");
appendRangeDescriptionIfApplicable(description, MOTION_RANGE_X, "x");
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index ed10e41..9e7eedf 100755
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -24,120 +24,305 @@
import android.view.KeyCharacterMap.KeyData;
/**
- * Contains constants for key events.
+ * Object used to report key and button events.
+ * <p>
+ * Each key press is described by a sequence of key events. A key press
+ * starts with a key event with {@link #ACTION_DOWN}. If the key is held
+ * sufficiently long that it repeats, then the initial down is followed
+ * additional key events with {@link #ACTION_DOWN} and a non-zero value for
+ * {@link #getRepeatCount()}. The last key event is a {@link #ACTION_UP}
+ * for the key up. If the key press is canceled, the key up event will have the
+ * {@link #FLAG_CANCELED} flag set.
+ * </p><p>
+ * Key events are generally accompanied by a key code ({@link #getKeyCode()}),
+ * scan code ({@link #getScanCode()}) and meta state ({@link #getMetaState()}).
+ * Key code constants are defined in this class. Scan code constants are raw
+ * device-specific codes obtained from the OS and so are not generally meaningful
+ * to applications unless interpreted using the {@link KeyCharacterMap}.
+ * Meta states describe the pressed state of key modifiers
+ * such as {@link #META_SHIFT_ON} or {@link #META_ALT_ON}.
+ * </p><p>
+ * When interacting with an IME, the framework may deliver key events
+ * with the special action {@link #ACTION_MULTIPLE} that either specifies
+ * that single repeated key code or a sequence of characters to insert.
+ * </p><p>
+ * In general, the framework makes no guarantees that the key events delivered
+ * to a view constitute a complete key press. In particular, there is no
+ * guarantee that a view will always receive a key event with {@link #ACTION_UP}
+ * for each {@link #ACTION_DOWN} that was delivered.
+ * </p><p>
+ * Refer to {@link InputDevice} for more information about how different kinds of
+ * input devices and sources represent keys and buttons.
+ * </p>
*/
public class KeyEvent extends InputEvent implements Parcelable {
- // key codes
+ /** Key code constant: Unknown key code. */
public static final int KEYCODE_UNKNOWN = 0;
+ /** Key code constant: Soft Left key.
+ * Usually situated below the display on phones and used as a multi-function
+ * feature key for selecting a software defined function shown on the bottom left
+ * of the display. */
public static final int KEYCODE_SOFT_LEFT = 1;
+ /** Key code constant: Soft Right key.
+ * Usually situated below the display on phones and used as a multi-function
+ * feature key for selecting a software defined function shown on the bottom right
+ * of the display. */
public static final int KEYCODE_SOFT_RIGHT = 2;
+ /** Key code constant: Home key.
+ * This key is handled by the framework and is never delivered to applications. */
public static final int KEYCODE_HOME = 3;
+ /** Key code constant: Back key. */
public static final int KEYCODE_BACK = 4;
+ /** Key code constant: Call key. */
public static final int KEYCODE_CALL = 5;
+ /** Key code constant: End Call key. */
public static final int KEYCODE_ENDCALL = 6;
+ /** Key code constant: '0' key. */
public static final int KEYCODE_0 = 7;
+ /** Key code constant: '1' key. */
public static final int KEYCODE_1 = 8;
+ /** Key code constant: '2' key. */
public static final int KEYCODE_2 = 9;
+ /** Key code constant: '3' key. */
public static final int KEYCODE_3 = 10;
+ /** Key code constant: '4' key. */
public static final int KEYCODE_4 = 11;
+ /** Key code constant: '5' key. */
public static final int KEYCODE_5 = 12;
+ /** Key code constant: '6' key. */
public static final int KEYCODE_6 = 13;
+ /** Key code constant: '7' key. */
public static final int KEYCODE_7 = 14;
+ /** Key code constant: '8' key. */
public static final int KEYCODE_8 = 15;
+ /** Key code constant: '9' key. */
public static final int KEYCODE_9 = 16;
+ /** Key code constant: '*' key. */
public static final int KEYCODE_STAR = 17;
+ /** Key code constant: '#' key. */
public static final int KEYCODE_POUND = 18;
+ /** Key code constant: Directional Pad Up key.
+ * May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_UP = 19;
+ /** Key code constant: Directional Pad Down key.
+ * May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_DOWN = 20;
+ /** Key code constant: Directional Pad Left key.
+ * May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_LEFT = 21;
+ /** Key code constant: Directional Pad Right key.
+ * May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_RIGHT = 22;
+ /** Key code constant: Directional Pad Center key.
+ * May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_CENTER = 23;
+ /** Key code constant: Volume Up key. */
public static final int KEYCODE_VOLUME_UP = 24;
+ /** Key code constant: Volume Down key. */
public static final int KEYCODE_VOLUME_DOWN = 25;
+ /** Key code constant: Power key. */
public static final int KEYCODE_POWER = 26;
+ /** Key code constant: Camera key.
+ * Used to launch a camera application or take pictures. */
public static final int KEYCODE_CAMERA = 27;
+ /** Key code constant: Clear key. */
public static final int KEYCODE_CLEAR = 28;
+ /** Key code constant: 'A' key. */
public static final int KEYCODE_A = 29;
+ /** Key code constant: 'B' key. */
public static final int KEYCODE_B = 30;
+ /** Key code constant: 'C' key. */
public static final int KEYCODE_C = 31;
+ /** Key code constant: 'D' key. */
public static final int KEYCODE_D = 32;
+ /** Key code constant: 'E' key. */
public static final int KEYCODE_E = 33;
+ /** Key code constant: 'F' key. */
public static final int KEYCODE_F = 34;
+ /** Key code constant: 'G' key. */
public static final int KEYCODE_G = 35;
+ /** Key code constant: 'H' key. */
public static final int KEYCODE_H = 36;
+ /** Key code constant: 'I' key. */
public static final int KEYCODE_I = 37;
+ /** Key code constant: 'J' key. */
public static final int KEYCODE_J = 38;
+ /** Key code constant: 'K' key. */
public static final int KEYCODE_K = 39;
+ /** Key code constant: 'L' key. */
public static final int KEYCODE_L = 40;
+ /** Key code constant: 'M' key. */
public static final int KEYCODE_M = 41;
+ /** Key code constant: 'N' key. */
public static final int KEYCODE_N = 42;
+ /** Key code constant: 'O' key. */
public static final int KEYCODE_O = 43;
+ /** Key code constant: 'P' key. */
public static final int KEYCODE_P = 44;
+ /** Key code constant: 'Q' key. */
public static final int KEYCODE_Q = 45;
+ /** Key code constant: 'R' key. */
public static final int KEYCODE_R = 46;
+ /** Key code constant: 'S' key. */
public static final int KEYCODE_S = 47;
+ /** Key code constant: 'T' key. */
public static final int KEYCODE_T = 48;
+ /** Key code constant: 'U' key. */
public static final int KEYCODE_U = 49;
+ /** Key code constant: 'V' key. */
public static final int KEYCODE_V = 50;
+ /** Key code constant: 'W' key. */
public static final int KEYCODE_W = 51;
+ /** Key code constant: 'X' key. */
public static final int KEYCODE_X = 52;
+ /** Key code constant: 'Y' key. */
public static final int KEYCODE_Y = 53;
+ /** Key code constant: 'Z' key. */
public static final int KEYCODE_Z = 54;
+ /** Key code constant: ',' key. */
public static final int KEYCODE_COMMA = 55;
+ /** Key code constant: '.' key. */
public static final int KEYCODE_PERIOD = 56;
+ /** Key code constant: Left Alt modifier key. */
public static final int KEYCODE_ALT_LEFT = 57;
+ /** Key code constant: Right Alt modifier key. */
public static final int KEYCODE_ALT_RIGHT = 58;
+ /** Key code constant: Left Shift modifier key. */
public static final int KEYCODE_SHIFT_LEFT = 59;
+ /** Key code constant: Right Shift modifier key. */
public static final int KEYCODE_SHIFT_RIGHT = 60;
+ /** Key code constant: Tab key. */
public static final int KEYCODE_TAB = 61;
+ /** Key code constant: Space key. */
public static final int KEYCODE_SPACE = 62;
+ /** Key code constant: Symbol modifier key. */
public static final int KEYCODE_SYM = 63;
+ /** Key code constant: Explorer special function key.
+ * Used to launch a browser application. */
public static final int KEYCODE_EXPLORER = 64;
+ /** Key code constant: Envelope special function key.
+ * Used to launch a mail application. */
public static final int KEYCODE_ENVELOPE = 65;
+ /** Key code constant: Enter key. */
public static final int KEYCODE_ENTER = 66;
+ /** Key code constant: Delete key. */
public static final int KEYCODE_DEL = 67;
+ /** Key code constant: '`' (backtick) key. */
public static final int KEYCODE_GRAVE = 68;
+ /** Key code constant: '-'. */
public static final int KEYCODE_MINUS = 69;
+ /** Key code constant: '=' key. */
public static final int KEYCODE_EQUALS = 70;
+ /** Key code constant: '[' key. */
public static final int KEYCODE_LEFT_BRACKET = 71;
+ /** Key code constant: ']' key. */
public static final int KEYCODE_RIGHT_BRACKET = 72;
+ /** Key code constant: '\' key. */
public static final int KEYCODE_BACKSLASH = 73;
+ /** Key code constant: ';' key. */
public static final int KEYCODE_SEMICOLON = 74;
+ /** Key code constant: ''' (apostrophe) key. */
public static final int KEYCODE_APOSTROPHE = 75;
+ /** Key code constant: '/' key. */
public static final int KEYCODE_SLASH = 76;
+ /** Key code constant: '@' key. */
public static final int KEYCODE_AT = 77;
+ /** Key code constant: Number Lock modifier key. */
public static final int KEYCODE_NUM = 78;
+ /** Key code constant: Headset Hook key.
+ * Used to hang up calls and stop media. */
public static final int KEYCODE_HEADSETHOOK = 79;
+ /** Key code constant: Camera Focus key.
+ * Used to focus the camera. */
public static final int KEYCODE_FOCUS = 80; // *Camera* focus
+ /** Key code constant: '+' key. */
public static final int KEYCODE_PLUS = 81;
+ /** Key code constant: Menu key. */
public static final int KEYCODE_MENU = 82;
+ /** Key code constant: Notification key. */
public static final int KEYCODE_NOTIFICATION = 83;
+ /** Key code constant: Search key. */
public static final int KEYCODE_SEARCH = 84;
+ /** Key code constant: Play/Pause media key. */
public static final int KEYCODE_MEDIA_PLAY_PAUSE= 85;
+ /** Key code constant: Stop media key. */
public static final int KEYCODE_MEDIA_STOP = 86;
+ /** Key code constant: Play Next media key. */
public static final int KEYCODE_MEDIA_NEXT = 87;
+ /** Key code constant: Play Previous media key. */
public static final int KEYCODE_MEDIA_PREVIOUS = 88;
+ /** Key code constant: Rewind media key. */
public static final int KEYCODE_MEDIA_REWIND = 89;
+ /** Key code constant: Fast Forward media key. */
public static final int KEYCODE_MEDIA_FAST_FORWARD = 90;
+ /** Key code constant: Mute key. */
public static final int KEYCODE_MUTE = 91;
+ /** Key code constant: Page Up key. */
public static final int KEYCODE_PAGE_UP = 92;
+ /** Key code constant: Page Down key. */
public static final int KEYCODE_PAGE_DOWN = 93;
+ /** Key code constant: Picture Symbols modifier key.
+ * Used to switch symbol sets (Emoji, Kao-moji). */
public static final int KEYCODE_PICTSYMBOLS = 94; // switch symbol-sets (Emoji,Kao-moji)
+ /** Key code constant: Switch Charset modifier key.
+ * Used to switch character sets (Kanji, Katakana). */
public static final int KEYCODE_SWITCH_CHARSET = 95; // switch char-sets (Kanji,Katakana)
+ /** Key code constant: A Button key.
+ * On a game controller, the A button should be either the button labeled A
+ * or the first button on the upper row of controller buttons. */
public static final int KEYCODE_BUTTON_A = 96;
+ /** Key code constant: B Button key.
+ * On a game controller, the B button should be either the button labeled B
+ * or the second button on the upper row of controller buttons. */
public static final int KEYCODE_BUTTON_B = 97;
+ /** Key code constant: C Button key.
+ * On a game controller, the C button should be either the button labeled C
+ * or the third button on the upper row of controller buttons. */
public static final int KEYCODE_BUTTON_C = 98;
+ /** Key code constant: X Button key.
+ * On a game controller, the X button should be either the button labeled X
+ * or the first button on the lower row of controller buttons. */
public static final int KEYCODE_BUTTON_X = 99;
+ /** Key code constant: Y Button key.
+ * On a game controller, the Y button should be either the button labeled Y
+ * or the second button on the lower row of controller buttons. */
public static final int KEYCODE_BUTTON_Y = 100;
+ /** Key code constant: Z Button key.
+ * On a game controller, the Z button should be either the button labeled Z
+ * or the third button on the lower row of controller buttons. */
public static final int KEYCODE_BUTTON_Z = 101;
+ /** Key code constant: L1 Button key.
+ * On a game controller, the L1 button should be either the button labeled L1 (or L)
+ * or the top left trigger button. */
public static final int KEYCODE_BUTTON_L1 = 102;
+ /** Key code constant: R1 Button key.
+ * On a game controller, the R1 button should be either the button labeled R1 (or R)
+ * or the top right trigger button. */
public static final int KEYCODE_BUTTON_R1 = 103;
+ /** Key code constant: L2 Button key.
+ * On a game controller, the L2 button should be either the button labeled L2
+ * or the bottom left trigger button. */
public static final int KEYCODE_BUTTON_L2 = 104;
+ /** Key code constant: R2 Button key.
+ * On a game controller, the R2 button should be either the button labeled R2
+ * or the bottom right trigger button. */
public static final int KEYCODE_BUTTON_R2 = 105;
+ /** Key code constant: Left Thumb Button key.
+ * On a game controller, the left thumb button indicates that the left (or only)
+ * joystick is pressed. */
public static final int KEYCODE_BUTTON_THUMBL = 106;
+ /** Key code constant: Right Thumb Button key.
+ * On a game controller, the right thumb button indicates that the right
+ * joystick is pressed. */
public static final int KEYCODE_BUTTON_THUMBR = 107;
+ /** Key code constant: Start Button key.
+ * On a game controller, the button labeled Start. */
public static final int KEYCODE_BUTTON_START = 108;
+ /** Key code constant: Select Button key.
+ * On a game controller, the button labeled Select. */
public static final int KEYCODE_BUTTON_SELECT = 109;
+ /** Key code constant: Mode Button key.
+ * On a game controller, the button labeled Mode. */
public static final int KEYCODE_BUTTON_MODE = 110;
// NOTE: If you add a new keycode here you must also add it to:
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 78b9b5d..6705596 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -24,9 +24,71 @@
* Object used to report movement (mouse, pen, finger, trackball) events. This
* class may hold either absolute or relative movements, depending on what
* it is being used for.
- *
- * Refer to {@link InputDevice} for information about how different kinds of
+ * <p>
+ * On pointing devices such as touch screens, pointer coordinates specify absolute
+ * positions such as view X/Y coordinates. Each complete gesture is represented
+ * by a sequence of motion events with actions that describe pointer state transitions
+ * and movements. A gesture starts with a motion event with {@link #ACTION_DOWN}
+ * that provides the location of the first pointer down. As each additional
+ * pointer that goes down or up, the framework will generate a motion event with
+ * {@link #ACTION_POINTER_DOWN} or {@link #ACTION_POINTER_UP} accordingly.
+ * Pointer movements are described by motion events with {@link #ACTION_MOVE}.
+ * Finally, a gesture end either when the final pointer goes up as represented
+ * by a motion event with {@link #ACTION_UP} or when gesture is canceled
+ * with {@link #ACTION_CANCEL}.
+ * </p><p>
+ * On trackballs, the pointer coordinates specify relative movements as X/Y deltas.
+ * A trackball gesture consists of a sequence of movements described by motion
+ * events with {@link #ACTION_MOVE} interspersed with occasional {@link #ACTION_DOWN}
+ * or {@link #ACTION_UP} motion events when the trackball button is pressed or released.
+ * </p><p>
+ * Motion events always report movements for all pointers at once. The number
+ * of pointers only ever changes by one as individual pointers go up and down,
+ * except when the gesture is canceled.
+ * </p><p>
+ * The order in which individual pointers appear within a motion event can change
+ * from one event to the next. Use the {@link #getPointerId(int)} method to obtain a
+ * pointer id to track pointers across motion events in a gesture. Then for
+ * successive motion events, use the {@link #findPointerIndex(int)} method to obtain
+ * the pointer index for a given pointer id in that motion event.
+ * </p><p>
+ * For efficiency, motion events with {@link #ACTION_MOVE} may batch together
+ * multiple movement samples within a single object. The most current
+ * pointer coordinates are available using {@link #getX(int)} and {@link #getY(int)}.
+ * Earlier coordinates within the batch are accessed using {@link #getHistoricalX(int, int)}
+ * and {@link #getHistoricalY(int, int)}. The coordinates are "historical" only
+ * insofar as they are older than the current coordinates in the batch; however,
+ * they are still distinct from any other coordinates reported in prior motion events.
+ * To process all coordinates in the batch in time order, first consume the historical
+ * coordinates then consume the current coordinates.
+ * </p><p>
+ * Example: Consuming all samples for all pointers in a motion event in time order.
+ * </p><p><pre><code>
+ * void printSamples(MotionEvent ev) {
+ * final int historySize = ev.getHistorySize();
+ * final int pointerCount = ev.getPointerCount();
+ * for (int h = 0; h < historySize; h++) {
+ * System.out.printf("At time %d:", ev.getHistoricalEventTime(h));
+ * for (int p = 0; p < pointerCount; p++) {
+ * System.out.printf(" pointer %d: (%f,%f)",
+ * ev.getPointerId(p), ev.getHistoricalX(p, h), ev.getHistoricalY(p, h));
+ * }
+ * }
+ * System.out.printf("At time %d:", ev.getEventTime());
+ * for (int p = 0; p < pointerCount; p++) {
+ * System.out.printf(" pointer %d: (%f,%f)",
+ * ev.getPointerId(p), ev.getX(p), ev.getY(p));
+ * }
+ * }
+ * </code></pre></p><p>
+ * In general, the framework makes no guarantees that the motion events delivered
+ * to a view constitute a complete gesture. In particular, there is no
+ * guarantee that a view will always receive a motion event with {@link #ACTION_UP}
+ * for each {@link #ACTION_DOWN} that was delivered.
+ * </p><p>
+ * Refer to {@link InputDevice} for more information about how different kinds of
* input devices and sources represent pointer coordinates.
+ * </p>
*/
public final class MotionEvent extends InputEvent implements Parcelable {
private static final long MS_PER_NS = 1000000;
diff --git a/core/java/com/android/internal/util/HierarchicalStateMachine.java b/core/java/com/android/internal/util/HierarchicalStateMachine.java
index c599d68..f789301 100644
--- a/core/java/com/android/internal/util/HierarchicalStateMachine.java
+++ b/core/java/com/android/internal/util/HierarchicalStateMachine.java
@@ -137,7 +137,7 @@
}
class State1 extends HierarchicalState {
- @Override public boolean processMessage(Message message) {
+ @Override public boolean processMessage(Message message) {
Log.d(TAG, "Hello World");
return HANDLED;
}
@@ -257,10 +257,10 @@
}
class P1 extends HierarchicalState {
- @Override public void enter() {
+ @Override public void enter() {
Log.d(TAG, "mP1.enter");
}
- @Override public boolean processMessage(Message message) {
+ @Override public boolean processMessage(Message message) {
boolean retVal;
Log.d(TAG, "mP1.processMessage what=" + message.what);
switch(message.what) {
@@ -278,16 +278,16 @@
}
return retVal;
}
- @Override public void exit() {
+ @Override public void exit() {
Log.d(TAG, "mP1.exit");
}
}
class S1 extends HierarchicalState {
- @Override public void enter() {
+ @Override public void enter() {
Log.d(TAG, "mS1.enter");
}
- @Override public boolean processMessage(Message message) {
+ @Override public boolean processMessage(Message message) {
Log.d(TAG, "S1.processMessage what=" + message.what);
if (message.what == CMD_1) {
// Transition to ourself to show that enter/exit is called
@@ -298,16 +298,16 @@
return NOT_HANDLED;
}
}
- @Override public void exit() {
+ @Override public void exit() {
Log.d(TAG, "mS1.exit");
}
}
class S2 extends HierarchicalState {
- @Override public void enter() {
+ @Override public void enter() {
Log.d(TAG, "mS2.enter");
}
- @Override public boolean processMessage(Message message) {
+ @Override public boolean processMessage(Message message) {
boolean retVal;
Log.d(TAG, "mS2.processMessage what=" + message.what);
switch(message.what) {
@@ -326,17 +326,17 @@
}
return retVal;
}
- @Override public void exit() {
+ @Override public void exit() {
Log.d(TAG, "mS2.exit");
}
}
class P2 extends HierarchicalState {
- @Override public void enter() {
+ @Override public void enter() {
Log.d(TAG, "mP2.enter");
sendMessage(obtainMessage(CMD_5));
}
- @Override public boolean processMessage(Message message) {
+ @Override public boolean processMessage(Message message) {
Log.d(TAG, "P2.processMessage what=" + message.what);
switch(message.what) {
case(CMD_3):
@@ -349,12 +349,12 @@
}
return HANDLED;
}
- @Override public void exit() {
+ @Override public void exit() {
Log.d(TAG, "mP2.exit");
}
}
- @Override
+ @Override
void halting() {
Log.d(TAG, "halting");
synchronized (this) {
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 2751a82..17ab46c 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -703,42 +703,6 @@
}
}
- /* enable poisoning of memory of freed objects */
- property_get("dalvik.vm.gc.overwritefree", propBuf, "false");
- if (strcmp(propBuf, "true") == 0) {
- opt.optionString = "-Xgc:overwritefree";
- mOptions.add(opt);
- } else if (strcmp(propBuf, "false") != 0) {
- LOGW("dalvik.vm.gc.overwritefree should be 'true' or 'false'");
- }
-
- /* enable heap verification before each gc */
- property_get("dalvik.vm.gc.preverify", propBuf, "false");
- if (strcmp(propBuf, "true") == 0) {
- opt.optionString = "-Xgc:preverify";
- mOptions.add(opt);
- } else if (strcmp(propBuf, "false") != 0) {
- LOGW("dalvik.vm.gc.preverify should be 'true' or 'false'");
- }
-
- /* enable heap verification after each gc */
- property_get("dalvik.vm.gc.postverify", propBuf, "false");
- if (strcmp(propBuf, "true") == 0) {
- opt.optionString = "-Xgc:postverify";
- mOptions.add(opt);
- } else if (strcmp(propBuf, "false") != 0) {
- LOGW("dalvik.vm.gc.postverify should be 'true' or 'false'");
- }
-
- /* enable card table verification for partial gc */
- property_get("dalvik.vm.gc.verifycardtable", propBuf, "false");
- if (strcmp(propBuf, "true") == 0) {
- opt.optionString = "-Xgc:verifycardtable";
- mOptions.add(opt);
- } else if (strcmp(propBuf, "false") != 0) {
- LOGW("dalvik.vm.gc.verifycardtable should be 'true' or 'false'");
- }
-
/* enable debugging; set suspend=y to pause during VM init */
#ifdef HAVE_ANDROID_OS
/* use android ADB transport */
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index c784974..10fe583 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -688,8 +688,8 @@
field fields_to_find[] = {
{ "android/hardware/Camera", "mNativeContext", "I", &fields.context },
{ "android/view/Surface", ANDROID_VIEW_SURFACE_JNI_ID, "I", &fields.surface },
- { "android/hardware/Camera$CameraInfo", "mFacing", "I", &fields.facing },
- { "android/hardware/Camera$CameraInfo", "mOrientation", "I", &fields.orientation },
+ { "android/hardware/Camera$CameraInfo", "facing", "I", &fields.facing },
+ { "android/hardware/Camera$CameraInfo", "orientation", "I", &fields.orientation },
};
if (find_fields(env, fields_to_find, NELEM(fields_to_find)) < 0)
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index a543816..ab0ff3f 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -590,8 +590,8 @@
<!-- Allows an application to retrieve state dump information from system
services. -->
<permission android:name="android.permission.DUMP"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
+ android:permissionGroup="android.permission-group.PERSONAL_INFO"
+ android:protectionLevel="signatureOrSystem"
android:label="@string/permlab_dump"
android:description="@string/permdesc_dump" />
@@ -840,11 +840,10 @@
android:description="@string/permdesc_clearAppCache" />
<!-- Allows an application to read the low-level system log files.
- These can contain slightly private information about what is
- happening on the device, but should never contain the user's
- private information. -->
+ Log entries can contain the user's private information,
+ which is why this permission is 'dangerous'. -->
<permission android:name="android.permission.READ_LOGS"
- android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ android:permissionGroup="android.permission-group.PERSONAL_INFO"
android:protectionLevel="dangerous"
android:label="@string/permlab_readLogs"
android:description="@string/permdesc_readLogs" />
diff --git a/core/res/res/drawable-hdpi/btn_check_off.png b/core/res/res/drawable-hdpi/btn_check_off.png
old mode 100644
new mode 100755
index aad9ef7..b49ea4e
--- a/core/res/res/drawable-hdpi/btn_check_off.png
+++ b/core/res/res/drawable-hdpi/btn_check_off.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_disable.png b/core/res/res/drawable-hdpi/btn_check_off_disable.png
old mode 100644
new mode 100755
index eaee9e0..aeefcf7
--- a/core/res/res/drawable-hdpi/btn_check_off_disable.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_disable.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png b/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png
old mode 100644
new mode 100755
index 6d2c293..6296735
--- a/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_pressed.png b/core/res/res/drawable-hdpi/btn_check_off_pressed.png
old mode 100644
new mode 100755
index 1c442e9..67e49df
--- a/core/res/res/drawable-hdpi/btn_check_off_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_selected.png b/core/res/res/drawable-hdpi/btn_check_off_selected.png
old mode 100644
new mode 100755
index b852b2c..1791d1f
--- a/core/res/res/drawable-hdpi/btn_check_off_selected.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on.png b/core/res/res/drawable-hdpi/btn_check_on.png
old mode 100644
new mode 100755
index cd5c181..7514456
--- a/core/res/res/drawable-hdpi/btn_check_on.png
+++ b/core/res/res/drawable-hdpi/btn_check_on.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disable.png b/core/res/res/drawable-hdpi/btn_check_on_disable.png
old mode 100644
new mode 100755
index b4fc51a..6688ebd
--- a/core/res/res/drawable-hdpi/btn_check_on_disable.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disable.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png b/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png
old mode 100644
new mode 100755
index bf34647..5301251
--- a/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_pressed.png b/core/res/res/drawable-hdpi/btn_check_on_pressed.png
old mode 100644
new mode 100755
index fa5c7a2..fc51998
--- a/core/res/res/drawable-hdpi/btn_check_on_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_selected.png b/core/res/res/drawable-hdpi/btn_check_on_selected.png
old mode 100644
new mode 100755
index a6a21ad..77a8250
--- a/core/res/res/drawable-hdpi/btn_check_on_selected.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_circle_disable.png b/core/res/res/drawable-hdpi/btn_circle_disable.png
old mode 100644
new mode 100755
index d829716..3f859cb
--- a/core/res/res/drawable-hdpi/btn_circle_disable.png
+++ b/core/res/res/drawable-hdpi/btn_circle_disable.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_circle_disable_focused.png b/core/res/res/drawable-hdpi/btn_circle_disable_focused.png
old mode 100644
new mode 100755
index c1b5b6e..66251b8
--- a/core/res/res/drawable-hdpi/btn_circle_disable_focused.png
+++ b/core/res/res/drawable-hdpi/btn_circle_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_circle_normal.png b/core/res/res/drawable-hdpi/btn_circle_normal.png
old mode 100644
new mode 100755
index bf3fb5a..bc92b20
--- a/core/res/res/drawable-hdpi/btn_circle_normal.png
+++ b/core/res/res/drawable-hdpi/btn_circle_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_circle_pressed.png b/core/res/res/drawable-hdpi/btn_circle_pressed.png
old mode 100644
new mode 100755
index 50e22e6..aab7d80
--- a/core/res/res/drawable-hdpi/btn_circle_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_circle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_circle_selected.png b/core/res/res/drawable-hdpi/btn_circle_selected.png
old mode 100644
new mode 100755
index cfc68fb..86504505
--- a/core/res/res/drawable-hdpi/btn_circle_selected.png
+++ b/core/res/res/drawable-hdpi/btn_circle_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_close_normal.png b/core/res/res/drawable-hdpi/btn_close_normal.png
old mode 100644
new mode 100755
index 38b49f1..47f11e5
--- a/core/res/res/drawable-hdpi/btn_close_normal.png
+++ b/core/res/res/drawable-hdpi/btn_close_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_close_pressed.png b/core/res/res/drawable-hdpi/btn_close_pressed.png
old mode 100644
new mode 100755
index aa9ea49f0..5b96b4e
--- a/core/res/res/drawable-hdpi/btn_close_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_close_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_close_selected.png b/core/res/res/drawable-hdpi/btn_close_selected.png
old mode 100644
new mode 100755
index 870c670..e27d684
--- a/core/res/res/drawable-hdpi/btn_close_selected.png
+++ b/core/res/res/drawable-hdpi/btn_close_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_normal.9.png b/core/res/res/drawable-hdpi/btn_default_normal.9.png
old mode 100644
new mode 100755
index 329ce6e..afb19f4
--- a/core/res/res/drawable-hdpi/btn_default_normal.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_normal_disable.9.png b/core/res/res/drawable-hdpi/btn_default_normal_disable.9.png
old mode 100644
new mode 100755
index a518c6b..30837d5
--- a/core/res/res/drawable-hdpi/btn_default_normal_disable.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_normal_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_normal_disable_focused.9.png b/core/res/res/drawable-hdpi/btn_default_normal_disable_focused.9.png
old mode 100644
new mode 100755
index 71a05b7..f73f16e
--- a/core/res/res/drawable-hdpi/btn_default_normal_disable_focused.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_normal_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_pressed.9.png b/core/res/res/drawable-hdpi/btn_default_pressed.9.png
old mode 100644
new mode 100755
index d9d02bf..4312c27
--- a/core/res/res/drawable-hdpi/btn_default_pressed.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_selected.9.png b/core/res/res/drawable-hdpi/btn_default_selected.9.png
old mode 100644
new mode 100755
index ab7c612..06b7790
--- a/core/res/res/drawable-hdpi/btn_default_selected.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_small_normal.9.png b/core/res/res/drawable-hdpi/btn_default_small_normal.9.png
old mode 100644
new mode 100755
index baafed6..11a97d0
--- a/core/res/res/drawable-hdpi/btn_default_small_normal.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_small_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_small_normal_disable.9.png b/core/res/res/drawable-hdpi/btn_default_small_normal_disable.9.png
old mode 100644
new mode 100755
index 175197b..8f86e3d
--- a/core/res/res/drawable-hdpi/btn_default_small_normal_disable.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_small_normal_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_small_normal_disable_focused.9.png b/core/res/res/drawable-hdpi/btn_default_small_normal_disable_focused.9.png
old mode 100644
new mode 100755
index ec1feff..7c8082f
--- a/core/res/res/drawable-hdpi/btn_default_small_normal_disable_focused.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_small_normal_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_small_pressed.9.png b/core/res/res/drawable-hdpi/btn_default_small_pressed.9.png
old mode 100644
new mode 100755
index c1f9a0f..cf03f7e
--- a/core/res/res/drawable-hdpi/btn_default_small_pressed.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_small_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_small_selected.9.png b/core/res/res/drawable-hdpi/btn_default_small_selected.9.png
old mode 100644
new mode 100755
index 0ea3f40..477a666
--- a/core/res/res/drawable-hdpi/btn_default_small_selected.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_small_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dialog_disable.png b/core/res/res/drawable-hdpi/btn_dialog_disable.png
old mode 100644
new mode 100755
index 2fc5d1a..4ff634b
--- a/core/res/res/drawable-hdpi/btn_dialog_disable.png
+++ b/core/res/res/drawable-hdpi/btn_dialog_disable.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dialog_normal.png b/core/res/res/drawable-hdpi/btn_dialog_normal.png
old mode 100644
new mode 100755
index c4a1026..e0cc339
--- a/core/res/res/drawable-hdpi/btn_dialog_normal.png
+++ b/core/res/res/drawable-hdpi/btn_dialog_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dialog_pressed.png b/core/res/res/drawable-hdpi/btn_dialog_pressed.png
old mode 100644
new mode 100755
index 846f8bf..ed8e008
--- a/core/res/res/drawable-hdpi/btn_dialog_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_dialog_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dialog_selected.png b/core/res/res/drawable-hdpi/btn_dialog_selected.png
old mode 100644
new mode 100755
index 659c289..9b1a100
--- a/core/res/res/drawable-hdpi/btn_dialog_selected.png
+++ b/core/res/res/drawable-hdpi/btn_dialog_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dropdown_disable.9.png b/core/res/res/drawable-hdpi/btn_dropdown_disable.9.png
new file mode 100755
index 0000000..606a68e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_dropdown_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dropdown_disable_focused.9.png b/core/res/res/drawable-hdpi/btn_dropdown_disable_focused.9.png
new file mode 100755
index 0000000..d5d99cf
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_dropdown_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dropdown_normal.9.png b/core/res/res/drawable-hdpi/btn_dropdown_normal.9.png
old mode 100644
new mode 100755
index 9392495..a4488b0
--- a/core/res/res/drawable-hdpi/btn_dropdown_normal.9.png
+++ b/core/res/res/drawable-hdpi/btn_dropdown_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dropdown_pressed.9.png b/core/res/res/drawable-hdpi/btn_dropdown_pressed.9.png
old mode 100644
new mode 100755
index beaba45..bdb0077
--- a/core/res/res/drawable-hdpi/btn_dropdown_pressed.9.png
+++ b/core/res/res/drawable-hdpi/btn_dropdown_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dropdown_selected.9.png b/core/res/res/drawable-hdpi/btn_dropdown_selected.9.png
old mode 100644
new mode 100755
index ec51fc9..0033fdd
--- a/core/res/res/drawable-hdpi/btn_dropdown_selected.9.png
+++ b/core/res/res/drawable-hdpi/btn_dropdown_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off.png b/core/res/res/drawable-hdpi/btn_radio_off.png
old mode 100644
new mode 100755
index c0b14aa..c4efd14
--- a/core/res/res/drawable-hdpi/btn_radio_off.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_pressed.png b/core/res/res/drawable-hdpi/btn_radio_off_pressed.png
old mode 100644
new mode 100755
index 3189581..7091fb1
--- a/core/res/res/drawable-hdpi/btn_radio_off_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_off_selected.png b/core/res/res/drawable-hdpi/btn_radio_off_selected.png
old mode 100644
new mode 100755
index f337703..9207c10
--- a/core/res/res/drawable-hdpi/btn_radio_off_selected.png
+++ b/core/res/res/drawable-hdpi/btn_radio_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on.png b/core/res/res/drawable-hdpi/btn_radio_on.png
old mode 100644
new mode 100755
index c90d2eb..33b315f
--- a/core/res/res/drawable-hdpi/btn_radio_on.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_pressed.png b/core/res/res/drawable-hdpi/btn_radio_on_pressed.png
old mode 100644
new mode 100755
index d79450b8..24a8710
--- a/core/res/res/drawable-hdpi/btn_radio_on_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_radio_on_selected.png b/core/res/res/drawable-hdpi/btn_radio_on_selected.png
old mode 100644
new mode 100755
index db50c43..82fc320
--- a/core/res/res/drawable-hdpi/btn_radio_on_selected.png
+++ b/core/res/res/drawable-hdpi/btn_radio_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_square_overlay_disabled.png b/core/res/res/drawable-hdpi/btn_square_overlay_disabled.png
old mode 100644
new mode 100755
index 71a037e..ff06697
--- a/core/res/res/drawable-hdpi/btn_square_overlay_disabled.png
+++ b/core/res/res/drawable-hdpi/btn_square_overlay_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_square_overlay_disabled_selected.png b/core/res/res/drawable-hdpi/btn_square_overlay_disabled_selected.png
new file mode 100755
index 0000000..6a31c71
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_square_overlay_disabled_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_square_overlay_normal.png b/core/res/res/drawable-hdpi/btn_square_overlay_normal.png
old mode 100644
new mode 100755
index bf5da22..c311566
--- a/core/res/res/drawable-hdpi/btn_square_overlay_normal.png
+++ b/core/res/res/drawable-hdpi/btn_square_overlay_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_square_overlay_pressed.png b/core/res/res/drawable-hdpi/btn_square_overlay_pressed.png
old mode 100644
new mode 100755
index 52a302d..ac7fdef
--- a/core/res/res/drawable-hdpi/btn_square_overlay_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_square_overlay_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_square_overlay_selected.png b/core/res/res/drawable-hdpi/btn_square_overlay_selected.png
old mode 100644
new mode 100755
index e065682..ee54149
--- a/core/res/res/drawable-hdpi/btn_square_overlay_selected.png
+++ b/core/res/res/drawable-hdpi/btn_square_overlay_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/divider_horizontal_bright.9.png b/core/res/res/drawable-hdpi/divider_horizontal_bright.9.png
old mode 100644
new mode 100755
index 99a67b9..bd1cc0e
--- a/core/res/res/drawable-hdpi/divider_horizontal_bright.9.png
+++ b/core/res/res/drawable-hdpi/divider_horizontal_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/divider_horizontal_bright_opaque.9.png b/core/res/res/drawable-hdpi/divider_horizontal_bright_opaque.9.png
old mode 100644
new mode 100755
index cfe258b..bd1cc0e
--- a/core/res/res/drawable-hdpi/divider_horizontal_bright_opaque.9.png
+++ b/core/res/res/drawable-hdpi/divider_horizontal_bright_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/divider_horizontal_dark.9.png b/core/res/res/drawable-hdpi/divider_horizontal_dark.9.png
old mode 100644
new mode 100755
index 338d840..bd1cc0e
--- a/core/res/res/drawable-hdpi/divider_horizontal_dark.9.png
+++ b/core/res/res/drawable-hdpi/divider_horizontal_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/divider_horizontal_dark_opaque.9.png b/core/res/res/drawable-hdpi/divider_horizontal_dark_opaque.9.png
old mode 100644
new mode 100755
index d21aad2..bd1cc0e
--- a/core/res/res/drawable-hdpi/divider_horizontal_dark_opaque.9.png
+++ b/core/res/res/drawable-hdpi/divider_horizontal_dark_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/expander_ic_maximized.9.png b/core/res/res/drawable-hdpi/expander_ic_maximized.9.png
old mode 100644
new mode 100755
index 04943aa..b99937d
--- a/core/res/res/drawable-hdpi/expander_ic_maximized.9.png
+++ b/core/res/res/drawable-hdpi/expander_ic_maximized.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/expander_ic_minimized.9.png b/core/res/res/drawable-hdpi/expander_ic_minimized.9.png
old mode 100644
new mode 100755
index 7bddbce..11354c4
--- a/core/res/res/drawable-hdpi/expander_ic_minimized.9.png
+++ b/core/res/res/drawable-hdpi/expander_ic_minimized.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/fasttrack_badge_normal.9.png b/core/res/res/drawable-hdpi/fasttrack_badge_normal.9.png
new file mode 100755
index 0000000..8c0381f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/fasttrack_badge_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_btn_round_more_disabled.png b/core/res/res/drawable-hdpi/ic_btn_round_more_disabled.png
old mode 100644
new mode 100755
index 0125944..2ce2d98
--- a/core/res/res/drawable-hdpi/ic_btn_round_more_disabled.png
+++ b/core/res/res/drawable-hdpi/ic_btn_round_more_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_btn_round_more_normal.png b/core/res/res/drawable-hdpi/ic_btn_round_more_normal.png
old mode 100644
new mode 100755
index 33d7f89..e497833
--- a/core/res/res/drawable-hdpi/ic_btn_round_more_normal.png
+++ b/core/res/res/drawable-hdpi/ic_btn_round_more_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_input_add_disabled.png b/core/res/res/drawable-hdpi/ic_input_add_disabled.png
new file mode 100755
index 0000000..9b3a61a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_input_add_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_input_remove.png b/core/res/res/drawable-hdpi/ic_input_remove.png
new file mode 100755
index 0000000..3b3d246
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_input_remove.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_input_remove_disabled.png b/core/res/res/drawable-hdpi/ic_input_remove_disabled.png
new file mode 100755
index 0000000..fa0ad9b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_input_remove_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_account_list.png b/core/res/res/drawable-hdpi/ic_menu_account_list.png
index f858d2c..c62261f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_account_list.png
+++ b/core/res/res/drawable-hdpi/ic_menu_account_list.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_add.png b/core/res/res/drawable-hdpi/ic_menu_add.png
index 65cc01e..7b0dfc5 100644
--- a/core/res/res/drawable-hdpi/ic_menu_add.png
+++ b/core/res/res/drawable-hdpi/ic_menu_add.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_agenda.png b/core/res/res/drawable-hdpi/ic_menu_agenda.png
index 6bb5cc8..88659ae 100644
--- a/core/res/res/drawable-hdpi/ic_menu_agenda.png
+++ b/core/res/res/drawable-hdpi/ic_menu_agenda.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_allfriends.png b/core/res/res/drawable-hdpi/ic_menu_allfriends.png
index 8d11ca1..61c5f6c 100644
--- a/core/res/res/drawable-hdpi/ic_menu_allfriends.png
+++ b/core/res/res/drawable-hdpi/ic_menu_allfriends.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_always_landscape_portrait.png b/core/res/res/drawable-hdpi/ic_menu_always_landscape_portrait.png
index 7ae1760..3acae27 100644
--- a/core/res/res/drawable-hdpi/ic_menu_always_landscape_portrait.png
+++ b/core/res/res/drawable-hdpi/ic_menu_always_landscape_portrait.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_archive.png b/core/res/res/drawable-hdpi/ic_menu_archive.png
index 9ca5c62..48fbcc4 100644
--- a/core/res/res/drawable-hdpi/ic_menu_archive.png
+++ b/core/res/res/drawable-hdpi/ic_menu_archive.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_attachment.png b/core/res/res/drawable-hdpi/ic_menu_attachment.png
index 8f11153..876377f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_attachment.png
+++ b/core/res/res/drawable-hdpi/ic_menu_attachment.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_back.png b/core/res/res/drawable-hdpi/ic_menu_back.png
index a6cd712..7abf819 100644
--- a/core/res/res/drawable-hdpi/ic_menu_back.png
+++ b/core/res/res/drawable-hdpi/ic_menu_back.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_block.png b/core/res/res/drawable-hdpi/ic_menu_block.png
index e1f9c2c..7e716c4 100644
--- a/core/res/res/drawable-hdpi/ic_menu_block.png
+++ b/core/res/res/drawable-hdpi/ic_menu_block.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_blocked_user.png b/core/res/res/drawable-hdpi/ic_menu_blocked_user.png
index 3dd9a4a..b679bf3 100644
--- a/core/res/res/drawable-hdpi/ic_menu_blocked_user.png
+++ b/core/res/res/drawable-hdpi/ic_menu_blocked_user.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_call.png b/core/res/res/drawable-hdpi/ic_menu_call.png
index 2ccc087..93f97ce 100644
--- a/core/res/res/drawable-hdpi/ic_menu_call.png
+++ b/core/res/res/drawable-hdpi/ic_menu_call.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_camera.png b/core/res/res/drawable-hdpi/ic_menu_camera.png
index 5a3850f..4e10e3e 100644
--- a/core/res/res/drawable-hdpi/ic_menu_camera.png
+++ b/core/res/res/drawable-hdpi/ic_menu_camera.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cc.png b/core/res/res/drawable-hdpi/ic_menu_cc.png
index 47905a5..62510d2 100644
--- a/core/res/res/drawable-hdpi/ic_menu_cc.png
+++ b/core/res/res/drawable-hdpi/ic_menu_cc.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_chat_dashboard.png b/core/res/res/drawable-hdpi/ic_menu_chat_dashboard.png
index dde6741..dc22e6a 100644
--- a/core/res/res/drawable-hdpi/ic_menu_chat_dashboard.png
+++ b/core/res/res/drawable-hdpi/ic_menu_chat_dashboard.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_clear_playlist.png b/core/res/res/drawable-hdpi/ic_menu_clear_playlist.png
index e6be48b..45ce7e8 100644
--- a/core/res/res/drawable-hdpi/ic_menu_clear_playlist.png
+++ b/core/res/res/drawable-hdpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_close_clear_cancel.png b/core/res/res/drawable-hdpi/ic_menu_close_clear_cancel.png
index a54ea9d..4683f61 100644
--- a/core/res/res/drawable-hdpi/ic_menu_close_clear_cancel.png
+++ b/core/res/res/drawable-hdpi/ic_menu_close_clear_cancel.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_compass.png b/core/res/res/drawable-hdpi/ic_menu_compass.png
index 104270f..756bd22 100644
--- a/core/res/res/drawable-hdpi/ic_menu_compass.png
+++ b/core/res/res/drawable-hdpi/ic_menu_compass.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_compose.png b/core/res/res/drawable-hdpi/ic_menu_compose.png
index 6ad379e..bc153fa 100644
--- a/core/res/res/drawable-hdpi/ic_menu_compose.png
+++ b/core/res/res/drawable-hdpi/ic_menu_compose.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_crop.png b/core/res/res/drawable-hdpi/ic_menu_crop.png
index 0d4c9fe..82970b8 100644
--- a/core/res/res/drawable-hdpi/ic_menu_crop.png
+++ b/core/res/res/drawable-hdpi/ic_menu_crop.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_day.png b/core/res/res/drawable-hdpi/ic_menu_day.png
index 84429aa..39612e8 100644
--- a/core/res/res/drawable-hdpi/ic_menu_day.png
+++ b/core/res/res/drawable-hdpi/ic_menu_day.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_delete.png b/core/res/res/drawable-hdpi/ic_menu_delete.png
index 2aed26a..ce5ecc4 100644
--- a/core/res/res/drawable-hdpi/ic_menu_delete.png
+++ b/core/res/res/drawable-hdpi/ic_menu_delete.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_directions.png b/core/res/res/drawable-hdpi/ic_menu_directions.png
index 23f6eb3..42423b3 100644
--- a/core/res/res/drawable-hdpi/ic_menu_directions.png
+++ b/core/res/res/drawable-hdpi/ic_menu_directions.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_edit.png b/core/res/res/drawable-hdpi/ic_menu_edit.png
index 602dd10..4748cda 100644
--- a/core/res/res/drawable-hdpi/ic_menu_edit.png
+++ b/core/res/res/drawable-hdpi/ic_menu_edit.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_emoticons.png b/core/res/res/drawable-hdpi/ic_menu_emoticons.png
index 2fab515..cb520ae 100644
--- a/core/res/res/drawable-hdpi/ic_menu_emoticons.png
+++ b/core/res/res/drawable-hdpi/ic_menu_emoticons.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_end_conversation.png b/core/res/res/drawable-hdpi/ic_menu_end_conversation.png
index c05a207..e71bb36 100644
--- a/core/res/res/drawable-hdpi/ic_menu_end_conversation.png
+++ b/core/res/res/drawable-hdpi/ic_menu_end_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_forward.png b/core/res/res/drawable-hdpi/ic_menu_forward.png
index 606e6aa..6b1804f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_forward.png
+++ b/core/res/res/drawable-hdpi/ic_menu_forward.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_friendslist.png b/core/res/res/drawable-hdpi/ic_menu_friendslist.png
index a90e573..ab9c552 100644
--- a/core/res/res/drawable-hdpi/ic_menu_friendslist.png
+++ b/core/res/res/drawable-hdpi/ic_menu_friendslist.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_gallery.png b/core/res/res/drawable-hdpi/ic_menu_gallery.png
index 7c528fa..ba07941 100644
--- a/core/res/res/drawable-hdpi/ic_menu_gallery.png
+++ b/core/res/res/drawable-hdpi/ic_menu_gallery.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_goto.png b/core/res/res/drawable-hdpi/ic_menu_goto.png
index a1acecb..49e68ce 100644
--- a/core/res/res/drawable-hdpi/ic_menu_goto.png
+++ b/core/res/res/drawable-hdpi/ic_menu_goto.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_help.png b/core/res/res/drawable-hdpi/ic_menu_help.png
index 4300e86..a5b4a2f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_help.png
+++ b/core/res/res/drawable-hdpi/ic_menu_help.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_home.png b/core/res/res/drawable-hdpi/ic_menu_home.png
index 35cb52a..949fd04 100644
--- a/core/res/res/drawable-hdpi/ic_menu_home.png
+++ b/core/res/res/drawable-hdpi/ic_menu_home.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_info_details.png b/core/res/res/drawable-hdpi/ic_menu_info_details.png
index 7696ceb..6b3f7fd 100644
--- a/core/res/res/drawable-hdpi/ic_menu_info_details.png
+++ b/core/res/res/drawable-hdpi/ic_menu_info_details.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_invite.png b/core/res/res/drawable-hdpi/ic_menu_invite.png
index 3cb129f..f578523 100644
--- a/core/res/res/drawable-hdpi/ic_menu_invite.png
+++ b/core/res/res/drawable-hdpi/ic_menu_invite.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_login.png b/core/res/res/drawable-hdpi/ic_menu_login.png
index d23ebf0..29e2db6 100644
--- a/core/res/res/drawable-hdpi/ic_menu_login.png
+++ b/core/res/res/drawable-hdpi/ic_menu_login.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_manage.png b/core/res/res/drawable-hdpi/ic_menu_manage.png
index c7c4cbce..c08e64f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_manage.png
+++ b/core/res/res/drawable-hdpi/ic_menu_manage.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_mapmode.png b/core/res/res/drawable-hdpi/ic_menu_mapmode.png
index c895ccb..80c2aa9 100644
--- a/core/res/res/drawable-hdpi/ic_menu_mapmode.png
+++ b/core/res/res/drawable-hdpi/ic_menu_mapmode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_mark.png b/core/res/res/drawable-hdpi/ic_menu_mark.png
index 724d787..e6126fb 100644
--- a/core/res/res/drawable-hdpi/ic_menu_mark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_mark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_month.png b/core/res/res/drawable-hdpi/ic_menu_month.png
index 3e55ae6..3bf3738 100644
--- a/core/res/res/drawable-hdpi/ic_menu_month.png
+++ b/core/res/res/drawable-hdpi/ic_menu_month.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_more.png b/core/res/res/drawable-hdpi/ic_menu_more.png
index ccecc1d..052f8f2 100644
--- a/core/res/res/drawable-hdpi/ic_menu_more.png
+++ b/core/res/res/drawable-hdpi/ic_menu_more.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_my_calendar.png b/core/res/res/drawable-hdpi/ic_menu_my_calendar.png
index 3d6ea1f3..afd696d 100644
--- a/core/res/res/drawable-hdpi/ic_menu_my_calendar.png
+++ b/core/res/res/drawable-hdpi/ic_menu_my_calendar.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_mylocation.png b/core/res/res/drawable-hdpi/ic_menu_mylocation.png
index 1bcb0cd..379f15c 100644
--- a/core/res/res/drawable-hdpi/ic_menu_mylocation.png
+++ b/core/res/res/drawable-hdpi/ic_menu_mylocation.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_myplaces.png b/core/res/res/drawable-hdpi/ic_menu_myplaces.png
index 5f726d8..6cb7c8b 100644
--- a/core/res/res/drawable-hdpi/ic_menu_myplaces.png
+++ b/core/res/res/drawable-hdpi/ic_menu_myplaces.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_notifications.png b/core/res/res/drawable-hdpi/ic_menu_notifications.png
index fb63937..1b1c5ed 100644
--- a/core/res/res/drawable-hdpi/ic_menu_notifications.png
+++ b/core/res/res/drawable-hdpi/ic_menu_notifications.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_play_clip.png b/core/res/res/drawable-hdpi/ic_menu_play_clip.png
index ddde03a..439890c 100644
--- a/core/res/res/drawable-hdpi/ic_menu_play_clip.png
+++ b/core/res/res/drawable-hdpi/ic_menu_play_clip.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_preferences.png b/core/res/res/drawable-hdpi/ic_menu_preferences.png
index 81bca4a..039c721 100644
--- a/core/res/res/drawable-hdpi/ic_menu_preferences.png
+++ b/core/res/res/drawable-hdpi/ic_menu_preferences.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_recent_history.png b/core/res/res/drawable-hdpi/ic_menu_recent_history.png
index 0dd1627..bbd5de3 100644
--- a/core/res/res/drawable-hdpi/ic_menu_recent_history.png
+++ b/core/res/res/drawable-hdpi/ic_menu_recent_history.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_refresh.png b/core/res/res/drawable-hdpi/ic_menu_refresh.png
index 53cacca..bbb08f1 100644
--- a/core/res/res/drawable-hdpi/ic_menu_refresh.png
+++ b/core/res/res/drawable-hdpi/ic_menu_refresh.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_report_image.png b/core/res/res/drawable-hdpi/ic_menu_report_image.png
index b6aa5d6..4db2187 100644
--- a/core/res/res/drawable-hdpi/ic_menu_report_image.png
+++ b/core/res/res/drawable-hdpi/ic_menu_report_image.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_revert.png b/core/res/res/drawable-hdpi/ic_menu_revert.png
index 11860a4..ffc67d9 100644
--- a/core/res/res/drawable-hdpi/ic_menu_revert.png
+++ b/core/res/res/drawable-hdpi/ic_menu_revert.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_rotate.png b/core/res/res/drawable-hdpi/ic_menu_rotate.png
index 85115af..835e393 100644
--- a/core/res/res/drawable-hdpi/ic_menu_rotate.png
+++ b/core/res/res/drawable-hdpi/ic_menu_rotate.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_save.png b/core/res/res/drawable-hdpi/ic_menu_save.png
index fc26c5d..62d0b9a 100644
--- a/core/res/res/drawable-hdpi/ic_menu_save.png
+++ b/core/res/res/drawable-hdpi/ic_menu_save.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_search.png b/core/res/res/drawable-hdpi/ic_menu_search.png
index f78234e..9154d6e 100644
--- a/core/res/res/drawable-hdpi/ic_menu_search.png
+++ b/core/res/res/drawable-hdpi/ic_menu_search.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_send.png b/core/res/res/drawable-hdpi/ic_menu_send.png
index 2567b58..9597731 100644
--- a/core/res/res/drawable-hdpi/ic_menu_send.png
+++ b/core/res/res/drawable-hdpi/ic_menu_send.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_set_as.png b/core/res/res/drawable-hdpi/ic_menu_set_as.png
index 7e79c15..83a87b9 100644
--- a/core/res/res/drawable-hdpi/ic_menu_set_as.png
+++ b/core/res/res/drawable-hdpi/ic_menu_set_as.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_share.png b/core/res/res/drawable-hdpi/ic_menu_share.png
index b41b348..b49d9ad7 100644
--- a/core/res/res/drawable-hdpi/ic_menu_share.png
+++ b/core/res/res/drawable-hdpi/ic_menu_share.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_slideshow.png b/core/res/res/drawable-hdpi/ic_menu_slideshow.png
index 925f4eb1..6208585 100644
--- a/core/res/res/drawable-hdpi/ic_menu_slideshow.png
+++ b/core/res/res/drawable-hdpi/ic_menu_slideshow.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_sort_alphabetically.png b/core/res/res/drawable-hdpi/ic_menu_sort_alphabetically.png
index 5d68998..94ee3be 100644
--- a/core/res/res/drawable-hdpi/ic_menu_sort_alphabetically.png
+++ b/core/res/res/drawable-hdpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_sort_by_size.png b/core/res/res/drawable-hdpi/ic_menu_sort_by_size.png
index c9388fd..b43bc57 100644
--- a/core/res/res/drawable-hdpi/ic_menu_sort_by_size.png
+++ b/core/res/res/drawable-hdpi/ic_menu_sort_by_size.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_star.png b/core/res/res/drawable-hdpi/ic_menu_star.png
index 21a2c4b..30f6314 100644
--- a/core/res/res/drawable-hdpi/ic_menu_star.png
+++ b/core/res/res/drawable-hdpi/ic_menu_star.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_start_conversation.png b/core/res/res/drawable-hdpi/ic_menu_start_conversation.png
index d63d3a7..0dfc024 100644
--- a/core/res/res/drawable-hdpi/ic_menu_start_conversation.png
+++ b/core/res/res/drawable-hdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_stop.png b/core/res/res/drawable-hdpi/ic_menu_stop.png
index 7c99ed4..310b6ca 100644
--- a/core/res/res/drawable-hdpi/ic_menu_stop.png
+++ b/core/res/res/drawable-hdpi/ic_menu_stop.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_today.png b/core/res/res/drawable-hdpi/ic_menu_today.png
index 4a9352d..653f70cd 100644
--- a/core/res/res/drawable-hdpi/ic_menu_today.png
+++ b/core/res/res/drawable-hdpi/ic_menu_today.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_upload.png b/core/res/res/drawable-hdpi/ic_menu_upload.png
index d845112..7454ba3 100644
--- a/core/res/res/drawable-hdpi/ic_menu_upload.png
+++ b/core/res/res/drawable-hdpi/ic_menu_upload.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_upload_you_tube.png b/core/res/res/drawable-hdpi/ic_menu_upload_you_tube.png
index df5fa7f..448f6c4 100644
--- a/core/res/res/drawable-hdpi/ic_menu_upload_you_tube.png
+++ b/core/res/res/drawable-hdpi/ic_menu_upload_you_tube.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_view.png b/core/res/res/drawable-hdpi/ic_menu_view.png
index 75155d4..5b9f2b9 100644
--- a/core/res/res/drawable-hdpi/ic_menu_view.png
+++ b/core/res/res/drawable-hdpi/ic_menu_view.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_week.png b/core/res/res/drawable-hdpi/ic_menu_week.png
index c216eca..c184f2e 100644
--- a/core/res/res/drawable-hdpi/ic_menu_week.png
+++ b/core/res/res/drawable-hdpi/ic_menu_week.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_zoom.png b/core/res/res/drawable-hdpi/ic_menu_zoom.png
index 9fa4d7e..c1d18d5 100644
--- a/core/res/res/drawable-hdpi/ic_menu_zoom.png
+++ b/core/res/res/drawable-hdpi/ic_menu_zoom.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_search_category_default.png b/core/res/res/drawable-hdpi/ic_search_category_default.png
index f78234e..d368c54 100644
--- a/core/res/res/drawable-hdpi/ic_search_category_default.png
+++ b/core/res/res/drawable-hdpi/ic_search_category_default.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png b/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png
old mode 100644
new mode 100755
index c40233e..9e1c42a
--- a/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png
+++ b/core/res/res/drawable-hdpi/list_selector_background_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selector_background_focus.9.png b/core/res/res/drawable-hdpi/list_selector_background_focus.9.png
old mode 100644
new mode 100755
index d8e16b9..5563c80
--- a/core/res/res/drawable-hdpi/list_selector_background_focus.9.png
+++ b/core/res/res/drawable-hdpi/list_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selector_background_longpress.9.png b/core/res/res/drawable-hdpi/list_selector_background_longpress.9.png
old mode 100644
new mode 100755
index 1676ca7..72d3a08
--- a/core/res/res/drawable-hdpi/list_selector_background_longpress.9.png
+++ b/core/res/res/drawable-hdpi/list_selector_background_longpress.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selector_background_pressed.9.png b/core/res/res/drawable-hdpi/list_selector_background_pressed.9.png
old mode 100644
new mode 100755
index ba79cf7..7568b30
--- a/core/res/res/drawable-hdpi/list_selector_background_pressed.9.png
+++ b/core/res/res/drawable-hdpi/list_selector_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/menu_background_fill_parent_width.9.png b/core/res/res/drawable-hdpi/menu_background_fill_parent_width.9.png
index 09eac9b..ed79d41 100644
--- a/core/res/res/drawable-hdpi/menu_background_fill_parent_width.9.png
+++ b/core/res/res/drawable-hdpi/menu_background_fill_parent_width.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/menu_submenu_background.9.png b/core/res/res/drawable-hdpi/menu_submenu_background.9.png
index cbd4400..c7056e0 100644
--- a/core/res/res/drawable-hdpi/menu_submenu_background.9.png
+++ b/core/res/res/drawable-hdpi/menu_submenu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/overscroll_edge.png b/core/res/res/drawable-hdpi/overscroll_edge.png
new file mode 100755
index 0000000..5969093
--- /dev/null
+++ b/core/res/res/drawable-hdpi/overscroll_edge.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/overscroll_glow.png b/core/res/res/drawable-hdpi/overscroll_glow.png
new file mode 100644
index 0000000..a8a62c4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/overscroll_glow.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/picture_emergency.png b/core/res/res/drawable-hdpi/picture_emergency.png
old mode 100644
new mode 100755
index b0f10f9..4227001
--- a/core/res/res/drawable-hdpi/picture_emergency.png
+++ b/core/res/res/drawable-hdpi/picture_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_bottom_dark.9.png b/core/res/res/drawable-hdpi/popup_bottom_dark.9.png
old mode 100644
new mode 100755
index 62a0bd0..22d5506
--- a/core/res/res/drawable-hdpi/popup_bottom_dark.9.png
+++ b/core/res/res/drawable-hdpi/popup_bottom_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_center_dark.9.png b/core/res/res/drawable-hdpi/popup_center_dark.9.png
old mode 100644
new mode 100755
index 77b4524..37c6dd2
--- a/core/res/res/drawable-hdpi/popup_center_dark.9.png
+++ b/core/res/res/drawable-hdpi/popup_center_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_full_dark.9.png b/core/res/res/drawable-hdpi/popup_full_dark.9.png
old mode 100644
new mode 100755
index fc8c00e..c4cb1d5
--- a/core/res/res/drawable-hdpi/popup_full_dark.9.png
+++ b/core/res/res/drawable-hdpi/popup_full_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_top_dark.9.png b/core/res/res/drawable-hdpi/popup_top_dark.9.png
old mode 100644
new mode 100755
index 144d0fc..a633f4a
--- a/core/res/res/drawable-hdpi/popup_top_dark.9.png
+++ b/core/res/res/drawable-hdpi/popup_top_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrollbar_handle_accelerated_anim2.9.png b/core/res/res/drawable-hdpi/scrollbar_handle_accelerated_anim2.9.png
index c916780..0a28223 100644
--- a/core/res/res/drawable-hdpi/scrollbar_handle_accelerated_anim2.9.png
+++ b/core/res/res/drawable-hdpi/scrollbar_handle_accelerated_anim2.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_black_16.png b/core/res/res/drawable-hdpi/spinner_black_16.png
old mode 100644
new mode 100755
index eb34867..42eb734f
--- a/core/res/res/drawable-hdpi/spinner_black_16.png
+++ b/core/res/res/drawable-hdpi/spinner_black_16.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_black_20.png b/core/res/res/drawable-hdpi/spinner_black_20.png
old mode 100644
new mode 100755
index dac06d7..c88fbc9
--- a/core/res/res/drawable-hdpi/spinner_black_20.png
+++ b/core/res/res/drawable-hdpi/spinner_black_20.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_black_48.png b/core/res/res/drawable-hdpi/spinner_black_48.png
old mode 100644
new mode 100755
index 337f72a..7f9c4f3
--- a/core/res/res/drawable-hdpi/spinner_black_48.png
+++ b/core/res/res/drawable-hdpi/spinner_black_48.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_black_76.png b/core/res/res/drawable-hdpi/spinner_black_76.png
old mode 100644
new mode 100755
index 2edc3e7..c1c177e
--- a/core/res/res/drawable-hdpi/spinner_black_76.png
+++ b/core/res/res/drawable-hdpi/spinner_black_76.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_white_16.png b/core/res/res/drawable-hdpi/spinner_white_16.png
old mode 100644
new mode 100755
index 7914a68..4e037ae
--- a/core/res/res/drawable-hdpi/spinner_white_16.png
+++ b/core/res/res/drawable-hdpi/spinner_white_16.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_white_48.png b/core/res/res/drawable-hdpi/spinner_white_48.png
old mode 100644
new mode 100755
index faee8ca..d8519f2
--- a/core/res/res/drawable-hdpi/spinner_white_48.png
+++ b/core/res/res/drawable-hdpi/spinner_white_48.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_white_76.png b/core/res/res/drawable-hdpi/spinner_white_76.png
old mode 100644
new mode 100755
index cd26379..6d6aa94
--- a/core/res/res/drawable-hdpi/spinner_white_76.png
+++ b/core/res/res/drawable-hdpi/spinner_white_76.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_alarm.png b/core/res/res/drawable-hdpi/stat_notify_alarm.png
new file mode 100755
index 0000000..2d3eb30
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_alarm_2.png b/core/res/res/drawable-hdpi/stat_notify_alarm_2.png
new file mode 100755
index 0000000..69841ac
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_alarm_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_bt_incoming_file.png b/core/res/res/drawable-hdpi/stat_notify_bt_incoming_file.png
new file mode 100755
index 0000000..18addce
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_bt_incoming_file.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_calendar.png b/core/res/res/drawable-hdpi/stat_notify_calendar.png
new file mode 100755
index 0000000..0caab3e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_calendar.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_call_mute.png b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
index b86d2ca..0cf5ef5 100755
--- a/core/res/res/drawable-hdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_car_mode.png b/core/res/res/drawable-hdpi/stat_notify_car_mode.png
old mode 100644
new mode 100755
index 03499a4..60c3778
--- a/core/res/res/drawable-hdpi/stat_notify_car_mode.png
+++ b/core/res/res/drawable-hdpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_disk_full.png b/core/res/res/drawable-hdpi/stat_notify_disk_full.png
index 6ceeda8..66e7380 100755
--- a/core/res/res/drawable-hdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-hdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_email_generic.png b/core/res/res/drawable-hdpi/stat_notify_email_generic.png
new file mode 100755
index 0000000..78003fa
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_gmail.png b/core/res/res/drawable-hdpi/stat_notify_gmail.png
new file mode 100755
index 0000000..7356309
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_instant_message.png b/core/res/res/drawable-hdpi/stat_notify_instant_message.png
new file mode 100755
index 0000000..9fc8262
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_instant_message.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_marketplace_update.png b/core/res/res/drawable-hdpi/stat_notify_marketplace_update.png
new file mode 100755
index 0000000..c0d0284
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_marketplace_update.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_missed_call.png b/core/res/res/drawable-hdpi/stat_notify_missed_call.png
index 192574d..d1173b4 100755
--- a/core/res/res/drawable-hdpi/stat_notify_missed_call.png
+++ b/core/res/res/drawable-hdpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_mms.png b/core/res/res/drawable-hdpi/stat_notify_mms.png
new file mode 100755
index 0000000..eed8c45
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_mms.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_more_notifications.png b/core/res/res/drawable-hdpi/stat_notify_more_notifications.png
new file mode 100755
index 0000000..f54b3d4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_more_notifications.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_musicplayer.png b/core/res/res/drawable-hdpi/stat_notify_musicplayer.png
new file mode 100755
index 0000000..1301f86
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_musicplayer.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_myfaves.png b/core/res/res/drawable-hdpi/stat_notify_myfaves.png
new file mode 100755
index 0000000..854c745
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_myfaves.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_picasa.png b/core/res/res/drawable-hdpi/stat_notify_picasa.png
new file mode 100755
index 0000000..9146185
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_picasa.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard.png b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
old mode 100644
new mode 100755
index d3b624b..dd947a5
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_alert.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_alert.png
new file mode 100755
index 0000000..fb2b26a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_alert.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
old mode 100644
new mode 100755
index a483ba2..4b9b9ca
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
index 3b14c26..8865bda 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sms.png b/core/res/res/drawable-hdpi/stat_notify_sms.png
new file mode 100755
index 0000000..66981ba
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sms.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sms_failed.png b/core/res/res/drawable-hdpi/stat_notify_sms_failed.png
new file mode 100755
index 0000000..49a0d50
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sms_failed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync.png b/core/res/res/drawable-hdpi/stat_notify_sync.png
index 6f9cf84..004cfab 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sync.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_alert.png b/core/res/res/drawable-hdpi/stat_notify_sync_alert.png
new file mode 100755
index 0000000..26b2446
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_alert.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
index 6f9cf84..6973fc5 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim1.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim1.png
new file mode 100755
index 0000000..f9d4b32
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim2.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim2.png
new file mode 100755
index 0000000..06ff588
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim3.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim3.png
new file mode 100755
index 0000000..20d1720
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim4.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim4.png
new file mode 100755
index 0000000..a217034
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim5.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim5.png
new file mode 100755
index 0000000..8d733ec
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_system_update.png b/core/res/res/drawable-hdpi/stat_notify_system_update.png
new file mode 100755
index 0000000..f4365a5
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_system_update.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_usb_debugger.png b/core/res/res/drawable-hdpi/stat_notify_usb_debugger.png
new file mode 100755
index 0000000..fdf6c6c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_usb_debugger.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_voicemail.png b/core/res/res/drawable-hdpi/stat_notify_voicemail.png
index 70b2411..5b77846 100755
--- a/core/res/res/drawable-hdpi/stat_notify_voicemail.png
+++ b/core/res/res/drawable-hdpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_10.png b/core/res/res/drawable-hdpi/stat_sys_battery_10.png
old mode 100644
new mode 100755
index c81616b..4486553
--- a/core/res/res/drawable-hdpi/stat_sys_battery_10.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_10.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_100.png b/core/res/res/drawable-hdpi/stat_sys_battery_100.png
old mode 100644
new mode 100755
index e85f524..23b9e3b
--- a/core/res/res/drawable-hdpi/stat_sys_battery_100.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_100.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_20.png b/core/res/res/drawable-hdpi/stat_sys_battery_20.png
old mode 100644
new mode 100755
index eb5ef09..c8f9c92
--- a/core/res/res/drawable-hdpi/stat_sys_battery_20.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_20.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_40.png b/core/res/res/drawable-hdpi/stat_sys_battery_40.png
old mode 100644
new mode 100755
index ca70784..8d7e1d5
--- a/core/res/res/drawable-hdpi/stat_sys_battery_40.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_40.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_60.png b/core/res/res/drawable-hdpi/stat_sys_battery_60.png
old mode 100644
new mode 100755
index fee28db..cb674cc
--- a/core/res/res/drawable-hdpi/stat_sys_battery_60.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_60.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_80.png b/core/res/res/drawable-hdpi/stat_sys_battery_80.png
old mode 100644
new mode 100755
index 7f4a38f..5846df9
--- a/core/res/res/drawable-hdpi/stat_sys_battery_80.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_80.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim0.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim0.png
old mode 100644
new mode 100755
index 9a6c683..c7464f7
--- a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim1.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim1.png
old mode 100644
new mode 100755
index c40c622..997feb3
--- a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim2.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim2.png
old mode 100644
new mode 100755
index 2277096..bb8b022
--- a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim3.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim3.png
old mode 100644
new mode 100755
index 7a3b19e..212a25f
--- a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim4.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim4.png
old mode 100644
new mode 100755
index 5c23c13..b211ed6
--- a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim5.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim5.png
old mode 100644
new mode 100755
index 321545f..a52f81b
--- a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim5.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_empty.png b/core/res/res/drawable-hdpi/stat_sys_battery_empty.png
new file mode 100755
index 0000000..82f2509
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_empty.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_unknown.png b/core/res/res/drawable-hdpi/stat_sys_battery_unknown.png
old mode 100644
new mode 100755
index 1a9abaf..dadfe8d
--- a/core/res/res/drawable-hdpi/stat_sys_battery_unknown.png
+++ b/core/res/res/drawable-hdpi/stat_sys_battery_unknown.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_bluetooth_connected.png b/core/res/res/drawable-hdpi/stat_sys_bluetooth_connected.png
new file mode 100755
index 0000000..18c77df
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_bluetooth_connected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_1bar_wifi.png b/core/res/res/drawable-hdpi/stat_sys_data_1bar_wifi.png
new file mode 100755
index 0000000..aea18ed
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_1bar_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_1bar_wifi_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_1bar_wifi_fully.png
new file mode 100755
index 0000000..1a25a2c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_1bar_wifi_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_2bar_wifi.png b/core/res/res/drawable-hdpi/stat_sys_data_2bar_wifi.png
new file mode 100755
index 0000000..77e6ee4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_2bar_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_2bar_wifi_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_2bar_wifi_fully.png
new file mode 100755
index 0000000..00d86bf
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_2bar_wifi_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_3bar_wifi.png b/core/res/res/drawable-hdpi/stat_sys_data_3bar_wifi.png
new file mode 100755
index 0000000..c2574e1
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_3bar_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_3bar_wifi_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_3bar_wifi_fully.png
new file mode 100755
index 0000000..70c030b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_3bar_wifi_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_4bar_wifi.png b/core/res/res/drawable-hdpi/stat_sys_data_4bar_wifi.png
new file mode 100755
index 0000000..55caecf
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_4bar_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_4bar_wifi_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_4bar_wifi_fully.png
new file mode 100755
index 0000000..b5326d2
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_4bar_wifi_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
old mode 100644
new mode 100755
index 7a8b78f..e8fbc9e
--- a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_1x.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_1x.png
new file mode 100755
index 0000000..bdc8c27
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_1x_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_1x_fully.png
new file mode 100755
index 0000000..ba24082
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_1x_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_3g.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_3g.png
new file mode 100755
index 0000000..d0d1345
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_3g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_3g_fully.png
new file mode 100755
index 0000000..5af2b05
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_3g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_e.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_e.png
new file mode 100755
index 0000000..4211b8c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_e_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_e_fully.png
new file mode 100755
index 0000000..9909b09
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_e_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_g.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_g.png
new file mode 100755
index 0000000..d5ece7a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_g_fully.png
new file mode 100755
index 0000000..0e02b8d
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_h.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_h.png
new file mode 100755
index 0000000..6687b40
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_connected_h_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_connected_h_fully.png
new file mode 100755
index 0000000..f84ad32
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_connected_h_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_1x.png b/core/res/res/drawable-hdpi/stat_sys_data_in_1x.png
new file mode 100755
index 0000000..00a29a4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_1x_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_in_1x_fully.png
new file mode 100755
index 0000000..d80a8ce
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_1x_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_3g.png b/core/res/res/drawable-hdpi/stat_sys_data_in_3g.png
new file mode 100755
index 0000000..11ee0f2
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_3g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_in_3g_fully.png
new file mode 100755
index 0000000..31c976a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_3g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_e.png b/core/res/res/drawable-hdpi/stat_sys_data_in_e.png
new file mode 100755
index 0000000..fc135fc
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_e_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_in_e_fully.png
new file mode 100755
index 0000000..c299e12
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_e_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_g.png b/core/res/res/drawable-hdpi/stat_sys_data_in_g.png
new file mode 100755
index 0000000..3d33a62
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_in_g_fully.png
new file mode 100755
index 0000000..a487f29
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_h.png b/core/res/res/drawable-hdpi/stat_sys_data_in_h.png
new file mode 100755
index 0000000..f36e1eb
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_in_h_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_in_h_fully.png
new file mode 100755
index 0000000..816085b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_in_h_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_1x.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_1x.png
new file mode 100755
index 0000000..ef5dbf4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_1x_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_1x_fully.png
new file mode 100755
index 0000000..0132019
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_1x_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_3g.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_3g.png
new file mode 100755
index 0000000..dba9675
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_3g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_3g_fully.png
new file mode 100755
index 0000000..3903545
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_3g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_e.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_e.png
new file mode 100755
index 0000000..2e5d82e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_e_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_e_fully.png
new file mode 100755
index 0000000..ed099ff
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_e_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_g.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_g.png
new file mode 100755
index 0000000..0985a09
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_g_fully.png
new file mode 100755
index 0000000..c930e4c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_h.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_h.png
new file mode 100755
index 0000000..7a32c43
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_inandout_h_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_inandout_h_fully.png
new file mode 100755
index 0000000..407a06c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_inandout_h_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_nosignal_wifi.png b/core/res/res/drawable-hdpi/stat_sys_data_nosignal_wifi.png
new file mode 100755
index 0000000..98e874a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_nosignal_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_1x.png b/core/res/res/drawable-hdpi/stat_sys_data_out_1x.png
new file mode 100755
index 0000000..b622556
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_1x.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_1x_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_out_1x_fully.png
new file mode 100755
index 0000000..6141f72
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_1x_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_3g.png b/core/res/res/drawable-hdpi/stat_sys_data_out_3g.png
new file mode 100755
index 0000000..04ec59e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_3g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_3g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_out_3g_fully.png
new file mode 100755
index 0000000..d44a4cf
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_3g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_e.png b/core/res/res/drawable-hdpi/stat_sys_data_out_e.png
new file mode 100755
index 0000000..a47b982
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_e.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_e_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_out_e_fully.png
new file mode 100755
index 0000000..54ebd9b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_e_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_g.png b/core/res/res/drawable-hdpi/stat_sys_data_out_g.png
new file mode 100755
index 0000000..9d90e71
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_g.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_g_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_out_g_fully.png
new file mode 100755
index 0000000..2fe0bbf
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_g_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_h.png b/core/res/res/drawable-hdpi/stat_sys_data_out_h.png
new file mode 100755
index 0000000..920f290
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_h.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_out_h_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_out_h_fully.png
new file mode 100755
index 0000000..e58e019
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_out_h_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_usb.png b/core/res/res/drawable-hdpi/stat_sys_data_usb.png
index 4c14c07..e916fbb 100755
--- a/core/res/res/drawable-hdpi/stat_sys_data_usb.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim0.png b/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
index d9c9e4c..9df7799 100755
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
index 4f47db0..c3defd7 100755
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim2.png b/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
index e50d3c3..1302a06 100755
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim3.png b/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
index 6c1029c..c7f85bf 100755
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim4.png b/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
index 693f085..705dfd3 100755
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim5.png b/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
index eabe0ef..c0bdb13 100755
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_gps_acquiring.png b/core/res/res/drawable-hdpi/stat_sys_gps_acquiring.png
new file mode 100755
index 0000000..50be47e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_gps_acquiring.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_gps_on.png b/core/res/res/drawable-hdpi/stat_sys_gps_on.png
old mode 100644
new mode 100755
index 99a8c6c..8d2a6b0
--- a/core/res/res/drawable-hdpi/stat_sys_gps_on.png
+++ b/core/res/res/drawable-hdpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_install_complete.png b/core/res/res/drawable-hdpi/stat_sys_install_complete.png
new file mode 100755
index 0000000..c1478c4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_install_complete.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_phone_call.png b/core/res/res/drawable-hdpi/stat_sys_phone_call.png
old mode 100644
new mode 100755
index 950713b..9b5f075
--- a/core/res/res/drawable-hdpi/stat_sys_phone_call.png
+++ b/core/res/res/drawable-hdpi/stat_sys_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_phone_call_bluetooth.png b/core/res/res/drawable-hdpi/stat_sys_phone_call_bluetooth.png
new file mode 100755
index 0000000..003e6e4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_phone_call_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_phone_call_emergency.png b/core/res/res/drawable-hdpi/stat_sys_phone_call_emergency.png
new file mode 100755
index 0000000..f69f82c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_phone_call_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_phone_call_forward.png b/core/res/res/drawable-hdpi/stat_sys_phone_call_forward.png
old mode 100644
new mode 100755
index 07a2e9d..032f8f1
--- a/core/res/res/drawable-hdpi/stat_sys_phone_call_forward.png
+++ b/core/res/res/drawable-hdpi/stat_sys_phone_call_forward.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_phone_call_on_hold.png b/core/res/res/drawable-hdpi/stat_sys_phone_call_on_hold.png
old mode 100644
new mode 100755
index 033a558..5b0a68d
--- a/core/res/res/drawable-hdpi/stat_sys_phone_call_on_hold.png
+++ b/core/res/res/drawable-hdpi/stat_sys_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_3_cdma.png
old mode 100644
new mode 100755
index 0a32d2e..1d2f966
--- a/core/res/res/drawable-hdpi/stat_sys_r_signal_3_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_4_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_4_cdma_fully.png
new file mode 100755
index 0000000..7ff8820
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_4_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_0.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_0.png
new file mode 100755
index 0000000..d128053
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_1.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_1.png
new file mode 100755
index 0000000..ecd46e9
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_1_fully.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_1_fully.png
new file mode 100755
index 0000000..4462bce
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_1_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_2.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_2.png
new file mode 100755
index 0000000..d635d8c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_2_fully.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_2_fully.png
new file mode 100755
index 0000000..cfca5d2
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_2_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_3.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_3.png
new file mode 100755
index 0000000..e470925
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_3_fully.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_3_fully.png
new file mode 100755
index 0000000..d290699
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_4.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_4.png
new file mode 100755
index 0000000..ef47408
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_4_fully.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_4_fully.png
new file mode 100755
index 0000000..26cb22b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_r_signal_cdma_4_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_0_cdma.png
old mode 100644
new mode 100755
index 3333933..901058a
--- a/core/res/res/drawable-hdpi/stat_sys_ra_signal_0_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_ra_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma.png
old mode 100644
new mode 100755
index 6d69ed6..f5c5f98
--- a/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma_fully.png
new file mode 100755
index 0000000..f71a35c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma.png
old mode 100644
new mode 100755
index a78957d..82102b2
--- a/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma_fully.png
new file mode 100755
index 0000000..6818f43
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_3_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_3_cdma_fully.png
new file mode 100755
index 0000000..7d8dc5b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_ra_signal_3_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_4_cdma.png
old mode 100644
new mode 100755
index 44c1dca..c08cc86
--- a/core/res/res/drawable-hdpi/stat_sys_ra_signal_4_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_ra_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ringer_silent.png b/core/res/res/drawable-hdpi/stat_sys_ringer_silent.png
new file mode 100755
index 0000000..5a741bb
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_ringer_silent.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_ringer_vibrate.png b/core/res/res/drawable-hdpi/stat_sys_ringer_vibrate.png
new file mode 100755
index 0000000..7ff375a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_ringer_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_secure.png b/core/res/res/drawable-hdpi/stat_sys_secure.png
old mode 100644
new mode 100755
index 4bae258..0889e49
--- a/core/res/res/drawable-hdpi/stat_sys_secure.png
+++ b/core/res/res/drawable-hdpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_0.png b/core/res/res/drawable-hdpi/stat_sys_signal_0.png
new file mode 100755
index 0000000..2f66b1d
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_0_cdma.png
index 3c7db08..af43e00 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_0_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_1.png b/core/res/res/drawable-hdpi/stat_sys_signal_1.png
new file mode 100755
index 0000000..b91eaf5
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma.png
index f8f40a8..4ffe421 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma_fully.png
new file mode 100755
index 0000000..cd8e314
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_1_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_1_fully.png
new file mode 100755
index 0000000..cb1ad97
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_2.png b/core/res/res/drawable-hdpi/stat_sys_signal_2.png
new file mode 100755
index 0000000..53217e4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma.png
index a243195..6f27b96 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma_fully.png
new file mode 100755
index 0000000..416a544
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_2_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_2_fully.png
new file mode 100755
index 0000000..74ecb08
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_3.png b/core/res/res/drawable-hdpi/stat_sys_signal_3.png
new file mode 100755
index 0000000..08f357f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma.png
index 9c369e7..ddc46b0 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma_fully.png
new file mode 100755
index 0000000..341116e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_3_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_3_fully.png
new file mode 100755
index 0000000..929c700
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_4.png b/core/res/res/drawable-hdpi/stat_sys_signal_4.png
new file mode 100755
index 0000000..b3bb321
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma.png
index 219bbbd..fb3cfe9 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma_fully.png
new file mode 100755
index 0000000..ae83e93
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_4_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_4_fully.png
new file mode 100755
index 0000000..4644ac1
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_0.png
index ae18ecd..b697ca4 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1.png
index 4fed92c..a61de4d 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1_fully.png
new file mode 100755
index 0000000..9fa018b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2.png
index 96f1248..62e0393 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2_fully.png
new file mode 100755
index 0000000..0324d9f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3.png
index b0e1328..09eae9d 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3_fully.png
new file mode 100755
index 0000000..1ffde3d
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4.png
index da15645..4012ac5 100755
--- a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4_fully.png
new file mode 100755
index 0000000..22f7e42
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_flightmode.png b/core/res/res/drawable-hdpi/stat_sys_signal_flightmode.png
new file mode 100755
index 0000000..01c7e2a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_flightmode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_null.png b/core/res/res/drawable-hdpi/stat_sys_signal_null.png
new file mode 100755
index 0000000..03d2147
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_0.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_0.png
new file mode 100755
index 0000000..5796a8a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_1.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_1.png
new file mode 100755
index 0000000..3dec269
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_1_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_1_fully.png
new file mode 100755
index 0000000..eeb7f67
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_1_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_2.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_2.png
new file mode 100755
index 0000000..2dcff93
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_2_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_2_fully.png
new file mode 100755
index 0000000..aee093a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_2_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_3.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_3.png
new file mode 100755
index 0000000..1b38450
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_3_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_3_fully.png
new file mode 100755
index 0000000..a40017f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_4.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_4.png
new file mode 100755
index 0000000..33bf3b3
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_roaming_4_fully.png b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_4_fully.png
new file mode 100755
index 0000000..c3b44ee
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_signal_roaming_4_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
old mode 100644
new mode 100755
index 51dea58..21f96c4
--- a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_throttled.png b/core/res/res/drawable-hdpi/stat_sys_throttled.png
old mode 100644
new mode 100755
index 33c0521..58eafc0
--- a/core/res/res/drawable-hdpi/stat_sys_throttled.png
+++ b/core/res/res/drawable-hdpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
index d72afbe..cefcecc 100755
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
index 5de2873..9d018d0 100755
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
index dd0b49f..38a20a6 100755
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
index 8ac29b3..f517809 100755
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
index 26c3e714..3ae614e 100755
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
index 431ac6b..d0638ef 100755
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_vp_phone_call.png b/core/res/res/drawable-hdpi/stat_sys_vp_phone_call.png
old mode 100644
new mode 100755
index dfb3424..83e8ead
--- a/core/res/res/drawable-hdpi/stat_sys_vp_phone_call.png
+++ b/core/res/res/drawable-hdpi/stat_sys_vp_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_vp_phone_call_on_hold.png b/core/res/res/drawable-hdpi/stat_sys_vp_phone_call_on_hold.png
old mode 100644
new mode 100755
index 402295b..9731c46
--- a/core/res/res/drawable-hdpi/stat_sys_vp_phone_call_on_hold.png
+++ b/core/res/res/drawable-hdpi/stat_sys_vp_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_warning.png b/core/res/res/drawable-hdpi/stat_sys_warning.png
old mode 100644
new mode 100755
index 37c8853..b3a18b3
--- a/core/res/res/drawable-hdpi/stat_sys_warning.png
+++ b/core/res/res/drawable-hdpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/status_bar_close_on.9.png b/core/res/res/drawable-hdpi/status_bar_close_on.9.png
old mode 100644
new mode 100755
index f313ffb..87d1944
--- a/core/res/res/drawable-hdpi/status_bar_close_on.9.png
+++ b/core/res/res/drawable-hdpi/status_bar_close_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/status_bar_header_background.9.png b/core/res/res/drawable-hdpi/status_bar_header_background.9.png
old mode 100644
new mode 100755
index 37b5fef..79d77aa
--- a/core/res/res/drawable-hdpi/status_bar_header_background.9.png
+++ b/core/res/res/drawable-hdpi/status_bar_header_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/statusbar_background.9.png b/core/res/res/drawable-hdpi/statusbar_background.9.png
index a4be298..67c8b7f 100644
--- a/core/res/res/drawable-hdpi/statusbar_background.9.png
+++ b/core/res/res/drawable-hdpi/statusbar_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focus.9.png b/core/res/res/drawable-hdpi/tab_focus.9.png
index 6e8a71f..7591c07 100644
--- a/core/res/res/drawable-hdpi/tab_focus.9.png
+++ b/core/res/res/drawable-hdpi/tab_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png b/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png
old mode 100644
new mode 100755
index 51194a4..0ee8347
--- a/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png
+++ b/core/res/res/drawable-hdpi/tab_focus_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png b/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png
old mode 100644
new mode 100755
index 51194a4..0ee8347
--- a/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png
+++ b/core/res/res/drawable-hdpi/tab_focus_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_press.9.png b/core/res/res/drawable-hdpi/tab_press.9.png
old mode 100644
new mode 100755
index 119b2c6..01798a3
--- a/core/res/res/drawable-hdpi/tab_press.9.png
+++ b/core/res/res/drawable-hdpi/tab_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_press_bar_left.9.png b/core/res/res/drawable-hdpi/tab_press_bar_left.9.png
old mode 100644
new mode 100755
index dc2fbce..ee129ba
--- a/core/res/res/drawable-hdpi/tab_press_bar_left.9.png
+++ b/core/res/res/drawable-hdpi/tab_press_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_press_bar_right.9.png b/core/res/res/drawable-hdpi/tab_press_bar_right.9.png
old mode 100644
new mode 100755
index dc2fbce..ee129ba
--- a/core/res/res/drawable-hdpi/tab_press_bar_right.9.png
+++ b/core/res/res/drawable-hdpi/tab_press_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_selected.9.png b/core/res/res/drawable-hdpi/tab_selected.9.png
old mode 100644
new mode 100755
index f036b9a..6ee775f
--- a/core/res/res/drawable-hdpi/tab_selected.9.png
+++ b/core/res/res/drawable-hdpi/tab_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png b/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png
old mode 100644
new mode 100755
index aa935fe..03bcc13
--- a/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png
+++ b/core/res/res/drawable-hdpi/tab_selected_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png b/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png
old mode 100644
new mode 100755
index aa935fe..f228445
--- a/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png
+++ b/core/res/res/drawable-hdpi/tab_selected_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_unselected.9.png b/core/res/res/drawable-hdpi/tab_unselected.9.png
old mode 100644
new mode 100755
index c3a1f30..67561e2
--- a/core/res/res/drawable-hdpi/tab_unselected.9.png
+++ b/core/res/res/drawable-hdpi/tab_unselected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_default.9.png b/core/res/res/drawable-hdpi/textfield_default.9.png
old mode 100644
new mode 100755
index 4c20179..a5d7d6a
--- a/core/res/res/drawable-hdpi/textfield_default.9.png
+++ b/core/res/res/drawable-hdpi/textfield_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_disabled.9.png b/core/res/res/drawable-hdpi/textfield_disabled.9.png
old mode 100644
new mode 100755
index 81569d1..62bb455
--- a/core/res/res/drawable-hdpi/textfield_disabled.9.png
+++ b/core/res/res/drawable-hdpi/textfield_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_disabled_selected.9.png b/core/res/res/drawable-hdpi/textfield_disabled_selected.9.png
old mode 100644
new mode 100755
index 2591490..bde1233
--- a/core/res/res/drawable-hdpi/textfield_disabled_selected.9.png
+++ b/core/res/res/drawable-hdpi/textfield_disabled_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_pressed.9.png b/core/res/res/drawable-hdpi/textfield_pressed.9.png
old mode 100644
new mode 100755
index a42d87f..fb4b528
--- a/core/res/res/drawable-hdpi/textfield_pressed.9.png
+++ b/core/res/res/drawable-hdpi/textfield_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_selected.9.png b/core/res/res/drawable-hdpi/textfield_selected.9.png
old mode 100644
new mode 100755
index a36ed72..28b4877
--- a/core/res/res/drawable-hdpi/textfield_selected.9.png
+++ b/core/res/res/drawable-hdpi/textfield_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/title_bar_shadow.9.png b/core/res/res/drawable-hdpi/title_bar_shadow.9.png
old mode 100644
new mode 100755
index e6dab63..c3a0a23
--- a/core/res/res/drawable-hdpi/title_bar_shadow.9.png
+++ b/core/res/res/drawable-hdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_account_list.png b/core/res/res/drawable-mdpi/ic_menu_account_list.png
index f0945b2..d3af01b 100644
--- a/core/res/res/drawable-mdpi/ic_menu_account_list.png
+++ b/core/res/res/drawable-mdpi/ic_menu_account_list.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_add.png b/core/res/res/drawable-mdpi/ic_menu_add.png
old mode 100755
new mode 100644
index 6752bfd..57a4099
--- a/core/res/res/drawable-mdpi/ic_menu_add.png
+++ b/core/res/res/drawable-mdpi/ic_menu_add.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_agenda.png b/core/res/res/drawable-mdpi/ic_menu_agenda.png
old mode 100755
new mode 100644
index 9f2c1dc..3fb0031
--- a/core/res/res/drawable-mdpi/ic_menu_agenda.png
+++ b/core/res/res/drawable-mdpi/ic_menu_agenda.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_allfriends.png b/core/res/res/drawable-mdpi/ic_menu_allfriends.png
old mode 100755
new mode 100644
index a5bd331..e4e2727
--- a/core/res/res/drawable-mdpi/ic_menu_allfriends.png
+++ b/core/res/res/drawable-mdpi/ic_menu_allfriends.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_always_landscape_portrait.png b/core/res/res/drawable-mdpi/ic_menu_always_landscape_portrait.png
index 68911c4..451ccc9 100644
--- a/core/res/res/drawable-mdpi/ic_menu_always_landscape_portrait.png
+++ b/core/res/res/drawable-mdpi/ic_menu_always_landscape_portrait.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_archive.png b/core/res/res/drawable-mdpi/ic_menu_archive.png
index a4599e3..7231fbb5 100644
--- a/core/res/res/drawable-mdpi/ic_menu_archive.png
+++ b/core/res/res/drawable-mdpi/ic_menu_archive.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_attachment.png b/core/res/res/drawable-mdpi/ic_menu_attachment.png
index 89d626f..83e0687 100644
--- a/core/res/res/drawable-mdpi/ic_menu_attachment.png
+++ b/core/res/res/drawable-mdpi/ic_menu_attachment.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_back.png b/core/res/res/drawable-mdpi/ic_menu_back.png
index 5ce50eb..91fa3e7 100644
--- a/core/res/res/drawable-mdpi/ic_menu_back.png
+++ b/core/res/res/drawable-mdpi/ic_menu_back.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_block.png b/core/res/res/drawable-mdpi/ic_menu_block.png
index 422eeb1..fce9297 100644
--- a/core/res/res/drawable-mdpi/ic_menu_block.png
+++ b/core/res/res/drawable-mdpi/ic_menu_block.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_blocked_user.png b/core/res/res/drawable-mdpi/ic_menu_blocked_user.png
index 5a5619b..5532245 100644
--- a/core/res/res/drawable-mdpi/ic_menu_blocked_user.png
+++ b/core/res/res/drawable-mdpi/ic_menu_blocked_user.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_call.png b/core/res/res/drawable-mdpi/ic_menu_call.png
index a63f86b..eb05949 100644
--- a/core/res/res/drawable-mdpi/ic_menu_call.png
+++ b/core/res/res/drawable-mdpi/ic_menu_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_camera.png b/core/res/res/drawable-mdpi/ic_menu_camera.png
old mode 100755
new mode 100644
index cdf7ca3..7fddf7c
--- a/core/res/res/drawable-mdpi/ic_menu_camera.png
+++ b/core/res/res/drawable-mdpi/ic_menu_camera.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cc.png b/core/res/res/drawable-mdpi/ic_menu_cc.png
index 4876021..97fb663 100644
--- a/core/res/res/drawable-mdpi/ic_menu_cc.png
+++ b/core/res/res/drawable-mdpi/ic_menu_cc.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_chat_dashboard.png b/core/res/res/drawable-mdpi/ic_menu_chat_dashboard.png
index 37fd3cbd..54e9023 100644
--- a/core/res/res/drawable-mdpi/ic_menu_chat_dashboard.png
+++ b/core/res/res/drawable-mdpi/ic_menu_chat_dashboard.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_clear_playlist.png b/core/res/res/drawable-mdpi/ic_menu_clear_playlist.png
index 750db62..52791a0 100644
--- a/core/res/res/drawable-mdpi/ic_menu_clear_playlist.png
+++ b/core/res/res/drawable-mdpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_close_clear_cancel.png b/core/res/res/drawable-mdpi/ic_menu_close_clear_cancel.png
index 78222ea..04a76b5 100644
--- a/core/res/res/drawable-mdpi/ic_menu_close_clear_cancel.png
+++ b/core/res/res/drawable-mdpi/ic_menu_close_clear_cancel.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_compass.png b/core/res/res/drawable-mdpi/ic_menu_compass.png
index 7717dde..b5f885e 100644
--- a/core/res/res/drawable-mdpi/ic_menu_compass.png
+++ b/core/res/res/drawable-mdpi/ic_menu_compass.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_compose.png b/core/res/res/drawable-mdpi/ic_menu_compose.png
index 1b4733e..121228c 100644
--- a/core/res/res/drawable-mdpi/ic_menu_compose.png
+++ b/core/res/res/drawable-mdpi/ic_menu_compose.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_crop.png b/core/res/res/drawable-mdpi/ic_menu_crop.png
old mode 100755
new mode 100644
index c0df996..4892ca0
--- a/core/res/res/drawable-mdpi/ic_menu_crop.png
+++ b/core/res/res/drawable-mdpi/ic_menu_crop.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_day.png b/core/res/res/drawable-mdpi/ic_menu_day.png
old mode 100755
new mode 100644
index db5d3a4..f366c1b
--- a/core/res/res/drawable-mdpi/ic_menu_day.png
+++ b/core/res/res/drawable-mdpi/ic_menu_day.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_delete.png b/core/res/res/drawable-mdpi/ic_menu_delete.png
old mode 100755
new mode 100644
index 7d95494..bb533f7
--- a/core/res/res/drawable-mdpi/ic_menu_delete.png
+++ b/core/res/res/drawable-mdpi/ic_menu_delete.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_directions.png b/core/res/res/drawable-mdpi/ic_menu_directions.png
old mode 100755
new mode 100644
index 00a288f..fbac73d
--- a/core/res/res/drawable-mdpi/ic_menu_directions.png
+++ b/core/res/res/drawable-mdpi/ic_menu_directions.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_edit.png b/core/res/res/drawable-mdpi/ic_menu_edit.png
old mode 100755
new mode 100644
index 41a9c2e..1de85ca
--- a/core/res/res/drawable-mdpi/ic_menu_edit.png
+++ b/core/res/res/drawable-mdpi/ic_menu_edit.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_emoticons.png b/core/res/res/drawable-mdpi/ic_menu_emoticons.png
index e8c4e47..95fd566 100644
--- a/core/res/res/drawable-mdpi/ic_menu_emoticons.png
+++ b/core/res/res/drawable-mdpi/ic_menu_emoticons.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_end_conversation.png b/core/res/res/drawable-mdpi/ic_menu_end_conversation.png
index 0ea0fcb..9ddb03e 100644
--- a/core/res/res/drawable-mdpi/ic_menu_end_conversation.png
+++ b/core/res/res/drawable-mdpi/ic_menu_end_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_forward.png b/core/res/res/drawable-mdpi/ic_menu_forward.png
index 0936fac..632e4f6 100644
--- a/core/res/res/drawable-mdpi/ic_menu_forward.png
+++ b/core/res/res/drawable-mdpi/ic_menu_forward.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_friendslist.png b/core/res/res/drawable-mdpi/ic_menu_friendslist.png
index 8ec6b1a..45baa48 100644
--- a/core/res/res/drawable-mdpi/ic_menu_friendslist.png
+++ b/core/res/res/drawable-mdpi/ic_menu_friendslist.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_gallery.png b/core/res/res/drawable-mdpi/ic_menu_gallery.png
old mode 100755
new mode 100644
index a3deef1..2d74993
--- a/core/res/res/drawable-mdpi/ic_menu_gallery.png
+++ b/core/res/res/drawable-mdpi/ic_menu_gallery.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_goto.png b/core/res/res/drawable-mdpi/ic_menu_goto.png
index 40183eb..3810d54 100644
--- a/core/res/res/drawable-mdpi/ic_menu_goto.png
+++ b/core/res/res/drawable-mdpi/ic_menu_goto.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_help.png b/core/res/res/drawable-mdpi/ic_menu_help.png
index 7c55dfd..4f65a61 100644
--- a/core/res/res/drawable-mdpi/ic_menu_help.png
+++ b/core/res/res/drawable-mdpi/ic_menu_help.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_home.png b/core/res/res/drawable-mdpi/ic_menu_home.png
index 34943f6..23dcecd 100644
--- a/core/res/res/drawable-mdpi/ic_menu_home.png
+++ b/core/res/res/drawable-mdpi/ic_menu_home.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_info_details.png b/core/res/res/drawable-mdpi/ic_menu_info_details.png
old mode 100755
new mode 100644
index 1786d1e..1f8a7cd
--- a/core/res/res/drawable-mdpi/ic_menu_info_details.png
+++ b/core/res/res/drawable-mdpi/ic_menu_info_details.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_invite.png b/core/res/res/drawable-mdpi/ic_menu_invite.png
index 7577e6d..ccbf317 100644
--- a/core/res/res/drawable-mdpi/ic_menu_invite.png
+++ b/core/res/res/drawable-mdpi/ic_menu_invite.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_login.png b/core/res/res/drawable-mdpi/ic_menu_login.png
index 2b856bc..d489787 100644
--- a/core/res/res/drawable-mdpi/ic_menu_login.png
+++ b/core/res/res/drawable-mdpi/ic_menu_login.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_manage.png b/core/res/res/drawable-mdpi/ic_menu_manage.png
old mode 100755
new mode 100644
index f155bbc..a96bb0c
--- a/core/res/res/drawable-mdpi/ic_menu_manage.png
+++ b/core/res/res/drawable-mdpi/ic_menu_manage.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_mapmode.png b/core/res/res/drawable-mdpi/ic_menu_mapmode.png
index d85cab5..ef453e1 100644
--- a/core/res/res/drawable-mdpi/ic_menu_mapmode.png
+++ b/core/res/res/drawable-mdpi/ic_menu_mapmode.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_mark.png b/core/res/res/drawable-mdpi/ic_menu_mark.png
index 5e95da7..d2a0116 100644
--- a/core/res/res/drawable-mdpi/ic_menu_mark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_mark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_month.png b/core/res/res/drawable-mdpi/ic_menu_month.png
old mode 100755
new mode 100644
index bf6cb89..d5285ab
--- a/core/res/res/drawable-mdpi/ic_menu_month.png
+++ b/core/res/res/drawable-mdpi/ic_menu_month.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_more.png b/core/res/res/drawable-mdpi/ic_menu_more.png
index b9fc5fa..168dcd3 100644
--- a/core/res/res/drawable-mdpi/ic_menu_more.png
+++ b/core/res/res/drawable-mdpi/ic_menu_more.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_my_calendar.png b/core/res/res/drawable-mdpi/ic_menu_my_calendar.png
old mode 100755
new mode 100644
index 0c88fd3..c1c9c20
--- a/core/res/res/drawable-mdpi/ic_menu_my_calendar.png
+++ b/core/res/res/drawable-mdpi/ic_menu_my_calendar.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_mylocation.png b/core/res/res/drawable-mdpi/ic_menu_mylocation.png
old mode 100755
new mode 100644
index fdbd5ca..9ee5024
--- a/core/res/res/drawable-mdpi/ic_menu_mylocation.png
+++ b/core/res/res/drawable-mdpi/ic_menu_mylocation.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_myplaces.png b/core/res/res/drawable-mdpi/ic_menu_myplaces.png
index 06f11ba..040f9b1 100644
--- a/core/res/res/drawable-mdpi/ic_menu_myplaces.png
+++ b/core/res/res/drawable-mdpi/ic_menu_myplaces.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_notifications.png b/core/res/res/drawable-mdpi/ic_menu_notifications.png
index 866d4e0..f361e82 100644
--- a/core/res/res/drawable-mdpi/ic_menu_notifications.png
+++ b/core/res/res/drawable-mdpi/ic_menu_notifications.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_play_clip.png b/core/res/res/drawable-mdpi/ic_menu_play_clip.png
index 4669947..8a01f70 100644
--- a/core/res/res/drawable-mdpi/ic_menu_play_clip.png
+++ b/core/res/res/drawable-mdpi/ic_menu_play_clip.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_preferences.png b/core/res/res/drawable-mdpi/ic_menu_preferences.png
index 60dbff6..2f34c76 100644
--- a/core/res/res/drawable-mdpi/ic_menu_preferences.png
+++ b/core/res/res/drawable-mdpi/ic_menu_preferences.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_recent_history.png b/core/res/res/drawable-mdpi/ic_menu_recent_history.png
index 4ccae5d..4722cbb 100644
--- a/core/res/res/drawable-mdpi/ic_menu_recent_history.png
+++ b/core/res/res/drawable-mdpi/ic_menu_recent_history.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_refresh.png b/core/res/res/drawable-mdpi/ic_menu_refresh.png
index 77d70dd..c3551bec 100644
--- a/core/res/res/drawable-mdpi/ic_menu_refresh.png
+++ b/core/res/res/drawable-mdpi/ic_menu_refresh.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_report_image.png b/core/res/res/drawable-mdpi/ic_menu_report_image.png
index 393d727..4f128d7 100644
--- a/core/res/res/drawable-mdpi/ic_menu_report_image.png
+++ b/core/res/res/drawable-mdpi/ic_menu_report_image.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_revert.png b/core/res/res/drawable-mdpi/ic_menu_revert.png
index e7e04f5..2afc8e8 100644
--- a/core/res/res/drawable-mdpi/ic_menu_revert.png
+++ b/core/res/res/drawable-mdpi/ic_menu_revert.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_rotate.png b/core/res/res/drawable-mdpi/ic_menu_rotate.png
old mode 100755
new mode 100644
index 27368b2..547d4ca
--- a/core/res/res/drawable-mdpi/ic_menu_rotate.png
+++ b/core/res/res/drawable-mdpi/ic_menu_rotate.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_save.png b/core/res/res/drawable-mdpi/ic_menu_save.png
index 36d50b3..ffd7fb7 100644
--- a/core/res/res/drawable-mdpi/ic_menu_save.png
+++ b/core/res/res/drawable-mdpi/ic_menu_save.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_search.png b/core/res/res/drawable-mdpi/ic_menu_search.png
old mode 100755
new mode 100644
index 94446db..ef949d5
--- a/core/res/res/drawable-mdpi/ic_menu_search.png
+++ b/core/res/res/drawable-mdpi/ic_menu_search.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_send.png b/core/res/res/drawable-mdpi/ic_menu_send.png
old mode 100755
new mode 100644
index 74c096d..672ab71
--- a/core/res/res/drawable-mdpi/ic_menu_send.png
+++ b/core/res/res/drawable-mdpi/ic_menu_send.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_set_as.png b/core/res/res/drawable-mdpi/ic_menu_set_as.png
old mode 100755
new mode 100644
index cb9dc49..e2c92ef
--- a/core/res/res/drawable-mdpi/ic_menu_set_as.png
+++ b/core/res/res/drawable-mdpi/ic_menu_set_as.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_share.png b/core/res/res/drawable-mdpi/ic_menu_share.png
old mode 100755
new mode 100644
index 44db9b1..b7c1c25
--- a/core/res/res/drawable-mdpi/ic_menu_share.png
+++ b/core/res/res/drawable-mdpi/ic_menu_share.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_slideshow.png b/core/res/res/drawable-mdpi/ic_menu_slideshow.png
index 04fda7f..08a40f2 100644
--- a/core/res/res/drawable-mdpi/ic_menu_slideshow.png
+++ b/core/res/res/drawable-mdpi/ic_menu_slideshow.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_sort_alphabetically.png b/core/res/res/drawable-mdpi/ic_menu_sort_alphabetically.png
old mode 100755
new mode 100644
index 2583eb8..06d5c74
--- a/core/res/res/drawable-mdpi/ic_menu_sort_alphabetically.png
+++ b/core/res/res/drawable-mdpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_sort_by_size.png b/core/res/res/drawable-mdpi/ic_menu_sort_by_size.png
old mode 100755
new mode 100644
index 65e2786..3c39953
--- a/core/res/res/drawable-mdpi/ic_menu_sort_by_size.png
+++ b/core/res/res/drawable-mdpi/ic_menu_sort_by_size.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_star.png b/core/res/res/drawable-mdpi/ic_menu_star.png
old mode 100755
new mode 100644
index 527d74a..cf50cf9
--- a/core/res/res/drawable-mdpi/ic_menu_star.png
+++ b/core/res/res/drawable-mdpi/ic_menu_star.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_start_conversation.png b/core/res/res/drawable-mdpi/ic_menu_start_conversation.png
index aadcc2f..10ef649 100644
--- a/core/res/res/drawable-mdpi/ic_menu_start_conversation.png
+++ b/core/res/res/drawable-mdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_stop.png b/core/res/res/drawable-mdpi/ic_menu_stop.png
index 4fc825c..51efa91 100644
--- a/core/res/res/drawable-mdpi/ic_menu_stop.png
+++ b/core/res/res/drawable-mdpi/ic_menu_stop.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_today.png b/core/res/res/drawable-mdpi/ic_menu_today.png
old mode 100755
new mode 100644
index c63b6af..2b15f29
--- a/core/res/res/drawable-mdpi/ic_menu_today.png
+++ b/core/res/res/drawable-mdpi/ic_menu_today.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_upload.png b/core/res/res/drawable-mdpi/ic_menu_upload.png
old mode 100755
new mode 100644
index 1c0dd3f..04f3a2c8
--- a/core/res/res/drawable-mdpi/ic_menu_upload.png
+++ b/core/res/res/drawable-mdpi/ic_menu_upload.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_upload_you_tube.png b/core/res/res/drawable-mdpi/ic_menu_upload_you_tube.png
old mode 100755
new mode 100644
index 0095564..add453b
--- a/core/res/res/drawable-mdpi/ic_menu_upload_you_tube.png
+++ b/core/res/res/drawable-mdpi/ic_menu_upload_you_tube.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_view.png b/core/res/res/drawable-mdpi/ic_menu_view.png
old mode 100755
new mode 100644
index 69828a9..6aeac7f
--- a/core/res/res/drawable-mdpi/ic_menu_view.png
+++ b/core/res/res/drawable-mdpi/ic_menu_view.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_week.png b/core/res/res/drawable-mdpi/ic_menu_week.png
old mode 100755
new mode 100644
index 62cd65e..cba437c
--- a/core/res/res/drawable-mdpi/ic_menu_week.png
+++ b/core/res/res/drawable-mdpi/ic_menu_week.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_zoom.png b/core/res/res/drawable-mdpi/ic_menu_zoom.png
index 0b8c4e8..9695c69 100644
--- a/core/res/res/drawable-mdpi/ic_menu_zoom.png
+++ b/core/res/res/drawable-mdpi/ic_menu_zoom.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_search_category_default.png b/core/res/res/drawable-mdpi/ic_search_category_default.png
old mode 100755
new mode 100644
index 94446db..9b55383
--- a/core/res/res/drawable-mdpi/ic_search_category_default.png
+++ b/core/res/res/drawable-mdpi/ic_search_category_default.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_background.9.png b/core/res/res/drawable-mdpi/menu_background.9.png
index 9f16df9..ee99583 100644
--- a/core/res/res/drawable-mdpi/menu_background.9.png
+++ b/core/res/res/drawable-mdpi/menu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_background_fill_parent_width.9.png b/core/res/res/drawable-mdpi/menu_background_fill_parent_width.9.png
index da3011b..d368983 100644
--- a/core/res/res/drawable-mdpi/menu_background_fill_parent_width.9.png
+++ b/core/res/res/drawable-mdpi/menu_background_fill_parent_width.9.png
Binary files differ
diff --git a/core/res/res/drawable/overscroll_glow.png b/core/res/res/drawable/overscroll_glow.png
deleted file mode 100644
index 69b456d..0000000
--- a/core/res/res/drawable/overscroll_glow.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 5913639..808b371 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -704,12 +704,12 @@
<string name="permdesc_movePackage">Allows an application to move application resources from internal to external media and vice versa.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_readLogs">read system log files</string>
+ <string name="permlab_readLogs">read sensitive log data</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_readLogs">Allows an application to read from the
system\'s various log files. This allows it to discover general
- information about what you are doing with the phone, but they should
- not contain any personal or private information.</string>
+ information about what you are doing with the phone, potentially
+ including personal or private information.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_diagnostic">read/write to resources owned by diag</string>
@@ -1379,7 +1379,7 @@
<!-- Other IM address type -->
<string name="imTypeOther">Other</string>
- <!-- Custom IM address type -->
+ <!-- Custom IM protocol type -->
<string name="imProtocolCustom">Custom</string>
<!-- AIM IM protocol type -->
<string name="imProtocolAim">AIM</string>
@@ -1407,6 +1407,15 @@
<!-- Custom organization type -->
<string name="orgTypeCustom">Custom</string>
+ <!-- Custom SIP address type -->
+ <string name="sipAddressTypeCustom">Custom</string>
+ <!-- Home SIP address type -->
+ <string name="sipAddressTypeHome">Home</string>
+ <!-- Work SIP address type -->
+ <string name="sipAddressTypeWork">Work</string>
+ <!-- Other SIP address type -->
+ <string name="sipAddressTypeOther">Other</string>
+
<!-- Attbution of a contact status update, when the time of update is unknown -->
<string name="contact_status_update_attribution">via <xliff:g id="source" example="Google Talk">%1$s</xliff:g></string>
diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd
index 3d630c9..36e12f6 100755
--- a/docs/html/guide/topics/resources/localization.jd
+++ b/docs/html/guide/topics/resources/localization.jd
@@ -433,12 +433,12 @@
href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a>.</p>
<h4>Creating and using a custom locale</h4>
-<p>A "custom" locale is a language/region combination that the
-Android system image does not explicitly support. (For a list of supported
-locales, see the <a href="{@docRoot}sdk/android-{@sdkCurrentVersion}.html">Android
-Version Notes</a>.) You can test how your application will run in a custom
-locale by creating a custom locale in the emulator. There are two ways to do
-this:</p>
+<p>A "custom" locale is a language/region combination that the Android
+system image does not explicitly support. (For a list of supported locales in
+Android platforms see the Version Notes in the <a
+href="{@docRoot}sdk/index.html">SDK</a> tab). You can test
+how your application will run in a custom locale by creating a custom locale in
+the emulator. There are two ways to do this:</p>
<ul>
<li>Use the Custom Locale application, which is accessible from the
diff --git a/docs/html/sdk/adt_download.jd b/docs/html/sdk/adt_download.jd
index 126c052..5e642d7 100644
--- a/docs/html/sdk/adt_download.jd
+++ b/docs/html/sdk/adt_download.jd
@@ -24,8 +24,8 @@
<tr>
<td>0.9.8</td>
<td><a href="http://dl-ssl.google.com/android/ADT-0.9.8.zip">ADT-0.9.8.zip</a></td>
- <td><nobr>{@adtZipBytes} bytes</nobr></td>
- <td>{@adtZipChecksum}</td>
+ <td><nobr>8703591 bytes</nobr></td>
+ <td>22070f8e52924605a3b3abf87c1ba39f</td>
<td>Requires SDK Tools, Revision 7 <em><nobr>September 2010</nobr></em></td>
</tr>
<tr>
diff --git a/docs/html/sdk/android-1.5.jd b/docs/html/sdk/android-1.5.jd
index 0c16b60..9ed798c 100644
--- a/docs/html/sdk/android-1.5.jd
+++ b/docs/html/sdk/android-1.5.jd
@@ -2,8 +2,6 @@
sdk.platform.version=1.5
sdk.platform.apiLevel=3
sdk.platform.majorMinor=major
-sdk.platform.releaseDate=April 2009
-sdk.platform.deployableDate=May 2009
@jd:body
@@ -43,7 +41,7 @@
<em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p>
<p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
-deployable to Android-powered handsets starting in {@sdkPlatformDeployableDate}.
+deployable to Android-powered handsets starting in May 2009.
The release includes new features for users and developers, as well as changes
in the Android framework API. </p>
diff --git a/docs/html/sdk/android-1.6.jd b/docs/html/sdk/android-1.6.jd
index c4e08ff..a01a5f6 100644
--- a/docs/html/sdk/android-1.6.jd
+++ b/docs/html/sdk/android-1.6.jd
@@ -2,8 +2,6 @@
sdk.platform.version=1.6
sdk.platform.apiLevel=4
sdk.platform.majorMinor=minor
-sdk.platform.releaseDate=December 2009
-sdk.platform.deployableDate=October 2009
@jd:body
@@ -43,7 +41,7 @@
<em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p>
<p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
-deployable to Android-powered handsets since {@sdkPlatformDeployableDate}.
+deployable to Android-powered handsets since October 2009.
The platform includes new features for users and developers, as well as changes
in the Android framework API. </p>
diff --git a/docs/html/sdk/android-2.0.1.jd b/docs/html/sdk/android-2.0.1.jd
index cacb6bf..0c8afb6 100644
--- a/docs/html/sdk/android-2.0.1.jd
+++ b/docs/html/sdk/android-2.0.1.jd
@@ -2,8 +2,6 @@
sdk.platform.version=2.0.1
sdk.platform.apiLevel=6
sdk.platform.majorMinor=minor
-sdk.platform.releaseDate=December 2009
-sdk.platform.deployableDate=December 2009
@jd:body
@@ -44,7 +42,7 @@
<em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p>
<p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
-deployable to Android-powered handsets starting in {@sdkPlatformDeployableDate}.
+deployable to Android-powered handsets starting in December 2009.
This release includes minor API
changes, bug fixes and framework behavioral changes. For information on changes
and fixes, see the <a href="#api">Framework API</a> section.</p>
diff --git a/docs/html/sdk/android-2.0.jd b/docs/html/sdk/android-2.0.jd
index a430f34..2c31923 100644
--- a/docs/html/sdk/android-2.0.jd
+++ b/docs/html/sdk/android-2.0.jd
@@ -2,8 +2,6 @@
sdk.platform.version=2.0
sdk.platform.apiLevel=5
sdk.platform.majorMinor=major
-sdk.platform.releaseDate=October 2009
-sdk.platform.deployableDate=November 2009
@jd:body
@@ -38,7 +36,7 @@
<em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p>
<p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
-deployable to Android-powered handsets starting in {@sdkPlatformDeployableDate}.
+deployable to Android-powered handsets starting in November 2009.
The release includes new features for users and developers, as well as changes
in the Android framework API. </p>
diff --git a/docs/html/sdk/android-2.1.jd b/docs/html/sdk/android-2.1.jd
index cd48a72..6eba6f09 100644
--- a/docs/html/sdk/android-2.1.jd
+++ b/docs/html/sdk/android-2.1.jd
@@ -2,7 +2,6 @@
sdk.platform.version=2.1
sdk.platform.apiLevel=7
sdk.platform.majorMinor=minor
-sdk.platform.deployableDate=January 2010
@jd:body
@@ -42,7 +41,7 @@
<em>API Level:</em> <strong>{@sdkPlatformApiLevel}</strong></p>
<p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
-deployable to Android-powered handsets starting in {@sdkPlatformDeployableDate}.
+deployable to Android-powered handsets starting in January 2010.
This release includes new API
changes and bug fixes. For information on changes, see the <a href="#api">Framework API</a>
section.</p>
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index 3d4b6a1..a984d56 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -1,5 +1,9 @@
page.title=ADT Plugin for Eclipse
sdk.preview=0
+adt.zip.version=0.9.8
+adt.zip.download=ADT-0.9.8.zip
+adt.zip.bytes=8703591
+adt.zip.checksum=22070f8e52924605a3b3abf87c1ba39f
@jd:body
diff --git a/docs/knowntags.txt b/docs/knowntags.txt
new file mode 100644
index 0000000..5bebabb
--- /dev/null
+++ b/docs/knowntags.txt
@@ -0,0 +1,38 @@
+# Copyright (C) 2010 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.
+
+#
+# The grandfathered list. We should get rid of these if possible.
+#
+@ToBeFixed
+@stable
+@com.intel.drl.spec_ref
+@ar.org.fitc.spec_ref
+
+# Something about CTS?
+@cts
+
+# Auto-generated info about the SDK
+@sdkCurrent
+@sdkCurrentVersion
+@sdkCurrentRelId
+@sdkPlatformVersion
+@sdkPlatformApiLevel
+@sdkPlatformMajorMinor
+@sdkPlatformReleaseDate
+@sdkPlatformDeployableDate
+@adtZipVersion
+@adtZipDownload
+@adtZipBytes
+@adtZipChecksum
diff --git a/include/ui/EventHub.h b/include/ui/EventHub.h
index 25d5afb..d6b09dc 100644
--- a/include/ui/EventHub.h
+++ b/include/ui/EventHub.h
@@ -111,10 +111,10 @@
/* The input device is a multi-touch touchscreen. */
INPUT_DEVICE_CLASS_TOUCHSCREEN_MT= 0x00000010,
- /* The input device is a directional pad. */
+ /* The input device is a directional pad (implies keyboard, has DPAD keys). */
INPUT_DEVICE_CLASS_DPAD = 0x00000020,
- /* The input device is a gamepad (implies keyboard). */
+ /* The input device is a gamepad (implies keyboard, has BUTTON keys). */
INPUT_DEVICE_CLASS_GAMEPAD = 0x00000040,
/* The input device has switches. */
diff --git a/include/ui/InputDispatcher.h b/include/ui/InputDispatcher.h
index d7e6254..96b4fae 100644
--- a/include/ui/InputDispatcher.h
+++ b/include/ui/InputDispatcher.h
@@ -81,9 +81,8 @@
*/
struct InputTarget {
enum {
- /* This flag indicates that subsequent event delivery should be held until the
- * current event is delivered to this target or a timeout occurs. */
- FLAG_SYNC = 0x01,
+ /* This flag indicates that the event is being delivered to a foreground application. */
+ FLAG_FOREGROUND = 0x01,
/* This flag indicates that a MotionEvent with AMOTION_EVENT_ACTION_DOWN falls outside
* of the area of this target and so should instead be delivered as an
@@ -109,12 +108,6 @@
// Flags for the input target.
int32_t flags;
- // The timeout for event delivery to this target in nanoseconds, or -1 to wait indefinitely.
- nsecs_t timeout;
-
- // The time already spent waiting for this target in nanoseconds, or 0 if none.
- nsecs_t timeSpentWaitingForApplication;
-
// The x and y offset to add to a MotionEvent as it is delivered.
// (ignored for KeyEvents)
float xOffset, yOffset;
@@ -190,6 +183,7 @@
};
sp<InputChannel> inputChannel;
+ String8 name;
int32_t layoutParamsFlags;
int32_t layoutParamsType;
nsecs_t dispatchingTimeout;
@@ -206,9 +200,11 @@
int32_t touchableAreaRight;
int32_t touchableAreaBottom;
bool visible;
+ bool canReceiveKeys;
bool hasFocus;
bool hasWallpaper;
bool paused;
+ int32_t layer;
int32_t ownerPid;
int32_t ownerUid;
@@ -257,18 +253,12 @@
/* Notifies the system that an application is not responding.
* Returns a new timeout to continue waiting, or 0 to abort dispatch. */
- virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle) = 0;
+ virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle,
+ const sp<InputChannel>& inputChannel) = 0;
/* Notifies the system that an input channel is unrecoverably broken. */
virtual void notifyInputChannelBroken(const sp<InputChannel>& inputChannel) = 0;
- /* Notifies the system that an input channel is not responding.
- * Returns a new timeout to continue waiting, or 0 to abort dispatch. */
- virtual nsecs_t notifyInputChannelANR(const sp<InputChannel>& inputChannel) = 0;
-
- /* Notifies the system that an input channel recovered from ANR. */
- virtual void notifyInputChannelRecoveredFromANR(const sp<InputChannel>& inputChannel) = 0;
-
/* Gets the key repeat initial timeout or -1 if automatic key repeating is disabled. */
virtual nsecs_t getKeyRepeatTimeout() = 0;
@@ -361,16 +351,6 @@
*/
virtual void setInputDispatchMode(bool enabled, bool frozen) = 0;
- /* Preempts input dispatch in progress by making pending synchronous
- * dispatches asynchronous instead. This method is generally called during a focus
- * transition from one application to the next so as to enable the new application
- * to start receiving input as soon as possible without having to wait for the
- * old application to finish up.
- *
- * This method may be called on any thread (usually by the input manager).
- */
- virtual void preemptInputDispatch() = 0;
-
/* Registers or unregister input channels that may be used as targets for input events.
* If monitor is true, the channel will receive a copy of all input events.
*
@@ -424,7 +404,6 @@
virtual void setInputWindows(const Vector<InputWindow>& inputWindows);
virtual void setFocusedApplication(const InputApplication* inputApplication);
virtual void setInputDispatchMode(bool enabled, bool frozen);
- virtual void preemptInputDispatch();
virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel, bool monitor);
virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel);
@@ -454,7 +433,7 @@
int32_t injectorUid; // -1 if not injected
bool dispatchInProgress; // initially false, set to true while dispatching
- int32_t pendingSyncDispatches; // the number of synchronous dispatches in progress
+ int32_t pendingForegroundDispatches; // the number of foreground dispatches in progress
inline bool isInjected() { return injectorPid >= 0; }
@@ -522,7 +501,6 @@
int32_t targetFlags;
float xOffset;
float yOffset;
- nsecs_t timeout;
// True if dispatch has started.
bool inProgress;
@@ -540,12 +518,8 @@
// will be set to NULL.
MotionSample* tailMotionSample;
- inline bool isSyncTarget() const {
- return targetFlags & InputTarget::FLAG_SYNC;
- }
-
- inline void preemptSyncTarget() {
- targetFlags &= ~ InputTarget::FLAG_SYNC;
+ inline bool hasForegroundTarget() const {
+ return targetFlags & InputTarget::FLAG_FOREGROUND;
}
};
@@ -628,6 +602,8 @@
dequeue(first);
return first;
}
+
+ uint32_t count() const;
};
/* Allocates queue entries and performs reference counting as needed. */
@@ -647,7 +623,7 @@
nsecs_t downTime, uint32_t pointerCount,
const int32_t* pointerIds, const PointerCoords* pointerCoords);
DispatchEntry* obtainDispatchEntry(EventEntry* eventEntry,
- int32_t targetFlags, float xOffset, float yOffset, nsecs_t timeout);
+ int32_t targetFlags, float xOffset, float yOffset);
CommandEntry* obtainCommandEntry(Command command);
void releaseEventEntry(EventEntry* entry);
@@ -761,8 +737,6 @@
STATUS_NORMAL,
// An unrecoverable communication error has occurred.
STATUS_BROKEN,
- // The client is not responding.
- STATUS_NOT_RESPONDING,
// The input channel has been unregistered.
STATUS_ZOMBIE
};
@@ -772,11 +746,9 @@
InputPublisher inputPublisher;
InputState inputState;
Queue<DispatchEntry> outboundQueue;
- nsecs_t nextTimeoutTime; // next timeout time (LONG_LONG_MAX if none)
nsecs_t lastEventTime; // the time when the event was originally captured
nsecs_t lastDispatchTime; // the time when the last event was dispatched
- nsecs_t lastANRTime; // the time when the last ANR was recorded
explicit Connection(const sp<InputChannel>& inputChannel);
@@ -788,18 +760,6 @@
// Returns NULL if not found.
DispatchEntry* findQueuedDispatchEntryForEvent(const EventEntry* eventEntry) const;
- // Determine whether this connection has a pending synchronous dispatch target.
- // Since there can only ever be at most one such target at a time, if there is one,
- // it must be at the tail because nothing else can be enqueued after it.
- inline bool hasPendingSyncTarget() const {
- return ! outboundQueue.isEmpty() && outboundQueue.tailSentinel.prev->isSyncTarget();
- }
-
- // Assuming there is a pending sync target, make it async.
- inline void preemptSyncTarget() {
- outboundQueue.tailSentinel.prev->preemptSyncTarget();
- }
-
// Gets the time since the current event was originally obtained from the input driver.
inline double getEventLatencyMillis(nsecs_t currentTime) const {
return (currentTime - lastEventTime) / 1000000.0;
@@ -810,15 +770,7 @@
return (currentTime - lastDispatchTime) / 1000000.0;
}
- // Gets the time since the current event ANR was declared, if applicable.
- inline double getANRLatencyMillis(nsecs_t currentTime) const {
- return (currentTime - lastANRTime) / 1000000.0;
- }
-
status_t initialize();
-
- void setNextTimeoutTime(nsecs_t currentTime, nsecs_t timeout);
- void resetTimeout(nsecs_t currentTime);
};
sp<InputDispatcherPolicyInterface> mPolicy;
@@ -851,7 +803,7 @@
// All registered connections mapped by receive pipe file descriptor.
KeyedVector<int, sp<Connection> > mConnectionsByReceiveFd;
- ssize_t getConnectionIndex(const sp<InputChannel>& inputChannel);
+ ssize_t getConnectionIndexLocked(const sp<InputChannel>& inputChannel);
// Active connections are connections that have a non-empty outbound queue.
// We don't use a ref-counted pointer here because we explicitly abort connections
@@ -859,12 +811,6 @@
// and the connection itself to be deactivated.
Vector<Connection*> mActiveConnections;
- // List of connections that have timed out. Only used by dispatchOnce()
- // We don't use a ref-counted pointer here because it is not possible for a connection
- // to be unregistered while processing timed out connections since we hold the lock for
- // the duration.
- Vector<Connection*> mTimedOutConnections;
-
// Input channels that will receive a copy of all input events.
Vector<sp<InputChannel> > mMonitoringChannels;
@@ -877,7 +823,7 @@
void setInjectionResultLocked(EventEntry* entry, int32_t injectionResult);
Condition mInjectionSyncFinishedCondition;
- void decrementPendingSyncDispatchesLocked(EventEntry* entry);
+ void decrementPendingForegroundDispatchesLocked(EventEntry* entry);
// Throttling state.
struct ThrottleState {
@@ -905,8 +851,8 @@
// Inbound event processing.
void drainInboundQueueLocked();
- void releasePendingEventLocked(bool wasDropped);
- void releaseInboundEventLocked(EventEntry* entry, bool wasDropped);
+ void releasePendingEventLocked();
+ void releaseInboundEventLocked(EventEntry* entry);
bool isEventFromReliableSourceLocked(EventEntry* entry);
// Dispatch state.
@@ -940,10 +886,10 @@
nsecs_t currentTime, ConfigurationChangedEntry* entry);
bool dispatchKeyLocked(
nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout,
- nsecs_t* nextWakeupTime);
+ bool dropEvent, nsecs_t* nextWakeupTime);
bool dispatchMotionLocked(
nsecs_t currentTime, MotionEntry* entry,
- nsecs_t* nextWakeupTime);
+ bool dropEvent, nsecs_t* nextWakeupTime);
void dispatchEventToCurrentInputTargetsLocked(
nsecs_t currentTime, EventEntry* entry, bool resumeWithAppendedMotionSample);
@@ -951,8 +897,6 @@
void logOutboundMotionDetailsLocked(const char* prefix, const MotionEntry* entry);
// The input targets that were most recently identified for dispatch.
- // If there is a synchronous event dispatch in progress, the current input targets will
- // remain unchanged until the dispatch has completed or been aborted.
bool mCurrentInputTargetsValid; // false while targets are being recomputed
Vector<InputTarget> mCurrentInputTargets;
int32_t mCurrentInputWindowType;
@@ -970,13 +914,14 @@
bool mInputTargetWaitTimeoutExpired;
// Finding targets for input events.
- void startFindingTargetsLocked();
- void finishFindingTargetsLocked(const InputWindow* window);
+ void resetTargetsLocked();
+ void commitTargetsLocked(const InputWindow* window);
int32_t handleTargetsNotReadyLocked(nsecs_t currentTime, const EventEntry* entry,
const InputApplication* application, const InputWindow* window,
nsecs_t* nextWakeupTime);
- void resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout);
- nsecs_t getTimeSpentWaitingForApplicationWhileFindingTargetsLocked(nsecs_t currentTime);
+ void resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout,
+ const sp<InputChannel>& inputChannel);
+ nsecs_t getTimeSpentWaitingForApplicationLocked(nsecs_t currentTime);
void resetANRTimeoutsLocked();
int32_t findFocusedWindowLocked(nsecs_t currentTime, const EventEntry* entry,
@@ -984,14 +929,16 @@
int32_t findTouchedWindowLocked(nsecs_t currentTime, const MotionEntry* entry,
nsecs_t* nextWakeupTime, InputWindow** outWindow);
- void addWindowTargetLocked(const InputWindow* window, int32_t targetFlags,
- nsecs_t timeSpentWaitingForApplication);
+ void addWindowTargetLocked(const InputWindow* window, int32_t targetFlags);
void addMonitoringTargetsLocked();
void pokeUserActivityLocked(nsecs_t eventTime, int32_t windowType, int32_t eventType);
bool checkInjectionPermission(const InputWindow* window,
int32_t injectorPid, int32_t injectorUid);
bool isWindowObscuredLocked(const InputWindow* window);
+ bool isWindowFinishedWithPreviousInputLocked(const InputWindow* window);
void releaseTouchedWindowLocked();
+ String8 getApplicationWindowLabelLocked(const InputApplication* application,
+ const InputWindow* window);
// Manage the dispatch cycle for a single connection.
// These methods are deliberately not Interruptible because doing all of the work
@@ -1000,21 +947,14 @@
void prepareDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
EventEntry* eventEntry, const InputTarget* inputTarget,
bool resumeWithAppendedMotionSample);
- void startDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
- nsecs_t timeSpentWaitingForApplication);
+ void startDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
void finishDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
void startNextDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
- void timeoutDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
- void resumeAfterTimeoutDispatchCycleLocked(nsecs_t currentTime,
- const sp<Connection>& connection, nsecs_t newTimeout);
void abortDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
bool broken);
- void drainOutboundQueueLocked(Connection* connection, DispatchEntry* firstDispatchEntryToDrain);
+ void drainOutboundQueueLocked(Connection* connection);
static int handleReceiveCallback(int receiveFd, int events, void* data);
- // Preempting input dispatch.
- bool preemptInputDispatchInnerLocked();
-
// Dump state.
void dumpDispatchStateLocked(String8& dump);
void logDispatchStateLocked();
@@ -1027,20 +967,23 @@
void onDispatchCycleStartedLocked(
nsecs_t currentTime, const sp<Connection>& connection);
void onDispatchCycleFinishedLocked(
- nsecs_t currentTime, const sp<Connection>& connection, bool recoveredFromANR);
- void onDispatchCycleANRLocked(
nsecs_t currentTime, const sp<Connection>& connection);
void onDispatchCycleBrokenLocked(
nsecs_t currentTime, const sp<Connection>& connection);
+ void onANRLocked(
+ nsecs_t currentTime, const InputApplication* application, const InputWindow* window,
+ nsecs_t eventTime, nsecs_t waitStartTime);
// Outbound policy interactions.
void doNotifyConfigurationChangedInterruptible(CommandEntry* commandEntry);
void doNotifyInputChannelBrokenLockedInterruptible(CommandEntry* commandEntry);
- void doNotifyInputChannelANRLockedInterruptible(CommandEntry* commandEntry);
- void doNotifyInputChannelRecoveredFromANRLockedInterruptible(CommandEntry* commandEntry);
+ void doNotifyANRLockedInterruptible(CommandEntry* commandEntry);
void doInterceptKeyBeforeDispatchingLockedInterruptible(CommandEntry* commandEntry);
void doPokeUserActivityLockedInterruptible(CommandEntry* commandEntry);
- void doTargetsNotReadyTimeoutLockedInterruptible(CommandEntry* commandEntry);
+
+ // Statistics gathering.
+ void updateDispatchStatisticsLocked(nsecs_t currentTime, const EventEntry* entry,
+ int32_t injectionResult, nsecs_t timeSpentWaitingForApplication);
};
/* Enqueues and dispatches input events, endlessly. */
diff --git a/libs/gui/SensorEventQueue.cpp b/libs/gui/SensorEventQueue.cpp
index c3a9f22..b0d0f12 100644
--- a/libs/gui/SensorEventQueue.cpp
+++ b/libs/gui/SensorEventQueue.cpp
@@ -70,9 +70,13 @@
ssize_t SensorEventQueue::read(ASensorEvent* events, size_t numEvents)
{
ssize_t size = mSensorChannel->read(events, numEvents*sizeof(events[0]));
+ LOGE_IF(size<0 && size!=-EAGAIN,
+ "SensorChannel::read error (%s)", strerror(-size));
if (size >= 0) {
if (size % sizeof(events[0])) {
// partial read!!! should never happen.
+ LOGE("SensorEventQueue partial read (event-size=%u, read=%d)",
+ sizeof(events[0]), int(size));
return -EINVAL;
}
// returns number of events read
@@ -95,8 +99,18 @@
{
const int fd = getFd();
sp<Looper> looper(getLooper());
- int32_t result = looper->pollOnce(-1);
- return (result == fd) ? status_t(NO_ERROR) : status_t(-1);
+
+ int32_t result;
+ do {
+ result = looper->pollOnce(-1);
+ if (result == ALOOPER_EVENT_ERROR) {
+ LOGE("SensorChannel::waitForEvent error (errno=%d)", errno);
+ result = -EPIPE; // unknown error, so we make up one
+ break;
+ }
+ } while (result != fd);
+
+ return result;
}
status_t SensorEventQueue::wake() const
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index 48dea57..1cf7592 100644
--- a/libs/ui/InputDispatcher.cpp
+++ b/libs/ui/InputDispatcher.cpp
@@ -122,7 +122,7 @@
AutoMutex _l(mLock);
resetKeyRepeatLocked();
- releasePendingEventLocked(true);
+ releasePendingEventLocked();
drainInboundQueueLocked();
}
@@ -174,7 +174,7 @@
if (! mDispatchEnabled) {
if (mPendingEvent || ! mInboundQueue.isEmpty()) {
LOGI("Dropping pending events because input dispatch is disabled.");
- releasePendingEventLocked(true);
+ releasePendingEventLocked();
drainInboundQueueLocked();
}
return;
@@ -196,42 +196,6 @@
*nextWakeupTime = mAppSwitchDueTime;
}
- // Detect and process timeouts for all connections and determine if there are any
- // synchronous event dispatches pending. This step is entirely non-interruptible.
- bool havePendingSyncTarget = false;
- size_t activeConnectionCount = mActiveConnections.size();
- for (size_t i = 0; i < activeConnectionCount; i++) {
- Connection* connection = mActiveConnections.itemAt(i);
-
- if (connection->hasPendingSyncTarget()) {
- if (isAppSwitchDue) {
- connection->preemptSyncTarget();
- } else {
- havePendingSyncTarget = true;
- }
- }
-
- nsecs_t connectionTimeoutTime = connection->nextTimeoutTime;
- if (connectionTimeoutTime <= currentTime) {
- mTimedOutConnections.add(connection);
- } else if (connectionTimeoutTime < *nextWakeupTime) {
- *nextWakeupTime = connectionTimeoutTime;
- }
- }
-
- size_t timedOutConnectionCount = mTimedOutConnections.size();
- for (size_t i = 0; i < timedOutConnectionCount; i++) {
- Connection* connection = mTimedOutConnections.itemAt(i);
- timeoutDispatchCycleLocked(currentTime, connection);
- *nextWakeupTime = LONG_LONG_MIN; // force next poll to wake up immediately
- }
- mTimedOutConnections.clear();
-
- // If we have a pending synchronous target, skip dispatch.
- if (havePendingSyncTarget) {
- return;
- }
-
// Ready to start a new event.
// If we don't already have a pending event, go grab one.
if (! mPendingEvent) {
@@ -317,51 +281,50 @@
// Now we have an event to dispatch.
assert(mPendingEvent != NULL);
- bool wasDispatched = false;
- bool wasDropped = false;
+ bool done = false;
switch (mPendingEvent->type) {
case EventEntry::TYPE_CONFIGURATION_CHANGED: {
ConfigurationChangedEntry* typedEntry =
static_cast<ConfigurationChangedEntry*>(mPendingEvent);
- wasDispatched = dispatchConfigurationChangedLocked(currentTime, typedEntry);
+ done = dispatchConfigurationChangedLocked(currentTime, typedEntry);
break;
}
case EventEntry::TYPE_KEY: {
KeyEntry* typedEntry = static_cast<KeyEntry*>(mPendingEvent);
- if (isAppSwitchPendingLocked()) {
- if (isAppSwitchKey(typedEntry->keyCode)) {
+ bool appSwitchKey = isAppSwitchKey(typedEntry->keyCode);
+ bool dropEvent = isAppSwitchDue && ! appSwitchKey;
+ done = dispatchKeyLocked(currentTime, typedEntry, keyRepeatTimeout, dropEvent,
+ nextWakeupTime);
+ if (done) {
+ if (dropEvent) {
+ LOGI("Dropped key because of pending overdue app switch.");
+ } else if (appSwitchKey) {
resetPendingAppSwitchLocked(true);
- } else if (isAppSwitchDue) {
- LOGI("Dropping key because of pending overdue app switch.");
- wasDropped = true;
- break;
}
}
- wasDispatched = dispatchKeyLocked(currentTime, typedEntry, keyRepeatTimeout,
- nextWakeupTime);
break;
}
case EventEntry::TYPE_MOTION: {
MotionEntry* typedEntry = static_cast<MotionEntry*>(mPendingEvent);
- if (isAppSwitchDue) {
- LOGI("Dropping motion because of pending overdue app switch.");
- wasDropped = true;
- break;
+ bool dropEvent = isAppSwitchDue;
+ done = dispatchMotionLocked(currentTime, typedEntry, dropEvent, nextWakeupTime);
+ if (done) {
+ if (dropEvent) {
+ LOGI("Dropped motion because of pending overdue app switch.");
+ }
}
- wasDispatched = dispatchMotionLocked(currentTime, typedEntry, nextWakeupTime);
break;
}
default:
assert(false);
- wasDropped = true;
break;
}
- if (wasDispatched || wasDropped) {
- releasePendingEventLocked(wasDropped);
+ if (done) {
+ releasePendingEventLocked();
*nextWakeupTime = LONG_LONG_MIN; // force next poll to wake up immediately
}
}
@@ -439,21 +402,21 @@
void InputDispatcher::drainInboundQueueLocked() {
while (! mInboundQueue.isEmpty()) {
EventEntry* entry = mInboundQueue.dequeueAtHead();
- releaseInboundEventLocked(entry, true /*wasDropped*/);
+ releaseInboundEventLocked(entry);
}
}
-void InputDispatcher::releasePendingEventLocked(bool wasDropped) {
+void InputDispatcher::releasePendingEventLocked() {
if (mPendingEvent) {
- releaseInboundEventLocked(mPendingEvent, wasDropped);
+ releaseInboundEventLocked(mPendingEvent);
mPendingEvent = NULL;
}
}
-void InputDispatcher::releaseInboundEventLocked(EventEntry* entry, bool wasDropped) {
- if (wasDropped) {
+void InputDispatcher::releaseInboundEventLocked(EventEntry* entry) {
+ if (entry->injectionResult == INPUT_EVENT_INJECTION_PENDING) {
#if DEBUG_DISPATCH_CYCLE
- LOGD("Pending event was dropped.");
+ LOGD("Inbound event was dropped. Setting injection result to failed.");
#endif
setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
}
@@ -528,7 +491,41 @@
bool InputDispatcher::dispatchKeyLocked(
nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout,
- nsecs_t* nextWakeupTime) {
+ bool dropEvent, nsecs_t* nextWakeupTime) {
+ // Give the policy a chance to intercept the key.
+ if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN) {
+ bool trusted;
+ if (! dropEvent && mFocusedWindow) {
+ trusted = checkInjectionPermission(mFocusedWindow,
+ entry->injectorPid, entry->injectorUid);
+ } else {
+ trusted = isEventFromReliableSourceLocked(entry);
+ }
+ if (trusted) {
+ CommandEntry* commandEntry = postCommandLocked(
+ & InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible);
+ if (! dropEvent && mFocusedWindow) {
+ commandEntry->inputChannel = mFocusedWindow->inputChannel;
+ }
+ commandEntry->keyEntry = entry;
+ entry->refCount += 1;
+ return false; // wait for the command to run
+ } else {
+ entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_CONTINUE;
+ }
+ } else if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_SKIP) {
+ resetTargetsLocked();
+ setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_SUCCEEDED);
+ return true;
+ }
+
+ // Clean up if dropping the event.
+ if (dropEvent) {
+ resetTargetsLocked();
+ setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
+ return true;
+ }
+
// Preprocessing.
if (! entry->dispatchInProgress) {
logOutboundKeyDetailsLocked("dispatchKey - ", entry);
@@ -557,7 +554,7 @@
}
entry->dispatchInProgress = true;
- startFindingTargetsLocked();
+ resetTargetsLocked();
}
// Identify targets.
@@ -575,20 +572,7 @@
}
addMonitoringTargetsLocked();
- finishFindingTargetsLocked(window);
- }
-
- // Give the policy a chance to intercept the key.
- if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN) {
- CommandEntry* commandEntry = postCommandLocked(
- & InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible);
- commandEntry->inputChannel = mCurrentInputChannel;
- commandEntry->keyEntry = entry;
- entry->refCount += 1;
- return false; // wait for the command to run
- }
- if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_SKIP) {
- return true;
+ commitTargetsLocked(window);
}
// Dispatch the key.
@@ -612,13 +596,20 @@
}
bool InputDispatcher::dispatchMotionLocked(
- nsecs_t currentTime, MotionEntry* entry, nsecs_t* nextWakeupTime) {
+ nsecs_t currentTime, MotionEntry* entry, bool dropEvent, nsecs_t* nextWakeupTime) {
+ // Clean up if dropping the event.
+ if (dropEvent) {
+ resetTargetsLocked();
+ setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
+ return true;
+ }
+
// Preprocessing.
if (! entry->dispatchInProgress) {
logOutboundMotionDetailsLocked("dispatchMotion - ", entry);
entry->dispatchInProgress = true;
- startFindingTargetsLocked();
+ resetTargetsLocked();
}
bool isPointerEvent = entry->source & AINPUT_SOURCE_CLASS_POINTER;
@@ -646,7 +637,7 @@
}
addMonitoringTargetsLocked();
- finishFindingTargetsLocked(window);
+ commitTargetsLocked(window);
}
// Dispatch the motion.
@@ -728,7 +719,7 @@
for (size_t i = 0; i < mCurrentInputTargets.size(); i++) {
const InputTarget& inputTarget = mCurrentInputTargets.itemAt(i);
- ssize_t connectionIndex = getConnectionIndex(inputTarget.inputChannel);
+ ssize_t connectionIndex = getConnectionIndexLocked(inputTarget.inputChannel);
if (connectionIndex >= 0) {
sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
prepareDispatchCycleLocked(currentTime, connection, eventEntry, & inputTarget,
@@ -741,14 +732,14 @@
}
}
-void InputDispatcher::startFindingTargetsLocked() {
+void InputDispatcher::resetTargetsLocked() {
mCurrentInputTargetsValid = false;
mCurrentInputTargets.clear();
mCurrentInputChannel.clear();
mInputTargetWaitCause = INPUT_TARGET_WAIT_CAUSE_NONE;
}
-void InputDispatcher::finishFindingTargetsLocked(const InputWindow* window) {
+void InputDispatcher::commitTargetsLocked(const InputWindow* window) {
mCurrentInputWindowType = window->layoutParamsType;
mCurrentInputChannel = window->inputChannel;
mCurrentInputTargetsValid = true;
@@ -770,9 +761,8 @@
} else {
if (mInputTargetWaitCause != INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY) {
#if DEBUG_FOCUS
- LOGD("Waiting for application to become ready for input: name=%s, window=%s",
- application ? application->name.string() : "<unknown>",
- window ? window->inputChannel->getName().string() : "<unknown>");
+ LOGD("Waiting for application to become ready for input: %s",
+ getApplicationWindowLabelLocked(application, window).string());
#endif
nsecs_t timeout = window ? window->dispatchingTimeout :
application ? application->dispatchingTimeout : DEFAULT_INPUT_DISPATCHING_TIMEOUT;
@@ -789,21 +779,7 @@
}
if (currentTime >= mInputTargetWaitTimeoutTime) {
- LOGI("Application is not ready for input: name=%s, window=%s,"
- "%01.1fms since event, %01.1fms since wait started",
- application ? application->name.string() : "<unknown>",
- window ? window->inputChannel->getName().string() : "<unknown>",
- (currentTime - entry->eventTime) / 1000000.0,
- (currentTime - mInputTargetWaitStartTime) / 1000000.0);
-
- CommandEntry* commandEntry = postCommandLocked(
- & InputDispatcher::doTargetsNotReadyTimeoutLockedInterruptible);
- if (application) {
- commandEntry->inputApplicationHandle = application->handle;
- }
- if (window) {
- commandEntry->inputChannel = window->inputChannel;
- }
+ onANRLocked(currentTime, application, window, entry->eventTime, mInputTargetWaitStartTime);
// Force poll loop to wake up immediately on next iteration once we get the
// ANR response back from the policy.
@@ -818,17 +794,30 @@
}
}
-void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout) {
+void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout,
+ const sp<InputChannel>& inputChannel) {
if (newTimeout > 0) {
// Extend the timeout.
mInputTargetWaitTimeoutTime = now() + newTimeout;
} else {
// Give up.
mInputTargetWaitTimeoutExpired = true;
+
+ // Release the touch target.
+ releaseTouchedWindowLocked();
+
+ // Input state will not be realistic. Mark it out of sync.
+ if (inputChannel.get()) {
+ ssize_t connectionIndex = getConnectionIndexLocked(inputChannel);
+ if (connectionIndex >= 0) {
+ sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
+ connection->inputState.setOutOfSync();
+ }
+ }
}
}
-nsecs_t InputDispatcher::getTimeSpentWaitingForApplicationWhileFindingTargetsLocked(
+nsecs_t InputDispatcher::getTimeSpentWaitingForApplicationLocked(
nsecs_t currentTime) {
if (mInputTargetWaitCause == INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY) {
return currentTime - mInputTargetWaitStartTime;
@@ -841,13 +830,6 @@
LOGD("Resetting ANR timeouts.");
#endif
- // Reset timeouts for all active connections.
- nsecs_t currentTime = now();
- for (size_t i = 0; i < mActiveConnections.size(); i++) {
- Connection* connection = mActiveConnections[i];
- connection->resetTimeout(currentTime);
- }
-
// Reset input target wait timeout.
mInputTargetWaitCause = INPUT_TARGET_WAIT_CAUSE_NONE;
}
@@ -865,8 +847,8 @@
if (mFocusedApplication) {
#if DEBUG_FOCUS
LOGD("Waiting because there is no focused window but there is a "
- "focused application that may eventually add a window: '%s'.",
- mFocusedApplication->name.string());
+ "focused application that may eventually add a window: %s.",
+ getApplicationWindowLabelLocked(mFocusedApplication, NULL).string());
#endif
injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
mFocusedApplication, NULL, nextWakeupTime);
@@ -894,19 +876,31 @@
goto Unresponsive;
}
+ // If the currently focused window is still working on previous events then keep waiting.
+ if (! isWindowFinishedWithPreviousInputLocked(mFocusedWindow)) {
+#if DEBUG_FOCUS
+ LOGD("Waiting because focused window still processing previous input.");
+#endif
+ injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+ mFocusedApplication, mFocusedWindow, nextWakeupTime);
+ goto Unresponsive;
+ }
+
// Success! Output targets.
injectionResult = INPUT_EVENT_INJECTION_SUCCEEDED;
*outWindow = mFocusedWindow;
- addWindowTargetLocked(mFocusedWindow, InputTarget::FLAG_SYNC,
- getTimeSpentWaitingForApplicationWhileFindingTargetsLocked(currentTime));
+ addWindowTargetLocked(mFocusedWindow, InputTarget::FLAG_FOREGROUND);
// Done.
Failed:
Unresponsive:
+ nsecs_t timeSpentWaitingForApplication = getTimeSpentWaitingForApplicationLocked(currentTime);
+ updateDispatchStatisticsLocked(currentTime, entry,
+ injectionResult, timeSpentWaitingForApplication);
#if DEBUG_FOCUS
- LOGD("findFocusedWindow finished: injectionResult=%d",
- injectionResult);
- logDispatchStateLocked();
+ LOGD("findFocusedWindow finished: injectionResult=%d, "
+ "timeSpendWaitingForApplication=%0.1fms",
+ injectionResult, timeSpentWaitingForApplication / 1000000.0);
#endif
return injectionResult;
}
@@ -1018,8 +1012,8 @@
if (mFocusedApplication) {
#if DEBUG_FOCUS
LOGD("Waiting because there is no touched window but there is a "
- "focused application that may eventually add a new window: '%s'.",
- mFocusedApplication->name.string());
+ "focused application that may eventually add a new window: %s.",
+ getApplicationWindowLabelLocked(mFocusedApplication, NULL).string());
#endif
injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
mFocusedApplication, NULL, nextWakeupTime);
@@ -1051,6 +1045,17 @@
goto Unresponsive;
}
+ // If the touched window is still working on previous events then keep waiting.
+ if (! isWindowFinishedWithPreviousInputLocked(newTouchedWindow)) {
+#if DEBUG_FOCUS
+ LOGD("Waiting because touched window still processing previous input.");
+#endif
+ injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+ NULL, newTouchedWindow, nextWakeupTime);
+ injectionPermission = INJECTION_PERMISSION_GRANTED;
+ goto Unresponsive;
+ }
+
// Success! Update the touch dispatch state for real.
releaseTouchedWindowLocked();
@@ -1098,6 +1103,17 @@
injectionPermission = INJECTION_PERMISSION_GRANTED;
goto Unresponsive;
}
+
+ // If the touched window is still working on previous events then keep waiting.
+ if (! isWindowFinishedWithPreviousInputLocked(mTouchedWindow)) {
+#if DEBUG_FOCUS
+ LOGD("Waiting because touched window still processing previous input.");
+#endif
+ injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+ NULL, mTouchedWindow, nextWakeupTime);
+ injectionPermission = INJECTION_PERMISSION_GRANTED;
+ goto Unresponsive;
+ }
}
// Success! Output targets.
@@ -1108,7 +1124,7 @@
size_t numWallpaperWindows = mTouchedWallpaperWindows.size();
for (size_t i = 0; i < numWallpaperWindows; i++) {
addWindowTargetLocked(mTouchedWallpaperWindows[i],
- InputTarget::FLAG_WINDOW_IS_OBSCURED, 0);
+ InputTarget::FLAG_WINDOW_IS_OBSCURED);
}
size_t numOutsideTargets = mTempTouchedOutsideTargets.size();
@@ -1118,16 +1134,15 @@
if (outsideTarget.obscured) {
outsideTargetFlags |= InputTarget::FLAG_WINDOW_IS_OBSCURED;
}
- addWindowTargetLocked(outsideTarget.window, outsideTargetFlags, 0);
+ addWindowTargetLocked(outsideTarget.window, outsideTargetFlags);
}
mTempTouchedOutsideTargets.clear();
- int32_t targetFlags = InputTarget::FLAG_SYNC;
+ int32_t targetFlags = InputTarget::FLAG_FOREGROUND;
if (mTouchedWindowIsObscured) {
targetFlags |= InputTarget::FLAG_WINDOW_IS_OBSCURED;
}
- addWindowTargetLocked(mTouchedWindow, targetFlags,
- getTimeSpentWaitingForApplicationWhileFindingTargetsLocked(currentTime));
+ addWindowTargetLocked(mTouchedWindow, targetFlags);
*outWindow = mTouchedWindow;
}
@@ -1166,10 +1181,13 @@
}
Unresponsive:
+ nsecs_t timeSpentWaitingForApplication = getTimeSpentWaitingForApplicationLocked(currentTime);
+ updateDispatchStatisticsLocked(currentTime, entry,
+ injectionResult, timeSpentWaitingForApplication);
#if DEBUG_FOCUS
- LOGD("findTouchedWindow finished: injectionResult=%d, injectionPermission=%d",
- injectionResult, injectionPermission);
- logDispatchStateLocked();
+ LOGD("findTouchedWindow finished: injectionResult=%d, injectionPermission=%d,"
+ "timeSpendWaitingForApplication=%0.1fms",
+ injectionResult, injectionPermission, timeSpentWaitingForApplication / 1000000.0);
#endif
return injectionResult;
}
@@ -1180,15 +1198,12 @@
mTouchedWallpaperWindows.clear();
}
-void InputDispatcher::addWindowTargetLocked(const InputWindow* window, int32_t targetFlags,
- nsecs_t timeSpentWaitingForApplication) {
+void InputDispatcher::addWindowTargetLocked(const InputWindow* window, int32_t targetFlags) {
mCurrentInputTargets.push();
InputTarget& target = mCurrentInputTargets.editTop();
target.inputChannel = window->inputChannel;
target.flags = targetFlags;
- target.timeout = window->dispatchingTimeout;
- target.timeSpentWaitingForApplication = timeSpentWaitingForApplication;
target.xOffset = - window->frameLeft;
target.yOffset = - window->frameTop;
}
@@ -1200,8 +1215,6 @@
InputTarget& target = mCurrentInputTargets.editTop();
target.inputChannel = mMonitoringChannels[i];
target.flags = 0;
- target.timeout = -1;
- target.timeSpentWaitingForApplication = 0;
target.xOffset = 0;
target.yOffset = 0;
}
@@ -1241,6 +1254,34 @@
return false;
}
+bool InputDispatcher::isWindowFinishedWithPreviousInputLocked(const InputWindow* window) {
+ ssize_t connectionIndex = getConnectionIndexLocked(window->inputChannel);
+ if (connectionIndex >= 0) {
+ sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
+ return connection->outboundQueue.isEmpty();
+ } else {
+ return true;
+ }
+}
+
+String8 InputDispatcher::getApplicationWindowLabelLocked(const InputApplication* application,
+ const InputWindow* window) {
+ if (application) {
+ if (window) {
+ String8 label(application->name);
+ label.append(" - ");
+ label.append(window->name);
+ return label;
+ } else {
+ return application->name;
+ }
+ } else if (window) {
+ return window->name;
+ } else {
+ return String8("<unknown application or window>");
+ }
+}
+
void InputDispatcher::pokeUserActivityLocked(nsecs_t eventTime,
int32_t windowType, int32_t eventType) {
CommandEntry* commandEntry = postCommandLocked(
@@ -1254,25 +1295,18 @@
const sp<Connection>& connection, EventEntry* eventEntry, const InputTarget* inputTarget,
bool resumeWithAppendedMotionSample) {
#if DEBUG_DISPATCH_CYCLE
- LOGD("channel '%s' ~ prepareDispatchCycle - flags=%d, timeout=%lldns, "
+ LOGD("channel '%s' ~ prepareDispatchCycle - flags=%d, "
"xOffset=%f, yOffset=%f, resumeWithAppendedMotionSample=%s",
- connection->getInputChannelName(), inputTarget->flags, inputTarget->timeout,
+ connection->getInputChannelName(), inputTarget->flags,
inputTarget->xOffset, inputTarget->yOffset,
toString(resumeWithAppendedMotionSample));
#endif
// Skip this event if the connection status is not normal.
- // We don't want to enqueue additional outbound events if the connection is broken or
- // not responding.
+ // We don't want to enqueue additional outbound events if the connection is broken.
if (connection->status != Connection::STATUS_NORMAL) {
LOGW("channel '%s' ~ Dropping event because the channel status is %s",
connection->getInputChannelName(), connection->getStatusLabel());
-
- // If the connection is not responding but the user is poking the application anyways,
- // retrigger the original timeout.
- if (connection->status == Connection::STATUS_NOT_RESPONDING) {
- timeoutDispatchCycleLocked(currentTime, connection);
- }
return;
}
@@ -1379,7 +1413,7 @@
DispatchEntry* cancelationDispatchEntry =
mAllocator.obtainDispatchEntry(cancelationEventEntry,
- 0, inputTarget->xOffset, inputTarget->yOffset, inputTarget->timeout);
+ 0, inputTarget->xOffset, inputTarget->yOffset); // increments ref
connection->outboundQueue.enqueueAtTail(cancelationDispatchEntry);
mAllocator.releaseEventEntry(cancelationEventEntry);
@@ -1390,10 +1424,9 @@
// This is a new event.
// Enqueue a new dispatch entry onto the outbound queue for this connection.
DispatchEntry* dispatchEntry = mAllocator.obtainDispatchEntry(eventEntry, // increments ref
- inputTarget->flags, inputTarget->xOffset, inputTarget->yOffset,
- inputTarget->timeout);
- if (dispatchEntry->isSyncTarget()) {
- eventEntry->pendingSyncDispatches += 1;
+ inputTarget->flags, inputTarget->xOffset, inputTarget->yOffset);
+ if (dispatchEntry->hasForegroundTarget()) {
+ eventEntry->pendingForegroundDispatches += 1;
}
// Handle the case where we could not stream a new motion sample because the consumer has
@@ -1416,13 +1449,12 @@
// If the outbound queue was previously empty, start the dispatch cycle going.
if (wasEmpty) {
activateConnectionLocked(connection.get());
- startDispatchCycleLocked(currentTime, connection,
- inputTarget->timeSpentWaitingForApplication);
+ startDispatchCycleLocked(currentTime, connection);
}
}
void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime,
- const sp<Connection>& connection, nsecs_t timeSpentWaitingForApplication) {
+ const sp<Connection>& connection) {
#if DEBUG_DISPATCH_CYCLE
LOGD("channel '%s' ~ startDispatchCycle",
connection->getInputChannelName());
@@ -1588,9 +1620,6 @@
connection->lastEventTime = dispatchEntry->eventEntry->eventTime;
connection->lastDispatchTime = currentTime;
- nsecs_t timeout = dispatchEntry->timeout - timeSpentWaitingForApplication;
- connection->setNextTimeoutTime(currentTime, timeout);
-
// Notify other system components.
onDispatchCycleStartedLocked(currentTime, connection);
}
@@ -1610,21 +1639,8 @@
return;
}
- // Clear the pending timeout.
- connection->nextTimeoutTime = LONG_LONG_MAX;
-
- if (connection->status == Connection::STATUS_NOT_RESPONDING) {
- // Recovering from an ANR.
- connection->status = Connection::STATUS_NORMAL;
-
- // Notify other system components.
- onDispatchCycleFinishedLocked(currentTime, connection, true /*recoveredFromANR*/);
- } else {
- // Normal finish. Not much to do here.
-
- // Notify other system components.
- onDispatchCycleFinishedLocked(currentTime, connection, false /*recoveredFromANR*/);
- }
+ // Notify other system components.
+ onDispatchCycleFinishedLocked(currentTime, connection);
// Reset the publisher since the event has been consumed.
// We do this now so that the publisher can release some of its internal resources
@@ -1653,20 +1669,20 @@
dispatchEntry->inProgress = false;
dispatchEntry->headMotionSample = dispatchEntry->tailMotionSample;
dispatchEntry->tailMotionSample = NULL;
- startDispatchCycleLocked(currentTime, connection, 0);
+ startDispatchCycleLocked(currentTime, connection);
return;
}
// Finished.
connection->outboundQueue.dequeueAtHead();
- if (dispatchEntry->isSyncTarget()) {
- decrementPendingSyncDispatchesLocked(dispatchEntry->eventEntry);
+ if (dispatchEntry->hasForegroundTarget()) {
+ decrementPendingForegroundDispatchesLocked(dispatchEntry->eventEntry);
}
mAllocator.releaseDispatchEntry(dispatchEntry);
} else {
// If the head is not in progress, then we must have already dequeued the in
- // progress event, which means we actually aborted it (due to ANR).
+ // progress event, which means we actually aborted it.
// So just start the next event for this connection.
- startDispatchCycleLocked(currentTime, connection, 0);
+ startDispatchCycleLocked(currentTime, connection);
return;
}
}
@@ -1675,66 +1691,6 @@
deactivateConnectionLocked(connection.get());
}
-void InputDispatcher::timeoutDispatchCycleLocked(nsecs_t currentTime,
- const sp<Connection>& connection) {
-#if DEBUG_DISPATCH_CYCLE
- LOGD("channel '%s' ~ timeoutDispatchCycle",
- connection->getInputChannelName());
-#endif
-
- if (connection->status == Connection::STATUS_NORMAL) {
- // Enter the not responding state.
- connection->status = Connection::STATUS_NOT_RESPONDING;
- connection->lastANRTime = currentTime;
- } else if (connection->status != Connection::STATUS_NOT_RESPONDING) {
- // Connection is broken or dead.
- return;
- }
-
- // Notify other system components.
- // This enqueues a command which will eventually call resumeAfterTimeoutDispatchCycleLocked.
- onDispatchCycleANRLocked(currentTime, connection);
-}
-
-void InputDispatcher::resumeAfterTimeoutDispatchCycleLocked(nsecs_t currentTime,
- const sp<Connection>& connection, nsecs_t newTimeout) {
-#if DEBUG_DISPATCH_CYCLE
- LOGD("channel '%s' ~ resumeAfterTimeoutDispatchCycleLocked - newTimeout=%lld",
- connection->getInputChannelName(), newTimeout);
-#endif
-
- if (connection->status != Connection::STATUS_NOT_RESPONDING) {
- return;
- }
-
- if (newTimeout > 0) {
- // The system has decided to give the application some more time.
- // Keep waiting synchronously and resume normal dispatch.
- connection->status = Connection::STATUS_NORMAL;
- connection->setNextTimeoutTime(currentTime, newTimeout);
- } else {
- // The system is about to throw up an ANR dialog and has requested that we abort dispatch.
- // Reset the timeout.
- connection->nextTimeoutTime = LONG_LONG_MAX;
-
- // Input state will no longer be realistic.
- connection->inputState.setOutOfSync();
-
- if (! connection->outboundQueue.isEmpty()) {
- // Make the current pending dispatch asynchronous (if it isn't already) so that
- // subsequent events can be delivered to the ANR dialog or to another application.
- DispatchEntry* currentDispatchEntry = connection->outboundQueue.headSentinel.next;
- currentDispatchEntry->preemptSyncTarget();
-
- // Drain all but the first entry in the outbound queue. We keep the first entry
- // since that is the one that dispatch is stuck on. We throw away the others
- // so that we don't spam the application with stale messages if it eventually
- // wakes up and recovers from the ANR.
- drainOutboundQueueLocked(connection.get(), currentDispatchEntry->next);
- }
- }
-}
-
void InputDispatcher::abortDispatchCycleLocked(nsecs_t currentTime,
const sp<Connection>& connection, bool broken) {
#if DEBUG_DISPATCH_CYCLE
@@ -1742,20 +1698,16 @@
connection->getInputChannelName(), toString(broken));
#endif
- // Clear the pending timeout.
- connection->nextTimeoutTime = LONG_LONG_MAX;
-
// Input state will no longer be realistic.
connection->inputState.setOutOfSync();
// Clear the outbound queue.
- drainOutboundQueueLocked(connection.get(), connection->outboundQueue.headSentinel.next);
+ drainOutboundQueueLocked(connection.get());
// Handle the case where the connection appears to be unrecoverably broken.
// Ignore already broken or zombie connections.
if (broken) {
- if (connection->status == Connection::STATUS_NORMAL
- || connection->status == Connection::STATUS_NOT_RESPONDING) {
+ if (connection->status == Connection::STATUS_NORMAL) {
connection->status = Connection::STATUS_BROKEN;
// Notify other system components.
@@ -1764,24 +1716,16 @@
}
}
-void InputDispatcher::drainOutboundQueueLocked(Connection* connection,
- DispatchEntry* firstDispatchEntryToDrain) {
- for (DispatchEntry* dispatchEntry = firstDispatchEntryToDrain;
- dispatchEntry != & connection->outboundQueue.tailSentinel;) {
- DispatchEntry* next = dispatchEntry->next;
- connection->outboundQueue.dequeue(dispatchEntry);
-
- if (dispatchEntry->isSyncTarget()) {
- decrementPendingSyncDispatchesLocked(dispatchEntry->eventEntry);
+void InputDispatcher::drainOutboundQueueLocked(Connection* connection) {
+ while (! connection->outboundQueue.isEmpty()) {
+ DispatchEntry* dispatchEntry = connection->outboundQueue.dequeueAtHead();
+ if (dispatchEntry->hasForegroundTarget()) {
+ decrementPendingForegroundDispatchesLocked(dispatchEntry->eventEntry);
}
mAllocator.releaseDispatchEntry(dispatchEntry);
-
- dispatchEntry = next;
}
- if (connection->outboundQueue.isEmpty()) {
- deactivateConnectionLocked(connection);
- }
+ deactivateConnectionLocked(connection);
}
int InputDispatcher::handleReceiveCallback(int receiveFd, int events, void* data) {
@@ -1941,56 +1885,63 @@
// STREAMING CASE
//
// There is no pending motion event (of any kind) for this device in the inbound queue.
- // Search the outbound queues for a synchronously dispatched motion event for this
- // device. If found, then we append the new sample to that event and then try to
- // push it out to all current targets. It is possible that some targets will already
- // have consumed the motion event. This case is automatically handled by the
- // logic in prepareDispatchCycleLocked by tracking where resumption takes place.
- //
- // The reason we look for a synchronously dispatched motion event is because we
- // want to be sure that no other motion events have been dispatched since the move.
- // It's also convenient because it means that the input targets are still valid.
- // This code could be improved to support streaming of asynchronously dispatched
- // motion events (which might be significantly more efficient) but it may become
- // a little more complicated as a result.
- //
- // Note: This code crucially depends on the invariant that an outbound queue always
- // contains at most one synchronous event and it is always last (but it might
- // not be first!).
+ // Search the outbound queue for the current foreground targets to find a dispatched
+ // motion event that is still in progress. If found, then, appen the new sample to
+ // that event and push it out to all current targets. The logic in
+ // prepareDispatchCycleLocked takes care of the case where some targets may
+ // already have consumed the motion event by starting a new dispatch cycle if needed.
if (mCurrentInputTargetsValid) {
- for (size_t i = 0; i < mActiveConnections.size(); i++) {
- Connection* connection = mActiveConnections.itemAt(i);
- if (! connection->outboundQueue.isEmpty()) {
- DispatchEntry* dispatchEntry = connection->outboundQueue.tailSentinel.prev;
- if (dispatchEntry->isSyncTarget()) {
- if (dispatchEntry->eventEntry->type != EventEntry::TYPE_MOTION) {
- goto NoBatchingOrStreaming;
- }
-
- MotionEntry* syncedMotionEntry = static_cast<MotionEntry*>(
- dispatchEntry->eventEntry);
- if (syncedMotionEntry->action != AMOTION_EVENT_ACTION_MOVE
- || syncedMotionEntry->deviceId != deviceId
- || syncedMotionEntry->pointerCount != pointerCount
- || syncedMotionEntry->isInjected()) {
- goto NoBatchingOrStreaming;
- }
-
- // Found synced move entry. Append sample and resume dispatch.
- mAllocator.appendMotionSample(syncedMotionEntry, eventTime,
- pointerCoords);
- #if DEBUG_BATCHING
- LOGD("Appended motion sample onto batch for most recent synchronously "
- "dispatched motion event for this device in the outbound queues.");
- #endif
- nsecs_t currentTime = now();
- dispatchEventToCurrentInputTargetsLocked(currentTime, syncedMotionEntry,
- true /*resumeWithAppendedMotionSample*/);
-
- runCommandsLockedInterruptible();
- return; // done!
- }
+ for (size_t i = 0; i < mCurrentInputTargets.size(); i++) {
+ const InputTarget& inputTarget = mCurrentInputTargets[i];
+ if ((inputTarget.flags & InputTarget::FLAG_FOREGROUND) == 0) {
+ // Skip non-foreground targets. We only want to stream if there is at
+ // least one foreground target whose dispatch is still in progress.
+ continue;
}
+
+ ssize_t connectionIndex = getConnectionIndexLocked(inputTarget.inputChannel);
+ if (connectionIndex < 0) {
+ // Connection must no longer be valid.
+ continue;
+ }
+
+ sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
+ if (connection->outboundQueue.isEmpty()) {
+ // This foreground target has an empty outbound queue.
+ continue;
+ }
+
+ DispatchEntry* dispatchEntry = connection->outboundQueue.headSentinel.next;
+ if (! dispatchEntry->inProgress
+ || dispatchEntry->eventEntry->type != EventEntry::TYPE_MOTION) {
+ // No motion event is being dispatched.
+ continue;
+ }
+
+ MotionEntry* motionEntry = static_cast<MotionEntry*>(
+ dispatchEntry->eventEntry);
+ if (motionEntry->action != AMOTION_EVENT_ACTION_MOVE
+ || motionEntry->deviceId != deviceId
+ || motionEntry->pointerCount != pointerCount
+ || motionEntry->isInjected()) {
+ // The motion event is not compatible with this move.
+ continue;
+ }
+
+ // Hurray! This foreground target is currently dispatching a move event
+ // that we can stream onto. Append the motion sample and resume dispatch.
+ mAllocator.appendMotionSample(motionEntry, eventTime, pointerCoords);
+#if DEBUG_BATCHING
+ LOGD("Appended motion sample onto batch for most recently dispatched "
+ "motion event for this device in the outbound queues. "
+ "Attempting to stream the motion sample.");
+#endif
+ nsecs_t currentTime = now();
+ dispatchEventToCurrentInputTargetsLocked(currentTime, motionEntry,
+ true /*resumeWithAppendedMotionSample*/);
+
+ runCommandsLockedInterruptible();
+ return; // done!
}
}
@@ -2074,15 +2025,15 @@
if (injectionResult == INPUT_EVENT_INJECTION_SUCCEEDED
&& syncMode == INPUT_EVENT_INJECTION_SYNC_WAIT_FOR_FINISHED) {
- while (injectedEntry->pendingSyncDispatches != 0) {
+ while (injectedEntry->pendingForegroundDispatches != 0) {
#if DEBUG_INJECTION
- LOGD("injectInputEvent - Waiting for %d pending synchronous dispatches.",
- injectedEntry->pendingSyncDispatches);
+ LOGD("injectInputEvent - Waiting for %d pending foreground dispatches.",
+ injectedEntry->pendingForegroundDispatches);
#endif
nsecs_t remainingTimeout = endTime - now();
if (remainingTimeout <= 0) {
#if DEBUG_INJECTION
- LOGD("injectInputEvent - Timed out waiting for pending synchronous "
+ LOGD("injectInputEvent - Timed out waiting for pending foreground "
"dispatches to finish.");
#endif
injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT;
@@ -2137,10 +2088,10 @@
}
}
-void InputDispatcher::decrementPendingSyncDispatchesLocked(EventEntry* entry) {
- entry->pendingSyncDispatches -= 1;
+void InputDispatcher::decrementPendingForegroundDispatchesLocked(EventEntry* entry) {
+ entry->pendingForegroundDispatches -= 1;
- if (entry->isInjected() && entry->pendingSyncDispatches == 0) {
+ if (entry->isInjected() && entry->pendingForegroundDispatches == 0) {
mInjectionSyncFinishedCondition.broadcast();
}
}
@@ -2238,6 +2189,9 @@
{ // acquire lock
AutoMutex _l(mLock);
+ // Clear old window pointers but remember their associated channels.
+ mFocusedWindow = NULL;
+
sp<InputChannel> touchedWindowChannel;
if (mTouchedWindow) {
touchedWindowChannel = mTouchedWindow->inputChannel;
@@ -2250,13 +2204,11 @@
}
mTouchedWallpaperWindows.clear();
}
-
- bool hadFocusedWindow = mFocusedWindow != NULL;
-
- mFocusedWindow = NULL;
mWallpaperWindows.clear();
-
mWindows.clear();
+
+ // Loop over new windows and rebuild the necessary window pointers for
+ // tracking focus and touch.
mWindows.appendVector(inputWindows);
size_t numWindows = mWindows.size();
@@ -2280,14 +2232,8 @@
mTouchedWindow = window;
}
}
-
mTempTouchedWallpaperChannels.clear();
- if ((hadFocusedWindow && ! mFocusedWindow)
- || (mFocusedWindow && ! mFocusedWindow->visible)) {
- preemptInputDispatchInnerLocked();
- }
-
#if DEBUG_FOCUS
logDispatchStateLocked();
#endif
@@ -2359,43 +2305,20 @@
}
}
-void InputDispatcher::preemptInputDispatch() {
-#if DEBUG_FOCUS
- LOGD("preemptInputDispatch");
-#endif
-
- bool preemptedOne;
- { // acquire lock
- AutoMutex _l(mLock);
- preemptedOne = preemptInputDispatchInnerLocked();
- } // release lock
-
- if (preemptedOne) {
- // Wake up the poll loop so it can get a head start dispatching the next event.
- mLooper->wake();
- }
-}
-
-bool InputDispatcher::preemptInputDispatchInnerLocked() {
- bool preemptedOne = false;
- for (size_t i = 0; i < mActiveConnections.size(); i++) {
- Connection* connection = mActiveConnections[i];
- if (connection->hasPendingSyncTarget()) {
-#if DEBUG_DISPATCH_CYCLE
- LOGD("channel '%s' ~ Preempted pending synchronous dispatch",
- connection->getInputChannelName());
-#endif
- connection->preemptSyncTarget();
- preemptedOne = true;
- }
- }
- return preemptedOne;
-}
-
void InputDispatcher::logDispatchStateLocked() {
String8 dump;
dumpDispatchStateLocked(dump);
- LOGD("%s", dump.string());
+
+ char* text = dump.lockBuffer(dump.size());
+ char* start = text;
+ while (*start != '\0') {
+ char* end = strchr(start, '\n');
+ if (*end == '\n') {
+ *(end++) = '\0';
+ }
+ LOGD("%s", start);
+ start = end;
+ }
}
void InputDispatcher::dumpDispatchStateLocked(String8& dump) {
@@ -2409,28 +2332,30 @@
} else {
dump.append(" focusedApplication: <null>\n");
}
- dump.appendFormat(" focusedWindow: '%s'\n",
- mFocusedWindow != NULL ? mFocusedWindow->inputChannel->getName().string() : "<null>");
- dump.appendFormat(" touchedWindow: '%s', touchDown=%d\n",
- mTouchedWindow != NULL ? mTouchedWindow->inputChannel->getName().string() : "<null>",
+ dump.appendFormat(" focusedWindow: name='%s'\n",
+ mFocusedWindow != NULL ? mFocusedWindow->name.string() : "<null>");
+ dump.appendFormat(" touchedWindow: name='%s', touchDown=%d\n",
+ mTouchedWindow != NULL ? mTouchedWindow->name.string() : "<null>",
mTouchDown);
for (size_t i = 0; i < mTouchedWallpaperWindows.size(); i++) {
- dump.appendFormat(" touchedWallpaperWindows[%d]: '%s'\n",
- i, mTouchedWallpaperWindows[i]->inputChannel->getName().string());
+ dump.appendFormat(" touchedWallpaperWindows[%d]: name='%s'\n",
+ i, mTouchedWallpaperWindows[i]->name.string());
}
for (size_t i = 0; i < mWindows.size(); i++) {
- dump.appendFormat(" windows[%d]: '%s', paused=%s, hasFocus=%s, hasWallpaper=%s, "
- "visible=%s, flags=0x%08x, type=0x%08x, "
+ dump.appendFormat(" windows[%d]: name='%s', paused=%s, hasFocus=%s, hasWallpaper=%s, "
+ "visible=%s, canReceiveKeys=%s, flags=0x%08x, type=0x%08x, layer=%d, "
"frame=[%d,%d][%d,%d], "
"visibleFrame=[%d,%d][%d,%d], "
"touchableArea=[%d,%d][%d,%d], "
"ownerPid=%d, ownerUid=%d, dispatchingTimeout=%0.3fms\n",
- i, mWindows[i].inputChannel->getName().string(),
+ i, mWindows[i].name.string(),
toString(mWindows[i].paused),
toString(mWindows[i].hasFocus),
toString(mWindows[i].hasWallpaper),
toString(mWindows[i].visible),
+ toString(mWindows[i].canReceiveKeys),
mWindows[i].layoutParamsFlags, mWindows[i].layoutParamsType,
+ mWindows[i].layer,
mWindows[i].frameLeft, mWindows[i].frameTop,
mWindows[i].frameRight, mWindows[i].frameBottom,
mWindows[i].visibleFrameLeft, mWindows[i].visibleFrameTop,
@@ -2447,12 +2372,14 @@
i, channel->getName().string());
}
+ dump.appendFormat(" inboundQueue: length=%u", mInboundQueue.count());
+
for (size_t i = 0; i < mActiveConnections.size(); i++) {
const Connection* connection = mActiveConnections[i];
- dump.appendFormat(" activeConnection[%d]: '%s', status=%s, hasPendingSyncTarget=%s, "
+ dump.appendFormat(" activeConnection[%d]: '%s', status=%s, outboundQueueLength=%u"
"inputState.isNeutral=%s, inputState.isOutOfSync=%s\n",
i, connection->getInputChannelName(), connection->getStatusLabel(),
- toString(connection->hasPendingSyncTarget()),
+ connection->outboundQueue.count(),
toString(connection->inputState.isNeutral()),
toString(connection->inputState.isOutOfSync()));
}
@@ -2474,7 +2401,7 @@
{ // acquire lock
AutoMutex _l(mLock);
- if (getConnectionIndex(inputChannel) >= 0) {
+ if (getConnectionIndexLocked(inputChannel) >= 0) {
LOGW("Attempted to register already registered input channel '%s'",
inputChannel->getName().string());
return BAD_VALUE;
@@ -2510,7 +2437,7 @@
{ // acquire lock
AutoMutex _l(mLock);
- ssize_t connectionIndex = getConnectionIndex(inputChannel);
+ ssize_t connectionIndex = getConnectionIndexLocked(inputChannel);
if (connectionIndex < 0) {
LOGW("Attempted to unregister already unregistered input channel '%s'",
inputChannel->getName().string());
@@ -2543,7 +2470,7 @@
return OK;
}
-ssize_t InputDispatcher::getConnectionIndex(const sp<InputChannel>& inputChannel) {
+ssize_t InputDispatcher::getConnectionIndexLocked(const sp<InputChannel>& inputChannel) {
ssize_t connectionIndex = mConnectionsByReceiveFd.indexOfKey(inputChannel->getReceivePipeFd());
if (connectionIndex >= 0) {
sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
@@ -2578,31 +2505,7 @@
}
void InputDispatcher::onDispatchCycleFinishedLocked(
- nsecs_t currentTime, const sp<Connection>& connection, bool recoveredFromANR) {
- if (recoveredFromANR) {
- LOGI("channel '%s' ~ Recovered from ANR. %01.1fms since event, "
- "%01.1fms since dispatch, %01.1fms since ANR",
- connection->getInputChannelName(),
- connection->getEventLatencyMillis(currentTime),
- connection->getDispatchLatencyMillis(currentTime),
- connection->getANRLatencyMillis(currentTime));
-
- CommandEntry* commandEntry = postCommandLocked(
- & InputDispatcher::doNotifyInputChannelRecoveredFromANRLockedInterruptible);
- commandEntry->connection = connection;
- }
-}
-
-void InputDispatcher::onDispatchCycleANRLocked(
nsecs_t currentTime, const sp<Connection>& connection) {
- LOGI("channel '%s' ~ Not responding! %01.1fms since event, %01.1fms since dispatch",
- connection->getInputChannelName(),
- connection->getEventLatencyMillis(currentTime),
- connection->getDispatchLatencyMillis(currentTime));
-
- CommandEntry* commandEntry = postCommandLocked(
- & InputDispatcher::doNotifyInputChannelANRLockedInterruptible);
- commandEntry->connection = connection;
}
void InputDispatcher::onDispatchCycleBrokenLocked(
@@ -2615,6 +2518,25 @@
commandEntry->connection = connection;
}
+void InputDispatcher::onANRLocked(
+ nsecs_t currentTime, const InputApplication* application, const InputWindow* window,
+ nsecs_t eventTime, nsecs_t waitStartTime) {
+ LOGI("Application is not responding: %s. "
+ "%01.1fms since event, %01.1fms since wait started",
+ getApplicationWindowLabelLocked(application, window).string(),
+ (currentTime - eventTime) / 1000000.0,
+ (currentTime - waitStartTime) / 1000000.0);
+
+ CommandEntry* commandEntry = postCommandLocked(
+ & InputDispatcher::doNotifyANRLockedInterruptible);
+ if (application) {
+ commandEntry->inputApplicationHandle = application->handle;
+ }
+ if (window) {
+ commandEntry->inputChannel = window->inputChannel;
+ }
+}
+
void InputDispatcher::doNotifyConfigurationChangedInterruptible(
CommandEntry* commandEntry) {
mLock.unlock();
@@ -2637,33 +2559,16 @@
}
}
-void InputDispatcher::doNotifyInputChannelANRLockedInterruptible(
+void InputDispatcher::doNotifyANRLockedInterruptible(
CommandEntry* commandEntry) {
- sp<Connection> connection = commandEntry->connection;
+ mLock.unlock();
- if (connection->status != Connection::STATUS_ZOMBIE) {
- mLock.unlock();
+ nsecs_t newTimeout = mPolicy->notifyANR(
+ commandEntry->inputApplicationHandle, commandEntry->inputChannel);
- nsecs_t newTimeout = mPolicy->notifyInputChannelANR(connection->inputChannel);
+ mLock.lock();
- mLock.lock();
-
- nsecs_t currentTime = now();
- resumeAfterTimeoutDispatchCycleLocked(currentTime, connection, newTimeout);
- }
-}
-
-void InputDispatcher::doNotifyInputChannelRecoveredFromANRLockedInterruptible(
- CommandEntry* commandEntry) {
- sp<Connection> connection = commandEntry->connection;
-
- if (connection->status != Connection::STATUS_ZOMBIE) {
- mLock.unlock();
-
- mPolicy->notifyInputChannelRecoveredFromANR(connection->inputChannel);
-
- mLock.lock();
- }
+ resumeAfterTargetsNotReadyTimeoutLocked(newTimeout, commandEntry->inputChannel);
}
void InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible(
@@ -2695,22 +2600,9 @@
mLock.lock();
}
-void InputDispatcher::doTargetsNotReadyTimeoutLockedInterruptible(
- CommandEntry* commandEntry) {
- mLock.unlock();
-
- nsecs_t newTimeout;
- if (commandEntry->inputChannel.get()) {
- newTimeout = mPolicy->notifyInputChannelANR(commandEntry->inputChannel);
- } else if (commandEntry->inputApplicationHandle.get()) {
- newTimeout = mPolicy->notifyANR(commandEntry->inputApplicationHandle);
- } else {
- newTimeout = 0;
- }
-
- mLock.lock();
-
- resumeAfterTargetsNotReadyTimeoutLocked(newTimeout);
+void InputDispatcher::updateDispatchStatisticsLocked(nsecs_t currentTime, const EventEntry* entry,
+ int32_t injectionResult, nsecs_t timeSpentWaitingForApplication) {
+ // TODO Write some statistics about how long we spend waiting.
}
void InputDispatcher::dump(String8& dump) {
@@ -2718,6 +2610,18 @@
}
+// --- InputDispatcher::Queue ---
+
+template <typename T>
+uint32_t InputDispatcher::Queue<T>::count() const {
+ uint32_t result = 0;
+ for (const T* entry = headSentinel.next; entry != & tailSentinel; entry = entry->next) {
+ result += 1;
+ }
+ return result;
+}
+
+
// --- InputDispatcher::Allocator ---
InputDispatcher::Allocator::Allocator() {
@@ -2733,7 +2637,7 @@
entry->injectionIsAsync = false;
entry->injectorPid = -1;
entry->injectorUid = -1;
- entry->pendingSyncDispatches = 0;
+ entry->pendingForegroundDispatches = 0;
}
InputDispatcher::ConfigurationChangedEntry*
@@ -2797,14 +2701,13 @@
InputDispatcher::DispatchEntry* InputDispatcher::Allocator::obtainDispatchEntry(
EventEntry* eventEntry,
- int32_t targetFlags, float xOffset, float yOffset, nsecs_t timeout) {
+ int32_t targetFlags, float xOffset, float yOffset) {
DispatchEntry* entry = mDispatchEntryPool.alloc();
entry->eventEntry = eventEntry;
eventEntry->refCount += 1;
entry->targetFlags = targetFlags;
entry->xOffset = xOffset;
entry->yOffset = yOffset;
- entry->timeout = timeout;
entry->inProgress = false;
entry->headMotionSample = NULL;
entry->tailMotionSample = NULL;
@@ -2896,7 +2799,7 @@
void InputDispatcher::EventEntry::recycle() {
injectionResult = INPUT_EVENT_INJECTION_PENDING;
dispatchInProgress = false;
- pendingSyncDispatches = 0;
+ pendingForegroundDispatches = 0;
}
@@ -3106,9 +3009,7 @@
InputDispatcher::Connection::Connection(const sp<InputChannel>& inputChannel) :
status(STATUS_NORMAL), inputChannel(inputChannel), inputPublisher(inputChannel),
- nextTimeoutTime(LONG_LONG_MAX),
- lastEventTime(LONG_LONG_MAX), lastDispatchTime(LONG_LONG_MAX),
- lastANRTime(LONG_LONG_MAX) {
+ lastEventTime(LONG_LONG_MAX), lastDispatchTime(LONG_LONG_MAX) {
}
InputDispatcher::Connection::~Connection() {
@@ -3118,18 +3019,6 @@
return inputPublisher.initialize();
}
-void InputDispatcher::Connection::setNextTimeoutTime(nsecs_t currentTime, nsecs_t timeout) {
- nextTimeoutTime = (timeout >= 0) ? currentTime + timeout : LONG_LONG_MAX;
-}
-
-void InputDispatcher::Connection::resetTimeout(nsecs_t currentTime) {
- if (outboundQueue.isEmpty()) {
- nextTimeoutTime = LONG_LONG_MAX;
- } else {
- setNextTimeoutTime(currentTime, outboundQueue.headSentinel.next->timeout);
- }
-}
-
const char* InputDispatcher::Connection::getStatusLabel() const {
switch (status) {
case STATUS_NORMAL:
@@ -3138,9 +3027,6 @@
case STATUS_BROKEN:
return "BROKEN";
- case STATUS_NOT_RESPONDING:
- return "NOT_RESPONDING";
-
case STATUS_ZOMBIE:
return "ZOMBIE";
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index 88084c0..783cbc4 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -325,9 +325,6 @@
if (classes & INPUT_DEVICE_CLASS_DPAD) {
keyboardSources |= AINPUT_SOURCE_DPAD;
}
- if (classes & INPUT_DEVICE_CLASS_GAMEPAD) {
- keyboardSources |= AINPUT_SOURCE_GAMEPAD;
- }
if (keyboardSources != 0) {
device->addMapper(new KeyboardInputMapper(device,
diff --git a/libs/ui/InputTransport.cpp b/libs/ui/InputTransport.cpp
index 4c402dc..2c6346e 100644
--- a/libs/ui/InputTransport.cpp
+++ b/libs/ui/InputTransport.cpp
@@ -131,7 +131,10 @@
}
status_t InputChannel::sendSignal(char signal) {
- ssize_t nWrite = ::write(mSendPipeFd, & signal, 1);
+ ssize_t nWrite;
+ do {
+ nWrite = ::write(mSendPipeFd, & signal, 1);
+ } while (nWrite == -1 && errno == EINTR);
if (nWrite == 1) {
#if DEBUG_CHANNEL_SIGNALS
@@ -147,7 +150,11 @@
}
status_t InputChannel::receiveSignal(char* outSignal) {
- ssize_t nRead = ::read(mReceivePipeFd, outSignal, 1);
+ ssize_t nRead;
+ do {
+ nRead = ::read(mReceivePipeFd, outSignal, 1);
+ } while (nRead == -1 && errno == EINTR);
+
if (nRead == 1) {
#if DEBUG_CHANNEL_SIGNALS
LOGD("channel '%s' ~ received signal '%c'", mName.string(), *outSignal);
diff --git a/libs/utils/Looper.cpp b/libs/utils/Looper.cpp
index fd287da..4aa50d6 100644
--- a/libs/utils/Looper.cpp
+++ b/libs/utils/Looper.cpp
@@ -162,9 +162,11 @@
struct epoll_event eventItems[EPOLL_MAX_EVENTS];
int eventCount = epoll_wait(mEpollFd, eventItems, EPOLL_MAX_EVENTS, timeoutMillis);
if (eventCount < 0) {
- if (errno != EINTR) {
- LOGW("Poll failed with an unexpected error, errno=%d", errno);
+ if (errno == EINTR) {
+ return ALOOPER_POLL_WAKE;
}
+
+ LOGW("Poll failed with an unexpected error, errno=%d", errno);
return ALOOPER_POLL_ERROR;
}
@@ -196,7 +198,7 @@
ssize_t nRead;
do {
nRead = read(mWakeReadPipeFd, buffer, sizeof(buffer));
- } while (nRead == sizeof(buffer));
+ } while ((nRead == -1 && errno == EINTR) || nRead == sizeof(buffer));
} else {
LOGW("Ignoring unexpected epoll events 0x%x on wake read pipe.", epollEvents);
}
@@ -272,7 +274,11 @@
LOGD("%p ~ wake", this);
#endif
- ssize_t nWrite = write(mWakeWritePipeFd, "W", 1);
+ ssize_t nWrite;
+ do {
+ nWrite = write(mWakeWritePipeFd, "W", 1);
+ } while (nWrite == -1 && errno == EINTR);
+
if (nWrite != 1) {
if (errno != EAGAIN) {
LOGW("Could not write wake signal, errno=%d", errno);
diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
index 90756d0..8f40130 100644
--- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
+++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
@@ -145,6 +145,7 @@
void *pParam,
size_t *pValueSize,
void *pValue);
+int Effect_setEnabled(EffectContext *pContext, bool enabled);
/* Effect Library Interface Implementation */
extern "C" int EffectQueryNumberEffects(uint32_t *pNumEffects){
@@ -303,32 +304,34 @@
}
LOGV("\tEffectCreate - pBundledContext is %p", pContext->pBundledContext);
+ SessionContext *pSessionContext = &GlobalSessionMemory[pContext->pBundledContext->SessionNo];
+
// Create each Effect
if (memcmp(uuid, &gBassBoostDescriptor.uuid, sizeof(effect_uuid_t)) == 0){
// Create Bass Boost
LOGV("\tEffectCreate - Effect to be created is LVM_BASS_BOOST");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bBassInstantiated = LVM_TRUE;
+ pSessionContext->bBassInstantiated = LVM_TRUE;
pContext->itfe = &gLvmEffectInterface;
pContext->EffectType = LVM_BASS_BOOST;
} else if (memcmp(uuid, &gVirtualizerDescriptor.uuid, sizeof(effect_uuid_t)) == 0){
// Create Virtualizer
LOGV("\tEffectCreate - Effect to be created is LVM_VIRTUALIZER");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bVirtualizerInstantiated=LVM_TRUE;
+ pSessionContext->bVirtualizerInstantiated=LVM_TRUE;
pContext->itfe = &gLvmEffectInterface;
pContext->EffectType = LVM_VIRTUALIZER;
} else if (memcmp(uuid, &gEqualizerDescriptor.uuid, sizeof(effect_uuid_t)) == 0){
// Create Equalizer
LOGV("\tEffectCreate - Effect to be created is LVM_EQUALIZER");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bEqualizerInstantiated = LVM_TRUE;
+ pSessionContext->bEqualizerInstantiated = LVM_TRUE;
pContext->itfe = &gLvmEffectInterface;
pContext->EffectType = LVM_EQUALIZER;
} else if (memcmp(uuid, &gVolumeDescriptor.uuid, sizeof(effect_uuid_t)) == 0){
// Create Volume
LOGV("\tEffectCreate - Effect to be created is LVM_VOLUME");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bVolumeInstantiated = LVM_TRUE;
+ pSessionContext->bVolumeInstantiated = LVM_TRUE;
pContext->itfe = &gLvmEffectInterface;
pContext->EffectType = LVM_VOLUME;
@@ -353,29 +356,33 @@
return -EINVAL;
}
+
+ Effect_setEnabled(pContext, LVM_FALSE);
+
+ SessionContext *pSessionContext = &GlobalSessionMemory[pContext->pBundledContext->SessionNo];
+
// Clear the instantiated flag for the effect
if(pContext->EffectType == LVM_BASS_BOOST) {
LOGV("\tEffectRelease LVM_BASS_BOOST Clearing global intstantiated flag");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bBassInstantiated = LVM_FALSE;
+ pSessionContext->bBassInstantiated = LVM_FALSE;
} else if(pContext->EffectType == LVM_VIRTUALIZER) {
LOGV("\tEffectRelease LVM_VIRTUALIZER Clearing global intstantiated flag");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bVirtualizerInstantiated
- = LVM_FALSE;
+ pSessionContext->bVirtualizerInstantiated = LVM_FALSE;
} else if(pContext->EffectType == LVM_EQUALIZER) {
LOGV("\tEffectRelease LVM_EQUALIZER Clearing global intstantiated flag");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bEqualizerInstantiated =LVM_FALSE;
+ pSessionContext->bEqualizerInstantiated =LVM_FALSE;
} else if(pContext->EffectType == LVM_VOLUME) {
LOGV("\tEffectRelease LVM_VOLUME Clearing global intstantiated flag");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bVolumeInstantiated = LVM_FALSE;
+ pSessionContext->bVolumeInstantiated = LVM_FALSE;
} else {
LOGV("\tLVM_ERROR : EffectRelease : Unsupported effect\n\n\n\n\n\n\n");
}
// if all effects are no longer instantiaed free the lvm memory and delete BundledEffectContext
- if((GlobalSessionMemory[pContext->pBundledContext->SessionNo].bBassInstantiated == LVM_FALSE)&&
- (GlobalSessionMemory[pContext->pBundledContext->SessionNo].bVolumeInstantiated == LVM_FALSE)&&
- (GlobalSessionMemory[pContext->pBundledContext->SessionNo].bEqualizerInstantiated ==LVM_FALSE)&&
- (GlobalSessionMemory[pContext->pBundledContext->SessionNo].bVirtualizerInstantiated==LVM_FALSE))
+ if ((pSessionContext->bBassInstantiated == LVM_FALSE) &&
+ (pSessionContext->bVolumeInstantiated == LVM_FALSE) &&
+ (pSessionContext->bEqualizerInstantiated ==LVM_FALSE) &&
+ (pSessionContext->bVirtualizerInstantiated==LVM_FALSE))
{
#ifdef LVM_PCM
if (pContext->pBundledContext->PcmInPtr != NULL) {
@@ -402,8 +409,8 @@
}
LOGV("\tEffectRelease: All effects are no longer instantiated\n");
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].bBundledEffectsEnabled =LVM_FALSE;
- GlobalSessionMemory[pContext->pBundledContext->SessionNo].pBundledContext = LVM_NULL;
+ pSessionContext->bBundledEffectsEnabled =LVM_FALSE;
+ pSessionContext->pBundledContext = LVM_NULL;
LOGV("\tEffectRelease: Freeing LVM Bundle memory\n");
LvmEffect_free(pContext);
LOGV("\tEffectRelease: Deleting LVM Bundle context %p\n", pContext->pBundledContext);
@@ -2377,6 +2384,107 @@
return db_fix;
}
+//----------------------------------------------------------------------------
+// Effect_setEnabled()
+//----------------------------------------------------------------------------
+// Purpose:
+// Enable or disable effect
+//
+// Inputs:
+// pContext - pointer to effect context
+// enabled - true if enabling the effect, false otherwise
+//
+// Outputs:
+//
+//----------------------------------------------------------------------------
+
+int Effect_setEnabled(EffectContext *pContext, bool enabled)
+{
+ LOGV("\tEffect_setEnabled() type %d, enabled %d", pContext->EffectType, enabled);
+
+ if (enabled) {
+ switch (pContext->EffectType) {
+ case LVM_BASS_BOOST:
+ if (pContext->pBundledContext->bBassEnabled == LVM_TRUE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_BASS_BOOST is already enabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->SamplesToExitCountBb =
+ (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1);
+ pContext->pBundledContext->bBassEnabled = LVM_TRUE;
+ break;
+ case LVM_EQUALIZER:
+ if (pContext->pBundledContext->bEqualizerEnabled == LVM_TRUE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_EQUALIZER is already enabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->SamplesToExitCountEq =
+ (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1);
+ pContext->pBundledContext->bEqualizerEnabled = LVM_TRUE;
+ break;
+ case LVM_VIRTUALIZER:
+ if (pContext->pBundledContext->bVirtualizerEnabled == LVM_TRUE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_VIRTUALIZER is already enabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->SamplesToExitCountVirt =
+ (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1);
+ pContext->pBundledContext->bVirtualizerEnabled = LVM_TRUE;
+ break;
+ case LVM_VOLUME:
+ if (pContext->pBundledContext->bVolumeEnabled == LVM_TRUE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_VOLUME is already enabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->bVolumeEnabled = LVM_TRUE;
+ break;
+ default:
+ LOGV("\tLVM_ERROR : Effect_setEnabled() invalid effect type");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->NumberEffectsEnabled++;
+ LvmEffect_enable(pContext);
+ } else {
+ switch (pContext->EffectType) {
+ case LVM_BASS_BOOST:
+ if (pContext->pBundledContext->bBassEnabled == LVM_FALSE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_BASS_BOOST is already disabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->bBassEnabled = LVM_FALSE;
+ break;
+ case LVM_EQUALIZER:
+ if (pContext->pBundledContext->bEqualizerEnabled == LVM_FALSE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_EQUALIZER is already disabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->bEqualizerEnabled = LVM_FALSE;
+ break;
+ case LVM_VIRTUALIZER:
+ if (pContext->pBundledContext->bVirtualizerEnabled == LVM_FALSE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_VIRTUALIZER is already disabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->bVirtualizerEnabled = LVM_FALSE;
+ break;
+ case LVM_VOLUME:
+ if (pContext->pBundledContext->bVolumeEnabled == LVM_FALSE) {
+ LOGV("\tLVM_ERROR : Effect_setEnabled() LVM_VOLUME is already disabled");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->bVolumeEnabled = LVM_FALSE;
+ break;
+ default:
+ LOGV("\tLVM_ERROR : Effect_setEnabled() invalid effect type");
+ return -EINVAL;
+ }
+ pContext->pBundledContext->NumberEffectsEnabled--;
+ LvmEffect_disable(pContext);
+ }
+
+ return 0;
+}
+
} // namespace
} // namespace
@@ -2426,7 +2534,7 @@
//LOGV("\tEffect_process: Waiting to turn off BASS_BOOST, %d samples left",
// pContext->pBundledContext->SamplesToExitCountBb);
} else {
- status = -ENODATA;
+ status = -ENODATA;
}
}
if ((pContext->pBundledContext->bVolumeEnabled == LVM_FALSE)&&
@@ -2843,62 +2951,8 @@
LOGV("\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_ENABLE: ERROR");
return -EINVAL;
}
- switch (pContext->EffectType){
- case LVM_BASS_BOOST:
- if(pContext->pBundledContext->bBassEnabled == LVM_TRUE){
- LOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: "
- "EFFECT_CMD_ENABLE: ERROR-Effect is already enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bBassEnabled = LVM_TRUE;
- //LOGV("\tEffect_command cmdCode Case:EFFECT_CMD_ENABLE LVM_BASS_BOOSTenabled");
- break;
- case LVM_EQUALIZER:
- if(pContext->pBundledContext->bEqualizerEnabled == LVM_TRUE){
- LOGV("\tLVM_ERROR : Equalizer_command cmdCode Case: "
- "EFFECT_CMD_ENABLE: ERROR-Effect is already enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bEqualizerEnabled = LVM_TRUE;
- //LOGV("\tEffect_command cmdCode Case:EFFECT_CMD_ENABLE LVM_EQUALIZER enabled");
- break;
- case LVM_VIRTUALIZER:
- if(pContext->pBundledContext->bVirtualizerEnabled == LVM_TRUE){
- LOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: "
- "EFFECT_CMD_ENABLE: ERROR-Effect is already enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bVirtualizerEnabled = LVM_TRUE;
- //LOGV("\tEffect_command cmdCode :EFFECT_CMD_ENABLE LVM_VIRTUALIZER enabled");
- break;
- case LVM_VOLUME:
- if(pContext->pBundledContext->bVolumeEnabled == LVM_TRUE){
- LOGV("\tLVM_ERROR : Volume_command cmdCode Case: "
- "EFFECT_CMD_ENABLE: ERROR-Effect is already enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bVolumeEnabled = LVM_TRUE;
- LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE LVM_VOLUME enabled");
- break;
- default:
- LOGV("\tLVM_ERROR : Effect_command cmdCode Case: "
- "EFFECT_CMD_ENABLE: ERROR, invalid Effect Type");
- return -EINVAL;
- }
- *(int *)pReplyData = 0;
- pContext->pBundledContext->NumberEffectsEnabled++;
- android::LvmEffect_enable(pContext);
- pContext->pBundledContext->SamplesToExitCountEq =
- (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1); // 0.1 secs Stereo
- pContext->pBundledContext->SamplesToExitCountBb =
- (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1); // 0.1 secs Stereo
- pContext->pBundledContext->SamplesToExitCountVirt =
- (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1); // 0.1 secs Stereo
- LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE Samples to Exit = %d",
- pContext->pBundledContext->SamplesToExitCountBb);
- //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE NumberEffectsEnabled = %d",
- // pContext->pBundledContext->NumberEffectsEnabled);
- //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE end");
+
+ *(int *)pReplyData = android::Effect_setEnabled(pContext, LVM_TRUE);
break;
case EFFECT_CMD_DISABLE:
@@ -2907,57 +2961,7 @@
LOGV("\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_DISABLE: ERROR");
return -EINVAL;
}
- switch (pContext->EffectType){
- case LVM_BASS_BOOST:
- if(pContext->pBundledContext->bBassEnabled == LVM_FALSE){
- LOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: "
- "EFFECT_CMD_DISABLE: ERROR-Effect is not yet enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bBassEnabled = LVM_FALSE;
- //LOGV("\tEffect_command cmdCode Case: "
- // "EFFECT_CMD_DISABLE LVM_BASS_BOOST disabled");
- break;
- case LVM_EQUALIZER:
- if(pContext->pBundledContext->bEqualizerEnabled == LVM_FALSE){
- LOGV("\tLVM_ERROR : Equalizer_command cmdCode Case: "
- "EFFECT_CMD_DISABLE: ERROR-Effect is not yet enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bEqualizerEnabled = LVM_FALSE;
- //LOGV("\tEffect_command cmdCode Case: "
- // "EFFECT_CMD_DISABLE LVM_EQUALIZER disabled");
- break;
- case LVM_VIRTUALIZER:
- if(pContext->pBundledContext->bVirtualizerEnabled == LVM_FALSE){
- LOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: "
- "EFFECT_CMD_DISABLE: ERROR-Effect is not yet enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bVirtualizerEnabled = LVM_FALSE;
- //LOGV("\tEffect_command cmdCode Case: "
- // "EFFECT_CMD_DISABLE LVM_VIRTUALIZER disabled");
- break;
- case LVM_VOLUME:
- if(pContext->pBundledContext->bVolumeEnabled == LVM_FALSE){
- LOGV("\tLVM_ERROR : Volume_command cmdCode Case: "
- "EFFECT_CMD_DISABLE: ERROR-Effect is not yet enabled");
- return -EINVAL;
- }
- pContext->pBundledContext->bVolumeEnabled = LVM_FALSE;
- //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_DISABLE LVM_VOLUME disabled");
- break;
- default:
- LOGV("\tLVM_ERROR : Effect_command cmdCode Case: "
- "EFFECT_CMD_DISABLE: ERROR, invalid Effect Type");
- return -EINVAL;
- }
- *(int *)pReplyData = 0;
- pContext->pBundledContext->NumberEffectsEnabled--;
- android::LvmEffect_disable(pContext);
- //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_DISABLE NumberEffectsEnabled = %d",
- // pContext->pBundledContext->NumberEffectsEnabled);
- //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_DISABLE end");
+ *(int *)pReplyData = android::Effect_setEnabled(pContext, LVM_FALSE);
break;
case EFFECT_CMD_SET_DEVICE:
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index 86fa668..e0321a5 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -34,6 +34,7 @@
ShoutcastSource.cpp \
StagefrightMediaScanner.cpp \
StagefrightMetadataRetriever.cpp \
+ ThreadedSource.cpp \
ThrottledSource.cpp \
TimeSource.cpp \
TimedEventQueue.cpp \
diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp
index 8d7ada3..29f16d8 100644
--- a/media/libstagefright/AudioSource.cpp
+++ b/media/libstagefright/AudioSource.cpp
@@ -256,6 +256,8 @@
if (numLostBytes > kMaxBufferSize) {
mPrevLostBytes = numLostBytes - kMaxBufferSize;
numLostBytes = kMaxBufferSize;
+ } else {
+ mPrevLostBytes = 0;
}
CHECK_EQ(numLostBytes & 1, 0);
@@ -275,8 +277,9 @@
memset(buffer->data(), 0, numLostBytes);
buffer->set_range(0, numLostBytes);
if (numFramesRecorded == 0) {
- buffer->meta_data()->setInt64(kKeyTime, mStartTimeUs);
+ buffer->meta_data()->setInt64(kKeyAnchorTime, mStartTimeUs);
}
+ buffer->meta_data()->setInt64(kKeyTime, mStartTimeUs + mPrevSampleTimeUs);
buffer->meta_data()->setInt64(kKeyDriftTime, readTimeUs - mInitialReadTimeUs);
mPrevSampleTimeUs = timestampUs;
*out = buffer;
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 3e31d61..89cb135 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -93,6 +93,9 @@
return OMX_COLOR_Format16bitRGB565;
}
+ LOGE("Uknown color format (%s), please add it to "
+ "CameraSource::getColorFormat", colorFormat);
+
CHECK_EQ(0, "Unknown color format");
}
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index de4233d..f0d8943 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -1675,9 +1675,9 @@
}
- if (mSampleSizes.empty()) {
- err = ERROR_MALFORMED;
- } else if (OK != checkCodecSpecificData()) {
+ if (mSampleSizes.empty() || // no samples written
+ (!mIsAudio && mNumStssTableEntries == 0) || // no sync frames for video
+ (OK != checkCodecSpecificData())) { // no codec specific data
err = ERROR_MALFORMED;
}
mOwner->trackProgressStatus(this, -1, err);
@@ -1794,13 +1794,13 @@
!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) {
if (!mCodecSpecificData ||
mCodecSpecificDataSize <= 0) {
- // Missing codec specific data
+ LOGE("Missing codec specific data");
return ERROR_MALFORMED;
}
} else {
if (mCodecSpecificData ||
mCodecSpecificDataSize > 0) {
- // Unexepected codec specific data found
+ LOGE("Unexepected codec specific data found");
return ERROR_MALFORMED;
}
}
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 165cec9..cd70a3d 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -52,6 +52,8 @@
#include <OMX_Audio.h>
#include <OMX_Component.h>
+#include "include/ThreadedSource.h"
+
namespace android {
static const int OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00;
@@ -134,6 +136,10 @@
for (size_t i = 0;
i < sizeof(kFactoryInfo) / sizeof(kFactoryInfo[0]); ++i) {
if (!strcmp(name, kFactoryInfo[i].name)) {
+ if (!strcmp(name, "VPXDecoder")) {
+ return new ThreadedSource(
+ (*kFactoryInfo[i].CreateFunc)(source));
+ }
return (*kFactoryInfo[i].CreateFunc)(source);
}
}
@@ -811,8 +817,7 @@
if (OMX_ErrorNone != mOMX->getParameter(
mNode, OMX_IndexParamVideoPortFormat,
&portFormat, sizeof(portFormat))) {
-
- return UNKNOWN_ERROR;
+ break;
}
// Make sure that omx component does not overwrite
// the incremented index (bug 2897413).
@@ -832,6 +837,8 @@
break;
}
}
+
+ LOGE("color format %d is not supported", colorFormat);
return UNKNOWN_ERROR;
}
@@ -1028,7 +1035,7 @@
mNode, OMX_IndexParamVideoProfileLevelQuerySupported,
¶m, sizeof(param));
- if (err != OK) return err;
+ if (err != OK) break;
int32_t supportedProfile = static_cast<int32_t>(param.eProfile);
int32_t supportedLevel = static_cast<int32_t>(param.eLevel);
@@ -1036,7 +1043,10 @@
supportedProfile, supportedLevel);
if (profile == supportedProfile &&
- level == supportedLevel) {
+ level <= supportedLevel) {
+ // We can further check whether the level is a valid
+ // value; but we will leave that to the omx encoder component
+ // via OMX_SetParameter call.
profileLevel.mProfile = profile;
profileLevel.mLevel = level;
return OK;
diff --git a/media/libstagefright/ThreadedSource.cpp b/media/libstagefright/ThreadedSource.cpp
new file mode 100644
index 0000000..5add2a5
--- /dev/null
+++ b/media/libstagefright/ThreadedSource.cpp
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/ThreadedSource.h"
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MetaData.h>
+
+namespace android {
+
+static const size_t kMaxQueueSize = 2;
+
+ThreadedSource::ThreadedSource(const sp<MediaSource> &source)
+ : mSource(source),
+ mReflector(new AHandlerReflector<ThreadedSource>(this)),
+ mLooper(new ALooper),
+ mStarted(false) {
+ mLooper->registerHandler(mReflector);
+}
+
+ThreadedSource::~ThreadedSource() {
+ if (mStarted) {
+ stop();
+ }
+}
+
+status_t ThreadedSource::start(MetaData *params) {
+ CHECK(!mStarted);
+
+ status_t err = mSource->start(params);
+
+ if (err != OK) {
+ return err;
+ }
+
+ mFinalResult = OK;
+ mSeekTimeUs = -1;
+ mDecodePending = false;
+
+ Mutex::Autolock autoLock(mLock);
+ postDecodeMore_l();
+
+ CHECK_EQ(mLooper->start(), (status_t)OK);
+
+ mStarted = true;
+
+ return OK;
+}
+
+status_t ThreadedSource::stop() {
+ CHECK(mStarted);
+
+ CHECK_EQ(mLooper->stop(), (status_t)OK);
+
+ Mutex::Autolock autoLock(mLock);
+ clearQueue_l();
+
+ status_t err = mSource->stop();
+
+ mStarted = false;
+
+ return err;
+}
+
+sp<MetaData> ThreadedSource::getFormat() {
+ return mSource->getFormat();
+}
+
+status_t ThreadedSource::read(
+ MediaBuffer **buffer, const ReadOptions *options) {
+ *buffer = NULL;
+
+ Mutex::Autolock autoLock(mLock);
+
+ int64_t seekTimeUs;
+ ReadOptions::SeekMode seekMode;
+ if (options && options->getSeekTo(&seekTimeUs, &seekMode)) {
+ int32_t seekComplete = 0;
+
+ sp<AMessage> msg = new AMessage(kWhatSeek, mReflector->id());
+ msg->setInt64("timeUs", seekTimeUs);
+ msg->setInt32("mode", seekMode);
+ msg->setPointer("complete", &seekComplete);
+ msg->post();
+
+ while (!seekComplete) {
+ mCondition.wait(mLock);
+ }
+ }
+
+ while (mQueue.empty() && mFinalResult == OK) {
+ mCondition.wait(mLock);
+ }
+
+ if (!mQueue.empty()) {
+ *buffer = *mQueue.begin();
+ mQueue.erase(mQueue.begin());
+
+ if (mFinalResult == OK) {
+ postDecodeMore_l();
+ }
+
+ return OK;
+ }
+
+ return mFinalResult;
+}
+
+void ThreadedSource::onMessageReceived(const sp<AMessage> &msg) {
+ switch (msg->what()) {
+ case kWhatSeek:
+ {
+ CHECK(msg->findInt64("timeUs", &mSeekTimeUs));
+ CHECK_GE(mSeekTimeUs, 0ll);
+
+ int32_t x;
+ CHECK(msg->findInt32("mode", &x));
+ mSeekMode = (ReadOptions::SeekMode)x;
+
+ int32_t *seekComplete;
+ CHECK(msg->findPointer("complete", (void **)&seekComplete));
+
+ Mutex::Autolock autoLock(mLock);
+ clearQueue_l();
+ mFinalResult = OK;
+
+ *seekComplete = 1;
+ mCondition.signal();
+
+ postDecodeMore_l();
+ break;
+ }
+
+ case kWhatDecodeMore:
+ {
+ {
+ Mutex::Autolock autoLock(mLock);
+ mDecodePending = false;
+
+ if (mQueue.size() == kMaxQueueSize) {
+ break;
+ }
+ }
+
+ MediaBuffer *buffer;
+ ReadOptions options;
+ if (mSeekTimeUs >= 0) {
+ options.setSeekTo(mSeekTimeUs, mSeekMode);
+ mSeekTimeUs = -1ll;
+ }
+ status_t err = mSource->read(&buffer, &options);
+
+ Mutex::Autolock autoLock(mLock);
+
+ if (err != OK) {
+ mFinalResult = err;
+ } else {
+ mQueue.push_back(buffer);
+
+ if (mQueue.size() < kMaxQueueSize) {
+ postDecodeMore_l();
+ }
+ }
+
+ mCondition.signal();
+ break;
+ }
+
+ default:
+ TRESPASS();
+ break;
+ }
+}
+
+void ThreadedSource::postDecodeMore_l() {
+ if (mDecodePending) {
+ return;
+ }
+
+ mDecodePending = true;
+ (new AMessage(kWhatDecodeMore, mReflector->id()))->post();
+}
+
+void ThreadedSource::clearQueue_l() {
+ while (!mQueue.empty()) {
+ MediaBuffer *buffer = *mQueue.begin();
+ mQueue.erase(mQueue.begin());
+
+ buffer->release();
+ buffer = NULL;
+ }
+}
+
+} // namespace android
diff --git a/media/libstagefright/WAVExtractor.cpp b/media/libstagefright/WAVExtractor.cpp
index 57c1075..aff06bc 100644
--- a/media/libstagefright/WAVExtractor.cpp
+++ b/media/libstagefright/WAVExtractor.cpp
@@ -331,9 +331,20 @@
return err;
}
+ size_t maxBytesToRead =
+ mBitsPerSample == 8 ? kMaxFrameSize / 2 : kMaxFrameSize;
+
+ size_t maxBytesAvailable =
+ (mCurrentPos - mOffset >= (off_t)mSize)
+ ? 0 : mSize - (mCurrentPos - mOffset);
+
+ if (maxBytesToRead > maxBytesAvailable) {
+ maxBytesToRead = maxBytesAvailable;
+ }
+
ssize_t n = mDataSource->readAt(
mCurrentPos, buffer->data(),
- mBitsPerSample == 8 ? kMaxFrameSize / 2 : kMaxFrameSize);
+ maxBytesToRead);
if (n <= 0) {
buffer->release();
diff --git a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
index 7154ba5..7483d60 100644
--- a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
+++ b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
@@ -317,7 +317,7 @@
&nalType, &nalRefIdc);
if (res != AVCDEC_SUCCESS) {
- LOGE("cannot determine nal type");
+ LOGV("cannot determine nal type");
} else if (nalType == AVC_NALTYPE_SPS || nalType == AVC_NALTYPE_PPS
|| (mSPSSeen && mPPSSeen)) {
switch (nalType) {
@@ -330,6 +330,7 @@
fragSize);
if (res != AVCDEC_SUCCESS) {
+ LOGV("PVAVCDecSeqParamSet returned error %d", res);
break;
}
@@ -396,6 +397,7 @@
fragSize);
if (res != AVCDEC_SUCCESS) {
+ LOGV("PVAVCDecPicParamSet returned error %d", res);
break;
}
@@ -418,8 +420,13 @@
AVCFrameIO Output;
Output.YCbCr[0] = Output.YCbCr[1] = Output.YCbCr[2] = NULL;
- CHECK_EQ(PVAVCDecGetOutput(mHandle, &index, &Release, &Output),
- AVCDEC_SUCCESS);
+ AVCDec_Status status =
+ PVAVCDecGetOutput(mHandle, &index, &Release, &Output);
+
+ if (status != AVCDEC_SUCCESS) {
+ LOGV("PVAVCDecGetOutput returned error %d", status);
+ break;
+ }
CHECK(index >= 0);
CHECK(index < (int32_t)mFrames.size());
@@ -466,7 +473,7 @@
err = OK;
} else {
- LOGV("failed to decode frame (res = %d)", res);
+ LOGV("PVAVCDecodeSlice returned error %d", res);
}
break;
}
diff --git a/media/libstagefright/codecs/on2/dec/VPXDecoder.cpp b/media/libstagefright/codecs/on2/dec/VPXDecoder.cpp
index fbc97f4..9433178 100644
--- a/media/libstagefright/codecs/on2/dec/VPXDecoder.cpp
+++ b/media/libstagefright/codecs/on2/dec/VPXDecoder.cpp
@@ -29,8 +29,9 @@
#include <media/stagefright/MetaData.h>
#include <media/stagefright/Utils.h>
-#include "vpx_codec/vpx_decoder.h"
-#include "vp8/vp8dx.h"
+#include "vpx/vpx_decoder.h"
+#include "vpx/vpx_codec.h"
+#include "vpx/vp8dx.h"
namespace android {
@@ -82,9 +83,10 @@
}
mCtx = new vpx_codec_ctx_t;
- if (vpx_codec_dec_init(
- (vpx_codec_ctx_t *)mCtx, &vpx_codec_vp8_dx_algo, NULL, 0)) {
- LOGE("on2 decoder failed to initialize.");
+ vpx_codec_err_t vpx_err;
+ if ((vpx_err = vpx_codec_dec_init(
+ (vpx_codec_ctx_t *)mCtx, &vpx_codec_vp8_dx_algo, NULL, 0))) {
+ LOGE("on2 decoder failed to initialize. (%d)", vpx_err);
mSource->stop();
diff --git a/media/libstagefright/include/ThreadedSource.h b/media/libstagefright/include/ThreadedSource.h
new file mode 100644
index 0000000..c67295c
--- /dev/null
+++ b/media/libstagefright/include/ThreadedSource.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 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 THREADED_SOURCE_H_
+
+#define THREADED_SOURCE_H_
+
+#include <media/stagefright/foundation/ABase.h>
+#include <media/stagefright/foundation/AHandlerReflector.h>
+#include <media/stagefright/foundation/ALooper.h>
+#include <media/stagefright/MediaSource.h>
+#include <utils/threads.h>
+
+namespace android {
+
+struct ThreadedSource : public MediaSource {
+ ThreadedSource(const sp<MediaSource> &source);
+
+ virtual status_t start(MetaData *params);
+ virtual status_t stop();
+
+ virtual sp<MetaData> getFormat();
+
+ virtual status_t read(
+ MediaBuffer **buffer, const ReadOptions *options);
+
+ virtual void onMessageReceived(const sp<AMessage> &msg);
+
+protected:
+ virtual ~ThreadedSource();
+
+private:
+ enum {
+ kWhatDecodeMore = 'deco',
+ kWhatSeek = 'seek',
+ };
+
+ sp<MediaSource> mSource;
+ sp<AHandlerReflector<ThreadedSource> > mReflector;
+ sp<ALooper> mLooper;
+
+ Mutex mLock;
+ Condition mCondition;
+ List<MediaBuffer *> mQueue;
+ status_t mFinalResult;
+ bool mDecodePending;
+ bool mStarted;
+
+ int64_t mSeekTimeUs;
+ ReadOptions::SeekMode mSeekMode;
+
+ void postDecodeMore_l();
+ void clearQueue_l();
+
+ DISALLOW_EVIL_CONSTRUCTORS(ThreadedSource);
+};
+
+} // namespace android
+
+#endif // THREADED_SOURCE_H_
diff --git a/native/include/android/input.h b/native/include/android/input.h
index c1134bf..5580700 100644
--- a/native/include/android/input.h
+++ b/native/include/android/input.h
@@ -295,7 +295,6 @@
AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
- AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010,
};
enum {
@@ -303,13 +302,10 @@
AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
- AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
- AINPUT_SOURCE_JOYSTICK_LEFT = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
- AINPUT_SOURCE_JOYSTICK_RIGHT = 0x02000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
};
/*
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully.png
new file mode 100644
index 0000000..95ba181
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully.png
new file mode 100644
index 0000000..adf668d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully.png
new file mode 100644
index 0000000..7bf6b51
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully.png
new file mode 100644
index 0000000..78738ac
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully.png
new file mode 100644
index 0000000..ac88143
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully.png
new file mode 100644
index 0000000..3e317dd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully.png
new file mode 100644
index 0000000..72329f8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully.png
new file mode 100644
index 0000000..558c49c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully.png
new file mode 100644
index 0000000..6440bdd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully.png
new file mode 100644
index 0000000..fe20423
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png
deleted file mode 100644
index bfbf18e..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png
deleted file mode 100644
index 896ba4d..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png
deleted file mode 100644
index af79eff..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png
deleted file mode 100644
index 92c09c8..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png
deleted file mode 100644
index f04fb11..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
deleted file mode 100644
index cb7b7b3..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
deleted file mode 100644
index 5376e92..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
deleted file mode 100644
index fd54363..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
deleted file mode 100644
index 6c4873a..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
deleted file mode 100644
index a3320cb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
deleted file mode 100755
index 2f4fd4f..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
deleted file mode 100644
index 5aa23f6..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java
index 5dedcc9..7ccf210 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java
@@ -120,19 +120,29 @@
//***** Signal strength icons
//GSM/UMTS
- private static final int[] sSignalImages = new int[] {
- R.drawable.stat_sys_signal_0,
- R.drawable.stat_sys_signal_1,
- R.drawable.stat_sys_signal_2,
- R.drawable.stat_sys_signal_3,
- R.drawable.stat_sys_signal_4
+ private static final int[][] sSignalImages = {
+ { R.drawable.stat_sys_signal_0,
+ R.drawable.stat_sys_signal_1,
+ R.drawable.stat_sys_signal_2,
+ R.drawable.stat_sys_signal_3,
+ R.drawable.stat_sys_signal_4 },
+ { R.drawable.stat_sys_signal_0_fully,
+ R.drawable.stat_sys_signal_1_fully,
+ R.drawable.stat_sys_signal_2_fully,
+ R.drawable.stat_sys_signal_3_fully,
+ R.drawable.stat_sys_signal_4_fully }
};
- private static final int[] sSignalImages_r = new int[] {
- R.drawable.stat_sys_r_signal_0,
- R.drawable.stat_sys_r_signal_1,
- R.drawable.stat_sys_r_signal_2,
- R.drawable.stat_sys_r_signal_3,
- R.drawable.stat_sys_r_signal_4
+ private static final int[][] sSignalImages_r = {
+ { R.drawable.stat_sys_r_signal_0,
+ R.drawable.stat_sys_r_signal_1,
+ R.drawable.stat_sys_r_signal_2,
+ R.drawable.stat_sys_r_signal_3,
+ R.drawable.stat_sys_r_signal_4 },
+ { R.drawable.stat_sys_r_signal_0_fully,
+ R.drawable.stat_sys_r_signal_1_fully,
+ R.drawable.stat_sys_r_signal_2_fully,
+ R.drawable.stat_sys_r_signal_3_fully,
+ R.drawable.stat_sys_r_signal_4_fully }
};
private static final int[] sRoamingIndicatorImages_cdma = new int[] {
R.drawable.stat_sys_roaming_cdma_0, //Standard Roaming Indicator
@@ -330,7 +340,9 @@
private int mLastWifiSignalLevel = -1;
private boolean mIsWifiConnected = false;
- private int mLastWifiInetConnectivityState = 0;
+
+ // state of inet connection - 0 not connected, 100 connected
+ private int mInetCondition = 0;
// sync state
// If sync is active the SyncActive icon is displayed. If sync is not active but
@@ -381,7 +393,8 @@
else if (action.equals(TtyIntent.TTY_ENABLED_CHANGE_ACTION)) {
updateTTY(intent);
}
- else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
+ else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) ||
+ action.equals(ConnectivityManager.INET_CONDITION_ACTION)) {
// TODO - stop using other means to get wifi/mobile info
updateConnectivity(intent);
}
@@ -489,6 +502,7 @@
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
filter.addAction(TtyIntent.TTY_ENABLED_CHANGE_ACTION);
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+ filter.addAction(ConnectivityManager.INET_CONDITION_ACTION);
mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
// load config to determine if to distinguish Hspa data icon
@@ -704,19 +718,19 @@
if (info.isConnected()) {
updateDataNetType(info.getSubtype(), connectionStatus);
updateDataIcon();
+ updateSignalStrength(); // apply any change in connectionStatus
}
break;
case ConnectivityManager.TYPE_WIFI:
if (info.isConnected()) {
mIsWifiConnected = true;
- mLastWifiInetConnectivityState =
+ mInetCondition =
(connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0);
int iconId;
if (mLastWifiSignalLevel == -1) {
- iconId = sWifiSignalImages[mLastWifiInetConnectivityState][0];
+ iconId = sWifiSignalImages[mInetCondition][0];
} else {
- iconId = sWifiSignalImages[mLastWifiInetConnectivityState]
- [mLastWifiSignalLevel];
+ iconId = sWifiSignalImages[mInetCondition][mLastWifiSignalLevel];
}
mService.setIcon("wifi", iconId, 0);
// Show the icon since wi-fi is connected
@@ -724,13 +738,14 @@
} else {
mLastWifiSignalLevel = -1;
mIsWifiConnected = false;
- mLastWifiInetConnectivityState = 0;
+ mInetCondition = 0;
int iconId = sWifiSignalImages[0][0];
mService.setIcon("wifi", iconId, 0);
// Hide the icon since we're not connected
mService.setIconVisibility("wifi", false);
}
+ updateSignalStrength(); // apply any change in mInetCondition
break;
}
}
@@ -764,6 +779,7 @@
mDataState = state;
updateDataNetType(networkType, 0);
updateDataIcon();
+ updateSignalStrength(); // apply the change in connection status
}
@Override
@@ -858,12 +874,12 @@
// Though mPhone is a Manager, this call is not an IPC
if (mPhone.isNetworkRoaming()) {
- iconList = sSignalImages_r;
+ iconList = sSignalImages_r[mInetCondition];
} else {
- iconList = sSignalImages;
+ iconList = sSignalImages[mInetCondition];
}
} else {
- iconList = this.sSignalImages;
+ iconList = sSignalImages[mInetCondition];
// If 3G(EV) and 1x network are available than 3G should be
// displayed, displayed RSSI should be from the EV side.
@@ -925,37 +941,37 @@
}
private final void updateDataNetType(int net, int inetCondition) {
- int connected = (inetCondition > INET_CONDITION_THRESHOLD ? 1 : 0);
+ mInetCondition = (inetCondition > INET_CONDITION_THRESHOLD ? 1 : 0);
switch (net) {
case TelephonyManager.NETWORK_TYPE_EDGE:
- mDataIconList = sDataNetType_e[connected];
+ mDataIconList = sDataNetType_e[mInetCondition];
break;
case TelephonyManager.NETWORK_TYPE_UMTS:
- mDataIconList = sDataNetType_3g[connected];
+ mDataIconList = sDataNetType_3g[mInetCondition];
break;
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPA:
if (mHspaDataDistinguishable) {
- mDataIconList = sDataNetType_h[connected];
+ mDataIconList = sDataNetType_h[mInetCondition];
} else {
- mDataIconList = sDataNetType_3g[connected];
+ mDataIconList = sDataNetType_3g[mInetCondition];
}
break;
case TelephonyManager.NETWORK_TYPE_CDMA:
// display 1xRTT for IS95A/B
- mDataIconList = sDataNetType_1x[connected];
+ mDataIconList = sDataNetType_1x[mInetCondition];
break;
case TelephonyManager.NETWORK_TYPE_1xRTT:
- mDataIconList = sDataNetType_1x[connected];
+ mDataIconList = sDataNetType_1x[mInetCondition];
break;
case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through
case TelephonyManager.NETWORK_TYPE_EVDO_A:
case TelephonyManager.NETWORK_TYPE_EVDO_B:
- mDataIconList = sDataNetType_3g[connected];
+ mDataIconList = sDataNetType_3g[mInetCondition];
break;
default:
- mDataIconList = sDataNetType_g[connected];
+ mDataIconList = sDataNetType_g[mInetCondition];
break;
}
}
@@ -1104,7 +1120,7 @@
if (newSignalLevel != mLastWifiSignalLevel) {
mLastWifiSignalLevel = newSignalLevel;
if (mIsWifiConnected) {
- iconId = sWifiSignalImages[mLastWifiInetConnectivityState][newSignalLevel];
+ iconId = sWifiSignalImages[mInetCondition][newSignalLevel];
} else {
iconId = sWifiTemporarilyNotConnectedImage;
}
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 9784d96..c5505d1 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1008,7 +1008,15 @@
}
private void sendConnectedBroadcast(NetworkInfo info) {
- Intent intent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION);
+ sendGeneralBroadcast(info, ConnectivityManager.CONNECTIVITY_ACTION);
+ }
+
+ private void sendInetConditionBroadcast(NetworkInfo info) {
+ sendGeneralBroadcast(info, ConnectivityManager.INET_CONDITION_ACTION);
+ }
+
+ private void sendGeneralBroadcast(NetworkInfo info, String bcastType) {
+ Intent intent = new Intent(bcastType);
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_INFO, info);
if (info.isFailover()) {
intent.putExtra(ConnectivityManager.EXTRA_IS_FAILOVER, true);
@@ -1512,7 +1520,7 @@
break;
}
mDefaultInetConditionPublished = mDefaultInetCondition;
- sendConnectedBroadcast(networkInfo);
+ sendInetConditionBroadcast(networkInfo);
break;
}
}
diff --git a/services/java/com/android/server/InputManager.java b/services/java/com/android/server/InputManager.java
index 90d036a..024aec5 100644
--- a/services/java/com/android/server/InputManager.java
+++ b/services/java/com/android/server/InputManager.java
@@ -24,18 +24,13 @@
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.os.Environment;
-import android.os.LocalPowerManager;
-import android.os.PowerManager;
import android.os.SystemProperties;
import android.util.Slog;
import android.util.Xml;
import android.view.InputChannel;
import android.view.InputDevice;
import android.view.InputEvent;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
import android.view.Surface;
-import android.view.WindowManagerPolicy;
import java.io.BufferedReader;
import java.io.File;
@@ -83,7 +78,6 @@
private static native void nativeSetInputWindows(InputWindow[] windows);
private static native void nativeSetInputDispatchMode(boolean enabled, boolean frozen);
private static native void nativeSetFocusedApplication(InputApplication application);
- private static native void nativePreemptInputDispatch();
private static native InputDevice nativeGetInputDevice(int deviceId);
private static native int[] nativeGetInputDeviceIds();
private static native String nativeDump();
@@ -331,10 +325,6 @@
nativeSetFocusedApplication(application);
}
- public void preemptInputDispatch() {
- nativePreemptInputDispatch();
- }
-
public void setInputDispatchMode(boolean enabled, boolean frozen) {
nativeSetInputDispatchMode(enabled, frozen);
}
@@ -395,20 +385,10 @@
public void notifyInputChannelBroken(InputChannel inputChannel) {
mWindowManagerService.mInputMonitor.notifyInputChannelBroken(inputChannel);
}
-
- @SuppressWarnings("unused")
- public long notifyInputChannelANR(InputChannel inputChannel) {
- return mWindowManagerService.mInputMonitor.notifyInputChannelANR(inputChannel);
- }
-
- @SuppressWarnings("unused")
- public void notifyInputChannelRecoveredFromANR(InputChannel inputChannel) {
- mWindowManagerService.mInputMonitor.notifyInputChannelRecoveredFromANR(inputChannel);
- }
@SuppressWarnings("unused")
- public long notifyANR(Object token) {
- return mWindowManagerService.mInputMonitor.notifyANR(token);
+ public long notifyANR(Object token, InputChannel inputChannel) {
+ return mWindowManagerService.mInputMonitor.notifyANR(token, inputChannel);
}
@SuppressWarnings("unused")
diff --git a/services/java/com/android/server/InputWindow.java b/services/java/com/android/server/InputWindow.java
index dbc59ef..befc770 100644
--- a/services/java/com/android/server/InputWindow.java
+++ b/services/java/com/android/server/InputWindow.java
@@ -27,6 +27,9 @@
// The input channel associated with the window.
public InputChannel inputChannel;
+ // The window name.
+ public String name;
+
// Window layout params attributes. (WindowManager.LayoutParams)
public int layoutParamsFlags;
public int layoutParamsType;
@@ -55,6 +58,9 @@
// Window is visible.
public boolean visible;
+ // Window can receive keys.
+ public boolean canReceiveKeys;
+
// Window has focus.
public boolean hasFocus;
@@ -64,6 +70,9 @@
// Input event dispatching is paused.
public boolean paused;
+ // Window layer.
+ public int layer;
+
// Id of process and user that owns the window.
public int ownerPid;
public int ownerUid;
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 27d875e..9835098 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -5096,61 +5096,39 @@
}
}
- /* Notifies the window manager about an input channel that is not responding.
+ /* Notifies the window manager about an application that is not responding.
* Returns a new timeout to continue waiting in nanoseconds, or 0 to abort dispatch.
*
* Called by the InputManager.
*/
- public long notifyInputChannelANR(InputChannel inputChannel) {
- AppWindowToken token;
- synchronized (mWindowMap) {
- WindowState windowState = getWindowStateForInputChannelLocked(inputChannel);
- if (windowState == null) {
- return 0; // window is unknown, abort dispatching
+ public long notifyANR(Object token, InputChannel inputChannel) {
+ AppWindowToken appWindowToken = null;
+ if (inputChannel != null) {
+ synchronized (mWindowMap) {
+ WindowState windowState = getWindowStateForInputChannelLocked(inputChannel);
+ if (windowState != null) {
+ Slog.i(TAG, "Input event dispatching timed out sending to "
+ + windowState.mAttrs.getTitle());
+ appWindowToken = windowState.mAppToken;
+ }
}
-
- Slog.i(TAG, "Input event dispatching timed out sending to "
- + windowState.mAttrs.getTitle());
- token = windowState.mAppToken;
}
- return notifyANRInternal(token);
- }
-
- /* Notifies the window manager about an input channel spontaneously recovering from ANR
- * by successfully delivering the event that originally timed out.
- *
- * Called by the InputManager.
- */
- public void notifyInputChannelRecoveredFromANR(InputChannel inputChannel) {
- // Nothing to do just now.
- // Just wait for the user to dismiss the ANR dialog.
- }
-
- /* Notifies the window manager about an application that is not responding
- * in general rather than with respect to a particular input channel.
- * Returns a new timeout to continue waiting in nanoseconds, or 0 to abort dispatch.
- *
- * Called by the InputManager.
- */
- public long notifyANR(Object token) {
- AppWindowToken appWindowToken = (AppWindowToken) token;
+ if (appWindowToken == null && token != null) {
+ appWindowToken = (AppWindowToken) token;
+ Slog.i(TAG, "Input event dispatching timed out sending to application "
+ + appWindowToken.stringName);
+ }
- Slog.i(TAG, "Input event dispatching timed out sending to application "
- + appWindowToken.stringName);
- return notifyANRInternal(appWindowToken);
- }
-
- private long notifyANRInternal(AppWindowToken token) {
- if (token != null && token.appToken != null) {
+ if (appWindowToken != null && appWindowToken.appToken != null) {
try {
// Notify the activity manager about the timeout and let it decide whether
// to abort dispatching or keep waiting.
- boolean abort = token.appToken.keyDispatchingTimedOut();
+ boolean abort = appWindowToken.appToken.keyDispatchingTimedOut();
if (! abort) {
// The activity manager declined to abort dispatching.
// Wait a bit longer and timeout again later.
- return token.inputDispatchingTimeoutNanos;
+ return appWindowToken.inputDispatchingTimeoutNanos;
}
} catch (RemoteException ex) {
}
@@ -5203,13 +5181,16 @@
// Add a window to our list of input windows.
final InputWindow inputWindow = mTempInputWindows.add();
inputWindow.inputChannel = child.mInputChannel;
+ inputWindow.name = child.toString();
inputWindow.layoutParamsFlags = flags;
inputWindow.layoutParamsType = type;
inputWindow.dispatchingTimeoutNanos = child.getInputDispatchingTimeoutNanos();
inputWindow.visible = isVisible;
+ inputWindow.canReceiveKeys = child.canReceiveKeys();
inputWindow.hasFocus = hasFocus;
inputWindow.hasWallpaper = hasWallpaper;
inputWindow.paused = child.mAppToken != null ? child.mAppToken.paused : false;
+ inputWindow.layer = child.mLayer;
inputWindow.ownerPid = child.mSession.mPid;
inputWindow.ownerUid = child.mSession.mUid;
@@ -5302,23 +5283,6 @@
if (newWindow != mInputFocus) {
if (newWindow != null && newWindow.canReceiveKeys()) {
- // If the new input focus is an error window or appears above the current
- // input focus, preempt any pending synchronous dispatch so that we can
- // start delivering events to the new input focus as soon as possible.
- if ((newWindow.mAttrs.flags & FLAG_SYSTEM_ERROR) != 0) {
- if (DEBUG_INPUT) {
- Slog.v(TAG, "New SYSTEM_ERROR window; resetting state");
- }
- preemptInputDispatchLw();
- } else if (mInputFocus != null && newWindow.mLayer > mInputFocus.mLayer) {
- if (DEBUG_INPUT) {
- Slog.v(TAG, "Transferring focus to new window at higher layer: "
- + "old win layer=" + mInputFocus.mLayer
- + ", new win layer=" + newWindow.mLayer);
- }
- preemptInputDispatchLw();
- }
-
// Displaying a window implicitly causes dispatching to be unpaused.
// This is to protect against bugs if someone pauses dispatching but
// forgets to resume.
@@ -5330,14 +5294,6 @@
}
}
- /* Tells the dispatcher to stop waiting for its current synchronous event targets.
- * Essentially, just makes those dispatches asynchronous so a new dispatch cycle
- * can begin.
- */
- private void preemptInputDispatchLw() {
- mInputManager.preemptInputDispatch();
- }
-
public void setFocusedAppLw(AppWindowToken newApp) {
// Focused app has changed.
if (newApp == null) {
diff --git a/services/java/com/android/server/sip/SipHelper.java b/services/java/com/android/server/sip/SipHelper.java
index d9a1bbf..050eddc 100644
--- a/services/java/com/android/server/sip/SipHelper.java
+++ b/services/java/com/android/server/sip/SipHelper.java
@@ -68,6 +68,7 @@
*/
class SipHelper {
private static final String TAG = SipHelper.class.getSimpleName();
+ private static final boolean DEBUG = true;
private SipStack mSipStack;
private SipProvider mSipProvider;
@@ -264,6 +265,7 @@
ClientTransaction clientTransaction =
mSipProvider.getNewClientTransaction(request);
+ if (DEBUG) Log.d(TAG, "send INVITE: " + request);
clientTransaction.sendRequest();
return clientTransaction;
} catch (ParseException e) {
@@ -281,6 +283,7 @@
ClientTransaction clientTransaction =
mSipProvider.getNewClientTransaction(request);
+ if (DEBUG) Log.d(TAG, "send RE-INVITE: " + request);
dialog.sendRequest(clientTransaction);
return clientTransaction;
} catch (ParseException e) {
@@ -314,6 +317,7 @@
ToHeader toHeader = (ToHeader) response.getHeader(ToHeader.NAME);
toHeader.setTag(tag);
response.addHeader(toHeader);
+ if (DEBUG) Log.d(TAG, "send RINGING: " + response);
transaction.sendResponse(response);
return transaction;
} catch (ParseException e) {
@@ -340,7 +344,9 @@
if (inviteTransaction == null) {
inviteTransaction = getServerTransaction(event);
}
+
if (inviteTransaction.getState() != TransactionState.COMPLETED) {
+ if (DEBUG) Log.d(TAG, "send OK: " + response);
inviteTransaction.sendResponse(response);
}
@@ -358,6 +364,7 @@
Response.BUSY_HERE, request);
if (inviteTransaction.getState() != TransactionState.COMPLETED) {
+ if (DEBUG) Log.d(TAG, "send BUSY HERE: " + response);
inviteTransaction.sendResponse(response);
}
} catch (ParseException e) {
@@ -373,27 +380,31 @@
Response response = event.getResponse();
long cseq = ((CSeqHeader) response.getHeader(CSeqHeader.NAME))
.getSeqNumber();
- dialog.sendAck(dialog.createAck(cseq));
+ Request ack = dialog.createAck(cseq);
+ if (DEBUG) Log.d(TAG, "send ACK: " + ack);
+ dialog.sendAck(ack);
}
public void sendBye(Dialog dialog) throws SipException {
Request byeRequest = dialog.createRequest(Request.BYE);
- Log.d(TAG, "send BYE: " + byeRequest);
+ if (DEBUG) Log.d(TAG, "send BYE: " + byeRequest);
dialog.sendRequest(mSipProvider.getNewClientTransaction(byeRequest));
}
public void sendCancel(ClientTransaction inviteTransaction)
throws SipException {
Request cancelRequest = inviteTransaction.createCancel();
+ if (DEBUG) Log.d(TAG, "send CANCEL: " + cancelRequest);
mSipProvider.getNewClientTransaction(cancelRequest).sendRequest();
}
public void sendResponse(RequestEvent event, int responseCode)
throws SipException {
try {
- getServerTransaction(event).sendResponse(
- mMessageFactory.createResponse(
- responseCode, event.getRequest()));
+ Response response = mMessageFactory.createResponse(
+ responseCode, event.getRequest());
+ if (DEBUG) Log.d(TAG, "send response: " + response);
+ getServerTransaction(event).sendResponse(response);
} catch (ParseException e) {
throw new SipException("sendResponse()", e);
}
@@ -402,8 +413,10 @@
public void sendInviteRequestTerminated(Request inviteRequest,
ServerTransaction inviteTransaction) throws SipException {
try {
- inviteTransaction.sendResponse(mMessageFactory.createResponse(
- Response.REQUEST_TERMINATED, inviteRequest));
+ Response response = mMessageFactory.createResponse(
+ Response.REQUEST_TERMINATED, inviteRequest);
+ if (DEBUG) Log.d(TAG, "send response: " + response);
+ inviteTransaction.sendResponse(response);
} catch (ParseException e) {
throw new SipException("sendInviteRequestTerminated()", e);
}
diff --git a/services/java/com/android/server/sip/SipService.java b/services/java/com/android/server/sip/SipService.java
index c1841f6..d7747fb 100644
--- a/services/java/com/android/server/sip/SipService.java
+++ b/services/java/com/android/server/sip/SipService.java
@@ -59,6 +59,8 @@
*/
public final class SipService extends ISipService.Stub {
private static final String TAG = "SipService";
+ private static final boolean DEBUG = true;
+ private static final boolean DEBUG_TIMER = DEBUG && false;
private static final int EXPIRY_TIME = 3600;
private static final int SHORT_EXPIRY_TIME = 10;
private static final int MIN_EXPIRY_TIME = 60;
@@ -90,7 +92,7 @@
}
private SipService(Context context) {
- Log.v(TAG, " service started!");
+ if (DEBUG) Log.d(TAG, " service started!");
mContext = context;
mConnectivityReceiver = new ConnectivityReceiver();
context.registerReceiver(mConnectivityReceiver,
@@ -137,7 +139,7 @@
throw new RuntimeException(
"empty broadcast action for incoming call");
}
- Log.v(TAG, "open3: " + localProfile.getUriString() + ": "
+ if (DEBUG) Log.d(TAG, "open3: " + localProfile.getUriString() + ": "
+ incomingCallBroadcastAction + ": " + listener);
try {
SipSessionGroupExt group = createGroup(localProfile,
@@ -238,14 +240,14 @@
}
private void notifyProfileAdded(SipProfile localProfile) {
- Log.d(TAG, "notify: profile added: " + localProfile);
+ if (DEBUG) Log.d(TAG, "notify: profile added: " + localProfile);
Intent intent = new Intent(SipManager.SIP_ADD_PHONE_ACTION);
intent.putExtra(SipManager.LOCAL_URI_KEY, localProfile.getUriString());
mContext.sendBroadcast(intent);
}
private void notifyProfileRemoved(SipProfile localProfile) {
- Log.d(TAG, "notify: profile removed: " + localProfile);
+ if (DEBUG) Log.d(TAG, "notify: profile removed: " + localProfile);
Intent intent = new Intent(SipManager.SIP_REMOVE_PHONE_ACTION);
intent.putExtra(SipManager.LOCAL_URI_KEY, localProfile.getUriString());
mContext.sendBroadcast(intent);
@@ -260,7 +262,7 @@
private void grabWifiLock() {
if (mWifiLock == null) {
- Log.v(TAG, "acquire wifi lock");
+ if (DEBUG) Log.d(TAG, "acquire wifi lock");
mWifiLock = ((WifiManager)
mContext.getSystemService(Context.WIFI_SERVICE))
.createWifiLock(WifiManager.WIFI_MODE_FULL, TAG);
@@ -270,7 +272,7 @@
private void releaseWifiLock() {
if (mWifiLock != null) {
- Log.v(TAG, "release wifi lock");
+ if (DEBUG) Log.d(TAG, "release wifi lock");
mWifiLock.release();
mWifiLock = null;
}
@@ -283,7 +285,7 @@
private synchronized void onConnectivityChanged(
String type, boolean connected) {
- Log.v(TAG, "onConnectivityChanged(): "
+ if (DEBUG) Log.d(TAG, "onConnectivityChanged(): "
+ mNetworkType + (mConnected? " CONNECTED" : " DISCONNECTED")
+ " --> " + type + (connected? " CONNECTED" : " DISCONNECTED"));
@@ -398,7 +400,7 @@
mSipGroup.openToReceiveCalls(this);
mAutoRegistration.start(mSipGroup);
}
- Log.v(TAG, " openToReceiveCalls: " + getUri() + ": "
+ if (DEBUG) Log.d(TAG, " openToReceiveCalls: " + getUri() + ": "
+ mIncomingCallBroadcastAction);
}
@@ -410,8 +412,8 @@
if (mOpened) openToReceiveCalls();
} else {
// close mSipGroup but remember mOpened
- Log.v(TAG, " close auto reg temporarily: " + getUri() + ": "
- + mIncomingCallBroadcastAction);
+ if (DEBUG) Log.d(TAG, " close auto reg temporarily: "
+ + getUri() + ": " + mIncomingCallBroadcastAction);
mSipGroup.close();
mAutoRegistration.stop();
}
@@ -437,7 +439,7 @@
mOpened = false;
mSipGroup.closeToNotReceiveCalls();
mAutoRegistration.stop();
- Log.v(TAG, " close: " + getUri() + ": "
+ if (DEBUG) Log.d(TAG, " close: " + getUri() + ": "
+ mIncomingCallBroadcastAction);
}
@@ -456,13 +458,13 @@
}
// send out incoming call broadcast
- Log.d(TAG, " ringing~~ " + getUri() + ": " + caller.getUri()
- + ": " + session.getCallId());
addPendingSession(session);
Intent intent = SipManager.createIncomingCallBroadcast(
mIncomingCallBroadcastAction, session.getCallId(),
sessionDescription);
- Log.d(TAG, " send out intent: " + intent);
+ if (DEBUG) Log.d(TAG, " ringing~~ " + getUri() + ": "
+ + caller.getUri() + ": " + session.getCallId()
+ + " " + mIncomingCallBroadcastAction);
mContext.sendBroadcast(intent);
} catch (RemoteException e) {
// should never happen with a local call
@@ -474,7 +476,8 @@
@Override
public void onError(ISipSession session, String errorClass,
String message) {
- Log.v(TAG, "sip session error: " + errorClass + ": " + message);
+ if (DEBUG) Log.d(TAG, "sip session error: " + errorClass + ": "
+ + message);
}
public boolean isOpened() {
@@ -506,7 +509,7 @@
public void run() {
synchronized (SipService.this) {
SipSessionGroup.SipSessionImpl session = mSession.duplicate();
- Log.d(TAG, " ~~~ keepalive");
+ if (DEBUG) Log.d(TAG, "~~~ keepalive");
mTimer.cancel(this);
session.sendKeepAlive();
if (session.isReRegisterRequired()) {
@@ -549,7 +552,7 @@
// TODO: when rfc5626 is deployed, use reg-id and sip.instance
// in registration to avoid adding duplicate entries to server
mSession.unregister();
- Log.v(TAG, "start AutoRegistrationProcess for "
+ if (DEBUG) Log.d(TAG, "start AutoRegistrationProcess for "
+ mSession.getLocalProfile().getUriString());
}
}
@@ -581,7 +584,6 @@
}
public void setListener(ISipSessionListener listener) {
- Log.v(TAG, "setListener(): " + listener);
synchronized (SipService.this) {
mProxy.setListener(listener);
if (mSession == null) return;
@@ -619,7 +621,7 @@
public void run() {
mErrorCode = null;
mErrorMessage = null;
- Log.v(TAG, " ~~~ registering");
+ if (DEBUG) Log.d(TAG, "~~~ registering");
synchronized (SipService.this) {
if (mConnected && !isStopped()) mSession.register(EXPIRY_TIME);
}
@@ -642,7 +644,7 @@
}
private void restart(int duration) {
- Log.v(TAG, "Refresh registration " + duration + "s later.");
+ if (DEBUG) Log.d(TAG, "Refresh registration " + duration + "s later.");
mTimer.cancel(this);
mTimer.set(duration * 1000, this);
}
@@ -659,7 +661,7 @@
@Override
public void onRegistering(ISipSession session) {
- Log.v(TAG, "onRegistering(): " + session + ": " + mSession);
+ if (DEBUG) Log.d(TAG, "onRegistering(): " + session);
synchronized (SipService.this) {
if (!isStopped() && (session != mSession)) return;
mRegistered = false;
@@ -669,7 +671,7 @@
@Override
public void onRegistrationDone(ISipSession session, int duration) {
- Log.v(TAG, "onRegistrationDone(): " + session + ": " + mSession);
+ if (DEBUG) Log.d(TAG, "onRegistrationDone(): " + session);
synchronized (SipService.this) {
if (!isStopped() && (session != mSession)) return;
@@ -703,7 +705,7 @@
} else {
mRegistered = false;
mExpiryTime = -1L;
- Log.v(TAG, "Refresh registration immediately");
+ if (DEBUG) Log.d(TAG, "Refresh registration immediately");
run();
}
}
@@ -714,8 +716,8 @@
String errorCodeString, String message) {
SipErrorCode errorCode =
Enum.valueOf(SipErrorCode.class, errorCodeString);
- Log.v(TAG, "onRegistrationFailed(): " + session + ": " + mSession
- + ": " + errorCode + ": " + message);
+ if (DEBUG) Log.d(TAG, "onRegistrationFailed(): " + session + ": "
+ + errorCode + ": " + message);
synchronized (SipService.this) {
if (!isStopped() && (session != mSession)) return;
mErrorCode = errorCode;
@@ -724,7 +726,7 @@
message);
if (errorCode == SipErrorCode.INVALID_CREDENTIALS) {
- Log.d(TAG, " pause auto-registration");
+ if (DEBUG) Log.d(TAG, " pause auto-registration");
stopButKeepStates();
} else if (!isStopped()) {
onError();
@@ -734,7 +736,7 @@
@Override
public void onRegistrationTimeout(ISipSession session) {
- Log.v(TAG, "onRegistrationTimeout(): " + session + ": " + mSession);
+ if (DEBUG) Log.d(TAG, "onRegistrationTimeout(): " + session);
synchronized (SipService.this) {
if (!isStopped() && (session != mSession)) return;
mErrorCode = SipErrorCode.TIME_OUT;
@@ -773,30 +775,33 @@
NetworkInfo.State state = netInfo.getState();
NetworkInfo activeNetInfo = getActiveNetworkInfo();
- if (activeNetInfo != null) {
- Log.v(TAG, "active network: " + activeNetInfo.getTypeName()
- + ((activeNetInfo.getState() == NetworkInfo.State.CONNECTED)
- ? " CONNECTED" : " DISCONNECTED"));
- } else {
- Log.v(TAG, "active network: null");
+ if (DEBUG) {
+ if (activeNetInfo != null) {
+ Log.d(TAG, "active network: "
+ + activeNetInfo.getTypeName()
+ + ((activeNetInfo.getState() == NetworkInfo.State.CONNECTED)
+ ? " CONNECTED" : " DISCONNECTED"));
+ } else {
+ Log.d(TAG, "active network: null");
+ }
}
if ((state == NetworkInfo.State.CONNECTED)
&& (activeNetInfo != null)
&& (activeNetInfo.getType() != netInfo.getType())) {
- Log.d(TAG, "ignore connect event: " + type
+ if (DEBUG) Log.d(TAG, "ignore connect event: " + type
+ ", active: " + activeNetInfo.getTypeName());
return;
}
if (state == NetworkInfo.State.CONNECTED) {
- Log.v(TAG, "Connectivity alert: CONNECTED " + type);
+ if (DEBUG) Log.d(TAG, "Connectivity alert: CONNECTED " + type);
onChanged(type, true);
} else if (state == NetworkInfo.State.DISCONNECTED) {
- Log.v(TAG, "Connectivity alert: DISCONNECTED " + type);
+ if (DEBUG) Log.d(TAG, "Connectivity alert: DISCONNECTED " + type);
onChanged(type, false);
} else {
- Log.d(TAG, "Connectivity alert not processed: " + state
- + " " + type);
+ if (DEBUG) Log.d(TAG, "Connectivity alert not processed: "
+ + state + " " + type);
}
}
}
@@ -847,7 +852,7 @@
return;
}
mTask = null;
- Log.v(TAG, " deliver change for " + mNetworkType
+ if (DEBUG) Log.d(TAG, " deliver change for " + mNetworkType
+ (mConnected ? " CONNECTED" : "DISCONNECTED"));
onConnectivityChanged(mNetworkType, mConnected);
}
@@ -929,8 +934,10 @@
newQueue.addAll((Collection<MyEvent>) mEventQueue);
mEventQueue.clear();
mEventQueue = newQueue;
- Log.v(TAG, "queue re-calculated");
- printQueue();
+ if (DEBUG_TIMER) {
+ Log.d(TAG, "queue re-calculated");
+ printQueue();
+ }
}
// Determines the period and the trigger time of the new event and insert it
@@ -984,10 +991,12 @@
}
long triggerTime = event.mTriggerTime;
- Log.v(TAG, " add event " + event + " scheduled at "
- + showTime(triggerTime) + " at " + showTime(now)
- + ", #events=" + mEventQueue.size());
- printQueue();
+ if (DEBUG_TIMER) {
+ Log.d(TAG, " add event " + event + " scheduled at "
+ + showTime(triggerTime) + " at " + showTime(now)
+ + ", #events=" + mEventQueue.size());
+ printQueue();
+ }
}
/**
@@ -997,7 +1006,7 @@
*/
public synchronized void cancel(Runnable callback) {
if (stopped() || mEventQueue.isEmpty()) return;
- Log.d(TAG, "cancel:" + callback);
+ if (DEBUG_TIMER) Log.d(TAG, "cancel:" + callback);
MyEvent firstEvent = mEventQueue.first();
for (Iterator<MyEvent> iter = mEventQueue.iterator();
@@ -1005,7 +1014,7 @@
MyEvent event = iter.next();
if (event.mCallback == callback) {
iter.remove();
- Log.d(TAG, " cancel found:" + event);
+ if (DEBUG_TIMER) Log.d(TAG, " cancel found:" + event);
}
}
if (mEventQueue.isEmpty()) {
@@ -1019,8 +1028,10 @@
recalculatePeriods();
scheduleNext();
}
- Log.d(TAG, "after cancel:");
- printQueue();
+ if (DEBUG_TIMER) {
+ Log.d(TAG, "after cancel:");
+ printQueue();
+ }
}
private void scheduleNext() {
@@ -1069,13 +1080,13 @@
}
private void execute(long triggerTime) {
- Log.d(TAG, "time's up, triggerTime = " + showTime(triggerTime) + ": "
- + mEventQueue.size());
+ if (DEBUG_TIMER) Log.d(TAG, "time's up, triggerTime = "
+ + showTime(triggerTime) + ": " + mEventQueue.size());
if (stopped() || mEventQueue.isEmpty()) return;
for (MyEvent event : mEventQueue) {
if (event.mTriggerTime != triggerTime) break;
- Log.d(TAG, "execute " + event);
+ if (DEBUG_TIMER) Log.d(TAG, "execute " + event);
event.mLastTriggerTime = event.mTriggerTime;
event.mTriggerTime += event.mPeriod;
@@ -1083,8 +1094,10 @@
// run the callback in a new thread to prevent deadlock
new Thread(event.mCallback).start();
}
- Log.d(TAG, "after timeout execution");
- printQueue();
+ if (DEBUG_TIMER) {
+ Log.d(TAG, "after timeout execution");
+ printQueue();
+ }
scheduleNext();
}
diff --git a/services/java/com/android/server/sip/SipSessionGroup.java b/services/java/com/android/server/sip/SipSessionGroup.java
index a3bf3eb..0822350 100644
--- a/services/java/com/android/server/sip/SipSessionGroup.java
+++ b/services/java/com/android/server/sip/SipSessionGroup.java
@@ -80,6 +80,8 @@
*/
class SipSessionGroup implements SipListener {
private static final String TAG = "SipSession";
+ private static final boolean DEBUG = true;
+ private static final boolean DEBUG_PING = DEBUG && false;
private static final String ANONYMOUS = "anonymous";
private static final String SERVER_ERROR_PREFIX = "Response: ";
private static final int EXPIRY_TIME = 3600;
@@ -218,22 +220,26 @@
private synchronized SipSessionImpl getSipSession(EventObject event) {
String key = SipHelper.getCallId(event);
- Log.d(TAG, "sesssion key from event: " + key);
- Log.d(TAG, "active sessions:");
- for (String k : mSessionMap.keySet()) {
- Log.d(TAG, " ..." + k + ": " + mSessionMap.get(k));
- }
SipSessionImpl session = mSessionMap.get(key);
+ if ((session != null) && isLoggable(session)) {
+ Log.d(TAG, "session key from event: " + key);
+ Log.d(TAG, "active sessions:");
+ for (String k : mSessionMap.keySet()) {
+ Log.d(TAG, " ..." + k + ": " + mSessionMap.get(k));
+ }
+ }
return ((session != null) ? session : mCallReceiverSession);
}
private synchronized void addSipSession(SipSessionImpl newSession) {
removeSipSession(newSession);
String key = newSession.getCallId();
- Log.d(TAG, "+++ add a session with key: '" + key + "'");
mSessionMap.put(key, newSession);
- for (String k : mSessionMap.keySet()) {
- Log.d(TAG, " ..... " + k + ": " + mSessionMap.get(k));
+ if (isLoggable(newSession)) {
+ Log.d(TAG, "+++ add a session with key: '" + key + "'");
+ for (String k : mSessionMap.keySet()) {
+ Log.d(TAG, " " + k + ": " + mSessionMap.get(k));
+ }
}
}
@@ -254,10 +260,12 @@
}
}
}
- Log.d(TAG, " remove session " + session + " with key '" + key + "'");
- for (String k : mSessionMap.keySet()) {
- Log.d(TAG, " ..... " + k + ": " + mSessionMap.get(k));
+ if ((s != null) && isLoggable(s)) {
+ Log.d(TAG, "remove session " + session + " @key '" + key + "'");
+ for (String k : mSessionMap.keySet()) {
+ Log.d(TAG, " " + k + ": " + mSessionMap.get(k));
+ }
}
}
@@ -288,10 +296,10 @@
private synchronized void process(EventObject event) {
SipSessionImpl session = getSipSession(event);
try {
- if ((session != null) && session.process(event)) {
- Log.d(TAG, " ~~~~~ new state: " + session.mState);
- } else {
- Log.d(TAG, "event not processed: " + event);
+ boolean isLoggable = isLoggable(session, event);
+ boolean processed = (session != null) && session.process(event);
+ if (isLoggable && processed) {
+ Log.d(TAG, "new state after: " + session.mState);
}
} catch (Throwable e) {
Log.w(TAG, "event process error: " + event, e);
@@ -321,8 +329,8 @@
}
public boolean process(EventObject evt) throws SipException {
- Log.d(TAG, " ~~~~~ " + this + ": " + mState + ": processing "
- + log(evt));
+ if (isLoggable(this, evt)) Log.d(TAG, " ~~~~~ " + this + ": "
+ + mState + ": processing " + log(evt));
if (isRequestEvent(Request.INVITE, evt)) {
RequestEvent event = (RequestEvent) evt;
SipSessionImpl newSession = new SipSessionImpl(mProxy);
@@ -503,8 +511,8 @@
}
public boolean process(EventObject evt) throws SipException {
- Log.d(TAG, " ~~~~~ " + this + ": " + mState + ": processing "
- + log(evt));
+ if (isLoggable(this, evt)) Log.d(TAG, " ~~~~~ " + this + ": "
+ + mState + ": processing " + log(evt));
synchronized (SipSessionGroup.this) {
if (isClosed()) return false;
@@ -672,14 +680,14 @@
if (mRPort == 0) mRPort = rPort;
if (mRPort != rPort) {
mReRegisterFlag = true;
- Log.w(TAG, String.format("rport is changed: %d <> %d",
- mRPort, rPort));
+ if (DEBUG) Log.w(TAG, String.format(
+ "rport is changed: %d <> %d", mRPort, rPort));
mRPort = rPort;
} else {
- Log.w(TAG, "rport is the same: " + rPort);
+ if (DEBUG_PING) Log.w(TAG, "rport is the same: " + rPort);
}
} else {
- Log.w(TAG, "peer did not respect our rport request");
+ if (DEBUG) Log.w(TAG, "peer did not respond rport");
}
reset();
return true;
@@ -872,6 +880,7 @@
mPeerSessionDescription = extractContent(response);
establishCall();
return true;
+ case Response.UNAUTHORIZED:
case Response.PROXY_AUTHENTICATION_REQUIRED:
if (handleAuthentication(event)) {
addSipSession(this);
@@ -1187,6 +1196,34 @@
}
}
+ private static boolean isLoggable(SipSessionImpl s) {
+ if (s != null) {
+ switch (s.mState) {
+ case PINGING:
+ return DEBUG_PING;
+ }
+ }
+ return DEBUG;
+ }
+
+ private static boolean isLoggable(SipSessionImpl s, EventObject evt) {
+ if (!isLoggable(s)) return false;
+ if (evt == null) return false;
+
+ if (evt instanceof OptionsCommand) {
+ return DEBUG_PING;
+ } else if (evt instanceof ResponseEvent) {
+ Response response = ((ResponseEvent) evt).getResponse();
+ if (Request.OPTIONS.equals(response.getHeader(CSeqHeader.NAME))) {
+ return DEBUG_PING;
+ }
+ return DEBUG;
+ } else if (evt instanceof RequestEvent) {
+ return DEBUG;
+ }
+ return false;
+ }
+
private static String log(EventObject evt) {
if (evt instanceof RequestEvent) {
return ((RequestEvent) evt).getRequest().toString();
diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp
index 6dd619c5..d27c2c6 100644
--- a/services/jni/com_android_server_InputManager.cpp
+++ b/services/jni/com_android_server_InputManager.cpp
@@ -49,8 +49,6 @@
jmethodID notifyConfigurationChanged;
jmethodID notifyLidSwitchChanged;
jmethodID notifyInputChannelBroken;
- jmethodID notifyInputChannelANR;
- jmethodID notifyInputChannelRecoveredFromANR;
jmethodID notifyANR;
jmethodID virtualKeyDownFeedback;
jmethodID interceptKeyBeforeQueueing;
@@ -85,6 +83,7 @@
jclass clazz;
jfieldID inputChannel;
+ jfieldID name;
jfieldID layoutParamsFlags;
jfieldID layoutParamsType;
jfieldID dispatchingTimeoutNanos;
@@ -101,9 +100,11 @@
jfieldID touchableAreaRight;
jfieldID touchableAreaBottom;
jfieldID visible;
+ jfieldID canReceiveKeys;
jfieldID hasFocus;
jfieldID hasWallpaper;
jfieldID paused;
+ jfieldID layer;
jfieldID ownerPid;
jfieldID ownerUid;
} gInputWindowClassInfo;
@@ -168,7 +169,6 @@
void setInputWindows(JNIEnv* env, jobjectArray windowObjArray);
void setFocusedApplication(JNIEnv* env, jobject applicationObj);
void setInputDispatchMode(bool enabled, bool frozen);
- void preemptInputDispatch();
/* --- InputReaderPolicyInterface implementation --- */
@@ -191,10 +191,9 @@
/* --- InputDispatcherPolicyInterface implementation --- */
virtual void notifyConfigurationChanged(nsecs_t when);
- virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle);
+ virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle,
+ const sp<InputChannel>& inputChannel);
virtual void notifyInputChannelBroken(const sp<InputChannel>& inputChannel);
- virtual nsecs_t notifyInputChannelANR(const sp<InputChannel>& inputChannel);
- virtual void notifyInputChannelRecoveredFromANR(const sp<InputChannel>& inputChannel);
virtual nsecs_t getKeyRepeatTimeout();
virtual nsecs_t getKeyRepeatDelay();
virtual int32_t getMaxEventsPerSecond();
@@ -409,10 +408,15 @@
jobject NativeInputManager::getInputChannelObjLocal(JNIEnv* env,
const sp<InputChannel>& inputChannel) {
+ InputChannel* inputChannelPtr = inputChannel.get();
+ if (! inputChannelPtr) {
+ return NULL;
+ }
+
{
AutoMutex _l(mInputChannelRegistryLock);
- ssize_t index = mInputChannelObjWeakTable.indexOfKey(inputChannel.get());
+ ssize_t index = mInputChannelObjWeakTable.indexOfKey(inputChannelPtr);
if (index < 0) {
return NULL;
}
@@ -702,32 +706,34 @@
checkAndClearExceptionFromCallback(env, "notifyConfigurationChanged");
}
-nsecs_t NativeInputManager::notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle) {
+nsecs_t NativeInputManager::notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle,
+ const sp<InputChannel>& inputChannel) {
#if DEBUG_INPUT_DISPATCHER_POLICY
LOGD("notifyANR");
#endif
JNIEnv* env = jniEnv();
- ApplicationToken* token = static_cast<ApplicationToken*>(inputApplicationHandle.get());
- jweak tokenObjWeak = token->getTokenObj();
-
- jlong newTimeout;
- jobject tokenObjLocal = env->NewLocalRef(tokenObjWeak);
- if (tokenObjLocal) {
- newTimeout = env->CallLongMethod(mCallbacksObj,
- gCallbacksClassInfo.notifyANR, tokenObjLocal);
- if (checkAndClearExceptionFromCallback(env, "notifyANR")) {
- newTimeout = 0; // abort dispatch
- } else {
- assert(newTimeout >= 0);
- }
-
- env->DeleteLocalRef(tokenObjLocal);
+ jobject tokenObjLocal;
+ if (inputApplicationHandle.get()) {
+ ApplicationToken* token = static_cast<ApplicationToken*>(inputApplicationHandle.get());
+ jweak tokenObjWeak = token->getTokenObj();
+ tokenObjLocal = env->NewLocalRef(tokenObjWeak);
} else {
- newTimeout = 0; // abort dispatch
+ tokenObjLocal = NULL;
}
+ jobject inputChannelObjLocal = getInputChannelObjLocal(env, inputChannel);
+ jlong newTimeout = env->CallLongMethod(mCallbacksObj,
+ gCallbacksClassInfo.notifyANR, tokenObjLocal, inputChannelObjLocal);
+ if (checkAndClearExceptionFromCallback(env, "notifyANR")) {
+ newTimeout = 0; // abort dispatch
+ } else {
+ assert(newTimeout >= 0);
+ }
+
+ env->DeleteLocalRef(tokenObjLocal);
+ env->DeleteLocalRef(inputChannelObjLocal);
return newTimeout;
}
@@ -748,51 +754,6 @@
}
}
-nsecs_t NativeInputManager::notifyInputChannelANR(const sp<InputChannel>& inputChannel) {
-#if DEBUG_INPUT_DISPATCHER_POLICY
- LOGD("notifyInputChannelANR - inputChannel='%s'",
- inputChannel->getName().string());
-#endif
-
- JNIEnv* env = jniEnv();
-
- jlong newTimeout;
- jobject inputChannelObjLocal = getInputChannelObjLocal(env, inputChannel);
- if (inputChannelObjLocal) {
- newTimeout = env->CallLongMethod(mCallbacksObj,
- gCallbacksClassInfo.notifyInputChannelANR, inputChannelObjLocal);
- if (checkAndClearExceptionFromCallback(env, "notifyInputChannelANR")) {
- newTimeout = 0; // abort dispatch
- } else {
- assert(newTimeout >= 0);
- }
-
- env->DeleteLocalRef(inputChannelObjLocal);
- } else {
- newTimeout = 0; // abort dispatch
- }
-
- return newTimeout;
-}
-
-void NativeInputManager::notifyInputChannelRecoveredFromANR(const sp<InputChannel>& inputChannel) {
-#if DEBUG_INPUT_DISPATCHER_POLICY
- LOGD("notifyInputChannelRecoveredFromANR - inputChannel='%s'",
- inputChannel->getName().string());
-#endif
-
- JNIEnv* env = jniEnv();
-
- jobject inputChannelObjLocal = getInputChannelObjLocal(env, inputChannel);
- if (inputChannelObjLocal) {
- env->CallVoidMethod(mCallbacksObj, gCallbacksClassInfo.notifyInputChannelRecoveredFromANR,
- inputChannelObjLocal);
- checkAndClearExceptionFromCallback(env, "notifyInputChannelRecoveredFromANR");
-
- env->DeleteLocalRef(inputChannelObjLocal);
- }
-}
-
nsecs_t NativeInputManager::getKeyRepeatTimeout() {
if (! isScreenOn()) {
// Disable key repeat when the screen is off.
@@ -855,6 +816,8 @@
sp<InputChannel> inputChannel =
android_view_InputChannel_getInputChannel(env, inputChannelObj);
if (inputChannel != NULL) {
+ jstring name = jstring(env->GetObjectField(windowObj,
+ gInputWindowClassInfo.name));
jint layoutParamsFlags = env->GetIntField(windowObj,
gInputWindowClassInfo.layoutParamsFlags);
jint layoutParamsType = env->GetIntField(windowObj,
@@ -887,18 +850,25 @@
gInputWindowClassInfo.touchableAreaBottom);
jboolean visible = env->GetBooleanField(windowObj,
gInputWindowClassInfo.visible);
+ jboolean canReceiveKeys = env->GetBooleanField(windowObj,
+ gInputWindowClassInfo.canReceiveKeys);
jboolean hasFocus = env->GetBooleanField(windowObj,
gInputWindowClassInfo.hasFocus);
jboolean hasWallpaper = env->GetBooleanField(windowObj,
gInputWindowClassInfo.hasWallpaper);
jboolean paused = env->GetBooleanField(windowObj,
gInputWindowClassInfo.paused);
+ jint layer = env->GetIntField(windowObj,
+ gInputWindowClassInfo.layer);
jint ownerPid = env->GetIntField(windowObj,
gInputWindowClassInfo.ownerPid);
jint ownerUid = env->GetIntField(windowObj,
gInputWindowClassInfo.ownerUid);
+ const char* nameStr = env->GetStringUTFChars(name, NULL);
+
outWindow.inputChannel = inputChannel;
+ outWindow.name.setTo(nameStr);
outWindow.layoutParamsFlags = layoutParamsFlags;
outWindow.layoutParamsType = layoutParamsType;
outWindow.dispatchingTimeout = dispatchingTimeoutNanos;
@@ -915,11 +885,15 @@
outWindow.touchableAreaRight = touchableAreaRight;
outWindow.touchableAreaBottom = touchableAreaBottom;
outWindow.visible = visible;
+ outWindow.canReceiveKeys = canReceiveKeys;
outWindow.hasFocus = hasFocus;
outWindow.hasWallpaper = hasWallpaper;
outWindow.paused = paused;
+ outWindow.layer = layer;
outWindow.ownerPid = ownerPid;
outWindow.ownerUid = ownerUid;
+
+ env->ReleaseStringUTFChars(name, nameStr);
valid = true;
} else {
LOGW("Dropping input target because its input channel is not initialized.");
@@ -973,10 +947,6 @@
mInputManager->getDispatcher()->setInputDispatchMode(enabled, frozen);
}
-void NativeInputManager::preemptInputDispatch() {
- mInputManager->getDispatcher()->preemptInputDispatch();
-}
-
bool NativeInputManager::interceptKeyBeforeDispatching(const sp<InputChannel>& inputChannel,
const KeyEvent* keyEvent, uint32_t policyFlags) {
bool isScreenOn = this->isScreenOn();
@@ -986,23 +956,17 @@
JNIEnv* env = jniEnv();
+ // Note: inputChannel may be null.
jobject inputChannelObj = getInputChannelObjLocal(env, inputChannel);
- if (inputChannelObj) {
- jboolean consumed = env->CallBooleanMethod(mCallbacksObj,
- gCallbacksClassInfo.interceptKeyBeforeDispatching,
- inputChannelObj, keyEvent->getAction(), keyEvent->getFlags(),
- keyEvent->getKeyCode(), keyEvent->getMetaState(),
- keyEvent->getRepeatCount(), policyFlags);
- bool error = checkAndClearExceptionFromCallback(env, "interceptKeyBeforeDispatching");
+ jboolean consumed = env->CallBooleanMethod(mCallbacksObj,
+ gCallbacksClassInfo.interceptKeyBeforeDispatching,
+ inputChannelObj, keyEvent->getAction(), keyEvent->getFlags(),
+ keyEvent->getKeyCode(), keyEvent->getMetaState(),
+ keyEvent->getRepeatCount(), policyFlags);
+ bool error = checkAndClearExceptionFromCallback(env, "interceptKeyBeforeDispatching");
- env->DeleteLocalRef(inputChannelObj);
-
- return consumed && ! error;
- } else {
- LOGW("Could not apply key dispatch policy because input channel '%s' is "
- "no longer valid.", inputChannel->getName().string());
- return false;
- }
+ env->DeleteLocalRef(inputChannelObj);
+ return consumed && ! error;
}
void NativeInputManager::pokeUserActivity(nsecs_t eventTime, int32_t windowType, int32_t eventType) {
@@ -1246,15 +1210,6 @@
gNativeInputManager->setInputDispatchMode(enabled, frozen);
}
-static void android_server_InputManager_nativePreemptInputDispatch(JNIEnv* env,
- jclass clazz) {
- if (checkInputManagerUnitialized(env)) {
- return;
- }
-
- gNativeInputManager->preemptInputDispatch();
-}
-
static jobject android_server_InputManager_nativeGetInputDevice(JNIEnv* env,
jclass clazz, jint deviceId) {
if (checkInputManagerUnitialized(env)) {
@@ -1357,8 +1312,6 @@
(void*) android_server_InputManager_nativeSetFocusedApplication },
{ "nativeSetInputDispatchMode", "(ZZ)V",
(void*) android_server_InputManager_nativeSetInputDispatchMode },
- { "nativePreemptInputDispatch", "()V",
- (void*) android_server_InputManager_nativePreemptInputDispatch },
{ "nativeGetInputDevice", "(I)Landroid/view/InputDevice;",
(void*) android_server_InputManager_nativeGetInputDevice },
{ "nativeGetInputDeviceIds", "()[I",
@@ -1398,14 +1351,8 @@
GET_METHOD_ID(gCallbacksClassInfo.notifyInputChannelBroken, gCallbacksClassInfo.clazz,
"notifyInputChannelBroken", "(Landroid/view/InputChannel;)V");
- GET_METHOD_ID(gCallbacksClassInfo.notifyInputChannelANR, gCallbacksClassInfo.clazz,
- "notifyInputChannelANR", "(Landroid/view/InputChannel;)J");
-
- GET_METHOD_ID(gCallbacksClassInfo.notifyInputChannelRecoveredFromANR, gCallbacksClassInfo.clazz,
- "notifyInputChannelRecoveredFromANR", "(Landroid/view/InputChannel;)V");
-
GET_METHOD_ID(gCallbacksClassInfo.notifyANR, gCallbacksClassInfo.clazz,
- "notifyANR", "(Ljava/lang/Object;)J");
+ "notifyANR", "(Ljava/lang/Object;Landroid/view/InputChannel;)J");
GET_METHOD_ID(gCallbacksClassInfo.virtualKeyDownFeedback, gCallbacksClassInfo.clazz,
"virtualKeyDownFeedback", "()V");
@@ -1477,6 +1424,9 @@
GET_FIELD_ID(gInputWindowClassInfo.inputChannel, gInputWindowClassInfo.clazz,
"inputChannel", "Landroid/view/InputChannel;");
+ GET_FIELD_ID(gInputWindowClassInfo.name, gInputWindowClassInfo.clazz,
+ "name", "Ljava/lang/String;");
+
GET_FIELD_ID(gInputWindowClassInfo.layoutParamsFlags, gInputWindowClassInfo.clazz,
"layoutParamsFlags", "I");
@@ -1525,6 +1475,9 @@
GET_FIELD_ID(gInputWindowClassInfo.visible, gInputWindowClassInfo.clazz,
"visible", "Z");
+ GET_FIELD_ID(gInputWindowClassInfo.canReceiveKeys, gInputWindowClassInfo.clazz,
+ "canReceiveKeys", "Z");
+
GET_FIELD_ID(gInputWindowClassInfo.hasFocus, gInputWindowClassInfo.clazz,
"hasFocus", "Z");
@@ -1534,6 +1487,9 @@
GET_FIELD_ID(gInputWindowClassInfo.paused, gInputWindowClassInfo.clazz,
"paused", "Z");
+ GET_FIELD_ID(gInputWindowClassInfo.layer, gInputWindowClassInfo.clazz,
+ "layer", "I");
+
GET_FIELD_ID(gInputWindowClassInfo.ownerPid, gInputWindowClassInfo.clazz,
"ownerPid", "I");
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java
index 8bd789c..83496dc 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -197,10 +197,12 @@
Phone.State s = Phone.State.IDLE;
for (Phone phone : mPhones) {
- if (phone.getState() == Phone.State.RINGING) {
- return Phone.State.RINGING;
+ if (phone.getState() == Phone.State.ANSWERING) {
+ return Phone.State.ANSWERING;
+ } else if (phone.getState() == Phone.State.RINGING) {
+ s = Phone.State.RINGING;
} else if (phone.getState() == Phone.State.OFFHOOK) {
- s = Phone.State.OFFHOOK;
+ if (s == Phone.State.IDLE) s = Phone.State.OFFHOOK;
}
}
return s;
@@ -290,6 +292,18 @@
}
/**
+ * @return the first answering call
+ */
+ public Call getFirstAnsweringCall() {
+ for (Phone phone : mPhones) {
+ if (phone.getState() == Phone.State.ANSWERING) {
+ return phone.getForegroundCall();
+ }
+ }
+ return null;
+ }
+
+ /**
* unregister phone from CallManager
* @param phone
*/
diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java
index 9afade3..7464cc7 100644
--- a/telephony/java/com/android/internal/telephony/Phone.java
+++ b/telephony/java/com/android/internal/telephony/Phone.java
@@ -55,10 +55,12 @@
* <li>OFFHOOK = The phone is off hook. At least one call
* exists that is dialing, active or holding and no calls are
* ringing or waiting.</li>
+ * <li>ANSWERING = The incoming call is picked up but the
+ * call is not established yet.</li>
* </ul>
*/
enum State {
- IDLE, RINGING, OFFHOOK;
+ IDLE, RINGING, OFFHOOK, ANSWERING;
};
/**
diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhone.java b/telephony/java/com/android/internal/telephony/sip/SipPhone.java
index b009786..07dd35d 100755
--- a/telephony/java/com/android/internal/telephony/sip/SipPhone.java
+++ b/telephony/java/com/android/internal/telephony/sip/SipPhone.java
@@ -158,6 +158,7 @@
} else {
throw new CallStateException("phone not ringing");
}
+ updatePhoneState();
}
}
@@ -754,7 +755,7 @@
Log.v(LOG_TAG, "hangup conn: " + mPeer.getUriString() + ": "
+ ": on phone " + getPhone().getPhoneName());
try {
- mSipAudioCall.endCall();
+ if (mSipAudioCall != null) mSipAudioCall.endCall();
setState(Call.State.DISCONNECTING);
setDisconnectCause(DisconnectCause.LOCAL);
} catch (SipException e) {
diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java b/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
index 9098e6f..2efbd17 100755
--- a/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
@@ -538,6 +538,8 @@
if (getRingingCall().isRinging()) {
state = State.RINGING;
+ } else if (getForegroundCall().isRinging()) {
+ state = State.ANSWERING;
} else if (getForegroundCall().isIdle()
&& getBackgroundCall().isIdle()) {
state = State.IDLE;