Skip to content

Commit 73f5618

Browse files
maniac103Danny Baumann
authored andcommitted
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)
1 parent 54a2a6d commit 73f5618

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

telephony/java/com/android/internal/telephony/cat/CommandDetails.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ public boolean compareTo(CommandDetails other) {
4848
}
4949

5050
public CommandDetails(Parcel in) {
51-
compRequired = true;
51+
compRequired = in.readInt() != 0;
5252
commandNumber = in.readInt();
5353
typeOfCommand = in.readInt();
5454
commandQualifier = in.readInt();
5555
}
5656

5757
public void writeToParcel(Parcel dest, int flags) {
58+
dest.writeInt(compRequired ? 1 : 0);
5859
dest.writeInt(commandNumber);
5960
dest.writeInt(typeOfCommand);
6061
dest.writeInt(commandQualifier);
@@ -103,4 +104,4 @@ class ItemsIconId extends ValueObject {
103104
ComprehensionTlvTag getTag() {
104105
return ComprehensionTlvTag.ITEM_ICON_ID_LIST;
105106
}
106-
}
107+
}

0 commit comments

Comments
 (0)