diff options
79 files changed, 296 insertions, 72 deletions
diff --git a/api/current.txt b/api/current.txt index 1622f21260c3..e2ec52c6bb67 100644 --- a/api/current.txt +++ b/api/current.txt @@ -8403,7 +8403,7 @@ package android.content.pm { 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"; diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 8dba1dcc778c..5ac2a3393855 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -21,7 +21,10 @@ import android.content.Context; 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.Parcel; 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 @@ public class Notification implements Parcelable 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 @@ public class Notification implements Parcelable 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 31bf4657d1c4..a34a1b6c2f0f 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -1402,7 +1402,7 @@ public abstract class PackageManager { * 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 @@ public abstract class PackageManager { * <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 @@ public abstract class PackageManager { * <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 ee219e3d5d36..f7a89ba5452c 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -690,16 +690,45 @@ public class UserManager { } } + /** + * 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. + 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 - && user.isManagedProfile()) { - return com.android.internal.R.drawable.ic_corp_badge; + if (user.id == userHandle) { + return user; } } - return 0; + return null; } private Drawable getMergedDrawable(Drawable icon, Drawable badge) { diff --git a/core/java/com/android/internal/widget/LockPatternView.java b/core/java/com/android/internal/widget/LockPatternView.java index d841d5323841..7fe03f5b165f 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.content.res.TypedArray; 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 @@ public class LockPatternView extends View { 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 @@ public class LockPatternView extends View { 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 @@ public class LockPatternView extends View { 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 @@ public class LockPatternView extends View { 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 @@ public class LockPatternView extends View { } 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 @@ public class LockPatternView extends View { // 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 @@ public class LockPatternView extends View { 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 @@ public class LockPatternView extends View { 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 @@ public class LockPatternView extends View { 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 Binary files differdeleted file mode 100644 index 4469ce07cbf3..000000000000 --- a/core/res/res/drawable-hdpi/btn_code_lock_default.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 449d4272acd6..000000000000 --- a/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..7cc3c1121dc9 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_code_lock_default_qntm_alpha.png diff --git a/core/res/res/drawable-hdpi/btn_code_lock_touched.png b/core/res/res/drawable-hdpi/btn_code_lock_touched.png Binary files differdeleted file mode 100644 index 0410dd3c8242..000000000000 --- a/core/res/res/drawable-hdpi/btn_code_lock_touched.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 66cb1eca1c05..000000000000 --- a/core/res/res/drawable-hdpi/btn_code_lock_touched_holo.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..70397d21dfb9 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_code_lock_touched_qntm_alpha.png diff --git a/core/res/res/drawable-hdpi/ic_corp_badge.png b/core/res/res/drawable-hdpi/ic_corp_badge.png Binary files differdeleted file mode 100644 index f6473757242f..000000000000 --- a/core/res/res/drawable-hdpi/ic_corp_badge.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 698c3ecfbbab..000000000000 --- a/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..b9b400fb3a01 --- /dev/null +++ b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png 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 Binary files differdeleted file mode 100644 index c45b956cfd32..000000000000 --- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default.png +++ /dev/null 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 Binary files differindex 7fe402a59370..b1601f4e4fae 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 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 Binary files differdeleted file mode 100644 index b9fd0a453b06..000000000000 --- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green.png +++ /dev/null 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 Binary files differindex 4052eed858a8..a038a13bd445 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 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 Binary files differdeleted file mode 100644 index 94e947da3544..000000000000 --- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 738d0fe63025..000000000000 --- a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png +++ /dev/null diff --git a/core/res/res/drawable-ldpi/btn_code_lock_default.png b/core/res/res/drawable-ldpi/btn_code_lock_default.png Binary files differdeleted file mode 100644 index 149da9bff119..000000000000 --- a/core/res/res/drawable-ldpi/btn_code_lock_default.png +++ /dev/null diff --git a/core/res/res/drawable-ldpi/btn_code_lock_touched.png b/core/res/res/drawable-ldpi/btn_code_lock_touched.png Binary files differdeleted file mode 100644 index ad9a313b0314..000000000000 --- a/core/res/res/drawable-ldpi/btn_code_lock_touched.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index ac8e42aeba84..000000000000 --- a/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_red_up.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 5b77b9ffb346..000000000000 --- a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_default.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index c7c0b9a4d28b..000000000000 --- a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_green.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index ac02dc4b087b..000000000000 --- a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_red.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_code_lock_default.png b/core/res/res/drawable-mdpi/btn_code_lock_default.png Binary files differdeleted file mode 100644 index 206f9b3bc3b7..000000000000 --- a/core/res/res/drawable-mdpi/btn_code_lock_default.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 4c4adf2cfe34..000000000000 --- a/core/res/res/drawable-mdpi/btn_code_lock_default_holo.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..14d0b32b6e3d --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_code_lock_default_qntm_alpha.png diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched.png b/core/res/res/drawable-mdpi/btn_code_lock_touched.png Binary files differdeleted file mode 100644 index fe5c1af6a08b..000000000000 --- a/core/res/res/drawable-mdpi/btn_code_lock_touched.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index ef701ed67d1c..000000000000 --- a/core/res/res/drawable-mdpi/btn_code_lock_touched_holo.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..9cfbdf9470db --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_code_lock_touched_qntm_alpha.png 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 Binary files differdeleted file mode 100644 index 7201e58a81c0..000000000000 --- a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..2fb1325216fa --- /dev/null +++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png 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 Binary files differdeleted file mode 100644 index 05c194bf63e2..000000000000 --- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default.png +++ /dev/null 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 Binary files differindex 5762e5f4b38a..07d4afd694f7 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 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 Binary files differdeleted file mode 100644 index 8f24832f1149..000000000000 --- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png +++ /dev/null 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 Binary files differindex bfb0967c73f5..ea8c2b4ed8a5 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 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 Binary files differdeleted file mode 100644 index 8c0386fd36cf..000000000000 --- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index cc46f19b19b2..000000000000 --- a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_green_up.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index cc46f19b19b2..000000000000 --- a/core/res/res/drawable-nodpi/indicator_code_lock_drag_direction_red_up.png +++ /dev/null diff --git a/core/res/res/drawable-nodpi/platlogo.xml b/core/res/res/drawable-nodpi/platlogo.xml index 668cff7cd4f2..d1e2df3f94e1 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="|" + android:pathData="m4,4 l8,0 l0,17 l-8,0 z" + android:fill="#FF0000FF" + /> + <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="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 b8ddb77bd2df..6b3be4a181ad 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 Binary files differdeleted file mode 100644 index 2ab45477a1b8..000000000000 --- a/core/res/res/drawable-sw600dp-mdpi/indicator_code_lock_drag_direction_red_up.png +++ /dev/null diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_default.png b/core/res/res/drawable-xhdpi/btn_code_lock_default.png Binary files differdeleted file mode 100644 index c1358a21ad74..000000000000 --- a/core/res/res/drawable-xhdpi/btn_code_lock_default.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index db1cbe6ca16c..000000000000 --- a/core/res/res/drawable-xhdpi/btn_code_lock_default_holo.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..0c457b4459f9 --- /dev/null +++ b/core/res/res/drawable-xhdpi/btn_code_lock_default_qntm_alpha.png diff --git a/core/res/res/drawable-xhdpi/btn_code_lock_touched.png b/core/res/res/drawable-xhdpi/btn_code_lock_touched.png Binary files differdeleted file mode 100644 index 0fafc3ef0436..000000000000 --- a/core/res/res/drawable-xhdpi/btn_code_lock_touched.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 073c3ac91296..000000000000 --- a/core/res/res/drawable-xhdpi/btn_code_lock_touched_holo.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..020d699fa6e8 --- /dev/null +++ b/core/res/res/drawable-xhdpi/btn_code_lock_touched_qntm_alpha.png diff --git a/core/res/res/drawable-xhdpi/ic_corp_badge.png b/core/res/res/drawable-xhdpi/ic_corp_badge.png Binary files differdeleted file mode 100644 index 80d848df9912..000000000000 --- a/core/res/res/drawable-xhdpi/ic_corp_badge.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 2d34cf67843b..000000000000 --- a/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_red_up.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..fda5e37f6743 --- /dev/null +++ b/core/res/res/drawable-xhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png 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 Binary files differdeleted file mode 100644 index 0812cb58107f..000000000000 --- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default.png +++ /dev/null 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 Binary files differindex 6a9744570c92..75d0221d6cfe 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 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 Binary files differdeleted file mode 100644 index 3ab2e99785c3..000000000000 --- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green.png +++ /dev/null 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 Binary files differindex f0e9ab965da8..225799b44000 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 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 Binary files differdeleted file mode 100644 index 170b8333069e..000000000000 --- a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.png +++ /dev/null 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 Binary files differindex 1b6c9b573df5..1b6c9b573df5 100755 --- 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 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 Binary files differindex dd13af8a9c0c..dd13af8a9c0c 100755 --- 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 diff --git a/core/res/res/drawable-xxhdpi/ic_corp_badge.png b/core/res/res/drawable-xxhdpi/ic_corp_badge.png Binary files differdeleted file mode 100644 index 885e2ac76cfb..000000000000 --- a/core/res/res/drawable-xxhdpi/ic_corp_badge.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..d3e80be41aa5 --- /dev/null +++ b/core/res/res/drawable-xxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png 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 Binary files differindex a11b6ddfdcaf..a11b6ddfdcaf 100644 --- 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 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 Binary files differindex eae7ea895131..eae7ea895131 100644 --- 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 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 Binary files differdeleted file mode 100644 index f6c3e2716891..000000000000 --- a/core/res/res/drawable-xxhdpi/indicator_code_lock_point_area_red_holo.png +++ /dev/null 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 Binary files differnew file mode 100644 index 000000000000..23214fa188d7 --- /dev/null +++ b/core/res/res/drawable-xxxhdpi/indicator_code_lock_drag_direction_up_qntm_alpha.png 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 000000000000..532571245d55 --- /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 000000000000..7bfab4c55a0d --- /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 789bf32e33f7..4265f9da9d34 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 8cb55494d48c..95a4c82774cd 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 bbd1071c1fd0..45811fc187d1 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 a071d59fa596..3851dd3624d4 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 3b6c1bd479d1..b47a8903bc32 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 5a2609eafa8e..9bf2ce8b0f47 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 c966a12b7c9b..639091e14284 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 41238a3ed23c..cc4487b97777 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 06cc476d0295..d1484e130bda 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 @@ public abstract class BaseStatusBar extends SystemUI implements 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 @@ public abstract class BaseStatusBar extends SystemUI implements 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 e55de947c75d..d9005d89925b 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 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, 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/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index bb9366318578..8585b4e31969 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 @@ public class PackageManagerService extends IPackageManager.Stub { @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 |