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

Commit 1568c56d authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Tint the work icon.

Bug: 64475406
Test: Manual
Change-Id: Ibe817a9c099439db91aca1a858e5cf5562fa6a4a
parent 99d524e5
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settings.deviceinfo.storage;
import android.content.Context;
import android.content.Intent;
import android.content.pm.UserInfo;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.storage.VolumeInfo;
@@ -126,7 +127,14 @@ public class UserProfileController extends AbstractPreferenceController implemen
    public void handleUserIcons(SparseArray<Drawable> fetchedIcons) {
        Drawable userIcon = fetchedIcons.get(mUser.id);
        if (userIcon != null) {
            mStoragePreference.setIcon(userIcon);
            mStoragePreference.setIcon(applyTint(mContext, userIcon));
        }
    }

    private static Drawable applyTint(Context context, Drawable icon) {
        icon = icon.mutate();
        icon.setTint(Utils.getColorAttr(context, android.R.attr.colorControlNormal));
        return icon;
    }

}