am 7fe44c06: am 30e6a232: Invoke shutdownMobileRadios Telephony APIs from ShutdownThread

* commit '7fe44c068c05de1f1e721b4c268b0fedb7616d9e':
  Invoke shutdownMobileRadios Telephony APIs from ShutdownThread
This commit is contained in:
Naveen Kalla
2014-08-21 15:23:36 +00:00
committed by Android Git Automerger
3 changed files with 20 additions and 6 deletions

View File

@@ -430,10 +430,10 @@ public final class ShutdownThread extends Thread {
}
try {
radioOff = phone == null || !phone.isRadioOn();
radioOff = phone == null || !phone.needMobileRadioShutdown();
if (!radioOff) {
Log.w(TAG, "Turning off radio...");
phone.setRadio(false);
Log.w(TAG, "Turning off cellular radios...");
phone.shutdownMobileRadios();
}
} catch (RemoteException ex) {
Log.e(TAG, "RemoteException during radio shutdown", ex);
@@ -456,7 +456,7 @@ public final class ShutdownThread extends Thread {
}
if (!radioOff) {
try {
radioOff = !phone.isRadioOn();
radioOff = !phone.needMobileRadioShutdown();
} catch (RemoteException ex) {
Log.e(TAG, "RemoteException during radio shutdown", ex);
radioOff = true;
@@ -472,7 +472,7 @@ public final class ShutdownThread extends Thread {
Log.e(TAG, "RemoteException during NFC shutdown", ex);
nfcOff = true;
}
if (radioOff) {
if (nfcOff) {
Log.i(TAG, "NFC turned off.");
}
}

View File

@@ -793,5 +793,16 @@ interface ITelephony {
* positive value success, data length of response
*/
int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp);
}
/**
* Check if any mobile Radios need to be shutdown.
*
* @return true is any mobile radio needs to be shutdown
*/
boolean needMobileRadioShutdown();
/**
* Shutdown Mobile Radios
*/
void shutdownMobileRadios();
}

View File

@@ -287,7 +287,10 @@ cat include/telephony/ril.h | \
int RIL_REQUEST_ALLOW_DATA = 123;
int RIL_REQUEST_GET_HARDWARE_CONFIG = 124;
int RIL_REQUEST_SIM_AUTHENTICATION = 125;
int RIL_REQUEST_GET_DC_RT_INFO = 126;
int RIL_REQUEST_SET_DC_RT_INFO_RATE = 127;
int RIL_REQUEST_SET_DATA_PROFILE = 128;
int RIL_REQUEST_SHUTDOWN = 129;
int RIL_UNSOL_RESPONSE_BASE = 1000;
int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;