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

Commit 9acb5402 authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Adds handle to NanoAppInstanceInfo Parcel

- Since mHandle (UID) was not recorded in writeToParcel, it always
returned 0 as the UID. This resulted in error messages claiming
mismatches between the reported and actual UID of nanoapps when called
from an external process.
- Also fixes the Parcel constructor to actually read the mContexthubId
field.

Bug: 37785458
Test: Compile and load, verify error message doesn't appear
Change-Id: I2ff75f510aae549c741786f5746862256ea5a877
parent 4f65a357
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -287,8 +287,10 @@ public class NanoAppInstanceInfo {
        mPublisher = in.readString();
        mName = in.readString();

        mHandle = in.readInt();
        mAppId = in.readLong();
        mAppVersion = in.readInt();
        mContexthubId = in.readInt();
        mNeededReadMemBytes = in.readInt();
        mNeededWriteMemBytes = in.readInt();
        mNeededExecMemBytes = in.readInt();
@@ -309,6 +311,8 @@ public class NanoAppInstanceInfo {
    public void writeToParcel(Parcel out, int flags) {
        out.writeString(mPublisher);
        out.writeString(mName);

        out.writeInt(mHandle);
        out.writeLong(mAppId);
        out.writeInt(mAppVersion);
        out.writeInt(mContexthubId);