Merge "Fix an issue that the icon rewritten logic not working in non-primary user" into rvc-dev am: 629a9d119b am: 1c60c56087
Change-Id: I2b3bc51d5c6d6e0b23e2f6f170724208b41c6a5f
This commit is contained in:
@@ -5477,13 +5477,14 @@
|
|||||||
<service android:name="com.android.server.pm.PackageManagerShellCommandDataLoader"
|
<service android:name="com.android.server.pm.PackageManagerShellCommandDataLoader"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.LOAD_DATA" />
|
<action android:name="android.intent.action.LOAD_DATA"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="com.android.server.textclassifier.IconsContentProvider"
|
android:name="com.android.server.textclassifier.IconsContentProvider"
|
||||||
android:authorities="com.android.textclassifier.icons"
|
android:authorities="com.android.textclassifier.icons"
|
||||||
|
android:singleUser="true"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
</provider>
|
</provider>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import android.graphics.drawable.Icon;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
import android.os.ParcelFileDescriptor.AutoCloseOutputStream;
|
import android.os.ParcelFileDescriptor.AutoCloseOutputStream;
|
||||||
|
import android.os.UserHandle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
@@ -51,7 +52,7 @@ public final class IconsContentProvider extends ContentProvider {
|
|||||||
try {
|
try {
|
||||||
final ResourceInfo res = IconsUriHelper.getInstance().getResourceInfo(uri);
|
final ResourceInfo res = IconsUriHelper.getInstance().getResourceInfo(uri);
|
||||||
final Drawable drawable = Icon.createWithResource(res.packageName, res.id)
|
final Drawable drawable = Icon.createWithResource(res.packageName, res.id)
|
||||||
.loadDrawable(getContext());
|
.loadDrawableAsUser(getContext(), UserHandle.getCallingUserId());
|
||||||
final byte[] data = getBitmapData(drawable);
|
final byte[] data = getBitmapData(drawable);
|
||||||
final ParcelFileDescriptor[] pipe = ParcelFileDescriptor.createPipe();
|
final ParcelFileDescriptor[] pipe = ParcelFileDescriptor.createPipe();
|
||||||
final ParcelFileDescriptor readSide = pipe[0];
|
final ParcelFileDescriptor readSide = pipe[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user