Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 474cd3f4 authored by Amit Kumar's avatar Amit Kumar 💻 Committed by Romain Hunault
Browse files

Update user icons

Change-Id: I560753b0bade38785987e43abdaf7b2cb35ccb74
parent cd58be58
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -30,15 +30,15 @@ import com.android.internal.R;
 */
public class UserIcons {

    private static final int[] USER_ICON_COLORS = {
        R.color.user_icon_1,
        R.color.user_icon_2,
        R.color.user_icon_3,
        R.color.user_icon_4,
        R.color.user_icon_5,
        R.color.user_icon_6,
        R.color.user_icon_7,
        R.color.user_icon_8
    private static final int[] USER_ICON_DRAWABLES = {
        R.drawable.ic_user_icon_0,
        R.drawable.ic_user_icon_1,
        R.drawable.ic_user_icon_2,
        R.drawable.ic_user_icon_3,
        R.drawable.ic_user_icon_4,
        R.drawable.ic_user_icon_5,
        R.drawable.ic_user_icon_6,
        R.drawable.ic_user_icon_7
    };

    /**
@@ -65,13 +65,12 @@ public class UserIcons {
     * @param light whether we want a light icon (suitable for a dark background)
     */
    public static Drawable getDefaultUserIcon(int userId, boolean light) {
        int colorResId = light ? R.color.user_icon_default_white : R.color.user_icon_default_gray;
        int drawableResId = R.drawable.ic_user_icon_gray;
        if (userId != UserHandle.USER_NULL) {
            // Return colored icon instead
            colorResId = USER_ICON_COLORS[userId % USER_ICON_COLORS.length];
            drawableResId = USER_ICON_DRAWABLES[userId % USER_ICON_DRAWABLES.length];
        }
        Drawable icon = Resources.getSystem().getDrawable(R.drawable.ic_account_circle, null).mutate();
        icon.setColorFilter(Resources.getSystem().getColor(colorResId, null), Mode.SRC_IN);
        Drawable icon = Resources.getSystem().getDrawable(drawableResId, null);
        icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight());
        return icon;
    }
+21 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="48dp"
    android:height="48dp"
    android:viewportWidth="33"
    android:viewportHeight="33">
  <group>
    <clip-path
        android:pathData="M0.7607,0h32v32h-32z"/>
    <path
        android:pathData="M16.5163,31.4889C7.8052,31.4889 0.7607,24.4444 0.7607,15.7556C0.7607,7.0444 7.8052,0 16.5163,0C25.2052,0 32.2719,7.0444 32.2719,15.7556C32.2496,24.4444 25.2052,31.4889 16.5163,31.4889Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M16.5166,7.0222C14.1601,7.0222 12.2499,8.9325 12.2499,11.2889C12.2499,13.6453 14.1601,15.5556 16.5166,15.5556C18.873,15.5556 20.7832,13.6453 20.7832,11.2889C20.7832,8.9325 18.873,7.0222 16.5166,7.0222ZM10.6943,11.2889C10.6943,8.0734 13.301,5.4667 16.5166,5.4667C19.7321,5.4667 22.3388,8.0734 22.3388,11.2889C22.3388,14.5044 19.7321,17.1111 16.5166,17.1111C13.301,17.1111 10.6943,14.5044 10.6943,11.2889Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
    <path
        android:pathData="M16.4866,17.6666H16.5462C17.4633,17.6666 18.4016,17.6666 19.2676,17.7798C20.15,17.8951 21.0201,18.1343 21.7776,18.657C23.3387,19.734 24.1165,21.7809 24.1165,25.2666C24.1165,25.6962 23.7683,26.0444 23.3387,26.0444C22.9092,26.0444 22.5609,25.6962 22.5609,25.2666C22.5609,21.9301 21.8054,20.5659 20.8943,19.9374C20.4157,19.6072 19.815,19.4201 19.0661,19.3222C18.3102,19.2234 17.4677,19.2222 16.5165,19.2222C15.5596,19.2222 14.7144,19.2234 13.9574,19.3222C13.2075,19.4201 12.6079,19.6072 12.1311,19.9369C11.223,20.5648 10.4721,21.9283 10.4721,25.2666C10.4721,25.6962 10.1238,26.0444 9.6943,26.0444C9.2647,26.0444 8.9165,25.6962 8.9165,25.2666C8.9165,21.7828 9.6878,19.7351 11.2464,18.6574C12.0029,18.1343 12.8727,17.8951 13.7561,17.7798C14.6231,17.6666 15.5641,17.6666 16.4866,17.6666Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
  </group>
</vector>
+21 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="48dp"
    android:height="48dp"
    android:viewportWidth="33"
    android:viewportHeight="33">
  <group>
    <clip-path
        android:pathData="M0.3032,0h32v32h-32z"/>
    <path
        android:pathData="M16.0588,31.4889C7.3477,31.4889 0.3032,24.4444 0.3032,15.7556C0.3032,7.0444 7.3477,0 16.0588,0C24.7477,0 31.8143,7.0444 31.8143,15.7556C31.7921,24.4444 24.7477,31.4889 16.0588,31.4889Z"
        android:fillColor="#F2AE00"/>
    <path
        android:pathData="M16.059,7.0222C13.7026,7.0222 11.7924,8.9325 11.7924,11.2889C11.7924,13.6453 13.7026,15.5556 16.059,15.5556C18.4155,15.5556 20.3257,13.6453 20.3257,11.2889C20.3257,8.9325 18.4155,7.0222 16.059,7.0222ZM10.2368,11.2889C10.2368,8.0734 12.8435,5.4667 16.059,5.4667C19.2746,5.4667 21.8813,8.0734 21.8813,11.2889C21.8813,14.5044 19.2746,17.1111 16.059,17.1111C12.8435,17.1111 10.2368,14.5044 10.2368,11.2889Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
    <path
        android:pathData="M16.0291,17.6666H16.0887C17.0058,17.6666 17.9441,17.6666 18.8101,17.7798C19.6925,17.8951 20.5625,18.1343 21.3201,18.657C22.8812,19.734 23.659,21.7809 23.659,25.2666C23.659,25.6962 23.3108,26.0444 22.8812,26.0444C22.4516,26.0444 22.1034,25.6962 22.1034,25.2666C22.1034,21.9301 21.3478,20.5659 20.4368,19.9374C19.9582,19.6072 19.3574,19.4201 18.6085,19.3222C17.8527,19.2234 17.0102,19.2222 16.059,19.2222C15.1021,19.2222 14.2569,19.2234 13.4999,19.3222C12.75,19.4201 12.1503,19.6072 11.6735,19.9369C10.7655,20.5648 10.0145,21.9283 10.0145,25.2666C10.0145,25.6962 9.6663,26.0444 9.2368,26.0444C8.8072,26.0444 8.459,25.6962 8.459,25.2666C8.459,21.7828 9.2303,19.7351 10.7889,18.6574C11.5454,18.1343 12.4152,17.8951 13.2986,17.7798C14.1656,17.6666 15.1066,17.6666 16.0291,17.6666Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
  </group>
</vector>
+21 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="48dp"
    android:height="48dp"
    android:viewportWidth="33"
    android:viewportHeight="33">
  <group>
    <clip-path
        android:pathData="M0.332,0h32v32h-32z"/>
    <path
        android:pathData="M16.0876,31.4889C7.3765,31.4889 0.332,24.4444 0.332,15.7556C0.332,7.0444 7.3765,0 16.0876,0C24.7765,0 31.8431,7.0444 31.8431,15.7556C31.8209,24.4444 24.7765,31.4889 16.0876,31.4889Z"
        android:fillColor="#FF7301"/>
    <path
        android:pathData="M16.0878,7.0222C13.7314,7.0222 11.8212,8.9325 11.8212,11.2889C11.8212,13.6453 13.7314,15.5556 16.0878,15.5556C18.4443,15.5556 20.3545,13.6453 20.3545,11.2889C20.3545,8.9325 18.4443,7.0222 16.0878,7.0222ZM10.2656,11.2889C10.2656,8.0734 12.8723,5.4667 16.0878,5.4667C19.3034,5.4667 21.9101,8.0734 21.9101,11.2889C21.9101,14.5044 19.3034,17.1111 16.0878,17.1111C12.8723,17.1111 10.2656,14.5044 10.2656,11.2889Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
    <path
        android:pathData="M16.0579,17.6666H16.1175C17.0346,17.6666 17.9729,17.6666 18.8389,17.7798C19.7213,17.8951 20.5913,18.1343 21.3489,18.657C22.91,19.734 23.6878,21.7809 23.6878,25.2666C23.6878,25.6962 23.3396,26.0444 22.91,26.0444C22.4805,26.0444 22.1322,25.6962 22.1322,25.2666C22.1322,21.9301 21.3767,20.5659 20.4656,19.9374C19.987,19.6072 19.3862,19.4201 18.6373,19.3222C17.8815,19.2234 17.039,19.2222 16.0878,19.2222C15.1309,19.2222 14.2857,19.2234 13.5287,19.3222C12.7788,19.4201 12.1792,19.6072 11.7024,19.9369C10.7943,20.5648 10.0433,21.9283 10.0433,25.2666C10.0433,25.6962 9.6951,26.0444 9.2656,26.0444C8.836,26.0444 8.4878,25.6962 8.4878,25.2666C8.4878,21.7828 9.2591,19.7351 10.8177,18.6574C11.5742,18.1343 12.444,17.8951 13.3274,17.7798C14.1944,17.6666 15.1354,17.6666 16.0579,17.6666Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
  </group>
</vector>
+21 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="48dp"
    android:height="48dp"
    android:viewportWidth="33"
    android:viewportHeight="33">
  <group>
    <clip-path
        android:pathData="M0.3896,0h32v32h-32z"/>
    <path
        android:pathData="M16.1452,31.4889C7.4341,31.4889 0.3896,24.4444 0.3896,15.7556C0.3896,7.0444 7.4341,0 16.1452,0C24.8341,0 31.9008,7.0444 31.9008,15.7556C31.8785,24.4444 24.8341,31.4889 16.1452,31.4889Z"
        android:fillColor="#E83A52"/>
    <path
        android:pathData="M16.1455,7.0222C13.7891,7.0222 11.8788,8.9325 11.8788,11.2889C11.8788,13.6453 13.7891,15.5556 16.1455,15.5556C18.5019,15.5556 20.4121,13.6453 20.4121,11.2889C20.4121,8.9325 18.5019,7.0222 16.1455,7.0222ZM10.3232,11.2889C10.3232,8.0734 12.9299,5.4667 16.1455,5.4667C19.361,5.4667 21.9677,8.0734 21.9677,11.2889C21.9677,14.5044 19.361,17.1111 16.1455,17.1111C12.9299,17.1111 10.3232,14.5044 10.3232,11.2889Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
    <path
        android:pathData="M16.1155,17.6666H16.1751C17.0923,17.6666 18.0305,17.6666 18.8965,17.7798C19.7789,17.8951 20.649,18.1343 21.4065,18.657C22.9676,19.734 23.7454,21.7809 23.7454,25.2666C23.7454,25.6962 23.3972,26.0444 22.9676,26.0444C22.5381,26.0444 22.1899,25.6962 22.1899,25.2666C22.1899,21.9301 21.4343,20.5659 20.5232,19.9374C20.0446,19.6072 19.4439,19.4201 18.695,19.3222C17.9391,19.2234 17.0966,19.2222 16.1454,19.2222C15.1885,19.2222 14.3433,19.2234 13.5864,19.3222C12.8364,19.4201 12.2368,19.6072 11.76,19.9369C10.8519,20.5648 10.101,21.9283 10.101,25.2666C10.101,25.6962 9.7527,26.0444 9.3232,26.0444C8.8936,26.0444 8.5454,25.6962 8.5454,25.2666C8.5454,21.7828 9.3167,19.7351 10.8753,18.6574C11.6318,18.1343 12.5016,17.8951 13.385,17.7798C14.252,17.6666 15.193,17.6666 16.1155,17.6666Z"
        android:fillColor="#ffffff"
        android:fillType="evenOdd"/>
  </group>
</vector>
Loading