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

Commit b77c13a1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use IntentFilter CREATOR directly for serializing ParsedIntentInfo"...

Merge "Use IntentFilter CREATOR directly for serializing ParsedIntentInfo" into sc-dev am: 3835717f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15110947

Change-Id: I65e6b17ecf2c3a5e124043851c6dff745868094d
parents 3fd42db7 3835717f
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -245,7 +245,6 @@ import android.content.pm.parsing.ParsingPackageUtils;
import android.content.pm.parsing.ParsingPackageUtils.ParseFlags;
import android.content.pm.parsing.component.ParsedActivity;
import android.content.pm.parsing.component.ParsedInstrumentation;
import android.content.pm.parsing.component.ParsedIntentInfo;
import android.content.pm.parsing.component.ParsedMainComponent;
import android.content.pm.parsing.component.ParsedPermission;
import android.content.pm.parsing.component.ParsedPermissionGroup;
@@ -17102,9 +17101,15 @@ public class PackageManagerService extends IPackageManager.Stub
            return new ParceledListSlice<IntentFilter>(result) {
                @Override
                protected void writeElement(IntentFilter parcelable, Parcel dest, int callFlags) {
                    // WatchedIntentFilter has final Parcelable methods, so redirect to the subclass
                    ((ParsedIntentInfo) parcelable).writeIntentInfoToParcel(dest,
                            callFlags);
                    parcelable.writeToParcel(dest, callFlags);
                }
                @Override
                protected void writeParcelableCreator(IntentFilter parcelable, Parcel dest) {
                    // All Parcel#writeParcelableCreator does is serialize the class name to
                    // access via reflection to grab its CREATOR. This does that manually, pointing
                    // to the parent IntentFilter so that all of the subclass fields are ignored.
                    dest.writeString(IntentFilter.class.getName());
                }
            };
        }