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)
This commit is contained in:
Danny Baumann
2011-07-13 09:13:35 +02:00
committed by Danny Baumann
parent 54a2a6df41
commit 73f5618ab4

View File

@@ -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);
@@ -103,4 +104,4 @@ class ItemsIconId extends ValueObject {
ComprehensionTlvTag getTag() {
return ComprehensionTlvTag.ITEM_ICON_ID_LIST;
}
}
}