Merge change 3530 into donut

* changes:
  Add RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING & reportStkServiceIsRunning.
This commit is contained in:
Android (Google) Code Review
2009-06-08 23:04:21 -07:00
5 changed files with 28 additions and 4 deletions

View File

@@ -1157,6 +1157,14 @@ public interface CommandsInterface {
*/ */
void reportSmsMemoryStatus(boolean available, Message result); void reportSmsMemoryStatus(boolean available, Message result);
/**
* Indicates to the vendor ril that StkService is running
* rand is eady to receive RIL_UNSOL_STK_XXXX commands.
*
* @param result callback message
*/
void reportStkServiceIsRunning(Message result);
void invokeOemRilRequestRaw(byte[] data, Message response); void invokeOemRilRequestRaw(byte[] data, Message response);
void invokeOemRilRequestStrings(String[] strings, Message response); void invokeOemRilRequestStrings(String[] strings, Message response);

View File

@@ -1829,6 +1829,17 @@ public final class RIL extends BaseCommands implements CommandsInterface {
send(rr); send(rr);
} }
/**
* {@inheritDoc}
*/
public void reportStkServiceIsRunning(Message result) {
RILRequest rr = RILRequest.obtain(RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING, result);
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
send(rr);
}
//***** Private Methods //***** Private Methods
private void sendScreenState(boolean on) { private void sendScreenState(boolean on) {
@@ -3121,6 +3132,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
case RIL_REQUEST_SET_SMSC_ADDRESS: return "RIL_REQUEST_SET_SMSC_ADDRESS"; case RIL_REQUEST_SET_SMSC_ADDRESS: return "RIL_REQUEST_SET_SMSC_ADDRESS";
case RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE: return "REQUEST_EXIT_EMERGENCY_CALLBACK_MODE"; case RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE: return "REQUEST_EXIT_EMERGENCY_CALLBACK_MODE";
case RIL_REQUEST_REPORT_SMS_MEMORY_STATUS: return "RIL_REQUEST_REPORT_SMS_MEMORY_STATUS"; case RIL_REQUEST_REPORT_SMS_MEMORY_STATUS: return "RIL_REQUEST_REPORT_SMS_MEMORY_STATUS";
case RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING: return "RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING";
default: return "<unknown request>"; default: return "<unknown request>";
} }
} }

View File

@@ -220,6 +220,7 @@ cat include/telephony/ril.h | \
int RIL_REQUEST_GET_SMSC_ADDRESS = 100; int RIL_REQUEST_GET_SMSC_ADDRESS = 100;
int RIL_REQUEST_SET_SMSC_ADDRESS = 101; int RIL_REQUEST_SET_SMSC_ADDRESS = 101;
int RIL_REQUEST_REPORT_SMS_MEMORY_STATUS = 102; int RIL_REQUEST_REPORT_SMS_MEMORY_STATUS = 102;
int RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING = 103;
int RIL_UNSOL_RESPONSE_BASE = 1000; int RIL_UNSOL_RESPONSE_BASE = 1000;
int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000; int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;
int RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED = 1001; int RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED = 1001;

View File

@@ -25,8 +25,6 @@ import android.os.Message;
import com.android.internal.telephony.IccUtils; import com.android.internal.telephony.IccUtils;
import com.android.internal.telephony.CommandsInterface; import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.EncodeException;
import com.android.internal.telephony.GsmAlphabet;
import com.android.internal.telephony.gsm.SimCard; import com.android.internal.telephony.gsm.SimCard;
import com.android.internal.telephony.gsm.SIMFileHandler; import com.android.internal.telephony.gsm.SIMFileHandler;
import com.android.internal.telephony.gsm.SIMRecords; import com.android.internal.telephony.gsm.SIMRecords;
@@ -34,8 +32,6 @@ import com.android.internal.telephony.gsm.SIMRecords;
import android.util.Config; import android.util.Config;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
/** /**
* Enumeration for representing the tag value of COMPREHENSION-TLV objects. If * Enumeration for representing the tag value of COMPREHENSION-TLV objects. If
@@ -174,6 +170,9 @@ public class StkService extends Handler implements AppInterface {
// Register for SIM ready event. // Register for SIM ready event.
mSimRecords.registerForRecordsLoaded(this, MSG_ID_SIM_LOADED, null); mSimRecords.registerForRecordsLoaded(this, MSG_ID_SIM_LOADED, null);
mCmdIf.reportStkServiceIsRunning(null);
StkLog.d(this, "StkService: is running");
} }
public void dispose() { public void dispose() {

View File

@@ -1022,6 +1022,10 @@ public final class SimulatedCommands extends BaseCommands
unimplemented(result); unimplemented(result);
} }
public void reportStkServiceIsRunning(Message result) {
resultSuccess(result, null);
}
private boolean isSimLocked() { private boolean isSimLocked() {
if (mSimLockedState != SimLockState.NONE) { if (mSimLockedState != SimLockState.NONE) {
return true; return true;