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

Commit a9e321d1 authored by Tony Mak's avatar Tony Mak Committed by Automerger Merge Worker
Browse files

Merge "Fix an issue that the icon rewritten logic not working in non-primary...

Merge "Fix an issue that the icon rewritten logic not working in non-primary user" into rvc-dev am: 629a9d11 am: 1c60c560 am: a0789979

Change-Id: I77a58e6495991cb102c2aaa02ec55a5ef0fa83e6
parents fa4bced5 a0789979
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5484,6 +5484,7 @@
        <provider
            android:name="com.android.server.textclassifier.IconsContentProvider"
            android:authorities="com.android.textclassifier.icons"
            android:singleUser="true"
            android:enabled="true"
            android:exported="true">
        </provider>
+2 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.graphics.drawable.Icon;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.os.ParcelFileDescriptor.AutoCloseOutputStream;
import android.os.UserHandle;
import android.util.Log;

import com.android.internal.annotations.VisibleForTesting;
@@ -51,7 +52,7 @@ public final class IconsContentProvider extends ContentProvider {
        try {
            final ResourceInfo res = IconsUriHelper.getInstance().getResourceInfo(uri);
            final Drawable drawable = Icon.createWithResource(res.packageName, res.id)
                    .loadDrawable(getContext());
                    .loadDrawableAsUser(getContext(), UserHandle.getCallingUserId());
            final byte[] data = getBitmapData(drawable);
            final ParcelFileDescriptor[] pipe = ParcelFileDescriptor.createPipe();
            final ParcelFileDescriptor readSide = pipe[0];