Merge "Initial commit for X509TrustManagerExtensions." into jb-mr1-dev
diff --git a/api/current.txt b/api/current.txt
index 4947a96..8f77e23 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -62,21 +62,17 @@
field public static final java.lang.String INJECT_EVENTS = "android.permission.INJECT_EVENTS";
field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
- field public static final java.lang.String INTERACT_ACROSS_USERS = "android.permission.INTERACT_ACROSS_USERS";
field public static final java.lang.String INTERNAL_SYSTEM_WINDOW = "android.permission.INTERNAL_SYSTEM_WINDOW";
field public static final java.lang.String INTERNET = "android.permission.INTERNET";
field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES";
field public static final java.lang.String MANAGE_ACCOUNTS = "android.permission.MANAGE_ACCOUNTS";
field public static final java.lang.String MANAGE_APP_TOKENS = "android.permission.MANAGE_APP_TOKENS";
- field public static final java.lang.String MANAGE_USERS = "android.permission.MANAGE_USERS";
field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS";
field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
- field public static final java.lang.String NET_TUNNELING = "android.permission.NET_TUNNELING";
field public static final java.lang.String NFC = "android.permission.NFC";
- field public static final java.lang.String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT";
field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
field public static final java.lang.String READ_CALENDAR = "android.permission.READ_CALENDAR";
@@ -3901,11 +3897,12 @@
method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int);
method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int, android.os.Bundle);
method public static android.app.PendingIntent getBroadcast(android.content.Context, int, android.content.Intent, int);
+ method public java.lang.String getCreatorPackage();
+ method public int getCreatorUid();
+ method public android.os.UserHandle getCreatorUserHandle();
method public android.content.IntentSender getIntentSender();
method public static android.app.PendingIntent getService(android.content.Context, int, android.content.Intent, int);
- method public java.lang.String getTargetPackage();
- method public int getTargetUid();
- method public android.os.UserHandle getTargetUserHandle();
+ method public deprecated java.lang.String getTargetPackage();
method public static android.app.PendingIntent readPendingIntentOrNullFromParcel(android.os.Parcel);
method public void send() throws android.app.PendingIntent.CanceledException;
method public void send(int) throws android.app.PendingIntent.CanceledException;
@@ -6060,9 +6057,10 @@
public class IntentSender implements android.os.Parcelable {
method public int describeContents();
- method public java.lang.String getTargetPackage();
- method public int getTargetUid();
- method public android.os.UserHandle getTargetUserHandle();
+ method public java.lang.String getCreatorPackage();
+ method public int getCreatorUid();
+ method public android.os.UserHandle getCreatorUserHandle();
+ method public deprecated java.lang.String getTargetPackage();
method public static android.content.IntentSender readIntentSenderOrNullFromParcel(android.os.Parcel);
method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler) throws android.content.IntentSender.SendIntentException;
method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler, java.lang.String) throws android.content.IntentSender.SendIntentException;
@@ -6705,17 +6703,6 @@
field public java.lang.String packageName;
}
- public class PackageUserState {
- ctor public PackageUserState();
- ctor public PackageUserState(android.content.pm.PackageUserState);
- field public java.util.HashSet disabledComponents;
- field public int enabled;
- field public java.util.HashSet enabledComponents;
- field public boolean installed;
- field public boolean notLaunched;
- field public boolean stopped;
- }
-
public class PathPermission extends android.os.PatternMatcher {
ctor public PathPermission(java.lang.String, int, java.lang.String, java.lang.String);
ctor public PathPermission(android.os.Parcel);
@@ -16599,7 +16586,6 @@
public class UserManager {
method public java.lang.String getUserName();
- method public boolean supportsMultipleUsers();
}
public abstract class Vibrator {
@@ -22199,6 +22185,7 @@
field public static final char MONTH = 77; // 0x004d 'M'
field public static final char QUOTE = 39; // 0x0027 '\''
field public static final char SECONDS = 115; // 0x0073 's'
+ field public static final char STANDALONE_MONTH = 76; // 0x004c 'L'
field public static final char TIME_ZONE = 122; // 0x007a 'z'
field public static final char YEAR = 121; // 0x0079 'y'
}
@@ -23350,17 +23337,6 @@
method public void set(T, V);
}
- public class PropertyValueModel extends android.util.ValueModel {
- method public T get();
- method public H getHost();
- method public android.util.Property<H, T> getProperty();
- method public java.lang.Class<T> getType();
- method public static android.util.PropertyValueModel<H, T> of(H, android.util.Property<H, T>);
- method public static android.util.PropertyValueModel<H, T> of(H, java.lang.Class<T>, java.lang.String);
- method public static android.util.PropertyValueModel of(java.lang.Object, java.lang.String);
- method public void set(T);
- }
-
public class SparseArray implements java.lang.Cloneable {
ctor public SparseArray();
ctor public SparseArray(int);
@@ -23509,14 +23485,6 @@
field public int type;
}
- public abstract class ValueModel {
- ctor protected ValueModel();
- method public abstract T get();
- method public abstract java.lang.Class<T> getType();
- method public abstract void set(T);
- field public static final android.util.ValueModel EMPTY;
- }
-
public class Xml {
method public static android.util.AttributeSet asAttributeSet(org.xmlpull.v1.XmlPullParser);
method public static android.util.Xml.Encoding findEncodingByName(java.lang.String) throws java.io.UnsupportedEncodingException;
@@ -27925,12 +27893,10 @@
method public abstract void onSelectedDayChange(android.widget.CalendarView, int, int, int);
}
- public class CheckBox extends android.widget.CompoundButton implements android.widget.ValueEditor {
+ public class CheckBox extends android.widget.CompoundButton {
ctor public CheckBox(android.content.Context);
ctor public CheckBox(android.content.Context, android.util.AttributeSet);
ctor public CheckBox(android.content.Context, android.util.AttributeSet, int);
- method public android.util.ValueModel<java.lang.Boolean> getValueModel();
- method public void setValueModel(android.util.ValueModel<java.lang.Boolean>);
}
public abstract interface Checkable {
@@ -28103,16 +28069,14 @@
method public void setSize(int, int);
}
- public class EditText extends android.widget.TextView implements android.widget.ValueEditor {
+ public class EditText extends android.widget.TextView {
ctor public EditText(android.content.Context);
ctor public EditText(android.content.Context, android.util.AttributeSet);
ctor public EditText(android.content.Context, android.util.AttributeSet, int);
method public void extendSelection(int);
- method public android.util.ValueModel<java.lang.CharSequence> getValueModel();
method public void selectAll();
method public void setSelection(int, int);
method public void setSelection(int);
- method public void setValueModel(android.util.ValueModel<java.lang.CharSequence>);
}
public abstract interface ExpandableListAdapter {
@@ -29138,13 +29102,11 @@
method public abstract java.lang.Object[] getSections();
}
- public class SeekBar extends android.widget.AbsSeekBar implements android.widget.ValueEditor {
+ public class SeekBar extends android.widget.AbsSeekBar {
ctor public SeekBar(android.content.Context);
ctor public SeekBar(android.content.Context, android.util.AttributeSet);
ctor public SeekBar(android.content.Context, android.util.AttributeSet, int);
- method public android.util.ValueModel<java.lang.Integer> getValueModel();
method public void setOnSeekBarChangeListener(android.widget.SeekBar.OnSeekBarChangeListener);
- method public void setValueModel(android.util.ValueModel<java.lang.Integer>);
}
public static abstract interface SeekBar.OnSeekBarChangeListener {
@@ -29718,11 +29680,6 @@
method public android.widget.TextView getText2();
}
- public abstract interface ValueEditor {
- method public abstract android.util.ValueModel<T> getValueModel();
- method public abstract void setValueModel(android.util.ValueModel<T>);
- }
-
public class VideoView extends android.view.SurfaceView implements android.widget.MediaController.MediaPlayerControl {
ctor public VideoView(android.content.Context);
ctor public VideoView(android.content.Context, android.util.AttributeSet);
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index eae3b1f..773f73c 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -404,6 +404,14 @@
return true;
}
+ case ACTIVITY_RESUMED_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ IBinder token = data.readStrongBinder();
+ activityResumed(token);
+ reply.writeNoException();
+ return true;
+ }
+
case ACTIVITY_PAUSED_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IBinder token = data.readStrongBinder();
@@ -2152,6 +2160,17 @@
data.recycle();
reply.recycle();
}
+ public void activityResumed(IBinder token) throws RemoteException
+ {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeStrongBinder(token);
+ mRemote.transact(ACTIVITY_RESUMED_TRANSACTION, data, reply, 0);
+ reply.readException();
+ data.recycle();
+ reply.recycle();
+ }
public void activityPaused(IBinder token) throws RemoteException
{
Parcel data = Parcel.obtain();
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index cb4d4a1..9b82f2a 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1245,7 +1245,7 @@
case RESUME_ACTIVITY:
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityResume");
handleResumeActivity((IBinder)msg.obj, true,
- msg.arg1 != 0);
+ msg.arg1 != 0, true);
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
break;
case SEND_RESULT:
@@ -2175,7 +2175,8 @@
if (a != null) {
r.createdConfig = new Configuration(mConfiguration);
Bundle oldState = r.state;
- handleResumeActivity(r.token, false, r.isForward);
+ handleResumeActivity(r.token, false, r.isForward,
+ !r.activity.mFinished && !r.startsNotResumed);
if (!r.activity.mFinished && r.startsNotResumed) {
// The activity manager actually wants this one to start out
@@ -2684,7 +2685,8 @@
r.mPendingRemoveWindowManager = null;
}
- final void handleResumeActivity(IBinder token, boolean clearHide, boolean isForward) {
+ final void handleResumeActivity(IBinder token, boolean clearHide, boolean isForward,
+ boolean reallyResume) {
// If we are getting ready to gc after going to the background, well
// we are back active so skip it.
unscheduleGcIdler();
@@ -2781,6 +2783,14 @@
}
r.onlyLocalRequest = false;
+ // Tell the activity manager we have resumed.
+ if (reallyResume) {
+ try {
+ ActivityManagerNative.getDefault().activityResumed(token);
+ } catch (RemoteException ex) {
+ }
+ }
+
} else {
// If an exception was thrown when trying to resume, then
// just end this activity.
@@ -2865,7 +2875,7 @@
if (r.isPreHoneycomb()) {
QueuedWork.waitToFinish();
}
-
+
// Tell the activity manager we have paused.
try {
ActivityManagerNative.getDefault().activityPaused(token);
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 9ef375a..2fb17b6 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -87,19 +87,15 @@
String resultData, Bundle map, String requiredPermission,
boolean serialized, boolean sticky, int userId) throws RemoteException;
public void unbroadcastIntent(IApplicationThread caller, Intent intent, int userId) throws RemoteException;
- /* oneway */
public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map, boolean abortBroadcast) throws RemoteException;
public void attachApplication(IApplicationThread app) throws RemoteException;
- /* oneway */
+ public void activityResumed(IBinder token) throws RemoteException;
public void activityIdle(IBinder token, Configuration config,
boolean stopProfiling) throws RemoteException;
public void activityPaused(IBinder token) throws RemoteException;
- /* oneway */
public void activityStopped(IBinder token, Bundle state,
Bitmap thumbnail, CharSequence description) throws RemoteException;
- /* oneway */
public void activitySlept(IBinder token) throws RemoteException;
- /* oneway */
public void activityDestroyed(IBinder token) throws RemoteException;
public String getCallingPackage(IBinder token) throws RemoteException;
public ComponentName getCallingActivity(IBinder token) throws RemoteException;
@@ -496,7 +492,7 @@
int BIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+35;
int UNBIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+36;
int PUBLISH_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+37;
-
+ int ACTIVITY_RESUMED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+38;
int GOING_TO_SLEEP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+39;
int WAKING_UP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+40;
int SET_DEBUG_APP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+41;
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index a3c1838..e7cea57 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -32,8 +32,8 @@
/**
* A description of an Intent and target action to perform with it. Instances
- * of this class are created with {@link #getActivity},
- * {@link #getBroadcast}, {@link #getService}; the returned object can be
+ * of this class are created with {@link #getActivity}, {@link #getActivities},
+ * {@link #getBroadcast}, and {@link #getService}; the returned object can be
* handed to other applications so that they can perform the action you
* described on your behalf at a later time.
*
@@ -54,6 +54,34 @@
* categories, and components, and same flags), it will receive a PendingIntent
* representing the same token if that is still valid, and can thus call
* {@link #cancel} to remove it.
+ *
+ * <p>Because of this behavior, it is important to know when two Intents
+ * are considered to be the same for purposes of retrieving a PendingIntent.
+ * A common mistake people make is to create multiple PendingIntent objects
+ * with Intents that only vary in their "extra" contents, expecting to get
+ * a different PendingIntent each time. This does <em>not</em> happen. The
+ * parts of the Intent that are used for matching are the same ones defined
+ * by {@link Intent#filterEquals(Intent) Intent.filterEquals}. If you use two
+ * Intent objects that are equivalent as per
+ * {@link Intent#filterEquals(Intent) Intent.filterEquals}, then you will get
+ * the same PendingIntent for both of them.
+ *
+ * <p>There are two typical ways to deal with this.
+ *
+ * <p>If you truly need multiple distinct PendingIntent objects active at
+ * the same time (such as to use as two notifications that are both shown
+ * at the same time), then you will need to ensure there is something that
+ * is different about them to associate them with different PendingIntents.
+ * This may be any of the Intent attributes considered by
+ * {@link Intent#filterEquals(Intent) Intent.filterEquals}, or different
+ * request code integers supplied to {@link #getActivity}, {@link #getActivities},
+ * {@link #getBroadcast}, or {@link #getService}.
+ *
+ * <p>If you only need one PendingIntent active at a time for any of the
+ * Intents you will use, then you can alternatively use the flags
+ * {@link #FLAG_CANCEL_CURRENT} or {@link #FLAG_UPDATE_CURRENT} to either
+ * cancel or modify whatever current PendingIntent is associated with the
+ * Intent you are supplying.
*/
public final class PendingIntent implements Parcelable {
private final IIntentSender mTarget;
@@ -622,6 +650,20 @@
}
/**
+ * @deprecated Renamed to {@link #getCreatorPackage()}.
+ */
+ @Deprecated
+ public String getTargetPackage() {
+ try {
+ return ActivityManagerNative.getDefault()
+ .getPackageForIntentSender(mTarget);
+ } catch (RemoteException e) {
+ // Should never happen.
+ return null;
+ }
+ }
+
+ /**
* Return the package name of the application that created this
* PendingIntent, that is the identity under which you will actually be
* sending the Intent. The returned string is supplied by the system, so
@@ -630,7 +672,7 @@
* @return The package name of the PendingIntent, or null if there is
* none associated with it.
*/
- public String getTargetPackage() {
+ public String getCreatorPackage() {
try {
return ActivityManagerNative.getDefault()
.getPackageForIntentSender(mTarget);
@@ -649,7 +691,7 @@
* @return The uid of the PendingIntent, or -1 if there is
* none associated with it.
*/
- public int getTargetUid() {
+ public int getCreatorUid() {
try {
return ActivityManagerNative.getDefault()
.getUidForIntentSender(mTarget);
@@ -670,7 +712,7 @@
* @return The user handle of the PendingIntent, or null if there is
* none associated with it.
*/
- public UserHandle getTargetUserHandle() {
+ public UserHandle getCreatorUserHandle() {
try {
int uid = ActivityManagerNative.getDefault()
.getUidForIntentSender(mTarget);
diff --git a/core/java/android/app/TaskStackBuilder.java b/core/java/android/app/TaskStackBuilder.java
index 9c83362..cadf5e4 100644
--- a/core/java/android/app/TaskStackBuilder.java
+++ b/core/java/android/app/TaskStackBuilder.java
@@ -162,7 +162,7 @@
ActivityInfo info = pm.getActivityInfo(sourceActivityName, 0);
String parentActivity = info.parentActivityName;
while (parentActivity != null) {
- final ComponentName target = new ComponentName(mSourceContext, parentActivity);
+ final ComponentName target = new ComponentName(info.packageName, parentActivity);
info = pm.getActivityInfo(target, 0);
parentActivity = info.parentActivityName;
final Intent parent = parentActivity == null && insertAt == 0
@@ -216,11 +216,7 @@
"No intents added to TaskStackBuilder; cannot startActivities");
}
- Intent[] intents = mIntents.toArray(new Intent[mIntents.size()]);
- intents[0].addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
- Intent.FLAG_ACTIVITY_CLEAR_TASK |
- Intent.FLAG_ACTIVITY_TASK_ON_HOME);
- mSourceContext.startActivities(intents, options);
+ mSourceContext.startActivities(getIntents(), options);
}
/**
@@ -260,11 +256,8 @@
"No intents added to TaskStackBuilder; cannot getPendingIntent");
}
- Intent[] intents = mIntents.toArray(new Intent[mIntents.size()]);
- intents[0].addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
- Intent.FLAG_ACTIVITY_CLEAR_TASK |
- Intent.FLAG_ACTIVITY_TASK_ON_HOME);
- return PendingIntent.getActivities(mSourceContext, requestCode, intents, flags, options);
+ return PendingIntent.getActivities(mSourceContext, requestCode, getIntents(),
+ flags, options);
}
/**
@@ -275,6 +268,15 @@
* @return An array containing the intents added to this builder.
*/
public Intent[] getIntents() {
- return mIntents.toArray(new Intent[mIntents.size()]);
+ Intent[] intents = new Intent[mIntents.size()];
+ if (intents.length == 0) return intents;
+
+ intents[0] = new Intent(mIntents.get(0)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
+ Intent.FLAG_ACTIVITY_CLEAR_TASK |
+ Intent.FLAG_ACTIVITY_TASK_ON_HOME);
+ for (int i = 1; i < intents.length; i++) {
+ intents[i] = new Intent(mIntents.get(i));
+ }
+ return intents;
}
}
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java
index 51a81c5..84a447f 100644
--- a/core/java/android/appwidget/AppWidgetHost.java
+++ b/core/java/android/appwidget/AppWidgetHost.java
@@ -117,7 +117,7 @@
private OnClickHandler mOnClickHandler;
public AppWidgetHost(Context context, int hostId) {
- this(context, hostId, null, Looper.getMainLooper());
+ this(context, hostId, null, context.getMainLooper());
}
/**
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index ece8841..cd1e882 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -1219,9 +1219,16 @@
public final void registerContentObserver(Uri uri, boolean notifyForDescendents,
ContentObserver observer)
{
+ registerContentObserver(uri, notifyForDescendents, observer, UserHandle.myUserId());
+ }
+
+ /** @hide - designated user version */
+ public final void registerContentObserver(Uri uri, boolean notifyForDescendents,
+ ContentObserver observer, int userHandle)
+ {
try {
getContentService().registerContentObserver(uri, notifyForDescendents,
- observer.getContentObserver());
+ observer.getContentObserver(), userHandle);
} catch (RemoteException e) {
}
}
@@ -1276,10 +1283,21 @@
* @see #requestSync(android.accounts.Account, String, android.os.Bundle)
*/
public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) {
+ notifyChange(uri, observer, syncToNetwork, UserHandle.myUserId());
+ }
+
+ /**
+ * Notify registered observers within the designated user(s) that a row was updated.
+ *
+ * @hide
+ */
+ public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork,
+ int userHandle) {
try {
getContentService().notifyChange(
uri, observer == null ? null : observer.getContentObserver(),
- observer != null && observer.deliverSelfNotifications(), syncToNetwork);
+ observer != null && observer.deliverSelfNotifications(), syncToNetwork,
+ userHandle);
} catch (RemoteException e) {
}
}
diff --git a/core/java/android/content/ContentService.java b/core/java/android/content/ContentService.java
index 472fe94..0f6488a 100644
--- a/core/java/android/content/ContentService.java
+++ b/core/java/android/content/ContentService.java
@@ -17,6 +17,7 @@
package android.content;
import android.accounts.Account;
+import android.app.ActivityManager;
import android.database.IContentObserver;
import android.database.sqlite.SQLiteException;
import android.net.Uri;
@@ -33,6 +34,7 @@
import java.io.FileDescriptor;
import java.io.PrintWriter;
+import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -138,17 +140,47 @@
getSyncManager();
}
- public void registerContentObserver(Uri uri, boolean notifyForDescendents,
- IContentObserver observer) {
+ /**
+ * Register a content observer tied to a specific user's view of the provider.
+ * @param userHandle the user whose view of the provider is to be observed. May be
+ * the calling user without requiring any permission, otherwise the caller needs to
+ * hold the INTERACT_ACROSS_USERS_FULL permission. Pseudousers USER_ALL and
+ * USER_CURRENT are properly handled; all other pseudousers are forbidden.
+ */
+ @Override
+ public void registerContentObserver(Uri uri, boolean notifyForDescendants,
+ IContentObserver observer, int userHandle) {
if (observer == null || uri == null) {
throw new IllegalArgumentException("You must pass a valid uri and observer");
}
- synchronized (mRootNode) {
- mRootNode.addObserverLocked(uri, observer, notifyForDescendents, mRootNode,
- Binder.getCallingUid(), Binder.getCallingPid());
- if (false) Log.v(TAG, "Registered observer " + observer + " at " + uri +
- " with notifyForDescendents " + notifyForDescendents);
+
+ final int callingUser = UserHandle.getCallingUserId();
+ if (callingUser != userHandle) {
+ mContext.enforceCallingOrSelfPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL,
+ "no permission to observe other users' provider view");
}
+
+ if (userHandle < 0) {
+ if (userHandle == UserHandle.USER_CURRENT) {
+ userHandle = ActivityManager.getCurrentUser();
+ } else if (userHandle != UserHandle.USER_ALL) {
+ throw new InvalidParameterException("Bad user handle for registerContentObserver: "
+ + userHandle);
+ }
+ }
+
+ synchronized (mRootNode) {
+ mRootNode.addObserverLocked(uri, observer, notifyForDescendants, mRootNode,
+ Binder.getCallingUid(), Binder.getCallingPid(), userHandle);
+ if (false) Log.v(TAG, "Registered observer " + observer + " at " + uri +
+ " with notifyForDescendants " + notifyForDescendants);
+ }
+ }
+
+ public void registerContentObserver(Uri uri, boolean notifyForDescendants,
+ IContentObserver observer) {
+ registerContentObserver(uri, notifyForDescendants, observer,
+ UserHandle.getCallingUserId());
}
public void unregisterContentObserver(IContentObserver observer) {
@@ -161,14 +193,39 @@
}
}
+ /**
+ * Notify observers of a particular user's view of the provider.
+ * @param userHandle the user whose view of the provider is to be notified. May be
+ * the calling user without requiring any permission, otherwise the caller needs to
+ * hold the INTERACT_ACROSS_USERS_FULL permission. Pseudousers USER_ALL and
+ * USER_CURRENT are properly interpreted; no other pseudousers are allowed.
+ */
+ @Override
public void notifyChange(Uri uri, IContentObserver observer,
- boolean observerWantsSelfNotifications, boolean syncToNetwork) {
+ boolean observerWantsSelfNotifications, boolean syncToNetwork,
+ int userHandle) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
- Log.v(TAG, "Notifying update of " + uri + " from observer " + observer
- + ", syncToNetwork " + syncToNetwork);
+ Log.v(TAG, "Notifying update of " + uri + " for user " + userHandle
+ + " from observer " + observer + ", syncToNetwork " + syncToNetwork);
}
- int userId = UserHandle.getCallingUserId();
+ // Notify for any user other than the caller's own requires permission.
+ final int callingUserHandle = UserHandle.getCallingUserId();
+ if (userHandle != callingUserHandle) {
+ mContext.enforceCallingOrSelfPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL,
+ "no permission to notify other users");
+ }
+
+ // We passed the permission check; resolve pseudouser targets as appropriate
+ if (userHandle < 0) {
+ if (userHandle == UserHandle.USER_CURRENT) {
+ userHandle = ActivityManager.getCurrentUser();
+ } else if (userHandle != UserHandle.USER_ALL) {
+ throw new InvalidParameterException("Bad user handle for notifyChange: "
+ + userHandle);
+ }
+ }
+
// This makes it so that future permission checks will be in the context of this
// process rather than the caller's process. We will restore this before returning.
long identityToken = clearCallingIdentity();
@@ -176,7 +233,7 @@
ArrayList<ObserverCall> calls = new ArrayList<ObserverCall>();
synchronized (mRootNode) {
mRootNode.collectObserversLocked(uri, 0, observer, observerWantsSelfNotifications,
- calls);
+ userHandle, calls);
}
final int numCalls = calls.size();
for (int i=0; i<numCalls; i++) {
@@ -207,7 +264,7 @@
if (syncToNetwork) {
SyncManager syncManager = getSyncManager();
if (syncManager != null) {
- syncManager.scheduleLocalSync(null /* all accounts */, userId,
+ syncManager.scheduleLocalSync(null /* all accounts */, callingUserHandle,
uri.getAuthority());
}
}
@@ -216,6 +273,12 @@
}
}
+ public void notifyChange(Uri uri, IContentObserver observer,
+ boolean observerWantsSelfNotifications, boolean syncToNetwork) {
+ notifyChange(uri, observer, observerWantsSelfNotifications, syncToNetwork,
+ UserHandle.getCallingUserId());
+ }
+
/**
* Hide this class since it is not part of api,
* but current unittest framework requires it to be public
@@ -543,16 +606,18 @@
public final IContentObserver observer;
public final int uid;
public final int pid;
- public final boolean notifyForDescendents;
+ public final boolean notifyForDescendants;
+ private final int userHandle;
private final Object observersLock;
public ObserverEntry(IContentObserver o, boolean n, Object observersLock,
- int _uid, int _pid) {
+ int _uid, int _pid, int _userHandle) {
this.observersLock = observersLock;
observer = o;
uid = _uid;
pid = _pid;
- notifyForDescendents = n;
+ userHandle = _userHandle;
+ notifyForDescendants = n;
try {
observer.asBinder().linkToDeath(this, 0);
} catch (RemoteException e) {
@@ -571,7 +636,8 @@
pidCounts.put(pid, pidCounts.get(pid)+1);
pw.print(prefix); pw.print(name); pw.print(": pid=");
pw.print(pid); pw.print(" uid=");
- pw.print(uid); pw.print(" target=");
+ pw.print(uid); pw.print(" user=");
+ pw.print(userHandle); pw.print(" target=");
pw.println(Integer.toHexString(System.identityHashCode(
observer != null ? observer.asBinder() : null)));
}
@@ -639,17 +705,21 @@
return uri.getPathSegments().size() + 1;
}
+ // Invariant: userHandle is either a hard user number or is USER_ALL
public void addObserverLocked(Uri uri, IContentObserver observer,
- boolean notifyForDescendents, Object observersLock, int uid, int pid) {
- addObserverLocked(uri, 0, observer, notifyForDescendents, observersLock, uid, pid);
+ boolean notifyForDescendants, Object observersLock,
+ int uid, int pid, int userHandle) {
+ addObserverLocked(uri, 0, observer, notifyForDescendants, observersLock,
+ uid, pid, userHandle);
}
private void addObserverLocked(Uri uri, int index, IContentObserver observer,
- boolean notifyForDescendents, Object observersLock, int uid, int pid) {
+ boolean notifyForDescendants, Object observersLock,
+ int uid, int pid, int userHandle) {
// If this is the leaf node add the observer
if (index == countUriSegments(uri)) {
- mObservers.add(new ObserverEntry(observer, notifyForDescendents, observersLock,
- uid, pid));
+ mObservers.add(new ObserverEntry(observer, notifyForDescendants, observersLock,
+ uid, pid, userHandle));
return;
}
@@ -662,8 +732,8 @@
for (int i = 0; i < N; i++) {
ObserverNode node = mChildren.get(i);
if (node.mName.equals(segment)) {
- node.addObserverLocked(uri, index + 1, observer, notifyForDescendents,
- observersLock, uid, pid);
+ node.addObserverLocked(uri, index + 1, observer, notifyForDescendants,
+ observersLock, uid, pid, userHandle);
return;
}
}
@@ -671,8 +741,8 @@
// No child found, create one
ObserverNode node = new ObserverNode(segment);
mChildren.add(node);
- node.addObserverLocked(uri, index + 1, observer, notifyForDescendents,
- observersLock, uid, pid);
+ node.addObserverLocked(uri, index + 1, observer, notifyForDescendants,
+ observersLock, uid, pid, userHandle);
}
public boolean removeObserverLocked(IContentObserver observer) {
@@ -705,37 +775,49 @@
}
private void collectMyObserversLocked(boolean leaf, IContentObserver observer,
- boolean observerWantsSelfNotifications, ArrayList<ObserverCall> calls) {
+ boolean observerWantsSelfNotifications, int targetUserHandle,
+ ArrayList<ObserverCall> calls) {
int N = mObservers.size();
IBinder observerBinder = observer == null ? null : observer.asBinder();
for (int i = 0; i < N; i++) {
ObserverEntry entry = mObservers.get(i);
- // Don't notify the observer if it sent the notification and isn't interesed
+ // Don't notify the observer if it sent the notification and isn't interested
// in self notifications
boolean selfChange = (entry.observer.asBinder() == observerBinder);
if (selfChange && !observerWantsSelfNotifications) {
continue;
}
- // Make sure the observer is interested in the notification
- if (leaf || (!leaf && entry.notifyForDescendents)) {
- calls.add(new ObserverCall(this, entry.observer, selfChange));
+ // Does this observer match the target user?
+ if (targetUserHandle == UserHandle.USER_ALL
+ || entry.userHandle == UserHandle.USER_ALL
+ || targetUserHandle == entry.userHandle) {
+ // Make sure the observer is interested in the notification
+ if (leaf || (!leaf && entry.notifyForDescendants)) {
+ calls.add(new ObserverCall(this, entry.observer, selfChange));
+ }
}
}
}
+ /**
+ * targetUserHandle is either a hard user handle or is USER_ALL
+ */
public void collectObserversLocked(Uri uri, int index, IContentObserver observer,
- boolean observerWantsSelfNotifications, ArrayList<ObserverCall> calls) {
+ boolean observerWantsSelfNotifications, int targetUserHandle,
+ ArrayList<ObserverCall> calls) {
String segment = null;
int segmentCount = countUriSegments(uri);
if (index >= segmentCount) {
// This is the leaf node, notify all observers
- collectMyObserversLocked(true, observer, observerWantsSelfNotifications, calls);
+ collectMyObserversLocked(true, observer, observerWantsSelfNotifications,
+ targetUserHandle, calls);
} else if (index < segmentCount){
segment = getUriSegment(uri, index);
- // Notify any observers at this level who are interested in descendents
- collectMyObserversLocked(false, observer, observerWantsSelfNotifications, calls);
+ // Notify any observers at this level who are interested in descendants
+ collectMyObserversLocked(false, observer, observerWantsSelfNotifications,
+ targetUserHandle, calls);
}
int N = mChildren.size();
@@ -744,7 +826,7 @@
if (segment == null || node.mName.equals(segment)) {
// We found the child,
node.collectObserversLocked(uri, index + 1,
- observer, observerWantsSelfNotifications, calls);
+ observer, observerWantsSelfNotifications, targetUserHandle, calls);
if (segment != null) {
break;
}
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 7438ba8..161670f 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -856,8 +856,10 @@
public abstract void startActivity(Intent intent);
/**
- * Same as {@link #startActivity(Intent)}, but for a specific user. It requires holding
- * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission.
+ * Version of {@link #startActivity(Intent)} that allows you to specify the
+ * user the activity will be started for. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS_FULL permission.
* @param intent The description of the activity to start.
* @param user The UserHandle of the user to start this activity for.
* @throws ActivityNotFoundException
@@ -895,8 +897,10 @@
public abstract void startActivity(Intent intent, Bundle options);
/**
- * Same as {@link #startActivity(Intent, Bundle)}, but for a specific user. It requires holding
- * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission.
+ * Version of {@link #startActivity(Intent, Bundle)} that allows you to specify the
+ * user the activity will be started for. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS_FULL permission.
* @param intent The description of the activity to start.
* @param options Additional options for how the Activity should be started.
* May be null if there are no options. See {@link android.app.ActivityOptions}
@@ -1118,10 +1122,10 @@
Bundle initialExtras);
/**
- * Same as {@link #sendBroadcast(Intent)}, but for a specific user. This broadcast
- * can only be sent to receivers that are part of the calling application. It
- * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
- * permission.
+ * Version of {@link #sendBroadcast(Intent)} that allows you to specify the
+ * user the broadcast will be sent to. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS permission.
* @param intent The intent to broadcast
* @param user UserHandle to send the intent to.
* @see #sendBroadcast(Intent)
@@ -1129,10 +1133,10 @@
public abstract void sendBroadcastAsUser(Intent intent, UserHandle user);
/**
- * Same as {@link #sendBroadcast(Intent, String)}, but for a specific user. This broadcast
- * can only be sent to receivers that are part of the calling application. It
- * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
- * permission.
+ * Version of {@link #sendBroadcast(Intent, String)} that allows you to specify the
+ * user the broadcast will be sent to. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS permission.
*
* @param intent The Intent to broadcast; all receivers matching this
* Intent will receive the broadcast.
@@ -1147,12 +1151,12 @@
String receiverPermission);
/**
- * Same as
- * {@link #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)},
- * but for a specific user. This broadcast
- * can only be sent to receivers that are part of the calling application. It
- * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
- * permission.
+ * Version of
+ * {@link #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)}
+ * that allows you to specify the
+ * user the broadcast will be sent to. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS permission.
*
* <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
*
@@ -1261,11 +1265,10 @@
public abstract void removeStickyBroadcast(Intent intent);
/**
- * Same as {@link #sendStickyBroadcast(Intent)},
- * but for a specific user. This broadcast
- * can only be sent to receivers that are part of the calling application. It
- * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
- * permission.
+ * Version of {@link #sendStickyBroadcast(Intent)} that allows you to specify the
+ * user the broadcast will be sent to. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS permission.
*
* @param intent The Intent to broadcast; all receivers matching this
* Intent will receive the broadcast, and the Intent will be held to
@@ -1277,12 +1280,12 @@
public abstract void sendStickyBroadcastAsUser(Intent intent, UserHandle user);
/**
- * Same as
- * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)
- * but for a specific user. This broadcast
- * can only be sent to receivers that are part of the calling application. It
- * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
- * permission.
+ * Version of
+ * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)}
+ * that allows you to specify the
+ * user the broadcast will be sent to. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS permission.
*
* <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
*
@@ -1309,12 +1312,10 @@
Bundle initialExtras);
/**
- * Same as
- * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)
- * but for a specific user. This broadcast
- * can only be sent to receivers that are part of the calling application. It
- * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
- * permission.
+ * Version of {@link #removeStickyBroadcast(Intent)} that allows you to specify the
+ * user the broadcast will be sent to. This is not available to applications
+ * that are not pre-installed on the system image. Using it requires holding
+ * the INTERACT_ACROSS_USERS permission.
*
* <p>You must hold the {@link android.Manifest.permission#BROADCAST_STICKY}
* permission in order to use this API. If you do not hold that
diff --git a/core/java/android/content/IContentService.aidl b/core/java/android/content/IContentService.aidl
index 86a9392..f956bcf 100644
--- a/core/java/android/content/IContentService.aidl
+++ b/core/java/android/content/IContentService.aidl
@@ -30,12 +30,28 @@
* @hide
*/
interface IContentService {
- void registerContentObserver(in Uri uri, boolean notifyForDescendentsn,
- IContentObserver observer);
void unregisterContentObserver(IContentObserver observer);
+ /**
+ * Register a content observer tied to a specific user's view of the provider.
+ * @param userHandle the user whose view of the provider is to be observed. May be
+ * the calling user without requiring any permission, otherwise the caller needs to
+ * hold the INTERACT_ACROSS_USERS_FULL permission. Pseudousers USER_ALL and
+ * USER_CURRENT are properly handled.
+ */
+ void registerContentObserver(in Uri uri, boolean notifyForDescendants,
+ IContentObserver observer, int userHandle);
+
+ /**
+ * Notify observers of a particular user's view of the provider.
+ * @param userHandle the user whose view of the provider is to be notified. May be
+ * the calling user without requiring any permission, otherwise the caller needs to
+ * hold the INTERACT_ACROSS_USERS_FULL permission. Pseudousers USER_ALL
+ * USER_CURRENT are properly interpreted.
+ */
void notifyChange(in Uri uri, IContentObserver observer,
- boolean observerWantsSelfNotifications, boolean syncToNetwork);
+ boolean observerWantsSelfNotifications, boolean syncToNetwork,
+ int userHandle);
void requestSync(in Account account, String authority, in Bundle extras);
void cancelSync(in Account account, String authority);
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index d3b8648..e8507bc 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2376,6 +2376,16 @@
public static final String ACTION_USER_SWITCHED =
"android.intent.action.USER_SWITCHED";
+ /**
+ * Broadcast sent to the system when a user's information changes. Carries an extra
+ * {@link #EXTRA_USER_HANDLE} to indicate which user's information changed.
+ * This is only sent to registered receivers, not manifest receivers. It is sent to the user
+ * whose information has changed.
+ * @hide
+ */
+ public static final String ACTION_USER_INFO_CHANGED =
+ "android.intent.action.USER_INFO_CHANGED";
+
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Standard intent categories (see addCategory()).
diff --git a/core/java/android/content/IntentSender.java b/core/java/android/content/IntentSender.java
index 6c3cf99..166495b 100644
--- a/core/java/android/content/IntentSender.java
+++ b/core/java/android/content/IntentSender.java
@@ -205,6 +205,20 @@
}
/**
+ * @deprecated Renamed to {@link #getCreatorPackage()}.
+ */
+ @Deprecated
+ public String getTargetPackage() {
+ try {
+ return ActivityManagerNative.getDefault()
+ .getPackageForIntentSender(mTarget);
+ } catch (RemoteException e) {
+ // Should never happen.
+ return null;
+ }
+ }
+
+ /**
* Return the package name of the application that created this
* IntentSender, that is the identity under which you will actually be
* sending the Intent. The returned string is supplied by the system, so
@@ -213,7 +227,7 @@
* @return The package name of the PendingIntent, or null if there is
* none associated with it.
*/
- public String getTargetPackage() {
+ public String getCreatorPackage() {
try {
return ActivityManagerNative.getDefault()
.getPackageForIntentSender(mTarget);
@@ -232,7 +246,7 @@
* @return The uid of the PendingIntent, or -1 if there is
* none associated with it.
*/
- public int getTargetUid() {
+ public int getCreatorUid() {
try {
return ActivityManagerNative.getDefault()
.getUidForIntentSender(mTarget);
@@ -253,7 +267,7 @@
* @return The user handle of the PendingIntent, or null if there is
* none associated with it.
*/
- public UserHandle getTargetUserHandle() {
+ public UserHandle getCreatorUserHandle() {
try {
int uid = ActivityManagerNative.getDefault()
.getUidForIntentSender(mTarget);
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 4784d7f..fd488ae 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -2434,8 +2434,7 @@
* @param verificationCode either {@link PackageManager#VERIFICATION_ALLOW}
* or {@link PackageManager#VERIFICATION_REJECT}.
* @throws SecurityException if the caller does not have the
- * {@link android.Manifest.permission#PACKAGE_VERIFICATION_AGENT}
- * permission.
+ * PACKAGE_VERIFICATION_AGENT permission.
*/
public abstract void verifyPendingInstall(int id, int verificationCode);
@@ -2469,8 +2468,7 @@
* bounds value; namely, 0 or
* {@link PackageManager#MAXIMUM_VERIFICATION_TIMEOUT}.
* @throws SecurityException if the caller does not have the
- * {@link android.Manifest.permission#PACKAGE_VERIFICATION_AGENT}
- * permission.
+ * PACKAGE_VERIFICATION_AGENT permission.
*/
public abstract void extendVerificationTimeout(int id,
int verificationCodeAtTimeout, long millisecondsToDelay);
diff --git a/core/java/android/content/pm/PackageUserState.java b/core/java/android/content/pm/PackageUserState.java
index 1a71bfb..3579977 100644
--- a/core/java/android/content/pm/PackageUserState.java
+++ b/core/java/android/content/pm/PackageUserState.java
@@ -22,6 +22,7 @@
/**
* Per-user state information about a package.
+ * @hide
*/
public class PackageUserState {
public boolean stopped;
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index 653c5f3..0798913 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -19,6 +19,7 @@
import android.os.ParcelFileDescriptor;
import android.content.pm.UserInfo;
+import android.graphics.Bitmap;
/**
* {@hide}
@@ -27,8 +28,8 @@
UserInfo createUser(in String name, int flags);
boolean removeUser(int userHandle);
void setUserName(int userHandle, String name);
- ParcelFileDescriptor setUserIcon(int userHandle);
- ParcelFileDescriptor getUserIcon(int userHandle);
+ void setUserIcon(int userHandle, in Bitmap icon);
+ Bitmap getUserIcon(int userHandle);
List<UserInfo> getUsers();
UserInfo getUserInfo(int userHandle);
void setGuestEnabled(boolean enable);
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index cac1e07..392aff7 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -18,6 +18,7 @@
import com.android.internal.R;
import android.content.Context;
import android.content.pm.UserInfo;
+import android.graphics.Bitmap;
import android.util.Log;
import java.util.List;
@@ -40,6 +41,7 @@
/**
* Returns whether the system supports multiple users.
* @return true if multiple users can be created, false if it is a single user device.
+ * @hide
*/
public boolean supportsMultipleUsers() {
return getMaxSupportedUsers() > 1;
@@ -55,8 +57,9 @@
}
/**
- * Returns the user name of the user making this call.
- * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
+ * Returns the user name of the user making this call. This call is only
+ * available to applications on the system image; it requires the
+ * MANAGE_USERS permission.
* @return the user name
*/
public String getUserName() {
@@ -151,32 +154,30 @@
}
/**
- * Returns a file descriptor for the user's photo. PNG data can be written into this file.
+ * Sets the user's photo.
* @param userHandle the user for whom to change the photo.
- * @return a {@link ParcelFileDescriptor} to which to write the photo.
+ * @param icon the bitmap to set as the photo.
* @hide
*/
- public ParcelFileDescriptor setUserIcon(int userHandle) {
+ public void setUserIcon(int userHandle, Bitmap icon) {
try {
- return mService.setUserIcon(userHandle);
+ mService.setUserIcon(userHandle, icon);
} catch (RemoteException re) {
Log.w(TAG, "Could not set the user icon ", re);
- return null;
}
}
/**
* Returns a file descriptor for the user's photo. PNG data can be read from this file.
* @param userHandle the user whose photo we want to read.
- * @return a {@link ParcelFileDescriptor} from which to read the file, or null if there's no
- * photo.
+ * @return a {@link Bitmap} of the user's photo, or null if there's no photo.
* @hide
*/
- public ParcelFileDescriptor getUserIcon(int userHandle) {
+ public Bitmap getUserIcon(int userHandle) {
try {
return mService.getUserIcon(userHandle);
} catch (RemoteException re) {
- Log.w(TAG, "Could not set the user icon ", re);
+ Log.w(TAG, "Could not get the user icon ", re);
return null;
}
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index a182234..68ce72f 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -5614,6 +5614,13 @@
"wifi_supplicant_scan_interval_ms";
/**
+ * The interval in milliseconds to scan at supplicant when p2p is connected
+ * @hide
+ */
+ public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS =
+ "wifi_scan_interval_p2p_connected_ms";
+
+ /**
* Whether the Wi-Fi watchdog is enabled.
*/
public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java
index 524f941..c36273e 100644
--- a/core/java/android/text/format/DateFormat.java
+++ b/core/java/android/text/format/DateFormat.java
@@ -35,10 +35,18 @@
Utility class for producing strings with formatted date/time.
<p>
- This class takes as inputs a format string and a representation of a date/time.
- The format string controls how the output is generated.
+ Most callers should avoid supplying their own format strings to this
+ class' {@code format} methods and rely on the correctly localized ones
+ supplied by the system. This class' factory methods return
+ appropriately-localized {@link java.text.DateFormat} instances, suitable
+ for both formatting and parsing dates. For the canonical documentation
+ of format strings, see {@link java.text.SimpleDateFormat}.
</p>
<p>
+ The format methods in this class takes as inputs a format string and a representation of a date/time.
+ The format string controls how the output is generated.
+ This class only supports a subset of the full Unicode specification.
+ Use {@link java.text.SimpleDateFormat} if you need more.
Formatting characters may be repeated in order to get more detailed representations
of that field. For instance, the format character 'M' is used to
represent the month. Depending on how many times that character is repeated
@@ -152,7 +160,8 @@
public static final char MINUTE = 'm';
/**
- This designator indicates the month of the year
+ This designator indicates the month of the year. See also
+ {@link #STANDALONE_MONTH}.
Examples for September:
M -> 9
@@ -163,6 +172,14 @@
public static final char MONTH = 'M';
/**
+ This designator indicates the standalone month of the year,
+ necessary in some format strings in some languages. For
+ example, Russian distinguishes between the "June" in
+ "June" and that in "June 2010".
+ */
+ public static final char STANDALONE_MONTH = 'L';
+
+ /**
This designator indicates the seconds of the minute.
Examples for 7 seconds past the minute:
@@ -374,7 +391,7 @@
index++;
}
- if (!foundMonth && (c == MONTH)) {
+ if (!foundMonth && (c == MONTH || c == STANDALONE_MONTH)) {
foundMonth = true;
order[index] = MONTH;
index++;
@@ -494,9 +511,10 @@
break;
case MONTH:
- replacement = getMonthString(inDate, count);
+ case STANDALONE_MONTH:
+ replacement = getMonthString(inDate, count, c);
break;
-
+
case SECONDS:
replacement = zeroPad(inDate.get(Calendar.SECOND), count);
break;
@@ -527,14 +545,19 @@
return s.toString();
}
- private static final String getMonthString(Calendar inDate, int count) {
+ private static final String getMonthString(Calendar inDate, int count, int kind) {
+ boolean standalone = (kind == STANDALONE_MONTH);
int month = inDate.get(Calendar.MONTH);
- if (count >= 4)
- return DateUtils.getMonthString(month, DateUtils.LENGTH_LONG);
- else if (count == 3)
- return DateUtils.getMonthString(month, DateUtils.LENGTH_MEDIUM);
- else {
+ if (count >= 4) {
+ return standalone
+ ? DateUtils.getStandaloneMonthString(month, DateUtils.LENGTH_LONG)
+ : DateUtils.getMonthString(month, DateUtils.LENGTH_LONG);
+ } else if (count == 3) {
+ return standalone
+ ? DateUtils.getStandaloneMonthString(month, DateUtils.LENGTH_MEDIUM)
+ : DateUtils.getMonthString(month, DateUtils.LENGTH_MEDIUM);
+ } else {
// Calendar.JANUARY == 0, so add 1 to month.
return zeroPad(month+1, count);
}
@@ -574,7 +597,8 @@
private static final String getYearString(Calendar inDate, int count) {
int year = inDate.get(Calendar.YEAR);
- return (count <= 2) ? zeroPad(year % 100, 2) : String.valueOf(year);
+ return (count <= 2) ? zeroPad(year % 100, 2)
+ : String.format(Locale.getDefault(), "%d", year);
}
private static final int appendQuotedText(SpannableStringBuilder s, int i, int len) {
@@ -615,17 +639,6 @@
}
private static final String zeroPad(int inValue, int inMinDigits) {
- String val = String.valueOf(inValue);
-
- if (val.length() < inMinDigits) {
- char[] buf = new char[inMinDigits];
-
- for (int i = 0; i < inMinDigits; i++)
- buf[i] = '0';
-
- val.getChars(0, val.length(), buf, inMinDigits - val.length());
- val = new String(buf);
- }
- return val;
+ return String.format(Locale.getDefault(), "%0" + inMinDigits + "d", inValue);
}
}
diff --git a/core/java/android/util/PropertyValueModel.java b/core/java/android/util/PropertyValueModel.java
deleted file mode 100755
index eb9c47d..0000000
--- a/core/java/android/util/PropertyValueModel.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.util;
-
-/**
- * A value model for a {@link Property property} of a host object. This class can be used for
- * both reflective and non-reflective property implementations.
- *
- * @param <H> the host type, where the host is the object that holds this property
- * @param <T> the value type
- *
- * @see Property
- * @see ValueModel
- */
-public class PropertyValueModel<H, T> extends ValueModel<T> {
- private final H mHost;
- private final Property<H, T> mProperty;
-
- private PropertyValueModel(H host, Property<H, T> property) {
- mProperty = property;
- mHost = host;
- }
-
- /**
- * Returns the host.
- *
- * @return the host
- */
- public H getHost() {
- return mHost;
- }
-
- /**
- * Returns the property.
- *
- * @return the property
- */
- public Property<H, T> getProperty() {
- return mProperty;
- }
-
- @Override
- public Class<T> getType() {
- return mProperty.getType();
- }
-
- @Override
- public T get() {
- return mProperty.get(mHost);
- }
-
- @Override
- public void set(T value) {
- mProperty.set(mHost, value);
- }
-
- /**
- * Return an appropriate PropertyValueModel for this host and property.
- *
- * @param host the host
- * @param property the property
- * @return the value model
- */
- public static <H, T> PropertyValueModel<H, T> of(H host, Property<H, T> property) {
- return new PropertyValueModel<H, T>(host, property);
- }
-
- /**
- * Return a PropertyValueModel for this {@code host} and a
- * reflective property, constructed from this {@code propertyType} and {@code propertyName}.
- *
- * @param host
- * @param propertyType the property type
- * @param propertyName the property name
- * @return a value model with this host and a reflective property with this type and name
- *
- * @see Property#of
- */
- public static <H, T> PropertyValueModel<H, T> of(H host, Class<T> propertyType,
- String propertyName) {
- return of(host, Property.of((Class<H>) host.getClass(), propertyType, propertyName));
- }
-
- private static Class getNullaryMethodReturnType(Class c, String name) {
- try {
- return c.getMethod(name).getReturnType();
- } catch (NoSuchMethodException e) {
- return null;
- }
- }
-
- private static Class getFieldType(Class c, String name) {
- try {
- return c.getField(name).getType();
- } catch (NoSuchFieldException e) {
- return null;
- }
- }
-
- private static String capitalize(String name) {
- if (name.isEmpty()) {
- return name;
- }
- return Character.toUpperCase(name.charAt(0)) + name.substring(1);
- }
-
- /**
- * Return a PropertyValueModel for this {@code host} and and {@code propertyName}.
- *
- * @param host the host
- * @param propertyName the property name
- * @return a value model with this host and a reflective property with this name
- */
- public static PropertyValueModel of(Object host, String propertyName) {
- Class clazz = host.getClass();
- String suffix = capitalize(propertyName);
- Class propertyType = getNullaryMethodReturnType(clazz, "get" + suffix);
- if (propertyType == null) {
- propertyType = getNullaryMethodReturnType(clazz, "is" + suffix);
- }
- if (propertyType == null) {
- propertyType = getFieldType(clazz, propertyName);
- }
- if (propertyType == null) {
- throw new NoSuchPropertyException(propertyName);
- }
- return of(host, propertyType, propertyName);
- }
-}
diff --git a/core/java/android/util/ValueModel.java b/core/java/android/util/ValueModel.java
deleted file mode 100755
index 4789682..0000000
--- a/core/java/android/util/ValueModel.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.util;
-
-/**
- * A ValueModel is an abstraction for a 'slot' or place in memory in which a value
- * may be stored and retrieved. A common implementation of ValueModel is a regular property of
- * an object, whose value may be retrieved by calling the appropriate <em>getter</em>
- * method and set by calling the corresponding <em>setter</em> method.
- *
- * @param <T> the value type
- *
- * @see PropertyValueModel
- */
-public abstract class ValueModel<T> {
- /**
- * The empty model should be used in place of {@code null} to indicate that a
- * model has not been set. The empty model has no value and does nothing when it is set.
- */
- public static final ValueModel EMPTY = new ValueModel() {
- @Override
- public Class getType() {
- return Object.class;
- }
-
- @Override
- public Object get() {
- return null;
- }
-
- @Override
- public void set(Object value) {
-
- }
- };
-
- protected ValueModel() {
- }
-
- /**
- * Returns the type of this property.
- *
- * @return the property type
- */
- public abstract Class<T> getType();
-
- /**
- * Returns the value of this property.
- *
- * @return the property value
- */
- public abstract T get();
-
- /**
- * Sets the value of this property.
- *
- * @param value the new value for this property
- */
- public abstract void set(T value);
-}
\ No newline at end of file
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index 869cd00..032ff7bc 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -150,7 +150,7 @@
static native int nCreateTextureLayer(boolean opaque, int[] layerInfo);
static native int nCreateLayer(int width, int height, boolean isOpaque, int[] layerInfo);
- static native void nResizeLayer(int layerId, int width, int height, int[] layerInfo);
+ static native boolean nResizeLayer(int layerId, int width, int height, int[] layerInfo);
static native void nSetOpaqueLayer(int layerId, boolean isOpaque);
static native void nSetLayerPaint(int layerId, int nativePaint);
static native void nSetLayerColorFilter(int layerId, int nativeColorFilter);
diff --git a/core/java/android/view/GLES20RenderLayer.java b/core/java/android/view/GLES20RenderLayer.java
index a77425a..fcfc8e1 100644
--- a/core/java/android/view/GLES20RenderLayer.java
+++ b/core/java/android/view/GLES20RenderLayer.java
@@ -54,8 +54,8 @@
}
@Override
- void resize(int width, int height) {
- if (!isValid() || width <= 0 || height <= 0) return;
+ boolean resize(int width, int height) {
+ if (!isValid() || width <= 0 || height <= 0) return false;
mWidth = width;
mHeight = height;
@@ -63,11 +63,17 @@
if (width != mLayerWidth || height != mLayerHeight) {
int[] layerInfo = new int[2];
- GLES20Canvas.nResizeLayer(mLayer, width, height, layerInfo);
-
- mLayerWidth = layerInfo[0];
- mLayerHeight = layerInfo[1];
+ if (GLES20Canvas.nResizeLayer(mLayer, width, height, layerInfo)) {
+ mLayerWidth = layerInfo[0];
+ mLayerHeight = layerInfo[1];
+ } else {
+ // Failure: not enough GPU resources for requested size
+ mLayer = 0;
+ mLayerWidth = 0;
+ mLayerHeight = 0;
+ }
}
+ return isValid();
}
@Override
diff --git a/core/java/android/view/GLES20TextureLayer.java b/core/java/android/view/GLES20TextureLayer.java
index e198ef6..b0ee2aa 100644
--- a/core/java/android/view/GLES20TextureLayer.java
+++ b/core/java/android/view/GLES20TextureLayer.java
@@ -48,7 +48,8 @@
}
@Override
- void resize(int width, int height) {
+ boolean resize(int width, int height) {
+ return isValid();
}
@Override
diff --git a/core/java/android/view/HardwareLayer.java b/core/java/android/view/HardwareLayer.java
index 6e763b2..d798e73 100644
--- a/core/java/android/view/HardwareLayer.java
+++ b/core/java/android/view/HardwareLayer.java
@@ -135,8 +135,9 @@
*
* @param width The new desired minimum width for this layer
* @param height The new desired minimum height for this layer
+ * @return True if the resulting layer is valid, false otherwise
*/
- abstract void resize(int width, int height);
+ abstract boolean resize(int width, int height);
/**
* Returns a hardware canvas that can be used to render onto
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index f906e24..446a51e 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -733,13 +733,17 @@
*/
void checkEglErrors() {
if (isEnabled()) {
- int error = sEgl.eglGetError();
- if (error != EGL_SUCCESS) {
- // something bad has happened revert to
- // normal rendering.
- Log.w(LOG_TAG, "EGL error: " + GLUtils.getEGLErrorString(error));
- fallback(error != EGL11.EGL_CONTEXT_LOST);
- }
+ checkEglErrorsForced();
+ }
+ }
+
+ private void checkEglErrorsForced() {
+ int error = sEgl.eglGetError();
+ if (error != EGL_SUCCESS) {
+ // something bad has happened revert to
+ // normal rendering.
+ Log.w(LOG_TAG, "EGL error: " + GLUtils.getEGLErrorString(error));
+ fallback(error != EGL11.EGL_CONTEXT_LOST);
}
}
@@ -812,7 +816,9 @@
throw new RuntimeException("eglInitialize failed " +
GLUtils.getEGLErrorString(sEgl.eglGetError()));
}
-
+
+ checkEglErrorsForced();
+
sEglConfig = chooseEglConfig();
if (sEglConfig == null) {
// We tried to use EGL_SWAP_BEHAVIOR_PRESERVED_BIT, try again without
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 03f9b72..d93c1be1 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -12213,8 +12213,9 @@
mLocalDirtyRect.set(0, 0, width, height);
} else {
if (mHardwareLayer.getWidth() != width || mHardwareLayer.getHeight() != height) {
- mHardwareLayer.resize(width, height);
- mLocalDirtyRect.set(0, 0, width, height);
+ if (mHardwareLayer.resize(width, height)) {
+ mLocalDirtyRect.set(0, 0, width, height);
+ }
}
// This should not be necessary but applications that change
@@ -12225,7 +12226,7 @@
computeOpaqueFlags();
final boolean opaque = isOpaque();
- if (mHardwareLayer.isOpaque() != opaque) {
+ if (mHardwareLayer.isValid() && mHardwareLayer.isOpaque() != opaque) {
mHardwareLayer.setOpaque(opaque);
mLocalDirtyRect.set(0, 0, width, height);
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index d6a0203..27fd374 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -1402,6 +1402,7 @@
mResizeBuffer.getHeight() != mHeight) {
mResizeBuffer.resize(mWidth, mHeight);
}
+ // TODO: should handle create/resize failure
layerCanvas = mResizeBuffer.start(hwRendererCanvas);
layerCanvas.setViewport(mWidth, mHeight);
layerCanvas.onPreDraw(null);
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java
index c93da06..d6f63a7 100644
--- a/core/java/android/view/VolumePanel.java
+++ b/core/java/android/view/VolumePanel.java
@@ -832,7 +832,6 @@
sConfirmSafeVolumeDialog.dismiss();
}
sConfirmSafeVolumeDialog = new AlertDialog.Builder(mContext)
- .setTitle(android.R.string.dialog_alert_title)
.setMessage(com.android.internal.R.string.safe_media_volume_warning)
.setPositiveButton(com.android.internal.R.string.yes,
new DialogInterface.OnClickListener() {
diff --git a/core/java/android/widget/CheckBox.java b/core/java/android/widget/CheckBox.java
index 41ab5f2..f1804f8 100644
--- a/core/java/android/widget/CheckBox.java
+++ b/core/java/android/widget/CheckBox.java
@@ -20,7 +20,6 @@
import android.util.AttributeSet;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
-import android.util.ValueModel;
/**
@@ -56,9 +55,7 @@
* {@link android.R.styleable#View View Attributes}
* </p>
*/
-public class CheckBox extends CompoundButton implements ValueEditor<Boolean> {
- private ValueModel<Boolean> mValueModel = ValueModel.EMPTY;
-
+public class CheckBox extends CompoundButton {
public CheckBox(Context context) {
this(context, null);
}
@@ -82,22 +79,4 @@
super.onInitializeAccessibilityNodeInfo(info);
info.setClassName(CheckBox.class.getName());
}
-
- @Override
- public ValueModel<Boolean> getValueModel() {
- return mValueModel;
- }
-
- @Override
- public void setValueModel(ValueModel<Boolean> valueModel) {
- mValueModel = valueModel;
- setChecked(mValueModel.get());
- }
-
- @Override
- public boolean performClick() {
- boolean handled = super.performClick();
- mValueModel.set(isChecked());
- return handled;
- }
}
diff --git a/core/java/android/widget/EditText.java b/core/java/android/widget/EditText.java
index ec81214..57e51c2 100644
--- a/core/java/android/widget/EditText.java
+++ b/core/java/android/widget/EditText.java
@@ -17,7 +17,6 @@
package android.widget;
import android.content.Context;
-import android.graphics.Rect;
import android.text.Editable;
import android.text.Selection;
import android.text.Spannable;
@@ -25,7 +24,6 @@
import android.text.method.ArrowKeyMovementMethod;
import android.text.method.MovementMethod;
import android.util.AttributeSet;
-import android.util.ValueModel;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -49,9 +47,7 @@
* {@link android.R.styleable#TextView TextView Attributes},
* {@link android.R.styleable#View View Attributes}
*/
-public class EditText extends TextView implements ValueEditor<CharSequence> {
- private ValueModel<CharSequence> mValueModel = ValueModel.EMPTY;
-
+public class EditText extends TextView {
public EditText(Context context) {
this(context, null);
}
@@ -132,21 +128,4 @@
super.onInitializeAccessibilityNodeInfo(info);
info.setClassName(EditText.class.getName());
}
-
- @Override
- public ValueModel<CharSequence> getValueModel() {
- return mValueModel;
- }
-
- @Override
- public void setValueModel(ValueModel<CharSequence> valueModel) {
- mValueModel = valueModel;
- setText(mValueModel.get());
- }
-
- @Override
- void sendAfterTextChanged(Editable text) {
- super.sendAfterTextChanged(text);
- mValueModel.set(text);
- }
}
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 7f9dab9..237275a 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -1801,13 +1801,13 @@
mTextView.deleteText_internal(dragSourceStart, dragSourceEnd);
// Make sure we do not leave two adjacent spaces.
- CharSequence t = mTextView.getTransformedText(dragSourceStart - 1, dragSourceStart + 1);
- if ( (dragSourceStart == 0 || Character.isSpaceChar(t.charAt(0))) &&
- (dragSourceStart == mTextView.getText().length() ||
- Character.isSpaceChar(t.charAt(1))) ) {
- final int pos = dragSourceStart == mTextView.getText().length() ?
- dragSourceStart - 1 : dragSourceStart;
- mTextView.deleteText_internal(pos, pos + 1);
+ final int prevCharIdx = Math.max(0, dragSourceStart - 1);
+ final int nextCharIdx = Math.min(mTextView.getText().length(), dragSourceStart + 1);
+ if (nextCharIdx > prevCharIdx + 1) {
+ CharSequence t = mTextView.getTransformedText(prevCharIdx, nextCharIdx);
+ if (Character.isSpaceChar(t.charAt(0)) && Character.isSpaceChar(t.charAt(1))) {
+ mTextView.deleteText_internal(prevCharIdx, prevCharIdx + 1);
+ }
}
}
}
diff --git a/core/java/android/widget/SeekBar.java b/core/java/android/widget/SeekBar.java
index a6486a8..2737f94 100644
--- a/core/java/android/widget/SeekBar.java
+++ b/core/java/android/widget/SeekBar.java
@@ -18,7 +18,6 @@
import android.content.Context;
import android.util.AttributeSet;
-import android.util.ValueModel;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -34,7 +33,7 @@
*
* @attr ref android.R.styleable#SeekBar_thumb
*/
-public class SeekBar extends AbsSeekBar implements ValueEditor<Integer> {
+public class SeekBar extends AbsSeekBar {
/**
* A callback that notifies clients when the progress level has been
@@ -70,9 +69,8 @@
void onStopTrackingTouch(SeekBar seekBar);
}
- private ValueModel<Integer> mValueModel = ValueModel.EMPTY;
private OnSeekBarChangeListener mOnSeekBarChangeListener;
-
+
public SeekBar(Context context) {
this(context, null);
}
@@ -91,23 +89,9 @@
if (mOnSeekBarChangeListener != null) {
mOnSeekBarChangeListener.onProgressChanged(this, getProgress(), fromUser);
- if (fromUser) {
- mValueModel.set(getProgress());
- }
}
}
- @Override
- public ValueModel<Integer> getValueModel() {
- return mValueModel;
- }
-
- @Override
- public void setValueModel(ValueModel<Integer> valueModel) {
- mValueModel = valueModel;
- setProgress(mValueModel.get());
- }
-
/**
* Sets a listener to receive notifications of changes to the SeekBar's progress level. Also
* provides notifications of when the user starts and stops a touch gesture within the SeekBar.
diff --git a/core/java/android/widget/ValueEditor.java b/core/java/android/widget/ValueEditor.java
deleted file mode 100755
index 2b91abf..0000000
--- a/core/java/android/widget/ValueEditor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.widget;
-
-import android.util.ValueModel;
-
-/**
- * An interface for editors of simple values. Classes implementing this interface are normally
- * UI controls (subclasses of {@link android.view.View View}) that can provide a suitable
- * user interface to display and edit values of the specified type. This interface is
- * intended to describe editors for simple types, like {@code boolean}, {@code int} or
- * {@code String}, where the values themselves are immutable.
- * <p>
- * For example, {@link android.widget.CheckBox CheckBox} implements
- * this interface for the Boolean type as it is capable of providing an appropriate
- * mechanism for displaying and changing the value of a Boolean property.
- *
- * @param <T> the value type that this editor supports
- */
-public interface ValueEditor<T> {
- /**
- * Return the last value model that was set. If no value model has been set, the editor
- * should return the value {@link android.util.ValueModel#EMPTY}.
- *
- * @return the value model
- */
- public ValueModel<T> getValueModel();
-
- /**
- * Sets the value model for this editor. When the value model is set, the editor should
- * retrieve the value from the value model, using {@link android.util.ValueModel#get()},
- * and set its internal state accordingly. Likewise, when the editor's internal state changes
- * it should update the value model by calling {@link android.util.ValueModel#set(T)}
- * with the appropriate value.
- *
- * @param valueModel the new value model for this editor.
- */
- public void setValueModel(ValueModel<T> valueModel);
-}
diff --git a/core/java/com/android/internal/view/menu/ActionMenuView.java b/core/java/com/android/internal/view/menu/ActionMenuView.java
index dc4ee3a..34ade74 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuView.java
@@ -400,6 +400,7 @@
int nonOverflowCount = 0;
int widthRemaining = right - left - getPaddingRight() - getPaddingLeft();
boolean hasOverflow = false;
+ final boolean isLayoutRtl = isLayoutRtl();
for (int i = 0; i < childCount; i++) {
final View v = getChildAt(i);
if (v.getVisibility() == GONE) {
@@ -414,8 +415,15 @@
}
int height = v.getMeasuredHeight();
- int r = getWidth() - getPaddingRight() - p.rightMargin;
- int l = r - overflowWidth;
+ int r;
+ int l;
+ if (isLayoutRtl) {
+ l = getPaddingLeft() + p.leftMargin;
+ r = l + overflowWidth;
+ } else {
+ r = getWidth() - getPaddingRight() - p.rightMargin;
+ l = r - overflowWidth;
+ }
int t = midVertical - (height / 2);
int b = t + height;
v.layout(l, t, r, b);
@@ -448,20 +456,38 @@
final int spacerCount = nonOverflowCount - (hasOverflow ? 0 : 1);
final int spacerSize = Math.max(0, spacerCount > 0 ? widthRemaining / spacerCount : 0);
- int startLeft = getPaddingLeft();
- for (int i = 0; i < childCount; i++) {
- final View v = getChildAt(i);
- final LayoutParams lp = (LayoutParams) v.getLayoutParams();
- if (v.getVisibility() == GONE || lp.isOverflowButton) {
- continue;
- }
+ if (isLayoutRtl) {
+ int startRight = getWidth() - getPaddingRight();
+ for (int i = 0; i < childCount; i++) {
+ final View v = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) v.getLayoutParams();
+ if (v.getVisibility() == GONE || lp.isOverflowButton) {
+ continue;
+ }
- startLeft += lp.leftMargin;
- int width = v.getMeasuredWidth();
- int height = v.getMeasuredHeight();
- int t = midVertical - height / 2;
- v.layout(startLeft, t, startLeft + width, t + height);
- startLeft += width + lp.rightMargin + spacerSize;
+ startRight -= lp.rightMargin;
+ int width = v.getMeasuredWidth();
+ int height = v.getMeasuredHeight();
+ int t = midVertical - height / 2;
+ v.layout(startRight - width, t, startRight, t + height);
+ startRight -= width + lp.leftMargin + spacerSize;
+ }
+ } else {
+ int startLeft = getPaddingLeft();
+ for (int i = 0; i < childCount; i++) {
+ final View v = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) v.getLayoutParams();
+ if (v.getVisibility() == GONE || lp.isOverflowButton) {
+ continue;
+ }
+
+ startLeft += lp.leftMargin;
+ int width = v.getMeasuredWidth();
+ int height = v.getMeasuredHeight();
+ int t = midVertical - height / 2;
+ v.layout(startLeft, t, startLeft + width, t + height);
+ startLeft += width + lp.rightMargin + spacerSize;
+ }
}
}
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 7dbf9ec..2ff886e 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -766,14 +766,16 @@
return layer;
}
-static void android_view_GLES20Canvas_resizeLayer(JNIEnv* env, jobject clazz,
+static bool android_view_GLES20Canvas_resizeLayer(JNIEnv* env, jobject clazz,
Layer* layer, jint width, jint height, jintArray layerInfo) {
- LayerRenderer::resizeLayer(layer, width, height);
-
- jint* storage = env->GetIntArrayElements(layerInfo, NULL);
- storage[0] = layer->getWidth();
- storage[1] = layer->getHeight();
- env->ReleaseIntArrayElements(layerInfo, storage, 0);
+ if (LayerRenderer::resizeLayer(layer, width, height)) {
+ jint* storage = env->GetIntArrayElements(layerInfo, NULL);
+ storage[0] = layer->getWidth();
+ storage[1] = layer->getHeight();
+ env->ReleaseIntArrayElements(layerInfo, storage, 0);
+ return true;
+ }
+ return false;
}
static void android_view_GLES20Canvas_setLayerPaint(JNIEnv* env, jobject clazz,
@@ -992,7 +994,7 @@
{ "nCreateLayerRenderer", "(I)I", (void*) android_view_GLES20Canvas_createLayerRenderer },
{ "nCreateLayer", "(IIZ[I)I", (void*) android_view_GLES20Canvas_createLayer },
- { "nResizeLayer", "(III[I)V" , (void*) android_view_GLES20Canvas_resizeLayer },
+ { "nResizeLayer", "(III[I)Z" , (void*) android_view_GLES20Canvas_resizeLayer },
{ "nSetLayerPaint", "(II)V", (void*) android_view_GLES20Canvas_setLayerPaint },
{ "nSetLayerColorFilter", "(II)V", (void*) android_view_GLES20Canvas_setLayerColorFilter },
{ "nSetOpaqueLayer", "(IZ)V", (void*) android_view_GLES20Canvas_setOpaqueLayer },
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 90e85e6..fc04cd1 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -650,8 +650,7 @@
static jobject nativeCreateDisplay(JNIEnv* env, jclass clazz, jstring nameObj) {
ScopedUtfChars name(env, nameObj);
- // TODO: pass the name to SF.
- sp<IBinder> token(SurfaceComposerClient::createDisplay());
+ sp<IBinder> token(SurfaceComposerClient::createDisplay(String8(name.c_str())));
return javaObjectForIBinder(env, token);
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 0bc09aa..89d78b6 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -981,7 +981,7 @@
android:protectionLevel="dangerous"
android:label="@string/permlab_getTasks"
android:description="@string/permdesc_getTasks" />
- <!-- Allows an application to call APIs that allow it to do interactions
+ <!-- @hide Allows an application to call APIs that allow it to do interactions
across the users on the device, using singleton services and
user-targeted broadcasts. This permission is not available to
third party applications. -->
@@ -1000,7 +1000,7 @@
android:label="@string/permlab_interactAcrossUsersFull"
android:description="@string/permdesc_interactAcrossUsersFull" />
- <!-- Allows an application to call APIs that allow it to query and manage
+ <!-- @hide Allows an application to call APIs that allow it to query and manage
users on the device. This permission is not available to
third party applications. -->
<permission android:name="android.permission.MANAGE_USERS"
@@ -1769,7 +1769,7 @@
android:description="@string/permdesc_devicePower"
android:protectionLevel="signature" />
- <!-- Allows low-level access to tun tap driver -->
+ <!-- @hide Allows low-level access to tun tap driver -->
<permission android:name="android.permission.NET_TUNNELING"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="signature" />
@@ -1981,7 +1981,7 @@
android:protectionLevel="signature" />
<uses-permission android:name="android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE"/>
- <!-- Package verifier needs to have this permission before the PackageManager will
+ <!-- @hide Package verifier needs to have this permission before the PackageManager will
trust it to verify packages.
-->
<permission android:name="android.permission.PACKAGE_VERIFICATION_AGENT"
diff --git a/core/res/res/layout/keyguard_transport_control_view.xml b/core/res/res/layout/keyguard_transport_control_view.xml
index 8e76164..c40aa66 100644
--- a/core/res/res/layout/keyguard_transport_control_view.xml
+++ b/core/res/res/layout/keyguard_transport_control_view.xml
@@ -20,7 +20,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
- android:layerType="hardware"
android:id="@+id/keyguard_transport_control">
<!-- FrameLayout used as scrim to show between album art and buttons -->
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
index 1486d9c..afb9485 100644
--- a/core/res/res/values-sw600dp/config.xml
+++ b/core/res/res/values-sw600dp/config.xml
@@ -37,5 +37,8 @@
used for picking activities to handle an intent. -->
<integer name="config_maxResolverActivityColumns">3</integer>
+ <!-- Use a larger scaling span for larger screen devices. -->
+ <dimen name="config_minScalingSpan">30mm</dimen>
+
</resources>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 3c0c0a7..7209e4e 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -299,8 +299,9 @@
with this component (by binding to a service for example) those processes will
always interact with the instance running for user 0. Enabling
single user mode forces "exported" of the component to be false, to
- help avoid introducing multi-user security bugs. You must hold the
- permission {@link android.Manifest.permission#INTERACT_ACROSS_USERS} in order
+ help avoid introducing multi-user security bugs. This feature is only
+ available to applications built in to the system image; you must hold the
+ permission INTERACT_ACROSS_USERS in order
to use this feature. This flag can only be used with services,
receivers, and providers; it can not be used with activities. -->
<attr name="singleUser" format="boolean" />
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 1a9a0a9..297e72a 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -292,6 +292,9 @@
<!-- Integer indicating wpa_supplicant scan interval in milliseconds -->
<integer translatable="false" name="config_wifi_supplicant_scan_interval">15000</integer>
+ <!-- Integer indicating wpa_supplicant scan interval when p2p is connected in milliseconds -->
+ <integer translatable="false" name="config_wifi_scan_interval_p2p_connected">60000</integer>
+
<!-- Integer indicating the framework scan interval in milliseconds. This is used in the scenario
where the chipset does not support background scanning (config_wifi_background_scan_suport
is false) to set up a periodic wake up scan so that the device can connect to a new access
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 56e5ce1..b904c60 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3890,7 +3890,7 @@
<!-- Message shown in dialog when user is attempting to set the music volume above the
recommended maximum level for headphones -->
<string name="safe_media_volume_warning" product="default">
- "Raise volume above the recommended level?"
+ "Raise volume above safe level?\nListening at high volume for long periods may damage your hearing."
</string>
<string name="kg_temp_back_string"> < </string> <!-- TODO: remove this -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index eb56d08..0360224 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -275,6 +275,7 @@
<java-symbol type="integer" name="config_ntpTimeout" />
<java-symbol type="integer" name="config_wifi_framework_scan_interval" />
<java-symbol type="integer" name="config_wifi_supplicant_scan_interval" />
+ <java-symbol type="integer" name="config_wifi_scan_interval_p2p_connected" />
<java-symbol type="integer" name="db_connection_pool_size" />
<java-symbol type="integer" name="db_journal_size_limit" />
<java-symbol type="integer" name="db_wal_autocheckpoint" />
diff --git a/core/tests/coretests/src/android/content/ObserverNodeTest.java b/core/tests/coretests/src/android/content/ObserverNodeTest.java
index 95b8465..1acff9c 100644
--- a/core/tests/coretests/src/android/content/ObserverNodeTest.java
+++ b/core/tests/coretests/src/android/content/ObserverNodeTest.java
@@ -23,6 +23,7 @@
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Handler;
+import android.os.UserHandle;
import android.test.AndroidTestCase;
public class ObserverNodeTest extends AndroidTestCase {
@@ -33,6 +34,8 @@
}
public void testUri() {
+ final int myUserHandle = UserHandle.myUserId();
+
ObserverNode root = new ObserverNode("");
Uri[] uris = new Uri[] {
Uri.parse("content://c/a/"),
@@ -48,21 +51,25 @@
int[] nums = new int[] {4, 7, 1, 4, 2, 2, 3, 3};
// special case
- root.addObserverLocked(uris[0], new TestObserver().getContentObserver(), false, root, 0, 0);
+ root.addObserverLocked(uris[0], new TestObserver().getContentObserver(), false, root,
+ 0, 0, myUserHandle);
for(int i = 1; i < uris.length; i++) {
- root.addObserverLocked(uris[i], new TestObserver().getContentObserver(), true, root, 0, 0);
+ root.addObserverLocked(uris[i], new TestObserver().getContentObserver(), true, root,
+ 0, 0, myUserHandle);
}
ArrayList<ObserverCall> calls = new ArrayList<ObserverCall>();
for (int i = nums.length - 1; i >=0; --i) {
- root.collectObserversLocked(uris[i], 0, null, false, calls);
+ root.collectObserversLocked(uris[i], 0, null, false, myUserHandle, calls);
assertEquals(nums[i], calls.size());
calls.clear();
}
}
public void testUriNotNotify() {
+ final int myUserHandle = UserHandle.myUserId();
+
ObserverNode root = new ObserverNode("");
Uri[] uris = new Uri[] {
Uri.parse("content://c/"),
@@ -77,13 +84,14 @@
int[] nums = new int[] {7, 1, 3, 3, 1, 1, 1, 1};
for(int i = 0; i < uris.length; i++) {
- root.addObserverLocked(uris[i], new TestObserver().getContentObserver(), false, root, 0, 0);
+ root.addObserverLocked(uris[i], new TestObserver().getContentObserver(), false, root,
+ 0, 0, myUserHandle);
}
ArrayList<ObserverCall> calls = new ArrayList<ObserverCall>();
for (int i = uris.length - 1; i >=0; --i) {
- root.collectObserversLocked(uris[i], 0, null, false, calls);
+ root.collectObserversLocked(uris[i], 0, null, false, myUserHandle, calls);
assertEquals(nums[i], calls.size());
calls.clear();
}
diff --git a/docs/html/design/style/iconography.jd b/docs/html/design/style/iconography.jd
index 31274c5..3ba3f71 100644
--- a/docs/html/design/style/iconography.jd
+++ b/docs/html/design/style/iconography.jd
@@ -109,9 +109,7 @@
</p>
<p>
-
-<a href="{@docRoot}downloads/design/Android_Design_Icons_20120229.zip">Download the Action Bar Icon Pack</a>
-
+<a href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
</p>
<div class="layout-content-row">
diff --git a/docs/html/distribute/distribute_toc.cs b/docs/html/distribute/distribute_toc.cs
index f11e965..76073fb 100644
--- a/docs/html/distribute/distribute_toc.cs
+++ b/docs/html/distribute/distribute_toc.cs
@@ -72,10 +72,10 @@
<span class="en">Linking to Your Products</a></li>
<li><a href="<?cs var:toroot ?>distribute/googleplay/promote/badges.html">
<span class="en">Google Play Badges</a></li>
- <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/brand.html">
- <span class="en">Brand Assets and Guidelines</a></li>
<li><a href="<?cs var:toroot ?>distribute/promote/device-art.html">
<span class="en">Device Art Generator</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/brand.html">
+ <span class="en">Brand Assets and Guidelines</a></li>
</ul>
</li>
diff --git a/docs/html/distribute/googleplay/promote/badges.jd b/docs/html/distribute/googleplay/promote/badges.jd
index de12e2a..7b64be3 100644
--- a/docs/html/distribute/googleplay/promote/badges.jd
+++ b/docs/html/distribute/googleplay/promote/badges.jd
@@ -1,11 +1,20 @@
page.title=Google Play Badges
@jd:body
-<p>Google Play badges give you an officially branded way of promoting your app to Android users. Use the form below to quickly create badges to link users to your products from web pages, ads, reviews, and more. See <a href="linking.html">Linking to your products</a> for more ways to bring users to your apps.</p>
+<p>Google Play badges allow you to promote your app with official branding in your
+online ads, promotional materials, or anywhere else you want a link to your app.</p>
-<p>Input your app's package or your publisher name, choose the style, size, and language, and click "Build my badge". The form will generate code for an embbeded button that links to your app's product page or a list of your apps. </p>
+<p>In the form below,
+input your app's package name or publisher name, choose the badge style,
+click <em>Build my badge</em>, then paste the HTML into your web content.</p>
-<p>Note that you should not modify the Google Play badges after generating them, including colors, size, text, and logo. See <a href="http://www.android.com/branding.html">Android Brand Guidelines</a> for more information.</p>
+<p>If you're creating a promotional web page for your app, you should also use the
+<a href="{@docRoot}distribute/promote/device-art.html">Device Art Generator</a>, which quickly
+wraps your screenshots in real device artwork.</p>
+
+<p>For guidelines when using the Google Play badge and other brand assets,
+see the <a href="{@docRoot}distribute/googleplay/promote/brand.html">Brand Assets and
+Guidelines</a>.</p>
<style type="text/css">
@@ -34,11 +43,13 @@
}
div.button-row input {
- vertical-align:120%;
+ vertical-align:middle;
+ margin:0 5px 0 0;
}
#jd-content div.button-row img {
margin: 0;
+ vertical-align:middle;
}
</style>
@@ -46,7 +57,7 @@
<script type="text/javascript">
// variables for creating 'try it out' demo button
-var imagePath = "http://www.android.com/images/brand/"
+var imagePath = "http://developer.android.com/images/brand/"
var linkStart = "<a href=\"http://play.google.com/store/";
var imageStart = "\">\n"
+ " <img alt=\"";
@@ -167,28 +178,29 @@
onclick="return clearLabel('publisher','Example, Inc.');">clear</a>
<br/><br/>
-<div class="button-row">
- <input type="radio" name="buttonStyle" value="get_it_on_play_logo_small" id="ns" checked="checked" />
- <label for="ns"><img src="http://www.android.com/images/brand/get_it_on_play_logo_small.png"
-alt="Get it on Google Play (small)" /></label>
-
- <input type="radio" name="buttonStyle" value="get_it_on_play_logo_large" id="nm" />
- <label for="nm"><img src="http://www.android.com/images/brand/get_it_on_play_logo_large.png"
-alt="Get it on Google Play (large)" /></label>
-</div>
<div class="button-row">
- <input type="radio" name="buttonStyle" value="android_app_on_play_logo_small" id="ws" />
- <label for="ws"><img src="http://www.android.com/images/brand/android_app_on_play_logo_small.png"
+ <input type="radio" name="buttonStyle" value="en_app_rgb_wo_45" id="ws" checked="checked" />
+ <label for="ws"><img src="{@docRoot}images/brand/en_app_rgb_wo_45.png"
alt="Android app on Google Play (small)" /></label>
- <input type="radio" name="buttonStyle" value="android_app_on_play_logo_large" id="wm" />
- <label for="wm"><img src="http://www.android.com/images/brand/android_app_on_play_logo_large.png"
+ <input type="radio" name="buttonStyle" value="en_app_rgb_wo_60" id="wm" />
+ <label for="wm"><img src="{@docRoot}images/brand/en_app_rgb_wo_60.png"
alt="Android app on Google Play (large)" /></label>
</div>
+<div class="button-row">
+ <input type="radio" name="buttonStyle" value="en_generic_rgb_wo_45" id="ns" />
+ <label for="ns"><img src="{@docRoot}images/brand/en_generic_rgb_wo_45.png"
+alt="Get it on Google Play (small)" /></label>
+
+ <input type="radio" name="buttonStyle" value="en_generic_rgb_wo_60" id="nm" />
+ <label for="nm"><img src="{@docRoot}images/brand/en_generic_rgb_wo_60.png"
+alt="Get it on Google Play (large)" /></label>
+</div>
+
<input type="button" onclick="return buildButton(this.parentNode)" value="Build my badge"
-style="padding:5px" />
+style="padding:10px" />
<br/>
</form>
diff --git a/docs/html/distribute/googleplay/promote/brand.jd b/docs/html/distribute/googleplay/promote/brand.jd
index 76ed619..4051553 100644
--- a/docs/html/distribute/googleplay/promote/brand.jd
+++ b/docs/html/distribute/googleplay/promote/brand.jd
@@ -88,28 +88,28 @@
"Android is a trademark of Google Inc."</span>
</p>
+
<h2 id="brand-google_play">Google Play Brand</h2>
-<div style="clear:both">
- <div style="float:right;width:50%;padding:1.5em;">
- <p>
- <img alt="Google Play logo" src="http://www.android.com/images/brand/google_play_logo_450.png">
- </p>
- <p>
- <img alt="Get it on Google Play badge, large" src=
- "http://www.android.com/images/brand/get_it_on_play_logo_large.png"><br>
- Download: <a href="http://www.android.com/images/brand/get_it_on_play_logo_small.png">Small</a> | <a href=
- "http://www.android.com/images/brand/get_it_on_play_logo_large.png">Large</a>
- </p>
- <p>
- <img alt="Android App on Google Play badge, large" src=
- "http://www.android.com/images/brand/android_app_on_play_logo_large.png"><br>
- Download: <a href="http://www.android.com/images/brand/android_app_on_play_logo_small.png">Small</a> |
- <a href="http://www.android.com/images/brand/android_app_on_play_large.png">Large</a>
- </p>
- </div>
+ <img alt="" src="http://www.android.com/images/brand/google_play_logo_450.png"
+ style="float:right;">
+
+ <img alt="Android app on Google Play badge, large"
+ src="{@docRoot}images/brand/en_app_rgb_wo_60.png"
+ style="float:right;clear:right;">
+
+ <img alt="Android app on Google Play badge, small"
+ src="{@docRoot}images/brand/en_app_rgb_wo_45.png"
+ style="float:right;margin:0 30px 30px">
+
+ <img alt="Get it on Google Play badge, large"
+ src="{@docRoot}images/brand/en_generic_rgb_wo_60.png"
+ style="float:right;clear:right;">
+
+ <img alt="Get it on Google Play badge, small"
+ src="{@docRoot}images/brand/en_generic_rgb_wo_45.png"
+ style="float:right;margin:0 30px 30px;">
- <div style="width:45%;">
<h4>06/ <em>Get it on Google Play</em> Badge
</h4>
<p>
@@ -118,57 +118,34 @@
Play.
</p>
<p>
- The logos are available in two sizes:
- </p>
- <ul>
- <li>Large: 60(h) x 172(w)</li>
- </li>
- <li>Small 45(h) x 129(w)
- </li>
- </ul>
- <p>
Guidelines for usage:
</p>
<ul>
- <li>Never separate the phrase “Get it on Google Play” or "Android App on Google Play"
- from the Google Play logo, and do not change the color, proportions, spacing or any
- other aspect of the logo.
+ <li>Do not modify the color, proportions, spacing or any other aspect of the badge image.
</li>
- </ul>
- </div>
-
- <ul>
- <li>When used online, the badge logo should be used to direct users to:
+ <li>When used alongside logos for other application marketplaces, the Google Play logo
+ should be of equal or greater size.</li>
+ <li>When used online, the badge should link to either:
<ul>
- <li>The Google Play landing page: <br />
- <span style="margin-left:1em;">http://play.google.com</span>
- </li>
- <li>The Google Play Apps landing page: <br />
- <span style="margin-left:1em;">http://play.google.com/store/apps</span>
- </li>
- <li>A list of products that include your company name, for example, <br />
- <span style="margin-left:1em;">http://play.google.com/store/search?q=<em>yourCompanyName</em></span>
- </li>
- <li>A list of products published by you, for example,<br />
+ <li>A list of products published by you, for example:<br />
<span style="margin-left:1em;">http://play.google.com/store/search?q=<em>publisherName</em></span>
</li>
- <li>A specific app product details page within Google Play, for example,<br />
+ <li>A specific app product details page within Google Play, for example:<br />
<span style="margin-left:1em;">http://play.google.com/store/apps/details?id=<em>packageName</em></span>
</li>
</ul>
</li>
- <li>When used alongside logos for other application marketplaces, the Google Play logo
- should be of equal or greater size</li>
</ul>
-
- <p>For details on all the ways that you can link to your product details page in Google Play,
- see <a href="{@docRoot}distribute/googleplay/promote/linking.html">Linking to your products</a></p>
- <p>For convenience, if you are using the logos online, you can use the
- <a href="{@docRoot}distribute/googleplay/promote/badges.html">badge generator</a>
- to create the appropriate markup and link to your apps.</p>
+ <p>For your convenience, you can use the
+ <a href="{@docRoot}distribute/googleplay/promote/badges.html">Googe Play badge generator</a>
+ to create badges that link to your apps on Google Play.</p>
+
+ <p>For details on all the ways that you can link to your product details page in Google Play,
+ see <a href="{@docRoot}distribute/googleplay/promote/linking.html">Linking to your products</a></p>
<h2>Other Brands</h2>
<p>Any other brands or icons depicted on this site are <em>not</em> are the property of their
respective owners and usage is reserved. You must seek the developer for appropriate permission to use them.</p>
+
diff --git a/docs/html/guide/faq/security.jd b/docs/html/guide/faq/security.jd
index 52ee0d9..a6e07c8 100644
--- a/docs/html/guide/faq/security.jd
+++ b/docs/html/guide/faq/security.jd
@@ -57,9 +57,7 @@
<p>We appreciate researchers practicing responsible disclosure by emailing us
with a detailed summary of the issue and keeping the issue confidential while
users are at risk. In return, we will make sure to keep the researcher informed
-of our progress in issuing a fix and will properly credit the reporter(s) when
-we provide the patch. We will always move swiftly to mitigate or fix an
-externally-reported flaw and provide updates to users. </p>
+of our progress in issuing a fix. </p>
<a name="informed" id="informed"></a><h2>How can I stay informed about Android security?</h2>
diff --git a/docs/html/images/brand/en_app_rgb_wo_45.png b/docs/html/images/brand/en_app_rgb_wo_45.png
new file mode 100644
index 0000000..9891cbb
--- /dev/null
+++ b/docs/html/images/brand/en_app_rgb_wo_45.png
Binary files differ
diff --git a/docs/html/images/brand/en_app_rgb_wo_60.png b/docs/html/images/brand/en_app_rgb_wo_60.png
new file mode 100644
index 0000000..649e782
--- /dev/null
+++ b/docs/html/images/brand/en_app_rgb_wo_60.png
Binary files differ
diff --git a/docs/html/images/brand/en_generic_rgb_wo_45.png b/docs/html/images/brand/en_generic_rgb_wo_45.png
new file mode 100644
index 0000000..73dd393
--- /dev/null
+++ b/docs/html/images/brand/en_generic_rgb_wo_45.png
Binary files differ
diff --git a/docs/html/images/brand/en_generic_rgb_wo_60.png b/docs/html/images/brand/en_generic_rgb_wo_60.png
new file mode 100644
index 0000000..9a50aff
--- /dev/null
+++ b/docs/html/images/brand/en_generic_rgb_wo_60.png
Binary files differ
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index c3444e6..cc72df6 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -182,6 +182,10 @@
caches.resourceCache.decrementRefcountLocked(mSourcePaths.itemAt(i));
}
+ for (size_t i = 0; i < mLayers.size(); i++) {
+ caches.resourceCache.decrementRefcountLocked(mLayers.itemAt(i));
+ }
+
caches.resourceCache.unlock();
for (size_t i = 0; i < mPaints.size(); i++) {
@@ -206,6 +210,7 @@
mPaints.clear();
mPaths.clear();
mMatrices.clear();
+ mLayers.clear();
}
void DisplayList::initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing) {
@@ -264,6 +269,12 @@
caches.resourceCache.incrementRefcountLocked(sourcePaths.itemAt(i));
}
+ const Vector<Layer*>& layers = recorder.getLayers();
+ for (size_t i = 0; i < layers.size(); i++) {
+ mLayers.add(layers.itemAt(i));
+ caches.resourceCache.incrementRefcountLocked(layers.itemAt(i));
+ }
+
caches.resourceCache.unlock();
const Vector<SkPaint*>& paints = recorder.getPaints();
@@ -1361,6 +1372,10 @@
mCaches.resourceCache.decrementRefcountLocked(mSourcePaths.itemAt(i));
}
+ for (size_t i = 0; i < mLayers.size(); i++) {
+ mCaches.resourceCache.decrementRefcountLocked(mLayers.itemAt(i));
+ }
+
mCaches.resourceCache.unlock();
mBitmapResources.clear();
@@ -1379,6 +1394,8 @@
mMatrices.clear();
+ mLayers.clear();
+
mHasDrawOps = false;
}
@@ -1539,7 +1556,7 @@
status_t DisplayListRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
addOp(DisplayList::DrawLayer);
- addInt((int) layer);
+ addLayer(layer);
addPoint(x, y);
addPaint(paint);
return DrawGlInfo::kStatusDone;
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 8e4f2d3..a0b1630 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -496,6 +496,7 @@
SortedVector<SkPath*> mSourcePaths;
Vector<SkMatrix*> mMatrices;
Vector<SkiaShader*> mShaders;
+ Vector<Layer*> mLayers;
mutable SkFlattenableReadBuffer mReader;
@@ -652,6 +653,10 @@
return mSourcePaths;
}
+ const Vector<Layer*>& getLayers() const {
+ return mLayers;
+ }
+
const Vector<SkMatrix*>& getMatrices() const {
return mMatrices;
}
@@ -804,6 +809,12 @@
mMatrices.add(copy);
}
+ inline void addLayer(Layer* layer) {
+ addInt((int) layer);
+ mLayers.add(layer);
+ mCaches.resourceCache.incrementRefcount(layer);
+ }
+
inline void addBitmap(SkBitmap* bitmap) {
// Note that this assumes the bitmap is immutable. There are cases this won't handle
// correctly, such as creating the bitmap from scratch, drawing with it, changing its
@@ -862,6 +873,8 @@
Vector<SkMatrix*> mMatrices;
+ Vector<Layer*> mLayers;
+
uint32_t mBufferSize;
int mRestoreSaveCount;
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 31e169b..76b274b 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -25,10 +25,29 @@
namespace android {
namespace uirenderer {
+Layer::Layer(const uint32_t layerWidth, const uint32_t layerHeight) {
+ mesh = NULL;
+ meshIndices = NULL;
+ meshElementCount = 0;
+ cacheable = true;
+ textureLayer = false;
+ renderTarget = GL_TEXTURE_2D;
+ texture.width = layerWidth;
+ texture.height = layerHeight;
+ colorFilter = NULL;
+ deferredUpdateScheduled = false;
+ renderer = NULL;
+ displayList = NULL;
+ fbo = 0;
+ Caches::getInstance().resourceCache.incrementRefcount(this);
+}
+
Layer::~Layer() {
if (mesh) delete mesh;
if (meshIndices) delete meshIndices;
if (colorFilter) Caches::getInstance().resourceCache.decrementRefcount(colorFilter);
+ if (fbo) Caches::getInstance().fboCache.put(fbo);
+ deleteTexture();
}
void Layer::setPaint(SkPaint* paint) {
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 76da671..420073a 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -46,21 +46,7 @@
*/
struct Layer {
- Layer(const uint32_t layerWidth, const uint32_t layerHeight) {
- mesh = NULL;
- meshIndices = NULL;
- meshElementCount = 0;
- cacheable = true;
- textureLayer = false;
- renderTarget = GL_TEXTURE_2D;
- texture.width = layerWidth;
- texture.height = layerHeight;
- colorFilter = NULL;
- deferredUpdateScheduled = false;
- renderer = NULL;
- displayList = NULL;
- }
-
+ Layer(const uint32_t layerWidth, const uint32_t layerHeight);
~Layer();
/**
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp
index eea707e..ce74cee 100644
--- a/libs/hwui/LayerCache.cpp
+++ b/libs/hwui/LayerCache.cpp
@@ -69,15 +69,10 @@
void LayerCache::deleteLayer(Layer* layer) {
if (layer) {
- GLuint fbo = layer->getFbo();
- LAYER_LOGD("Destroying layer %dx%d, fbo %d", layer->getWidth(), layer->getHeight(), fbo);
-
+ LAYER_LOGD("Destroying layer %dx%d, fbo %d", layer->getWidth(), layer->getHeight(),
+ layer->getFbo());
mSize -= layer->getWidth() * layer->getHeight() * 4;
-
- if (fbo) Caches::getInstance().fboCache.put(fbo);
- layer->deleteTexture();
-
- delete layer;
+ Caches::getInstance().resourceCache.decrementRefcount(layer);
}
}
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 02af5e2..b57d806 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -211,10 +211,8 @@
fbo, width, height);
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
- caches.fboCache.put(fbo);
- layer->deleteTexture();
- delete layer;
+ Caches::getInstance().resourceCache.decrementRefcount(layer);
return NULL;
}
@@ -240,8 +238,7 @@
layer->texCoords.set(0.0f, height / float(layer->getHeight()),
width / float(layer->getWidth()), 0.0f);
} else {
- layer->deleteTexture();
- delete layer;
+ Caches::getInstance().resourceCache.decrementRefcount(layer);
return false;
}
}
@@ -303,8 +300,7 @@
if (!Caches::getInstance().layerCache.put(layer)) {
LAYER_RENDERER_LOGD(" Destroyed!");
- layer->deleteTexture();
- delete layer;
+ Caches::getInstance().resourceCache.decrementRefcount(layer);
} else {
LAYER_RENDERER_LOGD(" Cached!");
#if DEBUG_LAYER_RENDERER
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 02448e8..4aefcba 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -643,10 +643,8 @@
ALOGE("Framebuffer incomplete (GL error code 0x%x)", status);
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
- layer->deleteTexture();
- mCaches.fboCache.put(layer->getFbo());
- delete layer;
+ Caches::getInstance().resourceCache.decrementRefcount(layer);
return false;
}
@@ -732,8 +730,7 @@
// Failing to add the layer to the cache should happen only if the layer is too large
if (!mCaches.layerCache.put(layer)) {
LAYER_LOGD("Deleting layer");
- layer->deleteTexture();
- delete layer;
+ Caches::getInstance().resourceCache.decrementRefcount(layer);
}
}
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index 6e7f35d..2d13f60 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -231,10 +231,10 @@
};
const char* gFS_Fast_SingleModulateGradient[2] = {
"\nvoid main(void) {\n"
- " gl_FragColor " FS_MAIN_DITHER " + color.a * texture2D(gradientSampler, linear);\n"
+ " gl_FragColor = " FS_MAIN_DITHER " + color.a * texture2D(gradientSampler, linear);\n"
"}\n\n",
"\nvoid main(void) {\n"
- " gl_FragColor " FS_MAIN_DITHER " + color.a * mix(startColor, endColor, clamp(linear, 0.0, 1.0));\n"
+ " gl_FragColor = " FS_MAIN_DITHER " + color.a * mix(startColor, endColor, clamp(linear, 0.0, 1.0));\n"
"}\n\n"
};
diff --git a/libs/hwui/ResourceCache.cpp b/libs/hwui/ResourceCache.cpp
index b0c57d1..1c83ea4 100644
--- a/libs/hwui/ResourceCache.cpp
+++ b/libs/hwui/ResourceCache.cpp
@@ -79,6 +79,10 @@
incrementRefcount((void*) filterResource, kColorFilter);
}
+void ResourceCache::incrementRefcount(Layer* layerResource) {
+ incrementRefcount((void*) layerResource, kLayer);
+}
+
void ResourceCache::incrementRefcountLocked(void* resource, ResourceType resourceType) {
ssize_t index = mCache->indexOfKey(resource);
ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
@@ -109,6 +113,10 @@
incrementRefcountLocked((void*) filterResource, kColorFilter);
}
+void ResourceCache::incrementRefcountLocked(Layer* layerResource) {
+ incrementRefcountLocked((void*) layerResource, kLayer);
+}
+
void ResourceCache::decrementRefcount(void* resource) {
Mutex::Autolock _l(mLock);
decrementRefcountLocked(resource);
@@ -134,6 +142,10 @@
decrementRefcount((void*) filterResource);
}
+void ResourceCache::decrementRefcount(Layer* layerResource) {
+ decrementRefcount((void*) layerResource);
+}
+
void ResourceCache::decrementRefcountLocked(void* resource) {
ssize_t index = mCache->indexOfKey(resource);
ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
@@ -167,6 +179,10 @@
decrementRefcountLocked((void*) filterResource);
}
+void ResourceCache::decrementRefcountLocked(Layer* layerResource) {
+ decrementRefcountLocked((void*) layerResource);
+}
+
void ResourceCache::destructor(SkPath* resource) {
Mutex::Autolock _l(mLock);
destructorLocked(resource);
@@ -280,7 +296,7 @@
if (ref->recycled && ref->resourceType == kBitmap) {
((SkBitmap*) resource)->setPixels(NULL, NULL);
}
- if (ref->destroyed) {
+ if (ref->destroyed || ref->resourceType == kLayer) {
switch (ref->resourceType) {
case kBitmap: {
SkBitmap* bitmap = (SkBitmap*) resource;
@@ -308,6 +324,11 @@
delete filter;
}
break;
+ case kLayer: {
+ Layer* layer = (Layer*) resource;
+ delete layer;
+ }
+ break;
}
}
mCache->removeItem(resource);
diff --git a/libs/hwui/ResourceCache.h b/libs/hwui/ResourceCache.h
index 60ffa7d..2053d96 100644
--- a/libs/hwui/ResourceCache.h
+++ b/libs/hwui/ResourceCache.h
@@ -23,6 +23,7 @@
#include <SkiaColorFilter.h>
#include <SkiaShader.h>
#include <utils/KeyedVector.h>
+#include "Layer.h"
namespace android {
namespace uirenderer {
@@ -35,6 +36,7 @@
kShader,
kColorFilter,
kPath,
+ kLayer
};
class ResourceReference {
@@ -67,21 +69,25 @@
void incrementRefcount(SkBitmap* resource);
void incrementRefcount(SkiaShader* resource);
void incrementRefcount(SkiaColorFilter* resource);
+ void incrementRefcount(Layer* resource);
void incrementRefcountLocked(SkPath* resource);
void incrementRefcountLocked(SkBitmap* resource);
void incrementRefcountLocked(SkiaShader* resource);
void incrementRefcountLocked(SkiaColorFilter* resource);
+ void incrementRefcountLocked(Layer* resource);
void decrementRefcount(SkBitmap* resource);
void decrementRefcount(SkPath* resource);
void decrementRefcount(SkiaShader* resource);
void decrementRefcount(SkiaColorFilter* resource);
+ void decrementRefcount(Layer* resource);
void decrementRefcountLocked(SkBitmap* resource);
void decrementRefcountLocked(SkPath* resource);
void decrementRefcountLocked(SkiaShader* resource);
void decrementRefcountLocked(SkiaColorFilter* resource);
+ void decrementRefcountLocked(Layer* resource);
void destructor(SkPath* resource);
void destructor(SkBitmap* resource);
diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java
index bd65b9e..487585e 100755
--- a/media/java/android/mtp/MtpDatabase.java
+++ b/media/java/android/mtp/MtpDatabase.java
@@ -490,6 +490,7 @@
MtpConstants.FORMAT_MPEG,
MtpConstants.FORMAT_EXIF_JPEG,
MtpConstants.FORMAT_TIFF_EP,
+ MtpConstants.FORMAT_BMP,
MtpConstants.FORMAT_GIF,
MtpConstants.FORMAT_JFIF,
MtpConstants.FORMAT_PNG,
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTest.java
index e7f98de..ed9bb97 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTest.java
@@ -98,7 +98,9 @@
mWakeLock.acquire();
}
- public void onStop(Bundle icicle) {
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
mWakeLock.release();
}
diff --git a/media/tests/contents/media_api/music/sine_200+1000Hz_44K_mo.wav b/media/tests/contents/media_api/music/sine_200+1000Hz_44K_mo.wav
old mode 100755
new mode 100644
index 312b6fb..24c2a0d
--- a/media/tests/contents/media_api/music/sine_200+1000Hz_44K_mo.wav
+++ b/media/tests/contents/media_api/music/sine_200+1000Hz_44K_mo.wav
Binary files differ
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 7cc5dec..a0ae9e3 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -317,13 +317,14 @@
boolean backedUpDataChanged = false;
String property = null, table = uri.getPathSegments().get(0);
+ final boolean isGlobal = table.equals(TABLE_GLOBAL);
if (table.equals(TABLE_SYSTEM)) {
property = Settings.System.SYS_PROP_SETTING_VERSION + '_' + userHandle;
backedUpDataChanged = true;
} else if (table.equals(TABLE_SECURE)) {
property = Settings.Secure.SYS_PROP_SETTING_VERSION + '_' + userHandle;
backedUpDataChanged = true;
- } else if (table.equals(TABLE_GLOBAL)) {
+ } else if (isGlobal) {
property = Settings.Global.SYS_PROP_SETTING_VERSION; // this one is global
backedUpDataChanged = true;
}
@@ -342,8 +343,9 @@
String notify = uri.getQueryParameter("notify");
if (notify == null || "true".equals(notify)) {
- getContext().getContentResolver().notifyChange(uri, null);
- if (LOCAL_LOGV) Log.v(TAG, "notifying: " + uri);
+ final int notifyTarget = isGlobal ? UserHandle.USER_ALL : userHandle;
+ getContext().getContentResolver().notifyChange(uri, null, true, notifyTarget);
+ if (LOCAL_LOGV) Log.v(TAG, "notifying for " + notifyTarget + ": " + uri);
} else {
if (LOCAL_LOGV) Log.v(TAG, "notification suppressed: " + uri);
}
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 ba286d5..bfe0990 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 3b334de..b2be115 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_auto_rotate.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_auto_rotate.png
index ec1ac15..d5f1e29 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_0.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_0.png
index 6f6de2d..6fd7910 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_0.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_0.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 b07cff9..f3632f3 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_15.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_15.png
index 6290840..228f59a 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_15.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_15.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 d046c86..dc8510d 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 bee1025..77abaaa 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 a95cec5..403bfbc 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 58fa9c7..c0ff12c 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 5ea7466..18e8864 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_charge_0.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_0.png
index 311b659b..9ab1d8f 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_0.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_0.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 6884c16..64db815 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_15.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_15.png
index c92c5d8..3965162 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_15.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_charge_15.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 02ff6e6..4b14d62 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 76245ef..3f51ba5 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 9f358fc..aecf7e6 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 5544567..524bf73 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 cde5bfa..80325c7 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_battery_unknown.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_unknown.png
index 48cd877..ceaa03b 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_unknown.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_battery_unknown.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 2a02413..2ba62f9 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 322a747..7d6fed5 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 a5c8693..464bb6a 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 ba0f893..dbdc524 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_default_user.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_default_user.png
new file mode 100644
index 0000000..03c450c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_default_user.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 97324c6..e46d8a3 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
index 9699e81..7e67171 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_location.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_location.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
index 7a4fb11..5912301 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_mirroring.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 e7797b9..1a7618d 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 6e56c8c..115bc41 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_0.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_0.png
index ce55266..39fff41 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_0.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_signal_0.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 6209b9d..97558ff 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 8a50dc0..f5f0f74 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 d9e0a46..80472e5 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 4034681..59af783 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 2356cfa..54be048 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 2f17ccf..2495d07 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 4e60d05..7616e17 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 6a71c36..2bd5949 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 8875fb2..544dcf9 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 4b987a0..5ca9892 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 9d0bb26..7f050f8 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 65a9949..be1ed56 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 34fe280..5eab3c8 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 928fd16..502787b 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 0717cc6..e436ed8 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 dd44443..304c278 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 2d46d93..26687ca 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
new file mode 100644
index 0000000..b0449e1
--- /dev/null
+++ 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 03137e2..ce77c5e 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 5c8793e..7d8d284 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 a601b2a..bf0e995 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 ce511b3..1782c1c 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 3d1bd3c..c97a167 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 70f364a..f999c6e 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 e459f64..1431c3d 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 971b9e0..13ee0a5 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_0.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_0.png
new file mode 100644
index 0000000..7e7d068
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_0.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 377a009..bdba14e 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 d62b0bd..b51b0a6 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 b40f6d9..e1ac946 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 6d1e410..fec4d2b 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
new file mode 100644
index 0000000..0a31297
--- /dev/null
+++ 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
new file mode 100644
index 0000000..3e712ad
--- /dev/null
+++ 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
new file mode 100644
index 0000000..565ae54
--- /dev/null
+++ 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
new file mode 100644
index 0000000..2c30f8e
--- /dev/null
+++ 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 049086a..bf0e995 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 aec214d..1782c1c 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 73ac90c..ea6d235 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 b3956ee..f999c6e 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 1a111df..53ef509 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 956699c..a20f6b2 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_auto_rotate.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_auto_rotate.png
index 3a202d0..10ae0f0 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_0.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_0.png
index a33d423..c581919 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_0.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_0.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 8203b3f..2f330f7 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_15.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_15.png
index 0e237c0..2a1637c 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_15.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_15.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 4bbd29e..8457c2b 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 ac0e62c..f72fe4a 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 2863a58..10e3275 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 4029d83..ca1613c 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 d0ea00a..2bfe20d 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_charge_0.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_0.png
index 0ffa232..b917281 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_0.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_0.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 aa6458d..480f579 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_15.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_15.png
index 8841868..cee2a44 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_15.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_charge_15.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 777bc7a..f2056db 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 7271089..697d4ec 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 d2be21b..9c53dd4 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 1708d32..c967999 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 103d3b8..8df8234 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_battery_unknown.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_unknown.png
index 8246a60..c3a4ab4 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_unknown.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_battery_unknown.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 b288094..6246ebe 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 48fed00..ec30791 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 76b65cf..2a530f8 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 ab274ee..9940a65 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_default_user.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_default_user.png
new file mode 100644
index 0000000..d90bdd3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_default_user.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 6667050..10e325d 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
index fce92ba..79f1f470 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_location.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_location.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
index 28253ea..a5f16e8 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_mirroring.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 1ef88fc..b70df3d 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 2b2abdd..c410310 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_0.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_0.png
index 20c13d0..d46fced 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_0.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_0.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 278681d..3bd6001 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 6ef198db..9599611 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 79691fc..975ac27 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 d3c09b7..3c221cf 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 dd8d13a..d75ef88 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 004299f..d367585 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 80f72b4..97b3dda 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 b5bc3d9..4d49307 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 192d234..5c8dc82 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 cc8ac74..01560e8 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 8d916b4..3082ff0 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 293db72..7966be8 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 9bd6e55..a78c4d6 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 c9dc1d8..dce07ae 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 641b002..828a728 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 3230eb9..f1a8017 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 67b0c37..9077d56 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
new file mode 100644
index 0000000..d298624
--- /dev/null
+++ 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 80096e7..2eeff7f 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 ba99cec..c708e00 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 9f8c107..bfa3f12 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 cb44955..8302636 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 e03e230..90aa923 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 78fbd30..889be88 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 3b1e093..92f7fcc 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 94069bd..6ac70fa 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_0.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_0.png
new file mode 100644
index 0000000..9ab044d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_wifi_0.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 6b4e5c2..473851b 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 3847828..da2fe94 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 bf43969..44d98be 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 53838ee..1a06411 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
new file mode 100644
index 0000000..e78ab6b
--- /dev/null
+++ 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
new file mode 100644
index 0000000..1b025f26
--- /dev/null
+++ 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
new file mode 100644
index 0000000..3036c86
--- /dev/null
+++ 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
new file mode 100644
index 0000000..de000eb
--- /dev/null
+++ 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 490a172..bfa3f12 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 6f27626..8302636 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 f5f5f40..d392496 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 a9d0e2e..889be88 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 8f3809b..c05d4d6 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 dc2530d..ef8a7eb 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_auto_rotate.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_auto_rotate.png
index e0cc192..5bceaf5 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_0.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_0.png
index b62fb34..2b592cc 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_0.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_0.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 f5d8e7d..2c56c9b 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_15.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_15.png
index c57e62d..9895f71 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_15.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_15.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 f4bfe1a..323fa8b 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 07d2c83..98eea99 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 06aaf11..64555c0 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 2f56daa..ad8b15f 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 ac0d7bc..071b79b 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_charge_0.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_0.png
index 1f5b55a..1ecedca 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_0.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_0.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 18cd25c..234bb63 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_15.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_15.png
index ecd4734..e3c6920 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_15.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_charge_15.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 dc54996..3dfbe4c 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 758a874..3f493f1 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 c4ab7d5..0cce725 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 a63e7e3..f6fff00 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 b0f7aa6..35ef746 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_battery_unknown.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_unknown.png
index 71fe29f..f5fbbfb 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_unknown.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_battery_unknown.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 9bd89fd..1302a26 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 a1c0911..7ac3015 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 1d9a027..b2b563b 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 fabb79c..b1c8753 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_default_user.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_default_user.png
new file mode 100644
index 0000000..fd9b677
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_default_user.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 98683f9..f84e614 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
index a5351b2..b2033df 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location.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
index 7d2d650..eb6d5a6 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_mirroring.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 b641f40..0098df49 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 349370d..011a0e8 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_0.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_0.png
index 22aea9d..7419be9 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_0.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_signal_0.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 88df979..ddf4217 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 cbac90f..e237331 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 a085bf4..e074dd3 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 f104e1a..12abe5c 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 3f0a8df..8d84c6e 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 da0a281..0a42598 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 a6e8c21..08634e3 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 f6eeb1d..10f1d09 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 32ff8ff..1cbe239 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 1fca536..9507162 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 e5fe0b2..deb8c87 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 bf53c7c..7186579 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 2e97c3a..1aa2393 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 4684eaa..adafb2ca 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 0bff121..67e2e11 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 9836082..f47c63e 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 1877a28..2421050 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
new file mode 100644
index 0000000..cb4782e
--- /dev/null
+++ 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 d888704..0dc8a58 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 029f109..752c3f7 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 baa6d86..7a14016 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 633bfc8..af7f76d 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 6c46e32..2af3c24 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 dea0415..a4e0243 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 53d0915..16193e7 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 d1ee39b..780a511 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_0.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_0.png
new file mode 100644
index 0000000..42fdbe8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_0.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 ad0ba68..005c6c6 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 54236b43..a088e83 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 7d2218b..6c2deb2 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 152c428..fdb7a9b 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
new file mode 100644
index 0000000..7d9f032
--- /dev/null
+++ 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
new file mode 100644
index 0000000..896eacc
--- /dev/null
+++ 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
new file mode 100644
index 0000000..0224da1
--- /dev/null
+++ 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
new file mode 100644
index 0000000..fe28671
--- /dev/null
+++ 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 2836e4c..7a14016 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 01bbe33..af7f76d 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 b36c4c3..66c3b92 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 07f2012..a4e0243 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/drawable/qs_tile_background.xml b/packages/SystemUI/res/drawable/qs_tile_background.xml
new file mode 100644
index 0000000..83dadd8
--- /dev/null
+++ b/packages/SystemUI/res/drawable/qs_tile_background.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true">
+ <color android:color="#252725" />
+ </item>
+ <item>
+ <color android:color="#1B1D1B" />
+ </item>
+</selector>
diff --git a/packages/SystemUI/res/layout/quick_settings.xml b/packages/SystemUI/res/layout/quick_settings.xml
index d89f279..2dd3b9f 100644
--- a/packages/SystemUI/res/layout/quick_settings.xml
+++ b/packages/SystemUI/res/layout/quick_settings.xml
@@ -22,16 +22,20 @@
android:background="@drawable/notification_panel_bg"
>
<!-- TODO: Put into ScrollView -->
- <com.android.systemui.statusbar.phone.QuickSettingsContainerView
- android:id="@+id/quick_settings_container"
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingBottom="@dimen/quick_settings_container_padding"
- android:paddingLeft="@dimen/quick_settings_container_padding"
- android:paddingRight="@dimen/quick_settings_container_padding"
- android:animateLayoutChanges="true"
- android:columnCount="@integer/quick_settings_num_columns"
- />
+ android:layout_height="wrap_content">
+ <com.android.systemui.statusbar.phone.QuickSettingsContainerView
+ android:id="@+id/quick_settings_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/quick_settings_container_padding"
+ android:paddingLeft="@dimen/quick_settings_container_padding"
+ android:paddingRight="@dimen/quick_settings_container_padding"
+ android:animateLayoutChanges="true"
+ android:columnCount="@integer/quick_settings_num_columns"
+ />
+ </ScrollView>
<LinearLayout android:id="@+id/handle"
android:layout_width="match_parent"
android:layout_height="@dimen/close_handle_height"
diff --git a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
index 528121e..5f46e96 100644
--- a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
+++ b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
@@ -24,14 +24,17 @@
<ImageView
android:id="@+id/brightness_icon"
style="@style/SystemBarPanelSettingsIcon"
+ android:layout_gravity="center_vertical"
+ android:paddingRight="10dp"
android:src="@drawable/ic_sysbar_brightness"
/>
<com.android.systemui.statusbar.policy.ToggleSlider
android:id="@+id/brightness_slider"
android:layout_width="0dp"
- android:layout_height="match_parent"
+ android:layout_height="40dp"
android:layout_weight="1"
android:layout_marginRight="2dp"
+ android:layout_gravity="center_vertical"
systemui:text="@string/status_bar_settings_auto_brightness_label"
/>
</LinearLayout>
diff --git a/packages/SystemUI/res/layout/quick_settings_tile.xml b/packages/SystemUI/res/layout/quick_settings_tile.xml
index a571393..911f6a2 100644
--- a/packages/SystemUI/res/layout/quick_settings_tile.xml
+++ b/packages/SystemUI/res/layout/quick_settings_tile.xml
@@ -17,4 +17,4 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="@dimen/quick_settings_cell_height"
- android:background="#1B1D1B" />
\ No newline at end of file
+ android:background="@drawable/qs_tile_background" />
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/quick_settings_tile_brightness.xml b/packages/SystemUI/res/layout/quick_settings_tile_brightness.xml
index 7cae199..ac872e6 100644
--- a/packages/SystemUI/res/layout/quick_settings_tile_brightness.xml
+++ b/packages/SystemUI/res/layout/quick_settings_tile_brightness.xml
@@ -16,6 +16,7 @@
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/TextAppearance.QuickSettings.TileView"
+ android:id="@+id/brightness_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/packages/SystemUI/res/layout/quick_settings_tile_user.xml b/packages/SystemUI/res/layout/quick_settings_tile_user.xml
index 33d9a09..08e8e20 100644
--- a/packages/SystemUI/res/layout/quick_settings_tile_user.xml
+++ b/packages/SystemUI/res/layout/quick_settings_tile_user.xml
@@ -17,6 +17,12 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:src="@drawable/ic_qs_default_user"
+ android:scaleType="centerCrop"
+ />
<TextView
style="@style/TextAppearance.QuickSettings.TileView"
android:id="@+id/user_textview"
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index b65b013..cbd9957 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -409,6 +409,8 @@
<string name="quick_settings_battery_charged_label">Charged</string>
<!-- QuickSettings: Bluetooth [CHAR LIMIT=NONE] -->
<string name="quick_settings_bluetooth_label">Bluetooth</string>
+ <!-- QuickSettings: Bluetooth (Multiple) [CHAR LIMIT=NONE] -->
+ <string name="quick_settings_bluetooth_multiple_devices_label">Bluetooth (<xliff:g id="number">%d</xliff:g> Devices)</string>
<!-- QuickSettings: Brightness [CHAR LIMIT=NONE] -->
<string name="quick_settings_brightness_label">Brightness</string>
<!-- QuickSettings: Rotation Unlocked [CHAR LIMIT=NONE] -->
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
index cd33951..9c3756c 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
@@ -33,6 +33,7 @@
public class RecentsActivity extends Activity {
public static final String TOGGLE_RECENTS_INTENT = "com.android.systemui.TOGGLE_RECENTS";
public static final String CLOSE_RECENTS_INTENT = "com.android.systemui.CLOSE_RECENTS";
+ private static final String WAS_SHOWING = "was_showing";
private RecentsPanelView mRecentsPanel;
private IntentFilter mIntentFilter;
@@ -139,7 +140,10 @@
mRecentsPanel.setMinSwipeAlpha(
getResources().getInteger(R.integer.config_recent_item_min_alpha) / 100f);
- handleIntent(getIntent());
+ if (savedInstanceState == null ||
+ savedInstanceState.getBoolean(WAS_SHOWING)) {
+ handleIntent(getIntent());
+ }
mIntentFilter = new IntentFilter();
mIntentFilter.addAction(CLOSE_RECENTS_INTENT);
registerReceiver(mIntentReceiver, mIntentFilter);
@@ -147,6 +151,11 @@
}
@Override
+ protected void onSaveInstanceState(Bundle outState) {
+ outState.putBoolean(WAS_SHOWING, mRecentsPanel.isShowing());
+ }
+
+ @Override
protected void onDestroy() {
final SystemUIApplication app = (SystemUIApplication) getApplication();
final RecentTasksLoader recentTasksLoader = app.getRecentTasksLoader();
@@ -165,7 +174,7 @@
if (TOGGLE_RECENTS_INTENT.equals(intent.getAction())) {
if (mRecentsPanel != null) {
- if (mRecentsPanel.isShowing() && mForeground) {
+ if (mRecentsPanel.isShowing()) {
dismissAndGoBack();
} else {
final SystemUIApplication app = (SystemUIApplication) getApplication();
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 3a10155..9fb6d7c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
@@ -18,6 +18,7 @@
import android.app.Dialog;
import android.app.PendingIntent;
+import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -35,6 +36,7 @@
import android.hardware.display.WifiDisplay;
import android.hardware.display.WifiDisplayStatus;
import android.net.Uri;
+import android.os.Debug;
import android.provider.ContactsContract;
import android.provider.Settings;
import android.view.LayoutInflater;
@@ -51,6 +53,7 @@
import com.android.internal.view.RotationPolicy;
import com.android.systemui.R;
+import com.android.systemui.statusbar.phone.QuickSettingsModel.BrightnessState;
import com.android.systemui.statusbar.phone.QuickSettingsModel.RSSIState;
import com.android.systemui.statusbar.phone.QuickSettingsModel.State;
import com.android.systemui.statusbar.phone.QuickSettingsModel.UserState;
@@ -63,6 +66,7 @@
import java.util.ArrayList;
import java.util.Comparator;
+import java.util.Set;
/**
@@ -80,6 +84,7 @@
private WifiDisplayListAdapter mWifiDisplayListAdapter;
private BrightnessController mBrightnessController;
+ private BluetoothController mBluetoothController;
private Dialog mBrightnessDialog;
private CursorLoader mUserInfoLoader;
@@ -116,10 +121,6 @@
IntentFilter filter = new IntentFilter();
filter.addAction(DisplayManager.ACTION_WIFI_DISPLAY_STATUS_CHANGED);
mContext.registerReceiver(mReceiver, filter);
-
- setupQuickSettings();
- updateWifiDisplayStatus();
- updateResources();
}
void setBar(PanelBar bar) {
@@ -132,6 +133,12 @@
void setup(NetworkController networkController, BluetoothController bluetoothController,
BatteryController batteryController, LocationController locationController) {
+ mBluetoothController = bluetoothController;
+
+ setupQuickSettings();
+ updateWifiDisplayStatus();
+ updateResources();
+
networkController.addNetworkSignalChangedCallback(mModel);
bluetoothController.addStateChangedCallback(mModel);
batteryController.addStateChangedCallback(mModel);
@@ -273,7 +280,7 @@
@Override
public void refreshView(QuickSettingsTileView view, State state) {
TextView tv = (TextView) view.findViewById(R.id.wifi_textview);
- tv.setCompoundDrawablesRelativeWithIntrinsicBounds(0, state.iconId, 0, 0);
+ tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0);
tv.setText(state.label);
}
});
@@ -329,7 +336,7 @@
@Override
public void refreshView(QuickSettingsTileView view, State state) {
TextView tv = (TextView) view.findViewById(R.id.rotation_lock_textview);
- tv.setCompoundDrawablesRelativeWithIntrinsicBounds(0, state.iconId, 0, 0);
+ tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0);
tv.setText(state.label);
}
});
@@ -381,7 +388,7 @@
@Override
public void refreshView(QuickSettingsTileView view, State state) {
TextView tv = (TextView) view.findViewById(R.id.airplane_mode_textview);
- tv.setCompoundDrawablesRelativeWithIntrinsicBounds(0, state.iconId, 0, 0);
+ tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0);
}
});
parent.addView(airplaneTile);
@@ -401,7 +408,27 @@
@Override
public void refreshView(QuickSettingsTileView view, State state) {
TextView tv = (TextView) view.findViewById(R.id.bluetooth_textview);
- tv.setCompoundDrawablesRelativeWithIntrinsicBounds(0, state.iconId, 0, 0);
+ tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0);
+
+ Resources r = mContext.getResources();
+ String label = null;
+ /*
+ //TODO: Show connected bluetooth device label
+ Set<BluetoothDevice> btDevices =
+ mBluetoothController.getBondedBluetoothDevices();
+ if (btDevices.size() == 1) {
+ // Show the name of the bluetooth device you are connected to
+ label = btDevices.iterator().next().getName();
+ } else if (btDevices.size() > 1) {
+ // Show a generic label about the number of bluetooth devices
+ label = r.getString(R.string.quick_settings_bluetooth_multiple_devices_label,
+ btDevices.size());
+ }
+ */
+ if (label == null) {
+ label = r.getString(R.string.quick_settings_bluetooth_label);
+ }
+ tv.setText(label);
}
});
parent.addView(bluetoothTile);
@@ -414,11 +441,17 @@
brightnessTile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- // startSettingsActivity(android.provider.Settings.ACTION_DISPLAY_SETTINGS);
mBar.collapseAllPanels(true);
showBrightnessDialog();
}
});
+ mModel.addBrightnessTile(brightnessTile, new QuickSettingsModel.RefreshCallback() {
+ @Override
+ public void refreshView(QuickSettingsTileView view, State state) {
+ TextView tv = (TextView) view.findViewById(R.id.brightness_textview);
+ tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0);
+ }
+ });
parent.addView(brightnessTile);
}
@@ -529,6 +562,7 @@
mBrightnessController = new BrightnessController(mContext,
(ToggleSlider) mBrightnessDialog.findViewById(R.id.brightness_slider));
+ mBrightnessController.addStateChangedCallback(mModel);
mBrightnessDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
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 f239110..485b3e5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
@@ -39,6 +39,7 @@
import com.android.internal.view.RotationPolicy;
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
+import com.android.systemui.statusbar.policy.BrightnessController.BrightnessStateChangeCallback;
import com.android.systemui.statusbar.policy.LocationController.LocationGpsStateChangeCallback;
import com.android.systemui.statusbar.policy.NetworkController.NetworkSignalChangedCallback;
@@ -48,7 +49,8 @@
class QuickSettingsModel implements BluetoothStateChangeCallback,
NetworkSignalChangedCallback,
BatteryStateChangeCallback,
- LocationGpsStateChangeCallback {
+ LocationGpsStateChangeCallback,
+ BrightnessStateChangeCallback {
/** Represents the state of a given attribute. */
static class State {
@@ -67,6 +69,9 @@
static class UserState extends State {
Drawable avatar;
}
+ static class BrightnessState extends State {
+ boolean autoBrightness;
+ }
/** The callback to update a given tile. */
interface RefreshCallback {
@@ -150,6 +155,10 @@
private RefreshCallback mRotationLockCallback;
private State mRotationLockState = new State();
+ private QuickSettingsTileView mBrightnessTile;
+ private RefreshCallback mBrightnessCallback;
+ private BrightnessState mBrightnessState = new BrightnessState();
+
public QuickSettingsModel(Context context) {
mContext = context;
mHandler = new Handler();
@@ -406,4 +415,23 @@
}
}
+ // Brightness
+ void addBrightnessTile(QuickSettingsTileView view, RefreshCallback cb) {
+ mBrightnessTile = view;
+ mBrightnessCallback = cb;
+ onBrightnessLevelChanged();
+ }
+ @Override
+ public void onBrightnessLevelChanged() {
+ int mode = Settings.System.getInt(mContext.getContentResolver(),
+ Settings.System.SCREEN_BRIGHTNESS_MODE,
+ Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
+ mBrightnessState.autoBrightness =
+ (mode == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
+ mBrightnessState.iconId = mBrightnessState.autoBrightness
+ ? R.drawable.ic_qs_brightness_auto_on
+ : R.drawable.ic_qs_brightness_auto_off;
+ mBrightnessCallback.refreshView(mBrightnessTile, mBrightnessState);
+ }
+
}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java
index e517dde..0567371 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java
@@ -18,6 +18,7 @@
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothAdapter.BluetoothStateChangeCallback;
+import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -25,10 +26,12 @@
import android.view.View;
import android.widget.ImageView;
-import java.util.ArrayList;
-
import com.android.systemui.R;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+
public class BluetoothController extends BroadcastReceiver {
private static final String TAG = "StatusBar.BluetoothController";
@@ -39,6 +42,8 @@
private int mContentDescriptionId = 0;
private boolean mEnabled = false;
+ private Set<BluetoothDevice> mBondedDevices = new HashSet<BluetoothDevice>();
+
private ArrayList<BluetoothStateChangeCallback> mChangeCallbacks =
new ArrayList<BluetoothStateChangeCallback>();
@@ -48,6 +53,7 @@
IntentFilter filter = new IntentFilter();
filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
+ filter.addAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED);
context.registerReceiver(this, filter);
final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
@@ -56,6 +62,7 @@
handleConnectionStateChange(adapter.getConnectionState());
}
refreshViews();
+ updateBondedBluetoothDevices();
}
public void addIconView(ImageView v) {
@@ -66,6 +73,10 @@
mChangeCallbacks.add(cb);
}
+ public Set<BluetoothDevice> getBondedBluetoothDevices() {
+ return mBondedDevices;
+ }
+
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
@@ -77,8 +88,25 @@
handleConnectionStateChange(
intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE,
BluetoothAdapter.STATE_DISCONNECTED));
+ } else if (action.equals(BluetoothDevice.ACTION_BOND_STATE_CHANGED)) {
+ // Fall through and update bonded devices and refresh view
}
refreshViews();
+ updateBondedBluetoothDevices();
+ }
+
+ private void updateBondedBluetoothDevices() {
+ Set<BluetoothDevice> devices = BluetoothAdapter.getDefaultAdapter().getBondedDevices();
+ if (devices != null) {
+ mBondedDevices.clear();
+ for (BluetoothDevice device : devices) {
+ if (device.getBondState() != BluetoothDevice.BOND_NONE) {
+ mBondedDevices.add(device);
+ }
+ }
+ } else {
+ mBondedDevices.clear();
+ }
}
public void handleAdapterStateChange(int adapterState) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
index 457e9dd..bb59420 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
@@ -29,6 +29,10 @@
import android.view.IWindowManager;
import android.widget.CompoundButton;
+import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
+
+import java.util.ArrayList;
+
public class BrightnessController implements ToggleSlider.Listener {
private static final String TAG = "StatusBar.BrightnessController";
@@ -39,6 +43,13 @@
private ToggleSlider mControl;
private IPowerManager mPower;
+ private ArrayList<BrightnessStateChangeCallback> mChangeCallbacks =
+ new ArrayList<BrightnessStateChangeCallback>();
+
+ public interface BrightnessStateChangeCallback {
+ public void onBrightnessLevelChanged();
+ }
+
public BrightnessController(Context context, ToggleSlider control) {
mContext = context;
mControl = control;
@@ -79,6 +90,10 @@
control.setOnChangedListener(this);
}
+ public void addStateChangedCallback(BrightnessStateChangeCallback cb) {
+ mChangeCallbacks.add(cb);
+ }
+
public void onChanged(ToggleSlider view, boolean tracking, boolean automatic, int value) {
setMode(automatic ? Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
: Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
@@ -94,6 +109,10 @@
});
}
}
+
+ for (BrightnessStateChangeCallback cb : mChangeCallbacks) {
+ cb.onBrightnessLevelChanged();
+ }
}
private void setMode(int mode) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 556ae59..ee82777 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -556,7 +556,8 @@
}
}
mPhoneSignalIconId = iconList[iconLevel];
- mQSPhoneSignalIconId = TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH[iconLevel];
+ mQSPhoneSignalIconId =
+ TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH[mInetCondition][iconLevel];
mContentDescriptionPhoneSignal = mContext.getString(
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[iconLevel]);
mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
@@ -863,7 +864,7 @@
private void updateWifiIcons() {
if (mWifiConnected) {
mWifiIconId = WifiIcons.WIFI_SIGNAL_STRENGTH[mInetCondition][mWifiLevel];
- mQSWifiIconId = WifiIcons.QS_WIFI_SIGNAL_STRENGTH[mWifiLevel];
+ mQSWifiIconId = WifiIcons.QS_WIFI_SIGNAL_STRENGTH[mInetCondition][mWifiLevel];
mContentDescriptionWifi = mContext.getString(
AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH[mWifiLevel]);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
index de9b218..3b953a0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
@@ -35,12 +35,17 @@
R.drawable.stat_sys_signal_4_fully }
};
- static final int[] QS_TELEPHONY_SIGNAL_STRENGTH = {
- R.drawable.ic_qs_signal_0,
+ static final int[][] QS_TELEPHONY_SIGNAL_STRENGTH = {
+ { R.drawable.ic_qs_signal_0,
R.drawable.ic_qs_signal_1,
R.drawable.ic_qs_signal_2,
R.drawable.ic_qs_signal_3,
- R.drawable.ic_qs_signal_4
+ R.drawable.ic_qs_signal_4 },
+ { R.drawable.ic_qs_signal_full_0,
+ R.drawable.ic_qs_signal_full_1,
+ R.drawable.ic_qs_signal_full_2,
+ R.drawable.ic_qs_signal_full_3,
+ R.drawable.ic_qs_signal_full_4 }
};
static final int[][] TELEPHONY_SIGNAL_STRENGTH_ROAMING = {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java
index f5d6484..8cc0338 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java
@@ -32,12 +32,17 @@
R.drawable.stat_sys_wifi_signal_4_fully }
};
- static final int[] QS_WIFI_SIGNAL_STRENGTH = {
- R.drawable.ic_qs_wifi_not_connected,
+ static final int[][] QS_WIFI_SIGNAL_STRENGTH = {
+ { R.drawable.ic_qs_wifi_0,
R.drawable.ic_qs_wifi_1,
R.drawable.ic_qs_wifi_2,
R.drawable.ic_qs_wifi_3,
- R.drawable.ic_qs_wifi_4
+ R.drawable.ic_qs_wifi_4 },
+ { R.drawable.ic_qs_wifi_0,
+ R.drawable.ic_qs_wifi_full_1,
+ R.drawable.ic_qs_wifi_full_2,
+ R.drawable.ic_qs_wifi_full_3,
+ R.drawable.ic_qs_wifi_full_4 }
};
static final int WIFI_LEVEL_COUNT = WIFI_SIGNAL_STRENGTH[0].length;
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
index 8fe28a3..47ec243 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
@@ -667,8 +667,12 @@
private void addWidget(int appId) {
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
AppWidgetProviderInfo appWidgetInfo = appWidgetManager.getAppWidgetInfo(appId);
- AppWidgetHostView view = getAppWidgetHost().createView(mContext, appId, appWidgetInfo);
- addWidget(view);
+ if (appWidgetInfo != null) {
+ AppWidgetHostView view = getAppWidgetHost().createView(mContext, appId, appWidgetInfo);
+ addWidget(view);
+ } else {
+ Log.w(TAG, "AppWidgetInfo was null; not adding widget id " + appId);
+ }
}
private void maybePopulateWidgets() {
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSubdivisionLayout.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSubdivisionLayout.java
index b7d94a9..1cd796c 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSubdivisionLayout.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSubdivisionLayout.java
@@ -97,12 +97,14 @@
leafs.clear();
getLeafs(leafs, 1);
- // We find the first leaf who's depth is not
+ // If the tree is complete, then we start a new level at the rightmost side.
double r = log2(leafs.size());
if (Math.ceil(r) == Math.floor(r)) {
return leafs.get(leafs.size() - 1);
}
+ // Tree is not complete, find the first leaf who's depth is less than the depth of
+ // the tree.
int treeDepth = depth();
for (int i = leafs.size() - 1; i >= 0; i--) {
BiTree n = leafs.get(i);
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java
index f957753..70a6ffa 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java
@@ -91,7 +91,14 @@
mForegroundAlpha = (int) Math.round((r * 255));
mForegroundDrawable.setAlpha(mForegroundAlpha);
+ if (getLayerType() != LAYER_TYPE_HARDWARE) {
+ setLayerType(LAYER_TYPE_HARDWARE, null);
+ }
invalidate();
+ } else {
+ if (getLayerType() != LAYER_TYPE_NONE) {
+ setLayerType(LAYER_TYPE_NONE, null);
+ }
}
}
}
diff --git a/services/java/com/android/server/AlarmManagerService.java b/services/java/com/android/server/AlarmManagerService.java
index f4ad756..f960833 100644
--- a/services/java/com/android/server/AlarmManagerService.java
+++ b/services/java/com/android/server/AlarmManagerService.java
@@ -353,7 +353,7 @@
while (it.hasNext()) {
Alarm alarm = it.next();
- if (UserHandle.getUserId(alarm.operation.getTargetUid()) == userHandle) {
+ if (UserHandle.getUserId(alarm.operation.getCreatorUid()) == userHandle) {
it.remove();
}
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 989477f..ce5424b 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -1794,7 +1794,7 @@
}
private final void updateLruProcessInternalLocked(ProcessRecord app,
- boolean oomAdj, boolean updateActivityTime, int bestPos) {
+ boolean updateActivityTime, int bestPos) {
// put it on the LRU to keep track of when it should be exited.
int lrui = mLruProcesses.indexOf(app);
if (lrui >= 0) mLruProcesses.remove(lrui);
@@ -1851,7 +1851,7 @@
if (cr.binding != null && cr.binding.service != null
&& cr.binding.service.app != null
&& cr.binding.service.app.lruSeq != mLruSeq) {
- updateLruProcessInternalLocked(cr.binding.service.app, false,
+ updateLruProcessInternalLocked(cr.binding.service.app,
updateActivityTime, i+1);
}
}
@@ -1859,21 +1859,21 @@
for (int j=app.conProviders.size()-1; j>=0; j--) {
ContentProviderRecord cpr = app.conProviders.get(j).provider;
if (cpr.proc != null && cpr.proc.lruSeq != mLruSeq) {
- updateLruProcessInternalLocked(cpr.proc, false,
+ updateLruProcessInternalLocked(cpr.proc,
updateActivityTime, i+1);
}
}
-
- //Slog.i(TAG, "Putting proc to front: " + app.processName);
- if (oomAdj) {
- updateOomAdjLocked();
- }
}
final void updateLruProcessLocked(ProcessRecord app,
boolean oomAdj, boolean updateActivityTime) {
mLruSeq++;
- updateLruProcessInternalLocked(app, oomAdj, updateActivityTime, 0);
+ updateLruProcessInternalLocked(app, updateActivityTime, 0);
+
+ //Slog.i(TAG, "Putting proc to front: " + app.processName);
+ if (oomAdj) {
+ updateOomAdjLocked();
+ }
}
final ProcessRecord getProcessRecordLocked(
@@ -4455,7 +4455,13 @@
enableScreenAfterBoot();
}
}
-
+
+ public final void activityResumed(IBinder token) {
+ final long origId = Binder.clearCallingIdentity();
+ mMainStack.activityResumed(token);
+ Binder.restoreCallingIdentity(origId);
+ }
+
public final void activityPaused(IBinder token) {
final long origId = Binder.clearCallingIdentity();
mMainStack.activityPaused(token, false);
@@ -11432,7 +11438,7 @@
// Add the new results to the existing results, tracking
// and de-dupping single user receivers.
for (int i=0; i<newReceivers.size(); i++) {
- ResolveInfo ri = receivers.get(i);
+ ResolveInfo ri = newReceivers.get(i);
if ((ri.activityInfo.flags&ActivityInfo.FLAG_SINGLE_USER) != 0) {
ComponentName cn = new ComponentName(
ri.activityInfo.packageName, ri.activityInfo.name);
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index f72d318..29ee0bc 100755
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -52,7 +52,6 @@
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.PowerManager;
-import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -755,8 +754,6 @@
completeResumeLocked(r);
checkReadyForSleepLocked();
if (DEBUG_SAVED_STATE) Slog.i(TAG, "Launch completed; removing icicle of " + r.icicle);
- r.icicle = null;
- r.haveState = false;
} else {
// This activity is not starting in the resumed state... which
// should look like we asked it to pause+stop (but remain visible),
@@ -1010,7 +1007,21 @@
resumeTopActivityLocked(null);
}
}
-
+
+ final void activityResumed(IBinder token) {
+ ActivityRecord r = null;
+
+ synchronized (mService) {
+ int index = indexOfTokenLocked(token);
+ if (index >= 0) {
+ r = mHistory.get(index);
+ if (DEBUG_SAVED_STATE) Slog.i(TAG, "Resumed activity; dropping state of: " + r);
+ r.icicle = null;
+ r.haveState = false;
+ }
+ }
+ }
+
final void activityPaused(IBinder token, boolean timeout) {
if (DEBUG_PAUSE) Slog.v(
TAG, "Activity paused: token=" + token + ", timeout=" + timeout);
@@ -1488,6 +1499,15 @@
// can be resumed...
if (mResumedActivity != null) {
if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: need to start pausing");
+ // At this point we want to put the upcoming activity's process
+ // at the top of the LRU list, since we know we will be needing it
+ // very soon and it would be a waste to let it get killed if it
+ // happens to be sitting towards the end.
+ if (next.app != null && next.app.thread != null) {
+ // No reason to do full oom adj update here; we'll let that
+ // happen whenever it needs to later.
+ mService.updateLruProcessLocked(next.app, false, true);
+ }
startPausingLocked(userLeaving, false);
return true;
}
@@ -1728,11 +1748,6 @@
"resume-exception", true);
return true;
}
-
- // Didn't need to use the icicle, and it is now out of date.
- if (DEBUG_SAVED_STATE) Slog.i(TAG, "Resumed activity; didn't need icicle of: " + next);
- next.icicle = null;
- next.haveState = false;
next.stopped = false;
} else {
@@ -2578,7 +2593,6 @@
mDismissKeyguardOnNextActivity = false;
mService.mWindowManager.dismissKeyguard();
}
- Slog.i(TAG, "DONE STARTING!");
return err;
}
diff --git a/services/java/com/android/server/am/BroadcastQueue.java b/services/java/com/android/server/am/BroadcastQueue.java
index 1b6ff7a..b0af081 100644
--- a/services/java/com/android/server/am/BroadcastQueue.java
+++ b/services/java/com/android/server/am/BroadcastQueue.java
@@ -965,12 +965,12 @@
if (!printed) {
if (needSep) {
pw.println();
- needSep = false;
}
+ needSep = true;
printed = true;
pw.println(" Active broadcasts [" + mQueueName + "]:");
}
- pw.println(" Broadcast #" + i + ":");
+ pw.println(" Active Broadcast " + mQueueName + " #" + i + ":");
br.dump(pw, " ");
}
printed = false;
@@ -985,9 +985,10 @@
pw.println();
}
needSep = true;
+ printed = true;
pw.println(" Active ordered broadcasts [" + mQueueName + "]:");
}
- pw.println(" Ordered Broadcast #" + i + ":");
+ pw.println(" Active Ordered Broadcast " + mQueueName + " #" + i + ":");
mOrderedBroadcasts.get(i).dump(pw, " ");
}
if (dumpPackage == null || (mPendingBroadcast != null
@@ -1023,7 +1024,8 @@
printed = true;
}
if (dumpAll) {
- pw.print(" Historical Broadcast #"); pw.print(i); pw.println(":");
+ pw.print(" Historical Broadcast " + mQueueName + " #");
+ pw.print(i); pw.println(":");
r.dump(pw, " ");
} else {
if (i >= 50) {
diff --git a/services/java/com/android/server/display/WifiDisplayController.java b/services/java/com/android/server/display/WifiDisplayController.java
index 141cbd7..87e11e6 100644
--- a/services/java/com/android/server/display/WifiDisplayController.java
+++ b/services/java/com/android/server/display/WifiDisplayController.java
@@ -129,6 +129,9 @@
// True if RTSP has connected.
private boolean mRemoteDisplayConnected;
+ // True if the remote submix is enabled.
+ private boolean mRemoteSubmixOn;
+
public WifiDisplayController(Context context, Handler handler, Listener listener) {
mContext = context;
mHandler = handler;
@@ -160,6 +163,7 @@
pw.println("mRemoteDisplay=" + mRemoteDisplay);
pw.println("mRemoteDisplayInterface=" + mRemoteDisplayInterface);
pw.println("mRemoteDisplayConnected=" + mRemoteDisplayConnected);
+ pw.println("mRemoteSubmixOn=" + mRemoteSubmixOn);
pw.println("mKnownWifiDisplayPeers: size=" + mKnownWifiDisplayPeers.size());
for (WifiP2pDevice device : mKnownWifiDisplayPeers) {
@@ -390,16 +394,14 @@
Slog.i(TAG, "Stopped listening for RTSP connection on " + mRemoteDisplayInterface
+ " from Wifi display: " + mConnectedDevice.deviceName);
- if (mRemoteDisplayConnected) {
- mAudioManager.setRemoteSubmixOn(false, REMOTE_SUBMIX_ADDRESS);
- }
-
mRemoteDisplay.dispose();
mRemoteDisplay = null;
mRemoteDisplayInterface = null;
mRemoteDisplayConnected = false;
mHandler.removeCallbacks(mRtspTimeout);
+ setRemoteSubmixOn(false);
+
mHandler.post(new Runnable() {
@Override
public void run() {
@@ -527,6 +529,8 @@
return; // done
}
+ setRemoteSubmixOn(true);
+
final WifiP2pDevice oldDevice = mConnectedDevice;
final int port = getPortNumber(mConnectedDevice);
final String iface = addr.getHostAddress() + ":" + port;
@@ -545,8 +549,6 @@
mRemoteDisplayConnected = true;
mHandler.removeCallbacks(mRtspTimeout);
- mAudioManager.setRemoteSubmixOn(true, REMOTE_SUBMIX_ADDRESS);
-
final WifiDisplay display = createWifiDisplay(mConnectedDevice);
mHandler.post(new Runnable() {
@Override
@@ -583,6 +585,13 @@
}
}
+ private void setRemoteSubmixOn(boolean on) {
+ if (mRemoteSubmixOn != on) {
+ mRemoteSubmixOn = on;
+ mAudioManager.setRemoteSubmixOn(on, REMOTE_SUBMIX_ADDRESS);
+ }
+ }
+
private void handleStateChanged(boolean enabled) {
if (mWifiP2pEnabled != enabled) {
mWifiP2pEnabled = enabled;
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index ce52d2b..536c612 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -3535,8 +3535,8 @@
return DEX_OPT_DEFERRED;
} else {
Log.i(TAG, "Running dexopt on: " + pkg.applicationInfo.packageName);
- ret = mInstaller.dexopt(path, pkg.applicationInfo.uid,
- !isForwardLocked(pkg));
+ final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
+ ret = mInstaller.dexopt(path, sharedGid, !isForwardLocked(pkg));
pkg.mDidDexOpt = true;
performed = true;
}
diff --git a/services/java/com/android/server/pm/UserManagerService.java b/services/java/com/android/server/pm/UserManagerService.java
index 914ff67..be86628 100644
--- a/services/java/com/android/server/pm/UserManagerService.java
+++ b/services/java/com/android/server/pm/UserManagerService.java
@@ -29,6 +29,8 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.os.Binder;
import android.os.Environment;
import android.os.FileUtils;
@@ -188,30 +190,35 @@
writeUserLocked(info);
}
}
+ sendUserInfoChangedBroadcast(userId);
}
@Override
- public ParcelFileDescriptor setUserIcon(int userId) {
+ public void setUserIcon(int userId, Bitmap bitmap) {
checkManageUsersPermission("update users");
synchronized (mPackagesLock) {
UserInfo info = mUsers.get(userId);
- if (info == null) return null;
- ParcelFileDescriptor fd = openIconBitmapLocked(info, true /* write */);
- if (fd != null) {
- writeUserLocked(info);
- }
- return fd;
+ if (info == null) return;
+ writeBitmapLocked(info, bitmap);
+ writeUserLocked(info);
}
+ sendUserInfoChangedBroadcast(userId);
+ }
+
+ private void sendUserInfoChangedBroadcast(int userId) {
+ Intent changedIntent = new Intent(Intent.ACTION_USER_INFO_CHANGED);
+ changedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
+ changedIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+ mContext.sendBroadcastAsUser(changedIntent, new UserHandle(userId));
}
@Override
- public ParcelFileDescriptor getUserIcon(int userId) {
+ public Bitmap getUserIcon(int userId) {
checkManageUsersPermission("read users");
synchronized (mPackagesLock) {
UserInfo info = mUsers.get(userId);
if (info == null || info.iconPath == null) return null;
- ParcelFileDescriptor fd = openIconBitmapLocked(info, false /* read */);
- return fd;
+ return BitmapFactory.decodeFile(info.iconPath);
}
}
@@ -289,7 +296,7 @@
}
}
- private ParcelFileDescriptor openIconBitmapLocked(UserInfo info, boolean toWrite) {
+ private void writeBitmapLocked(UserInfo info, Bitmap bitmap) {
try {
File dir = new File(mUsersDir, Integer.toString(info.id));
File file = new File(dir, USER_PHOTO_FILENAME);
@@ -300,16 +307,18 @@
FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH,
-1, -1);
}
- ParcelFileDescriptor fd = ParcelFileDescriptor.open(file,
- toWrite ? MODE_CREATE|MODE_READ_WRITE : MODE_READ_WRITE);
- if (toWrite) {
+ FileOutputStream os;
+ if (bitmap.compress(Bitmap.CompressFormat.PNG, 100, os = new FileOutputStream(file))) {
info.iconPath = file.getAbsolutePath();
}
- return fd;
+ try {
+ os.close();
+ } catch (IOException ioe) {
+ // What the ... !
+ }
} catch (FileNotFoundException e) {
Slog.w(LOG_TAG, "Error setting photo for user ", e);
}
- return null;
}
/**
@@ -701,7 +710,7 @@
*/
private int getNextAvailableIdLocked() {
synchronized (mPackagesLock) {
- int i = 0;
+ int i = 10;
while (i < Integer.MAX_VALUE) {
if (mUsers.indexOfKey(i) < 0) {
break;
diff --git a/services/java/com/android/server/updatable/ConfigUpdateInstallReceiver.java b/services/java/com/android/server/updatable/ConfigUpdateInstallReceiver.java
index c1f45a8..a74a648 100644
--- a/services/java/com/android/server/updatable/ConfigUpdateInstallReceiver.java
+++ b/services/java/com/android/server/updatable/ConfigUpdateInstallReceiver.java
@@ -89,12 +89,15 @@
// get the hash of the currently used value
String currentHash = getCurrentHash(getCurrentContent());
if (!verifyVersion(currentVersion, altVersion)) {
- Slog.e(TAG, "New version is not greater than current version, aborting!");
+ EventLog.writeEvent(EventLogTags.CONFIG_INSTALL_FAILED,
+ "New version is not greater than current version");
} else if (!verifyPreviousHash(currentHash, altRequiredHash)) {
- Slog.e(TAG, "Current hash did not match required value, aborting!");
+ EventLog.writeEvent(EventLogTags.CONFIG_INSTALL_FAILED,
+ "Current hash did not match required value");
} else if (!verifySignature(altContent, altVersion, altRequiredHash, altSig,
cert)) {
- Slog.e(TAG, "Signature did not verify, aborting!");
+ EventLog.writeEvent(EventLogTags.CONFIG_INSTALL_FAILED,
+ "Signature did not verify");
} else {
// install the new content
Slog.i(TAG, "Found new update, installing...");
@@ -103,8 +106,12 @@
}
} catch (Exception e) {
Slog.e(TAG, "Could not update content!", e);
- EventLog.writeEvent(EventLogTags.CONFIG_INSTALL_FAILED,
- updateDir.toString());
+ // keep the error message <= 100 chars
+ String errMsg = e.toString();
+ if (errMsg.length() > 100) {
+ errMsg = errMsg.substring(0, 99);
+ }
+ EventLog.writeEvent(EventLogTags.CONFIG_INSTALL_FAILED, errMsg);
}
}
}.start();
diff --git a/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java b/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
index e39d53c..5e27ba7 100644
--- a/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
+++ b/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
@@ -72,6 +72,7 @@
try {
processName = startApp(app);
measureMemory(app, processName, results);
+ closeApp();
} catch (NameNotFoundException e) {
Log.i(TAG, "Application " + app + " not found");
}
@@ -139,13 +140,22 @@
return process;
}
+ private void closeApp() {
+ Intent homeIntent = new Intent(Intent.ACTION_MAIN);
+ homeIntent.addCategory(Intent.CATEGORY_HOME);
+ homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+ getInstrumentation().getContext().startActivity(homeIntent);
+ sleep(3000);
+ }
+
private void measureMemory(String appName, String processName,
Bundle results) {
List<Integer> pssData = new ArrayList<Integer>();
int pss = 0;
int iteration = 0;
while (iteration < MAX_ITERATIONS) {
- sleep();
+ sleep(SLEEP_TIME);
pss = getPss(processName);
Log.i(TAG, appName + "=" + pss);
if (pss < 0) {
@@ -184,9 +194,9 @@
return (diff1 + diff2) < THRESHOLD;
}
- private void sleep() {
+ private void sleep(int time) {
try {
- Thread.sleep(SLEEP_TIME);
+ Thread.sleep(time);
} catch (InterruptedException e) {
// ignore
}
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 9fe1c60..4aa092b 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -75,6 +75,7 @@
import android.util.Log;
import android.util.LruCache;
+import com.android.internal.R;
import com.android.internal.app.IBatteryStats;
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
@@ -112,6 +113,7 @@
private ConnectivityManager mCm;
private final boolean mP2pSupported;
+ private final AtomicBoolean mP2pConnected = new AtomicBoolean(false);
private final String mPrimaryDeviceType;
/* Scan results handling */
@@ -595,16 +597,16 @@
mScanIntent = PendingIntent.getBroadcast(mContext, SCAN_REQUEST, scanIntent, 0);
mDefaultFrameworkScanIntervalMs = mContext.getResources().getInteger(
- com.android.internal.R.integer.config_wifi_framework_scan_interval);
+ R.integer.config_wifi_framework_scan_interval);
mDriverStopDelayMs = mContext.getResources().getInteger(
- com.android.internal.R.integer.config_wifi_driver_stop_delay);
+ R.integer.config_wifi_driver_stop_delay);
mBackgroundScanSupported = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_wifi_background_scan_support);
+ R.bool.config_wifi_background_scan_support);
mPrimaryDeviceType = mContext.getResources().getString(
- com.android.internal.R.string.config_wifi_p2p_device_type);
+ R.string.config_wifi_p2p_device_type);
mUserWantsSuspendOpt.set(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED, 1) == 1);
@@ -2011,6 +2013,10 @@
replyToMessage(message, WifiManager.RSSI_PKTCNT_FETCH_FAILED,
WifiManager.BUSY);
break;
+ case WifiP2pService.P2P_CONNECTION_CHANGED:
+ NetworkInfo info = (NetworkInfo) message.obj;
+ mP2pConnected.set(info.isConnected());
+ break;
default:
loge("Error! unhandled message" + message);
break;
@@ -2408,7 +2414,7 @@
mNetworkInfo.setIsAvailable(true);
int defaultInterval = mContext.getResources().getInteger(
- com.android.internal.R.integer.config_wifi_supplicant_scan_interval);
+ R.integer.config_wifi_supplicant_scan_interval);
mSupplicantScanIntervalMs = Settings.Global.getLong(mContext.getContentResolver(),
Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS,
@@ -3486,7 +3492,7 @@
* The scans are useful to notify the user of the presence of an open network.
* Note that these are not wake up scans.
*/
- if (mWifiConfigStore.getConfiguredNetworks().size() == 0) {
+ if (!mP2pConnected.get() && mWifiConfigStore.getConfiguredNetworks().size() == 0) {
sendMessageDelayed(obtainMessage(CMD_NO_NETWORKS_PERIODIC_SCAN,
++mPeriodicScanToken, 0), mSupplicantScanIntervalMs);
}
@@ -3497,6 +3503,7 @@
boolean ret = HANDLED;
switch (message.what) {
case CMD_NO_NETWORKS_PERIODIC_SCAN:
+ if (mP2pConnected.get()) break;
if (message.arg1 == mPeriodicScanToken &&
mWifiConfigStore.getConfiguredNetworks().size() == 0) {
sendMessage(CMD_START_SCAN);
@@ -3557,6 +3564,21 @@
/* Handled in parent state */
ret = NOT_HANDLED;
break;
+ case WifiP2pService.P2P_CONNECTION_CHANGED:
+ NetworkInfo info = (NetworkInfo) message.obj;
+ mP2pConnected.set(info.isConnected());
+ if (mP2pConnected.get()) {
+ int defaultInterval = mContext.getResources().getInteger(
+ R.integer.config_wifi_scan_interval_p2p_connected);
+ long scanIntervalMs = Settings.Global.getLong(mContext.getContentResolver(),
+ Settings.Global.WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS,
+ defaultInterval);
+ mWifiNative.setScanInterval((int) scanIntervalMs/1000);
+ } else if (mWifiConfigStore.getConfiguredNetworks().size() == 0) {
+ if (DBG) log("Turn on scanning after p2p disconnected");
+ sendMessageDelayed(obtainMessage(CMD_NO_NETWORKS_PERIODIC_SCAN,
+ ++mPeriodicScanToken, 0), mSupplicantScanIntervalMs);
+ }
default:
ret = NOT_HANDLED;
}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index edd1dac..35dd764 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -137,18 +137,6 @@
/* Idle time after a peer is gone when the group is torn down */
private static final int GROUP_IDLE_TIME_S = 5;
- /**
- * Delay between restarts upon failure to setup connection with supplicant
- */
- private static final int P2P_RESTART_INTERVAL_MSECS = 5000;
-
- /**
- * Number of times we attempt to restart p2p
- */
- private static final int P2P_RESTART_TRIES = 5;
-
- private int mP2pRestartCount = 0;
-
private static final int BASE = Protocol.BASE_WIFI_P2P_SERVICE;
/* Delayed message to timeout group creation */
@@ -159,6 +147,9 @@
/* User rejected a peer request */
private static final int PEER_CONNECTION_USER_REJECT = BASE + 3;
+ /* Commands to the WifiStateMachine */
+ public static final int P2P_CONNECTION_CHANGED = BASE + 11;
+
private final boolean mP2pSupported;
private WifiP2pDevice mThisDevice = new WifiP2pDevice();
@@ -1597,6 +1588,8 @@
intent.putExtra(WifiP2pManager.EXTRA_WIFI_P2P_INFO, new WifiP2pInfo(mWifiP2pInfo));
intent.putExtra(WifiP2pManager.EXTRA_NETWORK_INFO, new NetworkInfo(mNetworkInfo));
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
+ mWifiChannel.sendMessage(WifiP2pService.P2P_CONNECTION_CHANGED,
+ new NetworkInfo(mNetworkInfo));
}
private void sendP2pPersistentGroupsChangedBroadcast() {