From 73f5618ab45a5361baa23656d4b2b06d8b2a8d46 Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Wed, 13 Jul 2011 09:13:35 +0200 Subject: 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) --- .../java/com/android/internal/telephony/cat/CommandDetails.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'telephony') diff --git a/telephony/java/com/android/internal/telephony/cat/CommandDetails.java b/telephony/java/com/android/internal/telephony/cat/CommandDetails.java index e3f0798..bb875be 100644 --- a/telephony/java/com/android/internal/telephony/cat/CommandDetails.java +++ b/telephony/java/com/android/internal/telephony/cat/CommandDetails.java @@ -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; } -} \ No newline at end of file +} -- cgit v1.1