Merge "UsbDebuggingManager: remove log spam when disconnecting USB"
diff --git a/api/current.txt b/api/current.txt
index 1622f21..865d219 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -8403,7 +8403,7 @@
field public static final java.lang.String FEATURE_LOCATION = "android.hardware.location";
field public static final java.lang.String FEATURE_LOCATION_GPS = "android.hardware.location.gps";
field public static final java.lang.String FEATURE_LOCATION_NETWORK = "android.hardware.location.network";
- field public static final java.lang.String FEATURE_MANAGEDPROFILES = "android.software.managedprofiles";
+ field public static final java.lang.String FEATURE_MANAGED_PROFILES = "android.software.managed_profiles";
field public static final java.lang.String FEATURE_MICROPHONE = "android.hardware.microphone";
field public static final java.lang.String FEATURE_NFC = "android.hardware.nfc";
field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
@@ -23011,16 +23011,6 @@
field public static final deprecated android.net.Uri DELETED_CONTENT_URI;
field public static final deprecated java.lang.String GROUP_ANDROID_STARRED = "Starred in Android";
field public static final deprecated java.lang.String GROUP_MY_CONTACTS = "Contacts";
- field public static final java.lang.String NON_SYNCABLE_ACCOUNT = "non_syncable";
- field public static final java.lang.String NON_SYNCABLE_ACCOUNT_TYPE = "android.local";
- field public static final java.lang.String _SYNC_ACCOUNT = "_sync_account";
- field public static final java.lang.String _SYNC_ACCOUNT_TYPE = "_sync_account_type";
- field public static final java.lang.String _SYNC_DIRTY = "_sync_dirty";
- field public static final java.lang.String _SYNC_ID = "_sync_id";
- field public static final java.lang.String _SYNC_LOCAL_ID = "_sync_local_id";
- field public static final java.lang.String _SYNC_MARK = "_sync_mark";
- field public static final java.lang.String _SYNC_TIME = "_sync_time";
- field public static final java.lang.String _SYNC_VERSION = "_sync_version";
}
public static abstract deprecated interface Contacts.GroupsColumns {
@@ -23122,19 +23112,9 @@
field public static final deprecated android.net.Uri CONTENT_URI;
field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "name ASC";
field public static final deprecated android.net.Uri DELETED_CONTENT_URI;
- field public static final java.lang.String NON_SYNCABLE_ACCOUNT = "non_syncable";
- field public static final java.lang.String NON_SYNCABLE_ACCOUNT_TYPE = "android.local";
field public static final deprecated java.lang.String PRIMARY_EMAIL_ID = "primary_email";
field public static final deprecated java.lang.String PRIMARY_ORGANIZATION_ID = "primary_organization";
field public static final deprecated java.lang.String PRIMARY_PHONE_ID = "primary_phone";
- field public static final java.lang.String _SYNC_ACCOUNT = "_sync_account";
- field public static final java.lang.String _SYNC_ACCOUNT_TYPE = "_sync_account_type";
- field public static final java.lang.String _SYNC_DIRTY = "_sync_dirty";
- field public static final java.lang.String _SYNC_ID = "_sync_id";
- field public static final java.lang.String _SYNC_LOCAL_ID = "_sync_local_id";
- field public static final java.lang.String _SYNC_MARK = "_sync_mark";
- field public static final java.lang.String _SYNC_TIME = "_sync_time";
- field public static final java.lang.String _SYNC_VERSION = "_sync_version";
}
public static final deprecated class Contacts.People.ContactMethods implements android.provider.BaseColumns android.provider.Contacts.ContactMethodsColumns android.provider.Contacts.PeopleColumns {
@@ -23197,16 +23177,6 @@
field public static final deprecated java.lang.String CONTENT_DIRECTORY = "photo";
field public static final deprecated android.net.Uri CONTENT_URI;
field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "person ASC";
- field public static final java.lang.String NON_SYNCABLE_ACCOUNT = "non_syncable";
- field public static final java.lang.String NON_SYNCABLE_ACCOUNT_TYPE = "android.local";
- field public static final java.lang.String _SYNC_ACCOUNT = "_sync_account";
- field public static final java.lang.String _SYNC_ACCOUNT_TYPE = "_sync_account_type";
- field public static final java.lang.String _SYNC_DIRTY = "_sync_dirty";
- field public static final java.lang.String _SYNC_ID = "_sync_id";
- field public static final java.lang.String _SYNC_LOCAL_ID = "_sync_local_id";
- field public static final java.lang.String _SYNC_MARK = "_sync_mark";
- field public static final java.lang.String _SYNC_TIME = "_sync_time";
- field public static final java.lang.String _SYNC_VERSION = "_sync_version";
}
public static abstract deprecated interface Contacts.PhotosColumns {
@@ -23534,7 +23504,6 @@
protected static abstract interface ContactsContract.ContactOptionsColumns {
field public static final java.lang.String CUSTOM_RINGTONE = "custom_ringtone";
field public static final java.lang.String LAST_TIME_CONTACTED = "last_time_contacted";
- field public static final java.lang.String PINNED = "pinned";
field public static final java.lang.String SEND_TO_VOICEMAIL = "send_to_voicemail";
field public static final java.lang.String STARRED = "starred";
field public static final java.lang.String TIMES_CONTACTED = "times_contacted";
@@ -23812,15 +23781,6 @@
field public static final int UNDEFINED = 0; // 0x0
}
- public static final class ContactsContract.PinnedPositions {
- ctor public ContactsContract.PinnedPositions();
- field public static final int DEMOTED = -1; // 0xffffffff
- field public static final java.lang.String STAR_WHEN_PINNING = "star_when_pinning";
- field public static final java.lang.String UNDEMOTE = "undemote";
- field public static final int UNPINNED = 2147483647; // 0x7fffffff
- field public static final android.net.Uri UPDATE_URI;
- }
-
public static final class ContactsContract.Preferences {
ctor public ContactsContract.Preferences();
field public static final java.lang.String DISPLAY_ORDER = "android.contacts.DISPLAY_ORDER";
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java
index 097c64e..c29d75e 100644
--- a/core/java/android/app/ActivityView.java
+++ b/core/java/android/app/ActivityView.java
@@ -53,6 +53,7 @@
private int mHeight;
private Surface mSurface;
private int mLastVisibility;
+ private ActivityViewCallback mActivityViewCallback;
// Only one IIntentSender or Intent may be queued at a time. Most recent one wins.
IIntentSender mQueuedPendingIntent;
@@ -254,6 +255,25 @@
}
}
+ /**
+ * Set the callback to use to report certain state changes.
+ * @param callback The callback to report events to.
+ *
+ * @see ActivityViewCallback
+ */
+ public void setCallback(ActivityViewCallback callback) {
+ mActivityViewCallback = callback;
+ }
+
+ public static abstract class ActivityViewCallback {
+ /**
+ * Called when all activities in the ActivityView have completed and been removed. Register
+ * using {@link ActivityView#setCallback(ActivityViewCallback)}. Each ActivityView may
+ * have at most one callback registered.
+ */
+ public abstract void onAllActivitiesComplete(ActivityView view);
+ }
+
private class ActivityViewSurfaceTextureListener implements SurfaceTextureListener {
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width,
@@ -313,6 +333,22 @@
if (DEBUG) Log.v(TAG, "setVisible(): container=" + container + " visible=" + visible +
" ActivityView=" + mActivityViewWeakReference.get());
}
+
+ @Override
+ public void onAllActivitiesComplete(IBinder container) {
+ final ActivityView activityView = mActivityViewWeakReference.get();
+ if (activityView != null) {
+ final ActivityViewCallback callback = activityView.mActivityViewCallback;
+ if (callback != null) {
+ activityView.post(new Runnable() {
+ @Override
+ public void run() {
+ callback.onAllActivitiesComplete(activityView);
+ }
+ });
+ }
+ }
+ }
}
private static class ActivityContainerWrapper {
diff --git a/core/java/android/app/IActivityContainerCallback.aidl b/core/java/android/app/IActivityContainerCallback.aidl
index 7f6d2c3..99d0a6f 100644
--- a/core/java/android/app/IActivityContainerCallback.aidl
+++ b/core/java/android/app/IActivityContainerCallback.aidl
@@ -21,4 +21,5 @@
/** @hide */
interface IActivityContainerCallback {
oneway void setVisible(IBinder container, boolean visible);
+ oneway void onAllActivitiesComplete(IBinder container);
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 8dba1dc..5ac2a33 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -21,7 +21,10 @@
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
import android.graphics.PorterDuff;
+import android.graphics.drawable.Drawable;
import android.media.AudioManager;
import android.media.session.MediaSessionToken;
import android.net.Uri;
@@ -32,6 +35,7 @@
import android.os.Parcelable;
import android.os.SystemClock;
import android.os.UserHandle;
+import android.os.UserManager;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
@@ -2305,7 +2309,23 @@
return this;
}
+ private Bitmap getProfileBadge() {
+ UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
+ Drawable badge = userManager.getBadgeForUser(android.os.Process.myUserHandle());
+ if (badge == null) {
+ return null;
+ }
+ final int width = badge.getIntrinsicWidth();
+ final int height = badge.getIntrinsicHeight();
+ Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
+ Canvas canvas = new Canvas(bitmap);
+ badge.setBounds(0, 0, width, height);
+ badge.draw(canvas);
+ return bitmap;
+ }
+
private RemoteViews applyStandardTemplate(int resId, boolean fitIn1U) {
+ Bitmap profileIcon = getProfileBadge();
RemoteViews contentView = new RemoteViews(mContext.getPackageName(), resId);
boolean showLine3 = false;
boolean showLine2 = false;
@@ -2313,6 +2333,12 @@
if (mPriority < PRIORITY_LOW) {
// TODO: Low priority presentation
}
+ if (profileIcon != null) {
+ contentView.setImageViewBitmap(R.id.profile_icon, profileIcon);
+ contentView.setViewVisibility(R.id.profile_icon, View.VISIBLE);
+ } else {
+ contentView.setViewVisibility(R.id.profile_icon, View.GONE);
+ }
if (mLargeIcon != null) {
contentView.setImageViewBitmap(R.id.icon, mLargeIcon);
processLargeIcon(mLargeIcon, contentView);
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 31bf465..a34a1b6 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -1402,7 +1402,7 @@
* The device supports managed profiles for enterprise users.
*/
@SdkConstant(SdkConstantType.FEATURE)
- public static final String FEATURE_MANAGEDPROFILES = "android.software.managedprofiles";
+ public static final String FEATURE_MANAGED_PROFILES = "android.software.managed_profiles";
/**
* Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
@@ -1601,7 +1601,7 @@
* <p>
* Throws {@link NameNotFoundException} if a package with the given name
* cannot be found on the system.
- *
+ *
* @param packageName The name of the package to inspect.
* @return Returns either a fully-qualified Intent that can be used to launch
* the main Leanback activity in the package, or null if the package
@@ -1615,7 +1615,7 @@
* <p>
* Throws {@link NameNotFoundException} if a package with the given name
* cannot be found on the system.
- *
+ *
* @param packageName The full name (i.e. com.google.apps.contacts) of the
* desired package.
* @return Returns an int array of the assigned gids, or null if there are
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index ee219e3..f7a89ba 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -690,18 +690,47 @@
}
}
+ /**
+ * If the target user is a managed profile of the calling user or the caller
+ * is itself a managed profile, then this returns a drawable to use as a small
+ * icon to include in a view to distinguish it from the original icon.
+ *
+ * @param user The target user.
+ * @return the drawable or null if no drawable is required.
+ * @hide
+ */
+ public Drawable getBadgeForUser(UserHandle user) {
+ UserInfo userInfo = getUserIfProfile(user.getIdentifier());
+ if (userInfo != null && userInfo.isManagedProfile()) {
+ return Resources.getSystem().getDrawable(
+ com.android.internal.R.drawable.ic_corp_badge);
+ }
+ return null;
+ }
+
private int getBadgeResIdForUser(int userHandle) {
// Return the framework-provided badge.
- List<UserInfo> userProfiles = getProfiles(getUserHandle());
- for (UserInfo user : userProfiles) {
- if (user.id == userHandle
- && user.isManagedProfile()) {
- return com.android.internal.R.drawable.ic_corp_badge;
- }
+ UserInfo userInfo = getUserIfProfile(userHandle);
+ if (userInfo != null && userInfo.isManagedProfile()) {
+ return com.android.internal.R.drawable.ic_corp_icon_badge;
}
return 0;
}
+ /**
+ * @return UserInfo for userHandle if it exists and is a profile of the current
+ * user or null.
+ */
+ private UserInfo getUserIfProfile(int userHandle) {
+ List<UserInfo> userProfiles = getProfiles(getUserHandle());
+ for (UserInfo user : userProfiles) {
+ if (user.id == userHandle) {
+ return user;
+ }
+ }
+ return null;
+ }
+
private Drawable getMergedDrawable(Drawable icon, Drawable badge) {
final int width = icon.getIntrinsicWidth();
final int height = icon.getIntrinsicHeight();
diff --git a/core/java/android/provider/Contacts.java b/core/java/android/provider/Contacts.java
index 9e2aacd..d4c5cfb 100644
--- a/core/java/android/provider/Contacts.java
+++ b/core/java/android/provider/Contacts.java
@@ -58,7 +58,7 @@
@Deprecated
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY);
- /**
+ /**
* Signifies an email address row that is stored in the ContactMethods table
* @deprecated see {@link android.provider.ContactsContract}
*/
@@ -337,7 +337,7 @@
* @deprecated see {@link android.provider.ContactsContract}
*/
@Deprecated
- public static final class People implements BaseColumns, SyncConstValue, PeopleColumns,
+ public static final class People implements BaseColumns, PeopleColumns,
PhonesColumns, PresenceColumns {
/**
* no public constructor since this is a utility class
@@ -790,7 +790,7 @@
*/
@Deprecated
public static final class Groups
- implements BaseColumns, SyncConstValue, GroupsColumns {
+ implements BaseColumns, GroupsColumns {
/**
* no public constructor since this is a utility class
*/
@@ -1864,7 +1864,7 @@
* @deprecated see {@link android.provider.ContactsContract}
*/
@Deprecated
- public static final class Photos implements BaseColumns, PhotosColumns, SyncConstValue {
+ public static final class Photos implements BaseColumns, PhotosColumns {
/**
* no public constructor since this is a utility class
*/
@@ -2199,7 +2199,7 @@
}
/** The action code to use when adding a contact
- * @deprecated see {@link android.provider.ContactsContract}
+ * @deprecated see {@link android.provider.ContactsContract}
*/
@Deprecated
public static final String ACTION = ContactsContract.Intents.Insert.ACTION;
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 6db78f4..ba66e65 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -184,9 +184,9 @@
public static final String DEFERRED_SNIPPETING_QUERY = "deferred_snippeting_query";
/**
- * A boolean parameter for {@link CommonDataKinds.Phone#CONTENT_URI},
- * {@link CommonDataKinds.Email#CONTENT_URI}, and
- * {@link CommonDataKinds.StructuredPostal#CONTENT_URI}.
+ * A boolean parameter for {@link CommonDataKinds.Phone#CONTENT_URI Phone.CONTENT_URI},
+ * {@link CommonDataKinds.Email#CONTENT_URI Email.CONTENT_URI}, and
+ * {@link CommonDataKinds.StructuredPostal#CONTENT_URI StructuredPostal.CONTENT_URI}.
* This enables a content provider to remove duplicate entries in results.
*/
public static final String REMOVE_DUPLICATE_ENTRIES = "remove_duplicate_entries";
@@ -244,6 +244,9 @@
public static final String KEY_AUTHORIZED_URI = "authorized_uri";
}
+ /*
+ * @hide
+ */
public static final class Preferences {
/**
@@ -808,6 +811,7 @@
* The position at which the contact is pinned. If {@link PinnedPositions#UNPINNED},
* the contact is not pinned. Also see {@link PinnedPositions}.
* <P>Type: INTEGER </P>
+ * @hide
*/
public static final String PINNED = "pinned";
@@ -7775,6 +7779,8 @@
* {@link PinnedPositions#STAR_WHEN_PINNING} to true to force all pinned and unpinned
* contacts to be automatically starred and unstarred.
* </p>
+ *
+ * @hide
*/
public static final class PinnedPositions {
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index cccfa78..a74e3a0 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -602,8 +602,7 @@
beginBatchEdit();
if (!composing && !TextUtils.isEmpty(text)) {
- // Notify the text is committed by the user to InputMethodManagerService
- mIMM.notifyTextCommitted();
+ mIMM.notifyUserAction();
}
// delete composing text set previously.
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index f874eb7..70f905d 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -1913,13 +1913,13 @@
}
/**
- * Notify the current IME commits text
+ * Notify that a user took some action with this input method.
* @hide
*/
- public void notifyTextCommitted() {
+ public void notifyUserAction() {
synchronized (mH) {
try {
- mService.notifyTextCommitted();
+ mService.notifyUserAction();
} catch (RemoteException e) {
Log.w(TAG, "IME died: " + mCurId, e);
}
diff --git a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java
index 7dbde69..fdd24a6 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java
@@ -468,7 +468,7 @@
return new InputMethodSubtypeSwitchingController(settings, context);
}
- public void onCommitTextLocked(InputMethodInfo imi, InputMethodSubtype subtype) {
+ public void onUserActionLocked(InputMethodInfo imi, InputMethodSubtype subtype) {
if (mController == null) {
if (DEBUG) {
Log.e(TAG, "mController shouldn't be null.");
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index 5336174..4590520 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -77,6 +77,6 @@
boolean setInputMethodEnabled(String id, boolean enabled);
void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes);
int getInputMethodWindowVisibleHeight();
- oneway void notifyTextCommitted();
+ oneway void notifyUserAction();
void setCursorAnchorMonitorMode(in IBinder token, int monitorMode);
}
diff --git a/core/java/com/android/internal/widget/LockPatternView.java b/core/java/com/android/internal/widget/LockPatternView.java
index d841d53..7fe03f5 100644
--- a/core/java/com/android/internal/widget/LockPatternView.java
+++ b/core/java/com/android/internal/widget/LockPatternView.java
@@ -22,17 +22,18 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.Color;
+import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.os.Debug;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import android.util.AttributeSet;
-import android.util.TypedValue;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
import android.view.View;
@@ -110,14 +111,11 @@
private float mSquareWidth;
private float mSquareHeight;
- private Bitmap mBitmapBtnDefault;
- private Bitmap mBitmapBtnTouched;
- private Bitmap mBitmapCircleDefault;
- private Bitmap mBitmapCircleGreen;
- private Bitmap mBitmapCircleRed;
-
- private Bitmap mBitmapArrowGreenUp;
- private Bitmap mBitmapArrowRedUp;
+ private final Bitmap mBitmapBtnDefault;
+ private final Bitmap mBitmapBtnTouched;
+ private final Bitmap mBitmapCircleDefault;
+ private final Bitmap mBitmapCircleAlpha;
+ private final Bitmap mBitmapArrowAlphaUp;
private final Path mCurrentPath = new Path();
private final Rect mInvalidate = new Rect();
@@ -129,6 +127,10 @@
private int mAspect;
private final Matrix mArrowMatrix = new Matrix();
private final Matrix mCircleMatrix = new Matrix();
+ private final PorterDuffColorFilter mRegularColorFilter;
+ private final PorterDuffColorFilter mErrorColorFilter;
+ private final PorterDuffColorFilter mSuccessColorFilter;
+
/**
* Represents a cell in the 3 X 3 matrix of the unlock pattern view.
@@ -266,17 +268,22 @@
setClickable(true);
+
mPathPaint.setAntiAlias(true);
mPathPaint.setDither(true);
- int defaultColor = Color.WHITE;
- TypedValue outValue = new TypedValue();
- if (context.getTheme().resolveAttribute(android.R.attr.textColorPrimary, outValue, true)) {
- defaultColor = context.getResources().getColor(outValue.resourceId);
- }
+ int regularColor = getResources().getColor(R.color.lock_pattern_view_regular_color);
+ int errorColor = getResources().getColor(R.color.lock_pattern_view_error_color);
+ int successColor = getResources().getColor(R.color.lock_pattern_view_success_color);
+ regularColor = a.getColor(R.styleable.LockPatternView_regularColor, regularColor);
+ errorColor = a.getColor(R.styleable.LockPatternView_errorColor, errorColor);
+ successColor = a.getColor(R.styleable.LockPatternView_successColor, successColor);
+ mRegularColorFilter = new PorterDuffColorFilter(regularColor, PorterDuff.Mode.SRC_ATOP);
+ mErrorColorFilter = new PorterDuffColorFilter(errorColor, PorterDuff.Mode.SRC_ATOP);
+ mSuccessColorFilter = new PorterDuffColorFilter(successColor, PorterDuff.Mode.SRC_ATOP);
- final int color = a.getColor(R.styleable.LockPatternView_pathColor, defaultColor);
- mPathPaint.setColor(color);
+ int pathColor = a.getColor(R.styleable.LockPatternView_pathColor, regularColor);
+ mPathPaint.setColor(pathColor);
mPathPaint.setAlpha(mStrokeAlpha);
mPathPaint.setStyle(Paint.Style.STROKE);
@@ -284,25 +291,26 @@
mPathPaint.setStrokeCap(Paint.Cap.ROUND);
// lot's of bitmaps!
- // TODO: those bitmaps are hardcoded to the Holo Theme which should not be the case!
- mBitmapBtnDefault = getBitmapFor(R.drawable.btn_code_lock_default_holo);
- mBitmapBtnTouched = getBitmapFor(R.drawable.btn_code_lock_touched_holo);
- mBitmapCircleDefault = getBitmapFor(R.drawable.indicator_code_lock_point_area_default_holo);
- mBitmapCircleGreen = getBitmapFor(R.drawable.indicator_code_lock_point_area_green_holo);
- mBitmapCircleRed = getBitmapFor(R.drawable.indicator_code_lock_point_area_red_holo);
-
- mBitmapArrowGreenUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_green_up);
- mBitmapArrowRedUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_red_up);
+ // TODO: those bitmaps are hardcoded to the Quantum Theme which should not be the case!
+ mBitmapBtnDefault = getBitmapFor(R.drawable.btn_code_lock_default_qntm_alpha);
+ mBitmapBtnTouched = getBitmapFor(R.drawable.btn_code_lock_touched_qntm_alpha);
+ mBitmapCircleDefault = getBitmapFor(
+ R.drawable.indicator_code_lock_point_area_default_qntm_alpha);
+ mBitmapCircleAlpha = getBitmapFor(R.drawable.indicator_code_lock_point_area_qntm_alpha);
+ mBitmapArrowAlphaUp = getBitmapFor(
+ R.drawable.indicator_code_lock_drag_direction_up_qntm_alpha);
// bitmaps have the size of the largest bitmap in this group
final Bitmap bitmaps[] = { mBitmapBtnDefault, mBitmapBtnTouched, mBitmapCircleDefault,
- mBitmapCircleGreen, mBitmapCircleRed };
+ mBitmapCircleAlpha};
for (Bitmap bitmap : bitmaps) {
mBitmapWidth = Math.max(mBitmapWidth, bitmap.getWidth());
mBitmapHeight = Math.max(mBitmapHeight, bitmap.getHeight());
}
+ mPaint.setAntiAlias(true);
+ mPaint.setDither(true);
mPaint.setFilterBitmap(true);
mCellStates = new CellState[3][3];
@@ -963,7 +971,12 @@
}
private void drawArrow(Canvas canvas, float leftX, float topY, Cell start, Cell end) {
- boolean green = mPatternDisplayMode != DisplayMode.Wrong;
+ if (mPatternInProgress) {
+ mPaint.setColorFilter(mRegularColorFilter);
+ } else {
+ boolean success = mPatternDisplayMode != DisplayMode.Wrong;
+ mPaint.setColorFilter(success ? mSuccessColorFilter : mErrorColorFilter);
+ }
final int endRow = end.row;
final int startRow = start.row;
@@ -977,7 +990,6 @@
// compute transform to place arrow bitmaps at correct angle inside circle.
// This assumes that the arrow image is drawn at 12:00 with it's top edge
// coincident with the circle bitmap's top edge.
- Bitmap arrow = green ? mBitmapArrowGreenUp : mBitmapArrowRedUp;
final int cellWidth = mBitmapWidth;
final int cellHeight = mBitmapHeight;
@@ -994,8 +1006,8 @@
mArrowMatrix.preScale(sx, sy);
mArrowMatrix.preTranslate(-mBitmapWidth/2, -mBitmapHeight/2);
mArrowMatrix.preRotate(angle, cellWidth / 2.0f, cellHeight / 2.0f); // rotate about cell center
- mArrowMatrix.preTranslate((cellWidth - arrow.getWidth()) / 2.0f, 0.0f); // translate to 12:00 pos
- canvas.drawBitmap(arrow, mArrowMatrix, mPaint);
+ mArrowMatrix.preTranslate((cellWidth - mBitmapArrowAlphaUp.getWidth()) / 2.0f, 0.0f); // translate to 12:00 pos
+ canvas.drawBitmap(mBitmapArrowAlphaUp, mArrowMatrix, mPaint);
}
/**
@@ -1008,24 +1020,28 @@
boolean partOfPattern) {
Bitmap outerCircle;
Bitmap innerCircle;
-
+ ColorFilter outerFilter;
if (!partOfPattern || mInStealthMode) {
// unselected circle
outerCircle = mBitmapCircleDefault;
innerCircle = mBitmapBtnDefault;
+ outerFilter = mRegularColorFilter;
} else if (mPatternInProgress) {
// user is in middle of drawing a pattern
- outerCircle = mBitmapCircleGreen;
+ outerCircle = mBitmapCircleAlpha;
innerCircle = mBitmapBtnTouched;
+ outerFilter = mRegularColorFilter;
} else if (mPatternDisplayMode == DisplayMode.Wrong) {
// the pattern is wrong
- outerCircle = mBitmapCircleRed;
+ outerCircle = mBitmapCircleAlpha;
innerCircle = mBitmapBtnDefault;
+ outerFilter = mErrorColorFilter;
} else if (mPatternDisplayMode == DisplayMode.Correct ||
mPatternDisplayMode == DisplayMode.Animate) {
// the pattern is correct
- outerCircle = mBitmapCircleGreen;
+ outerCircle = mBitmapCircleAlpha;
innerCircle = mBitmapBtnDefault;
+ outerFilter = mSuccessColorFilter;
} else {
throw new IllegalStateException("unknown display mode " + mPatternDisplayMode);
}
@@ -1048,7 +1064,9 @@
mCircleMatrix.preScale(sx * scale, sy * scale);
mCircleMatrix.preTranslate(-mBitmapWidth/2, -mBitmapHeight/2);
+ mPaint.setColorFilter(outerFilter);
canvas.drawBitmap(outerCircle, mCircleMatrix, mPaint);
+ mPaint.setColorFilter(mRegularColorFilter);
canvas.drawBitmap(innerCircle, mCircleMatrix, mPaint);
}
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_default.png b/core/res/res/drawable-hdpi/btn_code_lock_default.png
deleted file mode 100644
index 4469ce0..0000000
--- a/core/res/res/drawable-hdpi/btn_code_lock_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png b/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png
deleted file mode 100644
index 449d427..0000000
--- a/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_default_qntm_alpha.png b/core/res/res/drawable-hdpi/btn_code_lock_default_qntm_alpha.png
new file mode 100644
index 0000000..7cc3c11
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_code_lock_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_touched.png b/core/res/res/drawable-hdpi/btn_code_lock_touched.png
deleted file mode 100644
index 0410dd3..0000000
--- a/core/res/res/drawable-hdpi/btn_code_lock_touched.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_touched_holo.png b/core/res/res/drawable-hdpi/btn_code_lock_touched_holo.png
deleted file mode 100644
index 66cb1ec..0000000
--- a/core/res/res/drawable-hdpi/btn_code_lock_touched_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_touched_qntm_alpha.png b/core/res/res/drawable-hdpi/btn_code_lock_touched_qntm_alpha.png
new file mode 100644
index 0000000..70397d21
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_code_lock_touched_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_corp_badge.png b/core/res/res/drawable-hdpi/ic_corp_badge.png
deleted file mode 100644
index f647375..0000000
--- a/core/res/res/drawable-hdpi/ic_corp_badge.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up.png
deleted file mode 100644
index 698c3ec..0000000
--- a/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
new file mode 100644
index 0000000..b9b400f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default.png
deleted file mode 100644
index c45b956..0000000
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_qntm_alpha.png
similarity index 82%
rename from core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png
rename to core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_qntm_alpha.png
index 7fe402a..b1601f4 100644
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green.png
deleted file mode 100644
index b9fd0a4..0000000
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_qntm_alpha.png
similarity index 95%
rename from core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png
rename to core/res/res/drawable-hdpi/indicator_code_lock_point_area_qntm_alpha.png
index 4052eed..a038a13 100644
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red.png
deleted file mode 100644
index 94e947d..0000000
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png
deleted file mode 100644
index 738d0fe..0000000
--- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_code_lock_default.png b/core/res/res/drawable-ldpi/btn_code_lock_default.png
deleted file mode 100644
index 149da9b..0000000
--- a/core/res/res/drawable-ldpi/btn_code_lock_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_code_lock_touched.png b/core/res/res/drawable-ldpi/btn_code_lock_touched.png
deleted file mode 100644
index ad9a313..0000000
--- a/core/res/res/drawable-ldpi/btn_code_lock_touched.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_red_up.png
deleted file mode 100644
index ac8e42a..0000000
--- a/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_red_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_default.png
deleted file mode 100644
index 5b77b9f..0000000
--- a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_green.png
deleted file mode 100644
index c7c0b9a..0000000
--- a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_green.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_red.png b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_red.png
deleted file mode 100644
index ac02dc4..0000000
--- a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_red.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_default.png b/core/res/res/drawable-mdpi/btn_code_lock_default.png
deleted file mode 100644
index 206f9b3..0000000
--- a/core/res/res/drawable-mdpi/btn_code_lock_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_default_holo.png b/core/res/res/drawable-mdpi/btn_code_lock_default_holo.png
deleted file mode 100644
index 4c4adf2..0000000
--- a/core/res/res/drawable-mdpi/btn_code_lock_default_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_default_qntm_alpha.png b/core/res/res/drawable-mdpi/btn_code_lock_default_qntm_alpha.png
new file mode 100644
index 0000000..14d0b32
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_code_lock_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched.png b/core/res/res/drawable-mdpi/btn_code_lock_touched.png
deleted file mode 100644
index fe5c1af..0000000
--- a/core/res/res/drawable-mdpi/btn_code_lock_touched.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched_holo.png b/core/res/res/drawable-mdpi/btn_code_lock_touched_holo.png
deleted file mode 100644
index ef701ed..0000000
--- a/core/res/res/drawable-mdpi/btn_code_lock_touched_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched_qntm_alpha.png b/core/res/res/drawable-mdpi/btn_code_lock_touched_qntm_alpha.png
new file mode 100644
index 0000000..9cfbdf9
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_code_lock_touched_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
deleted file mode 100644
index 7201e58..0000000
--- a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
new file mode 100644
index 0000000..2fb1325
--- /dev/null
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png
deleted file mode 100644
index 05c194b..0000000
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_qntm_alpha.png
similarity index 78%
rename from core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_holo.png
rename to core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_qntm_alpha.png
index 5762e5f..07d4afd 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_holo.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
deleted file mode 100644
index 8f24832..0000000
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_qntm_alpha.png
similarity index 94%
rename from core/res/res/drawable-mdpi/indicator_code_lock_point_area_green_holo.png
rename to core/res/res/drawable-mdpi/indicator_code_lock_point_area_qntm_alpha.png
index bfb0967..ea8c2b4 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green_holo.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png
deleted file mode 100644
index 8c0386f..0000000
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_green_up.png
deleted file mode 100644
index cc46f19..0000000
--- a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_green_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png
deleted file mode 100644
index cc46f19..0000000
--- a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-nodpi/platlogo.xml b/core/res/res/drawable-nodpi/platlogo.xml
index 668cff7..d1e2df3 100644
--- a/core/res/res/drawable-nodpi/platlogo.xml
+++ b/core/res/res/drawable-nodpi/platlogo.xml
@@ -19,18 +19,21 @@
<viewport android:viewportHeight="25" android:viewportWidth="25" />
<path
- android:name="shadow"
- android:pathData="m12,2.5 a11,11 0 1,0 1,0
- M6.5,7.5
- l5,0 l0,7 l7,0 l0,5 l-12,0 z"
- android:fill="#40000000"
+ android:name="torso"
+ android:pathData="m2,2 l21,0 l0,21 l-21,0 z"
+ android:fill="#FFFFFFFF"
/>
+
<path
- android:name="circle-L-ranch"
- android:pathData="m12,1.5 a11,11 0 1,0 1,0
- M6.5,6.5
- l5,0 l0,7 l7,0 l0,5 l-12,0 z"
- android:fill="#FFFFFF40"
+ android:name="|"
+ android:pathData="m4,4 l8,0 l0,17 l-8,0 z"
+ android:fill="#FF0000FF"
+ />
+
+ <path
+ android:name="_"
+ android:pathData="m5,14 l16,0 l0,6 l-16,0 z"
+ android:fill="#FFFF0000"
/>
</vector>
diff --git a/core/res/res/drawable-nodpi/stat_sys_adb.xml b/core/res/res/drawable-nodpi/stat_sys_adb.xml
index b8ddb77..6b3be4a 100644
--- a/core/res/res/drawable-nodpi/stat_sys_adb.xml
+++ b/core/res/res/drawable-nodpi/stat_sys_adb.xml
@@ -18,13 +18,26 @@
<viewport android:viewportHeight="25" android:viewportWidth="25" />
-
<path
- android:name="adb"
- android:pathData="m3,3l8,0l0,11l11,0l0,8l-19,0z"
+ android:name="L-card"
+
+ android:pathData="
+ m4,2
+ a2,2,0,0,0,-2,2 l0,17
+ a2,2,0,0,0,2,2 l17,0
+ a2,2,0,0,0,2,-2 l0,-17
+ a2,2,0,0,0,-2,-2
+ z
+
+ M7,2 l3,0 l0,13 l13,0 l0,3 l-16,0
+
+ M15,2 l3,0 l0,5 l5,0 l0,3 l-8,0
+
+ z"
android:fill="#FFFFFFFF"
/>
+
</vector>
diff --git a/core/res/res/drawable-sw600dp-mdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-sw600dp-mdpi/indicator_code_lock_drag_direction_red_up.png
deleted file mode 100644
index 2ab4547..0000000
--- a/core/res/res/drawable-sw600dp-mdpi/indicator_code_lock_drag_direction_red_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_default.png b/core/res/res/drawable-xhdpi/btn_code_lock_default.png
deleted file mode 100644
index c1358a2..0000000
--- a/core/res/res/drawable-xhdpi/btn_code_lock_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_default_holo.png b/core/res/res/drawable-xhdpi/btn_code_lock_default_holo.png
deleted file mode 100644
index db1cbe6..0000000
--- a/core/res/res/drawable-xhdpi/btn_code_lock_default_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_default_qntm_alpha.png b/core/res/res/drawable-xhdpi/btn_code_lock_default_qntm_alpha.png
new file mode 100644
index 0000000..0c457b4
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_code_lock_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_touched.png b/core/res/res/drawable-xhdpi/btn_code_lock_touched.png
deleted file mode 100644
index 0fafc3e..0000000
--- a/core/res/res/drawable-xhdpi/btn_code_lock_touched.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_touched_holo.png b/core/res/res/drawable-xhdpi/btn_code_lock_touched_holo.png
deleted file mode 100644
index 073c3ac..0000000
--- a/core/res/res/drawable-xhdpi/btn_code_lock_touched_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_touched_qntm_alpha.png b/core/res/res/drawable-xhdpi/btn_code_lock_touched_qntm_alpha.png
new file mode 100644
index 0000000..020d699
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/btn_code_lock_touched_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_corp_badge.png b/core/res/res/drawable-xhdpi/ic_corp_badge.png
deleted file mode 100644
index 80d848d..0000000
--- a/core/res/res/drawable-xhdpi/ic_corp_badge.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up.png
deleted file mode 100644
index 2d34cf6..0000000
--- a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
new file mode 100644
index 0000000..fda5e37
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default.png
deleted file mode 100644
index 0812cb5..0000000
--- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_qntm_alpha.png
similarity index 86%
rename from core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_holo.png
rename to core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_qntm_alpha.png
index 6a97445..75d0221 100644
--- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_holo.png
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green.png
deleted file mode 100644
index 3ab2e99..0000000
--- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_qntm_alpha.png
similarity index 96%
rename from core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green_holo.png
rename to core/res/res/drawable-xhdpi/indicator_code_lock_point_area_qntm_alpha.png
index f0e9ab9..225799b 100644
--- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green_holo.png
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.png
deleted file mode 100644
index 170b833..0000000
--- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/btn_code_lock_default_holo.png b/core/res/res/drawable-xxhdpi/btn_code_lock_default_qntm_alpha.png
similarity index 100%
rename from core/res/res/drawable-xxhdpi/btn_code_lock_default_holo.png
rename to core/res/res/drawable-xxhdpi/btn_code_lock_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/btn_code_lock_touched_holo.png b/core/res/res/drawable-xxhdpi/btn_code_lock_touched_qntm_alpha.png
similarity index 100%
rename from core/res/res/drawable-xxhdpi/btn_code_lock_touched_holo.png
rename to core/res/res/drawable-xxhdpi/btn_code_lock_touched_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_corp_badge.png b/core/res/res/drawable-xxhdpi/ic_corp_badge.png
deleted file mode 100644
index 885e2ac..0000000
--- a/core/res/res/drawable-xxhdpi/ic_corp_badge.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png b/core/res/res/drawable-xxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
new file mode 100644
index 0000000..d3e80be
--- /dev/null
+++ b/core/res/res/drawable-xxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_default_qntm_alpha.png
similarity index 100%
rename from core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_default_holo.png
rename to core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_default_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_qntm_alpha.png
similarity index 100%
rename from core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_green_holo.png
rename to core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_red_holo.png
deleted file mode 100644
index f6c3e27..0000000
--- a/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_red_holo.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png b/core/res/res/drawable-xxxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
new file mode 100644
index 0000000..23214fa
--- /dev/null
+++ b/core/res/res/drawable-xxxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png
Binary files differ
diff --git a/core/res/res/drawable/ic_corp_badge.xml b/core/res/res/drawable/ic_corp_badge.xml
new file mode 100644
index 0000000..5325712
--- /dev/null
+++ b/core/res/res/drawable/ic_corp_badge.xml
@@ -0,0 +1,34 @@
+<!--
+Copyright (C) 2014 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <size
+ android:width="19.0dp"
+ android:height="19.0dp"/>
+
+ <viewport
+ android:viewportWidth="19.0"
+ android:viewportHeight="19.0"/>
+
+ <path
+ android:pathData="M9.5,9.5m-9.5,0.0a9.5,9.5 0.0,1.0 1.0,19.0 0.0a9.5,9.5 0.0,1.0 1.0,-19.0 0.0"
+ android:fill="#FF5722"/>
+ <path
+ android:pathData="M12.667,7.125l-1.583,0.0L11.084,6.333l-0.792,-0.792L8.708,5.5410004L7.917,6.333l0.0,0.792L6.333,7.125c-0.438,0.0 -0.788,0.354 -0.788,0.792l-0.004,4.354c0.0,0.438 0.354,0.792 0.792,0.792l6.333,0.0c0.438,0.0 0.792,-0.354 0.792,-0.792L13.458,7.917C13.458,7.479 13.104,7.125 12.667,7.125zM10.094,10.687L8.906,10.687L8.906,9.5l1.188,0.0L10.094,10.687zM10.292,7.125L8.708,7.125L8.708,6.333l1.583,0.0L10.291,7.125z"
+ android:fill="#FFFFFF"/>
+ <path
+ android:pathData="M4.75,4.75 h9.5 v9.5 h-9.5z"
+ android:fill="#00000000"/>
+</vector>
diff --git a/core/res/res/drawable/ic_corp_icon_badge.xml b/core/res/res/drawable/ic_corp_icon_badge.xml
new file mode 100644
index 0000000..7bfab4c
--- /dev/null
+++ b/core/res/res/drawable/ic_corp_icon_badge.xml
@@ -0,0 +1,40 @@
+<!--
+Copyright (C) 2014 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <size
+ android:width="64.0dp"
+ android:height="64.0dp"/>
+
+ <viewport
+ android:viewportWidth="64.0"
+ android:viewportHeight="64.0"/>
+
+ <path
+ android:fill="#FF000000"
+ android:pathData="M49.062,50.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"/>
+ <path
+ android:fill="#FF000000"
+ android:pathData="M49.0,49.5m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"/>
+ <path
+ android:pathData="M49.0,49.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"
+ android:fill="#FF5722"/>
+ <path
+ android:pathData="M53.667,45.5l-2.333,0.0l0.0,-1.167l-1.167,-1.167l-2.333,0.0l-1.167,1.167L46.667,45.5l-2.333,0.0c-0.645,0.0 -1.161,0.522 -1.161,1.167l-0.006,6.417c0.0,0.645 0.522,1.167 1.167,1.167l9.333,0.0c0.645,0.0 1.167,-0.522 1.167,-1.167l0.0,-6.417C54.833,46.022 54.311,45.5 53.667,45.5zM49.875,50.75l-1.75,0.0L48.125,49.0l1.75,0.0L49.875,50.75zM50.167,45.5l-2.333,0.0l0.0,-1.167l2.333,0.0L50.167,45.5z"
+ android:fill="#FFFFFF"/>
+ <path
+ android:pathData="M42.0,42.0 h14.0 v14.0 h-14.0z"
+ android:fill="#00000000"/>
+</vector>
diff --git a/core/res/res/layout/notification_template_quantum_base.xml b/core/res/res/layout/notification_template_quantum_base.xml
index 789bf32..4265f9d 100644
--- a/core/res/res/layout/notification_template_quantum_base.xml
+++ b/core/res/res/layout/notification_template_quantum_base.xml
@@ -120,6 +120,15 @@
android:gravity="center"
android:paddingStart="8dp"
/>
+ <ImageView android:id="@+id/profile_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center"
+ android:layout_weight="0"
+ android:layout_marginStart="8dp"
+ android:scaleType="centerInside"
+ android:visibility="gone"
+ />
</LinearLayout>
</LinearLayout>
</FrameLayout>
diff --git a/core/res/res/layout/notification_template_quantum_big_base.xml b/core/res/res/layout/notification_template_quantum_big_base.xml
index 8cb5549..95a4c82 100644
--- a/core/res/res/layout/notification_template_quantum_big_base.xml
+++ b/core/res/res/layout/notification_template_quantum_big_base.xml
@@ -127,6 +127,15 @@
android:gravity="center"
android:paddingStart="8dp"
/>
+ <ImageView android:id="@+id/profile_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center"
+ android:layout_weight="0"
+ android:layout_marginStart="8dp"
+ android:scaleType="centerInside"
+ android:visibility="gone"
+ />
</LinearLayout>
<ProgressBar
android:id="@android:id/progress"
diff --git a/core/res/res/layout/notification_template_quantum_big_text.xml b/core/res/res/layout/notification_template_quantum_big_text.xml
index bbd1071..45811fc 100644
--- a/core/res/res/layout/notification_template_quantum_big_text.xml
+++ b/core/res/res/layout/notification_template_quantum_big_text.xml
@@ -165,6 +165,15 @@
android:gravity="center"
android:paddingStart="8dp"
/>
+ <ImageView android:id="@+id/profile_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center"
+ android:layout_weight="0"
+ android:layout_marginStart="8dp"
+ android:scaleType="centerInside"
+ android:visibility="gone"
+ />
</LinearLayout>
</LinearLayout>
</FrameLayout>
diff --git a/core/res/res/layout/notification_template_quantum_inbox.xml b/core/res/res/layout/notification_template_quantum_inbox.xml
index a071d59..3851dd3 100644
--- a/core/res/res/layout/notification_template_quantum_inbox.xml
+++ b/core/res/res/layout/notification_template_quantum_inbox.xml
@@ -249,6 +249,15 @@
android:gravity="center"
android:paddingStart="8dp"
/>
+ <ImageView android:id="@+id/profile_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center"
+ android:layout_weight="0"
+ android:layout_marginStart="8dp"
+ android:scaleType="centerInside"
+ android:visibility="gone"
+ />
</LinearLayout>
</LinearLayout>
</FrameLayout>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 3b6c1bd..b47a890 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -6369,6 +6369,12 @@
<attr name="aspect" format="string" />
<!-- Color to use when drawing LockPatternView paths. -->
<attr name="pathColor" format="color|reference" />
+ <!-- The regular pattern color -->
+ <attr name="regularColor" format="color|reference" />
+ <!-- The error color -->
+ <attr name="errorColor" format="color|reference" />
+ <!-- The success color -->
+ <attr name="successColor" format="color|reference"/>
</declare-styleable>
<!-- Use <code>recognition-service</code> as the root tag of the XML resource that
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 5a2609e..9bf2ce8 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -115,6 +115,11 @@
<color name="kg_multi_user_text_inactive">#ff808080</color>
<color name="kg_widget_pager_gradient">#ffffffff</color>
+ <!-- LockPatternView -->
+ <color name="lock_pattern_view_regular_color">#ffffffff</color>
+ <color name="lock_pattern_view_success_color">#ffffffff</color>
+ <color name="lock_pattern_view_error_color">#fff4511e</color>
+
<!-- FaceLock -->
<color name="facelock_spotlight_mask">#CC000000</color>
diff --git a/core/res/res/values/ids.xml b/core/res/res/values/ids.xml
index c966a12..639091e 100644
--- a/core/res/res/values/ids.xml
+++ b/core/res/res/values/ids.xml
@@ -23,6 +23,7 @@
<item type="id" name="empty" />
<item type="id" name="hint" />
<item type="id" name="icon" />
+ <item type="id" name="icon_badge" />
<item type="id" name="icon1" />
<item type="id" name="icon2" />
<item type="id" name="input" />
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 41238a3..cc4487b 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -217,6 +217,7 @@
<java-symbol type="id" name="pin_confirm_text" />
<java-symbol type="id" name="pin_error_message" />
<java-symbol type="id" name="timePickerLayout" />
+ <java-symbol type="id" name="profile_icon" />
<java-symbol type="attr" name="actionModeShareDrawable" />
<java-symbol type="attr" name="alertDialogCenterButtons" />
@@ -1017,8 +1018,14 @@
<java-symbol type="drawable" name="text_edit_side_paste_window" />
<java-symbol type="drawable" name="text_edit_paste_window" />
<java-symbol type="drawable" name="btn_check_off" />
- <java-symbol type="drawable" name="btn_code_lock_default_holo" />
- <java-symbol type="drawable" name="btn_code_lock_touched_holo" />
+ <java-symbol type="drawable" name="btn_code_lock_default_qntm_alpha" />
+ <java-symbol type="drawable" name="btn_code_lock_touched_qntm_alpha" />
+ <java-symbol type="drawable" name="indicator_code_lock_point_area_default_qntm_alpha" />
+ <java-symbol type="drawable" name="indicator_code_lock_point_area_qntm_alpha" />
+ <java-symbol type="drawable" name="indicator_code_lock_drag_direction_up_qntm_alpha" />
+ <java-symbol type="color" name="lock_pattern_view_regular_color" />
+ <java-symbol type="color" name="lock_pattern_view_success_color" />
+ <java-symbol type="color" name="lock_pattern_view_error_color" />
<java-symbol type="drawable" name="clock_dial" />
<java-symbol type="drawable" name="clock_hand_hour" />
<java-symbol type="drawable" name="clock_hand_minute" />
@@ -1062,11 +1069,6 @@
<java-symbol type="drawable" name="ic_print" />
<java-symbol type="drawable" name="ic_print_error" />
<java-symbol type="drawable" name="ic_grayedout_printer" />
- <java-symbol type="drawable" name="indicator_code_lock_drag_direction_green_up" />
- <java-symbol type="drawable" name="indicator_code_lock_drag_direction_red_up" />
- <java-symbol type="drawable" name="indicator_code_lock_point_area_default_holo" />
- <java-symbol type="drawable" name="indicator_code_lock_point_area_green_holo" />
- <java-symbol type="drawable" name="indicator_code_lock_point_area_red_holo" />
<java-symbol type="drawable" name="jog_dial_arrow_long_left_green" />
<java-symbol type="drawable" name="jog_dial_arrow_long_right_red" />
<java-symbol type="drawable" name="jog_dial_arrow_short_left_and_right" />
@@ -1118,6 +1120,7 @@
<java-symbol type="drawable" name="cling_arrow_up" />
<java-symbol type="drawable" name="cling_bg" />
<java-symbol type="drawable" name="ic_corp_badge" />
+ <java-symbol type="drawable" name="ic_corp_icon_badge" />
<java-symbol type="layout" name="action_bar_home" />
<java-symbol type="layout" name="action_bar_title_item" />
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 06cc476..d1484e1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -992,7 +992,10 @@
title.setText(entry.notification.getPackageName());
}
- final ImageView icon = (ImageView) publicViewLocal.findViewById(com.android.internal.R.id.icon);
+ final ImageView icon = (ImageView) publicViewLocal.findViewById(
+ com.android.internal.R.id.icon);
+ final ImageView profileIcon = (ImageView) publicViewLocal.findViewById(
+ com.android.internal.R.id.profile_icon);
final StatusBarIcon ic = new StatusBarIcon(entry.notification.getPackageName(),
entry.notification.getUser(),
@@ -1008,7 +1011,19 @@
com.android.internal.R.drawable.notification_icon_legacy_bg_inset);
}
- final TextView text = (TextView) publicViewLocal.findViewById(com.android.internal.R.id.text);
+ if (profileIcon != null) {
+ Drawable profileDrawable
+ = mUserManager.getBadgeForUser(entry.notification.getUser());
+ if (profileDrawable != null) {
+ profileIcon.setImageDrawable(profileDrawable);
+ profileIcon.setVisibility(View.VISIBLE);
+ } else {
+ profileIcon.setVisibility(View.GONE);
+ }
+ }
+
+ final TextView text = (TextView) publicViewLocal.findViewById(
+ com.android.internal.R.id.text);
text.setText("Unlock your device to see this notification.");
// TODO: fill out "time" as well
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index e55de94..d9005d8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1185,7 +1185,6 @@
Entry ent = mNotificationData.get(i);
if (!(provisioned || showNotificationEvenIfUnprovisioned(ent.notification))) continue;
- // TODO How do we want to badge notifcations from profiles.
if (!notificationIsForCurrentProfiles(ent.notification)) continue;
final int vis = ent.notification.getNotification().visibility;
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 11d6a55..251247c 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -2310,14 +2310,14 @@
}
@Override
- public void notifyTextCommitted() {
+ public void notifyUserAction() {
if (DEBUG) {
- Slog.d(TAG, "Got the notification of commitText");
+ Slog.d(TAG, "Got the notification of a user action");
}
synchronized (mMethodMap) {
final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
if (imi != null) {
- mSwitchingController.onCommitTextLocked(imi, mCurrentSubtype);
+ mSwitchingController.onUserActionLocked(imi, mCurrentSubtype);
}
}
}
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index ba12374..e6b465d 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -3801,6 +3801,7 @@
mStacks.remove(this);
mStacks.add(0, this);
}
+ mActivityContainer.onTaskListEmpty();
}
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index dc4ad48..35ac9c9 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -134,6 +134,7 @@
static final int CONTAINER_CALLBACK_VISIBILITY = FIRST_SUPERVISOR_STACK_MSG + 8;
static final int LOCK_TASK_START_MSG = FIRST_SUPERVISOR_STACK_MSG + 9;
static final int LOCK_TASK_END_MSG = FIRST_SUPERVISOR_STACK_MSG + 10;
+ static final int CONTAINER_CALLBACK_TASK_LIST_EMPTY = FIRST_SUPERVISOR_STACK_MSG + 11;
private final static String VIRTUAL_DISPLAY_BASE_NAME = "ActivityViewVirtualDisplay";
@@ -3074,12 +3075,14 @@
} break;
case CONTAINER_CALLBACK_VISIBILITY: {
final ActivityContainer container = (ActivityContainer) msg.obj;
- try {
- // We only send this message if mCallback is non-null.
- container.mCallback.setVisible(container.asBinder(), msg.arg1 == 1);
- } catch (RemoteException e) {
+ final IActivityContainerCallback callback = container.mCallback;
+ if (callback != null) {
+ try {
+ callback.setVisible(container.asBinder(), msg.arg1 == 1);
+ } catch (RemoteException e) {
+ }
}
- }
+ } break;
case LOCK_TASK_START_MSG: {
// When lock task starts, we disable the status bars.
try {
@@ -3091,8 +3094,7 @@
} catch (RemoteException ex) {
throw new RuntimeException(ex);
}
- break;
- }
+ } break;
case LOCK_TASK_END_MSG: {
// When lock task ends, we enable the status bars.
try {
@@ -3104,8 +3106,17 @@
} catch (RemoteException ex) {
throw new RuntimeException(ex);
}
- break;
- }
+ } break;
+ case CONTAINER_CALLBACK_TASK_LIST_EMPTY: {
+ final ActivityContainer container = (ActivityContainer) msg.obj;
+ final IActivityContainerCallback callback = container.mCallback;
+ if (callback != null) {
+ try {
+ callback.onAllActivitiesComplete(container.asBinder());
+ } catch (RemoteException e) {
+ }
+ }
+ } break;
}
}
}
@@ -3310,6 +3321,10 @@
return true;
}
+ void onTaskListEmpty() {
+ mHandler.obtainMessage(CONTAINER_CALLBACK_TASK_LIST_EMPTY, this).sendToTarget();
+ }
+
@Override
public String toString() {
return mIdString + (mActivityDisplay == null ? "N" : "A");
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index bb93663..8585b4e 100755
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -7829,13 +7829,9 @@
@Override
public boolean getApplicationBlockedSettingAsUser(String packageName, int userId) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USERS, null);
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, true,
+ "getApplicationBlocked for user " + userId);
PackageSetting pkgSetting;
- final int uid = Binder.getCallingUid();
- if (UserHandle.getUserId(uid) != userId) {
- mContext.enforceCallingPermission(
- android.Manifest.permission.INTERACT_ACROSS_USERS_FULL,
- "getApplicationBlocked for user " + userId);
- }
long callingId = Binder.clearCallingIdentity();
try {
// writer
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
index 0bb7fc2..66268f2 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
@@ -135,7 +135,6 @@
@Override
public void setImeWindowStatus(IBinder arg0, int arg1, int arg2) throws RemoteException {
// TODO Auto-generated method stub
-
}
@Override
@@ -197,25 +196,25 @@
}
@Override
- public boolean switchToNextInputMethod(IBinder arg0, boolean arg1) throws RemoteException {
+ public boolean switchToNextInputMethod(IBinder arg0, boolean arg1) throws RemoteException {
// TODO Auto-generated method stub
return false;
}
@Override
- public boolean shouldOfferSwitchingToNextInputMethod(IBinder arg0) throws RemoteException {
+ public boolean shouldOfferSwitchingToNextInputMethod(IBinder arg0) throws RemoteException {
// TODO Auto-generated method stub
return false;
}
@Override
- public int getInputMethodWindowVisibleHeight() throws RemoteException {
+ public int getInputMethodWindowVisibleHeight() throws RemoteException {
// TODO Auto-generated method stub
return 0;
}
@Override
- public void notifyTextCommitted() throws RemoteException {
+ public void notifyUserAction() throws RemoteException {
// TODO Auto-generated method stub
}