Skip to content

Commit a27353c

Browse files
Alex YakavenkaJean-Baptiste Queru
authored andcommitted
Cat: Generalize stk into cat
Rename all stk classes, comments and variables into cat classes. Cat (Card Application Toolkit) is the common class that has functionality of both Stk and Ccat. Change-Id: Id0b99d0d9f4b0ce49adcb436060f13d5341ab8ab
1 parent 3d9e169 commit a27353c

37 files changed

+176
-176
lines changed

telephony/java/com/android/internal/telephony/BaseCommands.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ public abstract class BaseCommands implements CommandsInterface {
7373
protected Registrant mSmsOnSimRegistrant;
7474
protected Registrant mSmsStatusRegistrant;
7575
protected Registrant mSsnRegistrant;
76-
protected Registrant mStkSessionEndRegistrant;
77-
protected Registrant mStkProCmdRegistrant;
78-
protected Registrant mStkEventRegistrant;
79-
protected Registrant mStkCallSetUpRegistrant;
76+
protected Registrant mCatSessionEndRegistrant;
77+
protected Registrant mCatProCmdRegistrant;
78+
protected Registrant mCatEventRegistrant;
79+
protected Registrant mCatCallSetUpRegistrant;
8080
protected Registrant mIccSmsFullRegistrant;
8181
protected Registrant mEmergencyCallbackModeRegistrant;
8282
protected Registrant mIccRefreshRegistrant;
@@ -395,36 +395,36 @@ public void unSetOnSuppServiceNotification(Handler h) {
395395
mSsnRegistrant.clear();
396396
}
397397

398-
public void setOnStkSessionEnd(Handler h, int what, Object obj) {
399-
mStkSessionEndRegistrant = new Registrant (h, what, obj);
398+
public void setOnCatSessionEnd(Handler h, int what, Object obj) {
399+
mCatSessionEndRegistrant = new Registrant (h, what, obj);
400400
}
401401

402-
public void unSetOnStkSessionEnd(Handler h) {
403-
mStkSessionEndRegistrant.clear();
402+
public void unSetOnCatSessionEnd(Handler h) {
403+
mCatSessionEndRegistrant.clear();
404404
}
405405

406-
public void setOnStkProactiveCmd(Handler h, int what, Object obj) {
407-
mStkProCmdRegistrant = new Registrant (h, what, obj);
406+
public void setOnCatProactiveCmd(Handler h, int what, Object obj) {
407+
mCatProCmdRegistrant = new Registrant (h, what, obj);
408408
}
409409

410-
public void unSetOnStkProactiveCmd(Handler h) {
411-
mStkProCmdRegistrant.clear();
410+
public void unSetOnCatProactiveCmd(Handler h) {
411+
mCatProCmdRegistrant.clear();
412412
}
413413

414-
public void setOnStkEvent(Handler h, int what, Object obj) {
415-
mStkEventRegistrant = new Registrant (h, what, obj);
414+
public void setOnCatEvent(Handler h, int what, Object obj) {
415+
mCatEventRegistrant = new Registrant (h, what, obj);
416416
}
417417

418-
public void unSetOnStkEvent(Handler h) {
419-
mStkEventRegistrant.clear();
418+
public void unSetOnCatEvent(Handler h) {
419+
mCatEventRegistrant.clear();
420420
}
421421

422-
public void setOnStkCallSetUp(Handler h, int what, Object obj) {
423-
mStkCallSetUpRegistrant = new Registrant (h, what, obj);
422+
public void setOnCatCallSetUp(Handler h, int what, Object obj) {
423+
mCatCallSetUpRegistrant = new Registrant (h, what, obj);
424424
}
425425

426-
public void unSetOnStkCallSetUp(Handler h) {
427-
mStkCallSetUpRegistrant.clear();
426+
public void unSetOnCatCallSetUp(Handler h) {
427+
mCatCallSetUpRegistrant.clear();
428428
}
429429

430430
public void setOnIccSmsFull(Handler h, int what, Object obj) {

telephony/java/com/android/internal/telephony/CommandsInterface.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,48 +374,48 @@ public boolean isCdma() {
374374
void unSetOnSuppServiceNotification(Handler h);
375375

376376
/**
377-
* Sets the handler for Session End Notifications for STK.
377+
* Sets the handler for Session End Notifications for CAT.
378378
* Unlike the register* methods, there's only one notification handler
379379
*
380380
* @param h Handler for notification message.
381381
* @param what User-defined message code.
382382
* @param obj User object.
383383
*/
384-
void setOnStkSessionEnd(Handler h, int what, Object obj);
385-
void unSetOnStkSessionEnd(Handler h);
384+
void setOnCatSessionEnd(Handler h, int what, Object obj);
385+
void unSetOnCatSessionEnd(Handler h);
386386

387387
/**
388-
* Sets the handler for Proactive Commands for STK.
388+
* Sets the handler for Proactive Commands for CAT.
389389
* Unlike the register* methods, there's only one notification handler
390390
*
391391
* @param h Handler for notification message.
392392
* @param what User-defined message code.
393393
* @param obj User object.
394394
*/
395-
void setOnStkProactiveCmd(Handler h, int what, Object obj);
396-
void unSetOnStkProactiveCmd(Handler h);
395+
void setOnCatProactiveCmd(Handler h, int what, Object obj);
396+
void unSetOnCatProactiveCmd(Handler h);
397397

398398
/**
399-
* Sets the handler for Event Notifications for STK.
399+
* Sets the handler for Event Notifications for CAT.
400400
* Unlike the register* methods, there's only one notification handler
401401
*
402402
* @param h Handler for notification message.
403403
* @param what User-defined message code.
404404
* @param obj User object.
405405
*/
406-
void setOnStkEvent(Handler h, int what, Object obj);
407-
void unSetOnStkEvent(Handler h);
406+
void setOnCatEvent(Handler h, int what, Object obj);
407+
void unSetOnCatEvent(Handler h);
408408

409409
/**
410-
* Sets the handler for Call Set Up Notifications for STK.
410+
* Sets the handler for Call Set Up Notifications for CAT.
411411
* Unlike the register* methods, there's only one notification handler
412412
*
413413
* @param h Handler for notification message.
414414
* @param what User-defined message code.
415415
* @param obj User object.
416416
*/
417-
void setOnStkCallSetUp(Handler h, int what, Object obj);
418-
void unSetOnStkCallSetUp(Handler h);
417+
void setOnCatCallSetUp(Handler h, int what, Object obj);
418+
void unSetOnCatCallSetUp(Handler h);
419419

420420
/**
421421
* Enables/disbables supplementary service related notifications from

telephony/java/com/android/internal/telephony/RIL.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,35 +2481,35 @@ private RILRequest findAndRemoveRequestFromList(int serial) {
24812481
case RIL_UNSOL_STK_SESSION_END:
24822482
if (RILJ_LOGD) unsljLog(response);
24832483

2484-
if (mStkSessionEndRegistrant != null) {
2485-
mStkSessionEndRegistrant.notifyRegistrant(
2484+
if (mCatSessionEndRegistrant != null) {
2485+
mCatSessionEndRegistrant.notifyRegistrant(
24862486
new AsyncResult (null, ret, null));
24872487
}
24882488
break;
24892489

24902490
case RIL_UNSOL_STK_PROACTIVE_COMMAND:
24912491
if (RILJ_LOGD) unsljLogRet(response, ret);
24922492

2493-
if (mStkProCmdRegistrant != null) {
2494-
mStkProCmdRegistrant.notifyRegistrant(
2493+
if (mCatProCmdRegistrant != null) {
2494+
mCatProCmdRegistrant.notifyRegistrant(
24952495
new AsyncResult (null, ret, null));
24962496
}
24972497
break;
24982498

24992499
case RIL_UNSOL_STK_EVENT_NOTIFY:
25002500
if (RILJ_LOGD) unsljLogRet(response, ret);
25012501

2502-
if (mStkEventRegistrant != null) {
2503-
mStkEventRegistrant.notifyRegistrant(
2502+
if (mCatEventRegistrant != null) {
2503+
mCatEventRegistrant.notifyRegistrant(
25042504
new AsyncResult (null, ret, null));
25052505
}
25062506
break;
25072507

25082508
case RIL_UNSOL_STK_CALL_SETUP:
25092509
if (RILJ_LOGD) unsljLogRet(response, ret);
25102510

2511-
if (mStkCallSetUpRegistrant != null) {
2512-
mStkCallSetUpRegistrant.notifyRegistrant(
2511+
if (mCatCallSetUpRegistrant != null) {
2512+
mCatCallSetUpRegistrant.notifyRegistrant(
25132513
new AsyncResult (null, ret, null));
25142514
}
25152515
break;

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.android.internal.telephony.gsm.stk;
17+
package com.android.internal.telephony.cat;
1818

1919
/**
20-
* Interface for communication between STK App and STK Telephony
20+
* Interface for communication between STK App and CAT Telephony
2121
*
2222
* {@hide}
2323
*/
2424
public interface AppInterface {
2525

2626
/*
27-
* Intent's actions which are broadcasted by the Telephony once a new STK
27+
* Intent's actions which are broadcasted by the Telephony once a new CAT
2828
* proactive command, session end arrive.
2929
*/
30-
public static final String STK_CMD_ACTION =
30+
public static final String CAT_CMD_ACTION =
3131
"android.intent.action.stk.command";
32-
public static final String STK_SESSION_END_ACTION =
32+
public static final String CAT_SESSION_END_ACTION =
3333
"android.intent.action.stk.session_end";
3434

3535
/*
3636
* Callback function from app to telephony to pass a result code and user's
37-
* input back to the SIM.
37+
* input back to the ICC.
3838
*/
39-
void onCmdResponse(StkResponseMessage resMsg);
39+
void onCmdResponse(CatResponseMessage resMsg);
4040

4141
/*
4242
* Enumeration for representing "Type of Command" of proactive commands.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.android.internal.telephony.gsm.stk;
17+
package com.android.internal.telephony.cat;
1818

1919
import java.util.List;
2020

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.android.internal.telephony.gsm.stk;
17+
package com.android.internal.telephony.cat;
1818

1919
import android.os.Parcel;
2020
import android.os.Parcelable;
2121

2222
/**
23-
* Class used to pass STK messages from telephony to application. Application
23+
* Class used to pass CAT messages from telephony to application. Application
2424
* should call getXXX() to get commands's specific values.
2525
*
2626
*/
27-
public class StkCmdMessage implements Parcelable {
27+
public class CatCmdMessage implements Parcelable {
2828
// members
2929
CommandDetails mCmdDet;
3030
private TextMessage mTextMsg;
@@ -50,7 +50,7 @@ public class CallSettings {
5050
public TextMessage callMsg;
5151
}
5252

53-
StkCmdMessage(CommandParams cmdParams) {
53+
CatCmdMessage(CommandParams cmdParams) {
5454
mCmdDet = cmdParams.cmdDet;
5555
switch(getCmdType()) {
5656
case SET_UP_MENU:
@@ -88,7 +88,7 @@ public class CallSettings {
8888
}
8989
}
9090

91-
public StkCmdMessage(Parcel in) {
91+
public CatCmdMessage(Parcel in) {
9292
mCmdDet = in.readParcelable(null);
9393
mTextMsg = in.readParcelable(null);
9494
mMenu = in.readParcelable(null);
@@ -130,13 +130,13 @@ public void writeToParcel(Parcel dest, int flags) {
130130
}
131131
}
132132

133-
public static final Parcelable.Creator<StkCmdMessage> CREATOR = new Parcelable.Creator<StkCmdMessage>() {
134-
public StkCmdMessage createFromParcel(Parcel in) {
135-
return new StkCmdMessage(in);
133+
public static final Parcelable.Creator<CatCmdMessage> CREATOR = new Parcelable.Creator<CatCmdMessage>() {
134+
public CatCmdMessage createFromParcel(Parcel in) {
135+
return new CatCmdMessage(in);
136136
}
137137

138-
public StkCmdMessage[] newArray(int size) {
139-
return new StkCmdMessage[size];
138+
public CatCmdMessage[] newArray(int size) {
139+
return new CatCmdMessage[size];
140140
}
141141
};
142142

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.android.internal.telephony.gsm.stk;
17+
package com.android.internal.telephony.cat;
1818

1919
import android.util.AndroidException;
2020

2121

2222
/**
23-
* Base class for all the exceptions in STK service.
23+
* Base class for all the exceptions in CAT service.
2424
*
2525
* {@hide}
2626
*/
27-
class StkException extends AndroidException {
28-
public StkException() {
27+
class CatException extends AndroidException {
28+
public CatException() {
2929
super();
3030
}
3131
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.android.internal.telephony.gsm.stk;
17+
package com.android.internal.telephony.cat;
1818

1919
import android.util.Log;
2020

21-
public abstract class StkLog {
21+
public abstract class CatLog {
2222
static final boolean DEBUG = true;
2323

2424
public static void d(Object caller, String msg) {
@@ -27,7 +27,7 @@ public static void d(Object caller, String msg) {
2727
}
2828

2929
String className = caller.getClass().getName();
30-
Log.d("STK", className.substring(className.lastIndexOf('.') + 1) + ": "
30+
Log.d("CAT", className.substring(className.lastIndexOf('.') + 1) + ": "
3131
+ msg);
3232
}
3333

@@ -36,6 +36,6 @@ public static void d(String caller, String msg) {
3636
return;
3737
}
3838

39-
Log.d("STK", caller + ": " + msg);
39+
Log.d("CAT", caller + ": " + msg);
4040
}
4141
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.android.internal.telephony.gsm.stk;
17+
package com.android.internal.telephony.cat;
1818

19-
public class StkResponseMessage {
19+
public class CatResponseMessage {
2020
CommandDetails cmdDet = null;
2121
ResultCode resCode = ResultCode.OK;
2222
int usersMenuSelection = 0;
2323
String usersInput = null;
2424
boolean usersYesNoSelection = false;
2525
boolean usersConfirm = false;
2626

27-
public StkResponseMessage(StkCmdMessage cmdMsg) {
27+
public CatResponseMessage(CatCmdMessage cmdMsg) {
2828
this.cmdDet = cmdMsg.mCmdDet;
2929
}
3030

0 commit comments

Comments
 (0)