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

Commit af4ef3cd authored by Willie Koomson's avatar Willie Koomson Committed by Android (Google) Code Review
Browse files

Merge "Write UID in RemoteViews proto" into main

parents 96a4ea37 7a05fd78
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -10082,6 +10082,7 @@ public class RemoteViews implements Parcelable, Filter {
        if (mApplication != null) {
            // mApplication may be null if this was created with DrawInstructions constructor.
            out.write(RemoteViewsProto.PACKAGE_NAME, mApplication.packageName);
            out.write(RemoteViewsProto.UID, mApplication.uid);
        }
        Resources appResources = getContextForResourcesEnsuringCorrectCachedApkPaths(
                context).getResources();
@@ -10163,6 +10164,7 @@ public class RemoteViews implements Parcelable, Filter {
            int mApplyFlags = 0;
            long mProviderInstanceId = -1;
            String mPackageName = null;
            Integer mUid = null;
            SizeF mIdealSize = null;
            String mLayoutResName = null;
            String mLightBackgroundResName = null;
@@ -10185,6 +10187,9 @@ public class RemoteViews implements Parcelable, Filter {
                    case (int) RemoteViewsProto.PACKAGE_NAME:
                        ref.mPackageName = in.readString(RemoteViewsProto.PACKAGE_NAME);
                        break;
                    case (int) RemoteViewsProto.UID:
                        ref.mUid = in.readInt(RemoteViewsProto.UID);
                        break;
                    case (int) RemoteViewsProto.IDEAL_SIZE:
                        final long idealSizeToken = in.start(RemoteViewsProto.IDEAL_SIZE);
                        ref.mIdealSize = createSizeFFromProto(in);
@@ -10286,8 +10291,9 @@ public class RemoteViews implements Parcelable, Filter {
            Resources appResources = null;
            if (!ref.mHasDrawInstructions) {
                checkProtoResultNotNull(ref.mPackageName, "No application info");
                rv.mApplication = context.getPackageManager().getApplicationInfo(ref.mPackageName,
                        /* flags= */ 0);
                checkProtoResultNotNull(ref.mUid, "No uid");
                rv.mApplication = context.getPackageManager().getApplicationInfoAsUser(
                        ref.mPackageName, /* flags= */ 0, UserHandle.getUserId(ref.mUid));
                appContext = rv.getContextForResourcesEnsuringCorrectCachedApkPaths(context);
                appResources = appContext.getResources();

+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ message RemoteViewsProto {
    repeated bytes bitmap_cache = 14;
    optional RemoteCollectionCache remote_collection_cache = 15;
    repeated Action actions = 16;
    optional int32 uid = 17;

    message RemoteCollectionCache {
        message Entry {