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

Commit 73f5618a authored by Danny Baumann's avatar Danny Baumann Committed by Danny Baumann
Browse files

Parcel compRequired flag correctly.

This should fix a couple of cases (e.g. SET_UP_MENU responses for Dual
SIM adapters) whether a command response would be rejected due to a
compRequired flag mismatch between the command sent to the Stk app and
the response received from it.

The problem was:
- STK service received command without compRequired flag set
- it passes it to the STK app, which sees compRequired set
- STK app passes back the response with the user selection
- STK service gets the response, which has compRequired set
- it discards the response, as the command details don't match
  (CatService.java:646)
parent 54a2a6df
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -48,13 +48,14 @@ class CommandDetails extends ValueObject implements Parcelable {
    }

    public CommandDetails(Parcel in) {
        compRequired = true;
        compRequired = in.readInt() != 0;
        commandNumber = in.readInt();
        typeOfCommand = in.readInt();
        commandQualifier = in.readInt();
    }

    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(compRequired ? 1 : 0);
        dest.writeInt(commandNumber);
        dest.writeInt(typeOfCommand);
        dest.writeInt(commandQualifier);