summaryrefslogtreecommitdiffstats
path: root/src/java/com/android/internal/telephony/RIL.java
diff options
context:
space:
mode:
authorRicardo Cerqueira <github@cerqueira.org>2012-11-22 17:47:31 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2012-11-22 18:10:24 +0100
commitc8c9af02cf790249728c208197034fca005876f8 (patch)
tree0b07df094e58207566ee4fabfb45aba31082ca4c /src/java/com/android/internal/telephony/RIL.java
parent2bc7f2e1da139e183519af01f50940327ca9765e (diff)
downloadframeworks_opt_telephony-c8c9af02cf790249728c208197034fca005876f8.zip
frameworks_opt_telephony-c8c9af02cf790249728c208197034fca005876f8.tar.gz
frameworks_opt_telephony-c8c9af02cf790249728c208197034fca005876f8.tar.bz2
RIL: Make RIL subclassable
Change-Id: I9144ef279ca9c8cb9e657a28342f0f4cb3e7debd
Diffstat (limited to 'src/java/com/android/internal/telephony/RIL.java')
-rw-r--r--src/java/com/android/internal/telephony/RIL.java86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java
index faae72a..c84f031 100644
--- a/src/java/com/android/internal/telephony/RIL.java
+++ b/src/java/com/android/internal/telephony/RIL.java
@@ -201,7 +201,7 @@ class RILRequest {
*
* {@hide}
*/
-public final class RIL extends BaseCommands implements CommandsInterface {
+public class RIL extends BaseCommands implements CommandsInterface {
static final String LOG_TAG = "RILJ";
static final boolean RILJ_LOGD = true;
static final boolean RILJ_LOGV = false; // STOP SHIP if true
@@ -2031,7 +2031,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
//***** Private Methods
- private void sendScreenState(boolean on) {
+ protected void sendScreenState(boolean on) {
RILRequest rr = RILRequest.obtain(RIL_REQUEST_SCREEN_STATE, null);
rr.mp.writeInt(1);
rr.mp.writeInt(on ? 1 : 0);
@@ -2052,7 +2052,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
sendScreenState(true);
}
- private RadioState getRadioStateFromInt(int stateInt) {
+ protected RadioState getRadioStateFromInt(int stateInt) {
RadioState state;
/* RIL_RadioState ril.h */
@@ -2068,7 +2068,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return state;
}
- private void switchToRadioState(RadioState newState) {
+ protected void switchToRadioState(RadioState newState) {
setRadioState(newState);
}
@@ -2105,7 +2105,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
}
}
- private void
+ protected void
send(RILRequest rr) {
Message msg;
@@ -2122,7 +2122,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
msg.sendToTarget();
}
- private void
+ protected void
processResponse (Parcel p) {
int type;
@@ -2142,7 +2142,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
* @param error is the RIL_Errno sent back
* @param loggable true means to print all requests in mRequestslist
*/
- private void clearRequestsList(int error, boolean loggable) {
+ protected void clearRequestsList(int error, boolean loggable) {
RILRequest rr;
synchronized (mRequestsList) {
int count = mRequestsList.size();
@@ -2166,7 +2166,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
}
}
- private RILRequest findAndRemoveRequestFromList(int serial) {
+ protected RILRequest findAndRemoveRequestFromList(int serial) {
synchronized (mRequestsList) {
for (int i = 0, s = mRequestsList.size() ; i < s ; i++) {
RILRequest rr = mRequestsList.get(i);
@@ -2183,7 +2183,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return null;
}
- private void
+ protected void
processSolicited (Parcel p) {
int serial, error;
boolean found = false;
@@ -2396,7 +2396,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
rr.release();
}
- private String
+ protected String
retToString(int req, Object ret) {
if (ret == null) return "";
switch (req) {
@@ -2460,7 +2460,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return s;
}
- private void
+ protected void
processUnsolicited (Parcel p) {
int response;
Object ret;
@@ -2882,7 +2882,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
}
}
- private Object
+ protected Object
responseInts(Parcel p) {
int numInts;
int response[];
@@ -2899,12 +2899,12 @@ public final class RIL extends BaseCommands implements CommandsInterface {
}
- private Object
+ protected Object
responseVoid(Parcel p) {
return null;
}
- private Object
+ protected Object
responseCallForward(Parcel p) {
int numInfos;
CallForwardInfo infos[];
@@ -2927,7 +2927,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return infos;
}
- private Object
+ protected Object
responseSuppServiceNotification(Parcel p) {
SuppServiceNotification notification = new SuppServiceNotification();
@@ -2940,7 +2940,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return notification;
}
- private Object
+ protected Object
responseCdmaSms(Parcel p) {
SmsMessage sms;
sms = SmsMessage.newFromParcel(p);
@@ -2948,7 +2948,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return sms;
}
- private Object
+ protected Object
responseString(Parcel p) {
String response;
@@ -2957,7 +2957,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseStrings(Parcel p) {
int num;
String response[];
@@ -2976,7 +2976,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseRaw(Parcel p) {
int num;
byte response[];
@@ -2986,7 +2986,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseSMS(Parcel p) {
int messageRef, errorCode;
String ackPDU;
@@ -3001,7 +3001,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
}
- private Object
+ protected Object
responseICC_IO(Parcel p) {
int sw1, sw2;
byte data[] = null;
@@ -3020,7 +3020,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return new IccIoResult(sw1, sw2, s);
}
- private Object
+ protected Object
responseIccCardStatus(Parcel p) {
IccCardApplicationStatus appStatus;
@@ -3052,7 +3052,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return cardStatus;
}
- private Object
+ protected Object
responseSimRefresh(Parcel p) {
IccRefreshResponse response = new IccRefreshResponse();
@@ -3062,7 +3062,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseCallList(Parcel p) {
int num;
int voiceSettings;
@@ -3139,7 +3139,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private DataCallState getDataCallState(Parcel p, int version) {
+ protected DataCallState getDataCallState(Parcel p, int version) {
DataCallState dataCall = new DataCallState();
dataCall.version = version;
@@ -3178,7 +3178,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return dataCall;
}
- private Object
+ protected Object
responseDataCallList(Parcel p) {
ArrayList<DataCallState> response;
@@ -3194,7 +3194,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseSetupDataCall(Parcel p) {
int ver = p.readInt();
int num = p.readInt();
@@ -3241,7 +3241,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return dataCall;
}
- private Object
+ protected Object
responseOperatorInfos(Parcel p) {
String strings[] = (String [])responseStrings(p);
ArrayList<OperatorInfo> ret;
@@ -3266,7 +3266,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return ret;
}
- private Object
+ protected Object
responseCellList(Parcel p) {
int num, rssi;
String location;
@@ -3308,7 +3308,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object responseGetPreferredNetworkType(Parcel p) {
+ protected Object responseGetPreferredNetworkType(Parcel p) {
int [] response = (int[]) responseInts(p);
if (response.length >= 1) {
@@ -3320,7 +3320,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object responseGmsBroadcastConfig(Parcel p) {
+ protected Object responseGmsBroadcastConfig(Parcel p) {
int num;
ArrayList<SmsBroadcastConfigInfo> response;
SmsBroadcastConfigInfo info;
@@ -3342,7 +3342,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseCdmaBroadcastConfig(Parcel p) {
int numServiceCategories;
int response[];
@@ -3381,13 +3381,13 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseSignalStrength(Parcel p) {
SignalStrength signalStrength = new SignalStrength(p);
return signalStrength;
}
- private ArrayList<CdmaInformationRecords>
+ protected ArrayList<CdmaInformationRecords>
responseCdmaInformationRecord(Parcel p) {
int numberOfInfoRecs;
ArrayList<CdmaInformationRecords> response;
@@ -3407,7 +3407,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private Object
+ protected Object
responseCdmaCallWaiting(Parcel p) {
CdmaCallWaitingNotification notification = new CdmaCallWaitingNotification();
@@ -3425,7 +3425,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return notification;
}
- private Object
+ protected Object
responseCallRing(Parcel p){
char response[] = new char[4];
@@ -3437,7 +3437,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
return response;
}
- private void
+ protected void
notifyRegistrantsCdmaInfoRec(CdmaInformationRecords infoRec) {
int response = RIL_UNSOL_CDMA_INFO_REC;
if (infoRec.record instanceof CdmaInformationRecords.CdmaDisplayInfoRec) {
@@ -3654,27 +3654,27 @@ public final class RIL extends BaseCommands implements CommandsInterface {
}
}
- private void riljLog(String msg) {
+ protected void riljLog(String msg) {
Log.d(LOG_TAG, msg);
}
- private void riljLogv(String msg) {
+ protected void riljLogv(String msg) {
Log.v(LOG_TAG, msg);
}
- private void unsljLog(int response) {
+ protected void unsljLog(int response) {
riljLog("[UNSL]< " + responseToString(response));
}
- private void unsljLogMore(int response, String more) {
+ protected void unsljLogMore(int response, String more) {
riljLog("[UNSL]< " + responseToString(response) + " " + more);
}
- private void unsljLogRet(int response, Object ret) {
+ protected void unsljLogRet(int response, Object ret) {
riljLog("[UNSL]< " + responseToString(response) + " " + retToString(response, ret));
}
- private void unsljLogvRet(int response, Object ret) {
+ protected void unsljLogvRet(int response, Object ret) {
riljLogv("[UNSL]< " + responseToString(response) + " " + retToString(response, ret));
}