Merge "Add user button UX update" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4b2ee74ebd
@@ -22,7 +22,7 @@
|
||||
android:viewportHeight="100">
|
||||
|
||||
<path
|
||||
android:fillColor="@color/kg_user_switcher_avatar_background"
|
||||
android:fillColor="@color/user_avatar_color_bg"
|
||||
android:pathData="M50,50m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"/>
|
||||
|
||||
</vector>
|
||||
@@ -36,7 +36,8 @@
|
||||
<color name="bt_color_bg_6">#e9d2fd</color> <!-- Material Purple 100 -->
|
||||
<color name="bt_color_bg_7">#cbf0f8</color> <!-- Material Cyan 100 -->
|
||||
|
||||
|
||||
<color name="dark_mode_icon_color_single_tone">#99000000</color>
|
||||
<color name="light_mode_icon_color_single_tone">#ffffff</color>
|
||||
|
||||
<color name="user_avatar_color_bg">?android:attr/colorBackgroundFloating</color>
|
||||
</resources>
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_activated="true"
|
||||
android:color="@color/kg_user_switcher_avatar_background" />
|
||||
<item android:color="@color/kg_user_switcher_avatar_background" />
|
||||
android:color="@color/user_avatar_color_bg" />
|
||||
<item android:color="@color/user_avatar_color_bg" />
|
||||
</selector>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</item>
|
||||
<!-- Where the user drawable/bitmap will be placed -->
|
||||
<item
|
||||
android:drawable="@drawable/kg_bg_avatar"
|
||||
android:drawable="@drawable/user_avatar_bg"
|
||||
android:width="@dimen/bouncer_user_switcher_icon_size"
|
||||
android:height="@dimen/bouncer_user_switcher_icon_size"
|
||||
android:top="@dimen/user_switcher_icon_large_margin"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
(e.g. cannot be switched to) -->
|
||||
<color name="kg_user_switcher_restricted_avatar_icon_color">@color/GM2_grey_600</color>
|
||||
<!-- Color of background circle of user avatars in keyguard user switcher -->
|
||||
<color name="kg_user_switcher_avatar_background">?android:attr/colorBackgroundFloating</color>
|
||||
<color name="user_avatar_color_bg">?android:attr/colorBackgroundFloating</color>
|
||||
|
||||
<!-- Icon color for user avatars in user switcher quick settings -->
|
||||
<color name="qs_user_switcher_avatar_icon_color">#3C4043</color>
|
||||
|
||||
@@ -918,7 +918,7 @@ public class KeyguardSecurityContainer extends FrameLayout {
|
||||
}
|
||||
drawable.setTint(iconColor);
|
||||
|
||||
Drawable bg = context.getDrawable(R.drawable.kg_bg_avatar);
|
||||
Drawable bg = context.getDrawable(R.drawable.user_avatar_bg);
|
||||
bg.setTintBlendMode(BlendMode.DST);
|
||||
bg.setTint(Utils.getColorAttrDefaultColor(context,
|
||||
com.android.internal.R.attr.colorSurfaceVariant));
|
||||
|
||||
@@ -267,7 +267,7 @@ public class KeyguardQsUserSwitchController extends ViewController<FrameLayout>
|
||||
drawable = new CircleFramedDrawable(mCurrentUser.picture, avatarSize);
|
||||
}
|
||||
|
||||
Drawable bg = mContext.getDrawable(R.drawable.kg_bg_avatar);
|
||||
Drawable bg = mContext.getDrawable(R.drawable.user_avatar_bg);
|
||||
drawable = new LayerDrawable(new Drawable[]{bg, drawable});
|
||||
return drawable;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ public class KeyguardUserSwitcherController extends ViewController<KeyguardUserS
|
||||
}
|
||||
drawable.setTint(mResources.getColor(iconColorRes, mContext.getTheme()));
|
||||
|
||||
Drawable bg = mContext.getDrawable(R.drawable.kg_bg_avatar);
|
||||
Drawable bg = mContext.getDrawable(R.drawable.user_avatar_bg);
|
||||
drawable = new LayerDrawable(new Drawable[]{bg, drawable});
|
||||
return drawable;
|
||||
}
|
||||
|
||||
@@ -982,9 +982,9 @@ public class UserSwitcherController implements Dumpable {
|
||||
protected static Drawable getIconDrawable(Context context, UserRecord item) {
|
||||
int iconRes;
|
||||
if (item.isAddUser) {
|
||||
iconRes = R.drawable.ic_account_circle;
|
||||
} else if (item.isGuest) {
|
||||
iconRes = R.drawable.ic_account_circle_filled;
|
||||
} else if (item.isGuest) {
|
||||
iconRes = R.drawable.ic_account_circle;
|
||||
} else if (item.isAddSupervisedUser) {
|
||||
iconRes = R.drawable.ic_add_supervised_user;
|
||||
} else {
|
||||
|
||||
@@ -80,8 +80,8 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {
|
||||
Notification.Action firstAction =
|
||||
createActionBuilder("same", R.drawable.ic_corp_icon, pendingIntent).build();
|
||||
Notification.Action secondAction =
|
||||
createActionBuilder("same", R.drawable.ic_account_circle, pendingIntent)
|
||||
.build();
|
||||
createActionBuilder("same", com.android.settingslib.R.drawable.ic_account_circle,
|
||||
pendingIntent).build();
|
||||
|
||||
assertThat(NotificationUiAdjustment.needReinflate(
|
||||
createUiAdjustmentFromSmartActions("first", Collections.singletonList(firstAction)),
|
||||
|
||||
Reference in New Issue
Block a user