Merge "Don't doubly initialize fields in constructor"
diff --git a/Android.mk b/Android.mk
index 9adf434..8f62777 100644
--- a/Android.mk
+++ b/Android.mk
@@ -143,6 +143,7 @@
core/java/android/nfc/INfcAdapter.aidl \
core/java/android/nfc/INfcAdapterExtras.aidl \
core/java/android/nfc/INfcTag.aidl \
+ core/java/android/nfc/INfcCardEmulation.aidl \
core/java/android/os/IBatteryPropertiesListener.aidl \
core/java/android/os/IBatteryPropertiesRegistrar.aidl \
core/java/android/os/ICancellationSignal.aidl \
diff --git a/api/current.txt b/api/current.txt
index 6c41433..7d83fcf 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -23,6 +23,7 @@
field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
+ field public static final java.lang.String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
@@ -39,6 +40,9 @@
field public static final java.lang.String CALL_PHONE = "android.permission.CALL_PHONE";
field public static final java.lang.String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
field public static final java.lang.String CAMERA = "android.permission.CAMERA";
+ field public static final java.lang.String CAPTURE_AUDIO_OUTPUT = "android.permission.CAPTURE_AUDIO_OUTPUT";
+ field public static final java.lang.String CAPTURE_SECURE_VIDEO_OUTPUT = "android.permission.CAPTURE_SECURE_VIDEO_OUTPUT";
+ field public static final java.lang.String CAPTURE_VIDEO_OUTPUT = "android.permission.CAPTURE_VIDEO_OUTPUT";
field public static final java.lang.String CHANGE_COMPONENT_ENABLED_STATE = "android.permission.CHANGE_COMPONENT_ENABLED_STATE";
field public static final java.lang.String CHANGE_CONFIGURATION = "android.permission.CHANGE_CONFIGURATION";
field public static final java.lang.String CHANGE_NETWORK_STATE = "android.permission.CHANGE_NETWORK_STATE";
@@ -10797,13 +10801,16 @@
package android.hardware.display {
public final class DisplayManager {
- method public android.hardware.display.VirtualDisplay createPrivateVirtualDisplay(java.lang.String, int, int, int, android.view.Surface);
+ method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, android.view.Surface, int);
method public android.view.Display getDisplay(int);
method public android.view.Display[] getDisplays();
method public android.view.Display[] getDisplays(java.lang.String);
method public void registerDisplayListener(android.hardware.display.DisplayManager.DisplayListener, android.os.Handler);
method public void unregisterDisplayListener(android.hardware.display.DisplayManager.DisplayListener);
field public static final java.lang.String DISPLAY_CATEGORY_PRESENTATION = "android.hardware.display.category.PRESENTATION";
+ field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
+ field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
+ field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
}
public static abstract interface DisplayManager.DisplayListener {
@@ -14808,6 +14815,18 @@
package android.nfc.cardemulation {
+ public final class CardEmulationManager {
+ method public static synchronized android.nfc.cardemulation.CardEmulationManager getInstance(android.nfc.NfcAdapter);
+ method public boolean isDefaultServiceForAid(android.content.ComponentName, java.lang.String);
+ method public boolean isDefaultServiceForCategory(android.content.ComponentName, java.lang.String);
+ method public boolean setDefaultServiceForCategory(android.content.ComponentName, java.lang.String);
+ field public static final java.lang.String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.ACTION_CHANGE_DEFAULT";
+ field public static final java.lang.String CATEGORY_OTHER = "other";
+ field public static final java.lang.String CATEGORY_PAYMENT = "payment";
+ field public static final java.lang.String EXTRA_CATEGORY = "category";
+ field public static final java.lang.String EXTRA_SERVICE_COMPONENT = "component";
+ }
+
public abstract class HostApduService extends android.app.Service {
ctor public HostApduService();
method public final android.os.IBinder onBind(android.content.Intent);
@@ -18731,7 +18750,7 @@
public final class PrinterId implements android.os.Parcelable {
method public int describeContents();
- method public java.lang.String getLocalId();
+ method public java.lang.String getPrinterName();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
}
@@ -18744,7 +18763,6 @@
method public int getFittingModes();
method public android.print.PrinterId getId();
method public java.util.List<android.print.PrintAttributes.Tray> getInputTrays();
- method public java.lang.CharSequence getLabel();
method public java.util.List<android.print.PrintAttributes.MediaSize> getMediaSizes();
method public android.print.PrintAttributes.Margins getMinMargins();
method public int getOrientations();
@@ -18758,7 +18776,7 @@
}
public static final class PrinterInfo.Builder {
- ctor public PrinterInfo.Builder(android.print.PrinterId, java.lang.CharSequence);
+ ctor public PrinterInfo.Builder(android.print.PrinterId);
method public android.print.PrinterInfo.Builder addInputTray(android.print.PrintAttributes.Tray, boolean);
method public android.print.PrinterInfo.Builder addMediaSize(android.print.PrintAttributes.MediaSize, boolean);
method public android.print.PrinterInfo.Builder addOutputTray(android.print.PrintAttributes.Tray, boolean);
@@ -20271,10 +20289,17 @@
public final class DocumentsContract {
ctor public DocumentsContract();
+ method public static android.net.Uri buildContentsUri(java.lang.String, java.lang.String, java.lang.String);
method public static android.net.Uri buildContentsUri(android.net.Uri);
- method public static android.net.Uri buildDocumentUri(java.lang.String, java.lang.String);
+ method public static android.net.Uri buildDocumentUri(java.lang.String, java.lang.String, java.lang.String);
+ method public static android.net.Uri buildDocumentUri(android.net.Uri, java.lang.String);
+ method public static android.net.Uri buildRootUri(java.lang.String, java.lang.String);
method public static android.net.Uri buildRootsUri(java.lang.String);
+ method public static android.net.Uri buildSearchUri(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
method public static android.net.Uri buildSearchUri(android.net.Uri, java.lang.String);
+ method public static java.lang.String getDocId(android.net.Uri);
+ method public static java.lang.String getRootId(android.net.Uri);
+ method public static java.lang.String getSearchQuery(android.net.Uri);
method public static android.graphics.Bitmap getThumbnail(android.content.ContentResolver, android.net.Uri, android.graphics.Point);
method public static boolean renameDocument(android.content.ContentResolver, android.net.Uri, java.lang.String);
field public static final java.lang.String EXTRA_HAS_MORE = "has_more";
@@ -20287,7 +20312,7 @@
field public static final int FLAG_SUPPORTS_THUMBNAIL = 8; // 0x8
field public static final java.lang.String MIME_TYPE_DIRECTORY = "vnd.android.cursor.dir/doc";
field public static final java.lang.String PARAM_QUERY = "query";
- field public static final java.lang.String ROOT_GUID = "0";
+ field public static final java.lang.String ROOT_DOC_ID = "0";
field public static final int ROOT_TYPE_DEVICE = 3; // 0x3
field public static final int ROOT_TYPE_DEVICE_ADVANCED = 4; // 0x4
field public static final int ROOT_TYPE_SERVICE = 1; // 0x1
@@ -20295,16 +20320,16 @@
}
public static abstract interface DocumentsContract.DocumentColumns implements android.provider.OpenableColumns {
+ field public static final java.lang.String DOC_ID = "doc_id";
field public static final java.lang.String FLAGS = "flags";
- field public static final java.lang.String GUID = "guid";
field public static final java.lang.String LAST_MODIFIED = "last_modified";
field public static final java.lang.String MIME_TYPE = "mime_type";
}
public static abstract interface DocumentsContract.RootColumns {
field public static final java.lang.String AVAILABLE_BYTES = "available_bytes";
- field public static final java.lang.String GUID = "guid";
field public static final java.lang.String ICON = "icon";
+ field public static final java.lang.String ROOT_ID = "root_id";
field public static final java.lang.String ROOT_TYPE = "root_type";
field public static final java.lang.String SUMMARY = "summary";
field public static final java.lang.String TITLE = "title";
@@ -25591,6 +25616,7 @@
method public deprecated int getWidth();
method public boolean isValid();
field public static final int DEFAULT_DISPLAY = 0; // 0x0
+ field public static final int FLAG_PRESENTATION = 8; // 0x8
field public static final int FLAG_PRIVATE = 4; // 0x4
field public static final int FLAG_SECURE = 2; // 0x2
field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 0f988ed..fe09ce1 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -527,6 +527,14 @@
}
}
+ /** @hide */
+ public void resetAllModes() {
+ try {
+ mService.resetAllModes();
+ } catch (RemoteException e) {
+ }
+ }
+
/**
* Monitor for changes to the operating mode for the given op in the given app package.
* @param op The operation to monitor, one of OP_*.
diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java
index 829b80c..1acac85 100644
--- a/core/java/android/app/StatusBarManager.java
+++ b/core/java/android/app/StatusBarManager.java
@@ -63,6 +63,12 @@
public static final int NAVIGATION_HINT_RECENT_NOP = 1 << 2;
public static final int NAVIGATION_HINT_BACK_ALT = 1 << 3;
+ public static final int WINDOW_STATUS_BAR = 1;
+ public static final int WINDOW_NAVIGATION_BAR = 2;
+
+ public static final int WINDOW_STATE_HIDING = 1;
+ public static final int WINDOW_STATE_SHOWING = 2;
+
private Context mContext;
private IStatusBarService mService;
private IBinder mToken = new Binder();
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 324e351..30ea3f9 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -7058,7 +7058,7 @@
return null;
}
- type = type.trim().toLowerCase(Locale.US);
+ type = type.trim().toLowerCase(Locale.ROOT);
final int semicolonIndex = type.indexOf(';');
if (semicolonIndex != -1) {
diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java
index e2d9724..c125544 100644
--- a/core/java/android/database/DatabaseUtils.java
+++ b/core/java/android/database/DatabaseUtils.java
@@ -1376,7 +1376,7 @@
if (sql.length() < 3) {
return STATEMENT_OTHER;
}
- String prefixSql = sql.substring(0, 3).toUpperCase(Locale.US);
+ String prefixSql = sql.substring(0, 3).toUpperCase(Locale.ROOT);
if (prefixSql.equals("SEL")) {
return STATEMENT_SELECT;
} else if (prefixSql.equals("INS") ||
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index c3e9cb7..5cc1150 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -204,71 +204,37 @@
// TODO(): The following arrays are fragile and error-prone. This needs to be refactored.
// Note: This needs to be updated, whenever a new sensor is added.
- // Holds the reporting mode and maximum length of the values array
- // associated with
- // {@link SensorEvent} or {@link TriggerEvent} for the Sensor
- private static final int[] sSensorReportingModes = {
- 0, 0, // padding because sensor types start at 1
- REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_ACCELEROMETER
- REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_GEOMAGNETIC_FIELD
- REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_ORIENTATION
- REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_GYROSCOPE
- REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_LIGHT
- REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_PRESSURE
- REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_TEMPERATURE
- REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_PROXIMITY
- REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_GRAVITY
- REPORTING_MODE_CONTINUOUS, 3, // SENSOR_TYPE_LINEAR_ACCELERATION
- REPORTING_MODE_CONTINUOUS, 5, // SENSOR_TYPE_ROTATION_VECTOR
- REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_RELATIVE_HUMIDITY
- REPORTING_MODE_ON_CHANGE, 3, // SENSOR_TYPE_AMBIENT_TEMPERATURE
- REPORTING_MODE_CONTINUOUS, 6, // SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED
- REPORTING_MODE_CONTINUOUS, 4, // SENSOR_TYPE_GAME_ROTATION_VECTOR
- REPORTING_MODE_CONTINUOUS, 6, // SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
- REPORTING_MODE_ONE_SHOT, 1, // SENSOR_TYPE_SIGNIFICANT_MOTION
- // added post 4.3
- REPORTING_MODE_ON_CHANGE, 1, // SENSOR_TYPE_STEP_DETECTOR
- REPORTING_MODE_ON_CHANGE, 1, // SENSOR_TYPE_STEP_COUNTER
- REPORTING_MODE_CONTINUOUS, 5 // SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR
- };
+ private static int[] sSensorReportingModes = {
+ REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS,
+ REPORTING_MODE_CONTINUOUS, REPORTING_MODE_ON_CHANGE, REPORTING_MODE_CONTINUOUS,
+ REPORTING_MODE_ON_CHANGE, REPORTING_MODE_ON_CHANGE, REPORTING_MODE_CONTINUOUS,
+ REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS, REPORTING_MODE_ON_CHANGE,
+ REPORTING_MODE_ON_CHANGE, REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS,
+ REPORTING_MODE_CONTINUOUS, REPORTING_MODE_ONE_SHOT };
+
+ // Note: This needs to be updated, whenever a new sensor is added.
+ // Holds the maximum length of the values array associated with {@link SensorEvent} or
+ // {@link TriggerEvent} for the Sensor
+ private static int[] sMaxLengthValuesArray = {
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3,
+ 6, 4, 6, 1 };
static int getReportingMode(Sensor sensor) {
- int offset = sensor.mType * 2;
- if (offset >= sSensorReportingModes.length) {
- // we don't know about this sensor, so this is probably a
- // vendor-defined sensor, in that case, we figure out the reporting
- // mode from the sensor meta-data.
- int minDelay = sensor.mMinDelay;
- if (minDelay == 0) {
- return REPORTING_MODE_ON_CHANGE;
- } else if (minDelay < 0) {
- return REPORTING_MODE_ONE_SHOT;
- } else {
- return REPORTING_MODE_CONTINUOUS;
- }
- }
- return sSensorReportingModes[offset];
+ // mType starts from offset 1.
+ return sSensorReportingModes[sensor.mType - 1];
}
static int getMaxLengthValuesArray(Sensor sensor, int sdkLevel) {
- int type = sensor.mType;
+ // mType starts from offset 1.
+ int len = sMaxLengthValuesArray[sensor.mType - 1];
+
// RotationVector length has changed to 3 to 5 for API level 18
// Set it to 3 for backward compatibility.
- if (type == Sensor.TYPE_ROTATION_VECTOR &&
+ if (sensor.getType() == Sensor.TYPE_ROTATION_VECTOR &&
sdkLevel <= Build.VERSION_CODES.JELLY_BEAN_MR1) {
- return 3;
+ len = 3;
}
- int offset = type * 2 + 1;
- if (offset >= sSensorReportingModes.length) {
- // we don't know about this sensor, so this is probably a
- // vendor-defined sensor, in that case, we don't know how many value
- // it has
- // so we return the maximum and assume the app will know.
- // FIXME: sensor HAL should advertise how much data is returned per
- // sensor
- return 16;
- }
- return sSensorReportingModes[offset];
+ return len;
}
/* Some of these fields are set only by the native bindings in
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 9e2e4ba..7d65736 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -69,16 +69,110 @@
* Display category: Presentation displays.
* <p>
* This category can be used to identify secondary displays that are suitable for
- * use as presentation displays.
+ * use as presentation displays such as HDMI or Wireless displays. Applications
+ * may automatically project their content to presentation displays to provide
+ * richer second screen experiences.
* </p>
*
* @see android.app.Presentation for information about presenting content
* on secondary displays.
+ * @see Display#FLAG_PRESENTATION
* @see #getDisplays(String)
*/
public static final String DISPLAY_CATEGORY_PRESENTATION =
"android.hardware.display.category.PRESENTATION";
+ /**
+ * Virtual display flag: Create a public display.
+ *
+ * <h3>Public virtual displays</h3>
+ * <p>
+ * When this flag is set, the virtual display is public.
+ * </p><p>
+ * A public virtual display behaves just like most any other display that is connected
+ * to the system such as an HDMI or Wireless display. Applications can open
+ * windows on the display and the system may mirror the contents of other displays
+ * onto it.
+ * </p><p>
+ * Creating a public virtual display requires the
+ * {@link android.Manifest.permission#CAPTURE_VIDEO_OUTPUT}
+ * or {@link android.Manifest.permission#CAPTURE_SECURE_VIDEO_OUTPUT} permission.
+ * These permissions are reserved for use by system components and are not available to
+ * third-party applications.
+ * </p>
+ *
+ * <h3>Private virtual displays</h3>
+ * <p>
+ * When this flag is not set, the virtual display is private as defined by the
+ * {@link Display#FLAG_PRIVATE} display flag.
+ * </p>
+ * A private virtual display belongs to the application that created it.
+ * Only the a owner of a private virtual display is allowed to place windows upon it.
+ * The private virtual display also does not participate in display mirroring: it will
+ * neither receive mirrored content from another display nor allow its own content to
+ * be mirrored elsewhere. More precisely, the only processes that are allowed to
+ * enumerate or interact with the private display are those that have the same UID as the
+ * application that originally created the private virtual display.
+ * </p>
+ *
+ * @see #createVirtualDisplay
+ */
+ public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1 << 0;
+
+ /**
+ * Virtual display flag: Create a presentation display.
+ *
+ * <h3>Presentation virtual displays</h3>
+ * <p>
+ * When this flag is set, the virtual display is registered as a presentation
+ * display in the {@link #DISPLAY_CATEGORY_PRESENTATION presentation display category}.
+ * Applications may automatically project their content to presentation displays
+ * to provide richer second screen experiences.
+ * </p>
+ *
+ * <h3>Non-presentation virtual displays</h3>
+ * <p>
+ * When this flag is not set, the virtual display is not registered as a presentation
+ * display. Applications can still project their content on the display but they
+ * will typically not do so automatically. This option is appropriate for
+ * more special-purpose displays.
+ * </p>
+ *
+ * @see android.app.Presentation for information about presenting content
+ * on secondary displays.
+ * @see #createVirtualDisplay
+ * @see #DISPLAY_CATEGORY_PRESENTATION
+ * @see Display#FLAG_PRESENTATION
+ */
+ public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 1 << 1;
+
+ /**
+ * Virtual display flag: Create a secure display.
+ *
+ * <h3>Secure virtual displays</h3>
+ * <p>
+ * When this flag is set, the virtual display is considered secure as defined
+ * by the {@link Display#FLAG_SECURE} display flag. The caller promises to take
+ * reasonable measures, such as over-the-air encryption, to prevent the contents
+ * of the display from being intercepted or recorded on a persistent medium.
+ * </p><p>
+ * Creating a secure virtual display requires the
+ * {@link android.Manifest.permission#CAPTURE_SECURE_VIDEO_OUTPUT} permission.
+ * This permission is reserved for use by system components and is not available to
+ * third-party applications.
+ * </p>
+ *
+ * <h3>Non-secure virtual displays</h3>
+ * <p>
+ * When this flag is not set, the virtual display is considered unsecure.
+ * The content of secure windows will be blanked if shown on this display.
+ * </p>
+ *
+ * @see Display#FLAG_SECURE for information about secure displays.
+ * @see #createVirtualDisplay
+ */
+ public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 1 << 2;
+
/** @hide */
public DisplayManager(Context context) {
mContext = context;
@@ -130,12 +224,12 @@
synchronized (mLock) {
try {
if (category == null) {
- addMatchingDisplaysLocked(mTempDisplays, displayIds, -1);
+ addAllDisplaysLocked(mTempDisplays, displayIds);
} else if (category.equals(DISPLAY_CATEGORY_PRESENTATION)) {
- addMatchingDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_WIFI);
- addMatchingDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_HDMI);
- addMatchingDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_OVERLAY);
- addMatchingDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_VIRTUAL);
+ addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_WIFI);
+ addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_HDMI);
+ addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_OVERLAY);
+ addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_VIRTUAL);
}
return mTempDisplays.toArray(new Display[mTempDisplays.size()]);
} finally {
@@ -144,12 +238,22 @@
}
}
- private void addMatchingDisplaysLocked(
+ private void addAllDisplaysLocked(ArrayList<Display> displays, int[] displayIds) {
+ for (int i = 0; i < displayIds.length; i++) {
+ Display display = getOrCreateDisplayLocked(displayIds[i], true /*assumeValid*/);
+ if (display != null) {
+ displays.add(display);
+ }
+ }
+ }
+
+ private void addPresentationDisplaysLocked(
ArrayList<Display> displays, int[] displayIds, int matchType) {
for (int i = 0; i < displayIds.length; i++) {
Display display = getOrCreateDisplayLocked(displayIds[i], true /*assumeValid*/);
if (display != null
- && (matchType < 0 || display.getType() == matchType)) {
+ && (display.getFlags() & Display.FLAG_PRESENTATION) != 0
+ && display.getType() == matchType) {
displays.add(display);
}
}
@@ -277,23 +381,19 @@
}
/**
- * Creates a private virtual display.
+ * Creates a virtual display.
* <p>
* The content of a virtual display is rendered to a {@link Surface} provided
- * by the application that created the virtual display.
+ * by the application.
* </p><p>
- * Only the application that created a private virtual display is allowed to
- * place windows upon it. The private virtual display also does not participate
- * in display mirroring: it will neither receive mirrored content from another
- * display nor allow its own content to be mirrored elsewhere. More precisely,
- * the only processes that are allowed to enumerate or interact with a private
- * display are those that have the same UID as the application that originally
- * created the private virtual display.
- * </p><p>
- * The private virtual display should be {@link VirtualDisplay#release released}
- * when no longer needed. Because a private virtual display renders to a surface
+ * The virtual display should be {@link VirtualDisplay#release released}
+ * when no longer needed. Because a virtual display renders to a surface
* provided by the application, it will be released automatically when the
* process terminates and all remaining windows on it will be forcibly removed.
+ * </p><p>
+ * The behavior of the virtual display depends on the flags that are provided
+ * to this method. By default, virtual displays are created to be private,
+ * non-presentation and unsecure. Permissions may be required to use certain flags.
* </p>
*
* @param name The name of the virtual display, must be non-empty.
@@ -302,13 +402,19 @@
* @param densityDpi The density of the virtual display in dpi, must be greater than 0.
* @param surface The surface to which the content of the virtual display should
* be rendered, must be non-null.
+ * @param flags A combination of virtual display flags:
+ * {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}, {@link #VIRTUAL_DISPLAY_FLAG_PRESENTATION}
+ * or {@link #VIRTUAL_DISPLAY_FLAG_SECURE}.
* @return The newly created virtual display, or null if the application could
* not create the virtual display.
+ *
+ * @throws SecurityException if the caller does not have permission to create
+ * a virtual display with the specified flags.
*/
- public VirtualDisplay createPrivateVirtualDisplay(String name,
- int width, int height, int densityDpi, Surface surface) {
- return mGlobal.createPrivateVirtualDisplay(mContext,
- name, width, height, densityDpi, surface);
+ public VirtualDisplay createVirtualDisplay(String name,
+ int width, int height, int densityDpi, Surface surface, int flags) {
+ return mGlobal.createVirtualDisplay(mContext,
+ name, width, height, densityDpi, surface, flags);
}
/**
diff --git a/core/java/android/hardware/display/DisplayManagerGlobal.java b/core/java/android/hardware/display/DisplayManagerGlobal.java
index 320185d..10c14ff 100644
--- a/core/java/android/hardware/display/DisplayManagerGlobal.java
+++ b/core/java/android/hardware/display/DisplayManagerGlobal.java
@@ -329,8 +329,8 @@
}
}
- public VirtualDisplay createPrivateVirtualDisplay(Context context, String name,
- int width, int height, int densityDpi, Surface surface) {
+ public VirtualDisplay createVirtualDisplay(Context context, String name,
+ int width, int height, int densityDpi, Surface surface, int flags) {
if (TextUtils.isEmpty(name)) {
throw new IllegalArgumentException("name must be non-null and non-empty");
}
@@ -345,20 +345,20 @@
Binder token = new Binder();
int displayId;
try {
- displayId = mDm.createPrivateVirtualDisplay(token, context.getPackageName(),
- name, width, height, densityDpi, surface);
+ displayId = mDm.createVirtualDisplay(token, context.getPackageName(),
+ name, width, height, densityDpi, surface, flags);
} catch (RemoteException ex) {
- Log.e(TAG, "Could not create private virtual display: " + name, ex);
+ Log.e(TAG, "Could not create virtual display: " + name, ex);
return null;
}
if (displayId < 0) {
- Log.e(TAG, "Could not create private virtual display: " + name);
+ Log.e(TAG, "Could not create virtual display: " + name);
return null;
}
Display display = getRealDisplay(displayId);
if (display == null) {
Log.wtf(TAG, "Could not obtain display info for newly created "
- + "private virtual display: " + name);
+ + "virtual display: " + name);
try {
mDm.releaseVirtualDisplay(token);
} catch (RemoteException ex) {
diff --git a/core/java/android/hardware/display/IDisplayManager.aidl b/core/java/android/hardware/display/IDisplayManager.aidl
index cd4896a..afaf436 100644
--- a/core/java/android/hardware/display/IDisplayManager.aidl
+++ b/core/java/android/hardware/display/IDisplayManager.aidl
@@ -48,9 +48,10 @@
// No permissions required.
WifiDisplayStatus getWifiDisplayStatus();
- // No permissions required.
- int createPrivateVirtualDisplay(IBinder token, String packageName,
- String name, int width, int height, int densityDpi, in Surface surface);
+ // Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT for certain
+ // combinations of flags.
+ int createVirtualDisplay(IBinder token, String packageName,
+ String name, int width, int height, int densityDpi, in Surface surface, int flags);
// No permissions required but must be same Uid as the creator.
void releaseVirtualDisplay(in IBinder token);
diff --git a/core/java/android/hardware/display/VirtualDisplay.java b/core/java/android/hardware/display/VirtualDisplay.java
index 145a217..908aadd 100644
--- a/core/java/android/hardware/display/VirtualDisplay.java
+++ b/core/java/android/hardware/display/VirtualDisplay.java
@@ -21,7 +21,7 @@
/**
* Represents a virtual display.
*
- * @see DisplayManager#createPrivateVirtualDisplay
+ * @see DisplayManager#createVirtualDisplay
*/
public final class VirtualDisplay {
private final DisplayManagerGlobal mGlobal;
diff --git a/core/java/android/net/MailTo.java b/core/java/android/net/MailTo.java
index ca28f86..b90dcb1 100644
--- a/core/java/android/net/MailTo.java
+++ b/core/java/android/net/MailTo.java
@@ -17,6 +17,7 @@
package android.net;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -84,7 +85,7 @@
}
// insert the headers with the name in lowercase so that
// we can easily find common headers
- m.mHeaders.put(Uri.decode(nameval[0]).toLowerCase(),
+ m.mHeaders.put(Uri.decode(nameval[0]).toLowerCase(Locale.ROOT),
nameval.length > 1 ? Uri.decode(nameval[1]) : null);
}
}
diff --git a/core/java/android/net/NetworkConfig.java b/core/java/android/net/NetworkConfig.java
index 3cc0bc5..5d95f41 100644
--- a/core/java/android/net/NetworkConfig.java
+++ b/core/java/android/net/NetworkConfig.java
@@ -17,6 +17,7 @@
package android.net;
import android.util.Log;
+import java.util.Locale;
/**
* Describes the buildtime configuration of a network.
@@ -63,7 +64,7 @@
*/
public NetworkConfig(String init) {
String fragments[] = init.split(",");
- name = fragments[0].trim().toLowerCase();
+ name = fragments[0].trim().toLowerCase(Locale.ROOT);
type = Integer.parseInt(fragments[1]);
radio = Integer.parseInt(fragments[2]);
priority = Integer.parseInt(fragments[3]);
diff --git a/core/java/android/net/ProxyProperties.java b/core/java/android/net/ProxyProperties.java
index cd799da..9c4772b 100644
--- a/core/java/android/net/ProxyProperties.java
+++ b/core/java/android/net/ProxyProperties.java
@@ -25,6 +25,7 @@
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
+import java.util.Locale;
/**
* A container class for the http proxy info
@@ -87,7 +88,7 @@
if (mExclusionList == null) {
mParsedExclusionList = new String[0];
} else {
- String splitExclusionList[] = exclusionList.toLowerCase().split(",");
+ String splitExclusionList[] = exclusionList.toLowerCase(Locale.ROOT).split(",");
mParsedExclusionList = new String[splitExclusionList.length * 2];
for (int i = 0; i < splitExclusionList.length; i++) {
String s = splitExclusionList[i].trim();
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
index a9289ba..a7a8a0a 100644
--- a/core/java/android/net/Uri.java
+++ b/core/java/android/net/Uri.java
@@ -1716,7 +1716,7 @@
if (flag == null) {
return defaultValue;
}
- flag = flag.toLowerCase();
+ flag = flag.toLowerCase(Locale.ROOT);
return (!"false".equals(flag) && !"0".equals(flag));
}
@@ -1744,7 +1744,7 @@
public Uri normalizeScheme() {
String scheme = getScheme();
if (scheme == null) return this; // give up
- String lowerScheme = scheme.toLowerCase(Locale.US);
+ String lowerScheme = scheme.toLowerCase(Locale.ROOT);
if (scheme.equals(lowerScheme)) return this; // no change
return buildUpon().scheme(lowerScheme).build();
diff --git a/core/java/android/net/UrlQuerySanitizer.java b/core/java/android/net/UrlQuerySanitizer.java
index a6efcdd..d2073b4 100644
--- a/core/java/android/net/UrlQuerySanitizer.java
+++ b/core/java/android/net/UrlQuerySanitizer.java
@@ -19,6 +19,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Set;
import java.util.StringTokenizer;
@@ -305,7 +306,7 @@
int length = value.length();
if ((mFlags & SCRIPT_URL_OK) != 0) {
if (length >= MIN_SCRIPT_PREFIX_LENGTH) {
- String asLower = value.toLowerCase();
+ String asLower = value.toLowerCase(Locale.ROOT);
if (asLower.startsWith(JAVASCRIPT_PREFIX) ||
asLower.startsWith(VBSCRIPT_PREFIX)) {
return "";
diff --git a/core/java/android/net/WebAddress.java b/core/java/android/net/WebAddress.java
index 052f921..8126b75 100644
--- a/core/java/android/net/WebAddress.java
+++ b/core/java/android/net/WebAddress.java
@@ -18,6 +18,7 @@
import static android.util.Patterns.GOOD_IRI_CHAR;
+import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -77,7 +78,7 @@
String t;
if (m.matches()) {
t = m.group(MATCH_GROUP_SCHEME);
- if (t != null) mScheme = t.toLowerCase();
+ if (t != null) mScheme = t.toLowerCase(Locale.ROOT);
t = m.group(MATCH_GROUP_AUTHORITY);
if (t != null) mAuthInfo = t;
t = m.group(MATCH_GROUP_HOST);
diff --git a/core/java/android/net/http/HttpAuthHeader.java b/core/java/android/net/http/HttpAuthHeader.java
index d41284c..3abac23 100644
--- a/core/java/android/net/http/HttpAuthHeader.java
+++ b/core/java/android/net/http/HttpAuthHeader.java
@@ -16,6 +16,8 @@
package android.net.http;
+import java.util.Locale;
+
/**
* HttpAuthHeader: a class to store HTTP authentication-header parameters.
* For more information, see: RFC 2617: HTTP Authentication.
@@ -380,12 +382,12 @@
}
if (token.equalsIgnoreCase(QOP_TOKEN)) {
- mQop = value.toLowerCase();
+ mQop = value.toLowerCase(Locale.ROOT);
return;
}
if (token.equalsIgnoreCase(ALGORITHM_TOKEN)) {
- mAlgorithm = value.toLowerCase();
+ mAlgorithm = value.toLowerCase(Locale.ROOT);
return;
}
}
diff --git a/core/java/android/net/http/HttpsConnection.java b/core/java/android/net/http/HttpsConnection.java
index f421d29..7a12e53 100644
--- a/core/java/android/net/http/HttpsConnection.java
+++ b/core/java/android/net/http/HttpsConnection.java
@@ -44,6 +44,7 @@
import java.net.Socket;
import java.security.KeyManagementException;
import java.security.cert.X509Certificate;
+import java.util.Locale;
/**
* A Connection connecting to a secure http server or tunneling through
@@ -209,7 +210,7 @@
// to add 'host' header unless we want proxy to answer us with a
// 400 Bad Request
for (Header h : req.mHttpRequest.getAllHeaders()) {
- String headerName = h.getName().toLowerCase();
+ String headerName = h.getName().toLowerCase(Locale.ROOT);
if (headerName.startsWith("proxy") || headerName.equals("keep-alive")
|| headerName.equals("host")) {
proxyReq.addHeader(h);
diff --git a/core/java/android/nfc/INfcAdapter.aidl b/core/java/android/nfc/INfcAdapter.aidl
index 39810ba..9c97659 100644
--- a/core/java/android/nfc/INfcAdapter.aidl
+++ b/core/java/android/nfc/INfcAdapter.aidl
@@ -24,6 +24,7 @@
import android.nfc.INdefPushCallback;
import android.nfc.INfcAdapterExtras;
import android.nfc.INfcTag;
+import android.nfc.INfcCardEmulation;
/**
* @hide
@@ -31,6 +32,7 @@
interface INfcAdapter
{
INfcTag getNfcTagInterface();
+ INfcCardEmulation getNfcCardEmulationInterface();
INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
int getState();
diff --git a/core/java/android/nfc/INfcCardEmulation.aidl b/core/java/android/nfc/INfcCardEmulation.aidl
new file mode 100644
index 0000000..7369c0b
--- /dev/null
+++ b/core/java/android/nfc/INfcCardEmulation.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.nfc;
+
+import android.content.ComponentName;
+import android.nfc.cardemulation.ApduServiceInfo;
+import android.os.RemoteCallback;
+
+/**
+ * @hide
+ */
+interface INfcCardEmulation
+{
+ boolean isDefaultServiceForCategory(int userHandle, in ComponentName service, String category);
+ boolean isDefaultServiceForAid(int userHandle, in ComponentName service, String aid);
+ boolean setDefaultServiceForCategory(int userHandle, in ComponentName service, String category);
+ List<ApduServiceInfo> getServices(int userHandle, in String category);
+}
diff --git a/core/java/android/nfc/NdefRecord.java b/core/java/android/nfc/NdefRecord.java
index 9b71f62..2b58818 100644
--- a/core/java/android/nfc/NdefRecord.java
+++ b/core/java/android/nfc/NdefRecord.java
@@ -456,8 +456,8 @@
if (domain == null) throw new NullPointerException("domain is null");
if (type == null) throw new NullPointerException("type is null");
- domain = domain.trim().toLowerCase(Locale.US);
- type = type.trim().toLowerCase(Locale.US);
+ domain = domain.trim().toLowerCase(Locale.ROOT);
+ type = type.trim().toLowerCase(Locale.ROOT);
if (domain.length() == 0) throw new IllegalArgumentException("domain is empty");
if (type.length() == 0) throw new IllegalArgumentException("type is empty");
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java
index ca4a7d6..2a4f93c 100644
--- a/core/java/android/nfc/NfcAdapter.java
+++ b/core/java/android/nfc/NfcAdapter.java
@@ -227,6 +227,7 @@
// recovery
static INfcAdapter sService;
static INfcTag sTagService;
+ static INfcCardEmulation sCardEmulationService;
/**
* The NfcAdapter object for each application context.
@@ -348,6 +349,13 @@
throw new UnsupportedOperationException();
}
+ try {
+ sCardEmulationService = sService.getNfcCardEmulationInterface();
+ } catch (RemoteException e) {
+ Log.e(TAG, "could not retrieve card emulation service");
+ throw new UnsupportedOperationException();
+ }
+
sIsInitialized = true;
}
if (context == null) {
@@ -456,6 +464,15 @@
}
/**
+ * Returns the binder interface to the card emulation service.
+ * @hide
+ */
+ public INfcCardEmulation getCardEmulationService() {
+ isEnabled();
+ return sCardEmulationService;
+ }
+
+ /**
* NFC service dead - attempt best effort recovery
* @hide
*/
@@ -477,6 +494,13 @@
Log.e(TAG, "could not retrieve NFC tag service during service recovery");
// nothing more can be done now, sService is still stale, we'll hit
// this recovery path again later
+ return;
+ }
+
+ try {
+ sCardEmulationService = service.getNfcCardEmulationInterface();
+ } catch (RemoteException ee) {
+ Log.e(TAG, "could not retrieve NFC card emulation service during service recovery");
}
return;
diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.aidl b/core/java/android/nfc/cardemulation/ApduServiceInfo.aidl
new file mode 100644
index 0000000..a62fdd6
--- /dev/null
+++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.nfc.cardemulation;
+
+parcelable ApduServiceInfo;
diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
new file mode 100644
index 0000000..11fd39a
--- /dev/null
+++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
@@ -0,0 +1,359 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.nfc.cardemulation;
+
+import android.content.ComponentName;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ServiceInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.graphics.drawable.Drawable;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.Xml;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ * @hide
+ */
+public final class ApduServiceInfo implements Parcelable {
+ static final String TAG = "ApduServiceInfo";
+
+ /**
+ * The service that implements this
+ */
+ final ResolveInfo mService;
+
+ /**
+ * Description of the service
+ */
+ final String mDescription;
+
+ /**
+ * Convenience AID list
+ */
+ final ArrayList<String> mAids;
+
+ /**
+ * Whether this is an {@link HostApduService} or {@link OffHostApduService}
+ */
+ final boolean mOnHost;
+
+ /**
+ * All AID groups this service handles
+ */
+ final ArrayList<AidGroup> mAidGroups;
+
+ /**
+ * Convenience hashmap
+ */
+ final HashMap<String, AidGroup> mCategoryToGroup;
+
+ /**
+ * @hide
+ */
+ public ApduServiceInfo(ResolveInfo info, String description,
+ ArrayList<AidGroup> aidGroups) {
+ this.mService = info;
+ this.mDescription = description;
+ this.mAidGroups = aidGroups;
+ this.mAids = new ArrayList<String>();
+ this.mCategoryToGroup = new HashMap<String, AidGroup>();
+ this.mOnHost = false;
+ for (AidGroup aidGroup : aidGroups) {
+ this.mCategoryToGroup.put(aidGroup.category, aidGroup);
+ this.mAids.addAll(aidGroup.aids);
+ }
+ }
+
+ public ApduServiceInfo(PackageManager pm, ResolveInfo info) throws XmlPullParserException,
+ IOException {
+ ServiceInfo si = info.serviceInfo;
+
+ XmlResourceParser parser = null;
+ try {
+ parser = si.loadXmlMetaData(pm, HostApduService.SERVICE_META_DATA);
+ if (parser == null) {
+ throw new XmlPullParserException("No " + HostApduService.SERVICE_META_DATA +
+ " meta-data");
+ }
+
+ int eventType = parser.getEventType();
+ while (eventType != XmlPullParser.START_TAG && eventType != XmlPullParser.END_DOCUMENT) {
+ eventType = parser.next();
+ }
+
+ String tagName = parser.getName();
+ if (!"host-apdu-service".equals(tagName)) {
+ throw new XmlPullParserException(
+ "Meta-data does not start with <host-apdu-service> tag");
+ }
+
+ Resources res = pm.getResourcesForApplication(si.applicationInfo);
+ AttributeSet attrs = Xml.asAttributeSet(parser);
+ TypedArray sa = res.obtainAttributes(attrs,
+ com.android.internal.R.styleable.HostApduService);
+ mService = info;
+ mDescription = sa.getString(
+ com.android.internal.R.styleable.HostApduService_description);
+ mAidGroups = new ArrayList<AidGroup>();
+ mCategoryToGroup = new HashMap<String, AidGroup>();
+ mAids = new ArrayList<String>();
+ mOnHost = true; // TODO
+ final int depth = parser.getDepth();
+ AidGroup currentGroup = null;
+
+ // Parsed values for the current AID group
+ while (((eventType = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
+ && eventType != XmlPullParser.END_DOCUMENT) {
+ tagName = parser.getName();
+ if (eventType == XmlPullParser.START_TAG && "aid-group".equals(tagName) &&
+ currentGroup == null) {
+ final TypedArray groupAttrs = res.obtainAttributes(attrs,
+ com.android.internal.R.styleable.AidGroup);
+ // Get category of AID group
+ String groupDescription = groupAttrs.getString(
+ com.android.internal.R.styleable.AidGroup_description);
+ String groupCategory = groupAttrs.getString(
+ com.android.internal.R.styleable.AidGroup_category);
+ if (!CardEmulationManager.CATEGORY_PAYMENT.equals(groupCategory)) {
+ groupCategory = CardEmulationManager.CATEGORY_OTHER;
+ }
+ currentGroup = mCategoryToGroup.get(groupCategory);
+ if (currentGroup != null) {
+ if (!CardEmulationManager.CATEGORY_OTHER.equals(groupCategory)) {
+ Log.e(TAG, "Not allowing multiple aid-groups in the " +
+ groupCategory + " category");
+ currentGroup = null;
+ }
+ } else {
+ currentGroup = new AidGroup(groupCategory, groupDescription);
+ }
+ } else if (eventType == XmlPullParser.END_TAG && "aid-group".equals(tagName) &&
+ currentGroup != null) {
+ if (currentGroup.aids.size() > 0) {
+ if (!mCategoryToGroup.containsKey(currentGroup.category)) {
+ mAidGroups.add(currentGroup);
+ mCategoryToGroup.put(currentGroup.category, currentGroup);
+ }
+ } else {
+ Log.e(TAG, "Not adding <aid-group> with empty or invalid AIDs");
+ }
+ currentGroup = null;
+ } else if (eventType == XmlPullParser.START_TAG && "aid-filter".equals(tagName) &&
+ currentGroup != null) {
+ final TypedArray a = res.obtainAttributes(attrs,
+ com.android.internal.R.styleable.AidFilter);
+ String aid = a.getString(com.android.internal.R.styleable.AidFilter_name);
+ if (isValidAid(aid) && !currentGroup.aids.contains(aid)) {
+ currentGroup.aids.add(aid);
+ mAids.add(aid);
+ } else {
+ Log.e(TAG, "Ignoring invalid or duplicate aid: " + aid);
+ }
+ }
+ }
+ } catch (NameNotFoundException e) {
+ throw new XmlPullParserException("Unable to create context for: " + si.packageName);
+ } finally {
+ if (parser != null) parser.close();
+ }
+ }
+
+ public ComponentName getComponent() {
+ return new ComponentName(mService.serviceInfo.packageName,
+ mService.serviceInfo.name);
+ }
+
+ public ArrayList<String> getAids() {
+ return mAids;
+ }
+
+ public ArrayList<AidGroup> getAidGroups() {
+ return mAidGroups;
+ }
+
+ public boolean hasCategory(String category) {
+ return mCategoryToGroup.containsKey(category);
+ }
+
+ public CharSequence loadLabel(PackageManager pm) {
+ return mService.loadLabel(pm);
+ }
+
+ public Drawable loadIcon(PackageManager pm) {
+ return mService.loadIcon(pm);
+ }
+
+ static boolean isValidAid(String aid) {
+ if (aid == null)
+ return false;
+
+ int aidLength = aid.length();
+ if (aidLength == 0 || (aidLength % 2) != 0) {
+ Log.e(TAG, "AID " + aid + " is not correctly formatted.");
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder out = new StringBuilder("ApduService: ");
+ out.append(getComponent());
+ out.append(", description: " + mDescription);
+ out.append(", AID Groups: ");
+ for (AidGroup aidGroup : mAidGroups) {
+ out.append(aidGroup.toString());
+ }
+ return out.toString();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof ApduServiceInfo)) return false;
+ ApduServiceInfo thatService = (ApduServiceInfo) o;
+
+ return thatService.getComponent().equals(this.getComponent());
+ }
+
+ @Override
+ public int hashCode() {
+ return getComponent().hashCode();
+ }
+
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ mService.writeToParcel(dest, flags);
+ dest.writeString(mDescription);
+ dest.writeInt(mAidGroups.size());
+ if (mAidGroups.size() > 0) {
+ dest.writeTypedList(mAidGroups);
+ }
+ };
+
+ public static final Parcelable.Creator<ApduServiceInfo> CREATOR =
+ new Parcelable.Creator<ApduServiceInfo>() {
+ @Override
+ public ApduServiceInfo createFromParcel(Parcel source) {
+ ResolveInfo info = ResolveInfo.CREATOR.createFromParcel(source);
+ String description = source.readString();
+ ArrayList<AidGroup> aidGroups = new ArrayList<AidGroup>();
+ int numGroups = source.readInt();
+ if (numGroups > 0) {
+ source.readTypedList(aidGroups, AidGroup.CREATOR);
+ }
+ return new ApduServiceInfo(info, description, aidGroups);
+ }
+
+ @Override
+ public ApduServiceInfo[] newArray(int size) {
+ return new ApduServiceInfo[size];
+ }
+ };
+
+ public static class AidGroup implements Parcelable {
+ final ArrayList<String> aids;
+ final String category;
+ final String description;
+
+ AidGroup(ArrayList<String> aids, String category, String description) {
+ this.aids = aids;
+ this.category = category;
+ this.description = description;
+ }
+
+ AidGroup(String category, String description) {
+ this.aids = new ArrayList<String>();
+ this.category = category;
+ this.description = description;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public ArrayList<String> getAids() {
+ return aids;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder out = new StringBuilder("Category: " + category +
+ ", description: " + description + ", AIDs:");
+ for (String aid : aids) {
+ out.append(aid);
+ out.append(", ");
+ }
+ return out.toString();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(category);
+ dest.writeString(description);
+ dest.writeInt(aids.size());
+ if (aids.size() > 0) {
+ dest.writeStringList(aids);
+ }
+ }
+
+ public static final Parcelable.Creator<ApduServiceInfo.AidGroup> CREATOR =
+ new Parcelable.Creator<ApduServiceInfo.AidGroup>() {
+
+ @Override
+ public AidGroup createFromParcel(Parcel source) {
+ String category = source.readString();
+ String description = source.readString();
+ int listSize = source.readInt();
+ ArrayList<String> aidList = new ArrayList<String>();
+ if (listSize > 0) {
+ source.readStringList(aidList);
+ }
+ return new AidGroup(aidList, category, description);
+ }
+
+ @Override
+ public AidGroup[] newArray(int size) {
+ return new AidGroup[size];
+ }
+ };
+ }
+}
diff --git a/core/java/android/nfc/cardemulation/CardEmulationManager.java b/core/java/android/nfc/cardemulation/CardEmulationManager.java
new file mode 100644
index 0000000..abfeaf9
--- /dev/null
+++ b/core/java/android/nfc/cardemulation/CardEmulationManager.java
@@ -0,0 +1,236 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.nfc.cardemulation;
+
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
+import android.app.ActivityThread;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
+import android.nfc.INfcCardEmulation;
+import android.nfc.NfcAdapter;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.util.Log;
+
+import java.util.HashMap;
+import java.util.List;
+
+public final class CardEmulationManager {
+ static final String TAG = "CardEmulationManager";
+
+ /**
+ * Activity action: ask the user to change the default
+ * card emulation service for a certain category. This will
+ * show a dialog that asks the user whether he wants to
+ * replace the current default service with the service
+ * identified with the ComponentName specified in
+ * {@link #EXTRA_SERVICE_COMPONENT}, for the category
+ * specified in {@link #EXTRA_CATEGORY}
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_CHANGE_DEFAULT =
+ "android.nfc.cardemulation.ACTION_CHANGE_DEFAULT";
+
+ /**
+ * The category extra for {@link #ACTION_CHANGE_DEFAULT}
+ *
+ * @see #ACTION_CHANGE_DEFAULT
+ */
+ public static final String EXTRA_CATEGORY = "category";
+
+ /**
+ * The ComponentName of the card emulation service component.
+ *
+ * @see #ACTION_CHANGE_DEFAULT
+ */
+ public static final String EXTRA_SERVICE_COMPONENT = "component";
+
+ /**
+ * The payment category can be used to indicate that an AID
+ * represents a payment application.
+ */
+ public static final String CATEGORY_PAYMENT = "payment";
+
+ /**
+ * If an AID group does not contain a category, or the
+ * specified category is not defined by the platform version
+ * that is parsing the AID group, all AIDs in the group will
+ * automatically be categorized under the {@link #CATEGORY_OTHER}
+ * category.
+ */
+ public static final String CATEGORY_OTHER = "other";
+
+ static boolean sIsInitialized = false;
+ static HashMap<Context, CardEmulationManager> sCardEmuManagers = new HashMap();
+ static INfcCardEmulation sService;
+
+ /**
+ * @hide
+ */
+ public static final String PAYMENT_MODE_AUTO = "auto";
+
+ /**
+ * @hide
+ */
+ public static final String PAYMENT_MODE_MANUAL = "manual";
+
+ final Context mContext;
+
+ private CardEmulationManager(Context context, INfcCardEmulation service) {
+ mContext = context.getApplicationContext();
+ sService = service;
+ }
+
+ public static synchronized CardEmulationManager getInstance(NfcAdapter adapter) {
+ if (adapter == null) throw new NullPointerException("NfcAdapter is null");
+ Context context = adapter.getContext();
+ if (context == null) {
+ Log.e(TAG, "NfcAdapter context is null.");
+ throw new UnsupportedOperationException();
+ }
+ if (!sIsInitialized) {
+ IPackageManager pm = ActivityThread.getPackageManager();
+ if (pm == null) {
+ Log.e(TAG, "Cannot get PackageManager");
+ throw new UnsupportedOperationException();
+ }
+ try {
+ if (!pm.hasSystemFeature(PackageManager.FEATURE_NFC_HCE)) {
+ Log.e(TAG, "This device does not support card emulation");
+ throw new UnsupportedOperationException();
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "PackageManager query failed.");
+ throw new UnsupportedOperationException();
+ }
+ sIsInitialized = true;
+ }
+ CardEmulationManager manager = sCardEmuManagers.get(context);
+ if (manager == null) {
+ // Get card emu service
+ INfcCardEmulation service = adapter.getCardEmulationService();
+ manager = new CardEmulationManager(context, service);
+ sCardEmuManagers.put(context, manager);
+ }
+ return manager;
+ }
+
+ /**
+ * Allows an application to query whether a service is currently
+ * the default service to handle a card emulation category.
+ *
+ * @param service The ComponentName of the service
+ * @param category The category
+ * @return whether service is currently the default service for the category.
+ */
+ public boolean isDefaultServiceForCategory(ComponentName service, String category) {
+ try {
+ return sService.isDefaultServiceForCategory(UserHandle.myUserId(), service, category);
+ } catch (RemoteException e) {
+ // Try one more time
+ recoverService();
+ try {
+ return sService.isDefaultServiceForCategory(UserHandle.myUserId(), service,
+ category);
+ } catch (RemoteException ee) {
+ Log.e(TAG, "Failed to recover CardEmulationService.");
+ return false;
+ }
+ }
+ }
+
+ /**
+ *
+ * Allows an application to query whether a service is currently
+ * the default handler for a specified ISO7816-4 Application ID.
+ *
+ * @param service The ComponentName of the service
+ * @param aid The ISO7816-4 Application ID
+ * @return
+ */
+ public boolean isDefaultServiceForAid(ComponentName service, String aid) {
+ try {
+ return sService.isDefaultServiceForAid(UserHandle.myUserId(), service, aid);
+ } catch (RemoteException e) {
+ // Try one more time
+ recoverService();
+ if (sService == null) {
+ Log.e(TAG, "Failed to recover CardEmulationService.");
+ return false;
+ }
+ try {
+ return sService.isDefaultServiceForAid(UserHandle.myUserId(), service, aid);
+ } catch (RemoteException ee) {
+ Log.e(TAG, "Failed to reach CardEmulationService.");
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @return
+ */
+ public boolean setDefaultServiceForCategory(ComponentName service, String category) {
+ try {
+ return sService.setDefaultServiceForCategory(UserHandle.myUserId(), service, category);
+ } catch (RemoteException e) {
+ // Try one more time
+ recoverService();
+ if (sService == null) {
+ Log.e(TAG, "Failed to recover CardEmulationService.");
+ return false;
+ }
+ try {
+ return sService.setDefaultServiceForCategory(UserHandle.myUserId(), service,
+ category);
+ } catch (RemoteException ee) {
+ Log.e(TAG, "Failed to reach CardEmulationService.");
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public List<ApduServiceInfo> getServices(String category) {
+ try {
+ return sService.getServices(UserHandle.myUserId(), category);
+ } catch (RemoteException e) {
+ // Try one more time
+ recoverService();
+ if (sService == null) {
+ Log.e(TAG, "Failed to recover CardEmulationService.");
+ return null;
+ }
+ try {
+ return sService.getServices(UserHandle.myUserId(), category);
+ } catch (RemoteException ee) {
+ Log.e(TAG, "Failed to reach CardEmulationService.");
+ return null;
+ }
+ }
+ }
+
+ void recoverService() {
+ NfcAdapter adapter = NfcAdapter.getDefaultAdapter(mContext);
+ sService = adapter.getCardEmulationService();
+ }
+}
\ No newline at end of file
diff --git a/core/java/android/nfc/cardemulation/HostApduService.java b/core/java/android/nfc/cardemulation/HostApduService.java
index 0624dc2..6d091c1 100644
--- a/core/java/android/nfc/cardemulation/HostApduService.java
+++ b/core/java/android/nfc/cardemulation/HostApduService.java
@@ -28,7 +28,8 @@
* <meta-data android:name="android.nfc.HostApduService" android:resource="@xml/apduservice.xml"/>
* </service></pre>
* <p>For more details refer to {@link #SERVICE_META_DATA},
- * <code><{@link android.R.styleable#HostApduService host-apdu-service}></code> and
+ * <code><{@link android.R.styleable#HostApduService host-apdu-service}></code>,
+ * <code><{@link android.R.styleable#AidGroup aid-group}></code> and
* <code><{@link android.R.styleable#AidFilter aid-filter}></code>.
* <p class="note">The Android platform currently only supports a single
* logical channel.
diff --git a/core/java/android/nfc/cardemulation/OffHostApduService.java b/core/java/android/nfc/cardemulation/OffHostApduService.java
index 56bb93e..79599db 100644
--- a/core/java/android/nfc/cardemulation/OffHostApduService.java
+++ b/core/java/android/nfc/cardemulation/OffHostApduService.java
@@ -32,7 +32,8 @@
* <meta-data android:name="android.nfc.OffHostApduService" android:resource="@xml/apduservice.xml"/>
* </service></pre>
* <p>For more details refer to {@link #SERVICE_META_DATA},
- * <code><{@link android.R.styleable#OffHostApduService offhost-apdu-service}></code> and
+ * <code><{@link android.R.styleable#OffHostApduService offhost-apdu-service}></code>,
+ * <code><{@link android.R.styleable#AidGroup aid-group}></code> and
* <code><{@link android.R.styleable#AidFilter aid-filter}></code>.
*/
public abstract class OffHostApduService extends Service {
@@ -64,4 +65,4 @@
* would need to override this method.
*/
public abstract IBinder onBind(Intent intent);
-}
\ No newline at end of file
+}
diff --git a/core/java/android/print/IPrintManager.aidl b/core/java/android/print/IPrintManager.aidl
index 37ae2ca..7155096 100644
--- a/core/java/android/print/IPrintManager.aidl
+++ b/core/java/android/print/IPrintManager.aidl
@@ -33,4 +33,5 @@
in IPrintDocumentAdapter printAdapter, in PrintAttributes attributes,
int appId, int userId);
void cancelPrintJob(int printJobId, int appId, int userId);
+ void restartPrintJob(int printJobId, int appId, int userId);
}
diff --git a/core/java/android/print/IPrintSpooler.aidl b/core/java/android/print/IPrintSpooler.aidl
index c55205d..8178180 100644
--- a/core/java/android/print/IPrintSpooler.aidl
+++ b/core/java/android/print/IPrintSpooler.aidl
@@ -40,13 +40,10 @@
void createPrintJob(String printJobName, in IPrintClient client,
in IPrintDocumentAdapter printAdapter, in PrintAttributes attributes,
IPrintSpoolerCallbacks callback, int appId, int sequence);
- void cancelPrintJob(int printJobId, IPrintSpoolerCallbacks callback,
- int appId, int sequence);
- void setPrintJobState(int printJobId, int status, IPrintSpoolerCallbacks callback,
- int sequence);
+ void setPrintJobState(int printJobId, int status, CharSequence error,
+ IPrintSpoolerCallbacks callback, int sequence);
void setPrintJobTag(int printJobId, String tag, IPrintSpoolerCallbacks callback,
int sequence);
void writePrintJobData(in ParcelFileDescriptor fd, int printJobId);
void setClient(IPrintSpoolerClient client);
- void notifyClientForActivteJobs();
}
diff --git a/core/java/android/print/PrintJobInfo.java b/core/java/android/print/PrintJobInfo.java
index 39546f3..096dcd5 100644
--- a/core/java/android/print/PrintJobInfo.java
+++ b/core/java/android/print/PrintJobInfo.java
@@ -124,6 +124,9 @@
/** How many copies to print. */
private int mCopies;
+ /** Failure reason if this job failed. */
+ private CharSequence mFailureReason;
+
/** The pages to print */
private PageRange[] mPageRanges;
@@ -148,6 +151,7 @@
mUserId = other.mUserId;
mTag = other.mTag;
mCopies = other.mCopies;
+ mFailureReason = other.mFailureReason;
mPageRanges = other.mPageRanges;
mAttributes = other.mAttributes;
mDocumentInfo = other.mDocumentInfo;
@@ -163,6 +167,9 @@
mTag = parcel.readString();
mCopies = parcel.readInt();
if (parcel.readInt() == 1) {
+ mFailureReason = parcel.readCharSequence();
+ }
+ if (parcel.readInt() == 1) {
Parcelable[] parcelables = parcel.readParcelableArray(null);
mPageRanges = new PageRange[parcelables.length];
for (int i = 0; i < parcelables.length; i++) {
@@ -345,6 +352,28 @@
}
/**
+ * The failure reason if this print job failed.
+ *
+ * @return The failure reason.
+ *
+ * @hide
+ */
+ public CharSequence getFailureReason() {
+ return mFailureReason;
+ }
+
+ /**
+ * The failure reason if this print job failed.
+ *
+ * @param failureReason The failure reason.
+ *
+ * @hide
+ */
+ public void setFailureReason(CharSequence failureReason) {
+ mFailureReason = failureReason;
+ }
+
+ /**
* Gets the included pages.
*
* @return The included pages or <code>null</code> if not set.
@@ -421,6 +450,12 @@
parcel.writeInt(mUserId);
parcel.writeString(mTag);
parcel.writeInt(mCopies);
+ if (mFailureReason != null) {
+ parcel.writeInt(1);
+ parcel.writeCharSequence(mFailureReason);
+ } else {
+ parcel.writeInt(0);
+ }
if (mPageRanges != null) {
parcel.writeInt(1);
parcel.writeParcelableArray(mPageRanges, flags);
diff --git a/core/java/android/print/PrinterId.java b/core/java/android/print/PrinterId.java
index e27fbb2..8462736 100644
--- a/core/java/android/print/PrinterId.java
+++ b/core/java/android/print/PrinterId.java
@@ -26,26 +26,26 @@
*/
public final class PrinterId implements Parcelable {
- private final ComponentName mServiceComponentName;
+ private final ComponentName mServiceName;
- private final String mLocalId;
+ private final String mPrinterName;
/**
* Creates a new instance.
*
- * @param serviceComponentName The managing print service.
- * @param localId The unique id within the managing service.
+ * @param serviceName The managing print service.
+ * @param printerName The unique name within the managing service.
*
* @hide
*/
- public PrinterId(ComponentName serviceComponentName, String localId) {
- mServiceComponentName = serviceComponentName;
- mLocalId = localId;
+ public PrinterId(ComponentName serviceName, String printerName) {
+ mServiceName = serviceName;
+ mPrinterName = printerName;
}
private PrinterId(Parcel parcel) {
- mServiceComponentName = parcel.readParcelable(null);
- mLocalId = parcel.readString();
+ mServiceName = parcel.readParcelable(null);
+ mPrinterName = parcel.readString();
}
/**
@@ -55,18 +55,18 @@
*
* @hide
*/
- public ComponentName getService() {
- return mServiceComponentName;
+ public ComponentName getServiceName() {
+ return mServiceName;
}
/**
- * Gets the local id of this printer in the context
+ * Gets the name of this printer which is unique in the context
* of the print service that manages it.
*
- * @return The local id.
+ * @return The printer name.
*/
- public String getLocalId() {
- return mLocalId;
+ public String getPrinterName() {
+ return mPrinterName;
}
@Override
@@ -76,8 +76,8 @@
@Override
public void writeToParcel(Parcel parcel, int flags) {
- parcel.writeParcelable(mServiceComponentName, flags);
- parcel.writeString(mLocalId);
+ parcel.writeParcelable(mServiceName, flags);
+ parcel.writeString(mPrinterName);
}
@Override
@@ -92,14 +92,14 @@
return false;
}
PrinterId other = (PrinterId) object;
- if (mServiceComponentName == null) {
- if (other.mServiceComponentName != null) {
+ if (mServiceName == null) {
+ if (other.mServiceName != null) {
return false;
}
- } else if (!mServiceComponentName.equals(other.mServiceComponentName)) {
+ } else if (!mServiceName.equals(other.mServiceName)) {
return false;
}
- if (!TextUtils.equals(mLocalId, other.mLocalId)) {
+ if (!TextUtils.equals(mPrinterName, other.mPrinterName)) {
return false;
}
return true;
@@ -109,9 +109,9 @@
public int hashCode() {
final int prime = 31;
int hashCode = 1;
- hashCode = prime * hashCode + ((mServiceComponentName != null)
- ? mServiceComponentName.hashCode() : 1);
- hashCode = prime * hashCode + mLocalId.hashCode();
+ hashCode = prime * hashCode + ((mServiceName != null)
+ ? mServiceName.hashCode() : 1);
+ hashCode = prime * hashCode + mPrinterName.hashCode();
return hashCode;
}
@@ -119,9 +119,9 @@
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PrinterId{");
- builder.append(mServiceComponentName.flattenToString());
+ builder.append(mServiceName.flattenToString());
builder.append(":");
- builder.append(mLocalId);
+ builder.append(mPrinterName);
builder.append('}');
return builder.toString();
}
diff --git a/core/java/android/print/PrinterInfo.java b/core/java/android/print/PrinterInfo.java
index 15bcb73..10cecca 100644
--- a/core/java/android/print/PrinterInfo.java
+++ b/core/java/android/print/PrinterInfo.java
@@ -22,7 +22,6 @@
import android.print.PrintAttributes.MediaSize;
import android.print.PrintAttributes.Resolution;
import android.print.PrintAttributes.Tray;
-import android.text.TextUtils;
import java.util.ArrayList;
import java.util.Arrays;
@@ -59,7 +58,6 @@
// TODO: Add printer status constants.
private PrinterId mId;
- private CharSequence mLabel;
private int mStatus;
private Margins mMinMargins = DEFAULT_MARGINS;
@@ -92,7 +90,6 @@
*/
public void copyFrom(PrinterInfo other) {
mId = other.mId;
- mLabel = other.mLabel;
mStatus = other.mStatus;
mMinMargins = other.mMinMargins;
@@ -162,15 +159,6 @@
}
/**
- * Gets the human readable printer label.
- *
- * @return The human readable label.
- */
- public CharSequence getLabel() {
- return mLabel;
- }
-
- /**
* Gets the status of the printer.
*
* @return The status.
@@ -343,7 +331,6 @@
private PrinterInfo(Parcel parcel) {
mId = parcel.readParcelable(null);
- mLabel = parcel.readCharSequence();
mStatus = parcel.readInt();
mMinMargins = readMargins(parcel);
@@ -369,7 +356,6 @@
@Override
public void writeToParcel(Parcel parcel, int flags) {
parcel.writeParcelable(mId, flags);
- parcel.writeCharSequence(mLabel);
parcel.writeInt(mStatus);
writeMargins(mMinMargins, parcel);
@@ -392,7 +378,6 @@
final int prime = 31;
int result = 1;
result = prime * result + ((mId == null) ? 0 : mId.hashCode());
- result = prime * result + ((mLabel == null) ? 0 : mLabel.hashCode());
result = prime * result + mStatus;
result = prime * result + ((mMinMargins == null) ? 0 : mMinMargins.hashCode());
result = prime * result + ((mMediaSizes == null) ? 0 : mMediaSizes.hashCode());
@@ -427,9 +412,6 @@
} else if (!mId.equals(other.mId)) {
return false;
}
- if (!TextUtils.equals(mLabel, other.mLabel)) {
- return false;
- }
if (mStatus != other.mStatus) {
return false;
}
@@ -498,7 +480,6 @@
StringBuilder builder = new StringBuilder();
builder.append("PrinterInfo{");
builder.append(mId).append(", \"");
- builder.append(mLabel);
builder.append("\"}");
return builder.toString();
}
@@ -639,20 +620,14 @@
* Creates a new instance.
*
* @param printerId The printer id. Cannot be null.
- * @param label The human readable printer label. Cannot be null or empty.
*
* @throws IllegalArgumentException If the printer id is null.
- * @throws IllegalArgumentException If the label is empty.
*/
- public Builder(PrinterId printerId, CharSequence label) {
+ public Builder(PrinterId printerId) {
if (printerId == null) {
throw new IllegalArgumentException("printerId cannot be null.");
}
- if (TextUtils.isEmpty(label)) {
- throw new IllegalArgumentException("label cannot be empty.");
- }
mPrototype = new PrinterInfo();
- mPrototype.mLabel = label;
mPrototype.mId = printerId;
}
diff --git a/core/java/android/printservice/IPrintServiceClient.aidl b/core/java/android/printservice/IPrintServiceClient.aidl
index cdde4d8..f00b37c4 100644
--- a/core/java/android/printservice/IPrintServiceClient.aidl
+++ b/core/java/android/printservice/IPrintServiceClient.aidl
@@ -29,7 +29,7 @@
interface IPrintServiceClient {
List<PrintJobInfo> getPrintJobInfos();
PrintJobInfo getPrintJobInfo(int printJobId);
- boolean setPrintJobState(int printJobId, int status);
+ boolean setPrintJobState(int printJobId, int state, CharSequence error);
boolean setPrintJobTag(int printJobId, String tag);
oneway void writePrintJobData(in ParcelFileDescriptor fd, int printJobId);
}
diff --git a/core/java/android/printservice/PrintJob.java b/core/java/android/printservice/PrintJob.java
index 0ac5a13..64c079e 100644
--- a/core/java/android/printservice/PrintJob.java
+++ b/core/java/android/printservice/PrintJob.java
@@ -121,7 +121,7 @@
*/
public boolean start() {
if (isQueued()) {
- return setState(PrintJobInfo.STATE_STARTED);
+ return setState(PrintJobInfo.STATE_STARTED, null);
}
return false;
}
@@ -136,41 +136,43 @@
*/
public boolean complete() {
if (isStarted()) {
- return setState(PrintJobInfo.STATE_COMPLETED);
+ return setState(PrintJobInfo.STATE_COMPLETED, null);
}
return false;
}
/**
* Fails the print job. You should call this method if {@link
- * #isStarted()} returns true you filed while printing.
+ * #isQueued()} or {@link #isStarted()} returns true you failed
+ * while printing.
*
- * @param error The reason for the failure.
+ * @param error The human readable, short, and translated reason
+ * for the failure.
* @return Whether the job was failed.
*
+ * @see #isQueued()
* @see #isStarted()
*/
public boolean fail(CharSequence error) {
- // TODO: Propagate the error message to the UI.
- if (isStarted()) {
- return setState(PrintJobInfo.STATE_FAILED);
+ if (isQueued() || isStarted()) {
+ return setState(PrintJobInfo.STATE_FAILED, error);
}
return false;
}
/**
* Cancels the print job. You should call this method if {@link
- * #isStarted()} returns true and you canceled the print job as a
- * response to a call to {@link PrintService#onRequestCancelPrintJob(
- * PrintJob)}.
+ * #isQueued()} or {@link #isStarted()} returns true and you canceled
+ * the print job as a response to a call to {@link PrintService
+ * #onRequestCancelPrintJob(PrintJob)}.
*
* @return Whether the job as canceled.
*
* @see #isStarted()
*/
public boolean cancel() {
- if (isStarted()) {
- return setState(PrintJobInfo.STATE_CANCELED);
+ if (isQueued() || isStarted()) {
+ return setState(PrintJobInfo.STATE_CANCELED, null);
}
return false;
}
@@ -222,13 +224,14 @@
|| state == PrintJobInfo.STATE_CANCELED;
}
- private boolean setState(int state) {
+ private boolean setState(int state, CharSequence error) {
try {
- if (mPrintServiceClient.setPrintJobState(mCachedInfo.getId(), state)) {
+ if (mPrintServiceClient.setPrintJobState(mCachedInfo.getId(), state, error)) {
// Best effort - update the state of the cached info since
// we may not be able to re-fetch it later if the job gets
// removed from the spooler as a result of the state change.
mCachedInfo.setState(state);
+ mCachedInfo.setFailureReason(error);
return true;
}
} catch (RemoteException re) {
diff --git a/core/java/android/printservice/PrintService.java b/core/java/android/printservice/PrintService.java
index 15e1b73..49384db 100644
--- a/core/java/android/printservice/PrintService.java
+++ b/core/java/android/printservice/PrintService.java
@@ -428,15 +428,14 @@
}
/**
- * Generates a global printer id from a local id. The local id is unique
- * only within this print service.
+ * Generates a global printer id given the printer's locally unique name.
*
- * @param localId The local id.
+ * @param printerName The printer name.
* @return Global printer id.
*/
- public final PrinterId generatePrinterId(String localId) {
+ public final PrinterId generatePrinterId(String printerName) {
return new PrinterId(new ComponentName(getPackageName(),
- getClass().getName()), localId);
+ getClass().getName()), printerName);
}
@Override
diff --git a/core/java/android/printservice/PrintServiceInfo.java b/core/java/android/printservice/PrintServiceInfo.java
index 43dd1b6..128628d 100644
--- a/core/java/android/printservice/PrintServiceInfo.java
+++ b/core/java/android/printservice/PrintServiceInfo.java
@@ -113,23 +113,23 @@
String nodeName = parser.getName();
if (!TAG_PRINT_SERVICE.equals(nodeName)) {
- throw new XmlPullParserException(
- "Meta-data does not start with " + TAG_PRINT_SERVICE + " tag");
+ Log.e(LOG_TAG, "Ignoring meta-data that does not start with "
+ + TAG_PRINT_SERVICE + " tag");
+ } else {
+ Resources resources = packageManager.getResourcesForApplication(
+ resolveInfo.serviceInfo.applicationInfo);
+ AttributeSet allAttributes = Xml.asAttributeSet(parser);
+ TypedArray attributes = resources.obtainAttributes(allAttributes,
+ com.android.internal.R.styleable.PrintService);
+
+ settingsActivityName = attributes.getString(
+ com.android.internal.R.styleable.PrintService_settingsActivity);
+
+ addPrintersActivityName = attributes.getString(
+ com.android.internal.R.styleable.PrintService_addPrintersActivity);
+
+ attributes.recycle();
}
-
- Resources resources = packageManager.getResourcesForApplication(
- resolveInfo.serviceInfo.applicationInfo);
- AttributeSet allAttributes = Xml.asAttributeSet(parser);
- TypedArray attributes = resources.obtainAttributes(allAttributes,
- com.android.internal.R.styleable.PrintService);
-
- settingsActivityName = attributes.getString(
- com.android.internal.R.styleable.PrintService_settingsActivity);
-
- addPrintersActivityName = attributes.getString(
- com.android.internal.R.styleable.PrintService_addPrintersActivity);
-
- attributes.recycle();
} catch (IOException ioe) {
Log.w(LOG_TAG, "Error reading meta-data:" + ioe);
} catch (XmlPullParserException xppe) {
diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java
index 979a5a3..9c2bb49 100644
--- a/core/java/android/provider/DocumentsContract.java
+++ b/core/java/android/provider/DocumentsContract.java
@@ -34,6 +34,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.util.List;
/**
* The contract between a storage backend and the platform. Contains definitions
@@ -43,9 +44,10 @@
private static final String TAG = "Documents";
// content://com.example/roots/
- // content://com.example/docs/0/
- // content://com.example/docs/0/contents/
- // content://com.example/docs/0/search/?query=pony
+ // content://com.example/roots/sdcard/
+ // content://com.example/roots/sdcard/docs/0/
+ // content://com.example/roots/sdcard/docs/0/contents/
+ // content://com.example/roots/sdcard/docs/0/search/?query=pony
/**
* MIME type of a document which is a directory that may contain additional
@@ -59,10 +61,10 @@
public static final String META_DATA_DOCUMENT_PROVIDER = "android.content.DOCUMENT_PROVIDER";
/**
- * {@link DocumentColumns#GUID} value representing the root directory of a
- * storage backend.
+ * {@link DocumentColumns#DOC_ID} value representing the root directory of a
+ * storage root.
*/
- public static final String ROOT_GUID = "0";
+ public static final String ROOT_DOC_ID = "0";
/**
* Flag indicating that a document is a directory that supports creation of
@@ -139,40 +141,83 @@
public static final String PARAM_QUERY = "query";
/**
- * Build URI representing the custom roots in a storage backend.
+ * Build URI representing the roots in a storage backend.
*/
public static Uri buildRootsUri(String authority) {
return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT)
.authority(authority).appendPath(PATH_ROOTS).build();
}
- /**
- * Build URI representing the given {@link DocumentColumns#GUID} in a
- * storage backend.
- */
- public static Uri buildDocumentUri(String authority, String guid) {
+ public static Uri buildRootUri(String authority, String rootId) {
return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT)
- .authority(authority).appendPath(PATH_DOCS).appendPath(guid).build();
+ .authority(authority).appendPath(PATH_ROOTS).appendPath(rootId).build();
}
/**
- * Build URI representing a search for matching documents under a directory
- * in a storage backend.
- *
- * @param documentUri directory to search under, which must have
- * {@link #FLAG_SUPPORTS_SEARCH}.
+ * Build URI representing the given {@link DocumentColumns#DOC_ID} in a
+ * storage root.
*/
- public static Uri buildSearchUri(Uri documentUri, String query) {
- return documentUri.buildUpon()
- .appendPath(PATH_SEARCH).appendQueryParameter(PARAM_QUERY, query).build();
+ public static Uri buildDocumentUri(String authority, String rootId, String docId) {
+ return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT).authority(authority)
+ .appendPath(PATH_ROOTS).appendPath(rootId).appendPath(PATH_DOCS).appendPath(docId)
+ .build();
}
/**
* Build URI representing the contents of the given directory in a storage
* backend. The given document must be {@link #MIME_TYPE_DIRECTORY}.
*/
- public static Uri buildContentsUri(Uri documentUri) {
- return documentUri.buildUpon().appendPath(PATH_CONTENTS).build();
+ public static Uri buildContentsUri(String authority, String rootId, String docId) {
+ return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT).authority(authority)
+ .appendPath(PATH_ROOTS).appendPath(rootId).appendPath(PATH_DOCS).appendPath(docId)
+ .appendPath(PATH_CONTENTS).build();
+ }
+
+ /**
+ * Build URI representing a search for matching documents under a directory
+ * in a storage backend.
+ */
+ public static Uri buildSearchUri(String authority, String rootId, String docId, String query) {
+ return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT).authority(authority)
+ .appendPath(PATH_ROOTS).appendPath(rootId).appendPath(PATH_DOCS).appendPath(docId)
+ .appendPath(PATH_SEARCH).appendQueryParameter(PARAM_QUERY, query).build();
+ }
+
+ public static Uri buildDocumentUri(Uri relatedUri, String docId) {
+ return buildDocumentUri(relatedUri.getAuthority(), getRootId(relatedUri), docId);
+ }
+
+ public static Uri buildContentsUri(Uri relatedUri) {
+ return buildContentsUri(
+ relatedUri.getAuthority(), getRootId(relatedUri), getDocId(relatedUri));
+ }
+
+ public static Uri buildSearchUri(Uri relatedUri, String query) {
+ return buildSearchUri(
+ relatedUri.getAuthority(), getRootId(relatedUri), getDocId(relatedUri), query);
+ }
+
+ public static String getRootId(Uri documentUri) {
+ final List<String> paths = documentUri.getPathSegments();
+ if (!PATH_ROOTS.equals(paths.get(0))) {
+ throw new IllegalArgumentException();
+ }
+ return paths.get(1);
+ }
+
+ public static String getDocId(Uri documentUri) {
+ final List<String> paths = documentUri.getPathSegments();
+ if (!PATH_ROOTS.equals(paths.get(0))) {
+ throw new IllegalArgumentException();
+ }
+ if (!PATH_DOCS.equals(paths.get(2))) {
+ throw new IllegalArgumentException();
+ }
+ return paths.get(3);
+ }
+
+ public static String getSearchQuery(Uri documentUri) {
+ return documentUri.getQueryParameter(PARAM_QUERY);
}
/**
@@ -184,15 +229,13 @@
*/
public interface DocumentColumns extends OpenableColumns {
/**
- * The globally unique ID for a document within a storage backend.
- * Values <em>must</em> never change once returned. This field is
- * read-only to document clients.
+ * The ID for a document under a storage backend root. Values
+ * <em>must</em> never change once returned. This field is read-only to
+ * document clients.
* <p>
* Type: STRING
- *
- * @see DocumentsContract#ROOT_GUID
*/
- public static final String GUID = "guid";
+ public static final String DOC_ID = "doc_id";
/**
* MIME type of a document, matching the value returned by
@@ -237,6 +280,8 @@
* @see DocumentsContract#buildRootsUri(String)
*/
public interface RootColumns {
+ public static final String ROOT_ID = "root_id";
+
/**
* Storage root type, use for clustering.
* <p>
@@ -248,13 +293,6 @@
public static final String ROOT_TYPE = "root_type";
/**
- * GUID of directory entry for this storage root.
- * <p>
- * Type: STRING
- */
- public static final String GUID = "guid";
-
- /**
* Icon resource ID for this storage root, or {@code 0} to use the
* default {@link ProviderInfo#icon}.
* <p>
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 138b6e4..1c146b2 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -56,6 +56,7 @@
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Locale;
/**
* The Settings provider contains global system-level device preferences.
@@ -4196,6 +4197,18 @@
public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component";
/**
+ * The default NFC payment component
+ * @hide
+ */
+ public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component";
+
+ /**
+ * Whether to automatically invoke NFC payment app or manually select on tap.
+ * @hide
+ */
+ public static final String NFC_PAYMENT_MODE = "nfc_payment_mode";
+
+ /**
* Name of a package that the current user has explicitly allowed to see all of that
* user's notifications.
*
@@ -5388,7 +5401,7 @@
* @hide
*/
public static final String getBluetoothHeadsetPriorityKey(String address) {
- return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase();
+ return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
}
/**
@@ -5396,7 +5409,7 @@
* @hide
*/
public static final String getBluetoothA2dpSinkPriorityKey(String address) {
- return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase();
+ return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
}
/**
@@ -5404,7 +5417,7 @@
* @hide
*/
public static final String getBluetoothInputDevicePriorityKey(String address) {
- return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase();
+ return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
}
/**
diff --git a/core/java/android/speech/srec/Recognizer.java b/core/java/android/speech/srec/Recognizer.java
index 8a2bc7d..db5d8fd 100644
--- a/core/java/android/speech/srec/Recognizer.java
+++ b/core/java/android/speech/srec/Recognizer.java
@@ -145,7 +145,7 @@
public static String getConfigDir(Locale locale) {
if (locale == null) locale = Locale.US;
String dir = "/system/usr/srec/config/" +
- locale.toString().replace('_', '.').toLowerCase();
+ locale.toString().replace('_', '.').toLowerCase(Locale.ROOT);
if ((new File(dir)).isDirectory()) return dir;
return null;
}
diff --git a/core/java/android/text/util/Linkify.java b/core/java/android/text/util/Linkify.java
index 2bc1c6a..deb138d 100644
--- a/core/java/android/text/util/Linkify.java
+++ b/core/java/android/text/util/Linkify.java
@@ -365,7 +365,7 @@
String scheme, MatchFilter matchFilter,
TransformFilter transformFilter) {
boolean hasMatches = false;
- String prefix = (scheme == null) ? "" : scheme.toLowerCase();
+ String prefix = (scheme == null) ? "" : scheme.toLowerCase(Locale.ROOT);
Matcher m = p.matcher(s);
while (m.find()) {
diff --git a/core/java/android/util/DebugUtils.java b/core/java/android/util/DebugUtils.java
index 7e3c855..f607207 100644
--- a/core/java/android/util/DebugUtils.java
+++ b/core/java/android/util/DebugUtils.java
@@ -18,6 +18,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
+import java.util.Locale;
/**
* <p>Various utilities for debugging and logging.</p>
@@ -78,7 +79,7 @@
Class<?> parent = klass;
do {
declaredMethod = parent.getDeclaredMethod("get" +
- pair[0].substring(0, 1).toUpperCase() +
+ pair[0].substring(0, 1).toUpperCase(Locale.ROOT) +
pair[0].substring(1),
(Class[]) null);
} while ((parent = klass.getSuperclass()) != null &&
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 5f614b1..354ea66 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -149,16 +149,25 @@
/**
* Display flag: Indicates that the display is private. Only the application that
* owns the display can create windows on it.
- * <p>
- * This flag is associated with displays that were created using
- * {@link android.hardware.display.DisplayManager#createPrivateVirtualDisplay}.
- * </p>
*
* @see #getFlags
*/
public static final int FLAG_PRIVATE = 1 << 2;
/**
+ * Display flag: Indicates that the display is a presentation display.
+ * <p>
+ * This flag identifies secondary displays that are suitable for
+ * use as presentation displays such as HDMI or Wireless displays. Applications
+ * may automatically project their content to presentation displays to provide
+ * richer second screen experiences.
+ * </p>
+ *
+ * @see #getFlags
+ */
+ public static final int FLAG_PRESENTATION = 1 << 3;
+
+ /**
* Display type: Unknown display type.
* @hide
*/
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java
index 9a9c4cd..8944207 100644
--- a/core/java/android/view/DisplayInfo.java
+++ b/core/java/android/view/DisplayInfo.java
@@ -466,6 +466,9 @@
if ((flags & Display.FLAG_PRIVATE) != 0) {
result.append(", FLAG_PRIVATE");
}
+ if ((flags & Display.FLAG_PRESENTATION) != 0) {
+ result.append(", FLAG_PRESENTATION");
+ }
return result.toString();
}
}
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index c26482b..e116662 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -478,6 +478,11 @@
WindowManagerFuncs windowManagerFuncs);
/**
+ * @return true if com.android.internal.R.bool#config_forceDefaultOrientation is true.
+ */
+ public boolean isDefaultOrientationForced();
+
+ /**
* Called by window manager once it has the initial, default native
* display dimensions.
*/
diff --git a/core/java/android/webkit/URLUtil.java b/core/java/android/webkit/URLUtil.java
index b47f04f..d115984 100644
--- a/core/java/android/webkit/URLUtil.java
+++ b/core/java/android/webkit/URLUtil.java
@@ -17,6 +17,7 @@
package android.webkit;
import java.io.UnsupportedEncodingException;
+import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -348,7 +349,7 @@
}
}
if (extension == null) {
- if (mimeType != null && mimeType.toLowerCase().startsWith("text/")) {
+ if (mimeType != null && mimeType.toLowerCase(Locale.ROOT).startsWith("text/")) {
if (mimeType.equalsIgnoreCase("text/html")) {
extension = ".html";
} else {
diff --git a/core/java/com/android/internal/app/IAppOpsService.aidl b/core/java/com/android/internal/app/IAppOpsService.aidl
index 2dc822e..b798a1a 100644
--- a/core/java/com/android/internal/app/IAppOpsService.aidl
+++ b/core/java/com/android/internal/app/IAppOpsService.aidl
@@ -34,4 +34,5 @@
List<AppOpsManager.PackageOps> getPackagesForOps(in int[] ops);
List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, in int[] ops);
void setMode(int code, int uid, String packageName, int mode);
+ void resetAllModes();
}
diff --git a/core/java/com/android/internal/inputmethod/InputMethodUtils.java b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
index c7b5697..63d018f 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodUtils.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
@@ -558,7 +558,7 @@
return InputMethodSubtype.sort(context, 0, imi, enabledSubtypes);
}
- private List<InputMethodSubtype> getEnabledInputMethodSubtypeListLocked(
+ public List<InputMethodSubtype> getEnabledInputMethodSubtypeListLocked(
InputMethodInfo imi) {
List<Pair<String, ArrayList<String>>> imsList =
getEnabledInputMethodsAndSubtypeListLocked();
diff --git a/core/java/com/android/internal/notification/DemoContactNotificationScorer.java b/core/java/com/android/internal/notification/DemoContactNotificationScorer.java
index 081a371..62529e9 100644
--- a/core/java/com/android/internal/notification/DemoContactNotificationScorer.java
+++ b/core/java/com/android/internal/notification/DemoContactNotificationScorer.java
@@ -163,7 +163,7 @@
if (DBG) Slog.v(TAG, "Initializing " + getClass().getSimpleName() + ".");
mContext = context;
mEnabled = ENABLE_CONTACT_SCORER && 1 == Settings.Global.getInt(
- mContext.getContentResolver(), SETTING_ENABLE_SCORER, 1);
+ mContext.getContentResolver(), SETTING_ENABLE_SCORER, 0);
}
@Override
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index 58b15e2..d1d1a52 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -38,5 +38,6 @@
void toggleRecentApps();
void preloadRecentApps();
void cancelPreloadRecentApps();
+ void setWindowState(int window, int state);
}
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index c98ba8d..97ea7d8 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -51,4 +51,5 @@
void toggleRecentApps();
void preloadRecentApps();
void cancelPreloadRecentApps();
+ void setWindowState(int window, int state);
}
diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp
index ae0113b..6374494 100644
--- a/core/jni/android_hardware_SensorManager.cpp
+++ b/core/jni/android_hardware_SensorManager.cpp
@@ -142,13 +142,7 @@
while ((n = q->read(buffer, 16)) > 0) {
for (int i=0 ; i<n ; i++) {
- if (buffer[i].type == SENSOR_TYPE_STEP_COUNTER) {
- // step-counter returns a uint64, but the java API only deals with floats
- float value = float(buffer[i].u64.step_counter);
- env->SetFloatArrayRegion(mScratch, 0, 1, &value);
- } else {
- env->SetFloatArrayRegion(mScratch, 0, 16, buffer[i].data);
- }
+ env->SetFloatArrayRegion(mScratch, 0, 16, buffer[i].data);
env->CallVoidMethod(mReceiverObject,
gBaseEventQueueClassInfo.dispatchSensorEvent,
diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp
index 526159f..7e70c7c 100644
--- a/core/jni/android_net_NetUtils.cpp
+++ b/core/jni/android_net_NetUtils.cpp
@@ -37,7 +37,8 @@
const char *server,
uint32_t *lease,
const char *vendorInfo,
- const char *domains);
+ const char *domains,
+ const char *mtu);
int dhcp_do_request_renew(const char * const ifname,
const char *ipaddr,
@@ -47,7 +48,8 @@
const char *server,
uint32_t *lease,
const char *vendorInfo,
- const char *domains);
+ const char *domains,
+ const char *mtu);
int dhcp_stop(const char *ifname);
int dhcp_release_lease(const char *ifname);
@@ -126,16 +128,17 @@
uint32_t lease;
char vendorInfo[PROPERTY_VALUE_MAX];
char domains[PROPERTY_VALUE_MAX];
+ char mtu[PROPERTY_VALUE_MAX];
const char *nameStr = env->GetStringUTFChars(ifname, NULL);
if (nameStr == NULL) return (jboolean)false;
if (renew) {
result = ::dhcp_do_request_renew(nameStr, ipaddr, gateway, &prefixLength,
- dns, server, &lease, vendorInfo, domains);
+ dns, server, &lease, vendorInfo, domains, mtu);
} else {
result = ::dhcp_do_request(nameStr, ipaddr, gateway, &prefixLength,
- dns, server, &lease, vendorInfo, domains);
+ dns, server, &lease, vendorInfo, domains, mtu);
}
if (result != 0) {
ALOGD("dhcp_do_request failed");
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 378bce6..a9a14ad 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1864,6 +1864,14 @@
android:description="@string/permdesc_bindPrintService"
android:protectionLevel="signature" />
+ <!-- Must be required by an {@link android.nfc.cardemulation.HostApduService}
+ or {@link android.nfc.cardemulation.OffHostApduService} to ensure that only
+ the system can bind to it. -->
+ <permission android:name="android.permission.BIND_NFC_SERVICE"
+ android:label="@string/permlab_bindNfcService"
+ android:description="@string/permdesc_bindNfcService"
+ android:protectionLevel="signature" />
+
<!-- Allows an application to call APIs that give it access to all print jobs
on the device. Usually an app can access only the print jobts it created.
This permission is not available to third party applications.
@@ -2018,6 +2026,27 @@
android:description="@string/permdesc_controlWifiDisplay"
android:protectionLevel="signature" />
+ <!-- Allows an application to capture audio output.
+ <p>Not for use by third-party applications.</p> -->
+ <permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT"
+ android:label="@string/permlab_captureAudioOutput"
+ android:description="@string/permdesc_captureAudioOutput"
+ android:protectionLevel="signature|system" />
+
+ <!-- Allows an application to capture video output.
+ <p>Not for use by third-party applications.</p> -->
+ <permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT"
+ android:label="@string/permlab_captureVideoOutput"
+ android:description="@string/permdesc_captureVideoOutput"
+ android:protectionLevel="signature|system" />
+
+ <!-- Allows an application to capture secure video output.
+ <p>Not for use by third-party applications.</p> -->
+ <permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT"
+ android:label="@string/permlab_captureSecureVideoOutput"
+ android:description="@string/permdesc_captureSecureVideoOutput"
+ android:protectionLevel="signature|system" />
+
<!-- Required to be able to disable the device (very dangerous!).
<p>Not for use by third-party applications.. -->
<permission android:name="android.permission.BRICK"
diff --git a/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-hdpi/ic_ab_back_holo_dark_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png
rename to core/res/res/drawable-hdpi/ic_ab_back_holo_dark_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-hdpi/ic_ab_back_holo_light_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_ab_back_holo_light.png
rename to core/res/res/drawable-hdpi/ic_ab_back_holo_light_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_notification.png b/core/res/res/drawable-hdpi/ic_audio_notification_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_notification.png
rename to core/res/res/drawable-hdpi/ic_audio_notification_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_notification_mute.png b/core/res/res/drawable-hdpi/ic_audio_notification_mute_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_notification_mute.png
rename to core/res/res/drawable-hdpi/ic_audio_notification_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_phone.png b/core/res/res/drawable-hdpi/ic_audio_phone_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_phone.png
rename to core/res/res/drawable-hdpi/ic_audio_phone_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_ring_notif.png b/core/res/res/drawable-hdpi/ic_audio_ring_notif_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_ring_notif.png
rename to core/res/res/drawable-hdpi/ic_audio_ring_notif_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-hdpi/ic_audio_ring_notif_mute_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_ring_notif_mute.png
rename to core/res/res/drawable-hdpi/ic_audio_ring_notif_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-hdpi/ic_audio_ring_notif_vibrate_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_ring_notif_vibrate.png
rename to core/res/res/drawable-hdpi/ic_audio_ring_notif_vibrate_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_vol.png b/core/res/res/drawable-hdpi/ic_audio_vol_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_vol.png
rename to core/res/res/drawable-hdpi/ic_audio_vol_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_audio_vol_mute.png b/core/res/res/drawable-hdpi/ic_audio_vol_mute_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_audio_vol_mute.png
rename to core/res/res/drawable-hdpi/ic_audio_vol_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-hdpi/ic_lock_airplane_mode_off_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_lock_airplane_mode_off.png
rename to core/res/res/drawable-hdpi/ic_lock_airplane_mode_off_am.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_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/ic_menu_cc.png
rename to core/res/res/drawable-hdpi/ic_menu_cc_am.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_inline_error_above.9.png b/core/res/res/drawable-hdpi/popup_inline_error_above_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/popup_inline_error_above.9.png
rename to core/res/res/drawable-hdpi/popup_inline_error_above_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_inline_error_above_holo_dark.9.png b/core/res/res/drawable-hdpi/popup_inline_error_above_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/popup_inline_error_above_holo_dark.9.png
rename to core/res/res/drawable-hdpi/popup_inline_error_above_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_inline_error_above_holo_light.9.png b/core/res/res/drawable-hdpi/popup_inline_error_above_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/popup_inline_error_above_holo_light.9.png
rename to core/res/res/drawable-hdpi/popup_inline_error_above_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_inline_error.9.png b/core/res/res/drawable-hdpi/popup_inline_error_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/popup_inline_error.9.png
rename to core/res/res/drawable-hdpi/popup_inline_error_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_inline_error_holo_dark.9.png b/core/res/res/drawable-hdpi/popup_inline_error_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/popup_inline_error_holo_dark.9.png
rename to core/res/res/drawable-hdpi/popup_inline_error_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/popup_inline_error_holo_light.9.png b/core/res/res/drawable-hdpi/popup_inline_error_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/popup_inline_error_holo_light.9.png
rename to core/res/res/drawable-hdpi/popup_inline_error_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_dark.9.png
rename to core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_light.9.png
rename to core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark.9.png
rename to core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light.9.png
rename to core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png
rename to core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png
rename to core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_default_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_default_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_default_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_focused_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_default_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_default_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_default_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_default_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_default_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_disabled_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_disabled_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_disabled_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_disabled_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_focused_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_focused_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_focused_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_focused_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_pressed_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png
rename to core/res/res/drawable-hdpi/spinner_pressed_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_pressed_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png
rename to core/res/res/drawable-hdpi/spinner_pressed_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_adb.png b/core/res/res/drawable-hdpi/stat_sys_adb_am.png
similarity index 100%
rename from core/res/res/drawable-hdpi/stat_sys_adb.png
rename to core/res/res/drawable-hdpi/stat_sys_adb_am.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-ldpi/ic_lock_airplane_mode_off_am.png
similarity index 100%
rename from core/res/res/drawable-ldpi/ic_lock_airplane_mode_off.png
rename to core/res/res/drawable-ldpi/ic_lock_airplane_mode_off_am.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_cc.png b/core/res/res/drawable-ldpi/ic_menu_cc_am.png
similarity index 100%
rename from core/res/res/drawable-ldpi/ic_menu_cc.png
rename to core/res/res/drawable-ldpi/ic_menu_cc_am.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_inline_error_above.9.png b/core/res/res/drawable-ldpi/popup_inline_error_above_.9.png
similarity index 100%
rename from core/res/res/drawable-ldpi/popup_inline_error_above.9.png
rename to core/res/res/drawable-ldpi/popup_inline_error_above_.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_inline_error.9.png b/core/res/res/drawable-ldpi/popup_inline_error_am.9.png
similarity index 100%
rename from core/res/res/drawable-ldpi/popup_inline_error.9.png
rename to core/res/res/drawable-ldpi/popup_inline_error_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_adb.png b/core/res/res/drawable-ldpi/stat_sys_adb_am.png
similarity index 100%
rename from core/res/res/drawable-ldpi/stat_sys_adb.png
rename to core/res/res/drawable-ldpi/stat_sys_adb_am.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_default_holo_dark.9.png
deleted file mode 100644
index 45450e4..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_default_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_default_holo_light.9.png
deleted file mode 100644
index b568989..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_focused_holo_dark.9.png
deleted file mode 100644
index e0434584..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_focused_holo_light.9.png
deleted file mode 100644
index f208c99..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_pressed_holo_dark.9.png
deleted file mode 100644
index 94eb994..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_pressed_holo_light.9.png
deleted file mode 100644
index 1fee149..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/btn_cab_done_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-ldrtl-hdpi/ic_ab_back_holo_dark.png
deleted file mode 100644
index 9beeb0f..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_ab_back_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-ldrtl-hdpi/ic_ab_back_holo_light.png
deleted file mode 100644
index 844e38b..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_ab_back_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification.png
deleted file mode 100644
index 62ef692..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification_mute.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification_mute.png
deleted file mode 100644
index 40123e3..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_phone.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_phone.png
deleted file mode 100644
index 968f5ee..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_phone.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif.png
deleted file mode 100644
index e5f0dcf..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_mute.png
deleted file mode 100644
index 371e32f..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_vibrate.png
deleted file mode 100644
index e05e8f5..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_vibrate.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol.png
deleted file mode 100644
index 81a8422..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol_mute.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol_mute.png
deleted file mode 100644
index 371e32f..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-ldrtl-hdpi/ic_lock_airplane_mode_off.png
deleted file mode 100644
index 7b1eee6..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_lock_airplane_mode_off.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_menu_cc.png b/core/res/res/drawable-ldrtl-hdpi/ic_menu_cc.png
deleted file mode 100644
index aedf9b1..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/ic_menu_cc.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error.9.png b/core/res/res/drawable-ldrtl-hdpi/popup_inline_error.9.png
deleted file mode 100644
index 8b43f4e..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above.9.png b/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above.9.png
deleted file mode 100644
index 20e9002..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_dark.9.png
deleted file mode 100644
index b5f397c..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_light.9.png
deleted file mode 100644
index a04d695..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_dark.9.png
deleted file mode 100644
index 8567b1f..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_light.9.png
deleted file mode 100644
index 7d1754c..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_focused_dark.9.png
deleted file mode 100644
index 7c5826f..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_focused_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_focused_light.9.png
deleted file mode 100644
index 974a292..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_focused_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_normal_dark.9.png
deleted file mode 100644
index b3196c9..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_normal_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_normal_light.9.png
deleted file mode 100644
index 1f833d3..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_normal_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_pressed_dark.9.png
deleted file mode 100644
index e969abc..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_pressed_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_pressed_light.9.png
deleted file mode 100644
index 3adbc84..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/quickcontact_badge_overlay_pressed_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_default_holo_dark.9.png
deleted file mode 100644
index 57141d5..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_default_holo_light.9.png
deleted file mode 100644
index 8e28906..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_disabled_holo_dark.9.png
deleted file mode 100644
index efdab73..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_disabled_holo_light.9.png
deleted file mode 100644
index 307b86d..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_disabled_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_focused_holo_dark.9.png
deleted file mode 100644
index 2e28431..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_focused_holo_light.9.png
deleted file mode 100644
index 7a83451..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_pressed_holo_dark.9.png
deleted file mode 100644
index 9afc912..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_ab_pressed_holo_light.9.png
deleted file mode 100644
index 7d03855..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_ab_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_default_holo_dark.9.png
deleted file mode 100644
index 21f1e2c..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_default_holo_light.9.png
deleted file mode 100644
index 600b861..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_disabled_holo_dark.9.png
deleted file mode 100644
index c11619c..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_disabled_holo_light.9.png
deleted file mode 100644
index 91be10f..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_disabled_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_focused_holo_dark.9.png
deleted file mode 100644
index c921487..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_focused_holo_light.9.png
deleted file mode 100644
index 4da6c6e..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_pressed_holo_dark.9.png
deleted file mode 100644
index 9c7d294..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-hdpi/spinner_pressed_holo_light.9.png
deleted file mode 100644
index c9f493a..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/spinner_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/stat_sys_adb.png b/core/res/res/drawable-ldrtl-hdpi/stat_sys_adb.png
deleted file mode 100644
index a7dc29d..0000000
--- a/core/res/res/drawable-ldrtl-hdpi/stat_sys_adb.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-ldpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-ldrtl-ldpi/ic_lock_airplane_mode_off.png
deleted file mode 100644
index c093420..0000000
--- a/core/res/res/drawable-ldrtl-ldpi/ic_lock_airplane_mode_off.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-ldpi/ic_menu_cc.png b/core/res/res/drawable-ldrtl-ldpi/ic_menu_cc.png
deleted file mode 100644
index 1f21884..0000000
--- a/core/res/res/drawable-ldrtl-ldpi/ic_menu_cc.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-ldpi/popup_inline_error.9.png b/core/res/res/drawable-ldrtl-ldpi/popup_inline_error.9.png
deleted file mode 100644
index d2efb62..0000000
--- a/core/res/res/drawable-ldrtl-ldpi/popup_inline_error.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-ldpi/popup_inline_error_above.9.png b/core/res/res/drawable-ldrtl-ldpi/popup_inline_error_above.9.png
deleted file mode 100644
index 04d200d..0000000
--- a/core/res/res/drawable-ldrtl-ldpi/popup_inline_error_above.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-ldpi/stat_sys_adb.png b/core/res/res/drawable-ldrtl-ldpi/stat_sys_adb.png
deleted file mode 100644
index d726b7a..0000000
--- a/core/res/res/drawable-ldrtl-ldpi/stat_sys_adb.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_default_holo_dark.9.png
deleted file mode 100644
index abffc49..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_default_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_default_holo_light.9.png
deleted file mode 100644
index a369081..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_focused_holo_dark.9.png
deleted file mode 100644
index e33e964..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_focused_holo_light.9.png
deleted file mode 100644
index 0a845dd..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_pressed_holo_dark.9.png
deleted file mode 100644
index 74b0352..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_pressed_holo_light.9.png
deleted file mode 100644
index bfb4972..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/btn_cab_done_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-ldrtl-mdpi/ic_ab_back_holo_dark.png
deleted file mode 100644
index c22dc90..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_ab_back_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-ldrtl-mdpi/ic_ab_back_holo_light.png
deleted file mode 100644
index f49b715..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_ab_back_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification.png
deleted file mode 100644
index d9843e0..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification_mute.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification_mute.png
deleted file mode 100644
index 2159cab..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_phone.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_phone.png
deleted file mode 100644
index b5af351..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_phone.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif.png
deleted file mode 100644
index 6341be6..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_mute.png
deleted file mode 100644
index b4c3a54..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_vibrate.png
deleted file mode 100644
index 835773e..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_vibrate.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol.png
deleted file mode 100644
index 947d1f9..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol_mute.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol_mute.png
deleted file mode 100644
index b4c3a54..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-ldrtl-mdpi/ic_lock_airplane_mode_off.png
deleted file mode 100644
index cba5500..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_lock_airplane_mode_off.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_menu_cc.png b/core/res/res/drawable-ldrtl-mdpi/ic_menu_cc.png
deleted file mode 100644
index 0335dec..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/ic_menu_cc.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error.9.png b/core/res/res/drawable-ldrtl-mdpi/popup_inline_error.9.png
deleted file mode 100644
index 27e8d4f..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above.9.png b/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above.9.png
deleted file mode 100644
index 4ae2b91..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_dark.9.png
deleted file mode 100644
index 8cc3b69..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_light.9.png
deleted file mode 100644
index 7a84200..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_dark.9.png
deleted file mode 100644
index 8fc2e2e..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_light.9.png
deleted file mode 100644
index 687a691..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_focused_dark.9.png
deleted file mode 100644
index a321836..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_focused_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_focused_light.9.png
deleted file mode 100644
index 4c5d692..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_focused_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_normal_dark.9.png
deleted file mode 100644
index 6199dc5..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_normal_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_normal_light.9.png
deleted file mode 100644
index 1b0905a..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_normal_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_pressed_dark.9.png
deleted file mode 100644
index c6d7868..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_pressed_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_pressed_light.9.png
deleted file mode 100644
index 179644c..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/quickcontact_badge_overlay_pressed_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_default_holo_dark.9.png
deleted file mode 100644
index 02c799e..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_default_holo_light.9.png
deleted file mode 100644
index 286157c..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_disabled_holo_dark.9.png
deleted file mode 100644
index 030f723..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_disabled_holo_light.9.png
deleted file mode 100644
index a5b10d2..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_disabled_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_focused_holo_dark.9.png
deleted file mode 100644
index 10faec10..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_focused_holo_light.9.png
deleted file mode 100644
index 62a70ed..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_pressed_holo_dark.9.png
deleted file mode 100644
index 633b8d2..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_ab_pressed_holo_light.9.png
deleted file mode 100644
index 59ff556..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_ab_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_default_holo_dark.9.png
deleted file mode 100644
index 09d5aa4..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_default_holo_light.9.png
deleted file mode 100644
index c320ea0..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_disabled_holo_dark.9.png
deleted file mode 100644
index a5f28fd..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_disabled_holo_light.9.png
deleted file mode 100644
index 9e0d39c..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_disabled_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_focused_holo_dark.9.png
deleted file mode 100644
index 24d928f..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_focused_holo_light.9.png
deleted file mode 100644
index 596ba2d..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_pressed_holo_dark.9.png
deleted file mode 100644
index 55b1af7..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-mdpi/spinner_pressed_holo_light.9.png
deleted file mode 100644
index bb0486a..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/spinner_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/stat_sys_adb.png b/core/res/res/drawable-ldrtl-mdpi/stat_sys_adb.png
deleted file mode 100644
index 265c421..0000000
--- a/core/res/res/drawable-ldrtl-mdpi/stat_sys_adb.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_default_holo_dark.9.png
deleted file mode 100644
index d253dd4..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_default_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_default_holo_light.9.png
deleted file mode 100644
index 65f9ec1..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_focused_holo_dark.9.png
deleted file mode 100644
index 105da60..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_focused_holo_light.9.png
deleted file mode 100644
index de53be7..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_pressed_holo_dark.9.png
deleted file mode 100644
index 3be0b0c..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_pressed_holo_light.9.png
deleted file mode 100644
index 878c702..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/btn_cab_done_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-ldrtl-xhdpi/ic_ab_back_holo_dark.png
deleted file mode 100644
index 8dfb7d8..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_ab_back_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-ldrtl-xhdpi/ic_ab_back_holo_light.png
deleted file mode 100644
index 29852ad..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_ab_back_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification.png
deleted file mode 100644
index 43aedea..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification_mute.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification_mute.png
deleted file mode 100644
index 4e87f77..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_phone.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_phone.png
deleted file mode 100644
index 1066d03..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_phone.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif.png
deleted file mode 100644
index daf9213..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_mute.png
deleted file mode 100644
index 83d3bdd..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_vibrate.png
deleted file mode 100644
index 4de95aa..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_vibrate.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol.png
deleted file mode 100644
index 8132926..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol_mute.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol_mute.png
deleted file mode 100644
index 83d3bdd..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol_mute.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-ldrtl-xhdpi/ic_lock_airplane_mode_off.png
deleted file mode 100644
index 6820a23..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_lock_airplane_mode_off.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_menu_cc.png b/core/res/res/drawable-ldrtl-xhdpi/ic_menu_cc.png
deleted file mode 100644
index c8690bd..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/ic_menu_cc.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error.9.png b/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error.9.png
deleted file mode 100644
index db91a56..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above.9.png b/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above.9.png
deleted file mode 100644
index 90820b5..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_dark.9.png
deleted file mode 100644
index 5989975..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_light.9.png
deleted file mode 100644
index 3b3f87d3..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_dark.9.png
deleted file mode 100644
index 75baba2..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_light.9.png
deleted file mode 100644
index 6c0203d..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_focused_dark.9.png
deleted file mode 100644
index 039a056..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_focused_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_focused_light.9.png
deleted file mode 100644
index c8d68c5..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_focused_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_normal_dark.9.png
deleted file mode 100644
index 1fef1ad..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_normal_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_normal_light.9.png
deleted file mode 100644
index 6b22d44..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_normal_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png
deleted file mode 100644
index c219527..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_pressed_light.9.png
deleted file mode 100644
index 2a1d508..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/quickcontact_badge_overlay_pressed_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_default_holo_dark.9.png
deleted file mode 100644
index 6f41b24..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_default_holo_light.9.png
deleted file mode 100644
index 5a96fc1..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_disabled_holo_dark.9.png
deleted file mode 100644
index 96a6da5..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_disabled_holo_light.9.png
deleted file mode 100644
index 849d795..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_disabled_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_focused_holo_dark.9.png
deleted file mode 100644
index 3d6d0f9..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_focused_holo_light.9.png
deleted file mode 100644
index 1cbaf6c..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_pressed_holo_dark.9.png
deleted file mode 100644
index 878e90d..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_pressed_holo_light.9.png
deleted file mode 100644
index f25acc2..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_ab_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_default_holo_dark.9.png
deleted file mode 100644
index 8d89c86..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_default_holo_light.9.png
deleted file mode 100644
index 6e3ca08..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_default_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_disabled_holo_dark.9.png
deleted file mode 100644
index 2204091..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_disabled_holo_light.9.png
deleted file mode 100644
index 3e6684e..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_disabled_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_focused_holo_dark.9.png
deleted file mode 100644
index 5129dee..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_focused_holo_light.9.png
deleted file mode 100644
index 0f0289b..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_pressed_holo_dark.9.png
deleted file mode 100644
index 795820b..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-ldrtl-xhdpi/spinner_pressed_holo_light.9.png
deleted file mode 100644
index 830edfd..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/spinner_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/stat_sys_adb.png b/core/res/res/drawable-ldrtl-xhdpi/stat_sys_adb.png
deleted file mode 100644
index e342556..0000000
--- a/core/res/res/drawable-ldrtl-xhdpi/stat_sys_adb.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-mdpi/ic_ab_back_holo_dark_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png
rename to core/res/res/drawable-mdpi/ic_ab_back_holo_dark_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-mdpi/ic_ab_back_holo_light_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_ab_back_holo_light.png
rename to core/res/res/drawable-mdpi/ic_ab_back_holo_light_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_notification.png b/core/res/res/drawable-mdpi/ic_audio_notification_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_notification.png
rename to core/res/res/drawable-mdpi/ic_audio_notification_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_notification_mute.png b/core/res/res/drawable-mdpi/ic_audio_notification_mute_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_notification_mute.png
rename to core/res/res/drawable-mdpi/ic_audio_notification_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_phone.png b/core/res/res/drawable-mdpi/ic_audio_phone_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_phone.png
rename to core/res/res/drawable-mdpi/ic_audio_phone_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_ring_notif.png b/core/res/res/drawable-mdpi/ic_audio_ring_notif_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_ring_notif.png
rename to core/res/res/drawable-mdpi/ic_audio_ring_notif_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-mdpi/ic_audio_ring_notif_mute_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_ring_notif_mute.png
rename to core/res/res/drawable-mdpi/ic_audio_ring_notif_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-mdpi/ic_audio_ring_notif_vibrate_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_ring_notif_vibrate.png
rename to core/res/res/drawable-mdpi/ic_audio_ring_notif_vibrate_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_vol.png b/core/res/res/drawable-mdpi/ic_audio_vol_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_vol.png
rename to core/res/res/drawable-mdpi/ic_audio_vol_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_audio_vol_mute.png b/core/res/res/drawable-mdpi/ic_audio_vol_mute_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_audio_vol_mute.png
rename to core/res/res/drawable-mdpi/ic_audio_vol_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-mdpi/ic_lock_airplane_mode_off_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_lock_airplane_mode_off.png
rename to core/res/res/drawable-mdpi/ic_lock_airplane_mode_off_am.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_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/ic_menu_cc.png
rename to core/res/res/drawable-mdpi/ic_menu_cc_am.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error_above.9.png b/core/res/res/drawable-mdpi/popup_inline_error_above_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/popup_inline_error_above.9.png
rename to core/res/res/drawable-mdpi/popup_inline_error_above_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error_above_holo_dark.9.png b/core/res/res/drawable-mdpi/popup_inline_error_above_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/popup_inline_error_above_holo_dark.9.png
rename to core/res/res/drawable-mdpi/popup_inline_error_above_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error_above_holo_light.9.png b/core/res/res/drawable-mdpi/popup_inline_error_above_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/popup_inline_error_above_holo_light.9.png
rename to core/res/res/drawable-mdpi/popup_inline_error_above_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error.9.png b/core/res/res/drawable-mdpi/popup_inline_error_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/popup_inline_error.9.png
rename to core/res/res/drawable-mdpi/popup_inline_error_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error_holo_dark.9.png b/core/res/res/drawable-mdpi/popup_inline_error_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/popup_inline_error_holo_dark.9.png
rename to core/res/res/drawable-mdpi/popup_inline_error_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/popup_inline_error_holo_light.9.png b/core/res/res/drawable-mdpi/popup_inline_error_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/popup_inline_error_holo_light.9.png
rename to core/res/res/drawable-mdpi/popup_inline_error_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_dark.9.png
rename to core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_light.9.png
rename to core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png
rename to core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png
rename to core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark.9.png
rename to core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light.9.png
rename to core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_default_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_default_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_default_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_focused_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_default_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_default_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_default_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_default_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_default_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_disabled_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_disabled_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_disabled_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_disabled_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_focused_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_focused_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_focused_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_focused_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_pressed_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png
rename to core/res/res/drawable-mdpi/spinner_pressed_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_pressed_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png
rename to core/res/res/drawable-mdpi/spinner_pressed_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_adb.png b/core/res/res/drawable-mdpi/stat_sys_adb_am.png
similarity index 100%
rename from core/res/res/drawable-mdpi/stat_sys_adb.png
rename to core/res/res/drawable-mdpi/stat_sys_adb_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-xhdpi/ic_ab_back_holo_dark_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_ab_back_holo_dark.png
rename to core/res/res/drawable-xhdpi/ic_ab_back_holo_dark_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-xhdpi/ic_ab_back_holo_light_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_ab_back_holo_light.png
rename to core/res/res/drawable-xhdpi/ic_ab_back_holo_light_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_notification.png b/core/res/res/drawable-xhdpi/ic_audio_notification_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_notification.png
rename to core/res/res/drawable-xhdpi/ic_audio_notification_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_notification_mute.png b/core/res/res/drawable-xhdpi/ic_audio_notification_mute_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_notification_mute.png
rename to core/res/res/drawable-xhdpi/ic_audio_notification_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_phone.png b/core/res/res/drawable-xhdpi/ic_audio_phone_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_phone.png
rename to core/res/res/drawable-xhdpi/ic_audio_phone_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_ring_notif.png b/core/res/res/drawable-xhdpi/ic_audio_ring_notif_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_ring_notif.png
rename to core/res/res/drawable-xhdpi/ic_audio_ring_notif_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-xhdpi/ic_audio_ring_notif_mute_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_ring_notif_mute.png
rename to core/res/res/drawable-xhdpi/ic_audio_ring_notif_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-xhdpi/ic_audio_ring_notif_vibrate_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_ring_notif_vibrate.png
rename to core/res/res/drawable-xhdpi/ic_audio_ring_notif_vibrate_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_vol.png b/core/res/res/drawable-xhdpi/ic_audio_vol_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_vol.png
rename to core/res/res/drawable-xhdpi/ic_audio_vol_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_audio_vol_mute.png b/core/res/res/drawable-xhdpi/ic_audio_vol_mute_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_audio_vol_mute.png
rename to core/res/res/drawable-xhdpi/ic_audio_vol_mute_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-xhdpi/ic_lock_airplane_mode_off_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_lock_airplane_mode_off.png
rename to core/res/res/drawable-xhdpi/ic_lock_airplane_mode_off_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cc.png b/core/res/res/drawable-xhdpi/ic_menu_cc_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/ic_menu_cc.png
rename to core/res/res/drawable-xhdpi/ic_menu_cc_am.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error_above.9.png b/core/res/res/drawable-xhdpi/popup_inline_error_above_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/popup_inline_error_above.9.png
rename to core/res/res/drawable-xhdpi/popup_inline_error_above_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error_above_holo_dark.9.png b/core/res/res/drawable-xhdpi/popup_inline_error_above_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/popup_inline_error_above_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/popup_inline_error_above_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error_above_holo_light.9.png b/core/res/res/drawable-xhdpi/popup_inline_error_above_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/popup_inline_error_above_holo_light.9.png
rename to core/res/res/drawable-xhdpi/popup_inline_error_above_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error.9.png b/core/res/res/drawable-xhdpi/popup_inline_error_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/popup_inline_error.9.png
rename to core/res/res/drawable-xhdpi/popup_inline_error_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error_holo_dark.9.png b/core/res/res/drawable-xhdpi/popup_inline_error_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/popup_inline_error_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/popup_inline_error_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/popup_inline_error_holo_light.9.png b/core/res/res/drawable-xhdpi/popup_inline_error_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/popup_inline_error_holo_light.9.png
rename to core/res/res/drawable-xhdpi/popup_inline_error_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_dark.9.png
rename to core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_light.9.png
rename to core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark.9.png
rename to core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light.9.png
rename to core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png
rename to core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png
rename to core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_default_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_default_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_default_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_default_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_default_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_disabled_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_disabled_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_disabled_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_focused_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_focused_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_focused_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_focused_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png
rename to core/res/res/drawable-xhdpi/spinner_pressed_holo_dark_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_pressed_holo_light_am.9.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png
rename to core/res/res/drawable-xhdpi/spinner_pressed_holo_light_am.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_adb.png b/core/res/res/drawable-xhdpi/stat_sys_adb_am.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/stat_sys_adb.png
rename to core/res/res/drawable-xhdpi/stat_sys_adb_am.png
Binary files differ
diff --git a/core/res/res/drawable/btn_cab_done_holo_dark.xml b/core/res/res/drawable/btn_cab_done_holo_dark.xml
index fe42951..14f5777 100644
--- a/core/res/res/drawable/btn_cab_done_holo_dark.xml
+++ b/core/res/res/drawable/btn_cab_done_holo_dark.xml
@@ -14,7 +14,8 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:autoMirrored="true">
<item android:state_pressed="true"
android:drawable="@drawable/btn_cab_done_pressed_holo_dark" />
<item android:state_focused="true" android:state_enabled="true"
diff --git a/core/res/res/drawable/btn_cab_done_holo_light.xml b/core/res/res/drawable/btn_cab_done_holo_light.xml
index f362774..a9a634f 100644
--- a/core/res/res/drawable/btn_cab_done_holo_light.xml
+++ b/core/res/res/drawable/btn_cab_done_holo_light.xml
@@ -14,7 +14,8 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:autoMirrored="true">
<item android:state_pressed="true"
android:drawable="@drawable/btn_cab_done_pressed_holo_light" />
<item android:state_focused="true" android:state_enabled="true"
diff --git a/core/res/res/drawable/ic_ab_back_holo_dark.xml b/core/res/res/drawable/ic_ab_back_holo_dark.xml
new file mode 100644
index 0000000..740d3e8
--- /dev/null
+++ b/core/res/res/drawable/ic_ab_back_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_ab_back_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_ab_back_holo_light.xml b/core/res/res/drawable/ic_ab_back_holo_light.xml
new file mode 100644
index 0000000..7639f94
--- /dev/null
+++ b/core/res/res/drawable/ic_ab_back_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_ab_back_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_notification.xml b/core/res/res/drawable/ic_audio_notification.xml
new file mode 100644
index 0000000..b87e4c8
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_notification.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_notification_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_notification_mute.xml b/core/res/res/drawable/ic_audio_notification_mute.xml
new file mode 100644
index 0000000..1caf27c
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_notification_mute.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_notification_mute_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_phone.xml b/core/res/res/drawable/ic_audio_phone.xml
new file mode 100644
index 0000000..e6869fd
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_phone.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_phone_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_ring_notif.xml b/core/res/res/drawable/ic_audio_ring_notif.xml
new file mode 100644
index 0000000..2f48741
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_ring_notif.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_ring_notif_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_ring_notif_mute.xml b/core/res/res/drawable/ic_audio_ring_notif_mute.xml
new file mode 100644
index 0000000..7549f6d
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_ring_notif_mute.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_ring_notif_mute_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_ring_notif_vibrate.xml b/core/res/res/drawable/ic_audio_ring_notif_vibrate.xml
new file mode 100644
index 0000000..3481e27
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_ring_notif_vibrate.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_ring_notif_vibrate_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_vol.xml b/core/res/res/drawable/ic_audio_vol.xml
new file mode 100644
index 0000000..6dd249b
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_vol.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_vol_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_audio_vol_mute.xml b/core/res/res/drawable/ic_audio_vol_mute.xml
new file mode 100644
index 0000000..b093f59
--- /dev/null
+++ b/core/res/res/drawable/ic_audio_vol_mute.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_audio_vol_mute_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_lock_airplane_mode_off.xml b/core/res/res/drawable/ic_lock_airplane_mode_off.xml
new file mode 100644
index 0000000..b344e28
--- /dev/null
+++ b/core/res/res/drawable/ic_lock_airplane_mode_off.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_lock_airplane_mode_off_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/ic_menu_cc.xml b/core/res/res/drawable/ic_menu_cc.xml
new file mode 100644
index 0000000..2bb4ff7
--- /dev/null
+++ b/core/res/res/drawable/ic_menu_cc.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_menu_cc_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/popup_inline_error.xml b/core/res/res/drawable/popup_inline_error.xml
new file mode 100644
index 0000000..1bba674
--- /dev/null
+++ b/core/res/res/drawable/popup_inline_error.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/popup_inline_error_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/popup_inline_error_above.xml b/core/res/res/drawable/popup_inline_error_above.xml
new file mode 100644
index 0000000..5dc7ca2
--- /dev/null
+++ b/core/res/res/drawable/popup_inline_error_above.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/popup_inline_error_above_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/popup_inline_error_above_holo_dark.xml b/core/res/res/drawable/popup_inline_error_above_holo_dark.xml
new file mode 100644
index 0000000..4b4cb05
--- /dev/null
+++ b/core/res/res/drawable/popup_inline_error_above_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/popup_inline_error_above_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/popup_inline_error_above_holo_light.xml b/core/res/res/drawable/popup_inline_error_above_holo_light.xml
new file mode 100644
index 0000000..4a0f53e
--- /dev/null
+++ b/core/res/res/drawable/popup_inline_error_above_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/popup_inline_error_above_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/popup_inline_error_holo_dark.xml b/core/res/res/drawable/popup_inline_error_holo_dark.xml
new file mode 100644
index 0000000..cce73f5
--- /dev/null
+++ b/core/res/res/drawable/popup_inline_error_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/popup_inline_error_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/popup_inline_error_holo_light.xml b/core/res/res/drawable/popup_inline_error_holo_light.xml
new file mode 100644
index 0000000..f1fce4e
--- /dev/null
+++ b/core/res/res/drawable/popup_inline_error_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/popup_inline_error_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/quickcontact_badge_overlay_focused_dark.xml b/core/res/res/drawable/quickcontact_badge_overlay_focused_dark.xml
new file mode 100644
index 0000000..51a0215
--- /dev/null
+++ b/core/res/res/drawable/quickcontact_badge_overlay_focused_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/quickcontact_badge_overlay_focused_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/quickcontact_badge_overlay_focused_light.xml b/core/res/res/drawable/quickcontact_badge_overlay_focused_light.xml
new file mode 100644
index 0000000..9261ab8
--- /dev/null
+++ b/core/res/res/drawable/quickcontact_badge_overlay_focused_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/quickcontact_badge_overlay_focused_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/quickcontact_badge_overlay_normal_dark.xml b/core/res/res/drawable/quickcontact_badge_overlay_normal_dark.xml
new file mode 100644
index 0000000..9a1f8b1
--- /dev/null
+++ b/core/res/res/drawable/quickcontact_badge_overlay_normal_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/quickcontact_badge_overlay_normal_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/quickcontact_badge_overlay_normal_light.xml b/core/res/res/drawable/quickcontact_badge_overlay_normal_light.xml
new file mode 100644
index 0000000..62c8f34
--- /dev/null
+++ b/core/res/res/drawable/quickcontact_badge_overlay_normal_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/quickcontact_badge_overlay_normal_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/quickcontact_badge_overlay_pressed_dark.xml b/core/res/res/drawable/quickcontact_badge_overlay_pressed_dark.xml
new file mode 100644
index 0000000..796bf4b
--- /dev/null
+++ b/core/res/res/drawable/quickcontact_badge_overlay_pressed_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/quickcontact_badge_overlay_pressed_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/quickcontact_badge_overlay_pressed_light.xml b/core/res/res/drawable/quickcontact_badge_overlay_pressed_light.xml
new file mode 100644
index 0000000..ff5d079
--- /dev/null
+++ b/core/res/res/drawable/quickcontact_badge_overlay_pressed_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/quickcontact_badge_overlay_pressed_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_default_holo_dark.xml b/core/res/res/drawable/spinner_ab_default_holo_dark.xml
new file mode 100644
index 0000000..2ccbbb7
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_default_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_default_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_default_holo_light.xml b/core/res/res/drawable/spinner_ab_default_holo_light.xml
new file mode 100644
index 0000000..88a299f
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_default_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_default_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_disabled_holo_dark.xml b/core/res/res/drawable/spinner_ab_disabled_holo_dark.xml
new file mode 100644
index 0000000..45ad7b2
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_disabled_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_disabled_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_disabled_holo_light.xml b/core/res/res/drawable/spinner_ab_disabled_holo_light.xml
new file mode 100644
index 0000000..d4d7dfe
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_disabled_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_disabled_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_focused_holo_dark.xml b/core/res/res/drawable/spinner_ab_focused_holo_dark.xml
new file mode 100644
index 0000000..987109a
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_focused_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_focused_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_focused_holo_light.xml b/core/res/res/drawable/spinner_ab_focused_holo_light.xml
new file mode 100644
index 0000000..0944c50
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_focused_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_focused_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_pressed_holo_dark.xml b/core/res/res/drawable/spinner_ab_pressed_holo_dark.xml
new file mode 100644
index 0000000..5aa808c
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_pressed_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_pressed_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_ab_pressed_holo_light.xml b/core/res/res/drawable/spinner_ab_pressed_holo_light.xml
new file mode 100644
index 0000000..143c333
--- /dev/null
+++ b/core/res/res/drawable/spinner_ab_pressed_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_ab_pressed_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_default_holo_dark.xml b/core/res/res/drawable/spinner_default_holo_dark.xml
new file mode 100644
index 0000000..f15f3b3
--- /dev/null
+++ b/core/res/res/drawable/spinner_default_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_default_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_default_holo_light.xml b/core/res/res/drawable/spinner_default_holo_light.xml
new file mode 100644
index 0000000..1aacfb9
--- /dev/null
+++ b/core/res/res/drawable/spinner_default_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_default_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_disabled_holo_dark.xml b/core/res/res/drawable/spinner_disabled_holo_dark.xml
new file mode 100644
index 0000000..de58ef3
--- /dev/null
+++ b/core/res/res/drawable/spinner_disabled_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_disabled_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_disabled_holo_light.xml b/core/res/res/drawable/spinner_disabled_holo_light.xml
new file mode 100644
index 0000000..a854a03
--- /dev/null
+++ b/core/res/res/drawable/spinner_disabled_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_disabled_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_focused_holo_dark.xml b/core/res/res/drawable/spinner_focused_holo_dark.xml
new file mode 100644
index 0000000..28985a6
--- /dev/null
+++ b/core/res/res/drawable/spinner_focused_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_focused_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_focused_holo_light.xml b/core/res/res/drawable/spinner_focused_holo_light.xml
new file mode 100644
index 0000000..7c0d309c
--- /dev/null
+++ b/core/res/res/drawable/spinner_focused_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_focused_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_pressed_holo_dark.xml b/core/res/res/drawable/spinner_pressed_holo_dark.xml
new file mode 100644
index 0000000..45818a0
--- /dev/null
+++ b/core/res/res/drawable/spinner_pressed_holo_dark.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_pressed_holo_dark_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/spinner_pressed_holo_light.xml b/core/res/res/drawable/spinner_pressed_holo_light.xml
new file mode 100644
index 0000000..c81f8a6
--- /dev/null
+++ b/core/res/res/drawable/spinner_pressed_holo_light.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/spinner_pressed_holo_light_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/drawable/stat_sys_adb.xml b/core/res/res/drawable/stat_sys_adb.xml
new file mode 100644
index 0000000..dfc8563
--- /dev/null
+++ b/core/res/res/drawable/stat_sys_adb.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2013, 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.
+ */
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/stat_sys_adb_am"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 67a32fd..f7d0282 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2603,16 +2603,27 @@
<attr name="description" />
</declare-styleable>
- <!-- Specify one or more <code>aid-filter</code> elements inside a
+ <!-- Specify one or more <code>aid-group</code> elements inside a
<code>host-apdu-service</code> or <code>offhost-apdu-service</code>
- element to list the ISO7816 Application ID (AIDs) your service can handle.-->
+ element to define a group of ISO7816 Application ID (AIDs) that
+ your service can handle.-->
+ <declare-styleable name="AidGroup">
+ <!-- Short description of what the AID group implements. This attribute is mandatory.-->
+ <attr name="description" />
+ <!-- The category attribute will be used by the Android platform to present
+ multiple applications that register AIDs in the same category uniformly.
+ Additionally, when a category is specified, Android will ensure that either
+ all AIDs in this group are routed to this application, or none at all.
+ This attribute is optional.-->
+ <attr name="category" format="string" />
+ </declare-styleable>
+
+ <!-- Specify one or more <code>aid-filter</code> elements inside a
+ <code>aid-group</code> element to specify an ISO7816 Application ID (AID)
+ your service can handle. -->
<declare-styleable name="AidFilter">
<!-- The ISO7816 Application ID. This attribute is mandatory. -->
<attr name="name" />
- <!-- Short description of what the AID implements. This attribute is mandatory.-->
- <attr name="description" />
- <!-- Category. This attribute is optional.-->
- <attr name="category" format="string" />
</declare-styleable>
<declare-styleable name="ActionMenuItemView">
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 580a337..b9840e2 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1195,4 +1195,9 @@
<item>com.android.internal.notification.DemoContactNotificationScorer</item>
</string-array>
+ <!-- Flag indicating that this device does not rotate and will always remain in its default
+ orientation. Activities that desire to run in a non-compatible orientation will be run
+ from an emulated display within the physical display. -->
+ <bool name="config_forceDefaultOrientation">false</bool>
+
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 8743119..4830a19 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -990,6 +990,13 @@
<string name="permdesc_accessAllPrintJobs">Allows the holder to access print jobs
created by another app. Should never be needed for normal apps.</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_bindNfcService">bind to NFC service</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_bindNfcService">Allows the holder to bind to applications
+ that are emulating NFC cards. Should never be needed for normal apps.</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_bindTextService">bind to a text service</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
@@ -1387,9 +1394,19 @@
<string name="permdesc_configureWifiDisplay">Allows the app to configure and connect to Wifi displays.</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_controlWifiDisplay">control Wifi displays</string>
+ <string name="permlab_captureAudioOutput">capture audio output</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_controlWifiDisplay">Allows the app to control low-level features of Wifi displays.</string>
+ <string name="permdesc_captureAudioOutput">Allows the app to capture and redirect audio output.</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_captureVideoOutput">capture video output</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_captureVideoOutput">Allows the app to capture and redirect video output.</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_captureSecureVideoOutput">capture secure video output</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_captureSecureVideoOutput">Allows the app to capture and redirect secure video output.</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_modifyAudioSettings">change your audio settings</string>
@@ -4029,6 +4046,9 @@
<!-- Title text to show within the overlay. [CHAR LIMIT=50] -->
<string name="display_manager_overlay_display_title"><xliff:g id="name">%1$s</xliff:g>: <xliff:g id="width">%2$d</xliff:g>x<xliff:g id="height">%3$d</xliff:g>, <xliff:g id="dpi">%4$d</xliff:g> dpi</string>
+ <!-- Title text to append when the display is secure. [CHAR LIMIT=30] -->
+ <string name="display_manager_overlay_display_secure_suffix">, secure</string>
+
<!-- Title of the notification to indicate an active wifi display connection. [CHAR LIMIT=50] -->
<string name="wifi_display_notification_title">Wireless display is connected</string>
<!-- Message of the notification to indicate an active wifi display connection. [CHAR LIMIT=80] -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 3e29221..0bfed1b 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -280,7 +280,8 @@
<java-symbol type="bool" name="config_dontPreferApn" />
<java-symbol type="bool" name="config_speed_up_audio_on_mt_calls" />
<java-symbol type="bool" name="config_useFixedVolume" />
-
+ <java-symbol type="bool" name="config_forceDefaultOrientation" />
+
<java-symbol type="integer" name="config_cursorWindowSize" />
<java-symbol type="integer" name="config_extraFreeKbytesAdjust" />
<java-symbol type="integer" name="config_extraFreeKbytesAbsolute" />
@@ -484,6 +485,7 @@
<java-symbol type="string" name="display_manager_built_in_display_name" />
<java-symbol type="string" name="display_manager_hdmi_display_name" />
<java-symbol type="string" name="display_manager_overlay_display_name" />
+ <java-symbol type="string" name="display_manager_overlay_display_secure_suffix" />
<java-symbol type="string" name="display_manager_overlay_display_title" />
<java-symbol type="string" name="double_tap_toast" />
<java-symbol type="string" name="elapsed_time_short_format_h_mm_ss" />
diff --git a/docs/html/gcm_navtree_data.js b/docs/html/gcm_navtree_data.js
index 3b52c13..c6a9b60 100644
--- a/docs/html/gcm_navtree_data.js
+++ b/docs/html/gcm_navtree_data.js
@@ -1,7 +1,7 @@
var GCM_NAVTREE_DATA =
[ [ "com.google.android.gcm", "reference/com/google/android/gcm/package-summary.html", [ [ "Classes", null, [ [ "GCMBaseIntentService", "reference/com/google/android/gcm/GCMBaseIntentService.html", null, null ], [ "GCMBroadcastReceiver", "reference/com/google/android/gcm/GCMBroadcastReceiver.html", null, null ], [ "GCMConstants", "reference/com/google/android/gcm/GCMConstants.html", null, null ], [ "GCMRegistrar", "reference/com/google/android/gcm/GCMRegistrar.html", null, null ] ]
, null ] ]
-, null ], [ "com.google.android.gcm.server", "reference/com/google/android/gcm/server/package-summary.html", [ [ "Classes", null, [ [ "Constants", "reference/com/google/android/gcm/server/Constants.html", null, null ], [ "Message", "reference/com/google/android/gcm/server/Message.html", null, null ], [ "Message.Builder", "reference/com/google/android/gcm/server/Message.Builder.html", null, null ], [ "MulticastResult", "reference/com/google/android/gcm/server/MulticastResult.html", null, null ], [ "Result", "reference/com/google/android/gcm/server/Result.html", null, null ], [ "Sender", "reference/com/google/android/gcm/server/Sender.html", null, null ] ]
+, null ], [ "com.google.android.gcm.server", "reference/com/google/android/gcm/server/package-summary.html", [ [ "Classes", null, [ [ "Constants", "reference/com/google/android/gcm/server/Constants.html", null, null ], [ "Message", "reference/com/google/android/gcm/server/Message.html", null, null ], [ "Message.Builder", "reference/com/google/android/gcm/server/Message.Builder.html", null, null ], [ "MulticastResult", "reference/com/google/android/gcm/server/MulticastResult.html", null, null ], [ "MulticastResult.Builder", "reference/com/google/android/gcm/server/MulticastResult.Builder.html", null, null ], [ "Result", "reference/com/google/android/gcm/server/Result.html", null, null ], [ "Result.Builder", "reference/com/google/android/gcm/server/Result.Builder.html", null, null ], [ "Sender", "reference/com/google/android/gcm/server/Sender.html", null, null ] ]
, null ], [ "Exceptions", null, [ [ "InvalidRequestException", "reference/com/google/android/gcm/server/InvalidRequestException.html", null, null ] ]
, null ] ]
, null ] ]
diff --git a/docs/html/guide/topics/manifest/compatible-screens-element.jd b/docs/html/guide/topics/manifest/compatible-screens-element.jd
index 9ef44fe..00cbfe5 100644
--- a/docs/html/guide/topics/manifest/compatible-screens-element.jd
+++ b/docs/html/guide/topics/manifest/compatible-screens-element.jd
@@ -33,14 +33,15 @@
compatible. Thus, external services (such as Google Play) should not provide the application to
devices with such screens.</p>
- <p class="caution"><strong>Caution:</strong> Normally, <strong>you should not use this manifest
+<p class="caution"><strong>Caution:</strong> Normally, <strong>you should not use this manifest
element</strong>. Using this element can dramatically reduce the potential user base for your
application, by not allowing users to install your application if they have a device with a screen
configuration that you have not listed. You should use it only as a last resort, when the
-application absolutely does not work with all screen configurations. Instead of using this element,
-you should follow the guide to <a href="{@docRoot}guide/practices/screens_support.html">Supporting
-Multiple Screens</a>, in order to provide complete support for multiple screens, by adding
-alternative resources for different screen sizes and densities.</p>
+application absolutely does not work with specific screen configurations. Instead of using this
+element, you should follow the guide to <a href=
+"{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a> to
+provide scalable support for multiple screens using alternative layouts and bitmaps
+for different screen sizes and densities.</p>
<p>If you want to set only a minimum screen <em>size</em> for your your application, then you
should use the <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
@@ -94,6 +95,10 @@
<li>{@code hdpi}</li>
<li>{@code xhdpi}</li>
</ul>
+ <p class="note"><strong>Note:</strong> This attribute currently does not accept
+ {@code xxhdpi} as a valid value, but you can instead specify {@code 480}
+ as the value, which is the approximate threshold for xhdpi screens.</p>
+
<p>For information about the different screen densities, see <a
href="{@docRoot}guide/practices/screens_support.html#range">Supporting Multiple Screens</a>.</p>
</dd>
diff --git a/docs/html/reference/com/google/android/gcm/GCMBaseIntentService.html b/docs/html/reference/com/google/android/gcm/GCMBaseIntentService.html
index fba48d4..5ef2947 100644
--- a/docs/html/reference/com/google/android/gcm/GCMBaseIntentService.html
+++ b/docs/html/reference/com/google/android/gcm/GCMBaseIntentService.html
@@ -847,13 +847,16 @@
<div class="jd-descr">
+<p>
+ <p class="caution"><strong>
+ This class is deprecated.</strong><br/>
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+ </p>
<h2>Class Overview</h2>
-
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;"><strong>DEPRECATED.</strong> Please use the <a href=
-"http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html"><code>GoogleCloudMessaging</code></a> API instead.</div>
-
<p itemprop="articleBody">Skeleton for application-specific <code><a href="/reference/android/app/IntentService.html">IntentService</a></code>s responsible for
handling communication from Google Cloud Messaging service.
<p>
@@ -862,8 +865,7 @@
operations, they should spawn new threads, otherwise the worker thread will
be blocked.
<p>
- Subclasses must provide a public no-arg constructor.
-</p>
+ Subclasses must provide a public no-arg constructor.</p>
@@ -911,7 +913,7 @@
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMBaseIntentService.html#TAG">TAG</a></td>
- <td class="jd-descrcol" width="100%"></td>
+ <td class="jd-descrcol" width="100%">Old TAG used for logging.</td>
</tr>
@@ -1066,364 +1068,364 @@
<tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
- <td class="jd-linkcol">AUDIO_SERVICE</td>
+ <td class="jd-linkcol">APP_OPS_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
+ <td class="jd-linkcol">AUDIO_SERVICE</td>
+ <td class="jd-descrcol" width="100%"></td>
+ </tr>
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol">String</td>
<td class="jd-linkcol">BACKUP_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_ABOVE_CLIENT</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_ADJUST_WITH_ACTIVITY</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_ALLOW_OOM_MANAGEMENT</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_AUTO_CREATE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_DEBUG_UNBIND</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_IMPORTANT</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_NOT_FOREGROUND</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_NOT_VISIBLE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_VISIBLE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">BIND_WAIVE_PRIORITY</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">BLUETOOTH_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">CLIPBOARD_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">CONNECTIVITY_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">CONTEXT_IGNORE_SECURITY</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">CONTEXT_INCLUDE_CODE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">CONTEXT_RESTRICTED</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">COUNTRY_DETECTOR</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">DEVICE_POLICY_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">DISPLAY_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">DOWNLOAD_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">DROPBOX_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">INPUT_METHOD_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">INPUT_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">KEYGUARD_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">LAYOUT_INFLATER_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">LOCATION_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">MEDIA_ROUTER_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">MODE_APPEND</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">MODE_ENABLE_WRITE_AHEAD_LOGGING</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">MODE_MULTI_PROCESS</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">MODE_PRIVATE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">MODE_WORLD_READABLE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol">MODE_WORLD_WRITEABLE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">NETWORKMANAGEMENT_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">NETWORK_POLICY_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">NETWORK_STATS_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">NFC_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">NOTIFICATION_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">NSD_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">POWER_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">SCHEDULING_POLICY_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">SEARCH_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">SENSOR_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">SERIAL_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">SIP_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">STATUS_BAR_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">STORAGE_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol">TELEPHONY_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
- <tr class=" api apilevel-" >
- <td class="jd-typecol">String</td>
- <td class="jd-linkcol">TEXT_SERVICES_MANAGER_SERVICE</td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
- <td class="jd-linkcol">THROTTLE_SERVICE</td>
+ <td class="jd-linkcol">TEXT_SERVICES_MANAGER_SERVICE</td>
<td class="jd-descrcol" width="100%"></td>
</tr>
@@ -2352,7 +2354,7 @@
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">bindService</span>(Intent arg0, ServiceConnection arg1, int arg2, int arg3)</nobr>
+ <span class="sympad">bindServiceAsUser</span>(Intent arg0, ServiceConnection arg1, int arg2, UserHandle arg3)</nobr>
</td></tr>
@@ -2797,6 +2799,22 @@
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getBasePackageName</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
File</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
@@ -2806,7 +2824,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2822,7 +2840,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2838,7 +2856,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2854,7 +2872,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2870,7 +2888,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2886,7 +2904,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2902,7 +2920,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2918,7 +2936,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2934,7 +2952,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2950,7 +2968,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2966,7 +2984,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2982,7 +3000,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -2998,7 +3016,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3014,7 +3032,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3030,7 +3048,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3046,7 +3064,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3062,7 +3080,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3078,7 +3096,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3094,7 +3112,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3110,7 +3128,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3126,7 +3144,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3142,6 +3160,22 @@
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getUserId</span>()</nobr>
+
+ </td></tr>
+
+
+
<tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3424,7 +3458,7 @@
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">sendBroadcast</span>(Intent arg0)</nobr>
+ <span class="sympad">sendBroadcast</span>(Intent arg0, String arg1, int arg2)</nobr>
</td></tr>
@@ -3440,13 +3474,29 @@
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">sendBroadcast</span>(Intent arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">sendBroadcastAsUser</span>(Intent arg0, UserHandle arg1)</nobr>
</td></tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3462,7 +3512,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3478,7 +3528,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3494,6 +3544,22 @@
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">sendOrderedBroadcast</span>(Intent arg0, String arg1, int arg2, BroadcastReceiver arg3, Handler arg4, int arg5, String arg6, Bundle arg7)</nobr>
+
+ </td></tr>
+
+
+
<tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -3930,7 +3996,7 @@
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">bindService</span>(Intent arg0, ServiceConnection arg1, int arg2, int arg3)</nobr>
+ <span class="sympad">bindServiceAsUser</span>(Intent arg0, ServiceConnection arg1, int arg2, UserHandle arg3)</nobr>
</td></tr>
@@ -4359,6 +4425,22 @@
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getBasePackageName</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+ abstract
+
+
+
+
File</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
@@ -4368,7 +4450,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4384,7 +4466,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4400,7 +4482,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4416,7 +4498,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4432,7 +4514,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4448,7 +4530,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4464,7 +4546,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4480,7 +4562,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4496,7 +4578,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4512,7 +4594,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4528,7 +4610,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4544,7 +4626,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4560,7 +4642,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4576,7 +4658,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4592,7 +4674,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4608,7 +4690,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4624,7 +4706,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4640,7 +4722,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4656,7 +4738,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -4672,7 +4754,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -4688,7 +4770,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4704,7 +4786,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -4720,7 +4802,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -4736,7 +4818,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -4752,6 +4834,22 @@
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+ abstract
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getUserId</span>()</nobr>
+
+ </td></tr>
+
+
+
<tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -5114,7 +5212,7 @@
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">sendBroadcast</span>(Intent arg0)</nobr>
+ <span class="sympad">sendBroadcast</span>(Intent arg0, String arg1, int arg2)</nobr>
</td></tr>
@@ -5130,13 +5228,29 @@
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">sendBroadcast</span>(Intent arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+ abstract
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
<span class="sympad">sendBroadcastAsUser</span>(Intent arg0, UserHandle arg1)</nobr>
</td></tr>
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -5152,7 +5266,7 @@
- <tr class="alt-color api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -5168,7 +5282,7 @@
- <tr class=" api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -5184,6 +5298,22 @@
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+ abstract
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">sendOrderedBroadcast</span>(Intent arg0, String arg1, int arg2, BroadcastReceiver arg3, Handler arg4, int arg5, String arg6, Bundle arg7)</nobr>
+
+ </td></tr>
+
+
+
<tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
abstract
@@ -5940,7 +6070,9 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
+ <div class="jd-tagdata jd-tagdescr"><p>Old TAG used for logging. Marked as deprecated since it should have
+ been private at first place.
+</p></div>
<div class="jd-tagdata">
diff --git a/docs/html/reference/com/google/android/gcm/GCMBroadcastReceiver.html b/docs/html/reference/com/google/android/gcm/GCMBroadcastReceiver.html
index e75f046..38e68f4 100644
--- a/docs/html/reference/com/google/android/gcm/GCMBroadcastReceiver.html
+++ b/docs/html/reference/com/google/android/gcm/GCMBroadcastReceiver.html
@@ -746,19 +746,23 @@
<div class="jd-descr">
+<p>
+ <p class="caution"><strong>
+ This class is deprecated.</strong><br/>
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+ </p>
<h2>Class Overview</h2>
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;"><strong>DEPRECATED.</strong> Please use the <a href=
-"http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html"><code>GoogleCloudMessaging</code></a> API instead.</div>
<p itemprop="articleBody"><code><a href="/reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a></code> that receives GCM messages and delivers them to
an application-specific <code><a href="/reference/com/google/android/gcm/GCMBaseIntentService.html">GCMBaseIntentService</a></code> subclass.
<p>
By default, the <code><a href="/reference/com/google/android/gcm/GCMBaseIntentService.html">GCMBaseIntentService</a></code> class belongs to the application
main package and is named
<code><a href="/reference/com/google/android/gcm/GCMConstants.html#DEFAULT_INTENT_SERVICE_CLASS_NAME">DEFAULT_INTENT_SERVICE_CLASS_NAME</a></code>. To use a new class,
- the <code><a href="/reference/com/google/android/gcm/GCMBroadcastReceiver.html#getGCMIntentServiceClassName(android.content.Context)">getGCMIntentServiceClassName(Context)</a></code> must be overridden.
-</p>
+ the <code><a href="/reference/com/google/android/gcm/GCMBroadcastReceiver.html#getGCMIntentServiceClassName(android.content.Context)">getGCMIntentServiceClassName(Context)</a></code> must be overridden.</p>
diff --git a/docs/html/reference/com/google/android/gcm/GCMConstants.html b/docs/html/reference/com/google/android/gcm/GCMConstants.html
index 0c9d6cd..097a24f 100644
--- a/docs/html/reference/com/google/android/gcm/GCMConstants.html
+++ b/docs/html/reference/com/google/android/gcm/GCMConstants.html
@@ -719,13 +719,17 @@
<div class="jd-descr">
+<p>
+ <p class="caution"><strong>
+ This class is deprecated.</strong><br/>
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+ </p>
<h2>Class Overview</h2>
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;"><strong>DEPRECATED.</strong> Please use the <a href=
-"http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html"><code>GoogleCloudMessaging</code></a> API instead.</div>
-<p itemprop="articleBody">Constants used by the GCM library.
-</p>
+<p itemprop="articleBody">Constants used by the GCM library.</p>
@@ -823,47 +827,55 @@
<tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html#EXTRA_APPLICATION_PENDING_INTENT">EXTRA_APPLICATION_PENDING_INTENT</a></td>
- <td class="jd-descrcol" width="100%">Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">.INTENT_TO_GCM_REGISTRATION</a></code> to get the
- application info.</td>
+ <td class="jd-descrcol" width="100%">Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION</a></code>
+ to get the application info.</td>
</tr>
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html#EXTRA_ERROR">EXTRA_ERROR</a></td>
- <td class="jd-descrcol" width="100%">Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code> to indicate
- an error when the registration fails.</td>
+ <td class="jd-descrcol" width="100%">Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code>
+ to indicate an error when the registration fails.</td>
</tr>
<tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html#EXTRA_FROM">EXTRA_FROM</a></td>
- <td class="jd-descrcol" width="100%">Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">.INTENT_FROM_GCM_MESSAGE</a></code> to indicate which
- sender (Google API project id) sent the message.</td>
+ <td class="jd-descrcol" width="100%">Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE</a></code>
+ to indicate which sender (Google API project id) sent the message.</td>
</tr>
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html#EXTRA_REGISTRATION_ID">EXTRA_REGISTRATION_ID</a></td>
- <td class="jd-descrcol" width="100%">Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code> to indicate
- the registration id when the registration succeeds.</td>
+ <td class="jd-descrcol" width="100%">Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code>
+ to indicate the registration id when the registration succeeds.</td>
</tr>
<tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html#EXTRA_SENDER">EXTRA_SENDER</a></td>
- <td class="jd-descrcol" width="100%">Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">.INTENT_TO_GCM_REGISTRATION</a></code> to indicate which
- senders (Google API project ids) can send messages to the application.</td>
+ <td class="jd-descrcol" width="100%">Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION</a></code>
+ to indicate which senders (Google API project ids) can send messages to
+ the application.</td>
</tr>
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html#EXTRA_SPECIAL_MESSAGE">EXTRA_SPECIAL_MESSAGE</a></td>
- <td class="jd-descrcol" width="100%">Type of message present in the <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">.INTENT_FROM_GCM_MESSAGE</a></code> intent.</td>
+ <td class="jd-descrcol" width="100%">Type of message present in the
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE</a></code>
+ intent.</td>
</tr>
@@ -877,8 +889,9 @@
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html#EXTRA_UNREGISTERED">EXTRA_UNREGISTERED</a></td>
- <td class="jd-descrcol" width="100%">Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code> to indicate
- that the application has been unregistered.</td>
+ <td class="jd-descrcol" width="100%">Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code>
+ to indicate that the application has been unregistered.</td>
</tr>
@@ -1487,8 +1500,9 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p>Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">.INTENT_TO_GCM_REGISTRATION</a></code> to get the
- application info.
+ <div class="jd-tagdata jd-tagdescr"><p>Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION</a></code>
+ to get the application info.
</p></div>
@@ -1526,9 +1540,10 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p>Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code> to indicate
- an error when the registration fails. See constants starting with ERROR_
- for possible values.
+ <div class="jd-tagdata jd-tagdescr"><p>Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code>
+ to indicate an error when the registration fails.
+ See constants starting with ERROR_ for possible values.
</p></div>
@@ -1566,8 +1581,9 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p>Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">.INTENT_FROM_GCM_MESSAGE</a></code> to indicate which
- sender (Google API project id) sent the message.
+ <div class="jd-tagdata jd-tagdescr"><p>Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE</a></code>
+ to indicate which sender (Google API project id) sent the message.
</p></div>
@@ -1605,8 +1621,9 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p>Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code> to indicate
- the registration id when the registration succeeds.
+ <div class="jd-tagdata jd-tagdescr"><p>Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code>
+ to indicate the registration id when the registration succeeds.
</p></div>
@@ -1644,8 +1661,10 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p>Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">.INTENT_TO_GCM_REGISTRATION</a></code> to indicate which
- senders (Google API project ids) can send messages to the application.
+ <div class="jd-tagdata jd-tagdescr"><p>Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_TO_GCM_REGISTRATION">com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION</a></code>
+ to indicate which senders (Google API project ids) can send messages to
+ the application.
</p></div>
@@ -1683,7 +1702,9 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p>Type of message present in the <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">.INTENT_FROM_GCM_MESSAGE</a></code> intent.
+ <div class="jd-tagdata jd-tagdescr"><p>Type of message present in the
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_MESSAGE">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE</a></code>
+ intent.
This extra is only set for special messages sent from GCM, not for
messages originated from the application.
</p></div>
@@ -1725,7 +1746,7 @@
<div class="jd-tagdata jd-tagdescr"><p>Number of messages deleted by the server because the device was idle.
Present only on messages of special type
- <code><a href="/reference/com/google/android/gcm/GCMConstants.html#VALUE_DELETED_MESSAGES">.VALUE_DELETED_MESSAGES</a></code>
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#VALUE_DELETED_MESSAGES">com.google.android.gcm.GCMConstants.VALUE_DELETED_MESSAGES</a></code>
</p></div>
@@ -1763,8 +1784,9 @@
</div>
<div class="jd-details-descr">
- <div class="jd-tagdata jd-tagdescr"><p>Extra used on <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code> to indicate
- that the application has been unregistered.
+ <div class="jd-tagdata jd-tagdescr"><p>Extra used on
+ <code><a href="/reference/com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK">com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</a></code>
+ to indicate that the application has been unregistered.
</p></div>
diff --git a/docs/html/reference/com/google/android/gcm/GCMRegistrar.html b/docs/html/reference/com/google/android/gcm/GCMRegistrar.html
index 643260e..89f7646a 100644
--- a/docs/html/reference/com/google/android/gcm/GCMRegistrar.html
+++ b/docs/html/reference/com/google/android/gcm/GCMRegistrar.html
@@ -722,16 +722,20 @@
<div class="jd-descr">
+<p>
+ <p class="caution"><strong>
+ This class is deprecated.</strong><br/>
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+ </p>
<h2>Class Overview</h2>
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;"><strong>DEPRECATED.</strong> Please use the <a href=
-"http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html"><code>GoogleCloudMessaging</code></a> API instead.</div>
<p itemprop="articleBody">Utilities for device registration.
<p>
<strong>Note:</strong> this class uses a private <code><a href="/reference/android/content/SharedPreferences.html">SharedPreferences</a></code>
- object to keep track of the registration token.
-</p>
+ object to keep track of the registration token.</p>
diff --git a/docs/html/reference/com/google/android/gcm/package-summary.html b/docs/html/reference/com/google/android/gcm/package-summary.html
index 7ddea71..d46d1d7 100644
--- a/docs/html/reference/com/google/android/gcm/package-summary.html
+++ b/docs/html/reference/com/google/android/gcm/package-summary.html
@@ -640,6 +640,12 @@
<div id="jd-content" class="api apilevel-">
+ <div class="jd-descr">
+ <p><strong>DEPRECATED</strong> — please use the <a href="/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API instead of this client helper library — see <a href="/google/gcm/client.html">GCM Client</a> for more information.</p>
+
+
+ </div>
+
@@ -651,22 +657,42 @@
<h2>Classes</h2>
<div class="jd-sumtable">
- <table class="jd-sumtable-expando">
+ <table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-" >
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMBaseIntentService.html">GCMBaseIntentService</a></td>
- <td class="jd-descrcol" width="100%">DEPRECATED. </td>
+ <td class="jd-descrcol" width="100%"><em>
+ This class is deprecated.
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+</em> </td>
</tr>
<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMBroadcastReceiver.html">GCMBroadcastReceiver</a></td>
- <td class="jd-descrcol" width="100%">DEPRECATED. </td>
+ <td class="jd-descrcol" width="100%"><em>
+ This class is deprecated.
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+</em> </td>
</tr>
<tr class="alt-color api apilevel-" >
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMConstants.html">GCMConstants</a></td>
- <td class="jd-descrcol" width="100%">DEPRECATED. </td>
+ <td class="jd-descrcol" width="100%"><em>
+ This class is deprecated.
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+</em> </td>
</tr>
<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/GCMRegistrar.html">GCMRegistrar</a></td>
- <td class="jd-descrcol" width="100%">DEPRECATED. </td>
+ <td class="jd-descrcol" width="100%"><em>
+ This class is deprecated.
+ Please use the <a href=
+ "http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ <code>GoogleCloudMessaging</code></a> API instead.
+</em> </td>
</tr>
</table>
</div>
diff --git a/docs/html/reference/com/google/android/gcm/server/Constants.html b/docs/html/reference/com/google/android/gcm/server/Constants.html
index 48fb894..def0254 100644
--- a/docs/html/reference/com/google/android/gcm/server/Constants.html
+++ b/docs/html/reference/com/google/android/gcm/server/Constants.html
@@ -935,18 +935,33 @@
<tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Constants.html#PARAM_PAYLOAD_PREFIX">PARAM_PAYLOAD_PREFIX</a></td>
- <td class="jd-descrcol" width="100%">Prefix to HTTP parameter used to pass key-values in the message payload.</td>
+ <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Constants.html#PARAM_DRY_RUN">PARAM_DRY_RUN</a></td>
+ <td class="jd-descrcol" width="100%">HTTP parameter for telling gcm to validate the message without actually sending it.</td>
</tr>
<tr class="alt-color api apilevel-" >
<td class="jd-typecol">String</td>
+ <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Constants.html#PARAM_PAYLOAD_PREFIX">PARAM_PAYLOAD_PREFIX</a></td>
+ <td class="jd-descrcol" width="100%">Prefix to HTTP parameter used to pass key-values in the message payload.</td>
+ </tr>
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Constants.html#PARAM_REGISTRATION_ID">PARAM_REGISTRATION_ID</a></td>
<td class="jd-descrcol" width="100%">HTTP parameter for registration id.</td>
</tr>
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol">String</td>
+ <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Constants.html#PARAM_RESTRICTED_PACKAGE_NAME">PARAM_RESTRICTED_PACKAGE_NAME</a></td>
+ <td class="jd-descrcol" width="100%">HTTP parameter for package name that can be used to restrict message delivery by matching
+ against the package name used to generate the registration id.</td>
+ </tr>
+
+
<tr class=" api apilevel-" >
<td class="jd-typecol">String</td>
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Constants.html#PARAM_TIME_TO_LIVE">PARAM_TIME_TO_LIVE</a></td>
@@ -2121,6 +2136,44 @@
+<A NAME="PARAM_DRY_RUN"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+ static
+ final
+ String
+ </span>
+ PARAM_DRY_RUN
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>HTTP parameter for telling gcm to validate the message without actually sending it.
+</p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ "dry_run"
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
<A NAME="PARAM_PAYLOAD_PREFIX"></A>
<div class="jd-details api apilevel-">
@@ -2197,6 +2250,45 @@
+<A NAME="PARAM_RESTRICTED_PACKAGE_NAME"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+ static
+ final
+ String
+ </span>
+ PARAM_RESTRICTED_PACKAGE_NAME
+ </h4>
+ <div class="api-level">
+
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>HTTP parameter for package name that can be used to restrict message delivery by matching
+ against the package name used to generate the registration id.
+</p></div>
+
+
+ <div class="jd-tagdata">
+ <span class="jd-tagtitle">Constant Value: </span>
+ <span>
+
+ "restricted_package_name"
+
+ </span>
+ </div>
+
+ </div>
+</div>
+
+
+
<A NAME="PARAM_TIME_TO_LIVE"></A>
<div class="jd-details api apilevel-">
diff --git a/docs/html/reference/com/google/android/gcm/server/Message.Builder.html b/docs/html/reference/com/google/android/gcm/server/Message.Builder.html
index 5bc68e5..99b4337 100644
--- a/docs/html/reference/com/google/android/gcm/server/Message.Builder.html
+++ b/docs/html/reference/com/google/android/gcm/server/Message.Builder.html
@@ -887,6 +887,42 @@
<a href="/reference/com/google/android/gcm/server/Message.Builder.html">Message.Builder</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Message.Builder.html#dryRun(boolean)">dryRun</a></span>(boolean value)</nobr>
+
+ <div class="jd-descrdiv">Sets the dryRun property (default value is false).</div>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Message.Builder.html">Message.Builder</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Message.Builder.html#restrictedPackageName(java.lang.String)">restrictedPackageName</a></span>(String value)</nobr>
+
+ <div class="jd-descrdiv">Sets the restrictedPackageName property.</div>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Message.Builder.html">Message.Builder</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="/reference/com/google/android/gcm/server/Message.Builder.html#timeToLive(int)">timeToLive</a></span>(int value)</nobr>
<div class="jd-descrdiv">Sets the time to live, in seconds.</div>
@@ -1307,6 +1343,66 @@
</div>
+<A NAME="dryRun(boolean)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Message.Builder.html">Message.Builder</a>
+ </span>
+ <span class="sympad">dryRun</span>
+ <span class="normal">(boolean value)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the dryRun property (default value is false).
+</p></div>
+
+ </div>
+</div>
+
+
+<A NAME="restrictedPackageName(java.lang.String)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Message.Builder.html">Message.Builder</a>
+ </span>
+ <span class="sympad">restrictedPackageName</span>
+ <span class="normal">(String value)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Sets the restrictedPackageName property.
+</p></div>
+
+ </div>
+</div>
+
+
<A NAME="timeToLive(int)"></A>
<div class="jd-details api apilevel-">
diff --git a/docs/html/reference/com/google/android/gcm/server/Message.html b/docs/html/reference/com/google/android/gcm/server/Message.html
index d894aff..6531360 100644
--- a/docs/html/reference/com/google/android/gcm/server/Message.html
+++ b/docs/html/reference/com/google/android/gcm/server/Message.html
@@ -752,6 +752,8 @@
.collapseKey(collapseKey)
.timeToLive(3)
.delayWhileIdle(true)
+ .dryRun(true)
+ .restrictedPackageName(restrictedPackageName)
.build();
</pre></code>
@@ -761,6 +763,8 @@
.collapseKey(collapseKey)
.timeToLive(3)
.delayWhileIdle(true)
+ .dryRun(true)
+ .restrictedPackageName(restrictedPackageName)
.addData("key1", "value1")
.addData("key2", "value2")
.build();
@@ -888,6 +892,24 @@
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Message.html#getRestrictedPackageName()">getRestrictedPackageName</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the restricted package name.</div>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
Integer</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
@@ -899,6 +921,24 @@
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Message.html#isDelayWhileIdle()">isDelayWhileIdle</a></span>()</nobr>
+
+ <div class="jd-descrdiv">Gets the delayWhileIdle flag.</div>
+
+ </td></tr>
+
+
+
<tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
@@ -909,9 +949,9 @@
Boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/Message.html#isDelayWhileIdle()">isDelayWhileIdle</a></span>()</nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Message.html#isDryRun()">isDryRun</a></span>()</nobr>
- <div class="jd-descrdiv">Gets the delayWhileIdle flag.</div>
+ <div class="jd-descrdiv">Gets the dryRun flag.</div>
</td></tr>
@@ -1252,6 +1292,36 @@
</div>
+<A NAME="getRestrictedPackageName()"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ String
+ </span>
+ <span class="sympad">getRestrictedPackageName</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the restricted package name.
+</p></div>
+
+ </div>
+</div>
+
+
<A NAME="getTimeToLive()"></A>
<div class="jd-details api apilevel-">
@@ -1312,6 +1382,36 @@
</div>
+<A NAME="isDryRun()"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ Boolean
+ </span>
+ <span class="sympad">isDryRun</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p>Gets the dryRun flag.
+</p></div>
+
+ </div>
+</div>
+
+
<A NAME="toString()"></A>
<div class="jd-details api apilevel-">
diff --git a/docs/html/reference/com/google/android/gcm/server/MulticastResult.Builder.html b/docs/html/reference/com/google/android/gcm/server/MulticastResult.Builder.html
new file mode 100644
index 0000000..e400a43
--- /dev/null
+++ b/docs/html/reference/com/google/android/gcm/server/MulticastResult.Builder.html
@@ -0,0 +1,1288 @@
+<!DOCTYPE html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<html>
+<head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
+<title>MulticastResult.Builder | Android Developers</title>
+
+<!-- STYLESHEETS -->
+<link rel="stylesheet"
+href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
+<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
+
+
+
+<!-- JAVASCRIPT -->
+<script src="//www.google.com/jsapi" type="text/javascript"></script>
+<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
+<script type="text/javascript">
+ var toRoot = "/";
+ var devsite = false;
+</script>
+<script src="/assets/js/docs.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-5831155-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+</head>
+<body class="gc-documentation google
+ develop" itemscope itemtype="http://schema.org/Article">
+ <div id="doc-api-level" class="" style="display:none"></div>
+ <a name="top"></a>
+
+<a name="top"></a>
+
+ <!-- Header -->
+ <div id="header">
+ <div class="wrap" id="header-wrap">
+ <div class="col-3 logo">
+ <a href="/index.html">
+ <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
+ </a>
+ <div class="btn-quicknav" id="btn-quicknav">
+ <a href="#" class="arrow-inactive">Quicknav</a>
+ <a href="#" class="arrow-active">Quicknav</a>
+ </div>
+ </div>
+ <ul class="nav-x col-9">
+ <li class="design">
+ <a href="/design/index.html"
+ zh-tw-lang="設計"
+ zh-cn-lang="设计"
+ ru-lang="Проектирование"
+ ko-lang="디자인"
+ ja-lang="設計"
+ es-lang="Diseñar"
+ >Design</a></li>
+ <li class="develop"><a href="/develop/index.html"
+ zh-tw-lang="開發"
+ zh-cn-lang="开发"
+ ru-lang="Разработка"
+ ko-lang="개발"
+ ja-lang="開発"
+ es-lang="Desarrollar"
+ >Develop</a></li>
+ <li class="distribute last"><a href="/distribute/index.html"
+ zh-tw-lang="發佈"
+ zh-cn-lang="分发"
+ ru-lang="Распространение"
+ ko-lang="배포"
+ ja-lang="配布"
+ es-lang="Distribuir"
+ >Distribute</a></li>
+ </ul>
+
+ <!-- New Search -->
+ <div class="menu-container">
+ <div class="moremenu">
+ <div id="more-btn"></div>
+ </div>
+ <div class="morehover" id="moremenu">
+ <div class="top"></div>
+ <div class="mid">
+ <div class="header">Links</div>
+ <ul>
+ <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
+ <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
+ <li><a href="/about/index.html">About Android</a></li>
+ </ul>
+ <div class="header">Android Sites</div>
+ <ul>
+ <li><a href="http://www.android.com">Android.com</a></li>
+ <li class="active"><a>Android Developers</a></li>
+ <li><a href="http://source.android.com">Android Open Source Project</a></li>
+ </ul>
+
+
+
+ <div class="header">Language</div>
+ <div id="language" class="locales">
+ <select name="language" onChange="changeLangPref(this.value, true)">
+ <option value="en">English</option>
+ <option value="es">Español</option>
+ <option value="ja">日本語</option>
+ <option value="ko">한국어</option>
+ <option value="ru">Русский</option>
+ <option value="zh-cn">中文 (中国)</option>
+ <option value="zh-tw">中文 (台灣)</option>
+ </select>
+ </div>
+ <script type="text/javascript">
+ <!--
+ loadLangPref();
+ //-->
+ </script>
+
+
+
+
+ <br class="clearfix" />
+ </div>
+ <div class="bottom"></div>
+ </div>
+ <div class="search" id="search-container">
+ <div class="search-inner">
+ <div id="search-btn"></div>
+ <div class="left"></div>
+ <form onsubmit="return submit_search()">
+ <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
+onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
+onkeydown="return search_changed(event, true, '/')"
+onkeyup="return search_changed(event, false, '/')" />
+ </form>
+ <div class="right"></div>
+ <a class="close hide">close</a>
+ <div class="left"></div>
+ <div class="right"></div>
+ </div>
+ </div>
+
+ <div class="search_filtered_wrapper reference">
+ <div class="suggest-card reference no-display">
+ <ul class="search_filtered">
+ </ul>
+ </div>
+ </div>
+
+ <div class="search_filtered_wrapper docs">
+ <div class="suggest-card dummy no-display"> </div>
+ <div class="suggest-card develop no-display">
+ <ul class="search_filtered">
+ </ul>
+ <div class="child-card guides no-display">
+ </div>
+ <div class="child-card training no-display">
+ </div>
+ </div>
+ <div class="suggest-card design no-display">
+ <ul class="search_filtered">
+ </ul>
+ </div>
+ <div class="suggest-card distribute no-display">
+ <ul class="search_filtered">
+ </ul>
+ </div>
+ </div>
+
+ </div>
+ <!-- /New Search>
+
+
+ <!-- Expanded quicknav -->
+ <div id="quicknav" class="col-9">
+ <ul>
+ <li class="design">
+ <ul>
+ <li><a href="/design/index.html">Get Started</a></li>
+ <li><a href="/design/style/index.html">Style</a></li>
+ <li><a href="/design/patterns/index.html">Patterns</a></li>
+ <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
+ <li><a href="/design/downloads/index.html">Downloads</a></li>
+ <li><a href="/design/videos/index.html">Videos</a></li>
+ </ul>
+ </li>
+ <li class="develop">
+ <ul>
+ <li><a href="/training/index.html"
+ zh-tw-lang="訓練課程"
+ zh-cn-lang="培训"
+ ru-lang="Курсы"
+ ko-lang="교육"
+ ja-lang="トレーニング"
+ es-lang="Capacitación"
+ >Training</a></li>
+ <li><a href="/guide/components/index.html"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API"
+ >API Guides</a></li>
+ <li><a href="/reference/packages.html"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia"
+ >Reference</a></li>
+ <li><a href="/tools/index.html"
+ zh-tw-lang="相關工具"
+ zh-cn-lang="工具"
+ ru-lang="Инструменты"
+ ko-lang="도구"
+ ja-lang="ツール"
+ es-lang="Herramientas"
+ >Tools</a>
+ <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
+ </li>
+ <li><a href="/google/index.html">Google Services</a>
+ </li>
+ </ul>
+ </li>
+ <li class="distribute last">
+ <ul>
+ <li><a href="/distribute/index.html">Google Play</a></li>
+ <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
+ <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
+ <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
+ <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
+ <li><a href="/distribute/open.html">Open Distribution</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <!-- /Expanded quicknav -->
+ </div>
+ </div>
+ <!-- /Header -->
+
+
+ <div id="searchResults" class="wrap" style="display:none;">
+ <h2 id="searchTitle">Results</h2>
+ <div id="leftSearchControl" class="search-control">Loading...</div>
+ </div>
+
+
+
+ <!-- Secondary x-nav -->
+ <div id="nav-x">
+ <div class="wrap">
+ <ul class="nav-x col-9 develop" style="width:100%">
+ <li class="training"><a href="/training/index.html"
+ zh-tw-lang="訓練課程"
+ zh-cn-lang="培训"
+ ru-lang="Курсы"
+ ko-lang="교육"
+ ja-lang="トレーニング"
+ es-lang="Capacitación"
+ >Training</a></li>
+ <li class="guide"><a href="/guide/components/index.html"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API"
+ >API Guides</a></li>
+ <li class="reference"><a href="/reference/packages.html"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia"
+ >Reference</a></li>
+ <li class="tools"><a href="/tools/index.html"
+ zh-tw-lang="相關工具"
+ zh-cn-lang="工具"
+ ru-lang="Инструменты"
+ ko-lang="도구"
+ ja-lang="ツール"
+ es-lang="Herramientas"
+ >Tools</a></li>
+ <li class="google"><a href="/google/index.html"
+ >Google Services</a>
+ </li>
+ </ul>
+ </div>
+
+ </div>
+ <!-- /Sendondary x-nav -->
+
+
+
+
+
+
+
+
+
+ <div class="wrap clearfix" id="body-content">
+ <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <div id="devdoc-nav" class="scroll-pane">
+<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
+
+
+
+<ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/index.html">
+ <span class="en">Overview</span>
+ </a></div>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/games.html">
+ <span class="en">Games</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/location.html">
+ <span class="en">Location</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/plus.html">
+ <span class="en">Google+</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/maps.html">
+ <span class="en">Google Maps</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/auth.html">
+ <span class="en">Authorization</span>
+ </a></div>
+ </li>
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play-services/index.html">
+ <span class="en">Google Play Services</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play-services/setup.html">
+ <span class="en">Setup</span></a>
+ </li>
+ <li id="gms-tree-list" class="nav-section">
+ <div class="nav-section-header">
+ <a href="/reference/gms-packages.html">
+ <span class="en">Reference</span>
+ </a>
+ <div>
+ </li>
+ </ul>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play/billing/index.html">
+ <span class="en">Google Play In-app Billing</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play/billing/billing_overview.html">
+ <span class="en">Overview</span></a>
+ </li>
+ <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
+ <span class="en">Version 3 API</span></a></div>
+ <ul>
+ <li><a href="/google/play/billing/billing_integrate.html">
+ <span class="en">Implementing the API</span></a></li>
+ <li><a href="/google/play/billing/billing_reference.html">
+ <span class="en">Reference</span></a></li>
+ </ul>
+ </li>
+ <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
+ <span class="en">Version 2 API</span></a></div>
+ <ul>
+ <li><a href="/google/play/billing/v2/billing_integrate.html">
+ <span class="en">Implementing the API</span></a></li>
+ <li><a href="/google/play/billing/v2/billing_subscriptions.html">
+ <span class="en">Subscriptions</span></a></li>
+ <li><a href="/google/play/billing/v2/billing_reference.html">
+ <span class="en">Reference</span></a></li>
+ </ul>
+ </li>
+ <li><a href="/google/play/billing/billing_subscriptions.html">
+ <span class="en">Subscriptions</span></a>
+ </li>
+ <li><a href="/google/play/billing/billing_best_practices.html">
+ <span class="en">Security and Design</span></a>
+ </li>
+ <li><a href="/google/play/billing/billing_testing.html">
+ <span class="en">Testing In-app Billing</span></a>
+ </li>
+ <li><a href="/google/play/billing/billing_admin.html">
+ <span class="en">Administering In-app Billing</span></a>
+ </li>
+ <li><a href="/google/play/billing/gp-purchase-status-api.html">
+ <span class="en">Purchase Status API</span></a>
+ </li>
+ <li><a href="/google/play/billing/versions.html">
+ <span class="en">Version Notes</span></a>
+ </li>
+ </ul>
+ </li>
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/gcm/index.html">
+ <span class="en">Google Cloud Messaging</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/gcm/gs.html">
+ <span class="en">Getting Started</span></a>
+ </li>
+ <li><a href="/google/gcm/gcm.html">
+ <span class="en">Architectural Overview</span></a>
+ </li>
+ <li><a href="/google/gcm/ccs.html">
+ <span class="en">Cloud Connection Server</span></a>
+ </li>
+ <li><a href="/google/gcm/notifications.html">
+ <span class="en">User Notifications</span></a>
+ </li>
+ <li><a href="/google/gcm/client.html">
+ <span class="en">GCM Client</span></a>
+ </li>
+ <li><a href="/google/gcm/server.html">
+ <span class="en">GCM Server</span></a>
+ </li>
+ <li><a href="/google/gcm/adv.html">
+ <span class="en">Advanced Topics</span></a>
+ </li>
+ <li><a href="/google/gcm/c2dm.html">
+ <span class="en">Migration</span></a>
+ </li>
+ <li id="gcm-tree-list" class="nav-section">
+ <div class="nav-section-header">
+ <a href="/reference/gcm-packages.html">
+ <span class="en">Reference</span>
+ </a>
+ <div>
+ </li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play/dist.html">
+ <span class="en">Google Play Distribution</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play/filters.html">
+ <span class="en">Filters on Google Play</span></a>
+ </li>
+
+ <li><a href="/google/play/publishing/multiple-apks.html">
+ <span class="en">Multiple APK Support</span></a>
+ </li>
+ <li><a href="/google/play/expansion-files.html">
+ <span class="en">APK Expansion Files</span></a>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play/licensing/index.html">
+ <span class="en">Application Licensing</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play/licensing/overview.html">
+ <span class="en">Licensing Overview</span></a>
+ </li>
+ <li><a href="/google/play/licensing/setting-up.html">
+ <span class="en">Setting Up for Licensing</span></a>
+ </li>
+ <li><a href="/google/play/licensing/adding-licensing.html">
+ <span class="en">Adding Licensing to Your App</span></a>
+ </li>
+ <li><a href="/google/play/licensing/licensing-reference.html">
+ <span class="en">Licensing Reference</span></a>
+ </li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/backup/index.html">
+ Android Backup Service</a>
+ </div>
+ <ul>
+ <li><a href="/google/backup/signup.html">
+ Register</a>
+ </li>
+ </ul>
+ </li>
+
+ </ul>
+
+</li>
+
+
+
+</ul>
+
+<script type="text/javascript">
+<!--
+ buildToggleLists();
+ changeNavLang(getLangPref());
+//-->
+</script>
+
+
+
+
+ </div>
+ <script type="text/javascript">
+ showGoogleRefTree();
+
+ </script>
+ </div> <!-- end side-nav -->
+ <script>
+ $(document).ready(function() {
+ scrollIntoView("devdoc-nav");
+ });
+ </script>
+
+
+
+
+
+
+<div class="col-12" id="doc-col">
+
+<div id="api-info-block">
+
+
+
+
+
+
+
+
+
+
+
+<div class="sum-details-links">
+
+Summary:
+
+
+
+
+
+
+
+
+
+ <a href="#pubctors">Ctors</a>
+
+
+
+
+ | <a href="#pubmethods">Methods</a>
+
+
+
+
+ | <a href="#inhmethods">Inherited Methods</a>
+
+| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
+
+</div><!-- end sum-details-links -->
+<div class="api-level">
+
+
+
+
+</div>
+</div><!-- end api-info-block -->
+
+
+<!-- ======== START OF CLASS DATA ======== -->
+
+<div id="jd-header">
+ public
+ static
+ final
+
+ class
+<h1 itemprop="name">MulticastResult.Builder</h1>
+
+
+
+
+ extends Object<br/>
+
+
+
+
+
+
+
+
+
+</div><!-- end header -->
+
+<div id="naMessage"></div>
+
+<div id="jd-content" class="api apilevel-">
+<table class="jd-inheritance-table">
+
+
+ <tr>
+
+ <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
+ </tr>
+
+
+ <tr>
+
+ <td class="jd-inheritance-space"> ↳</td>
+
+ <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gcm.server.MulticastResult.Builder</td>
+ </tr>
+
+
+</table>
+
+
+
+
+
+
+
+<div class="jd-descr">
+
+
+
+
+
+
+</div><!-- jd-descr -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div class="jd-descr">
+
+
+<h2>Summary</h2>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
+
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ </nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#MulticastResult.Builder(int, int, int, long)">MulticastResult.Builder</a></span>(int success, int failure, int canonicalIds, long multicastId)</nobr>
+
+ </td></tr>
+
+
+
+</table>
+
+
+
+
+
+
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
+
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#addResult(com.google.android.gcm.server.Result)">addResult</a></span>(<a href="/reference/com/google/android/gcm/server/Result.html">Result</a> result)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/MulticastResult.html">MulticastResult</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#build()">build</a></span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#retryMulticastIds(java.util.List<java.lang.Long>)">retryMulticastIds</a></span>(List<Long> retryMulticastIds)</nobr>
+
+ </td></tr>
+
+
+
+</table>
+
+
+
+
+
+
+
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="inhmethods" class="jd-sumtable"><tr><th>
+ <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
+ <div style="clear:left;">Inherited Methods</div></th></tr>
+
+
+<tr class="api apilevel-" >
+<td colspan="12">
+ <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
+ ><img id="inherited-methods-java.lang.Object-trigger"
+ src="/assets/images/triangle-closed.png"
+ class="jd-expando-trigger-img" /></a>
+From class
+
+ java.lang.Object
+
+<div id="inherited-methods-java.lang.Object">
+ <div id="inherited-methods-java.lang.Object-list"
+ class="jd-inheritedlinks">
+ </div>
+ <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
+ <table class="jd-sumtable-expando">
+
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Object</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">clone</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">equals</span>(Object arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">finalize</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ Class<?></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getClass</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">hashCode</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notify</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notifyAll</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">toString</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0)</nobr>
+
+ </td></tr>
+
+
+</table>
+ </div>
+</div>
+</td></tr>
+
+
+</table>
+
+
+</div><!-- jd-descr (summary) -->
+
+<!-- Details -->
+
+
+
+
+
+
+
+
+<!-- XML Attributes -->
+
+
+<!-- Enum Values -->
+
+
+<!-- Constants -->
+
+
+<!-- Fields -->
+
+
+<!-- Public ctors -->
+
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+<h2>Public Constructors</h2>
+
+
+
+<A NAME="MulticastResult.Builder(int, int, int, long)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+
+ </span>
+ <span class="sympad">MulticastResult.Builder</span>
+ <span class="normal">(int success, int failure, int canonicalIds, long multicastId)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+
+
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+<!-- Protected ctors -->
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+<!-- Public methdos -->
+
+<h2>Public Methods</h2>
+
+
+
+<A NAME="addResult(com.google.android.gcm.server.Result)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a>
+ </span>
+ <span class="sympad">addResult</span>
+ <span class="normal">(<a href="/reference/com/google/android/gcm/server/Result.html">Result</a> result)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+<A NAME="build()"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/MulticastResult.html">MulticastResult</a>
+ </span>
+ <span class="sympad">build</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+<A NAME="retryMulticastIds(java.util.List<java.lang.Long>)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a>
+ </span>
+ <span class="sympad">retryMulticastIds</span>
+ <span class="normal">(List<Long> retryMulticastIds)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+
+
+
+<!-- ========= END OF CLASS DATA ========= -->
+<A NAME="navbar_top"></A>
+
+<div id="footer" class="wrap" >
+
+
+ <div id="copyright">
+
+ Except as noted, this content is licensed under <a
+ href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
+ For details and restrictions, see the <a href="/license.html">
+ Content License</a>.
+ </div>
+ <div id="build_info">
+
+<script src="/timestamp.js" type="text/javascript"></script>
+<script>document.write(BUILD_TIMESTAMP)</script>
+
+ </div>
+
+
+ <div id="footerlinks">
+
+ <p>
+ <a href="/about/index.html">About Android</a> |
+ <a href="/legal.html">Legal</a> |
+ <a href="/support.html">Support</a>
+ </p>
+ </div>
+
+</div> <!-- end footer -->
+</div> <!-- jd-content -->
+
+</div><!-- end doc-content -->
+
+</div> <!-- end body-content -->
+
+
+
+
+
+
+</body>
+</html>
diff --git a/docs/html/reference/com/google/android/gcm/server/MulticastResult.html b/docs/html/reference/com/google/android/gcm/server/MulticastResult.html
index 4735d75..ceeccd1 100644
--- a/docs/html/reference/com/google/android/gcm/server/MulticastResult.html
+++ b/docs/html/reference/com/google/android/gcm/server/MulticastResult.html
@@ -641,6 +641,8 @@
Summary:
+ <a href="#nestedclasses">Nested Classes</a>
+
@@ -651,7 +653,8 @@
- <a href="#pubmethods">Methods</a>
+
+ | <a href="#pubmethods">Methods</a>
@@ -763,6 +766,26 @@
+<!-- ======== NESTED CLASS SUMMARY ======== -->
+<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+ class</nobr></td>
+ <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a></td>
+ <td class="jd-descrcol" width="100%"> </td>
+ </tr>
+
+
+
+
+
diff --git a/docs/html/reference/com/google/android/gcm/server/Result.Builder.html b/docs/html/reference/com/google/android/gcm/server/Result.Builder.html
new file mode 100644
index 0000000..035d2bf
--- /dev/null
+++ b/docs/html/reference/com/google/android/gcm/server/Result.Builder.html
@@ -0,0 +1,1333 @@
+<!DOCTYPE html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<html>
+<head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
+<title>Result.Builder | Android Developers</title>
+
+<!-- STYLESHEETS -->
+<link rel="stylesheet"
+href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
+<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
+
+
+
+<!-- JAVASCRIPT -->
+<script src="//www.google.com/jsapi" type="text/javascript"></script>
+<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
+<script type="text/javascript">
+ var toRoot = "/";
+ var devsite = false;
+</script>
+<script src="/assets/js/docs.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-5831155-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+</head>
+<body class="gc-documentation google
+ develop" itemscope itemtype="http://schema.org/Article">
+ <div id="doc-api-level" class="" style="display:none"></div>
+ <a name="top"></a>
+
+<a name="top"></a>
+
+ <!-- Header -->
+ <div id="header">
+ <div class="wrap" id="header-wrap">
+ <div class="col-3 logo">
+ <a href="/index.html">
+ <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
+ </a>
+ <div class="btn-quicknav" id="btn-quicknav">
+ <a href="#" class="arrow-inactive">Quicknav</a>
+ <a href="#" class="arrow-active">Quicknav</a>
+ </div>
+ </div>
+ <ul class="nav-x col-9">
+ <li class="design">
+ <a href="/design/index.html"
+ zh-tw-lang="設計"
+ zh-cn-lang="设计"
+ ru-lang="Проектирование"
+ ko-lang="디자인"
+ ja-lang="設計"
+ es-lang="Diseñar"
+ >Design</a></li>
+ <li class="develop"><a href="/develop/index.html"
+ zh-tw-lang="開發"
+ zh-cn-lang="开发"
+ ru-lang="Разработка"
+ ko-lang="개발"
+ ja-lang="開発"
+ es-lang="Desarrollar"
+ >Develop</a></li>
+ <li class="distribute last"><a href="/distribute/index.html"
+ zh-tw-lang="發佈"
+ zh-cn-lang="分发"
+ ru-lang="Распространение"
+ ko-lang="배포"
+ ja-lang="配布"
+ es-lang="Distribuir"
+ >Distribute</a></li>
+ </ul>
+
+ <!-- New Search -->
+ <div class="menu-container">
+ <div class="moremenu">
+ <div id="more-btn"></div>
+ </div>
+ <div class="morehover" id="moremenu">
+ <div class="top"></div>
+ <div class="mid">
+ <div class="header">Links</div>
+ <ul>
+ <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
+ <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
+ <li><a href="/about/index.html">About Android</a></li>
+ </ul>
+ <div class="header">Android Sites</div>
+ <ul>
+ <li><a href="http://www.android.com">Android.com</a></li>
+ <li class="active"><a>Android Developers</a></li>
+ <li><a href="http://source.android.com">Android Open Source Project</a></li>
+ </ul>
+
+
+
+ <div class="header">Language</div>
+ <div id="language" class="locales">
+ <select name="language" onChange="changeLangPref(this.value, true)">
+ <option value="en">English</option>
+ <option value="es">Español</option>
+ <option value="ja">日本語</option>
+ <option value="ko">한국어</option>
+ <option value="ru">Русский</option>
+ <option value="zh-cn">中文 (中国)</option>
+ <option value="zh-tw">中文 (台灣)</option>
+ </select>
+ </div>
+ <script type="text/javascript">
+ <!--
+ loadLangPref();
+ //-->
+ </script>
+
+
+
+
+ <br class="clearfix" />
+ </div>
+ <div class="bottom"></div>
+ </div>
+ <div class="search" id="search-container">
+ <div class="search-inner">
+ <div id="search-btn"></div>
+ <div class="left"></div>
+ <form onsubmit="return submit_search()">
+ <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
+onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
+onkeydown="return search_changed(event, true, '/')"
+onkeyup="return search_changed(event, false, '/')" />
+ </form>
+ <div class="right"></div>
+ <a class="close hide">close</a>
+ <div class="left"></div>
+ <div class="right"></div>
+ </div>
+ </div>
+
+ <div class="search_filtered_wrapper reference">
+ <div class="suggest-card reference no-display">
+ <ul class="search_filtered">
+ </ul>
+ </div>
+ </div>
+
+ <div class="search_filtered_wrapper docs">
+ <div class="suggest-card dummy no-display"> </div>
+ <div class="suggest-card develop no-display">
+ <ul class="search_filtered">
+ </ul>
+ <div class="child-card guides no-display">
+ </div>
+ <div class="child-card training no-display">
+ </div>
+ </div>
+ <div class="suggest-card design no-display">
+ <ul class="search_filtered">
+ </ul>
+ </div>
+ <div class="suggest-card distribute no-display">
+ <ul class="search_filtered">
+ </ul>
+ </div>
+ </div>
+
+ </div>
+ <!-- /New Search>
+
+
+ <!-- Expanded quicknav -->
+ <div id="quicknav" class="col-9">
+ <ul>
+ <li class="design">
+ <ul>
+ <li><a href="/design/index.html">Get Started</a></li>
+ <li><a href="/design/style/index.html">Style</a></li>
+ <li><a href="/design/patterns/index.html">Patterns</a></li>
+ <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
+ <li><a href="/design/downloads/index.html">Downloads</a></li>
+ <li><a href="/design/videos/index.html">Videos</a></li>
+ </ul>
+ </li>
+ <li class="develop">
+ <ul>
+ <li><a href="/training/index.html"
+ zh-tw-lang="訓練課程"
+ zh-cn-lang="培训"
+ ru-lang="Курсы"
+ ko-lang="교육"
+ ja-lang="トレーニング"
+ es-lang="Capacitación"
+ >Training</a></li>
+ <li><a href="/guide/components/index.html"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API"
+ >API Guides</a></li>
+ <li><a href="/reference/packages.html"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia"
+ >Reference</a></li>
+ <li><a href="/tools/index.html"
+ zh-tw-lang="相關工具"
+ zh-cn-lang="工具"
+ ru-lang="Инструменты"
+ ko-lang="도구"
+ ja-lang="ツール"
+ es-lang="Herramientas"
+ >Tools</a>
+ <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
+ </li>
+ <li><a href="/google/index.html">Google Services</a>
+ </li>
+ </ul>
+ </li>
+ <li class="distribute last">
+ <ul>
+ <li><a href="/distribute/index.html">Google Play</a></li>
+ <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
+ <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
+ <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
+ <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
+ <li><a href="/distribute/open.html">Open Distribution</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <!-- /Expanded quicknav -->
+ </div>
+ </div>
+ <!-- /Header -->
+
+
+ <div id="searchResults" class="wrap" style="display:none;">
+ <h2 id="searchTitle">Results</h2>
+ <div id="leftSearchControl" class="search-control">Loading...</div>
+ </div>
+
+
+
+ <!-- Secondary x-nav -->
+ <div id="nav-x">
+ <div class="wrap">
+ <ul class="nav-x col-9 develop" style="width:100%">
+ <li class="training"><a href="/training/index.html"
+ zh-tw-lang="訓練課程"
+ zh-cn-lang="培训"
+ ru-lang="Курсы"
+ ko-lang="교육"
+ ja-lang="トレーニング"
+ es-lang="Capacitación"
+ >Training</a></li>
+ <li class="guide"><a href="/guide/components/index.html"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API"
+ >API Guides</a></li>
+ <li class="reference"><a href="/reference/packages.html"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia"
+ >Reference</a></li>
+ <li class="tools"><a href="/tools/index.html"
+ zh-tw-lang="相關工具"
+ zh-cn-lang="工具"
+ ru-lang="Инструменты"
+ ko-lang="도구"
+ ja-lang="ツール"
+ es-lang="Herramientas"
+ >Tools</a></li>
+ <li class="google"><a href="/google/index.html"
+ >Google Services</a>
+ </li>
+ </ul>
+ </div>
+
+ </div>
+ <!-- /Sendondary x-nav -->
+
+
+
+
+
+
+
+
+
+ <div class="wrap clearfix" id="body-content">
+ <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <div id="devdoc-nav" class="scroll-pane">
+<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
+
+
+
+<ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/index.html">
+ <span class="en">Overview</span>
+ </a></div>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/games.html">
+ <span class="en">Games</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/location.html">
+ <span class="en">Location</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/plus.html">
+ <span class="en">Google+</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/maps.html">
+ <span class="en">Google Maps</span>
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="/google/play-services/auth.html">
+ <span class="en">Authorization</span>
+ </a></div>
+ </li>
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play-services/index.html">
+ <span class="en">Google Play Services</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play-services/setup.html">
+ <span class="en">Setup</span></a>
+ </li>
+ <li id="gms-tree-list" class="nav-section">
+ <div class="nav-section-header">
+ <a href="/reference/gms-packages.html">
+ <span class="en">Reference</span>
+ </a>
+ <div>
+ </li>
+ </ul>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play/billing/index.html">
+ <span class="en">Google Play In-app Billing</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play/billing/billing_overview.html">
+ <span class="en">Overview</span></a>
+ </li>
+ <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
+ <span class="en">Version 3 API</span></a></div>
+ <ul>
+ <li><a href="/google/play/billing/billing_integrate.html">
+ <span class="en">Implementing the API</span></a></li>
+ <li><a href="/google/play/billing/billing_reference.html">
+ <span class="en">Reference</span></a></li>
+ </ul>
+ </li>
+ <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
+ <span class="en">Version 2 API</span></a></div>
+ <ul>
+ <li><a href="/google/play/billing/v2/billing_integrate.html">
+ <span class="en">Implementing the API</span></a></li>
+ <li><a href="/google/play/billing/v2/billing_subscriptions.html">
+ <span class="en">Subscriptions</span></a></li>
+ <li><a href="/google/play/billing/v2/billing_reference.html">
+ <span class="en">Reference</span></a></li>
+ </ul>
+ </li>
+ <li><a href="/google/play/billing/billing_subscriptions.html">
+ <span class="en">Subscriptions</span></a>
+ </li>
+ <li><a href="/google/play/billing/billing_best_practices.html">
+ <span class="en">Security and Design</span></a>
+ </li>
+ <li><a href="/google/play/billing/billing_testing.html">
+ <span class="en">Testing In-app Billing</span></a>
+ </li>
+ <li><a href="/google/play/billing/billing_admin.html">
+ <span class="en">Administering In-app Billing</span></a>
+ </li>
+ <li><a href="/google/play/billing/gp-purchase-status-api.html">
+ <span class="en">Purchase Status API</span></a>
+ </li>
+ <li><a href="/google/play/billing/versions.html">
+ <span class="en">Version Notes</span></a>
+ </li>
+ </ul>
+ </li>
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/gcm/index.html">
+ <span class="en">Google Cloud Messaging</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/gcm/gs.html">
+ <span class="en">Getting Started</span></a>
+ </li>
+ <li><a href="/google/gcm/gcm.html">
+ <span class="en">Architectural Overview</span></a>
+ </li>
+ <li><a href="/google/gcm/ccs.html">
+ <span class="en">Cloud Connection Server</span></a>
+ </li>
+ <li><a href="/google/gcm/notifications.html">
+ <span class="en">User Notifications</span></a>
+ </li>
+ <li><a href="/google/gcm/client.html">
+ <span class="en">GCM Client</span></a>
+ </li>
+ <li><a href="/google/gcm/server.html">
+ <span class="en">GCM Server</span></a>
+ </li>
+ <li><a href="/google/gcm/adv.html">
+ <span class="en">Advanced Topics</span></a>
+ </li>
+ <li><a href="/google/gcm/c2dm.html">
+ <span class="en">Migration</span></a>
+ </li>
+ <li id="gcm-tree-list" class="nav-section">
+ <div class="nav-section-header">
+ <a href="/reference/gcm-packages.html">
+ <span class="en">Reference</span>
+ </a>
+ <div>
+ </li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play/dist.html">
+ <span class="en">Google Play Distribution</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play/filters.html">
+ <span class="en">Filters on Google Play</span></a>
+ </li>
+
+ <li><a href="/google/play/publishing/multiple-apks.html">
+ <span class="en">Multiple APK Support</span></a>
+ </li>
+ <li><a href="/google/play/expansion-files.html">
+ <span class="en">APK Expansion Files</span></a>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/play/licensing/index.html">
+ <span class="en">Application Licensing</span></a>
+ </div>
+ <ul>
+ <li><a href="/google/play/licensing/overview.html">
+ <span class="en">Licensing Overview</span></a>
+ </li>
+ <li><a href="/google/play/licensing/setting-up.html">
+ <span class="en">Setting Up for Licensing</span></a>
+ </li>
+ <li><a href="/google/play/licensing/adding-licensing.html">
+ <span class="en">Adding Licensing to Your App</span></a>
+ </li>
+ <li><a href="/google/play/licensing/licensing-reference.html">
+ <span class="en">Licensing Reference</span></a>
+ </li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/google/backup/index.html">
+ Android Backup Service</a>
+ </div>
+ <ul>
+ <li><a href="/google/backup/signup.html">
+ Register</a>
+ </li>
+ </ul>
+ </li>
+
+ </ul>
+
+</li>
+
+
+
+</ul>
+
+<script type="text/javascript">
+<!--
+ buildToggleLists();
+ changeNavLang(getLangPref());
+//-->
+</script>
+
+
+
+
+ </div>
+ <script type="text/javascript">
+ showGoogleRefTree();
+
+ </script>
+ </div> <!-- end side-nav -->
+ <script>
+ $(document).ready(function() {
+ scrollIntoView("devdoc-nav");
+ });
+ </script>
+
+
+
+
+
+
+<div class="col-12" id="doc-col">
+
+<div id="api-info-block">
+
+
+
+
+
+
+
+
+
+
+
+<div class="sum-details-links">
+
+Summary:
+
+
+
+
+
+
+
+
+
+ <a href="#pubctors">Ctors</a>
+
+
+
+
+ | <a href="#pubmethods">Methods</a>
+
+
+
+
+ | <a href="#inhmethods">Inherited Methods</a>
+
+| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
+
+</div><!-- end sum-details-links -->
+<div class="api-level">
+
+
+
+
+</div>
+</div><!-- end api-info-block -->
+
+
+<!-- ======== START OF CLASS DATA ======== -->
+
+<div id="jd-header">
+ public
+ static
+ final
+
+ class
+<h1 itemprop="name">Result.Builder</h1>
+
+
+
+
+ extends Object<br/>
+
+
+
+
+
+
+
+
+
+</div><!-- end header -->
+
+<div id="naMessage"></div>
+
+<div id="jd-content" class="api apilevel-">
+<table class="jd-inheritance-table">
+
+
+ <tr>
+
+ <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
+ </tr>
+
+
+ <tr>
+
+ <td class="jd-inheritance-space"> ↳</td>
+
+ <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gcm.server.Result.Builder</td>
+ </tr>
+
+
+</table>
+
+
+
+
+
+
+
+<div class="jd-descr">
+
+
+
+
+
+
+</div><!-- jd-descr -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div class="jd-descr">
+
+
+<h2>Summary</h2>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
+
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ </nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#Result.Builder()">Result.Builder</a></span>()</nobr>
+
+ </td></tr>
+
+
+
+</table>
+
+
+
+
+
+
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
+
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.html">Result</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#build()">build</a></span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#canonicalRegistrationId(java.lang.String)">canonicalRegistrationId</a></span>(String value)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#errorCode(java.lang.String)">errorCode</a></span>(String value)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#messageId(java.lang.String)">messageId</a></span>(String value)</nobr>
+
+ </td></tr>
+
+
+
+</table>
+
+
+
+
+
+
+
+<!-- ========== METHOD SUMMARY =========== -->
+<table id="inhmethods" class="jd-sumtable"><tr><th>
+ <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
+ <div style="clear:left;">Inherited Methods</div></th></tr>
+
+
+<tr class="api apilevel-" >
+<td colspan="12">
+ <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
+ ><img id="inherited-methods-java.lang.Object-trigger"
+ src="/assets/images/triangle-closed.png"
+ class="jd-expando-trigger-img" /></a>
+From class
+
+ java.lang.Object
+
+<div id="inherited-methods-java.lang.Object">
+ <div id="inherited-methods-java.lang.Object-list"
+ class="jd-inheritedlinks">
+ </div>
+ <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
+ <table class="jd-sumtable-expando">
+
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ Object</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">clone</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ boolean</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">equals</span>(Object arg0)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">finalize</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ Class<?></nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">getClass</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ int</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">hashCode</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notify</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">notifyAll</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+
+ String</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">toString</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>()</nobr>
+
+ </td></tr>
+
+
+
+ <tr class=" api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
+
+ </td></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+ final
+
+
+ void</nobr>
+ </td>
+ <td class="jd-linkcol" width="100%"><nobr>
+ <span class="sympad">wait</span>(long arg0)</nobr>
+
+ </td></tr>
+
+
+</table>
+ </div>
+</div>
+</td></tr>
+
+
+</table>
+
+
+</div><!-- jd-descr (summary) -->
+
+<!-- Details -->
+
+
+
+
+
+
+
+
+<!-- XML Attributes -->
+
+
+<!-- Enum Values -->
+
+
+<!-- Constants -->
+
+
+<!-- Fields -->
+
+
+<!-- Public ctors -->
+
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+<h2>Public Constructors</h2>
+
+
+
+<A NAME="Result.Builder()"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+
+ </span>
+ <span class="sympad">Result.Builder</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+
+
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+<!-- Protected ctors -->
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+<!-- Public methdos -->
+
+<h2>Public Methods</h2>
+
+
+
+<A NAME="build()"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.html">Result</a>
+ </span>
+ <span class="sympad">build</span>
+ <span class="normal">()</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+<A NAME="canonicalRegistrationId(java.lang.String)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a>
+ </span>
+ <span class="sympad">canonicalRegistrationId</span>
+ <span class="normal">(String value)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+<A NAME="errorCode(java.lang.String)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a>
+ </span>
+ <span class="sympad">errorCode</span>
+ <span class="normal">(String value)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+<A NAME="messageId(java.lang.String)"></A>
+
+<div class="jd-details api apilevel-">
+ <h4 class="jd-details-title">
+ <span class="normal">
+ public
+
+
+
+
+ <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a>
+ </span>
+ <span class="sympad">messageId</span>
+ <span class="normal">(String value)</span>
+ </h4>
+ <div class="api-level">
+ <div></div>
+
+
+
+ </div>
+ <div class="jd-details-descr">
+
+ <div class="jd-tagdata jd-tagdescr"><p></p></div>
+
+ </div>
+</div>
+
+
+
+
+
+<!-- ========= METHOD DETAIL ======== -->
+
+
+
+<!-- ========= END OF CLASS DATA ========= -->
+<A NAME="navbar_top"></A>
+
+<div id="footer" class="wrap" >
+
+
+ <div id="copyright">
+
+ Except as noted, this content is licensed under <a
+ href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
+ For details and restrictions, see the <a href="/license.html">
+ Content License</a>.
+ </div>
+ <div id="build_info">
+
+<script src="/timestamp.js" type="text/javascript"></script>
+<script>document.write(BUILD_TIMESTAMP)</script>
+
+ </div>
+
+
+ <div id="footerlinks">
+
+ <p>
+ <a href="/about/index.html">About Android</a> |
+ <a href="/legal.html">Legal</a> |
+ <a href="/support.html">Support</a>
+ </p>
+ </div>
+
+</div> <!-- end footer -->
+</div> <!-- jd-content -->
+
+</div><!-- end doc-content -->
+
+</div> <!-- end body-content -->
+
+
+
+
+
+
+</body>
+</html>
diff --git a/docs/html/reference/com/google/android/gcm/server/Result.html b/docs/html/reference/com/google/android/gcm/server/Result.html
index bea3d39..bf004d1 100644
--- a/docs/html/reference/com/google/android/gcm/server/Result.html
+++ b/docs/html/reference/com/google/android/gcm/server/Result.html
@@ -641,6 +641,8 @@
Summary:
+ <a href="#nestedclasses">Nested Classes</a>
+
@@ -651,7 +653,8 @@
- <a href="#pubmethods">Methods</a>
+
+ | <a href="#pubmethods">Methods</a>
@@ -786,6 +789,26 @@
+<!-- ======== NESTED CLASS SUMMARY ======== -->
+<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
+
+
+
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-typecol"><nobr>
+
+
+
+
+ class</nobr></td>
+ <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></td>
+ <td class="jd-descrcol" width="100%"> </td>
+ </tr>
+
+
+
+
+
diff --git a/docs/html/reference/com/google/android/gcm/server/package-summary.html b/docs/html/reference/com/google/android/gcm/server/package-summary.html
index d4041ff..773c0b5 100644
--- a/docs/html/reference/com/google/android/gcm/server/package-summary.html
+++ b/docs/html/reference/com/google/android/gcm/server/package-summary.html
@@ -640,6 +640,12 @@
<div id="jd-content" class="api apilevel-">
+ <div class="jd-descr">
+ <p>Helper library for GCM HTTP server operations — see <a href="/google/gcm/server.html">GCM Server</a> for more information.</p>
+
+
+ </div>
+
@@ -669,9 +675,17 @@
<td class="jd-descrcol" width="100%">Result of a GCM multicast message request . </td>
</tr>
<tr class="alt-color api apilevel-" >
+ <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a></td>
+ <td class="jd-descrcol" width="100%"> </td>
+ </tr>
+ <tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Result.html">Result</a></td>
<td class="jd-descrcol" width="100%">Result of a GCM message request that returned HTTP status code 200. </td>
</tr>
+ <tr class="alt-color api apilevel-" >
+ <td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></td>
+ <td class="jd-descrcol" width="100%"> </td>
+ </tr>
<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="/reference/com/google/android/gcm/server/Sender.html">Sender</a></td>
<td class="jd-descrcol" width="100%">Helper class to send messages to the GCM service using an API Key. </td>
diff --git a/docs/html/reference/gcm-packages.html b/docs/html/reference/gcm-packages.html
index a29e371..9c6efac 100644
--- a/docs/html/reference/gcm-packages.html
+++ b/docs/html/reference/gcm-packages.html
@@ -632,22 +632,20 @@
<table class="jd-sumtable">
- <tr class="alt-color api apilevel-" >
+ <tr class="alt-color api apilevel-" >
<td class="jd-linkcol">
<a href="/reference/com/google/android/gcm/package-summary.html">com.google.android.gcm</a></td>
- <td class="jd-descrcol" width="100%"><strong>DEPRECATED.</strong> Please use the <a href=
-"http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html"><code>GoogleCloudMessaging</code></a> API instead of this client helper library. See <a href="http://developer.android.com/google/gcm/client.html">GCM Client</a> for more information.</td>
+ <td class="jd-descrcol" width="100%"><p><strong>DEPRECATED</strong> — please use the <a href="/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API instead of this client helper library — see <a href="/google/gcm/client.html">GCM Client</a> for more information.</td>
</tr>
- <tr class=" api apilevel-" >
+ <tr class=" api apilevel-" >
<td class="jd-linkcol">
<a href="/reference/com/google/android/gcm/server/package-summary.html">com.google.android.gcm.server</a></td>
- <td class="jd-descrcol" width="100%">Helper library for GCM HTTP server operations. See <a href="http://developer.android.com/google/gcm/server.html">GCM Server</a> for more information.</td>
+ <td class="jd-descrcol" width="100%"><p>Helper library for GCM HTTP server operations — see <a href="/google/gcm/server.html">GCM Server</a> for more information.</td>
</tr>
-
</table>
<div id="footer" class="wrap" >
diff --git a/docs/html/reference/gcm_lists.js b/docs/html/reference/gcm_lists.js
index 0085216..2672fab 100644
--- a/docs/html/reference/gcm_lists.js
+++ b/docs/html/reference/gcm_lists.js
@@ -1,16 +1,18 @@
var GCM_DATA = [
{ id:0, label:"com.google.android.gcm", link:"reference/com/google/android/gcm/package-summary.html", type:"package", deprecated:"false" },
- { id:1, label:"com.google.android.gcm.GCMBaseIntentService", link:"reference/com/google/android/gcm/GCMBaseIntentService.html", type:"class", deprecated:"false" },
- { id:2, label:"com.google.android.gcm.GCMBroadcastReceiver", link:"reference/com/google/android/gcm/GCMBroadcastReceiver.html", type:"class", deprecated:"false" },
- { id:3, label:"com.google.android.gcm.GCMConstants", link:"reference/com/google/android/gcm/GCMConstants.html", type:"class", deprecated:"false" },
- { id:4, label:"com.google.android.gcm.GCMRegistrar", link:"reference/com/google/android/gcm/GCMRegistrar.html", type:"class", deprecated:"false" },
+ { id:1, label:"com.google.android.gcm.GCMBaseIntentService", link:"reference/com/google/android/gcm/GCMBaseIntentService.html", type:"class", deprecated:"true" },
+ { id:2, label:"com.google.android.gcm.GCMBroadcastReceiver", link:"reference/com/google/android/gcm/GCMBroadcastReceiver.html", type:"class", deprecated:"true" },
+ { id:3, label:"com.google.android.gcm.GCMConstants", link:"reference/com/google/android/gcm/GCMConstants.html", type:"class", deprecated:"true" },
+ { id:4, label:"com.google.android.gcm.GCMRegistrar", link:"reference/com/google/android/gcm/GCMRegistrar.html", type:"class", deprecated:"true" },
{ id:5, label:"com.google.android.gcm.server", link:"reference/com/google/android/gcm/server/package-summary.html", type:"package", deprecated:"false" },
{ id:6, label:"com.google.android.gcm.server.Constants", link:"reference/com/google/android/gcm/server/Constants.html", type:"class", deprecated:"false" },
{ id:7, label:"com.google.android.gcm.server.InvalidRequestException", link:"reference/com/google/android/gcm/server/InvalidRequestException.html", type:"class", deprecated:"false" },
{ id:8, label:"com.google.android.gcm.server.Message", link:"reference/com/google/android/gcm/server/Message.html", type:"class", deprecated:"false" },
{ id:9, label:"com.google.android.gcm.server.Message.Builder", link:"reference/com/google/android/gcm/server/Message.Builder.html", type:"class", deprecated:"false" },
{ id:10, label:"com.google.android.gcm.server.MulticastResult", link:"reference/com/google/android/gcm/server/MulticastResult.html", type:"class", deprecated:"false" },
- { id:11, label:"com.google.android.gcm.server.Result", link:"reference/com/google/android/gcm/server/Result.html", type:"class", deprecated:"false" },
- { id:12, label:"com.google.android.gcm.server.Sender", link:"reference/com/google/android/gcm/server/Sender.html", type:"class", deprecated:"false" }
+ { id:11, label:"com.google.android.gcm.server.MulticastResult.Builder", link:"reference/com/google/android/gcm/server/MulticastResult.Builder.html", type:"class", deprecated:"false" },
+ { id:12, label:"com.google.android.gcm.server.Result", link:"reference/com/google/android/gcm/server/Result.html", type:"class", deprecated:"false" },
+ { id:13, label:"com.google.android.gcm.server.Result.Builder", link:"reference/com/google/android/gcm/server/Result.Builder.html", type:"class", deprecated:"false" },
+ { id:14, label:"com.google.android.gcm.server.Sender", link:"reference/com/google/android/gcm/server/Sender.html", type:"class", deprecated:"false" }
];
diff --git a/docs/html/training/graphics/opengl/motion.jd b/docs/html/training/graphics/opengl/motion.jd
index 6888235..af70de0 100644
--- a/docs/html/training/graphics/opengl/motion.jd
+++ b/docs/html/training/graphics/opengl/motion.jd
@@ -47,7 +47,7 @@
<p>Rotating a drawing object with OpenGL ES 2.0 is relatively simple. You create another
transformation matrix (a rotation matrix) and then combine it with your projection and
-camera view tranformation matrices:</p>
+camera view transformation matrices:</p>
<pre>
private float[] mRotationMatrix = new float[16];
@@ -56,7 +56,7 @@
// Create a rotation transformation for the triangle
long time = SystemClock.uptimeMillis() % 4000L;
float angle = 0.090f * ((int) time);
- Matrix.setRotateM(mRotationMatrix, 0, mAngle, 0, 0, -1.0f);
+ Matrix.setRotateM(mRotationMatrix, 0, angle, 0, 0, -1.0f);
// Combine the rotation matrix with the projection and camera view
Matrix.multiplyMM(mMVPMatrix, 0, mRotationMatrix, 0, mMVPMatrix, 0);
@@ -67,7 +67,7 @@
</pre>
<p>If your triangle does not rotate after making these changes, make sure you have commented out the
-{@link android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY GLSurfaceView.RENDERMODE_WHEN_DIRTY}
+{@link android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY GLSurfaceView.RENDERMODE_WHEN_DIRTY}
setting, as described in the next section.</p>
diff --git a/graphics/java/android/graphics/ImageFormat.java b/graphics/java/android/graphics/ImageFormat.java
index 7f2d9c1..e08ed50 100644
--- a/graphics/java/android/graphics/ImageFormat.java
+++ b/graphics/java/android/graphics/ImageFormat.java
@@ -163,14 +163,30 @@
* <p>Multi-plane Android YUV format</p>
*
* <p>This format is a generic YCbCr format, capable of describing any 4:2:0
- * chroma-subsampled planar or semiplanar buffer, with 8 bits per color
- * sample.</p>
+ * chroma-subsampled planar or semiplanar buffer (but not fully interleaved),
+ * with 8 bits per color sample.</p>
*
* <p>Images in this format are always represented by three separate buffers
* of data, one for each color plane. Additional information always
* accompanies the buffers, describing the row stride and the pixel stride
* for each plane.</p>
*
+ * <p>The order of planes in the array returned by
+ * {@link android.media.Image#getPlanes() Image#getPlanes()} is guaranteed such that
+ * plane #0 is always Y, plane #1 is always U (Cb), and plane #2 is always V (Cr).</p>
+ *
+ * <p>The Y-plane is guaranteed not to be interleaved with the U/V planes
+ * (in particular, pixel stride is always 1 in
+ * {@link android.media.Image.Plane#getPixelStride() yPlane.getPixelStride()}).</p>
+ *
+ * <p>The U/V planes are guaranteed to have the same row stride and pixel stride
+ * (in particular,
+ * {@link android.media.Image.Plane#getRowStride() uPlane.getRowStride()}
+ * == {@link android.media.Image.Plane#getRowStride() vPlane.getRowStride()} and
+ * {@link android.media.Image.Plane#getPixelStride() uPlane.getPixelStride()}
+ * == {@link android.media.Image.Plane#getPixelStride() vPlane.getPixelStride()};
+ * ).</p>
+ *
* <p>For example, the {@link android.media.Image} object can provide data
* in this format from a {@link android.hardware.camera2.CameraDevice}
* through a {@link android.media.ImageReader} object.</p>
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 5a30472..411c133 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -65,11 +65,14 @@
ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT))
LOCAL_CFLAGS += -DANDROID_ENABLE_RENDERSCRIPT
- LOCAL_SHARED_LIBRARIES += libRS libRScpp
+ LOCAL_SHARED_LIBRARIES += libRS libRScpp libstlport
LOCAL_C_INCLUDES += \
$(intermediates) \
frameworks/rs/cpp \
- frameworks/rs
+ frameworks/rs \
+ external/stlport/stlport \
+ bionic/ \
+ bionic/libstdc++/include
endif
ifndef HWUI_COMPILE_SYMBOLS
diff --git a/libs/hwui/DeferredDisplayList.h b/libs/hwui/DeferredDisplayList.h
index 33feb7e..6c5a847 100644
--- a/libs/hwui/DeferredDisplayList.h
+++ b/libs/hwui/DeferredDisplayList.h
@@ -79,7 +79,7 @@
/**
* Add a draw op into the DeferredDisplayList, reordering as needed (for performance) if
- * disallowReorder is false, respecting draw order when overlaps occur
+ * disallowReorder is false, respecting draw order when overlaps occur.
*/
void addDrawOp(OpenGLRenderer& renderer, DrawOp* op);
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index be0800f..83de651 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -180,7 +180,11 @@
*/
virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo) {}
- // returns true if bounds exist
+ /**
+ * Query the conservative, local bounds (unmapped) bounds of the op.
+ *
+ * returns true if bounds exist
+ */
virtual bool getLocalBounds(Rect& localBounds) { return false; }
// TODO: better refine localbounds usage
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 1b2f651..1700473 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -729,7 +729,7 @@
if (width * height * radius >= RS_MIN_INPUT_CUTOFF) {
uint8_t* outImage = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, width * height);
- if (mRs.get() == 0) {
+ if (mRs == 0) {
mRs = new RSC::RS();
if (!mRs->init(true, true)) {
ALOGE("blur RS failed to init");
@@ -739,11 +739,13 @@
mRsScript = new RSC::ScriptIntrinsicBlur(mRs, mRsElement);
}
- sp<const RSC::Type> t = RSC::Type::create(mRs, mRsElement, width, height, 0);
- sp<RSC::Allocation> ain = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE,
- RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, *image);
- sp<RSC::Allocation> aout = RSC::Allocation::createTyped(mRs, t, RS_ALLOCATION_MIPMAP_NONE,
- RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED, outImage);
+ RSC::sp<const RSC::Type> t = RSC::Type::create(mRs, mRsElement, width, height, 0);
+ RSC::sp<RSC::Allocation> ain = RSC::Allocation::createTyped(mRs, t,
+ RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED,
+ *image);
+ RSC::sp<RSC::Allocation> aout = RSC::Allocation::createTyped(mRs, t,
+ RS_ALLOCATION_MIPMAP_NONE, RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED,
+ outImage);
mRsScript->setRadius(radius);
mRsScript->blur(ain, aout);
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index aca47b4..aa7e776 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -35,10 +35,12 @@
#include "Properties.h"
#ifdef ANDROID_ENABLE_RENDERSCRIPT
+#include "RenderScript.h"
namespace RSC {
class Element;
class RS;
class ScriptIntrinsicBlur;
+ class sp;
}
#endif
@@ -206,9 +208,9 @@
#ifdef ANDROID_ENABLE_RENDERSCRIPT
// RS constructs
- sp<RSC::RS> mRs;
- sp<const RSC::Element> mRsElement;
- sp<RSC::ScriptIntrinsicBlur> mRsScript;
+ RSC::sp<RSC::RS> mRs;
+ RSC::sp<const RSC::Element> mRsElement;
+ RSC::sp<RSC::ScriptIntrinsicBlur> mRsScript;
#endif
static void computeGaussianWeights(float* weights, int32_t radius);
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 36be9a7..d1bae1e 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1414,6 +1414,10 @@
if (!state.mBounds.isEmpty()) {
currentMatrix.mapRect(state.mBounds);
Rect clippedBounds(state.mBounds);
+ // NOTE: if we ever want to use this clipping info to drive whether the scissor
+ // is used, it should more closely duplicate the quickReject logic (in how it uses
+ // snapToPixelBoundaries)
+
if(!clippedBounds.intersect(currentClip)) {
// quick rejected
return true;
@@ -1608,14 +1612,21 @@
}
bool OpenGLRenderer::quickRejectNoScissor(float left, float top, float right, float bottom,
- bool* clipRequired) {
+ bool snapOut, bool* clipRequired) {
if (mSnapshot->isIgnored() || bottom <= top || right <= left) {
return true;
}
Rect r(left, top, right, bottom);
currentTransform().mapRect(r);
- r.snapToPixelBoundaries();
+
+ if (snapOut) {
+ // snapOut is generally used to account for 1 pixel ramp (in window coordinates)
+ // outside of the provided rect boundaries in tessellated AA geometry
+ r.snapOutToPixelBoundaries();
+ } else {
+ r.snapToPixelBoundaries();
+ }
Rect clipRect(*mSnapshot->clipRect);
clipRect.snapToPixelBoundaries();
@@ -1628,17 +1639,21 @@
bool OpenGLRenderer::quickRejectPreStroke(float left, float top, float right, float bottom,
SkPaint* paint) {
+ // AA geometry will likely have a ramp around it (not accounted for in local bounds). Snap out
+ // the final mapped rect to ensure correct clipping behavior for the ramp.
+ bool snapOut = paint->isAntiAlias();
+
if (paint->getStyle() != SkPaint::kFill_Style) {
float outset = paint->getStrokeWidth() * 0.5f;
- return quickReject(left - outset, top - outset, right + outset, bottom + outset);
+ return quickReject(left - outset, top - outset, right + outset, bottom + outset, snapOut);
} else {
- return quickReject(left, top, right, bottom);
+ return quickReject(left, top, right, bottom, snapOut);
}
}
-bool OpenGLRenderer::quickReject(float left, float top, float right, float bottom) {
+bool OpenGLRenderer::quickReject(float left, float top, float right, float bottom, bool snapOut) {
bool clipRequired = false;
- if (quickRejectNoScissor(left, top, right, bottom, &clipRequired)) {
+ if (quickRejectNoScissor(left, top, right, bottom, snapOut, &clipRequired)) {
return true;
}
@@ -3058,7 +3073,7 @@
bool clipRequired = false;
const bool rejected = quickRejectNoScissor(x, y,
- x + layer->layer.getWidth(), y + layer->layer.getHeight(), &clipRequired);
+ x + layer->layer.getWidth(), y + layer->layer.getHeight(), false, &clipRequired);
if (rejected) {
if (transform && !transform->isIdentity()) {
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index eb42540..2f8a2f0 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -256,14 +256,15 @@
ANDROID_API const Rect& getClipBounds();
/**
- * Performs a quick reject but adjust the bounds to account for stroke width if necessary
+ * Performs a quick reject but adjust the bounds to account for stroke width if necessary,
+ * and handling snapOut for AA geometry.
*/
bool quickRejectPreStroke(float left, float top, float right, float bottom, SkPaint* paint);
/**
* Returns false and sets scissor based upon bounds if drawing won't be clipped out
*/
- bool quickReject(float left, float top, float right, float bottom);
+ bool quickReject(float left, float top, float right, float bottom, bool snapOut = false);
bool quickReject(const Rect& bounds) {
return quickReject(bounds.left, bounds.top, bounds.right, bounds.bottom);
}
@@ -273,7 +274,7 @@
* clipRequired will be only set if not rejected
*/
ANDROID_API bool quickRejectNoScissor(float left, float top, float right, float bottom,
- bool* clipRequired = NULL);
+ bool snapOut = false, bool* clipRequired = NULL);
bool quickRejectNoScissor(const Rect& bounds, bool* clipRequired = NULL) {
return quickRejectNoScissor(bounds.left, bounds.top, bounds.right, bounds.bottom,
clipRequired);
@@ -340,6 +341,12 @@
SkPaint* filterPaint(SkPaint* paint);
+ /**
+ * Store the current display state (most importantly, the current clip and transform), and
+ * additionally map the state's bounds from local to window coordinates.
+ *
+ * Returns true if quick-rejected
+ */
bool storeDisplayState(DeferredDisplayState& state, int stateDeferFlags);
void restoreDisplayState(const DeferredDisplayState& state, bool skipClipRestore = false);
void setupMergedMultiDraw(const Rect* clipRect);
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index 7531769..7605307 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -170,6 +170,20 @@
bottom += delta;
}
+ /**
+ * Similar to snapToPixelBoundaries, but used for AA geometry with a ramp perimeter.
+ *
+ * We inset the data by a fudge factor of slightly over 1/16 (similar to when drawing non-AA
+ * lines) before rounding out so that insignificant amounts of ramp geometry (esp. from rounding
+ * errors) are ignored.
+ */
+ void snapOutToPixelBoundaries() {
+ left = floorf(left + 0.065f);
+ top = floorf(top + 0.065f);
+ right = ceilf(right - 0.065f);
+ bottom = ceilf(bottom - 0.065f);
+ }
+
void snapToPixelBoundaries() {
left = floorf(left + 0.5f);
top = floorf(top + 0.5f);
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index ced5a90..aa3c530 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -17,8 +17,6 @@
package android.media;
import java.lang.ref.WeakReference;
-import java.lang.IllegalArgumentException;
-import java.lang.IllegalStateException;
import java.nio.ByteBuffer;
import android.os.Handler;
@@ -255,19 +253,17 @@
// audio source
if ( (audioSource < MediaRecorder.AudioSource.DEFAULT) ||
(audioSource > MediaRecorder.getAudioSourceMax()) ) {
- throw (new IllegalArgumentException("Invalid audio source."));
- } else {
- mRecordSource = audioSource;
+ throw new IllegalArgumentException("Invalid audio source.");
}
+ mRecordSource = audioSource;
//--------------
// sample rate
if ( (sampleRateInHz < 4000) || (sampleRateInHz > 48000) ) {
- throw (new IllegalArgumentException(sampleRateInHz
- + "Hz is not a supported sample rate."));
- } else {
- mSampleRate = sampleRateInHz;
+ throw new IllegalArgumentException(sampleRateInHz
+ + "Hz is not a supported sample rate.");
}
+ mSampleRate = sampleRateInHz;
//--------------
// channel config
@@ -288,9 +284,7 @@
mChannelMask = channelConfig;
break;
default:
- mChannelCount = 0;
- mChannelMask = AudioFormat.CHANNEL_INVALID;
- throw (new IllegalArgumentException("Unsupported channel configuration."));
+ throw new IllegalArgumentException("Unsupported channel configuration.");
}
//--------------
@@ -304,9 +298,8 @@
mAudioFormat = audioFormat;
break;
default:
- mAudioFormat = AudioFormat.ENCODING_INVALID;
- throw (new IllegalArgumentException("Unsupported sample encoding."
- + " Should be ENCODING_PCM_8BIT or ENCODING_PCM_16BIT."));
+ throw new IllegalArgumentException("Unsupported sample encoding."
+ + " Should be ENCODING_PCM_8BIT or ENCODING_PCM_16BIT.");
}
}
@@ -323,7 +316,7 @@
int frameSizeInBytes = mChannelCount
* (mAudioFormat == AudioFormat.ENCODING_PCM_8BIT ? 1 : 2);
if ((audioBufferSize % frameSizeInBytes != 0) || (audioBufferSize < 1)) {
- throw (new IllegalArgumentException("Invalid audio buffer size."));
+ throw new IllegalArgumentException("Invalid audio buffer size.");
}
mNativeBufferSizeInBytes = audioBufferSize;
@@ -508,8 +501,8 @@
public void startRecording()
throws IllegalStateException {
if (mState != STATE_INITIALIZED) {
- throw(new IllegalStateException("startRecording() called on an "
- +"uninitialized AudioRecord."));
+ throw new IllegalStateException("startRecording() called on an "
+ + "uninitialized AudioRecord.");
}
// start recording
@@ -530,8 +523,8 @@
public void startRecording(MediaSyncEvent syncEvent)
throws IllegalStateException {
if (mState != STATE_INITIALIZED) {
- throw(new IllegalStateException("startRecording() called on an "
- +"uninitialized AudioRecord."));
+ throw new IllegalStateException("startRecording() called on an "
+ + "uninitialized AudioRecord.");
}
// start recording
@@ -549,7 +542,7 @@
public void stop()
throws IllegalStateException {
if (mState != STATE_INITIALIZED) {
- throw(new IllegalStateException("stop() called on an uninitialized AudioRecord."));
+ throw new IllegalStateException("stop() called on an uninitialized AudioRecord.");
}
// stop recording
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 7322716..c8dffcd 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -371,18 +371,16 @@
&& (streamType != AudioManager.STREAM_BLUETOOTH_SCO)
&& (streamType != AudioManager.STREAM_DTMF)) {
throw new IllegalArgumentException("Invalid stream type.");
- } else {
- mStreamType = streamType;
}
+ mStreamType = streamType;
//--------------
// sample rate, note these values are subject to change
if ( (sampleRateInHz < 4000) || (sampleRateInHz > 48000) ) {
throw new IllegalArgumentException(sampleRateInHz
+ "Hz is not a supported sample rate.");
- } else {
- mSampleRate = sampleRateInHz;
}
+ mSampleRate = sampleRateInHz;
//--------------
// channel config
@@ -403,14 +401,10 @@
default:
if (!isMultichannelConfigSupported(channelConfig)) {
// input channel configuration features unsupported channels
- mChannelCount = 0;
- mChannels = AudioFormat.CHANNEL_INVALID;
- mChannelConfiguration = AudioFormat.CHANNEL_INVALID;
throw new IllegalArgumentException("Unsupported channel configuration.");
- } else {
- mChannels = channelConfig;
- mChannelCount = Integer.bitCount(channelConfig);
}
+ mChannels = channelConfig;
+ mChannelCount = Integer.bitCount(channelConfig);
}
//--------------
@@ -424,7 +418,6 @@
mAudioFormat = audioFormat;
break;
default:
- mAudioFormat = AudioFormat.ENCODING_INVALID;
throw new IllegalArgumentException("Unsupported sample encoding."
+ " Should be ENCODING_PCM_8BIT or ENCODING_PCM_16BIT.");
}
@@ -433,9 +426,8 @@
// audio load mode
if ( (mode != MODE_STREAM) && (mode != MODE_STATIC) ) {
throw new IllegalArgumentException("Invalid mode.");
- } else {
- mDataLoadMode = mode;
}
+ mDataLoadMode = mode;
}
/**
diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java
index 06d43a2..761ecca 100644
--- a/media/java/android/media/MediaFile.java
+++ b/media/java/android/media/MediaFile.java
@@ -28,6 +28,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
/**
* MediaScanner helper class.
@@ -276,10 +277,10 @@
}
public static MediaFileType getFileType(String path) {
- int lastDot = path.lastIndexOf(".");
+ int lastDot = path.lastIndexOf('.');
if (lastDot < 0)
return null;
- return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase());
+ return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase(Locale.ROOT));
}
public static boolean isMimeTypeMedia(String mimeType) {
@@ -325,7 +326,7 @@
}
int lastDot = fileName.lastIndexOf('.');
if (lastDot > 0) {
- String extension = fileName.substring(lastDot + 1).toUpperCase();
+ String extension = fileName.substring(lastDot + 1).toUpperCase(Locale.ROOT);
Integer value = sFileTypeToFormatMap.get(extension);
if (value != null) {
return value.intValue();
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 726e6de..de3041e 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -540,7 +540,7 @@
if (noMedia) {
result = endFile(entry, false, false, false, false, false);
} else {
- String lowpath = path.toLowerCase();
+ String lowpath = path.toLowerCase(Locale.ROOT);
boolean ringtones = (lowpath.indexOf(RINGTONES_DIR) > 0);
boolean notifications = (lowpath.indexOf(NOTIFICATIONS_DIR) > 0);
boolean alarms = (lowpath.indexOf(ALARMS_DIR) > 0);
diff --git a/media/mca/filterpacks/java/android/filterpacks/text/ToUpperCase.java b/media/mca/filterpacks/java/android/filterpacks/text/ToUpperCase.java
index 0cf3477..5ff0af1 100644
--- a/media/mca/filterpacks/java/android/filterpacks/text/ToUpperCase.java
+++ b/media/mca/filterpacks/java/android/filterpacks/text/ToUpperCase.java
@@ -23,6 +23,8 @@
import android.filterfw.core.FrameFormat;
import android.filterfw.format.ObjectFormat;
+import java.util.Locale;
+
/**
* @hide
*/
@@ -47,7 +49,7 @@
String inputString = (String)input.getObjectValue();
Frame output = env.getFrameManager().newFrame(mOutputFormat);
- output.setObjectValue(inputString.toUpperCase());
+ output.setObjectValue(inputString.toUpperCase(Locale.getDefault()));
pushOutput("uppercase", output);
}
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
index ef69c44..b288984 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
@@ -37,6 +37,7 @@
import java.io.File;
import java.util.Date;
+import java.util.Locale;
/**
* A view to display the properties of an object.
@@ -120,7 +121,7 @@
mFileName = info.getName();
view.setText(mFileName);
view = (TextView)findViewById(R.id.format);
- view.setText(Integer.toHexString(info.getFormat()).toUpperCase());
+ view.setText(Integer.toHexString(info.getFormat()).toUpperCase(Locale.ROOT));
view = (TextView)findViewById(R.id.size);
view.setText(Long.toString(info.getCompressedSize()));
view = (TextView)findViewById(R.id.thumb_width);
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
index 4053666..9057f60 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
@@ -142,7 +142,7 @@
}
}
- static class DummyCameraDeviceCallbacks extends DummyBase implements ICameraDeviceCallbacks {
+ static class DummyCameraDeviceCallbacks extends ICameraDeviceCallbacks.Stub {
@Override
public void notifyCallback(int msgType, int ext1, int ext2) throws RemoteException {
@@ -172,7 +172,7 @@
}
}
- static class DummyCameraServiceListener extends DummyBase implements ICameraServiceListener {
+ static class DummyCameraServiceListener extends ICameraServiceListener.Stub {
@Override
public void onStatusChanged(int status, int cameraId)
throws RemoteException {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
index acd76d5..bdf14ff 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
@@ -31,19 +31,30 @@
import static android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW;
import com.android.mediaframeworktest.MediaFrameworkIntegrationTestRunner;
-import com.android.mediaframeworktest.integration.CameraBinderTest.DummyBase;
+
+import org.mockito.ArgumentMatcher;
+import static org.mockito.Mockito.*;
public class CameraDeviceBinderTest extends AndroidTestCase {
private static String TAG = "CameraDeviceBinderTest";
+ // Number of streaming callbacks need to check.
+ private static int NUM_CALLBACKS_CHECKED = 10;
+ // Wait for capture result timeout value: 1000ms
+ private final static int WAIT_FOR_COMPLETE_TIMEOUT_MS = 1000;
private int mCameraId;
private ICameraDeviceUser mCameraUser;
private CameraBinderTestUtils mUtils;
+ private ICameraDeviceCallbacks.Stub mMockCb;
+ private Surface mSurface;
+ // Need hold a Surfacetexture reference during a test execution, otherwise,
+ // it could be GCed during a test, which causes camera run into bad state.
+ private SurfaceTexture mSurfaceTexture;
public CameraDeviceBinderTest() {
}
- static class DummyCameraDeviceCallbacks extends DummyBase implements ICameraDeviceCallbacks {
+ public class DummyCameraDeviceCallbacks extends ICameraDeviceCallbacks.Stub {
@Override
public void notifyCallback(int msgType, int ext1, int ext2) throws RemoteException {
@@ -54,23 +65,74 @@
}
}
+ class IsMetadataNotEmpty extends ArgumentMatcher<CameraMetadata> {
+ public boolean matches(Object obj) {
+ return !((CameraMetadata) obj).isEmpty();
+ }
+ }
+
+ private void createDefaultSurface() {
+ mSurfaceTexture = new SurfaceTexture(/* ignored */0);
+ mSurfaceTexture.setDefaultBufferSize(640, 480);
+ mSurface = new Surface(mSurfaceTexture);
+ }
+
+ private CaptureRequest createDefaultRequest(boolean needStream) throws Exception {
+ CameraMetadata metadata = new CameraMetadata();
+ assertTrue(metadata.isEmpty());
+
+ CaptureRequest request = new CaptureRequest();
+ assertTrue(request.isEmpty());
+
+ int status = mCameraUser.createDefaultRequest(TEMPLATE_PREVIEW, /* out */metadata);
+ assertEquals(CameraBinderTestUtils.NO_ERROR, status);
+ assertFalse(metadata.isEmpty());
+
+ request.swap(metadata);
+ assertFalse(request.isEmpty());
+ assertTrue(metadata.isEmpty());
+ if (needStream) {
+ int streamId = mCameraUser.createStream(/* ignored */10, /* ignored */20,
+ /* ignored */30, mSurface);
+ assertEquals(0, streamId);
+ request.addTarget(mSurface);
+ }
+ return request;
+ }
+
+ private int submitCameraRequest(CaptureRequest request, boolean streaming) throws Exception {
+ int requestId = mCameraUser.submitRequest(request, streaming);
+ assertTrue("Request IDs should be non-negative", requestId >= 0);
+ return requestId;
+ }
+
@Override
protected void setUp() throws Exception {
super.setUp();
+ /**
+ * Workaround for mockito and JB-MR2 incompatibility
+ *
+ * Avoid java.lang.IllegalArgumentException: dexcache == null
+ * https://code.google.com/p/dexmaker/issues/detail?id=2
+ */
+ System.setProperty("dexmaker.dexcache", getContext().getCacheDir().toString());
mUtils = new CameraBinderTestUtils(getContext());
// This cannot be set in the constructor, since the onCreate isn't
// called yet
mCameraId = MediaFrameworkIntegrationTestRunner.mCameraId;
- ICameraDeviceCallbacks dummyCallbacks = new DummyCameraDeviceCallbacks();
+ ICameraDeviceCallbacks.Stub dummyCallbacks = new DummyCameraDeviceCallbacks();
String clientPackageName = getContext().getPackageName();
- mCameraUser = mUtils.getCameraService().connectDevice(dummyCallbacks, mCameraId,
+ mMockCb = spy(dummyCallbacks);
+
+ mCameraUser = mUtils.getCameraService().connectDevice(mMockCb, mCameraId,
clientPackageName, CameraBinderTestUtils.USE_CALLING_UID);
assertNotNull(String.format("Camera %s was null", mCameraId), mCameraUser);
+ createDefaultSurface();
Log.v(TAG, String.format("Camera %s connected", mCameraId));
}
@@ -79,6 +141,8 @@
protected void tearDown() throws Exception {
mCameraUser.disconnect();
mCameraUser = null;
+ mSurface.release();
+ mSurfaceTexture.release();
}
@SmallTest
@@ -95,17 +159,12 @@
@SmallTest
public void testCreateStream() throws Exception {
- SurfaceTexture surfaceTexture = new SurfaceTexture(/* ignored */0);
- surfaceTexture.setDefaultBufferSize(640, 480);
- Surface surface = new Surface(surfaceTexture);
-
int streamId = mCameraUser.createStream(/* ignored */10, /* ignored */20, /* ignored */30,
- surface);
-
+ mSurface);
assertEquals(0, streamId);
assertEquals(CameraBinderTestUtils.ALREADY_EXISTS,
- mCameraUser.createStream(/* ignored */0, /* ignored */0, /* ignored */0, surface));
+ mCameraUser.createStream(/* ignored */0, /* ignored */0, /* ignored */0, mSurface));
assertEquals(CameraBinderTestUtils.NO_ERROR, mCameraUser.deleteStream(streamId));
}
@@ -122,32 +181,23 @@
public void testCreateStreamTwo() throws Exception {
// Create first stream
-
- SurfaceTexture surfaceTexture = new SurfaceTexture(/* ignored */0);
- surfaceTexture.setDefaultBufferSize(640, 480);
- Surface surface = new Surface(surfaceTexture);
-
int streamId = mCameraUser.createStream(/* ignored */0, /* ignored */0, /* ignored */0,
- surface);
-
+ mSurface);
assertEquals(0, streamId);
assertEquals(CameraBinderTestUtils.ALREADY_EXISTS,
- mCameraUser.createStream(/* ignored */0, /* ignored */0, /* ignored */0, surface));
+ mCameraUser.createStream(/* ignored */0, /* ignored */0, /* ignored */0, mSurface));
- // Create second stream.
-
- SurfaceTexture surfaceTexture2 = new SurfaceTexture(/* ignored */0);
- surfaceTexture2.setDefaultBufferSize(640, 480);
- Surface surface2 = new Surface(surfaceTexture2);
+ // Create second stream with a different surface.
+ SurfaceTexture surfaceTexture = new SurfaceTexture(/* ignored */0);
+ surfaceTexture.setDefaultBufferSize(640, 480);
+ Surface surface2 = new Surface(surfaceTexture);
int streamId2 = mCameraUser.createStream(/* ignored */0, /* ignored */0, /* ignored */0,
surface2);
-
assertEquals(1, streamId2);
// Clean up streams
-
assertEquals(CameraBinderTestUtils.NO_ERROR, mCameraUser.deleteStream(streamId));
assertEquals(CameraBinderTestUtils.NO_ERROR, mCameraUser.deleteStream(streamId2));
}
@@ -155,131 +205,47 @@
@SmallTest
public void testSubmitBadRequest() throws Exception {
- CameraMetadata metadata = new CameraMetadata();
- assertTrue(metadata.isEmpty());
-
- CaptureRequest request = new CaptureRequest();
- assertTrue(request.isEmpty());
-
- int status = mCameraUser.createDefaultRequest(TEMPLATE_PREVIEW, /* out */metadata);
- assertEquals(CameraBinderTestUtils.NO_ERROR, status);
- assertFalse(metadata.isEmpty());
-
- request.swap(metadata);
- assertFalse(request.isEmpty());
- assertTrue(metadata.isEmpty());
-
- status = mCameraUser.submitRequest(request, /* streaming */false);
+ CaptureRequest request = createDefaultRequest(/* needStream */false);
+ int status = mCameraUser.submitRequest(request, /* streaming */false);
assertEquals("Expected submitRequest to return BAD_VALUE " +
"since we had 0 surface targets set.", CameraBinderTestUtils.BAD_VALUE, status);
- SurfaceTexture surfaceTexture = new SurfaceTexture(/* ignored */0);
- surfaceTexture.setDefaultBufferSize(640, 480);
- Surface surface = new Surface(surfaceTexture);
- request.addTarget(surface);
-
+ request.addTarget(mSurface);
status = mCameraUser.submitRequest(request, /* streaming */false);
assertEquals("Expected submitRequest to return BAD_VALUE since " +
"the target surface wasn't registered with createStream.",
CameraBinderTestUtils.BAD_VALUE, status);
request.close();
- metadata.close();
- surface.release();
}
@SmallTest
public void testSubmitGoodRequest() throws Exception {
- CameraMetadata metadata = new CameraMetadata();
- assertTrue(metadata.isEmpty());
-
- CaptureRequest request = new CaptureRequest();
- assertTrue(request.isEmpty());
-
- // Create default request from template.
-
- int status = mCameraUser.createDefaultRequest(TEMPLATE_PREVIEW, /* out */metadata);
- assertEquals(CameraBinderTestUtils.NO_ERROR, status);
- assertFalse(metadata.isEmpty());
-
- request.swap(metadata);
- assertFalse(request.isEmpty());
- assertTrue(metadata.isEmpty());
-
- SurfaceTexture surfaceTexture = new SurfaceTexture(/* ignored */0);
- surfaceTexture.setDefaultBufferSize(640, 480);
- Surface surface = new Surface(surfaceTexture);
-
- // Create stream first. Pre-requisite to submitting a request using that
- // stream.
-
- int streamId = mCameraUser.createStream(/* ignored */10, /* ignored */20, /* ignored */30,
- surface);
- assertEquals(0, streamId);
-
- request.addTarget(surface);
+ CaptureRequest request = createDefaultRequest(/* needStream */true);
// Submit valid request twice.
-
- int requestId1;
- requestId1 = mCameraUser.submitRequest(request, /* streaming */false);
- assertTrue("Request IDs should be non-negative", requestId1 >= 0);
-
- int requestId2 = mCameraUser.submitRequest(request, /* streaming */false);
- assertTrue("Request IDs should be non-negative", requestId2 >= 0);
+ int requestId1 = submitCameraRequest(request, /* streaming */false);
+ int requestId2 = submitCameraRequest(request, /* streaming */false);
assertNotSame("Request IDs should be unique for multiple requests", requestId1, requestId2);
- surface.release();
request.close();
- metadata.close();
}
@SmallTest
public void testSubmitStreamingRequest() throws Exception {
- CameraMetadata metadata = new CameraMetadata();
- assertTrue(metadata.isEmpty());
-
- CaptureRequest request = new CaptureRequest();
- assertTrue(request.isEmpty());
-
- // Create default request from template.
-
- int status = mCameraUser.createDefaultRequest(TEMPLATE_PREVIEW, /* out */metadata);
- assertEquals(CameraBinderTestUtils.NO_ERROR, status);
- assertFalse(metadata.isEmpty());
-
- request.swap(metadata);
- assertFalse(request.isEmpty());
- assertTrue(metadata.isEmpty());
-
- SurfaceTexture surfaceTexture = new SurfaceTexture(/* ignored */0);
- surfaceTexture.setDefaultBufferSize(640, 480);
- Surface surface = new Surface(surfaceTexture);
-
- // Create stream first. Pre-requisite to submitting a request using that
- // stream.
-
- int streamId = mCameraUser.createStream(/* ignored */10, /* ignored */20, /* ignored */30,
- surface);
- assertEquals(0, streamId);
-
- request.addTarget(surface);
+ CaptureRequest request = createDefaultRequest(/* needStream */true);
// Submit valid request once (non-streaming), and another time
// (streaming)
+ int requestId1 = submitCameraRequest(request, /* streaming */false);
- int requestId1;
- requestId1 = mCameraUser.submitRequest(request, /* streaming */false);
- assertTrue("Request IDs should be non-negative", requestId1 >= 0);
-
- int requestIdStreaming = mCameraUser.submitRequest(request, /* streaming */true);
- assertTrue("Request IDs should be non-negative", requestIdStreaming >= 0);
+ int requestIdStreaming = submitCameraRequest(request, /* streaming */true);
assertNotSame("Request IDs should be unique for multiple requests", requestId1,
requestIdStreaming);
- status = mCameraUser.cancelRequest(-1);
+ int status = mCameraUser.cancelRequest(-1);
assertEquals("Invalid request IDs should not be cancellable",
CameraBinderTestUtils.BAD_VALUE, status);
@@ -291,9 +257,7 @@
assertEquals("Streaming request IDs should be cancellable", CameraBinderTestUtils.NO_ERROR,
status);
- surface.release();
request.close();
- metadata.close();
}
@SmallTest
@@ -309,39 +273,11 @@
@SmallTest
public void testWaitUntilIdle() throws Exception {
- CameraMetadata metadata = new CameraMetadata();
- assertTrue(metadata.isEmpty());
-
- CaptureRequest request = new CaptureRequest();
- assertTrue(request.isEmpty());
-
- // Create default request from template.
- int status = mCameraUser.createDefaultRequest(TEMPLATE_PREVIEW, /* out */metadata);
- assertEquals(CameraBinderTestUtils.NO_ERROR, status);
- assertFalse(metadata.isEmpty());
-
- request.swap(metadata);
- assertFalse(request.isEmpty());
- assertTrue(metadata.isEmpty());
-
- SurfaceTexture surfaceTexture = new SurfaceTexture(/* ignored */0);
- surfaceTexture.setDefaultBufferSize(640, 480);
- Surface surface = new Surface(surfaceTexture);
-
- // Create stream first. Pre-requisite to submitting a request using that
- // stream.
-
- int streamId = mCameraUser.createStream(/* ignored */10, /* ignored */20, /* ignored */30,
- surface);
- assertEquals(0, streamId);
-
- request.addTarget(surface);
-
- int requestIdStreaming = mCameraUser.submitRequest(request, /* streaming */true);
- assertTrue("Request IDs should be non-negative", requestIdStreaming >= 0);
+ CaptureRequest request = createDefaultRequest(/* needStream */true);
+ int requestIdStreaming = submitCameraRequest(request, /* streaming */true);
// Test Bad case first: waitUntilIdle when there is active repeating request
- status = mCameraUser.waitUntilIdle();
+ int status = mCameraUser.waitUntilIdle();
assertEquals("waitUntilIdle is invalid operation when there is active repeating request",
CameraBinderTestUtils.INVALID_OPERATION, status);
@@ -352,4 +288,22 @@
assertEquals(CameraBinderTestUtils.NO_ERROR, status);
}
+ @SmallTest
+ public void testCaptureResultCallbacks() throws Exception {
+ IsMetadataNotEmpty matcher = new IsMetadataNotEmpty();
+ CaptureRequest request = createDefaultRequest(/* needStream */true);
+
+ // Test both single request and streaming request.
+ int requestId1 = submitCameraRequest(request, /* streaming */false);
+ verify(mMockCb, timeout(WAIT_FOR_COMPLETE_TIMEOUT_MS).times(1)).onResultReceived(
+ eq(requestId1),
+ argThat(matcher));
+
+ int streamingId = submitCameraRequest(request, /* streaming */true);
+ verify(mMockCb, timeout(WAIT_FOR_COMPLETE_TIMEOUT_MS).atLeast(NUM_CALLBACKS_CHECKED))
+ .onResultReceived(
+ eq(streamingId),
+ argThat(matcher));
+ request.close();
+ }
}
diff --git a/packages/DocumentsUI/AndroidManifest.xml b/packages/DocumentsUI/AndroidManifest.xml
index 453ef45..b88099e 100644
--- a/packages/DocumentsUI/AndroidManifest.xml
+++ b/packages/DocumentsUI/AndroidManifest.xml
@@ -21,6 +21,11 @@
</intent-filter>
</activity>
+ <provider
+ android:name=".RecentsProvider"
+ android:authorities="com.android.documentsui.recents"
+ android:exported="false" />
+
<!-- TODO: remove when we have real clients -->
<activity android:name=".TestActivity" android:enabled="false">
<intent-filter>
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
index 1f22613..2740e53 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
@@ -59,23 +59,29 @@
public class DirectoryFragment extends Fragment {
// TODO: show storage backend in item views when requested
+ // TODO: apply sort order locally
+ // TODO: apply MIME filtering locally
private ListView mListView;
private GridView mGridView;
private AbsListView mCurrentView;
+ private static final int TYPE_NORMAL = 1;
+ private static final int TYPE_SEARCH = 2;
+ private static final int TYPE_RECENT_OPEN = 3;
+ private static final int TYPE_RECENT_CREATE = 4;
+
+ private int mType = TYPE_NORMAL;
+
private DocumentsAdapter mAdapter;
private LoaderCallbacks<Cursor> mCallbacks;
- private int mFlags;
-
private static final String EXTRA_URI = "uri";
private static final int LOADER_DOCUMENTS = 2;
- public static void show(
- FragmentManager fm, Uri uri, String displayName, boolean addToBackStack) {
+ public static void show(FragmentManager fm, Uri uri) {
final Bundle args = new Bundle();
args.putParcelable(EXTRA_URI, uri);
@@ -84,10 +90,6 @@
final FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.directory, fragment);
- if (addToBackStack) {
- ft.addToBackStack(displayName);
- }
- ft.setBreadCrumbTitle(displayName);
ft.commitAllowingStateLoss();
}
@@ -115,9 +117,17 @@
mAdapter = new DocumentsAdapter(context);
updateMode();
- // TODO: migrate flags query to loader
final Uri uri = getArguments().getParcelable(EXTRA_URI);
- mFlags = getDocumentFlags(context, uri);
+
+ if (uri.getQueryParameter(DocumentsContract.PARAM_QUERY) != null) {
+ mType = TYPE_SEARCH;
+ } else if (RecentsProvider.buildRecentOpen().equals(uri)) {
+ mType = TYPE_RECENT_OPEN;
+ } else if (RecentsProvider.buildRecentCreate().equals(uri)) {
+ mType = TYPE_RECENT_CREATE;
+ } else {
+ mType = TYPE_NORMAL;
+ }
mCallbacks = new LoaderCallbacks<Cursor>() {
@Override
@@ -133,10 +143,10 @@
}
final Uri contentsUri;
- if (uri.getQueryParameter(DocumentsContract.PARAM_QUERY) != null) {
- contentsUri = uri;
- } else {
+ if (mType == TYPE_NORMAL) {
contentsUri = DocumentsContract.buildContentsUri(uri);
+ } else {
+ contentsUri = uri;
}
return new CursorLoader(context, contentsUri, null, null, null, sortOrder);
@@ -160,10 +170,6 @@
public void onStart() {
super.onStart();
getLoaderManager().restartLoader(LOADER_DOCUMENTS, getArguments(), mCallbacks);
-
- // TODO: clean up tracking of current directory
- final Uri uri = getArguments().getParcelable(EXTRA_URI);
- ((DocumentsActivity) getActivity()).onDirectoryChanged(uri, mFlags);
}
@Override
@@ -246,7 +252,7 @@
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
final Cursor cursor = (Cursor) mAdapter.getItem(position);
final Uri uri = getArguments().getParcelable(EXTRA_URI);
- final Document doc = Document.fromCursor(uri.getAuthority(), cursor);
+ final Document doc = Document.fromCursor(uri, cursor);
((DocumentsActivity) getActivity()).onDocumentPicked(doc);
}
};
@@ -274,7 +280,7 @@
for (int i = 0; i < size; i++) {
if (checked.valueAt(i)) {
final Cursor cursor = (Cursor) mAdapter.getItem(checked.keyAt(i));
- docs.add(Document.fromCursor(uri.getAuthority(), cursor));
+ docs.add(Document.fromCursor(uri, cursor));
}
}
@@ -336,21 +342,19 @@
final TextView summary = (TextView) view.findViewById(android.R.id.summary);
final ImageView icon = (ImageView) view.findViewById(android.R.id.icon);
- final String guid = getCursorString(cursor, DocumentColumns.GUID);
+ final String docId = getCursorString(cursor, DocumentColumns.DOC_ID);
final String displayName = getCursorString(cursor, DocumentColumns.DISPLAY_NAME);
final String mimeType = getCursorString(cursor, DocumentColumns.MIME_TYPE);
final long lastModified = getCursorLong(cursor, DocumentColumns.LAST_MODIFIED);
final int flags = getCursorInt(cursor, DocumentColumns.FLAGS);
final Uri uri = getArguments().getParcelable(EXTRA_URI);
- final String authority = uri.getAuthority();
-
if ((flags & DocumentsContract.FLAG_SUPPORTS_THUMBNAIL) != 0) {
- final Uri childUri = DocumentsContract.buildDocumentUri(authority, guid);
+ final Uri childUri = DocumentsContract.buildDocumentUri(uri, docId);
icon.setImageURI(childUri);
} else {
- icon.setImageDrawable(
- DocumentsActivity.resolveDocumentIcon(context, authority, mimeType));
+ icon.setImageDrawable(DocumentsActivity.resolveDocumentIcon(
+ context, uri.getAuthority(), mimeType));
}
title.setText(displayName);
@@ -360,20 +364,6 @@
}
}
- private static int getDocumentFlags(Context context, Uri uri) {
- final Cursor cursor = context.getContentResolver().query(uri, new String[] {
- DocumentColumns.FLAGS }, null, null, null);
- try {
- if (cursor.moveToFirst()) {
- return getCursorInt(cursor, DocumentColumns.FLAGS);
- } else {
- return 0;
- }
- } finally {
- cursor.close();
- }
- }
-
public static String getCursorString(Cursor cursor, String columnName) {
return cursor.getString(cursor.getColumnIndex(columnName));
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
index dcd02d2..8f2e61d 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
@@ -16,6 +16,8 @@
package com.android.documentsui;
+import static com.android.documentsui.DirectoryFragment.getCursorInt;
+import static com.android.documentsui.DirectoryFragment.getCursorLong;
import static com.android.documentsui.DirectoryFragment.getCursorString;
import android.app.ActionBar;
@@ -25,7 +27,6 @@
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.FragmentManager;
-import android.app.FragmentManager.OnBackStackChangedListener;
import android.content.ClipData;
import android.content.ContentResolver;
import android.content.ContentValues;
@@ -78,6 +79,8 @@
import libcore.io.IoUtils;
+import org.json.JSONArray;
+import org.json.JSONException;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -85,13 +88,13 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
public class DocumentsActivity extends Activity {
private static final String TAG = "Documents";
- // TODO: fragment to show recently opened documents
- // TODO: pull actionbar icon from current backend
+ // TODO: share backend root cache with recents provider
private static final String TAG_CREATE_DIRECTORY = "create_directory";
@@ -107,18 +110,17 @@
private ActionBarDrawerToggle mDrawerToggle;
private static HashMap<String, DocumentsProviderInfo> sProviders = Maps.newHashMap();
- private static ArrayList<Root> sRoots = Lists.newArrayList();
+ private static HashMap<String, Root> sRoots = Maps.newHashMap();
+
+ // TODO: remove once adapter split by type
+ private static ArrayList<Root> sRootsList = Lists.newArrayList();
private RootsAdapter mRootsAdapter;
private ListView mRootsList;
private final DisplayState mDisplayState = new DisplayState();
- private Root mCurrentRoot;
-
- private Uri mCurrentDir;
- private boolean mCurrentSupportsCreate;
- private boolean mCurrentSupportsSearch;
+ private LinkedList<Document> mStack = new LinkedList<Document>();
@Override
public void onCreate(Bundle icicle) {
@@ -149,8 +151,6 @@
setResult(Activity.RESULT_CANCELED);
setContentView(R.layout.activity);
- getFragmentManager().addOnBackStackChangedListener(mStackListener);
-
if (mAction == ACTION_CREATE) {
final String mimeType = getIntent().getType();
final String title = getIntent().getStringExtra(Intent.EXTRA_TITLE);
@@ -158,7 +158,7 @@
}
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
- mRootsAdapter = new RootsAdapter(this, sRoots);
+ mRootsAdapter = new RootsAdapter(this, sRootsList);
mRootsList = (ListView) findViewById(R.id.roots_list);
mRootsList.setAdapter(mRootsAdapter);
mRootsList.setOnItemClickListener(mRootsListener);
@@ -169,10 +169,24 @@
mDrawerLayout.setDrawerListener(mDrawerListener);
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
- mDrawerLayout.openDrawer(mRootsList);
-
- updateActionBar();
updateRoots();
+
+ // Restore last stack for calling package
+ // TODO: move into async loader
+ final String packageName = getCallingPackage();
+ final Cursor cursor = getContentResolver()
+ .query(RecentsProvider.buildResume(packageName), null, null, null, null);
+ try {
+ if (cursor.moveToFirst()) {
+ final String rawStack = cursor.getString(
+ cursor.getColumnIndex(RecentsProvider.COL_PATH));
+ restoreStack(rawStack);
+ }
+ } finally {
+ cursor.close();
+ }
+
+ updateDirectoryFragment();
}
private DrawerListener mDrawerListener = new DrawerListener() {
@@ -206,7 +220,6 @@
}
public void updateActionBar() {
- final FragmentManager fm = getFragmentManager();
final ActionBar actionBar = getActionBar();
actionBar.setDisplayShowHomeEnabled(true);
@@ -224,13 +237,12 @@
} else {
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
- if (mCurrentRoot != null) {
- actionBar.setIcon(mCurrentRoot.icon);
- }
+ final Root root = getCurrentRoot();
+ actionBar.setIcon(root != null ? root.icon : null);
actionBar.setTitle(null);
actionBar.setListNavigationCallbacks(mSortAdapter, mSortListener);
- if (fm.getBackStackEntryCount() > 0) {
+ if (mStack.size() > 1) {
mDrawerToggle.setDrawerIndicatorEnabled(false);
} else {
mDrawerToggle.setDrawerIndicatorEnabled(true);
@@ -248,9 +260,10 @@
mSearchView.setOnQueryTextListener(new OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
- // TODO: clear existing directory stack?
- final Uri searchUri = DocumentsContract.buildSearchUri(mCurrentDir, query);
- DirectoryFragment.show(getFragmentManager(), searchUri, query, true);
+ // TODO: use second directory stack for searches?
+ final Document cwd = getCurrentDirectory();
+ final Document searchDoc = Document.fromSearch(cwd.uri, query);
+ onDocumentPicked(searchDoc);
mSearchView.setIconified(true);
return true;
}
@@ -268,13 +281,20 @@
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
+ final Document cwd = getCurrentDirectory();
+
final MenuItem createDir = menu.findItem(R.id.menu_create_dir);
createDir.setVisible(mAction == ACTION_CREATE);
- createDir.setEnabled(mCurrentSupportsCreate);
+ createDir.setEnabled(cwd != null && cwd.isCreateSupported());
// TODO: close any search in-progress when hiding
final MenuItem search = menu.findItem(R.id.menu_search);
- search.setVisible(mCurrentSupportsSearch);
+ search.setVisible(cwd != null && cwd.isSearchSupported());
+
+ if (mAction == ACTION_CREATE) {
+ final FragmentManager fm = getFragmentManager();
+ SaveFragment.get(fm).setSaveEnabled(cwd != null && cwd.isCreateSupported());
+ }
return true;
}
@@ -287,8 +307,7 @@
final int id = item.getItemId();
if (id == android.R.id.home) {
- getFragmentManager().popBackStack();
- updateActionBar();
+ onBackPressed();
return true;
} else if (id == R.id.menu_create_dir) {
CreateDirectoryFragment.show(getFragmentManager());
@@ -299,12 +318,19 @@
return super.onOptionsItemSelected(item);
}
- private OnBackStackChangedListener mStackListener = new OnBackStackChangedListener() {
- @Override
- public void onBackStackChanged() {
- updateActionBar();
+ @Override
+ public void onBackPressed() {
+ final int size = mStack.size();
+ if (size > 1) {
+ mStack.pop();
+ updateDirectoryFragment();
+ } else if (size == 1 && !mDrawerLayout.isDrawerOpen(mRootsList)) {
+ // TODO: open root drawer once we can capture back key
+ super.onBackPressed();
+ } else {
+ super.onBackPressed();
}
- };
+ }
// TODO: support additional sort orders
private BaseAdapter mSortAdapter = new BaseAdapter() {
@@ -340,12 +366,9 @@
final TextView title = (TextView) convertView.findViewById(android.R.id.title);
final TextView summary = (TextView) convertView.findViewById(android.R.id.summary);
- final FragmentManager fm = getFragmentManager();
- final int count = fm.getBackStackEntryCount();
- if (count > 0) {
- title.setText(fm.getBackStackEntryAt(count - 1).getBreadCrumbTitle());
- } else if (mCurrentRoot != null) {
- title.setText(mCurrentRoot.title);
+ final Document cwd = getCurrentDirectory();
+ if (cwd != null) {
+ title.setText(cwd.displayName);
} else {
title.setText(null);
}
@@ -377,28 +400,42 @@
}
};
+ public Root getCurrentRoot() {
+ final Document cwd = getCurrentDirectory();
+ if (cwd != null) {
+ return sRoots.get(DocumentsContract.getRootId(cwd.uri));
+ } else {
+ return null;
+ }
+ }
+
+ public Document getCurrentDirectory() {
+ return mStack.peek();
+ }
+
public DisplayState getDisplayState() {
return mDisplayState;
}
- public void onDirectoryChanged(Uri uri, int flags) {
- mCurrentDir = uri;
- mCurrentSupportsCreate = (flags & DocumentsContract.FLAG_SUPPORTS_CREATE) != 0;
- mCurrentSupportsSearch = (flags & DocumentsContract.FLAG_SUPPORTS_SEARCH) != 0;
-
- if (mAction == ACTION_CREATE) {
- final FragmentManager fm = getFragmentManager();
- SaveFragment.get(fm).setSaveEnabled(mCurrentSupportsCreate);
+ private void updateDirectoryFragment() {
+ final FragmentManager fm = getFragmentManager();
+ final Document cwd = getCurrentDirectory();
+ if (cwd != null) {
+ DirectoryFragment.show(fm, cwd.uri);
+ mDrawerLayout.closeDrawer(mRootsList);
+ } else {
+ mDrawerLayout.openDrawer(mRootsList);
}
-
+ updateActionBar();
invalidateOptionsMenu();
+ dumpStack();
}
public void onDocumentPicked(Document doc) {
final FragmentManager fm = getFragmentManager();
if (DocumentsContract.MIME_TYPE_DIRECTORY.equals(doc.mimeType)) {
- // Nested directory picked, recurse using new fragment
- DirectoryFragment.show(fm, doc.uri, doc.displayName, true);
+ mStack.push(doc);
+ updateDirectoryFragment();
} else if (mAction == ACTION_OPEN) {
// Explicit file picked, return
onFinished(doc.uri);
@@ -418,27 +455,76 @@
}
public void onSaveRequested(String mimeType, String displayName) {
+ // TODO: handle overwrite by using last-selected GUID
+
final ContentValues values = new ContentValues();
values.put(DocumentColumns.MIME_TYPE, mimeType);
values.put(DocumentColumns.DISPLAY_NAME, displayName);
- final Uri uri = getContentResolver().insert(mCurrentDir, values);
- if (uri != null) {
- onFinished(uri);
+ final Document cwd = getCurrentDirectory();
+ final Uri childUri = getContentResolver().insert(cwd.uri, values);
+ if (childUri != null) {
+ onFinished(childUri);
} else {
- // TODO: ask for overwrite confirmation
Toast.makeText(this, R.string.save_error, Toast.LENGTH_SHORT).show();
}
}
+ private String saveStack() {
+ final JSONArray stack = new JSONArray();
+ for (int i = 0; i < mStack.size(); i++) {
+ stack.put(mStack.get(i).uri);
+ }
+ return stack.toString();
+ }
+
+ private void restoreStack(String rawStack) {
+ Log.d(TAG, "restoreStack: " + rawStack);
+ mStack.clear();
+ try {
+ final JSONArray stack = new JSONArray(rawStack);
+ for (int i = 0; i < stack.length(); i++) {
+ final Uri uri = Uri.parse(stack.getString(i));
+ final Document doc = Document.fromUri(getContentResolver(), uri);
+ mStack.add(doc);
+ }
+ } catch (JSONException e) {
+ Log.w(TAG, "Failed to decode stack", e);
+ }
+ }
+
private void onFinished(Uri... uris) {
Log.d(TAG, "onFinished() " + Arrays.toString(uris));
+ final ContentResolver resolver = getContentResolver();
+ final ContentValues values = new ContentValues();
+
+ final String stack = saveStack();
+ if (mAction == ACTION_CREATE) {
+ // Remember stack for last create
+ values.clear();
+ values.put(RecentsProvider.COL_PATH, stack);
+ resolver.insert(RecentsProvider.buildRecentCreate(), values);
+
+ } else if (mAction == ACTION_OPEN) {
+ // Remember opened items
+ for (Uri uri : uris) {
+ values.clear();
+ values.put(RecentsProvider.COL_URI, uri.toString());
+ resolver.insert(RecentsProvider.buildRecentOpen(), values);
+ }
+ }
+
+ // Remember location for next app launch
+ final String packageName = getCallingPackage();
+ values.clear();
+ values.put(RecentsProvider.COL_PATH, stack);
+ resolver.insert(RecentsProvider.buildResume(packageName), values);
+
final Intent intent = new Intent();
if (uris.length == 1) {
intent.setData(uris[0]);
} else if (uris.length > 1) {
- final ContentResolver resolver = getContentResolver();
final ClipData clipData = new ClipData(null, mAcceptMimes, new ClipData.Item(uris[0]));
for (int i = 1; i < uris.length; i++) {
clipData.addItem(new ClipData.Item(uris[i]));
@@ -469,36 +555,27 @@
public static class Root {
public DocumentsProviderInfo info;
+ public String rootId;
public int rootType;
public Uri uri;
public Drawable icon;
public String title;
public String summary;
- public static Root fromInfo(Context context, DocumentsProviderInfo info) {
- final Root root = new Root();
+ public static Root fromCursor(
+ Context context, DocumentsProviderInfo info, Cursor cursor) {
final PackageManager pm = context.getPackageManager();
+ final Root root = new Root();
root.info = info;
- root.rootType = DocumentsContract.ROOT_TYPE_SERVICE;
+ root.rootId = cursor.getString(cursor.getColumnIndex(RootColumns.ROOT_ID));
+ root.rootType = cursor.getInt(cursor.getColumnIndex(RootColumns.ROOT_TYPE));
root.uri = DocumentsContract.buildDocumentUri(
- info.providerInfo.authority, DocumentsContract.ROOT_GUID);
+ info.providerInfo.authority, root.rootId, DocumentsContract.ROOT_DOC_ID);
root.icon = info.providerInfo.loadIcon(pm);
root.title = info.providerInfo.loadLabel(pm).toString();
root.summary = null;
- return root;
- }
-
- public static Root fromCursor(
- Context context, DocumentsProviderInfo info, Cursor cursor) {
- final Root root = fromInfo(context, info);
-
- root.rootType = cursor.getInt(cursor.getColumnIndex(RootColumns.ROOT_TYPE));
- root.uri = DocumentsContract.buildDocumentUri(info.providerInfo.authority,
- cursor.getString(cursor.getColumnIndex(RootColumns.GUID)));
-
- final PackageManager pm = context.getPackageManager();
final int icon = cursor.getInt(cursor.getColumnIndex(RootColumns.ICON));
if (icon != 0) {
try {
@@ -537,13 +614,20 @@
public Uri uri;
public String mimeType;
public String displayName;
+ public long lastModified;
+ public int flags;
- public static Document fromCursor(String authority, Cursor cursor) {
+ public static Document fromCursor(Uri parent, Cursor cursor) {
+ final String authority = parent.getAuthority();
+ final String rootId = DocumentsContract.getRootId(parent);
+ final String docId = getCursorString(cursor, DocumentColumns.DOC_ID);
+
final Document doc = new Document();
- final String guid = getCursorString(cursor, DocumentColumns.GUID);
- doc.uri = DocumentsContract.buildDocumentUri(authority, guid);
+ doc.uri = DocumentsContract.buildDocumentUri(authority, rootId, docId);
doc.mimeType = getCursorString(cursor, DocumentColumns.MIME_TYPE);
doc.displayName = getCursorString(cursor, DocumentColumns.DISPLAY_NAME);
+ doc.lastModified = getCursorLong(cursor, DocumentColumns.LAST_MODIFIED);
+ doc.flags = getCursorInt(cursor, DocumentColumns.FLAGS);
return doc;
}
@@ -558,12 +642,41 @@
}
doc.mimeType = getCursorString(cursor, DocumentColumns.MIME_TYPE);
doc.displayName = getCursorString(cursor, DocumentColumns.DISPLAY_NAME);
+ doc.lastModified = getCursorLong(cursor, DocumentColumns.LAST_MODIFIED);
+ doc.flags = getCursorInt(cursor, DocumentColumns.FLAGS);
} finally {
cursor.close();
}
return doc;
}
+
+ public static Document fromSearch(Uri relatedUri, String query) {
+ final Document doc = new Document();
+ doc.uri = DocumentsContract.buildSearchUri(relatedUri, query);
+ doc.mimeType = DocumentsContract.MIME_TYPE_DIRECTORY;
+ doc.displayName = query;
+ doc.lastModified = System.currentTimeMillis();
+ doc.flags = 0;
+ return doc;
+ }
+
+ @Override
+ public String toString() {
+ return "'" + displayName + "' " + uri;
+ }
+
+ public boolean isCreateSupported() {
+ return (flags & DocumentsContract.FLAG_SUPPORTS_CREATE) != 0;
+ }
+
+ public boolean isSearchSupported() {
+ return (flags & DocumentsContract.FLAG_SUPPORTS_SEARCH) != 0;
+ }
+
+ public boolean isThumbnailSupported() {
+ return (flags & DocumentsContract.FLAG_SUPPORTS_THUMBNAIL) != 0;
+ }
}
public static boolean mimeMatches(String filter, String[] tests) {
@@ -624,6 +737,7 @@
private void updateRoots() {
sProviders.clear();
sRoots.clear();
+ sRootsList.clear();
final PackageManager pm = getPackageManager();
final List<ProviderInfo> providers = pm.queryContentProviders(
@@ -639,19 +753,18 @@
sProviders.put(info.providerInfo.authority, info);
- if (info.customRoots) {
- // TODO: populate roots on background thread, and cache results
- final Uri uri = DocumentsContract.buildRootsUri(providerInfo.authority);
- final Cursor cursor = getContentResolver().query(uri, null, null, null, null);
- try {
- while (cursor.moveToNext()) {
- sRoots.add(Root.fromCursor(this, info, cursor));
- }
- } finally {
- cursor.close();
+ // TODO: remove deprecated customRoots flag
+ // TODO: populate roots on background thread, and cache results
+ final Uri uri = DocumentsContract.buildRootsUri(providerInfo.authority);
+ final Cursor cursor = getContentResolver().query(uri, null, null, null, null);
+ try {
+ while (cursor.moveToNext()) {
+ final Root root = Root.fromCursor(this, info, cursor);
+ sRoots.put(root.rootId, root);
+ sRootsList.add(root);
}
- } else if (info != null) {
- sRoots.add(Root.fromInfo(this, info));
+ } finally {
+ cursor.close();
}
}
}
@@ -715,19 +828,25 @@
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// Clear entire backstack and start in new root
- final FragmentManager fm = getFragmentManager();
- while (fm.getBackStackEntryCount() > 0) {
- fm.popBackStackImmediate();
- }
+ mStack.clear();
- mCurrentRoot = mRootsAdapter.getItem(position);
- DirectoryFragment.show(
- getFragmentManager(), mCurrentRoot.uri, mCurrentRoot.title, false);
+ final Root root = mRootsAdapter.getItem(position);
+
+ final ContentResolver resolver = getContentResolver();
+ final Document doc = Document.fromUri(resolver, root.uri);
+ onDocumentPicked(doc);
mDrawerLayout.closeDrawers();
}
};
+ private void dumpStack() {
+ Log.d(TAG, "Current stack:");
+ for (Document doc : mStack) {
+ Log.d(TAG, "--> " + doc);
+ }
+ }
+
public static class RootsAdapter extends ArrayAdapter<Root> {
public RootsAdapter(Context context, List<Root> list) {
super(context, android.R.layout.simple_list_item_1, list);
@@ -784,13 +903,17 @@
values.put(DocumentColumns.MIME_TYPE, DocumentsContract.MIME_TYPE_DIRECTORY);
values.put(DocumentColumns.DISPLAY_NAME, displayName);
- // TODO: handle errors from remote side
final DocumentsActivity activity = (DocumentsActivity) getActivity();
- final Uri uri = resolver.insert(activity.mCurrentDir, values);
+ final Document cwd = activity.getCurrentDirectory();
- // Navigate into newly created child
- final Document doc = Document.fromUri(resolver, uri);
- activity.onDocumentPicked(doc);
+ final Uri childUri = resolver.insert(cwd.uri, values);
+ if (childUri != null) {
+ // Navigate into newly created child
+ final Document childDoc = Document.fromUri(resolver, childUri);
+ activity.onDocumentPicked(childDoc);
+ } else {
+ Toast.makeText(context, R.string.save_error, Toast.LENGTH_SHORT).show();
+ }
}
});
builder.setNegativeButton(android.R.string.cancel, null);
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RecentsProvider.java b/packages/DocumentsUI/src/com/android/documentsui/RecentsProvider.java
new file mode 100644
index 0000000..dbcb039
--- /dev/null
+++ b/packages/DocumentsUI/src/com/android/documentsui/RecentsProvider.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.documentsui;
+
+import android.content.ContentProvider;
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.UriMatcher;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+import android.net.Uri;
+import android.text.format.DateUtils;
+import android.util.Log;
+
+public class RecentsProvider extends ContentProvider {
+ private static final String TAG = "RecentsProvider";
+
+ // TODO: offer view of recents that handles backend root resolution before
+ // returning cursor, include extra columns
+
+ public static final String AUTHORITY = "com.android.documentsui.recents";
+
+ private static final UriMatcher sMatcher = new UriMatcher(UriMatcher.NO_MATCH);
+
+ private static final int URI_RECENT_OPEN = 1;
+ private static final int URI_RECENT_CREATE = 2;
+ private static final int URI_RESUME = 3;
+
+ static {
+ sMatcher.addURI(AUTHORITY, "recent_open", URI_RECENT_OPEN);
+ sMatcher.addURI(AUTHORITY, "recent_create", URI_RECENT_CREATE);
+ sMatcher.addURI(AUTHORITY, "resume/*", URI_RESUME);
+ }
+
+ private static final String TABLE_RECENT_OPEN = "recent_open";
+ private static final String TABLE_RECENT_CREATE = "recent_create";
+ private static final String TABLE_RESUME = "resume";
+
+ /**
+ * String of URIs pointing at a storage backend, stored as a JSON array,
+ * starting with root.
+ */
+ public static final String COL_PATH = "path";
+ public static final String COL_URI = "uri";
+ public static final String COL_PACKAGE_NAME = "package_name";
+ public static final String COL_TIMESTAMP = "timestamp";
+
+ public static Uri buildRecentOpen() {
+ return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(AUTHORITY).appendPath("recent_open").build();
+ }
+
+ public static Uri buildRecentCreate() {
+ return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(AUTHORITY).appendPath("recent_create").build();
+ }
+
+ public static Uri buildResume(String packageName) {
+ return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(AUTHORITY).appendPath("resume").appendPath(packageName).build();
+ }
+
+ private DatabaseHelper mHelper;
+
+ private static class DatabaseHelper extends SQLiteOpenHelper {
+ private static final String DB_NAME = "recents.db";
+
+ private static final int VERSION_INIT = 1;
+
+ public DatabaseHelper(Context context) {
+ super(context, DB_NAME, null, VERSION_INIT);
+ }
+
+ @Override
+ public void onCreate(SQLiteDatabase db) {
+ db.execSQL("CREATE TABLE " + TABLE_RECENT_OPEN + " (" +
+ COL_URI + " TEXT PRIMARY KEY ON CONFLICT REPLACE," +
+ COL_TIMESTAMP + " INTEGER" +
+ ")");
+
+ db.execSQL("CREATE TABLE " + TABLE_RECENT_CREATE + " (" +
+ COL_PATH + " TEXT PRIMARY KEY ON CONFLICT REPLACE," +
+ COL_TIMESTAMP + " INTEGER" +
+ ")");
+
+ db.execSQL("CREATE TABLE " + TABLE_RESUME + " (" +
+ COL_PACKAGE_NAME + " TEXT PRIMARY KEY ON CONFLICT REPLACE," +
+ COL_PATH + " TEXT," +
+ COL_TIMESTAMP + " INTEGER" +
+ ")");
+ }
+
+ @Override
+ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+ Log.w(TAG, "Upgrading database; wiping app data");
+ db.execSQL("DROP TABLE IF EXISTS " + TABLE_RECENT_OPEN);
+ db.execSQL("DROP TABLE IF EXISTS " + TABLE_RECENT_CREATE);
+ db.execSQL("DROP TABLE IF EXISTS " + TABLE_RESUME);
+ onCreate(db);
+ }
+ }
+
+ @Override
+ public boolean onCreate() {
+ mHelper = new DatabaseHelper(getContext());
+ return true;
+ }
+
+ @Override
+ public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+ String sortOrder) {
+ final SQLiteDatabase db = mHelper.getReadableDatabase();
+ switch (sMatcher.match(uri)) {
+ case URI_RECENT_OPEN: {
+ return db.query(TABLE_RECENT_OPEN, projection,
+ buildWhereYounger(DateUtils.WEEK_IN_MILLIS), null, null, null, null);
+ }
+ case URI_RECENT_CREATE: {
+ return db.query(TABLE_RECENT_CREATE, projection,
+ buildWhereYounger(DateUtils.WEEK_IN_MILLIS), null, null, null, null);
+ }
+ case URI_RESUME: {
+ final String packageName = uri.getPathSegments().get(1);
+ return db.query(TABLE_RESUME, projection, COL_PACKAGE_NAME + "=?",
+ new String[] { packageName }, null, null, null);
+ }
+ default: {
+ throw new UnsupportedOperationException("Unsupported Uri " + uri);
+ }
+ }
+ }
+
+ @Override
+ public String getType(Uri uri) {
+ return null;
+ }
+
+ @Override
+ public Uri insert(Uri uri, ContentValues values) {
+ final SQLiteDatabase db = mHelper.getWritableDatabase();
+ switch (sMatcher.match(uri)) {
+ case URI_RECENT_OPEN: {
+ values.put(COL_TIMESTAMP, System.currentTimeMillis());
+ db.insert(TABLE_RECENT_OPEN, null, values);
+ db.delete(TABLE_RECENT_OPEN, buildWhereOlder(DateUtils.WEEK_IN_MILLIS), null);
+ return uri;
+ }
+ case URI_RECENT_CREATE: {
+ values.put(COL_TIMESTAMP, System.currentTimeMillis());
+ db.insert(TABLE_RECENT_CREATE, null, values);
+ db.delete(TABLE_RECENT_CREATE, buildWhereOlder(DateUtils.WEEK_IN_MILLIS), null);
+ return uri;
+ }
+ case URI_RESUME: {
+ final String packageName = uri.getPathSegments().get(1);
+ values.put(COL_PACKAGE_NAME, packageName);
+ values.put(COL_TIMESTAMP, System.currentTimeMillis());
+ db.insert(TABLE_RESUME, null, values);
+ return uri;
+ }
+ default: {
+ throw new UnsupportedOperationException("Unsupported Uri " + uri);
+ }
+ }
+ }
+
+ @Override
+ public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+ throw new UnsupportedOperationException("Unsupported Uri " + uri);
+ }
+
+ @Override
+ public int delete(Uri uri, String selection, String[] selectionArgs) {
+ throw new UnsupportedOperationException("Unsupported Uri " + uri);
+ }
+
+ private static String buildWhereOlder(long deltaMillis) {
+ return COL_TIMESTAMP + "<" + (System.currentTimeMillis() - deltaMillis);
+ }
+
+ private static String buildWhereYounger(long deltaMillis) {
+ return COL_TIMESTAMP + ">" + (System.currentTimeMillis() - deltaMillis);
+ }
+}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/TestActivity.java b/packages/DocumentsUI/src/com/android/documentsui/TestActivity.java
index b15d123..a086a43 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/TestActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/TestActivity.java
@@ -19,7 +19,9 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
+import android.net.Uri;
import android.os.Bundle;
+import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
@@ -27,7 +29,15 @@
import android.widget.LinearLayout;
import android.widget.TextView;
+import libcore.io.IoUtils;
+import libcore.io.Streams;
+
+import java.io.IOException;
+import java.io.InputStream;
+
public class TestActivity extends Activity {
+ private static final String TAG = "TestActivity";
+
private TextView mResult;
@Override
@@ -113,5 +123,19 @@
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
mResult.setText("resultCode=" + resultCode + ", data=" + String.valueOf(data));
+
+ final Uri uri = data != null ? data.getData() : null;
+ if (uri != null) {
+ InputStream is = null;
+ try {
+ is = getContentResolver().openInputStream(uri);
+ final int length = Streams.readFullyNoClose(is).length;
+ Log.d(TAG, "read length=" + length);
+ } catch (IOException e) {
+ Log.w(TAG, "Failed to read " + uri, e);
+ } finally {
+ IoUtils.closeQuietly(is);
+ }
+ }
}
}
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index bf5811b..5c12484 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -45,15 +45,15 @@
private static final String AUTHORITY = "com.android.externalstorage";
- // TODO: support searching
// TODO: support multiple storage devices
private static final UriMatcher sMatcher = new UriMatcher(UriMatcher.NO_MATCH);
private static final int URI_ROOTS = 1;
- private static final int URI_DOCS_ID = 2;
- private static final int URI_DOCS_ID_CONTENTS = 3;
- private static final int URI_DOCS_ID_SEARCH = 4;
+ private static final int URI_ROOTS_ID = 2;
+ private static final int URI_DOCS_ID = 3;
+ private static final int URI_DOCS_ID_CONTENTS = 4;
+ private static final int URI_DOCS_ID_SEARCH = 5;
private HashMap<String, Root> mRoots = Maps.newHashMap();
@@ -68,9 +68,10 @@
static {
sMatcher.addURI(AUTHORITY, "roots", URI_ROOTS);
- sMatcher.addURI(AUTHORITY, "docs/*", URI_DOCS_ID);
- sMatcher.addURI(AUTHORITY, "docs/*/contents", URI_DOCS_ID_CONTENTS);
- sMatcher.addURI(AUTHORITY, "docs/*/search", URI_DOCS_ID_SEARCH);
+ sMatcher.addURI(AUTHORITY, "roots/*", URI_ROOTS_ID);
+ sMatcher.addURI(AUTHORITY, "roots/*/docs/*", URI_DOCS_ID);
+ sMatcher.addURI(AUTHORITY, "roots/*/docs/*/contents", URI_DOCS_ID_CONTENTS);
+ sMatcher.addURI(AUTHORITY, "roots/*/docs/*/search", URI_DOCS_ID_SEARCH);
}
@Override
@@ -79,7 +80,7 @@
final Root root = new Root();
root.rootType = DocumentsContract.ROOT_TYPE_DEVICE_ADVANCED;
- root.name = "internal";
+ root.name = "primary";
root.title = getContext().getString(R.string.root_internal_storage);
root.path = Environment.getExternalStorageDirectory();
mRoots.put(root.name, root);
@@ -90,48 +91,60 @@
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
String sortOrder) {
- final int match = sMatcher.match(uri);
- if (match == URI_ROOTS) {
- // TODO: support custom projections
- projection = new String[] {
- RootColumns.ROOT_TYPE, RootColumns.GUID, RootColumns.ICON, RootColumns.TITLE,
- RootColumns.SUMMARY, RootColumns.AVAILABLE_BYTES };
-
- final MatrixCursor cursor = new MatrixCursor(projection);
- for (Root root : mRoots.values()) {
- final String guid = fileToGuid(root.path);
- cursor.addRow(new Object[] {
- root.rootType, guid, root.icon, root.title, root.summary,
- root.path.getFreeSpace() });
- }
- return cursor;
- }
// TODO: support custom projections
- projection = new String[] {
- BaseColumns._ID,
- DocumentColumns.DISPLAY_NAME, DocumentColumns.SIZE, DocumentColumns.GUID,
- DocumentColumns.MIME_TYPE, DocumentColumns.LAST_MODIFIED, DocumentColumns.FLAGS };
+ final String[] rootsProjection = new String[] {
+ BaseColumns._ID, RootColumns.ROOT_ID, RootColumns.ROOT_TYPE, RootColumns.ICON,
+ RootColumns.TITLE, RootColumns.SUMMARY, RootColumns.AVAILABLE_BYTES };
+ final String[] docsProjection = new String[] {
+ BaseColumns._ID, DocumentColumns.DISPLAY_NAME, DocumentColumns.SIZE,
+ DocumentColumns.DOC_ID, DocumentColumns.MIME_TYPE, DocumentColumns.LAST_MODIFIED,
+ DocumentColumns.FLAGS };
- final MatrixCursor cursor = new MatrixCursor(projection);
- switch (match) {
+ switch (sMatcher.match(uri)) {
+ case URI_ROOTS: {
+ final MatrixCursor cursor = new MatrixCursor(rootsProjection);
+ for (Root root : mRoots.values()) {
+ includeRoot(cursor, root);
+ }
+ return cursor;
+ }
+ case URI_ROOTS_ID: {
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+
+ final MatrixCursor cursor = new MatrixCursor(rootsProjection);
+ includeRoot(cursor, root);
+ return cursor;
+ }
case URI_DOCS_ID: {
- final String guid = uri.getPathSegments().get(1);
- includeFile(cursor, guid);
- break;
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
+
+ final MatrixCursor cursor = new MatrixCursor(docsProjection);
+ final File file = docIdToFile(root, docId);
+ includeFile(cursor, root, file);
+ return cursor;
}
case URI_DOCS_ID_CONTENTS: {
- final String guid = uri.getPathSegments().get(1);
- final File parent = guidToFile(guid);
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
+
+ final MatrixCursor cursor = new MatrixCursor(docsProjection);
+ final File parent = docIdToFile(root, docId);
+
for (File file : parent.listFiles()) {
- includeFile(cursor, fileToGuid(file));
+ includeFile(cursor, root, file);
}
- break;
+
+ return cursor;
}
case URI_DOCS_ID_SEARCH: {
- final String guid = uri.getPathSegments().get(1);
- final File parent = guidToFile(guid);
- final String query = uri.getQueryParameter(DocumentsContract.PARAM_QUERY).toLowerCase();
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
+ final String query = DocumentsContract.getSearchQuery(uri).toLowerCase();
+
+ final MatrixCursor cursor = new MatrixCursor(docsProjection);
+ final File parent = docIdToFile(root, docId);
final LinkedList<File> pending = new LinkedList<File>();
pending.add(parent);
@@ -143,49 +156,53 @@
}
} else {
if (file.getName().toLowerCase().contains(query)) {
- includeFile(cursor, fileToGuid(file));
+ includeFile(cursor, root, file);
}
}
}
- break;
+
+ return cursor;
}
default: {
- cursor.close();
throw new UnsupportedOperationException("Unsupported Uri " + uri);
}
}
-
- return cursor;
}
- private String fileToGuid(File file) {
+ private String fileToDocId(Root root, File file) {
+ String rootPath = root.path.getAbsolutePath();
final String path = file.getAbsolutePath();
- for (Root root : mRoots.values()) {
- final String rootPath = root.path.getAbsolutePath();
- if (path.startsWith(rootPath)) {
- return root.name + ':' + Uri.encode(path.substring(rootPath.length()));
- }
+ if (path.equals(rootPath)) {
+ return DocumentsContract.ROOT_DOC_ID;
}
- throw new IllegalArgumentException("Failed to find root for " + file);
- }
-
- private File guidToFile(String guid) {
- final int split = guid.indexOf(':');
- final String name = guid.substring(0, split);
- final Root root = mRoots.get(name);
- if (root != null) {
- final String path = Uri.decode(guid.substring(split + 1));
- return new File(root.path, path);
+ if (!rootPath.endsWith("/")) {
+ rootPath += "/";
}
-
- throw new IllegalArgumentException("Failed to find root for " + guid);
+ if (!path.startsWith(rootPath)) {
+ throw new IllegalArgumentException("File " + path + " outside root " + root.path);
+ } else {
+ return path.substring(rootPath.length());
+ }
}
- private void includeFile(MatrixCursor cursor, String guid) {
+ private File docIdToFile(Root root, String docId) {
+ if (DocumentsContract.ROOT_DOC_ID.equals(docId)) {
+ return root.path;
+ } else {
+ return new File(root.path, docId);
+ }
+ }
+
+ private void includeRoot(MatrixCursor cursor, Root root) {
+ cursor.addRow(new Object[] {
+ root.name.hashCode(), root.name, root.rootType, root.icon, root.title, root.summary,
+ root.path.getFreeSpace() });
+ }
+
+ private void includeFile(MatrixCursor cursor, Root root, File file) {
int flags = 0;
- final File file = guidToFile(guid);
if (file.isDirectory()) {
flags |= DocumentsContract.FLAG_SUPPORTS_SEARCH;
}
@@ -202,17 +219,27 @@
flags |= DocumentsContract.FLAG_SUPPORTS_THUMBNAIL;
}
- final long id = guid.hashCode();
+ final String docId = fileToDocId(root, file);
+ final long id = docId.hashCode();
+
+ final String displayName;
+ if (DocumentsContract.ROOT_DOC_ID.equals(docId)) {
+ displayName = root.title;
+ } else {
+ displayName = file.getName();
+ }
+
cursor.addRow(new Object[] {
- id, file.getName(), file.length(), guid, mimeType, file.lastModified(), flags });
+ id, displayName, file.length(), docId, mimeType, file.lastModified(), flags });
}
@Override
public String getType(Uri uri) {
switch (sMatcher.match(uri)) {
case URI_DOCS_ID: {
- final String guid = uri.getPathSegments().get(1);
- return getTypeForFile(guidToFile(guid));
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
+ return getTypeForFile(docIdToFile(root, docId));
}
default: {
throw new UnsupportedOperationException("Unsupported Uri " + uri);
@@ -245,10 +272,11 @@
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
switch (sMatcher.match(uri)) {
case URI_DOCS_ID: {
- final String guid = uri.getPathSegments().get(1);
- final File file = guidToFile(guid);
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
// TODO: offer as thumbnail
+ final File file = docIdToFile(root, docId);
return ParcelFileDescriptor.open(file, ContentResolver.modeToMode(uri, mode));
}
default: {
@@ -261,8 +289,10 @@
public Uri insert(Uri uri, ContentValues values) {
switch (sMatcher.match(uri)) {
case URI_DOCS_ID: {
- final String guid = uri.getPathSegments().get(1);
- final File parent = guidToFile(guid);
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
+
+ final File parent = docIdToFile(root, docId);
final String mimeType = values.getAsString(DocumentColumns.MIME_TYPE);
final String name = validateDisplayName(
@@ -285,7 +315,8 @@
}
}
- return DocumentsContract.buildDocumentUri(AUTHORITY, fileToGuid(file));
+ final String newDocId = fileToDocId(root, file);
+ return DocumentsContract.buildDocumentUri(AUTHORITY, root.name, newDocId);
}
default: {
throw new UnsupportedOperationException("Unsupported Uri " + uri);
@@ -297,8 +328,10 @@
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
switch (sMatcher.match(uri)) {
case URI_DOCS_ID: {
- final String guid = uri.getPathSegments().get(1);
- final File file = guidToFile(guid);
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
+
+ final File file = docIdToFile(root, docId);
final File newFile = new File(
file.getParentFile(), values.getAsString(DocumentColumns.DISPLAY_NAME));
return file.renameTo(newFile) ? 1 : 0;
@@ -313,8 +346,10 @@
public int delete(Uri uri, String selection, String[] selectionArgs) {
switch (sMatcher.match(uri)) {
case URI_DOCS_ID: {
- final String guid = uri.getPathSegments().get(1);
- final File file = guidToFile(guid);
+ final Root root = mRoots.get(DocumentsContract.getRootId(uri));
+ final String docId = DocumentsContract.getDocId(uri);
+
+ final File file = docIdToFile(root, docId);
return file.delete() ? 1 : 0;
}
default: {
diff --git a/packages/PrintSpooler/AndroidManifest.xml b/packages/PrintSpooler/AndroidManifest.xml
index f0bbfa4..72d064a 100644
--- a/packages/PrintSpooler/AndroidManifest.xml
+++ b/packages/PrintSpooler/AndroidManifest.xml
@@ -25,8 +25,8 @@
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="17"/>
- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
- <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
+ <uses-permission android:name="android.permission.ACCESS_ALL_PRINT_JOBS"/>
+ <uses-permission android:name="android.permission.WAKE_LOCK"/>
<permission android:name="android.permission.BIND_PRINT_SPOOLER_SERVICE"
android:label="@string/permlab_bindPrintSpoolerService"
@@ -50,6 +50,11 @@
android:theme="@android:style/Theme.Holo.Light.Dialog.NoActionBar">
</activity>
+ <receiver
+ android:name=".NotificationController$NotificationBroadcastReceiver"
+ android:exported="false" >
+ </receiver>
+
</application>
</manifest>
diff --git a/packages/PrintSpooler/res/values/strings.xml b/packages/PrintSpooler/res/values/strings.xml
index 1762693..f400f21 100644
--- a/packages/PrintSpooler/res/values/strings.xml
+++ b/packages/PrintSpooler/res/values/strings.xml
@@ -55,6 +55,28 @@
<!-- Title if the number of pages in a printed document is unknown. [CHAR LIMIT=20] -->
<string name="page_count_unknown">unknown</string>
+ <!-- Notifications -->
+
+ <!-- Template for the notificaiton label for a queued print job. [CHAR LIMIT=25] -->
+ <string name="queued_notification_title_template">Queued <xliff:g id="print_job_name" example="foo.jpg">%1$s</xliff:g></string>
+
+ <!-- Template for the notificaiton label for a printing print job. [CHAR LIMIT=25] -->
+ <string name="printing_notification_title_template">Printing <xliff:g id="print_job_name" example="foo.jpg">%1$s</xliff:g></string>
+
+ <!-- Template for the notificaiton label for a cancelling print job. [CHAR LIMIT=25] -->
+ <string name="cancelling_notification_title_template">Cancelling <xliff:g id="print_job_name" example="foo.jpg">%1$s</xliff:g></string>
+
+ <!-- Template for the notificaiton label for a failed print job. [CHAR LIMIT=25] -->
+ <string name="failed_notification_title_template">Printer error <xliff:g id="print_job_name" example="foo.jpg">%1$s</xliff:g></string>
+
+ <!-- Label for the notification button for cancelling a print job. [CHAR LIMIT=25] -->
+ <string name="cancel">Cancel</string>
+
+ <!-- Label for the notification button for restrating a filed print job. [CHAR LIMIT=25] -->
+ <string name="restart">Restart</string>
+
+ <!-- Arrays -->
+
<!-- Color mode labels. -->
<string-array name="color_mode_labels">
<!-- Color modelabel: Monochrome color scheme, e.g. one color is used. [CHAR LIMIT=20] -->
diff --git a/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java b/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java
new file mode 100644
index 0000000..14a96c9
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java
@@ -0,0 +1,266 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.printspooler;
+
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.os.PowerManager;
+import android.os.PowerManager.WakeLock;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.UserHandle;
+import android.print.IPrintManager;
+import android.print.PrintJobInfo;
+import android.print.PrintManager;
+import android.util.Log;
+
+/**
+ * This class is responsible for updating the print notifications
+ * based on print job state transitions.
+ */
+public class NotificationController {
+ public static final boolean DEBUG = true && Build.IS_DEBUGGABLE;
+
+ public static final String LOG_TAG = "NotificationController";
+
+ private static final String INTENT_ACTION_CANCEL_PRINTJOB = "INTENT_ACTION_CANCEL_PRINTJOB";
+ private static final String INTENT_ACTION_RESTART_PRINTJOB = "INTENT_ACTION_RESTART_PRINTJOB";
+ private static final String INTENT_EXTRA_PRINTJOB_ID = "INTENT_EXTRA_PRINTJOB_ID";
+ private static final String INTENT_EXTRA_PRINTJOB_LABEL = "INTENT_EXTRA_PRINTJOB_LABEL";
+ private static final String INTENT_EXTRA_PRINTER_NAME = "INTENT_EXTRA_PRINTER_NAME";
+
+ private final Context mContext;
+ private final NotificationManager mNotificationManager;
+
+ public NotificationController(Context context) {
+ mContext = context;
+ mNotificationManager = (NotificationManager)
+ mContext.getSystemService(Context.NOTIFICATION_SERVICE);
+ }
+
+ public void onPrintJobStateChanged(PrintJobInfo printJob) {
+ if (DEBUG) {
+ Log.i(LOG_TAG, "onPrintJobStateChanged() printJobId: " + printJob.getId()
+ + " state:" + PrintJobInfo.stateToString(printJob.getState()));
+ }
+ switch (printJob.getState()) {
+ case PrintJobInfo.STATE_QUEUED: {
+ createQueuingNotificaiton(printJob);
+ } break;
+
+ case PrintJobInfo.STATE_STARTED: {
+ createPrintingNotificaiton(printJob);
+ } break;
+
+ case PrintJobInfo.STATE_FAILED: {
+ createFailedNotificaiton(printJob);
+ } break;
+
+ case PrintJobInfo.STATE_COMPLETED:
+ case PrintJobInfo.STATE_CANCELED: {
+ removeNotification(printJob.getId());
+ } break;
+ }
+ }
+
+ private void createQueuingNotificaiton(PrintJobInfo printJob) {
+ Notification.Builder builder = new Notification.Builder(mContext)
+ // TODO: Use appropriate icon when assets are ready
+ .setSmallIcon(android.R.drawable.ic_secure)
+ .setContentTitle(mContext.getString(R.string.queued_notification_title_template,
+ printJob.getLabel()))
+ // TODO: Use appropriate icon when assets are ready
+ .addAction(android.R.drawable.ic_secure, mContext.getString(R.string.cancel),
+ createCancelIntent(printJob))
+ .setContentText(printJob.getPrinterId().getPrinterName())
+ .setWhen(System.currentTimeMillis())
+ .setOngoing(true)
+ .setShowWhen(true);
+ mNotificationManager.notify(printJob.getId(), builder.build());
+ }
+
+ private void createPrintingNotificaiton(PrintJobInfo printJob) {
+ Notification.Builder builder = new Notification.Builder(mContext)
+ // TODO: Use appropriate icon when assets are ready
+ .setSmallIcon(android.R.drawable.ic_secure)
+ .setContentTitle(mContext.getString(R.string.printing_notification_title_template,
+ printJob.getLabel()))
+ // TODO: Use appropriate icon when assets are ready
+ .addAction(android.R.drawable.ic_secure, mContext.getString(R.string.cancel),
+ createCancelIntent(printJob))
+ .setContentText(printJob.getPrinterId().getPrinterName())
+ .setWhen(System.currentTimeMillis())
+ .setOngoing(true)
+ .setShowWhen(true);
+ mNotificationManager.notify(printJob.getId(), builder.build());
+ }
+
+ private void createFailedNotificaiton(PrintJobInfo printJob) {
+ Notification.Builder builder = new Notification.Builder(mContext)
+ // TODO: Use appropriate icon when assets are ready
+ .setSmallIcon(android.R.drawable.ic_secure)
+ .setContentTitle(mContext.getString(R.string.failed_notification_title_template,
+ printJob.getLabel()))
+ // TODO: Use appropriate icon when assets are ready
+ .addAction(android.R.drawable.ic_secure, mContext.getString(R.string.cancel),
+ createCancelIntent(printJob))
+ // TODO: Use appropriate icon when assets are ready
+ .addAction(android.R.drawable.ic_secure, mContext.getString(R.string.restart),
+ createRestartIntent(printJob.getId()))
+ .setContentText(printJob.getFailureReason())
+ .setWhen(System.currentTimeMillis())
+ .setOngoing(true)
+ .setShowWhen(true);
+ mNotificationManager.notify(printJob.getId(), builder.build());
+ }
+
+ private void removeNotification(int printJobId) {
+ mNotificationManager.cancel(printJobId);
+ }
+
+ private PendingIntent createCancelIntent(PrintJobInfo printJob) {
+ Intent intent = new Intent(mContext, NotificationBroadcastReceiver.class);
+ intent.setAction(INTENT_ACTION_CANCEL_PRINTJOB + "_" + String.valueOf(printJob.getId()));
+ intent.putExtra(INTENT_EXTRA_PRINTJOB_ID, printJob.getId());
+ intent.putExtra(INTENT_EXTRA_PRINTJOB_LABEL, printJob.getLabel());
+ intent.putExtra(INTENT_EXTRA_PRINTER_NAME, printJob.getPrinterId().getPrinterName());
+ return PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT);
+ }
+
+ private PendingIntent createRestartIntent(int printJobId) {
+ Intent intent = new Intent(mContext, NotificationBroadcastReceiver.class);
+ intent.setAction(INTENT_ACTION_RESTART_PRINTJOB + "_" + String.valueOf(printJobId));
+ intent.putExtra(INTENT_EXTRA_PRINTJOB_ID, printJobId);
+ return PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT);
+ }
+
+ public static final class NotificationBroadcastReceiver extends BroadcastReceiver {
+ private static final String LOG_TAG = "NotificationBroadcastReceiver";
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (action != null && action.startsWith(INTENT_ACTION_CANCEL_PRINTJOB)) {
+ final int printJobId = intent.getExtras().getInt(INTENT_EXTRA_PRINTJOB_ID);
+ String printJobLabel = intent.getExtras().getString(INTENT_EXTRA_PRINTJOB_LABEL);
+ String printerName = intent.getExtras().getString(INTENT_EXTRA_PRINTER_NAME);
+ handleCancelPrintJob(context, printJobId, printJobLabel, printerName);
+ } else if (action != null && action.startsWith(INTENT_ACTION_RESTART_PRINTJOB)) {
+ final int printJobId = intent.getExtras().getInt(INTENT_EXTRA_PRINTJOB_ID);
+ handleRestartPrintJob(context, printJobId);
+ }
+ }
+
+ private void handleCancelPrintJob(final Context context, final int printJobId,
+ final String printJobLabel, final String printerName) {
+ if (DEBUG) {
+ Log.i(LOG_TAG, "handleCancelPrintJob() printJobId:" + printJobId);
+ }
+
+ // Put up a notification that we are trying to cancel.
+ NotificationManager notificationManager = (NotificationManager)
+ context.getSystemService(Context.NOTIFICATION_SERVICE);
+ Notification.Builder builder = new Notification.Builder(context)
+ // TODO: Use appropriate icon when assets are ready
+ .setSmallIcon(android.R.drawable.ic_secure)
+ .setContentTitle(context.getString(
+ R.string.cancelling_notification_title_template,
+ printJobLabel))
+ .setContentText(printerName)
+ .setWhen(System.currentTimeMillis())
+ .setOngoing(true)
+ .setShowWhen(true);
+ notificationManager.notify(printJobId, builder.build());
+
+ // Call into the print manager service off the main thread since
+ // the print manager service may end up binding to the print spooler
+ // service which binding is handled on the main thread.
+ PowerManager powerManager = (PowerManager)
+ context.getSystemService(Context.POWER_SERVICE);
+ final WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
+ LOG_TAG);
+ wakeLock.acquire();
+
+ new AsyncTask<Void, Void, Void>() {
+ @Override
+ protected Void doInBackground(Void... params) {
+ // We need to request the cancellation to be done by the print
+ // manager service since it has to communicate with the managing
+ // print service to request the cancellation. Also we need the
+ // system service to be bound to the spooler since canceling a
+ // print job will trigger persistence of current jobs which is
+ // done on another thread and until it finishes the spooler has
+ // to be kept around.
+ try {
+ IPrintManager printManager = IPrintManager.Stub.asInterface(
+ ServiceManager.getService(Context.PRINT_SERVICE));
+ printManager.cancelPrintJob(printJobId, PrintManager.APP_ID_ANY,
+ UserHandle.myUserId());
+ } catch (RemoteException re) {
+ Log.i(LOG_TAG, "Error requestion print job cancellation", re);
+ } finally {
+ wakeLock.release();
+ }
+ return null;
+ }
+ }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
+ }
+
+ private void handleRestartPrintJob(final Context context, final int printJobId) {
+ if (DEBUG) {
+ Log.i(LOG_TAG, "handleRestartPrintJob() printJobId:" + printJobId);
+ }
+
+ // Call into the print manager service off the main thread since
+ // the print manager service may end up binding to the print spooler
+ // service which binding is handled on the main thread.
+ PowerManager powerManager = (PowerManager)
+ context.getSystemService(Context.POWER_SERVICE);
+ final WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
+ LOG_TAG);
+ wakeLock.acquire();
+
+ new AsyncTask<Void, Void, Void>() {
+ @Override
+ protected Void doInBackground(Void... params) {
+ // We need to request the restart to be done by the print manager
+ // service since the latter must be bound to the spooler because
+ // restarting a print job will trigger persistence of current jobs
+ // which is done on another thread and until it finishes the spooler has
+ // to be kept around.
+ try {
+ IPrintManager printManager = IPrintManager.Stub.asInterface(
+ ServiceManager.getService(Context.PRINT_SERVICE));
+ printManager.restartPrintJob(printJobId, PrintManager.APP_ID_ANY,
+ UserHandle.myUserId());
+ } catch (RemoteException re) {
+ Log.i(LOG_TAG, "Error requestion print job restart", re);
+ } finally {
+ wakeLock.release();
+ }
+ return null;
+ }
+ }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
+ }
+ }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
index d61fd2c..4a19558 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
@@ -50,7 +50,6 @@
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.util.Log;
-import android.view.Choreographer;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
@@ -162,7 +161,7 @@
mCurrPrintAttributes.copyFrom(attributes);
}
- mSpooler = PrintSpooler.getInstance(this);
+ mSpooler = PrintSpooler.peekInstance();
mEditor = new Editor();
mDocument = new Document();
mController = new PrintController(new RemotePrintDocumentAdapter(
@@ -192,16 +191,16 @@
mPrinterDiscoveryObserver = null;
if (mController.isCancelled() || mController.isFailed()) {
mSpooler.setPrintJobState(mPrintJobId,
- PrintJobInfo.STATE_CANCELED);
+ PrintJobInfo.STATE_CANCELED, null);
} else if (mController.hasStarted()) {
mController.finish();
if (mEditor.isPrintConfirmed()) {
if (mController.isFinished()) {
mSpooler.setPrintJobState(mPrintJobId,
- PrintJobInfo.STATE_QUEUED);
+ PrintJobInfo.STATE_QUEUED, null);
} else {
mSpooler.setPrintJobState(mPrintJobId,
- PrintJobInfo.STATE_CANCELED);
+ PrintJobInfo.STATE_CANCELED, null);
}
}
}
@@ -568,6 +567,10 @@
@Override
public void onItemSelected(AdapterView<?> spinner, View view, int position, long id) {
if (spinner == mDestinationSpinner) {
+ if (mIgnoreNextDestinationChange) {
+ mIgnoreNextDestinationChange = false;
+ return;
+ }
mCurrPrintAttributes.clear();
SpinnerItem<PrinterInfo> dstItem = mDestinationSpinnerAdapter.getItem(position);
if (dstItem != null) {
@@ -590,12 +593,20 @@
}
updateUi();
} else if (spinner == mMediaSizeSpinner) {
+ if (mIgnoreNextMediaSizeChange) {
+ mIgnoreNextMediaSizeChange = false;
+ return;
+ }
SpinnerItem<MediaSize> mediaItem = mMediaSizeSpinnerAdapter.getItem(position);
mCurrPrintAttributes.setMediaSize(mediaItem.value);
if (!hasErrors()) {
mController.update();
}
} else if (spinner == mColorModeSpinner) {
+ if (mIgnoreNextColorModeChange) {
+ mIgnoreNextColorModeChange = false;
+ return;
+ }
SpinnerItem<Integer> colorModeItem =
mColorModeSpinnerAdapter.getItem(position);
mCurrPrintAttributes.setColorMode(colorModeItem.value);
@@ -603,6 +614,10 @@
mController.update();
}
} else if (spinner == mOrientationSpinner) {
+ if (mIgnoreNextOrientationChange) {
+ mIgnoreNextOrientationChange = false;
+ return;
+ }
SpinnerItem<Integer> orientationItem =
mOrientationSpinnerAdapter.getItem(position);
mCurrPrintAttributes.setOrientation(orientationItem.value);
@@ -610,6 +625,10 @@
mController.update();
}
} else if (spinner == mRangeOptionsSpinner) {
+ if (mIgnoreNextRangeOptionChange) {
+ mIgnoreNextRangeOptionChange = false;
+ return;
+ }
updateUi();
if (!hasErrors()) {
mController.update();
@@ -636,6 +655,11 @@
@Override
public void afterTextChanged(Editable editable) {
+ if (mIgnoreNextCopiesChange) {
+ mIgnoreNextCopiesChange = false;
+ return;
+ }
+
final boolean hadErrors = hasErrors();
if (editable.length() == 0) {
@@ -674,6 +698,11 @@
@Override
public void afterTextChanged(Editable editable) {
+ if (mIgnoreNextRangeChange) {
+ mIgnoreNextRangeChange = false;
+ return;
+ }
+
final boolean hadErrors = hasErrors();
String text = editable.toString();
@@ -716,9 +745,19 @@
private int mEditorState;
+ private boolean mIgnoreNextDestinationChange;
+ private boolean mIgnoreNextMediaSizeChange;
+ private boolean mIgnoreNextColorModeChange;
+ private boolean mIgnoreNextOrientationChange;
+ private boolean mIgnoreNextRangeOptionChange;
+ private boolean mIgnoreNextCopiesChange;
+ private boolean mIgnoreNextRangeChange;
+
public Editor() {
// Copies
mCopiesEditText = (EditText) findViewById(R.id.copies_edittext);
+ mCopiesEditText.setText(String.valueOf(MIN_COPIES));
+ mSpooler.setPrintJobCopiesNoPersistence(mPrintJobId, MIN_COPIES);
mCopiesEditText.addTextChangedListener(mCopiesTextWatcher);
mCopiesEditText.selectAll();
@@ -772,19 +811,12 @@
rangeOptionsValues[i], rangeOptionsLabels[i]));
}
mRangeOptionsSpinner.setAdapter(mRangeOptionsSpinnerAdapter);
- mRangeOptionsSpinner.setSelection(0);
- // Here is some voodoo to circumvent the weird behavior of AdapterView
- // in which a selection listener may get a callback for an event that
- // happened before the listener was registered. The reason for that is
- // that the selection change is handled on the next layout pass.
- Choreographer.getInstance().postCallbackDelayed(Choreographer.CALLBACK_TRAVERSAL,
- new Runnable() {
- @Override
- public void run() {
- mRangeOptionsSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
- }
- }, null, Choreographer.getFrameDelay() * 2);
+ if (mRangeOptionsSpinner.getSelectedItemPosition() != 0) {
+ mIgnoreNextRangeOptionChange = true;
+ mRangeOptionsSpinner.setSelection(0);
+ }
+ // Preview button
mPrintPreviewButton = (Button) findViewById(R.id.print_preview_button);
mPrintPreviewButton.setOnClickListener(new OnClickListener() {
@Override
@@ -797,6 +829,7 @@
}
});
+ // Print button
mPrintButton = (Button) findViewById(R.id.print_button);
mPrintButton.setOnClickListener(new OnClickListener() {
@Override
@@ -806,11 +839,16 @@
mController.update();
}
});
+
+ updateUi();
}
public void initialize() {
mEditorState = EDITOR_STATE_INITIALIZED;
- mDestinationSpinner.setSelection(AdapterView.INVALID_POSITION);
+ if (mDestinationSpinner.getSelectedItemPosition() != AdapterView.INVALID_POSITION) {
+ mIgnoreNextDestinationChange = true;
+ mDestinationSpinner.setSelection(AdapterView.INVALID_POSITION);
+ }
}
public boolean isCancelled() {
@@ -900,35 +938,47 @@
// Destination
mDestinationSpinner.setEnabled(false);
- mCopiesEditText.removeTextChangedListener(mCopiesTextWatcher);
- mCopiesEditText.setText(String.valueOf(MIN_COPIES));
- mCopiesEditText.addTextChangedListener(mCopiesTextWatcher);
+ String minCopiesString = String.valueOf(MIN_COPIES);
+ if (!TextUtils.equals(mCopiesEditText.getText(), minCopiesString)) {
+ mIgnoreNextCopiesChange = true;
+ mCopiesEditText.setText(minCopiesString);
+ }
mCopiesEditText.setEnabled(false);
// Media size
- mMediaSizeSpinner.setOnItemSelectedListener(null);
- mMediaSizeSpinner.setSelection(AdapterView.INVALID_POSITION);
+ if (mMediaSizeSpinner.getSelectedItemPosition() != AdapterView.INVALID_POSITION) {
+ mIgnoreNextMediaSizeChange = true;
+ mMediaSizeSpinner.setSelection(AdapterView.INVALID_POSITION);
+ }
mMediaSizeSpinner.setEnabled(false);
// Color mode
- mColorModeSpinner.setOnItemSelectedListener(null);
- mColorModeSpinner.setSelection(AdapterView.INVALID_POSITION);
+ if (mColorModeSpinner.getSelectedItemPosition() != AdapterView.INVALID_POSITION) {
+ mIgnoreNextColorModeChange = true;
+ mColorModeSpinner.setSelection(AdapterView.INVALID_POSITION);
+ }
mColorModeSpinner.setEnabled(false);
// Orientation
- mOrientationSpinner.setOnItemSelectedListener(null);
- mOrientationSpinner.setSelection(AdapterView.INVALID_POSITION);
+ if (mOrientationSpinner.getSelectedItemPosition() != AdapterView.INVALID_POSITION) {
+ mIgnoreNextOrientationChange = true;
+ mOrientationSpinner.setSelection(AdapterView.INVALID_POSITION);
+ }
mOrientationSpinner.setEnabled(false);
// Range
- mRangeOptionsSpinner.setOnItemSelectedListener(null);
- mRangeOptionsSpinner.setSelection(0);
+ if (mRangeOptionsSpinner.getSelectedItemPosition() != 0) {
+ mIgnoreNextRangeOptionChange = true;
+ mRangeOptionsSpinner.setSelection(0);
+ }
mRangeOptionsSpinner.setEnabled(false);
mRangeTitle.setText(getString(R.string.label_pages,
getString(R.string.page_count_unknown)));
- mRangeEditText.removeTextChangedListener(mRangeTextWatcher);
- mRangeEditText.setText("");
- mRangeEditText.addTextChangedListener(mRangeTextWatcher);
+ if (!TextUtils.equals(mRangeEditText.getText(), "")) {
+ mIgnoreNextRangeChange = true;
+ mRangeEditText.setText("");
+ }
+
mRangeEditText.setEnabled(false);
mRangeEditText.setVisibility(View.INVISIBLE);
@@ -974,8 +1024,10 @@
mMediaSizeSpinner.setEnabled(true);
final int selectedMediaSizeIndex = Math.max(mediaSizes.indexOf(
defaultAttributes.getMediaSize()), 0);
- mMediaSizeSpinner.setOnItemSelectedListener(null);
- mMediaSizeSpinner.setSelection(selectedMediaSizeIndex);
+ if (mMediaSizeSpinner.getSelectedItemPosition() != selectedMediaSizeIndex) {
+ mIgnoreNextMediaSizeChange = true;
+ mMediaSizeSpinner.setSelection(selectedMediaSizeIndex);
+ }
}
}
@@ -1014,8 +1066,10 @@
mColorModeSpinner.setEnabled(true);
final int selectedColorModeIndex = Integer.numberOfTrailingZeros(
(colorModes & defaultAttributes.getColorMode()));
- mColorModeSpinner.setOnItemSelectedListener(null);
- mColorModeSpinner.setSelection(selectedColorModeIndex);
+ if (mColorModeSpinner.getSelectedItemPosition() != selectedColorModeIndex) {
+ mIgnoreNextColorModeChange = true;
+ mColorModeSpinner.setSelection(selectedColorModeIndex);
+ }
}
}
@@ -1055,8 +1109,11 @@
mOrientationSpinner.setEnabled(true);
final int selectedOrientationIndex = Integer.numberOfTrailingZeros(
(orientations & defaultAttributes.getOrientation()));
- mOrientationSpinner.setOnItemSelectedListener(null);
- mOrientationSpinner.setSelection(selectedOrientationIndex);
+ if (mOrientationSpinner.getSelectedItemPosition()
+ != selectedOrientationIndex) {
+ mIgnoreNextOrientationChange = true;
+ mOrientationSpinner.setSelection(selectedOrientationIndex);
+ }
}
}
@@ -1080,8 +1137,10 @@
? getString(R.string.page_count_unknown)
: String.valueOf(pageCount)));
} else {
- mRangeOptionsSpinner.setOnItemSelectedListener(null);
- mRangeOptionsSpinner.setSelection(0);
+ if (mRangeOptionsSpinner.getSelectedItemPosition() != 0) {
+ mIgnoreNextRangeOptionChange = true;
+ mRangeOptionsSpinner.setSelection(0);
+ }
mRangeOptionsSpinner.setEnabled(false);
mRangeTitle.setText(getString(R.string.label_pages,
getString(R.string.page_count_unknown)));
@@ -1109,26 +1168,12 @@
// Copies
if (mCopiesEditText.getError() == null
&& TextUtils.isEmpty(mCopiesEditText.getText())) {
+ mIgnoreNextCopiesChange = true;
mCopiesEditText.setText(String.valueOf(MIN_COPIES));
mCopiesEditText.selectAll();
mCopiesEditText.requestFocus();
}
}
-
- // Here is some voodoo to circumvent the weird behavior of AdapterView
- // in which a selection listener may get a callback for an event that
- // happened before the listener was registered. The reason for that is
- // that the selection change is handled on the next layout pass.
- Choreographer.getInstance().postCallbackDelayed(Choreographer.CALLBACK_TRAVERSAL,
- new Runnable() {
- @Override
- public void run() {
- mMediaSizeSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
- mColorModeSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
- mOrientationSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
- mRangeOptionsSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
- }
- }, null, Choreographer.getFrameDelay() * 2);
}
public void addPrinters(List<PrinterInfo> addedPrinters) {
@@ -1146,7 +1191,7 @@
}
if (!duplicate) {
mDestinationSpinnerAdapter.add(new SpinnerItem<PrinterInfo>(
- addedPrinter, addedPrinter.getLabel()));
+ addedPrinter, addedPrinter.getId().getPrinterName()));
} else {
Log.w(LOG_TAG, "Skipping a duplicate printer: " + addedPrinter);
}
@@ -1269,14 +1314,14 @@
PrinterInfo printerInfo = getItem(position).value;
TextView title = (TextView) convertView.findViewById(R.id.title);
- title.setText(printerInfo.getLabel());
+ title.setText(printerInfo.getId().getPrinterName());
try {
TextView subtitle = (TextView)
convertView.findViewById(R.id.subtitle);
PackageManager pm = getPackageManager();
PackageInfo packageInfo = pm.getPackageInfo(
- printerInfo.getId().getService().getPackageName(), 0);
+ printerInfo.getId().getServiceName().getPackageName(), 0);
subtitle.setText(packageInfo.applicationInfo.loadLabel(pm));
subtitle.setVisibility(View.VISIBLE);
} catch (NameNotFoundException nnfe) {
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
index 870bfffd..0bc20a3 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
@@ -19,13 +19,8 @@
import android.content.ComponentName;
import android.content.Context;
import android.os.AsyncTask;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
import android.os.ParcelFileDescriptor;
-import android.os.RemoteException;
import android.print.IPrintClient;
-import android.print.IPrintSpoolerClient;
import android.print.IPrinterDiscoveryObserver;
import android.print.PageRange;
import android.print.PrintAttributes;
@@ -42,7 +37,6 @@
import android.util.Slog;
import android.util.Xml;
-import com.android.internal.os.SomeArgs;
import com.android.internal.util.FastXmlSerializer;
import libcore.io.IoUtils;
@@ -57,9 +51,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
public class PrintSpooler {
@@ -85,67 +77,40 @@
private final PersistenceManager mPersistanceManager;
- private final Handler mHandler;
+ private final NotificationController mNotificationController;
- private final Context mContext;
+ private final PrintSpoolerService mService;
- public IPrintSpoolerClient mClient;
-
- public static PrintSpooler getInstance(Context context) {
+ public static void destroyInstance() {
synchronized (sLock) {
- if (sInstance == null) {
- sInstance = new PrintSpooler(context);
- }
+ sInstance = null;
+ }
+ }
+
+ public static void createInstance(PrintSpoolerService service) {
+ synchronized (sLock) {
+ sInstance = new PrintSpooler(service);
+ }
+ }
+
+ public static PrintSpooler peekInstance() {
+ synchronized (sLock) {
return sInstance;
}
}
- private PrintSpooler(Context context) {
- mContext = context;
- mPersistanceManager = new PersistenceManager(context);
- mHandler = new MyHandler(context.getMainLooper());
- }
-
- public void setCleint(IPrintSpoolerClient client) {
- synchronized (mLock) {
- mClient = client;
- }
- }
-
- public void restorePersistedState() {
+ private PrintSpooler(PrintSpoolerService service) {
+ mService = service;
+ mPersistanceManager = new PersistenceManager(service);
+ mNotificationController = new NotificationController(service);
synchronized (mLock) {
mPersistanceManager.readStateLocked();
+ handleReadPrintJobsLocked();
}
}
- public void onReqeustUpdatePrinters(List<PrinterId> printers) {
- synchronized (mLock) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = mClient;
- args.arg2 = printers;
- mHandler.obtainMessage(MyHandler.MSG_REQUEST_UPDATE_PRINTERS,
- args).sendToTarget();
- }
- }
-
- public void startPrinterDiscovery(IPrinterDiscoveryObserver observer) {
- synchronized (mLock) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = mClient;
- args.arg2 = observer;
- mHandler.obtainMessage(MyHandler.MSG_START_PRINTER_DISCOVERY,
- args).sendToTarget();
- }
- }
-
- public void stopPrinterDiscovery() {
- synchronized (mLock) {
- mHandler.obtainMessage(MyHandler.MSG_STOP_PRINTER_DISCOVERY,
- mClient).sendToTarget();
- }
- }
-
- public List<PrintJobInfo> getPrintJobInfos(ComponentName componentName, int state, int appId) {
+ public List<PrintJobInfo> getPrintJobInfos(ComponentName componentName,
+ int state, int appId) {
List<PrintJobInfo> foundPrintJobs = null;
synchronized (mLock) {
final int printJobCount = mPrintJobs.size();
@@ -154,7 +119,7 @@
PrinterId printerId = printJob.getPrinterId();
final boolean sameComponent = (componentName == null
|| (printerId != null
- && componentName.equals(printerId.getService())));
+ && componentName.equals(printerId.getServiceName())));
final boolean sameAppId = appId == PrintManager.APP_ID_ANY
|| printJob.getAppId() == appId;
final boolean sameState = (state == printJob.getState())
@@ -187,21 +152,6 @@
}
}
- public boolean cancelPrintJob(int printJobId, int appId) {
- synchronized (mLock) {
- PrintJobInfo printJob = getPrintJobInfo(printJobId, appId);
- if (printJob != null) {
- switch (printJob.getState()) {
- case PrintJobInfo.STATE_CREATED:
- case PrintJobInfo.STATE_QUEUED: {
- setPrintJobState(printJobId, PrintJobInfo.STATE_CANCELED);
- } return true;
- }
- }
- return false;
- }
- }
-
public PrintJobInfo createPrintJob(CharSequence label, IPrintClient client,
PrintAttributes attributes, int appId) {
synchronized (mLock) {
@@ -219,79 +169,48 @@
}
}
- public void notifyClientForActivteJobs() {
- IPrintSpoolerClient client = null;
- Map<ComponentName, List<PrintJobInfo>> activeJobsPerServiceMap =
- new HashMap<ComponentName, List<PrintJobInfo>>();
+ private void handleReadPrintJobsLocked() {
+ final int printJobCount = mPrintJobs.size();
+ for (int i = 0; i < printJobCount; i++) {
+ PrintJobInfo printJob = mPrintJobs.get(i);
+ // Update the notification.
+ mNotificationController.onPrintJobStateChanged(printJob);
+
+ //TODO: Figure out what the right policy for read print jobs is.
+
+ switch (printJob.getState()) {
+ case PrintJobInfo.STATE_QUEUED: {
+ // Notify that we have a queued job.
+ mService.onPrintJobQueued(new PrintJobInfo(printJob));
+ } break;
+
+ case PrintJobInfo.STATE_STARTED: {
+ // We really want to restart this print job.
+ setPrintJobState(printJob.getId(), PrintJobInfo.STATE_QUEUED, null);
+ } break;
+ }
+ }
+ }
+
+ public void checkAllPrintJobsHandled() {
synchronized (mLock) {
- if (mClient == null) {
- throw new IllegalStateException("Client cannot be null.");
- }
- client = mClient;
-
- final int printJobCount = mPrintJobs.size();
- for (int i = 0; i < printJobCount; i++) {
- PrintJobInfo printJob = mPrintJobs.get(i);
- switch (printJob.getState()) {
- case PrintJobInfo.STATE_CREATED: {
- /* skip - not ready to be handled by a service */
- } break;
-
- case PrintJobInfo.STATE_QUEUED:
- case PrintJobInfo.STATE_STARTED: {
- ComponentName service = printJob.getPrinterId().getService();
- List<PrintJobInfo> jobsPerService = activeJobsPerServiceMap.get(service);
- if (jobsPerService == null) {
- jobsPerService = new ArrayList<PrintJobInfo>();
- activeJobsPerServiceMap.put(service, jobsPerService);
- }
- jobsPerService.add(printJob);
- } break;
-
- default: {
- ComponentName service = printJob.getPrinterId().getService();
- if (!activeJobsPerServiceMap.containsKey(service)) {
- activeJobsPerServiceMap.put(service, null);
- }
- }
- }
+ if (!hasActivePrintJobsLocked()) {
+ notifyOnAllPrintJobsHandled();
}
}
+ }
- boolean allPrintJobsHandled = true;
+ public void startPrinterDiscovery(IPrinterDiscoveryObserver observer) {
+ mService.startPrinterDiscovery(observer);
+ }
- for (Map.Entry<ComponentName, List<PrintJobInfo>> entry
- : activeJobsPerServiceMap.entrySet()) {
- ComponentName service = entry.getKey();
- List<PrintJobInfo> printJobs = entry.getValue();
+ public void stopPrinterDiscovery() {
+ mService.stopPrinterDiscovery();
+ }
- if (printJobs != null) {
- allPrintJobsHandled = false;
- final int printJobCount = printJobs.size();
- for (int i = 0; i < printJobCount; i++) {
- PrintJobInfo printJob = printJobs.get(i);
- if (printJob.getState() == PrintJobInfo.STATE_QUEUED) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = client;
- args.arg2 = new PrintJobInfo(printJob);
- mHandler.obtainMessage(MyHandler.MSG_PRINT_JOB_QUEUED,
- args).sendToTarget();
- }
- }
- } else {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = client;
- args.arg2 = service;
- mHandler.obtainMessage(MyHandler.MSG_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED,
- args).sendToTarget();
- }
- }
-
- if (allPrintJobsHandled) {
- mHandler.obtainMessage(MyHandler.MSG_ALL_PRINT_JOBS_HANDLED,
- client).sendToTarget();
- }
+ public void onReqeustUpdatePrinters(List<PrinterId> printerIds) {
+ mService.onReqeustUpdatePrinters(printerIds);
}
private int generatePrintJobIdLocked() {
@@ -353,7 +272,7 @@
}
public File generateFileForPrintJob(int printJobId) {
- return new File(mContext.getFilesDir(), "print_job_"
+ return new File(mService.getFilesDir(), "print_job_"
+ printJobId + "." + PRINT_FILE_EXTENSION);
}
@@ -373,89 +292,72 @@
}
}
- public boolean setPrintJobState(int printJobId, int state) {
+ public boolean setPrintJobState(int printJobId, int state, CharSequence error) {
boolean success = false;
synchronized (mLock) {
- if (mClient == null) {
- throw new IllegalStateException("Client cannot be null.");
- }
-
PrintJobInfo printJob = getPrintJobInfo(printJobId, PrintManager.APP_ID_ANY);
- if (printJob != null && printJob.getState() < state) {
+ if (printJob != null) {
success = true;
+
printJob.setState(state);
+ printJob.setFailureReason(error);
+ mNotificationController.onPrintJobStateChanged(printJob);
if (DEBUG_PRINT_JOB_LIFECYCLE) {
Slog.i(LOG_TAG, "[STATE CHANGED] " + printJob);
}
- // TODO: Update notifications.
switch (state) {
case PrintJobInfo.STATE_COMPLETED:
- case PrintJobInfo.STATE_CANCELED: {
+ case PrintJobInfo.STATE_CANCELED:
removePrintJobLocked(printJob);
-
- // No printer means creation of a print job was cancelled,
- // therefore the state of the spooler did not change and no
- // notifications are needed. We also do not need to persist
- // the state.
+ // $fall-through$
+ case PrintJobInfo.STATE_FAILED: {
PrinterId printerId = printJob.getPrinterId();
- if (printerId == null) {
- return true;
- }
-
- ComponentName service = printerId.getService();
- if (!hasActivePrintJobsForServiceLocked(service)) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = mClient;
- args.arg2 = service;
- mHandler.obtainMessage(
- MyHandler.MSG_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED,
- args).sendToTarget();
- }
-
- if (!hasActivePrintJobsLocked()) {
- mHandler.obtainMessage(MyHandler.MSG_ALL_PRINT_JOBS_HANDLED,
- mClient).sendToTarget();
+ if (printerId != null) {
+ ComponentName service = printerId.getServiceName();
+ if (!hasActivePrintJobsForServiceLocked(service)) {
+ mService.onAllPrintJobsForServiceHandled(service);
+ }
}
} break;
case PrintJobInfo.STATE_QUEUED: {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = mClient;
- args.arg2 = new PrintJobInfo(printJob);
- mHandler.obtainMessage(MyHandler.MSG_PRINT_JOB_QUEUED,
- args).sendToTarget();
+ mService.onPrintJobQueued(new PrintJobInfo(printJob));
} break;
}
if (shouldPersistPrintJob(printJob)) {
mPersistanceManager.writeStateLocked();
}
+
+ if (!hasActivePrintJobsLocked()) {
+ notifyOnAllPrintJobsHandled();
+ }
}
}
return success;
}
- private boolean hasActivePrintJobsLocked() {
+ public boolean hasActivePrintJobsLocked() {
final int printJobCount = mPrintJobs.size();
for (int i = 0; i < printJobCount; i++) {
PrintJobInfo printJob = mPrintJobs.get(i);
- if (!isActiveState(printJob.getState())) {
+ if (isActiveState(printJob.getState())) {
return true;
}
}
return false;
}
- private boolean hasActivePrintJobsForServiceLocked(ComponentName service) {
+ public boolean hasActivePrintJobsForServiceLocked(ComponentName service) {
final int printJobCount = mPrintJobs.size();
for (int i = 0; i < printJobCount; i++) {
PrintJobInfo printJob = mPrintJobs.get(i);
- if (!isActiveState(printJob.getState())
- && printJob.getPrinterId().getService().equals(service)) {
+ if (isActiveState(printJob.getState())
+ && printJob.getPrinterId().getServiceName().equals(service)) {
return true;
}
}
@@ -463,9 +365,9 @@
}
private static boolean isActiveState(int printJobState) {
- return printJobState != PrintJobInfo.STATE_CREATED
- || printJobState != PrintJobInfo.STATE_QUEUED
- || printJobState != PrintJobInfo.STATE_STARTED;
+ return printJobState == PrintJobInfo.STATE_CREATED
+ || printJobState == PrintJobInfo.STATE_QUEUED
+ || printJobState == PrintJobInfo.STATE_STARTED;
}
public boolean setPrintJobTag(int printJobId, String tag) {
@@ -539,6 +441,20 @@
return printJob.getState() >= PrintJobInfo.STATE_QUEUED;
}
+ private void notifyOnAllPrintJobsHandled() {
+ // This has to run on the tread that is persisting the current state
+ // since this call may result in the system unbinding from the spooler
+ // and as a result the spooler process may get killed before the write
+ // completes.
+ new AsyncTask<Void, Void, Void>() {
+ @Override
+ protected Void doInBackground(Void... params) {
+ mService.onAllPrintJobsHandled();
+ return null;
+ }
+ }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
+ }
+
private final class PersistenceManager {
private static final String PERSIST_FILE_NAME = "print_spooler_state.xml";
@@ -569,8 +485,8 @@
private static final String ATTR_FITTING_MODE = "fittingMode";
private static final String ATTR_ORIENTATION = "orientation";
- private static final String ATTR_LOCAL_ID = "localId";
- private static final String ATTR_SERVICE = "service";
+ private static final String ATTR_PRINTER_NAME = "printerName";
+ private static final String ATTR_SERVICE_NAME = "serviceName";
private static final String ATTR_WIDTH_MILS = "widthMils";
private static final String ATTR_HEIGHT_MILS = "heightMils";
@@ -659,8 +575,8 @@
PrinterId printerId = printJob.getPrinterId();
if (printerId != null) {
serializer.startTag(null, TAG_PRINTER_ID);
- serializer.attribute(null, ATTR_LOCAL_ID, printerId.getLocalId());
- serializer.attribute(null, ATTR_SERVICE, printerId.getService()
+ serializer.attribute(null, ATTR_PRINTER_NAME, printerId.getPrinterName());
+ serializer.attribute(null, ATTR_SERVICE_NAME, printerId.getServiceName()
.flattenToString());
serializer.endTag(null, TAG_PRINTER_ID);
}
@@ -811,17 +727,17 @@
parser.setInput(in, null);
parseState(parser);
} catch (IllegalStateException ise) {
- Slog.w(LOG_TAG, "Failed parsing " + ise);
+ Slog.w(LOG_TAG, "Failed parsing ", ise);
} catch (NullPointerException npe) {
- Slog.w(LOG_TAG, "Failed parsing " + npe);
+ Slog.w(LOG_TAG, "Failed parsing ", npe);
} catch (NumberFormatException nfe) {
- Slog.w(LOG_TAG, "Failed parsing " + nfe);
+ Slog.w(LOG_TAG, "Failed parsing ", nfe);
} catch (XmlPullParserException xppe) {
- Slog.w(LOG_TAG, "Failed parsing " + xppe);
+ Slog.w(LOG_TAG, "Failed parsing ", xppe);
} catch (IOException ioe) {
- Slog.w(LOG_TAG, "Failed parsing " + ioe);
+ Slog.w(LOG_TAG, "Failed parsing ", ioe);
} catch (IndexOutOfBoundsException iobe) {
- Slog.w(LOG_TAG, "Failed parsing " + iobe);
+ Slog.w(LOG_TAG, "Failed parsing ", iobe);
} finally {
try {
in.close();
@@ -867,16 +783,16 @@
printJob.setUserId(userId);
String tag = parser.getAttributeValue(null, ATTR_TAG);
printJob.setTag(tag);
- String copies = parser.getAttributeValue(null, ATTR_TAG);
+ String copies = parser.getAttributeValue(null, ATTR_COPIES);
printJob.setCopies(Integer.parseInt(copies));
parser.next();
skipEmptyTextTags(parser);
if (accept(parser, XmlPullParser.START_TAG, TAG_PRINTER_ID)) {
- String localId = parser.getAttributeValue(null, ATTR_LOCAL_ID);
+ String localId = parser.getAttributeValue(null, ATTR_PRINTER_NAME);
ComponentName service = ComponentName.unflattenFromString(parser.getAttributeValue(
- null, ATTR_SERVICE));
+ null, ATTR_SERVICE_NAME));
printJob.setPrinterId(new PrinterId(service, localId));
parser.next();
skipEmptyTextTags(parser);
@@ -1064,108 +980,4 @@
return true;
}
}
-
- private final class MyHandler extends Handler {
- public static final int MSG_START_PRINTER_DISCOVERY = 1;
- public static final int MSG_STOP_PRINTER_DISCOVERY = 2;
- public static final int MSG_PRINT_JOB_QUEUED = 3;
- public static final int MSG_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED = 4;
- public static final int MSG_ALL_PRINT_JOBS_HANDLED = 5;
- public static final int MSG_REQUEST_UPDATE_PRINTERS = 6;
-
- public MyHandler(Looper looper) {
- super(looper, null, false);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void handleMessage(Message message) {
- switch (message.what) {
- case MSG_START_PRINTER_DISCOVERY: {
- SomeArgs args = (SomeArgs) message.obj;
- IPrintSpoolerClient client = (IPrintSpoolerClient) args.arg1;
- IPrinterDiscoveryObserver observer = (IPrinterDiscoveryObserver) args.arg2;
- args.recycle();
- if (client != null) {
- try {
- client.onStartPrinterDiscovery(observer);
- } catch (RemoteException re) {
- Log.e(LOG_TAG, "Error notifying start printer discovery.", re);
- }
- }
- } break;
-
- case MSG_STOP_PRINTER_DISCOVERY: {
- IPrintSpoolerClient client = (IPrintSpoolerClient) message.obj;
- if (client != null) {
- try {
- client.onStopPrinterDiscovery();
- } catch (RemoteException re) {
- Log.e(LOG_TAG, "Error notifying stop printer discovery.", re);
- }
- }
- } break;
-
- case MSG_PRINT_JOB_QUEUED: {
- SomeArgs args = (SomeArgs) message.obj;
- IPrintSpoolerClient client = (IPrintSpoolerClient) args.arg1;
- PrintJobInfo printJob = (PrintJobInfo) args.arg2;
- args.recycle();
- if (client != null) {
- try {
- client.onPrintJobQueued(printJob);
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error notify for a queued print job.", re);
- }
- }
- } break;
-
- case MSG_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED: {
- SomeArgs args = (SomeArgs) message.obj;
- IPrintSpoolerClient client = (IPrintSpoolerClient) args.arg1;
- ComponentName service = (ComponentName) args.arg2;
- args.recycle();
- if (client != null) {
- try {
- client.onAllPrintJobsForServiceHandled(service);
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error notify for all print jobs per service"
- + " handled.", re);
- }
- }
- } break;
-
- case MSG_ALL_PRINT_JOBS_HANDLED: {
- final IPrintSpoolerClient client = (IPrintSpoolerClient) message.obj;
- // This has to run on the tread that is persisting the current state
- // since this call may result in the system unbinding from the spooler
- // and as a result the spooler process may get killed before the write
- // completes.
- new AsyncTask<Void, Void, Void>() {
- @Override
- protected Void doInBackground(Void... params) {
- try {
- client.onAllPrintJobsHandled();
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error notify for all print job handled.", re);
- }
- return null;
- }
- }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
- } break;
-
- case MSG_REQUEST_UPDATE_PRINTERS: {
- SomeArgs args = (SomeArgs) message.obj;
- IPrintSpoolerClient client = (IPrintSpoolerClient) args.arg1;
- List<PrinterId> printerIds = (List<PrinterId>) args.arg2;
- args.recycle();
- try {
- client.onRequestUpdatePrinters(printerIds);
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error requesting to update pritners.", re);
- }
- } break;
- }
- }
- }
}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
index 5ff2aa6..e5153e7 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
@@ -16,8 +16,6 @@
package com.android.printspooler;
-import java.util.List;
-
import android.app.PendingIntent;
import android.app.Service;
import android.content.ComponentName;
@@ -29,44 +27,48 @@
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
-import android.print.IPrintDocumentAdapter;
import android.print.IPrintClient;
-import android.print.IPrintSpoolerClient;
+import android.print.IPrintDocumentAdapter;
import android.print.IPrintSpooler;
import android.print.IPrintSpoolerCallbacks;
+import android.print.IPrintSpoolerClient;
+import android.print.IPrinterDiscoveryObserver;
import android.print.PrintAttributes;
import android.print.PrintJobInfo;
+import android.print.PrinterId;
+import android.util.Log;
import android.util.Slog;
import com.android.internal.os.SomeArgs;
+import java.util.List;
+
/**
* Service for exposing some of the {@link PrintSpooler} functionality to
* another process.
*/
public final class PrintSpoolerService extends Service {
+ private static final long CHECK_ALL_PRINTJOBS_HANDLED_DELAY = 5000;
+
private static final String LOG_TAG = "PrintSpoolerService";
private Intent mStartPrintJobConfigActivityIntent;
- private PrintSpooler mSpooler;
+ private IPrintSpoolerClient mClient;
- private Handler mHanlder;
+ private Handler mHandler;
@Override
public void onCreate() {
super.onCreate();
mStartPrintJobConfigActivityIntent = new Intent(PrintSpoolerService.this,
PrintJobConfigActivity.class);
- mSpooler = PrintSpooler.getInstance(this);
- mHanlder = new MyHandler(getMainLooper());
+ mHandler = new MyHandler(getMainLooper());
}
@Override
public IBinder onBind(Intent intent) {
- mSpooler.restorePersistedState();
-
return new IPrintSpooler.Stub() {
@Override
public void getPrintJobInfos(IPrintSpoolerCallbacks callback,
@@ -74,7 +76,8 @@
throws RemoteException {
List<PrintJobInfo> printJobs = null;
try {
- printJobs = mSpooler.getPrintJobInfos(componentName, state, appId);
+ printJobs = PrintSpooler.peekInstance().getPrintJobInfos(
+ componentName, state, appId);
} finally {
callback.onGetPrintJobInfosResult(printJobs, sequence);
}
@@ -85,23 +88,12 @@
int appId, int sequence) throws RemoteException {
PrintJobInfo printJob = null;
try {
- printJob = mSpooler.getPrintJobInfo(printJobId, appId);
+ printJob = PrintSpooler.peekInstance().getPrintJobInfo(printJobId, appId);
} finally {
callback.onGetPrintJobInfoResult(printJob, sequence);
}
}
- @Override
- public void cancelPrintJob(int printJobId, IPrintSpoolerCallbacks callback,
- int appId, int sequence) throws RemoteException {
- boolean success = false;
- try {
- success = mSpooler.cancelPrintJob(printJobId, appId);
- } finally {
- callback.onCancelPrintJobResult(success, sequence);
- }
- }
-
@SuppressWarnings("deprecation")
@Override
public void createPrintJob(String printJobName, IPrintClient client,
@@ -110,7 +102,7 @@
throws RemoteException {
PrintJobInfo printJob = null;
try {
- printJob = mSpooler.createPrintJob(printJobName, client,
+ printJob = PrintSpooler.peekInstance().createPrintJob(printJobName, client,
attributes, appId);
if (printJob != null) {
Intent intent = mStartPrintJobConfigActivityIntent;
@@ -127,7 +119,8 @@
SomeArgs args = SomeArgs.obtain();
args.arg1 = client;
args.arg2 = sender;
- mHanlder.obtainMessage(0, args).sendToTarget();
+ mHandler.obtainMessage(MyHandler.MSG_START_PRINT_JOB_CONFIG_ACTIVITY,
+ args).sendToTarget();
}
} finally {
callback.onCreatePrintJobResult(printJob, sequence);
@@ -135,14 +128,12 @@
}
@Override
- public void setPrintJobState(int printJobId, int state,
- IPrintSpoolerCallbacks callback, int sequece)
- throws RemoteException {
+ public void setPrintJobState(int printJobId, int state, CharSequence error,
+ IPrintSpoolerCallbacks callback, int sequece) throws RemoteException {
boolean success = false;
try {
- // TODO: Make sure the clients (print services) can set the state
- // only to acceptable ones, e.g. not settings STATE_CREATED.
- success = mSpooler.setPrintJobState(printJobId, state);
+ success = PrintSpooler.peekInstance().setPrintJobState(
+ printJobId, state, error);
} finally {
callback.onSetPrintJobStateResult(success, sequece);
}
@@ -150,11 +141,10 @@
@Override
public void setPrintJobTag(int printJobId, String tag,
- IPrintSpoolerCallbacks callback, int sequece)
- throws RemoteException {
+ IPrintSpoolerCallbacks callback, int sequece) throws RemoteException {
boolean success = false;
try {
- success = mSpooler.setPrintJobTag(printJobId, tag);
+ success = PrintSpooler.peekInstance().setPrintJobTag(printJobId, tag);
} finally {
callback.onSetPrintJobTagResult(success, sequece);
}
@@ -162,37 +152,158 @@
@Override
public void writePrintJobData(ParcelFileDescriptor fd, int printJobId) {
- mSpooler.writePrintJobData(fd, printJobId);
+ PrintSpooler.peekInstance().writePrintJobData(fd, printJobId);
}
@Override
- public void setClient(IPrintSpoolerClient client) {
- mSpooler.setCleint(client);
- }
-
- @Override
- public void notifyClientForActivteJobs() {
- mSpooler.notifyClientForActivteJobs();
+ public void setClient(IPrintSpoolerClient client) {
+ mHandler.obtainMessage(MyHandler.MSG_SET_CLIENT, client).sendToTarget();
}
};
}
- private static final class MyHandler extends Handler {
+ public void onPrintJobQueued(PrintJobInfo printJob) {
+ mHandler.obtainMessage(MyHandler.MSG_ON_PRINT_JOB_QUEUED,
+ printJob).sendToTarget();
+ }
+
+ public void onReqeustUpdatePrinters(List<PrinterId> printers) {
+ mHandler.obtainMessage(MyHandler.MSG_ON_REQUEST_UPDATE_PRINTERS,
+ printers).sendToTarget();
+ }
+
+ public void startPrinterDiscovery(IPrinterDiscoveryObserver observer) {
+ mHandler.obtainMessage(MyHandler.MSG_ON_START_PRINTER_DISCOVERY,
+ observer).sendToTarget();
+ }
+
+ public void stopPrinterDiscovery() {
+ mHandler.sendEmptyMessage(MyHandler.MSG_ON_STOP_PRINTER_DISCOVERY);
+ }
+
+ public void onAllPrintJobsForServiceHandled(ComponentName service) {
+ mHandler.obtainMessage(MyHandler.MSG_ON_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED,
+ service).sendToTarget();
+ }
+
+ public void onAllPrintJobsHandled() {
+ mHandler.sendEmptyMessage(MyHandler.MSG_ON_ALL_PRINT_JOBS_HANDLED);
+ }
+
+ private final class MyHandler extends Handler {
+ public static final int MSG_SET_CLIENT = 1;
+ public static final int MSG_START_PRINT_JOB_CONFIG_ACTIVITY = 2;
+ public static final int MSG_ON_START_PRINTER_DISCOVERY = 3;
+ public static final int MSG_ON_STOP_PRINTER_DISCOVERY = 4;
+ public static final int MSG_ON_PRINT_JOB_QUEUED = 5;
+ public static final int MSG_ON_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED = 6;
+ public static final int MSG_ON_ALL_PRINT_JOBS_HANDLED = 7;
+ public static final int MSG_ON_REQUEST_UPDATE_PRINTERS = 8;
+ public static final int MSG_CHECK_ALL_PRINTJOBS_HANDLED = 9;
public MyHandler(Looper looper) {
- super(looper, null, true);
+ super(looper, null, false);
}
@Override
+ @SuppressWarnings("unchecked")
public void handleMessage(Message message) {
- SomeArgs args = (SomeArgs) message.obj;
- IPrintClient client = (IPrintClient) args.arg1;
- IntentSender sender = (IntentSender) args.arg2;
- args.recycle();
- try {
- client.startPrintJobConfigActivity(sender);
- } catch (RemoteException re) {
- Slog.i(LOG_TAG, "Error starting print job config activity!", re);
+ switch (message.what) {
+ case MSG_SET_CLIENT: {
+ mClient = (IPrintSpoolerClient) message.obj;
+ if (mClient != null) {
+ PrintSpooler.createInstance(PrintSpoolerService.this);
+ mHandler.sendEmptyMessageDelayed(
+ MyHandler.MSG_CHECK_ALL_PRINTJOBS_HANDLED,
+ CHECK_ALL_PRINTJOBS_HANDLED_DELAY);
+ } else {
+ PrintSpooler.destroyInstance();
+ }
+ } break;
+
+ case MSG_START_PRINT_JOB_CONFIG_ACTIVITY: {
+ SomeArgs args = (SomeArgs) message.obj;
+ IPrintClient client = (IPrintClient) args.arg1;
+ IntentSender sender = (IntentSender) args.arg2;
+ args.recycle();
+ try {
+ client.startPrintJobConfigActivity(sender);
+ } catch (RemoteException re) {
+ Slog.i(LOG_TAG, "Error starting print job config activity!", re);
+ }
+ } break;
+
+ case MSG_ON_START_PRINTER_DISCOVERY: {
+ IPrinterDiscoveryObserver observer = (IPrinterDiscoveryObserver) message.obj;
+ if (mClient != null) {
+ try {
+ mClient.onStartPrinterDiscovery(observer);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error notifying start printer discovery.", re);
+ }
+ }
+ } break;
+
+ case MSG_ON_STOP_PRINTER_DISCOVERY: {
+ if (mClient != null) {
+ try {
+ mClient.onStopPrinterDiscovery();
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error notifying stop printer discovery.", re);
+ }
+ }
+ } break;
+
+ case MSG_ON_PRINT_JOB_QUEUED: {
+ PrintJobInfo printJob = (PrintJobInfo) message.obj;
+ if (mClient != null) {
+ try {
+ mClient.onPrintJobQueued(printJob);
+ } catch (RemoteException re) {
+ Slog.e(LOG_TAG, "Error notify for a queued print job.", re);
+ }
+ }
+ } break;
+
+ case MSG_ON_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED: {
+ ComponentName service = (ComponentName) message.obj;
+ if (mClient != null) {
+ try {
+ mClient.onAllPrintJobsForServiceHandled(service);
+ } catch (RemoteException re) {
+ Slog.e(LOG_TAG, "Error notify for all print jobs per service"
+ + " handled.", re);
+ }
+ }
+ } break;
+
+ case MSG_ON_ALL_PRINT_JOBS_HANDLED: {
+ if (mClient != null) {
+ try {
+ mClient.onAllPrintJobsHandled();
+ } catch (RemoteException re) {
+ Slog.e(LOG_TAG, "Error notify for all print job handled.", re);
+ }
+ }
+ } break;
+
+ case MSG_ON_REQUEST_UPDATE_PRINTERS: {
+ List<PrinterId> printerIds = (List<PrinterId>) message.obj;
+ if (mClient != null) {
+ try {
+ mClient.onRequestUpdatePrinters(printerIds);
+ } catch (RemoteException re) {
+ Slog.e(LOG_TAG, "Error requesting to update pritners.", re);
+ }
+ }
+ } break;
+
+ case MSG_CHECK_ALL_PRINTJOBS_HANDLED: {
+ PrintSpooler spooler = PrintSpooler.peekInstance();
+ if (spooler != null) {
+ spooler.checkAllPrintJobsHandled();
+ }
+ } break;
}
}
}
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png
index ab66137..a673762 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png
index e058bcd..59d9dbb 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_alarm_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_alarm_on.png
index e214c00..970febd 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_alarm_on.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_alarm_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_auto_rotate.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_auto_rotate.png
index 8d45fc5..9431154 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_auto_rotate.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_auto_rotate.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_100.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_100.png
index f3632f3..fbd0209 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_100.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_28.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_28.png
index dc8510d..6ae7bc9 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_28.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_28.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_43.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_43.png
index 77abaaa..2b6ead1 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_43.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_43.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_57.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_57.png
index 403bfbc..718e303 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_57.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_57.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_71.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_71.png
index c0ff12c..eeef556 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_71.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_71.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_85.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_85.png
index 18e8864..bf5ed66 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_85.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_85.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_blue.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_blue.png
new file mode 100644
index 0000000..fbd0209
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_blue.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_100.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_100.png
index 64db815..a35d05d 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_100.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_28.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_28.png
index 4b14d62..798e970 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_28.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_28.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_43.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_43.png
index 3f51ba5..4db0137 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_43.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_43.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_57.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_57.png
index aecf7e6..3637743 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_57.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_57.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_71.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_71.png
index 524bf73..83e780c 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_71.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_71.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_85.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_85.png
index 80325c7..32f367e 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_85.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_85.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png
index ac76535..f9dc2ab 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png
index 090d235..4877014 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_off.png
index 841b7d9..facb0c3 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_off.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_on.png
index bb58171..cca6cc5 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_on.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_brightness_auto_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_circle.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_circle.png
index f724ea5..5802093 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_circle.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_circle.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_hour.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_hour.png
index ca73621..f0ca3c6 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_hour.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_hour.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_minute.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_minute.png
index 8ee38ee..2c78c5f 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_minute.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_clock_minute.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_ethernet.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_ethernet.png
new file mode 100644
index 0000000..e842cff
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_ethernet.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_ime.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_ime.png
index e20a061..3da4b0b 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_ime.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_ime.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_location.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_location.png
deleted file mode 100644
index 7e67171..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_location.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_location_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_location_off.png
new file mode 100644
index 0000000..4a9c5b9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_location_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_location_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_location_on.png
new file mode 100644
index 0000000..95a93c7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_location_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring.png
new file mode 100644
index 0000000..f018a3b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring_notconnected.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring_notconnected.png
new file mode 100644
index 0000000..d6383f3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring_notconnected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display.png
index a7bc3c5..fd91725 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display_connected.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display_connected.png
index 012a4e8..d4b7b95 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display_connected.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_remote_display_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_rotation_locked.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_rotation_locked.png
index 1a7618d..fca5105 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_rotation_locked.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_rotation_locked.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_settings.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_settings.png
index cac7192..d11a0d1 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_settings.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_settings.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1.png
index f9ecb02..57b3faf 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1x.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1x.png
index c7cfa21..0b6a0c9 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_2.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_2.png
index 2268801..9ced4b0 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3.png
index 16ecb6a..9d5afdd 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3g.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3g.png
index fb01687..181be78 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4.png
index fbbf225..183c96a 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4g.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4g.png
index c151a64..4e47178 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4g.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_e.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_e.png
index 47e9ad5..71ca844 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1.png
index 544dcf9..959f184 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1x.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1x.png
index 5ca9892..47524ff 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_2.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_2.png
index 7f050f8..9ab00d2 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3.png
index be1ed56..c40ea73 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3g.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3g.png
index 5eab3c8..b00b0ab 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_4.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_4.png
index 502787b..427cf98 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_4.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_e.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_e.png
index e436ed8..b422290 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_g.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_g.png
index 304c278..b7220b7 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_h.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_h.png
index 26687ca..525724d 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_r.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_r.png
index b0449e1..d5f841dc 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_r.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_full_r.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_g.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_g.png
index 2f622c2..3541d09 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_h.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_h.png
index f5f76c2c..7daf55d 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_in.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_in.png
index a9dc907..d8ae039 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_in.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_inout.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_inout.png
index 89d2939..bf59e7e 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_inout.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_no_signal.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_no_signal.png
index 0fb96d9..7128f51 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_no_signal.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_no_signal.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_out.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_out.png
index d8993f8..3cf0301 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_out.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_r.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_r.png
index b78f474..09da0dd 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_r.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_r.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_usb_device.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_usb_device.png
index 13ee0a5..baf8e60 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_usb_device.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_usb_device.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_1.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_1.png
index b720720..090af31 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_2.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_2.png
index 1a4c6d1..d83ec5f 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_3.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_3.png
index 96cd8ab..30af79a 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_3.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_4.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_4.png
index 54bab4d..2a6e50f 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_4.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_1.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_1.png
index 0a31297..fe928fc 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_2.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_2.png
index 3e712ad..3420da5 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_3.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_3.png
index 565ae54..fe30c93 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_3.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_4.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_4.png
index 2c30f8e..ab1278e 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_4.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_full_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_in.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_in.png
index a9dc907..d8ae039 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_in.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_inout.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_inout.png
index 89d2939..bf59e7e 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_inout.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_no_network.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_no_network.png
index 6e4276f..05560f8 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_no_network.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_no_network.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_out.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_out.png
index d8993f8..3cf0301 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_out.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png
index 2d0c479..9d59584 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png
index 6a2906e..90b5b45 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_alarm_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_alarm_on.png
index d6590e2..6d5e285 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_alarm_on.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_alarm_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_auto_rotate.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_auto_rotate.png
index 46beb62..7bf195a 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_auto_rotate.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_auto_rotate.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_100.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_100.png
index 2f330f7..ca14c74 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_100.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_28.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_28.png
index 8457c2b..6dc8f86 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_28.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_28.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_43.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_43.png
index f72fe4a..828e7915 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_43.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_43.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_57.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_57.png
index 10e3275..bb0727e 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_57.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_57.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_71.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_71.png
index ca1613c..9e2c217 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_71.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_71.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_85.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_85.png
index 2bfe20d..f3e54d9 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_85.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_85.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_blue.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_blue.png
new file mode 100644
index 0000000..ca14c74
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_blue.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_100.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_100.png
index 480f579..fdc7979 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_100.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_28.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_28.png
index f2056db..92d9788 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_28.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_28.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_43.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_43.png
index 697d4ec..09ca0c1 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_43.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_43.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_57.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_57.png
index 9c53dd4..7eb5b55 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_57.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_57.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_71.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_71.png
index c967999..8354ee9 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_71.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_71.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_85.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_85.png
index 8df8234..dafc5cc 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_85.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_85.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png
index 2116449..cc67e41 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png
index 1cc6e62..f30e10b 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_off.png
index df5987c9..4074fc2 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_off.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_on.png
index 753e9f7..991c5a9 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_on.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_brightness_auto_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_circle.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_circle.png
index 27904f2..d9ff355 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_circle.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_circle.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_hour.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_hour.png
index f7f8c42..e9cc581 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_hour.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_hour.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_minute.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_minute.png
index fb17e5ab..64d7aac 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_minute.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_clock_minute.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_ethernet.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_ethernet.png
new file mode 100644
index 0000000..9dcb45e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_ethernet.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_ime.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_ime.png
index 3263c55..7535c75 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_ime.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_ime.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_location.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_location.png
deleted file mode 100644
index 79f1f470..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_location.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_location_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_location_off.png
new file mode 100644
index 0000000..193012f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_location_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_location_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_location_on.png
new file mode 100644
index 0000000..7d70dfe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_location_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring.png
new file mode 100644
index 0000000..ec8f348
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring_notconnected.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring_notconnected.png
new file mode 100644
index 0000000..be08f2c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring_notconnected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display.png
index 1ff9cbc..b49ab3c 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display_connected.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display_connected.png
index 0ec78c0..75cf42f 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display_connected.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_remote_display_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_rotation_locked.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_rotation_locked.png
index b70df3d..e27c118 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_rotation_locked.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_rotation_locked.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_settings.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_settings.png
index 673d2e0..4cb7f0c 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_settings.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_settings.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1.png
index ef5179f..1b8ecea 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1x.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1x.png
index 53dc47d..71fe184 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1x.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_2.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_2.png
index 359f445..aeaaa7e 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_2.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3.png
index 7ebebcd..aa0338d 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3g.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3g.png
index 88cf8b6..69c69be 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3g.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4.png
index db72661..b4f23a6 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4g.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4g.png
index 6022a6a..4936422 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4g.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_e.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_e.png
index e493d3b..57eeba0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_e.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1.png
index 5c8dc82..6c9c4b9 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1x.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1x.png
index 01560e8..0fd1ce8 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1x.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_2.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_2.png
index 3082ff0..ad7ee1e 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_2.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3.png
index 7966be8..39b1f1b 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3g.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3g.png
index a78c4d6..ecc70c0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3g.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_4.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_4.png
index dce07ae..a9fc367 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_4.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_e.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_e.png
index 828a728..e1f8943 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_e.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_g.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_g.png
index f1a8017..595b51d 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_g.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_h.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_h.png
index 9077d56..2e5069c 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_h.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_r.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_r.png
index d298624..ce67142 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_r.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_r.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_g.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_g.png
index cb52c98..bbf3fe1 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_g.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_h.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_h.png
index 14550d5..bbfc664 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_h.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_in.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_in.png
index 4dd6401..34ad413 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_in.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_inout.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_inout.png
index 07ebd9c..a5864aa0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_inout.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_no_signal.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_no_signal.png
index dcd2dbd..c3753ac 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_no_signal.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_no_signal.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_out.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_out.png
index d8eda87..bbaeba0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_out.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_r.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_r.png
index d26beb5..8e1c7c0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_r.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_r.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_usb_device.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_usb_device.png
index 6ac70fa..531f09f 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_usb_device.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_usb_device.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_1.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_1.png
index 1de33ba..208aff3 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_1.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_2.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_2.png
index 34c916d..d0b548a 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_2.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_3.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_3.png
index 2f7a885..058bd02 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_3.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_4.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_4.png
index f11cc08..21364be 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_4.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_1.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_1.png
index e78ab6b..b3a5453 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_1.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_2.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_2.png
index 1b025f26..8026348 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_2.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_3.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_3.png
index 3036c86..e19e339 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_3.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_4.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_4.png
index de000eb..28c0e28 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_4.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_full_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_in.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_in.png
index 4dd6401..34ad413 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_in.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_inout.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_inout.png
index 07ebd9c..a5864aa0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_inout.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_no_network.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_no_network.png
index 72da3e8..97ae55b 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_no_network.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_no_network.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_out.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_out.png
index d8eda87..bbaeba0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_out.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png
index 9a4239b..0d7c751 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png
index 0af4f3d..d91fcd3 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_alarm_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_alarm_on.png
index 07e749a..bffc104 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_alarm_on.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_alarm_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_auto_rotate.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_auto_rotate.png
index f9ab581..deece80a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_auto_rotate.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_auto_rotate.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_100.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_100.png
index 2c56c9b..db6c639 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_100.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_28.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_28.png
index 323fa8b..bb29c7a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_28.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_28.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_43.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_43.png
index 98eea99..e8dba2d 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_43.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_43.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_57.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_57.png
index 64555c0..f462e25 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_57.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_57.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_71.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_71.png
index ad8b15f..dd66d77 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_71.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_71.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_85.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_85.png
index 071b79b..d9529fb 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_85.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_85.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_blue.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_blue.png
new file mode 100644
index 0000000..db6c639
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_blue.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_100.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_100.png
index 234bb63..ab64a5d 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_100.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_28.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_28.png
index 3dfbe4c..2e2bab4 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_28.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_28.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_43.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_43.png
index 3f493f1..6c6abb3 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_43.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_43.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_57.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_57.png
index 0cce725..c5c5cf1 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_57.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_57.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_71.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_71.png
index f6fff00..176d599 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_71.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_71.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_85.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_85.png
index 35ef746..7dec8e4 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_85.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_85.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png
index 44cd31b..5bdf0c1 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png
index 62a518a..325c81c 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_off.png
index 653fa3f..a456f18 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_off.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_on.png
index 4ed4a9e..82eb3b4 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_on.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_brightness_auto_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_circle.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_circle.png
index c7864ba..0f78283 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_circle.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_circle.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_hour.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_hour.png
index 02c4a05..f36224b 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_hour.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_hour.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_minute.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_minute.png
index aa6be72..0fe0fb9 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_minute.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_clock_minute.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_ethernet.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_ethernet.png
new file mode 100644
index 0000000..382863b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_ethernet.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_ime.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_ime.png
index 7eabd10..b73e479 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_ime.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_ime.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location.png
deleted file mode 100644
index b2033df..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_off.png
new file mode 100644
index 0000000..8a4acb9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_on.png
new file mode 100644
index 0000000..351fea7a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring.png
new file mode 100644
index 0000000..92d32bf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring_notconnected.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring_notconnected.png
new file mode 100644
index 0000000..d32ebc4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring_notconnected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display.png
index 88ea017..fcf9d40 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display_connected.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display_connected.png
index 7573636..5063e88 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display_connected.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_remote_display_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_rotation_locked.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_rotation_locked.png
index 0098df49..4c22e6e 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_rotation_locked.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_rotation_locked.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_settings.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_settings.png
index 2d3638c..8cc314f 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_settings.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_settings.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1.png
index 471e1fa..3b1b3cc 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1x.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1x.png
index cb1eb0f..4544898 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1x.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_2.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_2.png
index 4311330..3b52cc3 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_2.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3.png
index 637e079..ffffdde 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3g.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3g.png
index 8fdd7ff..ea9f1ab 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3g.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4.png
index 8fca5f2..259d0cd 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4g.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4g.png
index 125e33d..4c476d0 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4g.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_e.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_e.png
index acf4752..ebb16ba 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_e.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1.png
index 1cbe239..d249835 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1x.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1x.png
index 9507162..732a981 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1x.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_2.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_2.png
index deb8c87..2d92c49 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_2.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3.png
index 7186579..f029c5d 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3g.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3g.png
index 1aa2393..2141602 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3g.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_4.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_4.png
index adafb2c..3adedde 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_4.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_e.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_e.png
index 67e2e11..01f2633 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_e.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_g.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_g.png
index f47c63e..98a20d1 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_g.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_h.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_h.png
index 2421050..8036acf 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_h.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_r.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_r.png
index cb4782e..22402fc 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_r.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_full_r.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_g.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_g.png
index fd5fb17..15e9d4e 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_g.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_h.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_h.png
index c63bbfa..042d3e0 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_h.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_in.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_in.png
index a0d588d..81f9c8a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_in.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_inout.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_inout.png
index 341716d..ae0295a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_inout.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_no_signal.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_no_signal.png
index 15169b9..964983f 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_no_signal.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_no_signal.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_out.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_out.png
index b2ad34d..10d94ac 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_out.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_r.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_r.png
index 89680ce..3468832 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_r.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_r.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_usb_device.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_usb_device.png
index 780a511..0f7f26a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_usb_device.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_usb_device.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_1.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_1.png
index eefe7ed..a0bcbc7 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_1.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_2.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_2.png
index a2caca2..be27b4c 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_2.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_3.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_3.png
index 08c1abd..8c6651f 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_3.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_4.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_4.png
index 8af72e51..4124144 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_4.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_1.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_1.png
index 7d9f032..ae4ec9a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_1.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_2.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_2.png
index 896eacc..cbce12f 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_2.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_3.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_3.png
index 0224da1..1deeba6 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_3.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_4.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_4.png
index fe28671..2835c0f 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_4.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_full_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_in.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_in.png
index a0d588d..81f9c8a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_in.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_inout.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_inout.png
index 341716d..ae0295a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_inout.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_no_network.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_no_network.png
index 4c6f1ff..ee5d429 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_no_network.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_no_network.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_out.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_out.png
index b2ad34d..10d94ac 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_out.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_out.png
Binary files differ
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 129e0e8..b99d20c 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -464,7 +464,9 @@
<!-- QuickSettings: IME [CHAR LIMIT=NONE] -->
<string name="quick_settings_ime_label">Input Method</string>
<!-- QuickSettings: Location [CHAR LIMIT=NONE] -->
- <string name="quick_settings_location_label">Location in use</string>
+ <string name="quick_settings_location_label">Location</string>
+ <!-- QuickSettings: Location (Off) [CHAR LIMIT=NONE] -->
+ <string name="quick_settings_location_off_label">Location Off</string>
<!-- QuickSettings: Media device [CHAR LIMIT=NONE] -->
<string name="quick_settings_media_device_label">Media device</string>
<!-- QuickSettings: RSSI [CHAR LIMIT=NONE] -->
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 43992c8..53041b7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -56,6 +56,7 @@
private static final int MSG_PRELOAD_RECENT_APPS = 14 << MSG_SHIFT;
private static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 15 << MSG_SHIFT;
private static final int MSG_SET_NAVIGATION_ICON_HINTS = 16 << MSG_SHIFT;
+ private static final int MSG_SET_WINDOW_STATE = 17 << MSG_SHIFT;
public static final int FLAG_EXCLUDE_NONE = 0;
public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0;
@@ -98,6 +99,7 @@
public void hideSearchPanel();
public void cancelPreloadRecentApps();
public void setNavigationIconHints(int hints);
+ public void setWindowState(int window, int state);
}
public CommandQueue(Callbacks callbacks, StatusBarIconList list) {
@@ -232,6 +234,13 @@
}
}
+ public void setWindowState(int window, int state) {
+ synchronized (mList) {
+ mHandler.removeMessages(MSG_SET_WINDOW_STATE);
+ mHandler.obtainMessage(MSG_SET_WINDOW_STATE, window, state, null).sendToTarget();
+ }
+ }
+
private final class H extends Handler {
public void handleMessage(Message msg) {
final int what = msg.what & MSG_MASK;
@@ -312,6 +321,9 @@
case MSG_SET_NAVIGATION_ICON_HINTS:
mCallbacks.setNavigationIconHints(msg.arg1);
break;
+ case MSG_SET_WINDOW_STATE:
+ mCallbacks.setWindowState(msg.arg1, msg.arg2);
+ break;
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
index d55754b..a3e35d1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
@@ -194,6 +194,7 @@
} else {
pv.setExpandedFraction(0); // just in case
pv.setVisibility(View.GONE);
+ pv.cancelPeek();
}
}
if (DEBUG) LOG("collapseAllPanels: animate=%s waiting=%s", animate, waiting);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 3a17c9c..d0a6385 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -40,8 +40,7 @@
public static final boolean DEBUG_NAN = true; // http://b/7686690
- public final void LOG(String fmt, Object... args) {
- if (!DEBUG) return;
+ private final void logf(String fmt, Object... args) {
Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args));
}
@@ -221,7 +220,7 @@
}
private void runPeekAnimation() {
- if (DEBUG) LOG("peek to height=%.1f", mPeekHeight);
+ if (DEBUG) logf("peek to height=%.1f", mPeekHeight);
if (mTimeAnimator.isStarted()) {
return;
}
@@ -256,8 +255,8 @@
}
} else if (dtms > 0) {
final float dt = dtms * 0.001f; // ms -> s
- if (DEBUG) LOG("tick: v=%.2fpx/s dt=%.4fs", mVel, dt);
- if (DEBUG) LOG("tick: before: h=%d", (int) mExpandedHeight);
+ if (DEBUG) logf("tick: v=%.2fpx/s dt=%.4fs", mVel, dt);
+ if (DEBUG) logf("tick: before: h=%d", (int) mExpandedHeight);
final float fh = getFullHeight();
boolean braking = false;
@@ -295,7 +294,7 @@
h = fh;
}
- if (DEBUG) LOG("tick: new h=%d closing=%s", (int) h, mClosing?"true":"false");
+ if (DEBUG) logf("tick: new h=%d closing=%s", (int) h, mClosing?"true":"false");
setExpandedHeightInternal(h);
@@ -367,14 +366,14 @@
loadDimens();
- if (DEBUG) LOG("handle view: " + mHandleView);
+ if (DEBUG) logf("handle view: " + mHandleView);
if (mHandleView != null) {
mHandleView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
final float y = event.getY();
final float rawY = event.getRawY();
- if (DEBUG) LOG("handle.onTouch: a=%s y=%.1f rawY=%.1f off=%.1f",
+ if (DEBUG) logf("handle.onTouch: a=%s y=%.1f rawY=%.1f off=%.1f",
MotionEvent.actionToString(event.getAction()),
y, rawY, mTouchOffset);
PanelView.this.getLocationOnScreen(mAbsPos);
@@ -461,7 +460,7 @@
vel = -vel;
}
- if (DEBUG) LOG("gesture: dy=%f vel=(%f,%f) vlinear=%f",
+ if (DEBUG) logf("gesture: dy=%f vel=(%f,%f) vlinear=%f",
deltaY,
xVel, yVel,
vel);
@@ -476,7 +475,7 @@
}
public void fling(float vel, boolean always) {
- if (DEBUG) LOG("fling: vel=%.3f, this=%s", vel, this);
+ if (DEBUG) logf("fling: vel=%.3f, this=%s", vel, this);
mVel = vel;
if (always||mVel != 0) {
@@ -496,7 +495,7 @@
@Override
protected void onViewAdded(View child) {
- if (DEBUG) LOG("onViewAdded: " + child);
+ if (DEBUG) logf("onViewAdded: " + child);
}
public View getHandle() {
@@ -508,7 +507,7 @@
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- if (DEBUG) LOG("onMeasure(%d, %d) -> (%d, %d)",
+ if (DEBUG) logf("onMeasure(%d, %d) -> (%d, %d)",
widthMeasureSpec, heightMeasureSpec, getMeasuredWidth(), getMeasuredHeight());
// Did one of our children change size?
@@ -528,7 +527,7 @@
public void setExpandedHeight(float height) {
- if (DEBUG) LOG("setExpandedHeight(%.1f)", height);
+ if (DEBUG) logf("setExpandedHeight(%.1f)", height);
mRubberbanding = false;
if (mTimeAnimator.isStarted()) {
post(mStopAnimator);
@@ -539,7 +538,7 @@
@Override
protected void onLayout (boolean changed, int left, int top, int right, int bottom) {
- if (DEBUG) LOG("onLayout: changed=%s, bottom=%d eh=%d fh=%d", changed?"T":"f", bottom, (int)mExpandedHeight, mFullHeight);
+ if (DEBUG) logf("onLayout: changed=%s, bottom=%d eh=%d fh=%d", changed?"T":"f", bottom, (int)mExpandedHeight, mFullHeight);
super.onLayout(changed, left, top, right, bottom);
}
@@ -563,7 +562,7 @@
mExpandedHeight = h;
- if (DEBUG) LOG("setExpansion: height=%.1f fh=%.1f tracking=%s rubber=%s", h, fh, mTracking?"T":"f", mRubberbanding?"T":"f");
+ if (DEBUG) logf("setExpansion: height=%.1f fh=%.1f tracking=%s rubber=%s", h, fh, mTracking?"T":"f", mRubberbanding?"T":"f");
requestLayout();
// FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
@@ -575,7 +574,7 @@
private float getFullHeight() {
if (mFullHeight <= 0) {
- if (DEBUG) LOG("Forcing measure() since fullHeight=" + mFullHeight);
+ if (DEBUG) logf("Forcing measure() since fullHeight=" + mFullHeight);
measure(MeasureSpec.makeMeasureSpec(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY));
}
@@ -620,7 +619,7 @@
public void collapse() {
// TODO: abort animation or ongoing touch
- if (DEBUG) LOG("collapse: " + this);
+ if (DEBUG) logf("collapse: " + this);
if (!isFullyCollapsed()) {
mTimeAnimator.cancel();
mClosing = true;
@@ -631,12 +630,18 @@
}
public void expand() {
- if (DEBUG) LOG("expand: " + this);
+ if (DEBUG) logf("expand: " + this);
if (isFullyCollapsed()) {
mBar.startOpeningPanel(this);
fling(mSelfExpandVelocityPx, /*always=*/ true);
} else if (DEBUG) {
- if (DEBUG) LOG("skipping expansion: is expanded");
+ if (DEBUG) logf("skipping expansion: is expanded");
+ }
+ }
+
+ public void cancelPeek() {
+ if (mPeekAnimator != null && mPeekAnimator.isStarted()) {
+ mPeekAnimator.cancel();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index e8b8dc1..d1ccde1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -164,6 +164,7 @@
StatusBarWindowView mStatusBarWindow;
PhoneStatusBarView mStatusBarView;
+ private int mStatusBarWindowState;
int mPixelFormat;
Object mQueueLock = new Object();
@@ -227,6 +228,7 @@
// on-screen navigation buttons
private NavigationBarView mNavigationBarView = null;
+ private int mNavigationBarWindowState;
// the tracker view
int mTrackingPosition; // the position of the top of the tracking view.
@@ -1363,9 +1365,14 @@
}
};
+ boolean panelsEnabled() {
+ return ((mDisabled & StatusBarManager.DISABLE_EXPAND) == 0
+ && mStatusBarWindowState != StatusBarManager.WINDOW_STATE_HIDING);
+ }
+
void makeExpandedVisible() {
if (SPEW) Log.d(TAG, "Make expanded visible: expanded visible=" + mExpandedVisible);
- if (mExpandedVisible) {
+ if (mExpandedVisible || !panelsEnabled()) {
return;
}
@@ -1466,7 +1473,7 @@
@Override
public void animateExpandNotificationsPanel() {
if (SPEW) Log.d(TAG, "animateExpand: mExpandedVisible=" + mExpandedVisible);
- if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
+ if (!panelsEnabled()) {
return ;
}
@@ -1521,7 +1528,7 @@
@Override
public void animateExpandSettingsPanel() {
if (SPEW) Log.d(TAG, "animateExpand: mExpandedVisible=" + mExpandedVisible);
- if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
+ if (!panelsEnabled()) {
return;
}
@@ -1840,6 +1847,39 @@
}
@Override // CommandQueue
+ public void setWindowState(int window, int state) {
+ if (mStatusBarWindow != null
+ && window == StatusBarManager.WINDOW_STATUS_BAR
+ && mStatusBarWindowState != state) {
+ mStatusBarWindowState = state;
+ if (DEBUG) Log.d(TAG, "Status bar window " + stateString(state));
+ if (state == StatusBarManager.WINDOW_STATE_HIDING) {
+ mStatusBarWindow.setEnabled(false);
+ mStatusBarView.collapseAllPanels(false);
+ } else if (state == StatusBarManager.WINDOW_STATE_SHOWING) {
+ mStatusBarWindow.setEnabled(true);
+ }
+ }
+ if (mNavigationBarView != null
+ && window == StatusBarManager.WINDOW_NAVIGATION_BAR
+ && mNavigationBarWindowState != state) {
+ mNavigationBarWindowState = state;
+ if (DEBUG) Log.d(TAG, "Navigation bar window " + stateString(state));
+ if (state == StatusBarManager.WINDOW_STATE_HIDING) {
+ mNavigationBarView.setEnabled(false);
+ } else if (state == StatusBarManager.WINDOW_STATE_SHOWING) {
+ mNavigationBarView.setEnabled(true);
+ }
+ }
+ }
+
+ private static String stateString(int state) {
+ if (state == StatusBarManager.WINDOW_STATE_HIDING) return "hiding";
+ if (state == StatusBarManager.WINDOW_STATE_SHOWING) return "showing";
+ return "unknown";
+ }
+
+ @Override // CommandQueue
public void setSystemUiVisibility(int vis, int mask) {
final int oldVal = mSystemUiVisibility;
final int newVal = (oldVal&~mask) | (vis&mask);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index da12a67..247d8aa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -89,7 +89,7 @@
@Override
public boolean panelsEnabled() {
- return ((mBar.mDisabled & StatusBarManager.DISABLE_EXPAND) == 0);
+ return mBar.panelsEnabled();
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
index a9c5c79..5233f42 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
@@ -97,6 +97,7 @@
private BluetoothController mBluetoothController;
private RotationLockController mRotationLockController;
+ private LocationController mLocationController;
private AsyncTask<Void, Void, Pair<String, Drawable>> mUserInfoTask;
@@ -166,15 +167,17 @@
RotationLockController rotationLockController) {
mBluetoothController = bluetoothController;
mRotationLockController = rotationLockController;
+ mLocationController = locationController;
setupQuickSettings();
updateWifiDisplayStatus();
updateResources();
+ applyLocationEnabledStatus();
networkController.addNetworkSignalChangedCallback(mModel);
bluetoothController.addStateChangedCallback(mModel);
batteryController.addStateChangedCallback(mModel);
- locationController.addStateChangedCallback(mModel);
+ locationController.addSettingsChangedCallback(mModel);
rotationLockController.addRotationLockControllerCallback(mModel);
}
@@ -596,6 +599,35 @@
parent.addView(bluetoothTile);
}
+ // Location
+ final QuickSettingsBasicTile locationTile
+ = new QuickSettingsBasicTile(mContext);
+ locationTile.setImageResource(R.drawable.ic_qs_location_on);
+ locationTile.setTextResource(R.string.quick_settings_location_label);
+ locationTile.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startSettingsActivity(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
+ }
+ });
+ if (LONG_PRESS_TOGGLES) {
+ locationTile.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ boolean newLocationEnabledState = !mLocationController.isLocationEnabled();
+ mLocationController.setLocationEnabled(newLocationEnabledState);
+ if (newLocationEnabledState) {
+ // Close the notifications tray so that the network location provider
+ // consent dialog can be shown.
+ Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+ mContext.sendBroadcast(closeDialog);
+ }
+ return true; // Consume click
+ }} );
+ }
+ mModel.addLocationTile(locationTile,
+ new QuickSettingsModel.BasicRefreshCallback(locationTile));
+ parent.addView(locationTile);
}
private void addTemporaryTiles(final ViewGroup parent, final LayoutInflater inflater) {
@@ -620,22 +652,6 @@
});
parent.addView(alarmTile);
- // Location
- final QuickSettingsBasicTile locationTile
- = new QuickSettingsBasicTile(mContext);
- locationTile.setImageResource(R.drawable.ic_qs_location);
- locationTile.setTextResource(R.string.quick_settings_location_label);
- locationTile.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- startSettingsActivity(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
- }
- });
- mModel.addLocationTile(locationTile,
- new QuickSettingsModel.BasicRefreshCallback(locationTile)
- .setShowWhenEnabled(true));
- parent.addView(locationTile);
-
// Wifi Display
QuickSettingsBasicTile wifiDisplayTile
= new QuickSettingsBasicTile(mContext);
@@ -777,6 +793,10 @@
mModel.onBluetoothStateChange(mBluetoothState);
}
+ private void applyLocationEnabledStatus() {
+ mModel.onLocationSettingsChanged(mLocationController.isLocationEnabled());
+ }
+
void reloadUserInfo() {
if (mUserInfoTask != null) {
mUserInfoTask.cancel(false);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
index 79495a7..02a3690 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
@@ -43,7 +43,7 @@
import com.android.systemui.settings.BrightnessController.BrightnessStateChangeCallback;
import com.android.systemui.settings.CurrentUserTracker;
import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
-import com.android.systemui.statusbar.policy.LocationController.LocationGpsStateChangeCallback;
+import com.android.systemui.statusbar.policy.LocationController.LocationSettingsChangeCallback;
import com.android.systemui.statusbar.policy.NetworkController.NetworkSignalChangedCallback;
import com.android.systemui.statusbar.policy.RotationLockController;
import com.android.systemui.statusbar.policy.RotationLockController.RotationLockControllerCallback;
@@ -53,9 +53,9 @@
class QuickSettingsModel implements BluetoothStateChangeCallback,
NetworkSignalChangedCallback,
BatteryStateChangeCallback,
- LocationGpsStateChangeCallback,
BrightnessStateChangeCallback,
- RotationLockControllerCallback {
+ RotationLockControllerCallback,
+ LocationSettingsChangeCallback {
// Sett InputMethoManagerService
private static final String TAG_TRY_SUPPRESSING_IME_SWITCHER = "TrySuppressingImeSwitcher";
@@ -557,11 +557,17 @@
mLocationCallback = cb;
mLocationCallback.refreshView(mLocationTile, mLocationState);
}
- // LocationController callback
+
@Override
- public void onLocationGpsStateChanged(boolean inUse, String description) {
- mLocationState.enabled = inUse;
- mLocationState.label = description;
+ public void onLocationSettingsChanged(boolean locationEnabled) {
+ int textResId = locationEnabled ? R.string.quick_settings_location_label
+ : R.string.quick_settings_location_off_label;
+ String label = mContext.getText(textResId).toString();
+ int locationIconId = locationEnabled
+ ? R.drawable.ic_qs_location_on : R.drawable.ic_qs_location_off;
+ mLocationState.enabled = locationEnabled;
+ mLocationState.label = label;
+ mLocationState.iconId = locationIconId;
mLocationCallback.refreshView(mLocationTile, mLocationState);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java
index c5563da..3f8043d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java
@@ -21,11 +21,15 @@
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.database.ContentObserver;
import android.location.LocationManager;
+import android.os.Handler;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings;
import com.android.systemui.R;
@@ -43,11 +47,29 @@
private ArrayList<LocationGpsStateChangeCallback> mChangeCallbacks =
new ArrayList<LocationGpsStateChangeCallback>();
+ private ArrayList<LocationSettingsChangeCallback> mSettingsChangeCallbacks =
+ new ArrayList<LocationSettingsChangeCallback>();
+ /**
+ * A callback for change in gps status (enabled/disabled, have lock, etc).
+ */
public interface LocationGpsStateChangeCallback {
public void onLocationGpsStateChanged(boolean inUse, String description);
}
+ /**
+ * A callback for change in location settings (the user has enabled/disabled location).
+ */
+ public interface LocationSettingsChangeCallback {
+ /**
+ * Called whenever location settings change.
+ *
+ * @param locationEnabled A value of true indicates that at least one type of location
+ * is enabled in settings.
+ */
+ public void onLocationSettingsChanged(boolean locationEnabled);
+ }
+
public LocationController(Context context) {
mContext = context;
@@ -59,12 +81,70 @@
NotificationManager nm = (NotificationManager)context.getSystemService(
Context.NOTIFICATION_SERVICE);
mNotificationService = nm.getService();
+
+ // Register to listen for changes to the location settings
+ context.getContentResolver().registerContentObserver(
+ Settings.Secure.getUriFor(Settings.Secure.LOCATION_PROVIDERS_ALLOWED), true,
+ new ContentObserver(new Handler()) {
+ @Override
+ public void onChange(boolean selfChange) {
+ boolean isEnabled = isLocationEnabled();
+ for (LocationSettingsChangeCallback cb : mSettingsChangeCallbacks) {
+ cb.onLocationSettingsChanged(isEnabled);
+ }
+ }
+ });
}
+ /**
+ * Add a callback to listen for changes in gps status.
+ */
public void addStateChangedCallback(LocationGpsStateChangeCallback cb) {
mChangeCallbacks.add(cb);
}
+ /**
+ * Add a callback to listen for changes in location settings.
+ */
+ public void addSettingsChangedCallback(LocationSettingsChangeCallback cb) {
+ mSettingsChangeCallbacks.add(cb);
+ }
+
+ /**
+ * Enable or disable location in settings.
+ *
+ * <p>This will attempt to enable/disable every type of location setting
+ * (e.g. high and balanced power).
+ *
+ * <p>If enabling, a user consent dialog will pop up prompting the user to accept.
+ * If the user doesn't accept, network location won't be enabled.
+ */
+ public void setLocationEnabled(boolean enabled) {
+ final UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
+ if (um.hasUserRestriction(UserManager.DISALLOW_SHARE_LOCATION)) {
+ return;
+ }
+ final ContentResolver cr = mContext.getContentResolver();
+ Settings.Secure.setLocationProviderEnabled(
+ cr, LocationManager.GPS_PROVIDER, enabled);
+ // When enabling the NETWORK_PROVIDER, a user consent dialog will pop up, and the
+ // setting won't actually be enabled until the user accepts the agreement.
+ Settings.Secure.setLocationProviderEnabled(
+ cr, LocationManager.NETWORK_PROVIDER, enabled);
+ }
+
+ /**
+ * Returns true if either gps or network location are enabled in settings.
+ */
+ public boolean isLocationEnabled() {
+ ContentResolver contentResolver = mContext.getContentResolver();
+ boolean isGpsEnabled = Settings.Secure.isLocationProviderEnabled(
+ contentResolver, LocationManager.GPS_PROVIDER);
+ boolean isNetworkEnabled = Settings.Secure.isLocationProviderEnabled(
+ contentResolver, LocationManager.NETWORK_PROVIDER);
+ return isGpsEnabled || isNetworkEnabled;
+ }
+
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
index 64a4a0e..a53b25a5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
@@ -92,6 +92,10 @@
public void setNavigationIconHints(int hints) {
}
+ @Override // CommandQueue
+ public void setWindowState(int window, int state) {
+ }
+
@Override
protected void createAndAddWindows() {
}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 1ea7a7c..2dfe6af 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -21,6 +21,7 @@
import android.app.IUiModeManager;
import android.app.ProgressDialog;
import android.app.SearchManager;
+import android.app.StatusBarManager;
import android.app.UiModeManager;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
@@ -273,6 +274,10 @@
int mDemoHdmiRotation;
boolean mDemoHdmiRotationLock;
+ // Default display does not rotate, apps that require non-default orientation will have to
+ // have the orientation emulated.
+ private boolean mForceDefaultOrientation = false;
+
int mUserRotationMode = WindowManagerPolicy.USER_ROTATION_FREE;
int mUserRotation = Surface.ROTATION_0;
boolean mAccelerometerDefault;
@@ -598,11 +603,11 @@
}
return true;
}
-
+
/*
* Various use cases for invoking this function
* screen turning off, should always disable listeners if already enabled
- * screen turned on and current app has sensor based orientation, enable listeners
+ * screen turned on and current app has sensor based orientation, enable listeners
* if not already enabled
* screen turned on and current app does not have sensor orientation, disable listeners if
* already enabled
@@ -629,8 +634,8 @@
if(localLOGV) Slog.v(TAG, "Enabling listeners");
mOrientationSensorEnabled = true;
}
- }
- }
+ }
+ }
//check if sensors need to be disabled
if (disable && mOrientationSensorEnabled) {
mOrientationListener.disable();
@@ -992,14 +997,14 @@
}
mDisplay = display;
+ final Resources res = mContext.getResources();
int shortSize, longSize;
if (width > height) {
shortSize = height;
longSize = width;
mLandscapeRotation = Surface.ROTATION_0;
mSeascapeRotation = Surface.ROTATION_180;
- if (mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_reverseDefaultRotation)) {
+ if (res.getBoolean(com.android.internal.R.bool.config_reverseDefaultRotation)) {
mPortraitRotation = Surface.ROTATION_90;
mUpsideDownRotation = Surface.ROTATION_270;
} else {
@@ -1011,8 +1016,7 @@
longSize = height;
mPortraitRotation = Surface.ROTATION_0;
mUpsideDownRotation = Surface.ROTATION_180;
- if (mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_reverseDefaultRotation)) {
+ if (res.getBoolean(com.android.internal.R.bool.config_reverseDefaultRotation)) {
mLandscapeRotation = Surface.ROTATION_270;
mSeascapeRotation = Surface.ROTATION_90;
} else {
@@ -1021,35 +1025,32 @@
}
}
- mStatusBarHeight = mContext.getResources().getDimensionPixelSize(
- com.android.internal.R.dimen.status_bar_height);
+ mStatusBarHeight =
+ res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
// Height of the navigation bar when presented horizontally at bottom
mNavigationBarHeightForRotation[mPortraitRotation] =
mNavigationBarHeightForRotation[mUpsideDownRotation] =
- mContext.getResources().getDimensionPixelSize(
- com.android.internal.R.dimen.navigation_bar_height);
+ res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height);
mNavigationBarHeightForRotation[mLandscapeRotation] =
- mNavigationBarHeightForRotation[mSeascapeRotation] =
- mContext.getResources().getDimensionPixelSize(
- com.android.internal.R.dimen.navigation_bar_height_landscape);
+ mNavigationBarHeightForRotation[mSeascapeRotation] = res.getDimensionPixelSize(
+ com.android.internal.R.dimen.navigation_bar_height_landscape);
// Width of the navigation bar when presented vertically along one side
mNavigationBarWidthForRotation[mPortraitRotation] =
mNavigationBarWidthForRotation[mUpsideDownRotation] =
mNavigationBarWidthForRotation[mLandscapeRotation] =
mNavigationBarWidthForRotation[mSeascapeRotation] =
- mContext.getResources().getDimensionPixelSize(
- com.android.internal.R.dimen.navigation_bar_width);
+ res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_width);
// SystemUI (status bar) layout policy
int shortSizeDp = shortSize * DisplayMetrics.DENSITY_DEFAULT / density;
+ int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density;
// Allow the navigation bar to move on small devices (phones).
mNavigationBarCanMove = shortSizeDp < 600;
- mHasNavigationBar = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_showNavigationBar);
+ mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar);
// Allow a system property to override this. Used by the emulator.
// See also hasNavigationBar().
String navBarOverride = SystemProperties.get("qemu.hw.mainkeys");
@@ -1075,6 +1076,20 @@
mDemoHdmiRotation = mLandscapeRotation;
}
mDemoHdmiRotationLock = SystemProperties.getBoolean("persist.demo.hdmirotationlock", false);
+
+ // Only force the default orientation if the screen is xlarge, at least 960dp x 720dp, per
+ // http://developer.android.com/guide/practices/screens_support.html#range
+ mForceDefaultOrientation = longSizeDp >= 960 && shortSizeDp >= 720 &&
+ res.getBoolean(com.android.internal.R.bool.config_forceDefaultOrientation) &&
+ // For debug purposes the next line turns this feature off with:
+ // $ adb shell setprop config.override_forced_orient true
+ // $ adb shell wm size reset
+ !"true".equals(SystemProperties.get("config.override_forced_orient"));
+ }
+
+ @Override
+ public boolean isDefaultOrientationForced() {
+ return mForceDefaultOrientation;
}
@Override
@@ -1453,6 +1468,7 @@
}
/** {@inheritDoc} */
+ @Override
public int subWindowTypeToLayerLw(int type) {
switch (type) {
case TYPE_APPLICATION_PANEL:
@@ -1469,10 +1485,12 @@
return 0;
}
+ @Override
public int getMaxWallpaperLayer() {
return windowTypeToLayerLw(TYPE_STATUS_BAR);
}
+ @Override
public int getAboveUniverseLayer() {
return windowTypeToLayerLw(TYPE_SYSTEM_ERROR);
}
@@ -2526,12 +2544,12 @@
if (mStatusBar != null && mStatusHideybar == HIDEYBAR_SHOWING &&
0 == (visibility & View.STATUS_BAR_OVERLAY)) {
mStatusHideybar = HIDEYBAR_HIDING;
- mStatusBar.hideLw(true);
+ setBarShowingLw(mStatusBar, false);
}
if (mNavigationBar != null && mNavigationHideybar == HIDEYBAR_SHOWING &&
0 == (visibility & View.NAVIGATION_BAR_OVERLAY)) {
mNavigationHideybar = HIDEYBAR_HIDING;
- mNavigationBar.hideLw(true);
+ setBarShowingLw(mNavigationBar, false);
}
// Reset any bits in mForceClearingStatusBarVisibility that
// are now clear.
@@ -2699,15 +2717,15 @@
mTmpNavigationFrame.set(0, top, displayWidth, displayHeight - overscanBottom);
mStableBottom = mStableFullscreenBottom = mTmpNavigationFrame.top;
if (navBarHideyShowing) {
- mNavigationBar.showLw(true);
+ setBarShowingLw(mNavigationBar, true);
} else if (navVisible) {
- mNavigationBar.showLw(true);
+ setBarShowingLw(mNavigationBar, true);
mDockBottom = mTmpNavigationFrame.top;
mRestrictedScreenHeight = mDockBottom - mRestrictedScreenTop;
mRestrictedOverscanScreenHeight = mDockBottom - mRestrictedOverscanScreenTop;
} else {
// We currently want to hide the navigation UI.
- mNavigationBar.hideLw(true);
+ setBarShowingLw(mNavigationBar, false);
}
if (navVisible && !mNavigationBar.isAnimatingLw()) {
// If the nav bar is currently requested to be visible,
@@ -2722,15 +2740,15 @@
mTmpNavigationFrame.set(left, 0, displayWidth - overscanRight, displayHeight);
mStableRight = mStableFullscreenRight = mTmpNavigationFrame.left;
if (navBarHideyShowing) {
- mNavigationBar.showLw(true);
+ setBarShowingLw(mNavigationBar, true);
} else if (navVisible) {
- mNavigationBar.showLw(true);
+ setBarShowingLw(mNavigationBar, true);
mDockRight = mTmpNavigationFrame.left;
mRestrictedScreenWidth = mDockRight - mRestrictedScreenLeft;
mRestrictedOverscanScreenWidth = mDockRight - mRestrictedOverscanScreenLeft;
} else {
// We currently want to hide the navigation UI.
- mNavigationBar.hideLw(true);
+ setBarShowingLw(mNavigationBar, false);
}
if (navVisible && !mNavigationBar.isAnimatingLw()) {
// If the nav bar is currently requested to be visible,
@@ -3379,7 +3397,7 @@
+ " top=" + mTopFullscreenOpaqueWindowState);
if (mForceStatusBar || mForceStatusBarFromKeyguard) {
if (DEBUG_LAYOUT) Slog.v(TAG, "Showing status bar: forced");
- if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
+ if (setBarShowingLw(mStatusBar, true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
} else if (mTopFullscreenOpaqueWindowState != null) {
if (localLOGV) {
Slog.d(TAG, "frame: " + mTopFullscreenOpaqueWindowState.getFrameLw()
@@ -3394,33 +3412,19 @@
// has the FLAG_FULLSCREEN set. Not sure if there is another way that to be the
// case though.
if (mStatusHideybar == HIDEYBAR_SHOWING) {
- if (mStatusBar.showLw(true)) {
+ if (setBarShowingLw(mStatusBar, true)) {
changes |= FINISH_LAYOUT_REDO_LAYOUT;
}
} else if (topIsFullscreen) {
if (DEBUG_LAYOUT) Slog.v(TAG, "** HIDING status bar");
- if (mStatusBar.hideLw(true)) {
+ if (setBarShowingLw(mStatusBar, false)) {
changes |= FINISH_LAYOUT_REDO_LAYOUT;
-
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- try {
- IStatusBarService statusbar = getStatusBarService();
- if (statusbar != null) {
- statusbar.collapsePanels();
- }
- } catch (RemoteException ex) {
- // re-acquire status bar service next time it is needed.
- mStatusBarService = null;
- }
- }});
} else {
if (DEBUG_LAYOUT) Slog.v(TAG, "Status bar already hiding");
}
} else {
if (DEBUG_LAYOUT) Slog.v(TAG, "** SHOWING status bar: top is not fullscreen");
- if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
+ if (setBarShowingLw(mStatusBar, true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
}
}
}
@@ -4345,6 +4349,10 @@
);
}
+ if (mForceDefaultOrientation) {
+ return Surface.ROTATION_0;
+ }
+
synchronized (mLock) {
int sensorRotation = mOrientationListener.getProposedRotation(); // may be -1
if (sensorRotation < 0) {
@@ -5071,7 +5079,7 @@
tmpVisibility |= View.STATUS_BAR_OVERLAY;
if ((mLastSystemUiFlags & View.STATUS_BAR_OVERLAY) == 0) {
tmpVisibility &= ~View.SYSTEM_UI_FLAG_LOW_PROFILE;
- mStatusBar.showLw(true);
+ setBarShowingLw(mStatusBar, true);
}
}
}
@@ -5088,13 +5096,39 @@
tmpVisibility |= View.NAVIGATION_BAR_OVERLAY;
if ((mLastSystemUiFlags & View.NAVIGATION_BAR_OVERLAY) == 0) {
tmpVisibility &= ~View.SYSTEM_UI_FLAG_LOW_PROFILE;
- mNavigationBar.showLw(true);
+ setBarShowingLw(mNavigationBar, true);
}
}
}
return tmpVisibility;
}
+ private boolean setBarShowingLw(WindowState win, final boolean show) {
+ final int window =
+ win == mStatusBar ? StatusBarManager.WINDOW_STATUS_BAR
+ : win == mNavigationBar ? StatusBarManager.WINDOW_NAVIGATION_BAR
+ : 0;
+ if (window != 0) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ IStatusBarService statusbar = getStatusBarService();
+ if (statusbar != null) {
+ statusbar.setWindowState(window, show
+ ? StatusBarManager.WINDOW_STATE_SHOWING
+ : StatusBarManager.WINDOW_STATE_HIDING);
+ }
+ } catch (RemoteException e) {
+ // re-acquire status bar service next time it is needed.
+ mStatusBarService = null;
+ }
+ }
+ });
+ }
+ return show ? win.showLw(true) : win.hideLw(true);
+ }
+
// TODO temporary helper that allows testing overlay bars on existing apps
private static final class OverlayTesting {
static String ENABLED_SETTING = "overlay_testing_enabled";
diff --git a/services/java/com/android/server/AppOpsService.java b/services/java/com/android/server/AppOpsService.java
index b2d8b94..81572c5 100644
--- a/services/java/com/android/server/AppOpsService.java
+++ b/services/java/com/android/server/AppOpsService.java
@@ -27,6 +27,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import android.app.AppOpsManager;
import android.content.Context;
@@ -43,6 +44,7 @@
import android.util.ArrayMap;
import android.util.AtomicFile;
import android.util.Log;
+import android.util.Pair;
import android.util.Slog;
import android.util.SparseArray;
import android.util.TimeUtils;
@@ -64,8 +66,6 @@
// Write at most every 30 minutes.
static final long WRITE_DELAY = DEBUG ? 1000 : 30*60*1000;
- static final int CURRENT_VERSION = 1;
-
Context mContext;
final AtomicFile mFile;
final Handler mHandler;
@@ -336,6 +336,24 @@
}
}
+ private void pruneOp(Op op, int uid, String packageName) {
+ if (op.time == 0 && op.rejectTime == 0) {
+ Ops ops = getOpsLocked(uid, packageName, false);
+ if (ops != null) {
+ ops.remove(op.op);
+ if (ops.size() <= 0) {
+ HashMap<String, Ops> pkgOps = mUidOps.get(uid);
+ if (pkgOps != null) {
+ pkgOps.remove(ops.packageName);
+ if (pkgOps.size() <= 0) {
+ mUidOps.remove(uid);
+ }
+ }
+ }
+ }
+ }
+ }
+
@Override
public void setMode(int code, int uid, String packageName, int mode) {
verifyIncomingUid(uid);
@@ -364,21 +382,7 @@
if (mode == AppOpsManager.MODE_ALLOWED) {
// If going into the default mode, prune this op
// if there is nothing else interesting in it.
- if (op.time == 0 && op.rejectTime == 0) {
- Ops ops = getOpsLocked(uid, packageName, false);
- if (ops != null) {
- ops.remove(op.op);
- if (ops.size() <= 0) {
- HashMap<String, Ops> pkgOps = mUidOps.get(uid);
- if (pkgOps != null) {
- pkgOps.remove(ops.packageName);
- if (pkgOps.size() <= 0) {
- mUidOps.remove(uid);
- }
- }
- }
- }
- }
+ pruneOp(op, uid, packageName);
}
scheduleWriteNowLocked();
}
@@ -394,6 +398,72 @@
}
}
+ private static HashMap<Callback, ArrayList<Pair<String, Integer>>> addCallbacks(
+ HashMap<Callback, ArrayList<Pair<String, Integer>>> callbacks,
+ String packageName, int op, ArrayList<Callback> cbs) {
+ if (cbs == null) {
+ return callbacks;
+ }
+ if (callbacks == null) {
+ callbacks = new HashMap<Callback, ArrayList<Pair<String, Integer>>>();
+ }
+ for (int i=0; i<cbs.size(); i++) {
+ Callback cb = cbs.get(i);
+ ArrayList<Pair<String, Integer>> reports = callbacks.get(cb);
+ if (reports == null) {
+ reports = new ArrayList<Pair<String, Integer>>();
+ callbacks.put(cb, reports);
+ }
+ reports.add(new Pair<String, Integer>(packageName, op));
+ }
+ return callbacks;
+ }
+
+ @Override
+ public void resetAllModes() {
+ mContext.enforcePermission(android.Manifest.permission.UPDATE_APP_OPS_STATS,
+ Binder.getCallingPid(), Binder.getCallingUid(), null);
+ HashMap<Callback, ArrayList<Pair<String, Integer>>> callbacks = null;
+ synchronized (this) {
+ boolean changed = false;
+ for (int i=0; i<mUidOps.size(); i++) {
+ HashMap<String, Ops> packages = mUidOps.valueAt(i);
+ for (Map.Entry<String, Ops> ent : packages.entrySet()) {
+ String packageName = ent.getKey();
+ Ops pkgOps = ent.getValue();
+ for (int j=0; j<pkgOps.size(); j++) {
+ Op curOp = pkgOps.valueAt(j);
+ if (curOp.mode != AppOpsManager.MODE_ALLOWED) {
+ curOp.mode = AppOpsManager.MODE_ALLOWED;
+ changed = true;
+ callbacks = addCallbacks(callbacks, packageName, curOp.op,
+ mOpModeWatchers.get(curOp.op));
+ callbacks = addCallbacks(callbacks, packageName, curOp.op,
+ mPackageModeWatchers.get(packageName));
+ pruneOp(curOp, mUidOps.keyAt(i), packageName);
+ }
+ }
+ }
+ }
+ if (changed) {
+ scheduleWriteNowLocked();
+ }
+ }
+ if (callbacks != null) {
+ for (Map.Entry<Callback, ArrayList<Pair<String, Integer>>> ent : callbacks.entrySet()) {
+ Callback cb = ent.getKey();
+ ArrayList<Pair<String, Integer>> reports = ent.getValue();
+ for (int i=0; i<reports.size(); i++) {
+ Pair<String, Integer> rep = reports.get(i);
+ try {
+ cb.mCallback.opChanged(rep.second, rep.first);
+ } catch (RemoteException e) {
+ }
+ }
+ }
+ }
+ }
+
@Override
public void startWatchingMode(int op, String packageName, IAppOpsCallback callback) {
synchronized (this) {
@@ -706,9 +776,6 @@
throw new IllegalStateException("no start tag found");
}
- String versStr = parser.getAttributeValue(null, "vers");
- int vers = versStr != null ? Integer.parseInt(versStr) : 0;
-
int outerDepth = parser.getDepth();
while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
&& (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
@@ -718,7 +785,7 @@
String tagName = parser.getName();
if (tagName.equals("pkg")) {
- readPackage(parser, vers);
+ readPackage(parser);
} else {
Slog.w(TAG, "Unknown element under <app-ops>: "
+ parser.getName());
@@ -751,7 +818,7 @@
}
}
- void readPackage(XmlPullParser parser, int vers) throws NumberFormatException,
+ void readPackage(XmlPullParser parser) throws NumberFormatException,
XmlPullParserException, IOException {
String pkgName = parser.getAttributeValue(null, "n");
int outerDepth = parser.getDepth();
@@ -764,7 +831,7 @@
String tagName = parser.getName();
if (tagName.equals("uid")) {
- readUid(parser, vers, pkgName);
+ readUid(parser, pkgName);
} else {
Slog.w(TAG, "Unknown element under <pkg>: "
+ parser.getName());
@@ -773,7 +840,7 @@
}
}
- void readUid(XmlPullParser parser, int vers, String pkgName) throws NumberFormatException,
+ void readUid(XmlPullParser parser, String pkgName) throws NumberFormatException,
XmlPullParserException, IOException {
int uid = Integer.parseInt(parser.getAttributeValue(null, "n"));
int outerDepth = parser.getDepth();
@@ -789,12 +856,7 @@
Op op = new Op(uid, pkgName, Integer.parseInt(parser.getAttributeValue(null, "n")));
String mode = parser.getAttributeValue(null, "m");
if (mode != null) {
- if (vers < CURRENT_VERSION && op.op != AppOpsManager.OP_POST_NOTIFICATION) {
- Slog.w(TAG, "AppOps vers " + vers + ": drop mode from "
- + pkgName + "/" + uid + " op " + op.op);
- } else {
- op.mode = Integer.parseInt(mode);
- }
+ op.mode = Integer.parseInt(mode);
}
String time = parser.getAttributeValue(null, "t");
if (time != null) {
@@ -844,7 +906,6 @@
out.setOutput(stream, "utf-8");
out.startDocument(null, true);
out.startTag(null, "app-ops");
- out.attribute(null, "vers", Integer.toString(CURRENT_VERSION));
if (allOps != null) {
String lastPkg = null;
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 1e8a5899..b881934 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -2047,29 +2047,39 @@
* Cancels a notification ONLY if it has all of the {@code mustHaveFlags}
* and none of the {@code mustNotHaveFlags}.
*/
- private void cancelNotification(String pkg, String tag, int id, int mustHaveFlags,
- int mustNotHaveFlags, boolean sendDelete, int userId) {
- EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL, pkg, id, tag, userId,
- mustHaveFlags, mustNotHaveFlags);
+ private void cancelNotification(final String pkg, final String tag, final int id,
+ final int mustHaveFlags, final int mustNotHaveFlags, final boolean sendDelete,
+ final int userId) {
+ // In enqueueNotificationInternal notifications are added by scheduling the
+ // work on the worker handler. Hence, we also schedule the cancel on this
+ // handler to avoid a scenario where an add notification call followed by a
+ // remove notification call ends up in not removing the notification.
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL, pkg, id, tag, userId,
+ mustHaveFlags, mustNotHaveFlags);
- synchronized (mNotificationList) {
- int index = indexOfNotificationLocked(pkg, tag, id, userId);
- if (index >= 0) {
- NotificationRecord r = mNotificationList.get(index);
+ synchronized (mNotificationList) {
+ int index = indexOfNotificationLocked(pkg, tag, id, userId);
+ if (index >= 0) {
+ NotificationRecord r = mNotificationList.get(index);
- if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
- return;
+ if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
+ return;
+ }
+ if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
+ return;
+ }
+
+ mNotificationList.remove(index);
+
+ cancelNotificationLocked(r, sendDelete);
+ updateLightsLocked();
+ }
}
- if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
- return;
- }
-
- mNotificationList.remove(index);
-
- cancelNotificationLocked(r, sendDelete);
- updateLightsLocked();
}
- }
+ });
}
/**
diff --git a/services/java/com/android/server/StatusBarManagerService.java b/services/java/com/android/server/StatusBarManagerService.java
index c21d8c6..f207c08 100644
--- a/services/java/com/android/server/StatusBarManagerService.java
+++ b/services/java/com/android/server/StatusBarManagerService.java
@@ -399,6 +399,15 @@
mCurrentUserId = newUserId;
}
+ @Override
+ public void setWindowState(int window, int state) {
+ if (mBar != null) {
+ try {
+ mBar.setWindowState(window, state);
+ } catch (RemoteException ex) {}
+ }
+ }
+
private void enforceStatusBar() {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR,
"StatusBarManagerService");
diff --git a/services/java/com/android/server/display/DisplayDeviceInfo.java b/services/java/com/android/server/display/DisplayDeviceInfo.java
index 11f8d6a..11c5d87 100644
--- a/services/java/com/android/server/display/DisplayDeviceInfo.java
+++ b/services/java/com/android/server/display/DisplayDeviceInfo.java
@@ -73,6 +73,11 @@
public static final int FLAG_NEVER_BLANK = 1 << 5;
/**
+ * Flag: Indicates that the display is suitable for presentations.
+ */
+ public static final int FLAG_PRESENTATION = 1 << 6;
+
+ /**
* Touch attachment: Display does not receive touch.
*/
public static final int TOUCH_NONE = 0;
@@ -289,6 +294,9 @@
if ((flags & FLAG_NEVER_BLANK) != 0) {
msg.append(", FLAG_NEVER_BLANK");
}
+ if ((flags & FLAG_PRESENTATION) != 0) {
+ msg.append(", FLAG_PRESENTATION");
+ }
return msg.toString();
}
}
diff --git a/services/java/com/android/server/display/DisplayManagerService.java b/services/java/com/android/server/display/DisplayManagerService.java
index c339c26..20db4cd 100644
--- a/services/java/com/android/server/display/DisplayManagerService.java
+++ b/services/java/com/android/server/display/DisplayManagerService.java
@@ -21,6 +21,7 @@
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
+import android.hardware.display.DisplayManager;
import android.hardware.display.DisplayManagerGlobal;
import android.hardware.display.IDisplayManager;
import android.hardware.display.IDisplayManagerCallback;
@@ -589,8 +590,8 @@
}
@Override // Binder call
- public int createPrivateVirtualDisplay(IBinder appToken, String packageName,
- String name, int width, int height, int densityDpi, Surface surface) {
+ public int createVirtualDisplay(IBinder appToken, String packageName,
+ String name, int width, int height, int densityDpi, Surface surface, int flags) {
final int callingUid = Binder.getCallingUid();
if (!validatePackageName(callingUid, packageName)) {
throw new SecurityException("packageName must match the calling uid");
@@ -608,6 +609,25 @@
if (surface == null) {
throw new IllegalArgumentException("surface must not be null");
}
+ if ((flags & DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC) != 0) {
+ if (mContext.checkCallingPermission(android.Manifest.permission.CAPTURE_VIDEO_OUTPUT)
+ != PackageManager.PERMISSION_GRANTED
+ && mContext.checkCallingPermission(
+ android.Manifest.permission.CAPTURE_SECURE_VIDEO_OUTPUT)
+ != PackageManager.PERMISSION_GRANTED) {
+ throw new SecurityException("Requires CAPTURE_VIDEO_OUTPUT or "
+ + "CAPTURE_SECURE_VIDEO_OUTPUT permission to create a "
+ + "public virtual display.");
+ }
+ }
+ if ((flags & DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE) != 0) {
+ if (mContext.checkCallingPermission(
+ android.Manifest.permission.CAPTURE_SECURE_VIDEO_OUTPUT)
+ != PackageManager.PERMISSION_GRANTED) {
+ throw new SecurityException("Requires CAPTURE_SECURE_VIDEO_OUTPUT "
+ + "to create a secure virtual display.");
+ }
+ }
final long token = Binder.clearCallingIdentity();
try {
@@ -618,9 +638,9 @@
return -1;
}
- DisplayDevice device = mVirtualDisplayAdapter.createPrivateVirtualDisplayLocked(
+ DisplayDevice device = mVirtualDisplayAdapter.createVirtualDisplayLocked(
appToken, callingUid, packageName, name, width, height, densityDpi,
- surface);
+ surface, flags);
if (device == null) {
return -1;
}
@@ -632,7 +652,7 @@
}
// Something weird happened and the logical display was not created.
- Slog.w(TAG, "Rejecting request to create private virtual display "
+ Slog.w(TAG, "Rejecting request to create virtual display "
+ "because the logical display was not created.");
mVirtualDisplayAdapter.releaseVirtualDisplayLocked(appToken);
handleDisplayDeviceRemovedLocked(device);
@@ -935,6 +955,11 @@
synchronized (mSyncRoot) {
LogicalDisplay display = mLogicalDisplays.get(displayId);
if (display != null && display.hasContentLocked() != hasContent) {
+ if (DEBUG) {
+ Slog.d(TAG, "Display " + displayId + " hasContent flag changed: "
+ + "hasContent=" + hasContent + ", inTraversal=" + inTraversal);
+ }
+
display.setHasContentLocked(hasContent);
scheduleTraversalLocked(inTraversal);
}
diff --git a/services/java/com/android/server/display/LocalDisplayAdapter.java b/services/java/com/android/server/display/LocalDisplayAdapter.java
index 475f27b..cb8f3e2 100644
--- a/services/java/com/android/server/display/LocalDisplayAdapter.java
+++ b/services/java/com/android/server/display/LocalDisplayAdapter.java
@@ -155,6 +155,7 @@
mInfo.touch = DisplayDeviceInfo.TOUCH_INTERNAL;
} else {
mInfo.type = Display.TYPE_HDMI;
+ mInfo.flags |= DisplayDeviceInfo.FLAG_PRESENTATION;
mInfo.name = getContext().getResources().getString(
com.android.internal.R.string.display_manager_hdmi_display_name);
mInfo.touch = DisplayDeviceInfo.TOUCH_EXTERNAL;
diff --git a/services/java/com/android/server/display/LogicalDisplay.java b/services/java/com/android/server/display/LogicalDisplay.java
index 775ebb2..b9839c2 100644
--- a/services/java/com/android/server/display/LogicalDisplay.java
+++ b/services/java/com/android/server/display/LogicalDisplay.java
@@ -205,6 +205,9 @@
if ((deviceInfo.flags & DisplayDeviceInfo.FLAG_PRIVATE) != 0) {
mBaseDisplayInfo.flags |= Display.FLAG_PRIVATE;
}
+ if ((deviceInfo.flags & DisplayDeviceInfo.FLAG_PRESENTATION) != 0) {
+ mBaseDisplayInfo.flags |= Display.FLAG_PRESENTATION;
+ }
mBaseDisplayInfo.type = deviceInfo.type;
mBaseDisplayInfo.address = deviceInfo.address;
mBaseDisplayInfo.name = deviceInfo.name;
diff --git a/services/java/com/android/server/display/OverlayDisplayAdapter.java b/services/java/com/android/server/display/OverlayDisplayAdapter.java
index a18352c..ce402a5 100644
--- a/services/java/com/android/server/display/OverlayDisplayAdapter.java
+++ b/services/java/com/android/server/display/OverlayDisplayAdapter.java
@@ -59,7 +59,7 @@
private static final int MAX_HEIGHT = 4096;
private static final Pattern SETTING_PATTERN =
- Pattern.compile("(\\d+)x(\\d+)/(\\d+)");
+ Pattern.compile("(\\d+)x(\\d+)/(\\d+)(,[a-z]+)*");
private final Handler mUiHandler;
private final ArrayList<OverlayDisplayHandle> mOverlays =
@@ -143,6 +143,7 @@
int width = Integer.parseInt(matcher.group(1), 10);
int height = Integer.parseInt(matcher.group(2), 10);
int densityDpi = Integer.parseInt(matcher.group(3), 10);
+ String flagString = matcher.group(4);
if (width >= MIN_WIDTH && width <= MAX_WIDTH
&& height >= MIN_HEIGHT && height <= MAX_HEIGHT
&& densityDpi >= DisplayMetrics.DENSITY_LOW
@@ -152,13 +153,14 @@
com.android.internal.R.string.display_manager_overlay_display_name,
number);
int gravity = chooseOverlayGravity(number);
+ boolean secure = flagString != null && flagString.contains(",secure");
Slog.i(TAG, "Showing overlay display device #" + number
+ ": name=" + name + ", width=" + width + ", height=" + height
- + ", densityDpi=" + densityDpi);
+ + ", densityDpi=" + densityDpi + ", secure=" + secure);
mOverlays.add(new OverlayDisplayHandle(name,
- width, height, densityDpi, gravity));
+ width, height, densityDpi, gravity, secure));
continue;
}
} catch (NumberFormatException ex) {
@@ -190,13 +192,14 @@
private final int mHeight;
private final float mRefreshRate;
private final int mDensityDpi;
+ private final boolean mSecure;
private Surface mSurface;
private SurfaceTexture mSurfaceTexture;
private DisplayDeviceInfo mInfo;
public OverlayDisplayDevice(IBinder displayToken, String name,
- int width, int height, float refreshRate, int densityDpi,
+ int width, int height, float refreshRate, int densityDpi, boolean secure,
SurfaceTexture surfaceTexture) {
super(OverlayDisplayAdapter.this, displayToken);
mName = name;
@@ -204,6 +207,7 @@
mHeight = height;
mRefreshRate = refreshRate;
mDensityDpi = densityDpi;
+ mSecure = secure;
mSurfaceTexture = surfaceTexture;
}
@@ -241,7 +245,10 @@
mInfo.densityDpi = mDensityDpi;
mInfo.xDpi = mDensityDpi;
mInfo.yDpi = mDensityDpi;
- mInfo.flags = 0;
+ mInfo.flags = DisplayDeviceInfo.FLAG_PRESENTATION;
+ if (mSecure) {
+ mInfo.flags |= DisplayDeviceInfo.FLAG_SECURE;
+ }
mInfo.type = Display.TYPE_OVERLAY;
mInfo.touch = DisplayDeviceInfo.TOUCH_NONE;
}
@@ -261,17 +268,19 @@
private final int mHeight;
private final int mDensityDpi;
private final int mGravity;
+ private final boolean mSecure;
private OverlayDisplayWindow mWindow;
private OverlayDisplayDevice mDevice;
public OverlayDisplayHandle(String name,
- int width, int height, int densityDpi, int gravity) {
+ int width, int height, int densityDpi, int gravity, boolean secure) {
mName = name;
mWidth = width;
mHeight = height;
mDensityDpi = densityDpi;
mGravity = gravity;
+ mSecure = secure;
mUiHandler.post(mShowRunnable);
}
@@ -285,9 +294,9 @@
@Override
public void onWindowCreated(SurfaceTexture surfaceTexture, float refreshRate) {
synchronized (getSyncRoot()) {
- IBinder displayToken = SurfaceControl.createDisplay(mName, false);
+ IBinder displayToken = SurfaceControl.createDisplay(mName, mSecure);
mDevice = new OverlayDisplayDevice(displayToken, mName,
- mWidth, mHeight, refreshRate, mDensityDpi, surfaceTexture);
+ mWidth, mHeight, refreshRate, mDensityDpi, mSecure, surfaceTexture);
sendDisplayDeviceEventLocked(mDevice, DISPLAY_DEVICE_EVENT_ADDED);
}
@@ -310,6 +319,7 @@
pw.println(" mHeight=" + mHeight);
pw.println(" mDensityDpi=" + mDensityDpi);
pw.println(" mGravity=" + mGravity);
+ pw.println(" mSecure=" + mSecure);
// Try to dump the window state.
if (mWindow != null) {
@@ -324,7 +334,7 @@
@Override
public void run() {
OverlayDisplayWindow window = new OverlayDisplayWindow(getContext(),
- mName, mWidth, mHeight, mDensityDpi, mGravity,
+ mName, mWidth, mHeight, mDensityDpi, mGravity, mSecure,
OverlayDisplayHandle.this);
window.show();
diff --git a/services/java/com/android/server/display/OverlayDisplayWindow.java b/services/java/com/android/server/display/OverlayDisplayWindow.java
index a0edced..f1dd60a 100644
--- a/services/java/com/android/server/display/OverlayDisplayWindow.java
+++ b/services/java/com/android/server/display/OverlayDisplayWindow.java
@@ -64,8 +64,9 @@
private final int mHeight;
private final int mDensityDpi;
private final int mGravity;
+ private final boolean mSecure;
private final Listener mListener;
- private final String mTitle;
+ private String mTitle;
private final DisplayManager mDisplayManager;
private final WindowManager mWindowManager;
@@ -92,17 +93,23 @@
private float mLiveScale = 1.0f;
public OverlayDisplayWindow(Context context, String name,
- int width, int height, int densityDpi, int gravity, Listener listener) {
+ int width, int height, int densityDpi, int gravity, boolean secure,
+ Listener listener) {
mContext = context;
mName = name;
mWidth = width;
mHeight = height;
mDensityDpi = densityDpi;
mGravity = gravity;
+ mSecure = secure;
mListener = listener;
mTitle = context.getResources().getString(
com.android.internal.R.string.display_manager_overlay_display_title,
mName, mWidth, mHeight, mDensityDpi);
+ if (secure) {
+ mTitle += context.getResources().getString(
+ com.android.internal.R.string.display_manager_overlay_display_secure_suffix);
+ }
mDisplayManager = (DisplayManager)context.getSystemService(
Context.DISPLAY_SERVICE);
@@ -197,6 +204,9 @@
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
+ if (mSecure) {
+ mWindowParams.flags |= WindowManager.LayoutParams.FLAG_SECURE;
+ }
if (DISABLE_MOVE_AND_RESIZE) {
mWindowParams.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
}
diff --git a/services/java/com/android/server/display/VirtualDisplayAdapter.java b/services/java/com/android/server/display/VirtualDisplayAdapter.java
index 634fba7..3a71361 100644
--- a/services/java/com/android/server/display/VirtualDisplayAdapter.java
+++ b/services/java/com/android/server/display/VirtualDisplayAdapter.java
@@ -17,6 +17,7 @@
package com.android.server.display;
import android.content.Context;
+import android.hardware.display.DisplayManager;
import android.os.Handler;
import android.os.IBinder;
import android.os.IBinder.DeathRecipient;
@@ -46,12 +47,13 @@
super(syncRoot, context, handler, listener, TAG);
}
- public DisplayDevice createPrivateVirtualDisplayLocked(IBinder appToken,
+ public DisplayDevice createVirtualDisplayLocked(IBinder appToken,
int ownerUid, String ownerPackageName,
- String name, int width, int height, int densityDpi, Surface surface) {
- IBinder displayToken = SurfaceControl.createDisplay(name, false /*secure*/);
+ String name, int width, int height, int densityDpi, Surface surface, int flags) {
+ boolean secure = (flags & DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE) != 0;
+ IBinder displayToken = SurfaceControl.createDisplay(name, secure);
VirtualDisplayDevice device = new VirtualDisplayDevice(displayToken, appToken,
- ownerUid, ownerPackageName, name, width, height, densityDpi, surface);
+ ownerUid, ownerPackageName, name, width, height, densityDpi, surface, flags);
try {
appToken.linkToDeath(device, 0);
@@ -96,6 +98,7 @@
private final int mWidth;
private final int mHeight;
private final int mDensityDpi;
+ private final int mFlags;
private boolean mReleased;
private Surface mSurface;
@@ -103,7 +106,7 @@
public VirtualDisplayDevice(IBinder displayToken,
IBinder appToken, int ownerUid, String ownerPackageName,
- String name, int width, int height, int densityDpi, Surface surface) {
+ String name, int width, int height, int densityDpi, Surface surface, int flags) {
super(VirtualDisplayAdapter.this, displayToken);
mAppToken = appToken;
mOwnerUid = ownerUid;
@@ -113,6 +116,7 @@
mHeight = height;
mDensityDpi = densityDpi;
mSurface = surface;
+ mFlags = flags;
}
@Override
@@ -149,7 +153,17 @@
mInfo.densityDpi = mDensityDpi;
mInfo.xDpi = mDensityDpi;
mInfo.yDpi = mDensityDpi;
- mInfo.flags = DisplayDeviceInfo.FLAG_PRIVATE | DisplayDeviceInfo.FLAG_NEVER_BLANK;
+ mInfo.flags = 0;
+ if ((mFlags & DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC) == 0) {
+ mInfo.flags |= DisplayDeviceInfo.FLAG_PRIVATE |
+ DisplayDeviceInfo.FLAG_NEVER_BLANK;
+ }
+ if ((mFlags & DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE) != 0) {
+ mInfo.flags |= DisplayDeviceInfo.FLAG_SECURE;
+ }
+ if ((mFlags & DisplayManager.VIRTUAL_DISPLAY_FLAG_PRESENTATION) != 0) {
+ mInfo.flags |= DisplayDeviceInfo.FLAG_PRESENTATION;
+ }
mInfo.type = Display.TYPE_VIRTUAL;
mInfo.touch = DisplayDeviceInfo.TOUCH_NONE;
mInfo.ownerUid = mOwnerUid;
diff --git a/services/java/com/android/server/display/WifiDisplayAdapter.java b/services/java/com/android/server/display/WifiDisplayAdapter.java
index 4c80cf5..11d3819 100644
--- a/services/java/com/android/server/display/WifiDisplayAdapter.java
+++ b/services/java/com/android/server/display/WifiDisplayAdapter.java
@@ -352,7 +352,7 @@
}
boolean secure = (flags & RemoteDisplay.DISPLAY_FLAG_SECURE) != 0;
- int deviceFlags = 0;
+ int deviceFlags = DisplayDeviceInfo.FLAG_PRESENTATION;
if (secure) {
deviceFlags |= DisplayDeviceInfo.FLAG_SECURE;
if (mSupportsProtectedBuffers) {
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index cd2dc21..2f270e6 100755
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -293,12 +293,7 @@
// LOCK HELD. Can be called with mInstallLock held.
final Installer mInstaller;
- final File mFrameworkDir;
- final File mSystemAppDir;
- final File mPrivilegedAppDir;
- final File mVendorAppDir;
final File mAppInstallDir;
- final File mDalvikCacheDir;
/**
* Directory to which applications installed internally have native
@@ -1133,40 +1128,27 @@
scanMode |= SCAN_NO_DEX;
}
- final HashSet<String> libFiles = new HashSet<String>();
-
- mFrameworkDir = new File(Environment.getRootDirectory(), "framework");
- mDalvikCacheDir = new File(dataDir, "dalvik-cache");
-
- boolean didDexOpt = false;
+ final HashSet<String> alreadyDexOpted = new HashSet<String>();
/**
- * Out of paranoia, ensure that everything in the boot class
- * path has been dexed.
+ * Add everything in the in the boot class path to the
+ * list of process files because dexopt will have been run
+ * if necessary during zygote startup.
*/
String bootClassPath = System.getProperty("java.boot.class.path");
if (bootClassPath != null) {
String[] paths = splitString(bootClassPath, ':');
for (int i=0; i<paths.length; i++) {
- try {
- if (dalvik.system.DexFile.isDexOptNeeded(paths[i])) {
- libFiles.add(paths[i]);
- mInstaller.dexopt(paths[i], Process.SYSTEM_UID, true);
- didDexOpt = true;
- }
- } catch (FileNotFoundException e) {
- Slog.w(TAG, "Boot class path not found: " + paths[i]);
- } catch (IOException e) {
- Slog.w(TAG, "Cannot dexopt " + paths[i] + "; is it an APK or JAR? "
- + e.getMessage());
- }
+ alreadyDexOpted.add(paths[i]);
}
} else {
Slog.w(TAG, "No BOOTCLASSPATH found!");
}
+ boolean didDexOpt = false;
+
/**
- * Also ensure all external libraries have had dexopt run on them.
+ * Ensure all external libraries have had dexopt run on them.
*/
if (mSharedLibraries.size() > 0) {
Iterator<SharedLibraryEntry> libs = mSharedLibraries.values().iterator();
@@ -1177,7 +1159,7 @@
}
try {
if (dalvik.system.DexFile.isDexOptNeeded(lib)) {
- libFiles.add(lib);
+ alreadyDexOpted.add(lib);
mInstaller.dexopt(lib, Process.SYSTEM_UID, true);
didDexOpt = true;
}
@@ -1190,22 +1172,29 @@
}
}
+ File frameworkDir = new File(Environment.getRootDirectory(), "framework");
+
// Gross hack for now: we know this file doesn't contain any
// code, so don't dexopt it to avoid the resulting log spew.
- libFiles.add(mFrameworkDir.getPath() + "/framework-res.apk");
+ alreadyDexOpted.add(frameworkDir.getPath() + "/framework-res.apk");
+
+ // Gross hack for now: we know this file is only part of
+ // the boot class path for art, so don't dexopt it to
+ // avoid the resulting log spew.
+ alreadyDexOpted.add(frameworkDir.getPath() + "/core-libart.jar");
/**
* And there are a number of commands implemented in Java, which
* we currently need to do the dexopt on so that they can be
* run from a non-root shell.
*/
- String[] frameworkFiles = mFrameworkDir.list();
+ String[] frameworkFiles = frameworkDir.list();
if (frameworkFiles != null) {
for (int i=0; i<frameworkFiles.length; i++) {
- File libPath = new File(mFrameworkDir, frameworkFiles[i]);
+ File libPath = new File(frameworkDir, frameworkFiles[i]);
String path = libPath.getPath();
// Skip the file if we alrady did it.
- if (libFiles.contains(path)) {
+ if (alreadyDexOpted.contains(path)) {
continue;
}
// Skip the file if it is not a type we want to dexopt.
@@ -1226,19 +1215,21 @@
}
if (didDexOpt) {
+ File dalvikCacheDir = new File(dataDir, "dalvik-cache");
+
// If we had to do a dexopt of one of the previous
// things, then something on the system has changed.
// Consider this significant, and wipe away all other
// existing dexopt files to ensure we don't leave any
// dangling around.
- String[] files = mDalvikCacheDir.list();
+ String[] files = dalvikCacheDir.list();
if (files != null) {
for (int i=0; i<files.length; i++) {
String fn = files[i];
if (fn.startsWith("data@app@")
|| fn.startsWith("data@app-private@")) {
Slog.i(TAG, "Pruning dalvik file: " + fn);
- (new File(mDalvikCacheDir, fn)).delete();
+ (new File(dalvikCacheDir, fn)).delete();
}
}
}
@@ -1246,14 +1237,14 @@
// Find base frameworks (resource packages without code).
mFrameworkInstallObserver = new AppDirObserver(
- mFrameworkDir.getPath(), OBSERVER_EVENTS, true, false);
+ frameworkDir.getPath(), OBSERVER_EVENTS, true, false);
mFrameworkInstallObserver.startWatching();
- scanDirLI(mFrameworkDir, PackageParser.PARSE_IS_SYSTEM
+ scanDirLI(frameworkDir, PackageParser.PARSE_IS_SYSTEM
| PackageParser.PARSE_IS_SYSTEM_DIR,
scanMode | SCAN_NO_DEX, 0);
// Collected privileged system packages.
- mPrivilegedAppDir = new File(Environment.getRootDirectory(), "priv-app");
+ File mPrivilegedAppDir = new File(Environment.getRootDirectory(), "priv-app");
mPrivilegedInstallObserver = new AppDirObserver(
mPrivilegedAppDir.getPath(), OBSERVER_EVENTS, true, true);
mPrivilegedInstallObserver.startWatching();
@@ -1262,7 +1253,7 @@
| PackageParser.PARSE_IS_PRIVILEGED, scanMode, 0);
// Collect ordinary system packages.
- mSystemAppDir = new File(Environment.getRootDirectory(), "app");
+ File mSystemAppDir = new File(Environment.getRootDirectory(), "app");
mSystemInstallObserver = new AppDirObserver(
mSystemAppDir.getPath(), OBSERVER_EVENTS, true, false);
mSystemInstallObserver.startWatching();
@@ -1270,7 +1261,7 @@
| PackageParser.PARSE_IS_SYSTEM_DIR, scanMode, 0);
// Collect all vendor packages.
- mVendorAppDir = new File("/vendor/app");
+ File mVendorAppDir = new File("/vendor/app");
mVendorInstallObserver = new AppDirObserver(
mVendorAppDir.getPath(), OBSERVER_EVENTS, true, false);
mVendorInstallObserver.startWatching();
diff --git a/services/java/com/android/server/print/PrintManagerService.java b/services/java/com/android/server/print/PrintManagerService.java
index 86e7685..8ee2fea 100644
--- a/services/java/com/android/server/print/PrintManagerService.java
+++ b/services/java/com/android/server/print/PrintManagerService.java
@@ -68,7 +68,7 @@
synchronized (mLock) {
UserState userState = getCurrentUserStateLocked();
userState.updateIfNeededLocked();
- userState.getSpoolerLocked().notifyClientForActivteJobs();
+ userState.getSpoolerLocked().start();
}
}
});
@@ -144,22 +144,45 @@
}
final long identity = Binder.clearCallingIdentity();
try {
- if (spooler.cancelPrintJob(printJobId, resolvedAppId)) {
- return;
- }
- PrintJobInfo printJobInfo = getPrintJobInfo(printJobId, resolvedAppId, resolvedUserId);
+ PrintJobInfo printJobInfo = spooler.getPrintJobInfo(printJobId, resolvedAppId);
if (printJobInfo == null) {
return;
}
- ComponentName printServiceName = printJobInfo.getPrinterId().getService();
- RemotePrintService printService = null;
- synchronized (mLock) {
- printService = userState.getActiveServices().get(printServiceName);
+ if (printJobInfo.getState() != PrintJobInfo.STATE_FAILED) {
+ ComponentName printServiceName = printJobInfo.getPrinterId().getServiceName();
+ RemotePrintService printService = null;
+ synchronized (mLock) {
+ printService = userState.getActiveServicesLocked().get(printServiceName);
+ }
+ if (printService == null) {
+ return;
+ }
+ printService.onRequestCancelPrintJob(printJobInfo);
+ } else {
+ // If the print job is failed we do not need cooperation
+ // from the print service.
+ spooler.setPrintJobState(printJobId, PrintJobInfo.STATE_CANCELED, null);
}
- if (printService == null) {
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @Override
+ public void restartPrintJob(int printJobId, int appId, int userId) {
+ final int resolvedAppId = resolveCallingAppEnforcingPermissions(appId);
+ final int resolvedUserId = resolveCallingUserEnforcingPermissions(userId);
+ final RemotePrintSpooler spooler;
+ synchronized (mLock) {
+ spooler = getOrCreateUserStateLocked(resolvedUserId).getSpoolerLocked();
+ }
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ PrintJobInfo printJobInfo = getPrintJobInfo(printJobId, resolvedAppId, resolvedUserId);
+ if (printJobInfo == null || printJobInfo.getState() != PrintJobInfo.STATE_FAILED) {
return;
}
- printService.onRequestCancelPrintJob(printJobInfo);
+ spooler.setPrintJobState(printJobId, PrintJobInfo.STATE_QUEUED, null);
} finally {
Binder.restoreCallingIdentity(identity);
}
@@ -305,7 +328,7 @@
mCurrentUserId = newUserId;
UserState userState = getCurrentUserStateLocked();
userState.updateIfNeededLocked();
- userState.getSpoolerLocked().notifyClientForActivteJobs();
+ userState.getSpoolerLocked().start();
}
}
diff --git a/services/java/com/android/server/print/RemotePrintService.java b/services/java/com/android/server/print/RemotePrintService.java
index 7acf6ab..28a7362 100644
--- a/services/java/com/android/server/print/RemotePrintService.java
+++ b/services/java/com/android/server/print/RemotePrintService.java
@@ -228,19 +228,19 @@
printerIds).sendToTarget();
}
- private void handleReqeustUpdatePritners(final List<PrinterId> printerIds) {
+ private void handleReqeustUpdatePrinters(final List<PrinterId> printerIds) {
throwIfDestroyed();
if (!isBound()) {
ensureBound();
mPendingCommands.add(new Runnable() {
@Override
public void run() {
- handleReqeustUpdatePritners(printerIds);
+ handleReqeustUpdatePrinters(printerIds);
}
});
} else {
if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserId + "] handleReqeustUpdatePritners()");
+ Slog.i(LOG_TAG, "[user: " + mUserId + "] handleReqeustUpdatePrinters()");
}
try {
mPrintService.onRequestUpdatePrinters(printerIds);
@@ -367,7 +367,7 @@
case MSG_ON_REQUEST_UPDATE_PRINTERS: {
List<PrinterId> printerIds = (List<PrinterId>) message.obj;
- handleReqeustUpdatePritners(printerIds);
+ handleReqeustUpdatePrinters(printerIds);
} break;
case MSG_ON_STOP_PRINTER_DISCOVERY: {
@@ -423,12 +423,12 @@
}
@Override
- public boolean setPrintJobState(int printJobId, int state) {
+ public boolean setPrintJobState(int printJobId, int state, CharSequence error) {
RemotePrintService service = mWeakService.get();
if (service != null) {
final long identity = Binder.clearCallingIdentity();
try {
- return service.mSpooler.setPrintJobState(printJobId, state);
+ return service.mSpooler.setPrintJobState(printJobId, state, error);
} finally {
Binder.restoreCallingIdentity(identity);
}
@@ -524,8 +524,8 @@
}
private void throwIfPrinterIdTampered(PrinterId printerId) {
- if (printerId == null || printerId.getService() == null
- || !printerId.getService().equals(mComponentName)) {
+ if (printerId == null || printerId.getServiceName() == null
+ || !printerId.getServiceName().equals(mComponentName)) {
throw new IllegalArgumentException("Invalid printer id: " + printerId);
}
}
diff --git a/services/java/com/android/server/print/RemotePrintSpooler.java b/services/java/com/android/server/print/RemotePrintSpooler.java
index fe5b067..3a96a5b 100644
--- a/services/java/com/android/server/print/RemotePrintSpooler.java
+++ b/services/java/com/android/server/print/RemotePrintSpooler.java
@@ -66,8 +66,6 @@
private final CreatePrintJobCaller mCreatePrintJobCaller = new CreatePrintJobCaller();
- private final CancelPrintJobCaller mCancelPrintJobCaller = new CancelPrintJobCaller();
-
private final GetPrintJobInfoCaller mGetPrintJobInfoCaller = new GetPrintJobInfoCaller();
private final SetPrintJobStateCaller mSetPrintJobStatusCaller = new SetPrintJobStateCaller();
@@ -118,9 +116,6 @@
throwIfDestroyedLocked();
mCanUnbind = false;
}
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] getPrintJobInfos()");
- }
try {
return mGetPrintJobInfosCaller.getPrintJobInfos(getRemoteInstanceLazy(),
componentName, state, appId);
@@ -129,6 +124,9 @@
} catch (TimeoutException te) {
Slog.e(LOG_TAG, "Error getting print jobs.", te);
} finally {
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] getPrintJobInfos()");
+ }
synchronized (mLock) {
mCanUnbind = true;
mLock.notifyAll();
@@ -144,9 +142,6 @@
throwIfDestroyedLocked();
mCanUnbind = false;
}
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] createPrintJob()");
- }
try {
return mCreatePrintJobCaller.createPrintJob(getRemoteInstanceLazy(),
printJobName, client, documentAdapter, attributes, appId);
@@ -155,6 +150,9 @@
} catch (TimeoutException te) {
Slog.e(LOG_TAG, "Error creating print job.", te);
} finally {
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] createPrintJob()");
+ }
synchronized (mLock) {
mCanUnbind = true;
mLock.notifyAll();
@@ -163,40 +161,12 @@
return null;
}
- public final boolean cancelPrintJob(int printJobId, int appId) {
- throwIfCalledOnMainThread();
- synchronized (mLock) {
- throwIfDestroyedLocked();
- mCanUnbind = false;
- }
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] cancelPrintJob()");
- }
- try {
- return mCancelPrintJobCaller.cancelPrintJob(getRemoteInstanceLazy(),
- printJobId, appId);
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error canceling print job.", re);
- } catch (TimeoutException te) {
- Slog.e(LOG_TAG, "Error canceling print job.", te);
- } finally {
- synchronized (mLock) {
- mCanUnbind = true;
- mLock.notifyAll();
- }
- }
- return false;
- }
-
public final void writePrintJobData(ParcelFileDescriptor fd, int printJobId) {
throwIfCalledOnMainThread();
synchronized (mLock) {
throwIfDestroyedLocked();
mCanUnbind = false;
}
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] writePrintJobData()");
- }
try {
getRemoteInstanceLazy().writePrintJobData(fd, printJobId);
} catch (RemoteException re) {
@@ -204,6 +174,9 @@
} catch (TimeoutException te) {
Slog.e(LOG_TAG, "Error writing print job data.", te);
} finally {
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] writePrintJobData()");
+ }
// We passed the file descriptor across and now the other
// side is responsible to close it, so close the local copy.
IoUtils.closeQuietly(fd);
@@ -220,9 +193,6 @@
throwIfDestroyedLocked();
mCanUnbind = false;
}
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] getPrintJobInfo()");
- }
try {
return mGetPrintJobInfoCaller.getPrintJobInfo(getRemoteInstanceLazy(),
printJobId, appId);
@@ -231,6 +201,9 @@
} catch (TimeoutException te) {
Slog.e(LOG_TAG, "Error getting print job info.", te);
} finally {
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] getPrintJobInfo()");
+ }
synchronized (mLock) {
mCanUnbind = true;
mLock.notifyAll();
@@ -239,23 +212,23 @@
return null;
}
- public final boolean setPrintJobState(int printJobId, int state) {
+ public final boolean setPrintJobState(int printJobId, int state, CharSequence error) {
throwIfCalledOnMainThread();
synchronized (mLock) {
throwIfDestroyedLocked();
mCanUnbind = false;
}
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] setPrintJobState()");
- }
try {
return mSetPrintJobStatusCaller.setPrintJobState(getRemoteInstanceLazy(),
- printJobId, state);
+ printJobId, state, error);
} catch (RemoteException re) {
Slog.e(LOG_TAG, "Error setting print job state.", re);
} catch (TimeoutException te) {
Slog.e(LOG_TAG, "Error setting print job state.", te);
} finally {
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] setPrintJobState()");
+ }
synchronized (mLock) {
mCanUnbind = true;
mLock.notifyAll();
@@ -270,9 +243,6 @@
throwIfDestroyedLocked();
mCanUnbind = false;
}
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] setPrintJobTag()");
- }
try {
return mSetPrintJobTagCaller.setPrintJobTag(getRemoteInstanceLazy(),
printJobId, tag);
@@ -281,6 +251,9 @@
} catch (TimeoutException te) {
Slog.e(LOG_TAG, "Error setting print job tag.", te);
} finally {
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] setPrintJobTag()");
+ }
synchronized (mLock) {
mCanUnbind = true;
mLock.notifyAll();
@@ -289,23 +262,20 @@
return false;
}
- public final void notifyClientForActivteJobs() {
+ public final void start() {
throwIfCalledOnMainThread();
synchronized (mLock) {
throwIfDestroyedLocked();
mCanUnbind = false;
}
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier()
- + "] notifyClientForActivteJobs()");
- }
try {
- getRemoteInstanceLazy().notifyClientForActivteJobs();
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error asking for active print job notification.", re);
+ getRemoteInstanceLazy();
} catch (TimeoutException te) {
- Slog.e(LOG_TAG, "Error asking for active print job notification.", te);
+ Slog.e(LOG_TAG, "Error starting the spooler.", te);
} finally {
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "[user: " + mUserHandle.getIdentifier() + "] start()");
+ }
synchronized (mLock) {
mCanUnbind = true;
mLock.notifyAll();
@@ -486,27 +456,6 @@
}
}
- private static final class CancelPrintJobCaller extends TimedRemoteCaller<Boolean> {
- private final IPrintSpoolerCallbacks mCallback;
-
- public CancelPrintJobCaller() {
- super(TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS);
- mCallback = new BasePrintSpoolerServiceCallbacks() {
- @Override
- public void onCancelPrintJobResult(boolean canceled, int sequence) {
- onRemoteMethodResult(canceled, sequence);
- }
- };
- }
-
- public boolean cancelPrintJob(IPrintSpooler target, int printJobId,
- int appId) throws RemoteException, TimeoutException {
- final int sequence = onBeforeRemoteCall();
- target.cancelPrintJob(printJobId, mCallback, appId, sequence);
- return getResultTimed(sequence);
- }
- }
-
private static final class GetPrintJobInfoCaller extends TimedRemoteCaller<PrintJobInfo> {
private final IPrintSpoolerCallbacks mCallback;
@@ -542,9 +491,9 @@
}
public boolean setPrintJobState(IPrintSpooler target, int printJobId,
- int status) throws RemoteException, TimeoutException {
+ int status, CharSequence error) throws RemoteException, TimeoutException {
final int sequence = onBeforeRemoteCall();
- target.setPrintJobState(printJobId, status, mCallback, sequence);
+ target.setPrintJobState(printJobId, status, error, mCallback, sequence);
return getResultTimed(sequence);
}
}
diff --git a/services/java/com/android/server/print/UserState.java b/services/java/com/android/server/print/UserState.java
index c41f9b0..00cc2ff 100644
--- a/services/java/com/android/server/print/UserState.java
+++ b/services/java/com/android/server/print/UserState.java
@@ -85,7 +85,7 @@
final RemotePrintService service;
synchronized (mLock) {
throwIfDestroyedLocked();
- ComponentName printServiceName = printJob.getPrinterId().getService();
+ ComponentName printServiceName = printJob.getPrinterId().getServiceName();
service = mActiveServices.get(printServiceName);
}
if (service != null) {
@@ -147,7 +147,7 @@
if (mActiveServices.isEmpty()) {
return;
}
- service = mActiveServices.get(printerIds.get(0).getService());
+ service = mActiveServices.get(printerIds.get(0).getServiceName());
}
if (service != null) {
service.onRequestUpdatePrinters(printerIds);
@@ -166,7 +166,7 @@
return mSpooler;
}
- public Map<ComponentName, RemotePrintService> getActiveServices() {
+ public Map<ComponentName, RemotePrintService> getActiveServicesLocked() {
synchronized(mLock) {
throwIfDestroyedLocked();
return mActiveServices;
diff --git a/services/java/com/android/server/wm/BlackFrame.java b/services/java/com/android/server/wm/BlackFrame.java
index 774b165..737d854 100644
--- a/services/java/com/android/server/wm/BlackFrame.java
+++ b/services/java/com/android/server/wm/BlackFrame.java
@@ -22,7 +22,6 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.util.Slog;
-import android.view.Surface;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
@@ -62,6 +61,10 @@
" BLACK " + surface + ": CREATE layer=" + layer);
}
+ void setAlpha(float alpha) {
+ surface.setAlpha(alpha);
+ }
+
void setMatrix(Matrix matrix) {
mTmpMatrix.setTranslate(left, top);
mTmpMatrix.postConcat(matrix);
@@ -93,6 +96,8 @@
final float[] mTmpFloats = new float[9];
final BlackSurface[] mBlackSurfaces = new BlackSurface[4];
+ final boolean mForceDefaultOrientation;
+
public void printTo(String prefix, PrintWriter pw) {
pw.print(prefix); pw.print("Outer: "); mOuterRect.printShortString(pw);
pw.print(" / Inner: "); mInnerRect.printShortString(pw);
@@ -106,10 +111,12 @@
}
}
- public BlackFrame(SurfaceSession session, Rect outer, Rect inner,
- int layer, final int layerStack) throws SurfaceControl.OutOfResourcesException {
+ public BlackFrame(SurfaceSession session, Rect outer, Rect inner, int layer, int layerStack,
+ boolean forceDefaultOrientation) throws SurfaceControl.OutOfResourcesException {
boolean success = false;
+ mForceDefaultOrientation = forceDefaultOrientation;
+
mOuterRect = new Rect(outer);
mInnerRect = new Rect(inner);
try {
@@ -162,6 +169,14 @@
}
}
+ public void setAlpha(float alpha) {
+ for (int i=0; i<mBlackSurfaces.length; i++) {
+ if (mBlackSurfaces[i] != null) {
+ mBlackSurfaces[i].setAlpha(alpha);
+ }
+ }
+ }
+
public void setMatrix(Matrix matrix) {
for (int i=0; i<mBlackSurfaces.length; i++) {
if (mBlackSurfaces[i] != null) {
diff --git a/services/java/com/android/server/wm/DisplayContent.java b/services/java/com/android/server/wm/DisplayContent.java
index 4f699ae..74676ca 100644
--- a/services/java/com/android/server/wm/DisplayContent.java
+++ b/services/java/com/android/server/wm/DisplayContent.java
@@ -176,10 +176,20 @@
return mHomeStack;
}
- public void updateDisplayInfo() {
+ void updateDisplayInfo() {
mDisplay.getDisplayInfo(mDisplayInfo);
}
+ void getLogicalDisplayRect(Rect out) {
+ updateDisplayInfo();
+ // Uses same calculation as in LogicalDisplay#configureDisplayInTransactionLocked.
+ int width = mDisplayInfo.logicalWidth;
+ int left = (mBaseDisplayWidth - width) / 2;
+ int height = mDisplayInfo.logicalHeight;
+ int top = (mBaseDisplayHeight - height) / 2;
+ out.set(left, top, left + width, top + height);
+ }
+
/** @return The number of tokens in all of the Tasks on this display. */
int numTokens() {
getTasks();
diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java
index b2fbec1..7d90858 100644
--- a/services/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -26,6 +26,7 @@
import android.graphics.Rect;
import android.util.Slog;
import android.view.Display;
+import android.view.DisplayInfo;
import android.view.Surface;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
@@ -43,7 +44,7 @@
static final int FREEZE_LAYER = WindowManagerService.TYPE_LAYER_MULTIPLIER * 200;
final Context mContext;
- final Display mDisplay;
+ final DisplayContent mDisplayContent;
SurfaceControl mSurfaceControl;
BlackFrame mCustomBlackFrame;
BlackFrame mExitingBlackFrame;
@@ -53,6 +54,8 @@
int mOriginalRotation;
int mOriginalWidth, mOriginalHeight;
int mCurRotation;
+ Rect mOriginalDisplayRect = new Rect();
+ Rect mCurrentDisplayRect = new Rect();
// For all animations, "exit" is for the UI elements that are going
// away (that is the snapshot of the old screen), and "enter" is for
@@ -108,6 +111,7 @@
boolean mAnimRunning;
boolean mFinishAnimReady;
long mFinishAnimStartTime;
+ boolean mForceDefaultOrientation;
final Matrix mFrameInitialMatrix = new Matrix();
final Matrix mSnapshotInitialMatrix = new Matrix();
@@ -186,14 +190,35 @@
pw.print(prefix); pw.print("mExitFrameFinalMatrix=");
mExitFrameFinalMatrix.printShortString(pw);
pw.println();
+ pw.print(prefix); pw.print("mForceDefaultOrientation="); pw.print(mForceDefaultOrientation);
+ if (mForceDefaultOrientation) {
+ pw.print(" mOriginalDisplayRect="); pw.print(mOriginalDisplayRect.toShortString());
+ pw.print(" mCurrentDisplayRect="); pw.println(mCurrentDisplayRect.toShortString());
+ }
}
- public ScreenRotationAnimation(Context context, Display display, SurfaceSession session,
- boolean inTransaction, int originalWidth, int originalHeight, int originalRotation) {
+ public ScreenRotationAnimation(Context context, DisplayContent displayContent,
+ SurfaceSession session, boolean inTransaction, boolean forceDefaultOrientation) {
mContext = context;
- mDisplay = display;
+ mDisplayContent = displayContent;
+ displayContent.getLogicalDisplayRect(mOriginalDisplayRect);
// Screenshot does NOT include rotation!
+ final Display display = displayContent.getDisplay();
+ int originalRotation = display.getRotation();
+ final int originalWidth;
+ final int originalHeight;
+ DisplayInfo displayInfo = displayContent.getDisplayInfo();
+ if (forceDefaultOrientation) {
+ // Emulated orientation.
+ mForceDefaultOrientation = true;
+ originalWidth = displayContent.mBaseDisplayWidth;
+ originalHeight = displayContent.mBaseDisplayHeight;
+ } else {
+ // Normal situation
+ originalWidth = displayInfo.logicalWidth;
+ originalHeight = displayInfo.logicalHeight;
+ }
if (originalRotation == Surface.ROTATION_90
|| originalRotation == Surface.ROTATION_270) {
mWidth = originalHeight;
@@ -219,6 +244,8 @@
mSurfaceControl = new SurfaceTrace(session, "ScreenshotSurface",
mWidth, mHeight,
PixelFormat.OPAQUE, SurfaceControl.HIDDEN);
+ Slog.w(TAG, "ScreenRotationAnimation ctor: displayOffset="
+ + mOriginalDisplayRect.toShortString());
} else {
mSurfaceControl = new SurfaceControl(session, "ScreenshotSurface",
mWidth, mHeight,
@@ -230,7 +257,7 @@
// FIXME: we should use the proper display
SurfaceControl.screenshot(SurfaceControl.getBuiltInDisplay(
SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN), sur);
- mSurfaceControl.setLayerStack(mDisplay.getLayerStack());
+ mSurfaceControl.setLayerStack(display.getLayerStack());
mSurfaceControl.setLayer(FREEZE_LAYER + 1);
mSurfaceControl.setAlpha(0);
mSurfaceControl.show();
@@ -266,7 +293,14 @@
private void setSnapshotTransformInTransaction(Matrix matrix, float alpha) {
if (mSurfaceControl != null) {
matrix.getValues(mTmpFloats);
- mSurfaceControl.setPosition(mTmpFloats[Matrix.MTRANS_X], mTmpFloats[Matrix.MTRANS_Y]);
+ float x = mTmpFloats[Matrix.MTRANS_X];
+ float y = mTmpFloats[Matrix.MTRANS_Y];
+ if (mForceDefaultOrientation) {
+ mDisplayContent.getLogicalDisplayRect(mCurrentDisplayRect);
+ x -= mCurrentDisplayRect.left;
+ y -= mCurrentDisplayRect.top;
+ }
+ mSurfaceControl.setPosition(x, y);
mSurfaceControl.setMatrix(
mTmpFloats[Matrix.MSCALE_X], mTmpFloats[Matrix.MSKEW_Y],
mTmpFloats[Matrix.MSKEW_X], mTmpFloats[Matrix.MSCALE_Y]);
@@ -491,7 +525,7 @@
mRotateFrameAnimation.scaleCurrentDuration(animationScale);
}
- final int layerStack = mDisplay.getLayerStack();
+ final int layerStack = mDisplayContent.getDisplay().getLayerStack();
if (USE_CUSTOM_BLACK_FRAME && mCustomBlackFrame == null) {
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS || DEBUG_STATE) Slog.i(
WindowManagerService.TAG,
@@ -511,7 +545,7 @@
mOriginalWidth*2, mOriginalHeight*2);
Rect inner = new Rect(0, 0, mOriginalWidth, mOriginalHeight);
mCustomBlackFrame = new BlackFrame(session, outer, inner, FREEZE_LAYER + 3,
- layerStack);
+ layerStack, false);
mCustomBlackFrame.setMatrix(mFrameInitialMatrix);
} catch (SurfaceControl.OutOfResourcesException e) {
Slog.w(TAG, "Unable to allocate black surface", e);
@@ -537,11 +571,21 @@
// we were last in.
createRotationMatrix(delta, mOriginalWidth, mOriginalHeight, mFrameInitialMatrix);
- Rect outer = new Rect(-mOriginalWidth*1, -mOriginalHeight*1,
- mOriginalWidth*2, mOriginalHeight*2);
- Rect inner = new Rect(0, 0, mOriginalWidth, mOriginalHeight);
+ final Rect outer;
+ final Rect inner;
+ if (mForceDefaultOrientation) {
+ // Going from a smaller Display to a larger Display, add curtains to sides
+ // or top and bottom. Going from a larger to smaller display will result in
+ // no BlackSurfaces being constructed.
+ outer = mCurrentDisplayRect;
+ inner = mOriginalDisplayRect;
+ } else {
+ outer = new Rect(-mOriginalWidth*1, -mOriginalHeight*1,
+ mOriginalWidth*2, mOriginalHeight*2);
+ inner = new Rect(0, 0, mOriginalWidth, mOriginalHeight);
+ }
mExitingBlackFrame = new BlackFrame(session, outer, inner, FREEZE_LAYER + 2,
- layerStack);
+ layerStack, mForceDefaultOrientation);
mExitingBlackFrame.setMatrix(mFrameInitialMatrix);
} catch (SurfaceControl.OutOfResourcesException e) {
Slog.w(TAG, "Unable to allocate black surface", e);
@@ -564,7 +608,7 @@
finalWidth*2, finalHeight*2);
Rect inner = new Rect(0, 0, finalWidth, finalHeight);
mEnteringBlackFrame = new BlackFrame(session, outer, inner, FREEZE_LAYER,
- layerStack);
+ layerStack, false);
} catch (SurfaceControl.OutOfResourcesException e) {
Slog.w(TAG, "Unable to allocate black surface", e);
} finally {
@@ -888,6 +932,9 @@
} else {
mExitFrameFinalMatrix.setConcat(mExitTransformation.getMatrix(), mFrameInitialMatrix);
mExitingBlackFrame.setMatrix(mExitFrameFinalMatrix);
+ if (mForceDefaultOrientation) {
+ mExitingBlackFrame.setAlpha(mExitTransformation.getAlpha());
+ }
}
}
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 304fbb1..0750e71 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -9903,11 +9903,8 @@
}
// TODO(multidisplay): rotation on main screen only.
- final Display display = displayContent.getDisplay();
- final DisplayInfo displayInfo = displayContent.getDisplayInfo();
- screenRotationAnimation = new ScreenRotationAnimation(mContext,
- display, mFxSession, inTransaction, displayInfo.logicalWidth,
- displayInfo.logicalHeight, display.getRotation());
+ screenRotationAnimation = new ScreenRotationAnimation(mContext, displayContent,
+ mFxSession, inTransaction, mPolicy.isDefaultOrientationForced());
mAnimator.setScreenRotationAnimationLocked(displayId, screenRotationAnimation);
}
}
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index a52d85c..6fa9cd0 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -494,22 +494,22 @@
@Override
public void setAlpha(float alpha) {
- super.setAlpha(alpha);
- if (alpha != mSurfaceTraceAlpha) {
- mSurfaceTraceAlpha = alpha;
- Slog.v(SURFACE_TAG, "setAlpha: " + this + ". Called by "
+ if (mSurfaceTraceAlpha != alpha) {
+ Slog.v(SURFACE_TAG, "setAlpha(" + alpha + "): OLD:" + this + ". Called by "
+ Debug.getCallers(3));
+ mSurfaceTraceAlpha = alpha;
}
+ super.setAlpha(alpha);
}
@Override
public void setLayer(int zorder) {
- super.setLayer(zorder);
if (zorder != mLayer) {
- mLayer = zorder;
- Slog.v(SURFACE_TAG, "setLayer: " + this + ". Called by "
+ Slog.v(SURFACE_TAG, "setLayer(" + zorder + "): OLD:" + this + ". Called by "
+ Debug.getCallers(3));
+ mLayer = zorder;
}
+ super.setLayer(zorder);
sSurfaces.remove(this);
int i;
@@ -524,69 +524,68 @@
@Override
public void setPosition(float x, float y) {
- super.setPosition(x, y);
if (x != mPosition.x || y != mPosition.y) {
+ Slog.v(SURFACE_TAG, "setPosition(" + x + "," + y + "): OLD:" + this
+ + ". Called by " + Debug.getCallers(3));
mPosition.set(x, y);
- Slog.v(SURFACE_TAG, "setPosition: " + this + ". Called by "
- + Debug.getCallers(3));
}
+ super.setPosition(x, y);
}
@Override
public void setSize(int w, int h) {
- super.setSize(w, h);
if (w != mSize.x || h != mSize.y) {
- mSize.set(w, h);
- Slog.v(SURFACE_TAG, "setSize: " + this + ". Called by "
+ Slog.v(SURFACE_TAG, "setSize(" + w + "," + h + "): OLD:" + this + ". Called by "
+ Debug.getCallers(3));
+ mSize.set(w, h);
}
+ super.setSize(w, h);
}
@Override
public void setWindowCrop(Rect crop) {
- super.setWindowCrop(crop);
if (crop != null) {
if (!crop.equals(mWindowCrop)) {
+ Slog.v(SURFACE_TAG, "setWindowCrop(" + crop.toShortString() + "): OLD:" + this
+ + ". Called by " + Debug.getCallers(3));
mWindowCrop.set(crop);
- Slog.v(SURFACE_TAG, "setWindowCrop: " + this + ". Called by "
- + Debug.getCallers(3));
}
}
+ super.setWindowCrop(crop);
}
@Override
public void setLayerStack(int layerStack) {
- super.setLayerStack(layerStack);
if (layerStack != mLayerStack) {
+ Slog.v(SURFACE_TAG, "setLayerStack(" + layerStack + "): OLD:" + this
+ + ". Called by " + Debug.getCallers(3));
mLayerStack = layerStack;
- Slog.v(SURFACE_TAG, "setLayerStack: " + this + ". Called by " + Debug.getCallers(3));
}
+ super.setLayerStack(layerStack);
}
@Override
public void hide() {
- super.hide();
if (mShown) {
+ Slog.v(SURFACE_TAG, "hide: OLD:" + this + ". Called by " + Debug.getCallers(3));
mShown = false;
- Slog.v(SURFACE_TAG, "hide: " + this + ". Called by "
- + Debug.getCallers(3));
}
+ super.hide();
}
+
@Override
public void show() {
- super.show();
if (!mShown) {
+ Slog.v(SURFACE_TAG, "show: OLD:" + this + ". Called by " + Debug.getCallers(3));
mShown = true;
- Slog.v(SURFACE_TAG, "show: " + this + ". Called by "
- + Debug.getCallers(3));
}
+ super.show();
}
@Override
public void destroy() {
super.destroy();
- Slog.v(SURFACE_TAG, "destroy: " + this + ". Called by "
- + Debug.getCallers(3));
+ Slog.v(SURFACE_TAG, "destroy: " + this + ". Called by " + Debug.getCallers(3));
sSurfaces.remove(this);
}
diff --git a/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java
index 5fa046aa..a9909b2 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java
@@ -63,6 +63,7 @@
import android.net.NetworkStatsHistory;
import android.net.NetworkTemplate;
import android.os.INetworkManagementService;
+import android.os.WorkSource;
import android.telephony.TelephonyManager;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.LargeTest;
diff --git a/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/DisplaySourceService.java b/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/DisplaySourceService.java
index ccead44..256f900 100644
--- a/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/DisplaySourceService.java
+++ b/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/DisplaySourceService.java
@@ -197,8 +197,8 @@
Surface surface = codec.createInputSurface();
codec.start();
- VirtualDisplay virtualDisplay = mDisplayManager.createPrivateVirtualDisplay(
- DISPLAY_NAME, mWidth, mHeight, mDensityDpi, surface);
+ VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(
+ DISPLAY_NAME, mWidth, mHeight, mDensityDpi, surface, 0);
if (virtualDisplay != null) {
mHandler.obtainMessage(MSG_DISPATCH_DISPLAY_ADDED,
virtualDisplay.getDisplay()).sendToTarget();