Remove unneeded new RIL command.

Remove the recently added RIL_REQUEST_SET_RADIO_MODE command and update
the definition of the RIL_REQUEST_NV_RESET_CONFIG parameter.
Also remove some accidentally added debug log lines.

Bug: 12864208
Change-Id: I6f035d6900c9fcb1427bad62057d7b4a1d3cd99c
This commit is contained in:
Jake Hamby
2014-02-06 14:43:50 -08:00
parent 35e2721399
commit 786e71ab11
4 changed files with 12 additions and 41 deletions

View File

@@ -172,9 +172,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
private static final String TAG = "ConnectivityService";
private static final boolean DBG = true;
private static final boolean VDBG = true;
private static final boolean VDBG = false;
private static final boolean LOGD_RULES = true;
private static final boolean LOGD_RULES = false;
// TODO: create better separation between radio types and network types
@@ -4569,7 +4569,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
* @param seconds
*/
private static void sleep(int seconds) {
log("XXXXX sleeping for " + seconds + " sec");
long stopTime = System.nanoTime() + (seconds * 1000000000);
long sleepTime;
while ((sleepTime = stopTime - System.nanoTime()) > 0) {
@@ -4578,7 +4577,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
} catch (InterruptedException ignored) {
}
}
log("XXXXX returning from sleep");
}
private static void log(String s) {

View File

@@ -1823,10 +1823,11 @@ public class TelephonyManager {
}
/**
* Perform the specified type of NV config reset.
* Used for device configuration by some CDMA operators.
* Perform the specified type of NV config reset. The radio will be taken offline
* and the device must be rebooted after the operation. Used for device
* configuration by some CDMA operators.
*
* @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset).
* @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset
* @return true on success; false on any failure.
* @hide
*/
@@ -1840,24 +1841,4 @@ public class TelephonyManager {
}
return false;
}
/**
* Change the radio to the specified mode.
* Used for device configuration by some operators.
*
* @param radioMode is 0 for offline mode, 1 for online mode, 2 for low-power mode,
* or 3 to reset the radio.
* @return true on success; false on any failure.
* @hide
*/
public boolean setRadioMode(int radioMode) {
try {
return getITelephony().setRadioMode(radioMode);
} catch (RemoteException ex) {
Rlog.e(TAG, "setRadioMode RemoteException", ex);
} catch (NullPointerException ex) {
Rlog.e(TAG, "setRadioMode NPE", ex);
}
return false;
}
}

View File

@@ -395,21 +395,12 @@ interface ITelephony {
boolean nvWriteCdmaPrl(in byte[] preferredRoamingList);
/**
* Perform the specified type of NV config reset.
* Used for device configuration by some CDMA operators.
* Perform the specified type of NV config reset. The radio will be taken offline
* and the device must be rebooted after the operation. Used for device
* configuration by some CDMA operators.
*
* @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset).
* @return true on success; false on any failure.
*/
boolean nvResetConfig(int resetType);
/**
* Change the radio to the specified mode.
* Used for device configuration by some operators.
*
* @param radioMode is 0 for offline mode, 1 for online mode, 2 for low-power mode,
* or 3 to reset the radio.
* @return true on success; false on any failure.
*/
boolean setRadioMode(int radioMode);
}

View File

@@ -115,8 +115,9 @@ public interface RILConstants {
int DEACTIVATE_REASON_PDP_RESET = 2;
/* NV config radio reset types. */
int NV_CONFIG_RESET_FACTORY = 1;
int NV_CONFIG_RESET_NV_ONLY = 2;
int NV_CONFIG_RELOAD_RESET = 1;
int NV_CONFIG_ERASE_RESET = 2;
int NV_CONFIG_FACTORY_RESET = 3;
/*
cat include/telephony/ril.h | \