Loading src/java/com/android/internal/telephony/CommandsInterface.java +5 −2 Original line number Diff line number Diff line Loading @@ -2078,10 +2078,13 @@ public interface CommandsInterface { /** * Set SIM card power up or down * * @param powerUp True if powering up the sim card * @param state State of SIM (power down, power up, pass through) * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH} * @param result callback message contains the information of SUCCESS/FAILURE */ void setSimCardPower(boolean powerUp, Message result); void setSimCardPower(int state, Message result); /** * Register for unsolicited Carrier Public Key. Loading src/java/com/android/internal/telephony/Phone.java +7 −4 Original line number Diff line number Diff line Loading @@ -3473,11 +3473,14 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { } /** * Set SIM card power state. Request is equivalent to inserting or removing the card. * @param powerUp True if powering up the SIM, otherwise powering down * Set SIM card power state. * @param state State of SIM (power down, power up, pass through) * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH} **/ public void setSimPowerState(boolean powerUp) { mCi.setSimCardPower(powerUp, null); public void setSimPowerState(int state) { mCi.setSimCardPower(state, null); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading src/java/com/android/internal/telephony/RIL.java +33 −7 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ import android.telephony.Rlog; import android.telephony.SignalStrength; import android.telephony.SmsManager; import android.telephony.TelephonyHistogram; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.SparseArray; Loading Loading @@ -3637,23 +3638,48 @@ public final class RIL extends BaseCommands implements CommandsInterface { } @Override public void setSimCardPower(boolean powerUp, Message result) { public void setSimCardPower(int state, Message result) { IRadio radioProxy = getRadioProxy(result); if (radioProxy != null) { RILRequest rr = obtainRequest(RIL_REQUEST_SET_SIM_CARD_POWER, result, mRILDefaultWorkSource); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + powerUp); riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + state); } android.hardware.radio.V1_1.IRadio radioProxy11 = android.hardware.radio.V1_1.IRadio.castFrom(radioProxy); if (radioProxy11 == null) { try { switch (state) { case TelephonyManager.CARD_POWER_DOWN: { radioProxy.setSimCardPower(rr.mSerial, false); break; } case TelephonyManager.CARD_POWER_UP: { radioProxy.setSimCardPower(rr.mSerial, true); break; } default: { if (result != null) { AsyncResult.forMessage(result, null, CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED)); result.sendToTarget(); } } } } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "setSimCardPower", e); } } else { try { radioProxy.setSimCardPower(rr.mSerial, powerUp); radioProxy11.setSimCardPower_1_1(rr.mSerial, state); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "setSimCardPower", e); } } } } @Override public void setCarrierInfoForImsiEncryption(PublicKey publicKey, String keyIdentifier, Loading src/java/com/android/internal/telephony/RadioResponse.java +7 −0 Original line number Diff line number Diff line Loading @@ -1193,6 +1193,13 @@ public class RadioResponse extends IRadioResponse.Stub { responseVoid(responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ public void setSimCardPowerResponse_1_1(RadioResponseInfo responseInfo) { responseVoid(responseInfo); } private void responseIccCardStatus(RadioResponseInfo responseInfo, CardStatus cardStatus) { RILRequest rr = mRil.processResponse(responseInfo); Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCommandInterface.java +1 −1 Original line number Diff line number Diff line Loading @@ -637,6 +637,6 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface } @Override public void setSimCardPower(boolean powerUp, Message result) { public void setSimCardPower(int state, Message result) { } } Loading
src/java/com/android/internal/telephony/CommandsInterface.java +5 −2 Original line number Diff line number Diff line Loading @@ -2078,10 +2078,13 @@ public interface CommandsInterface { /** * Set SIM card power up or down * * @param powerUp True if powering up the sim card * @param state State of SIM (power down, power up, pass through) * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH} * @param result callback message contains the information of SUCCESS/FAILURE */ void setSimCardPower(boolean powerUp, Message result); void setSimCardPower(int state, Message result); /** * Register for unsolicited Carrier Public Key. Loading
src/java/com/android/internal/telephony/Phone.java +7 −4 Original line number Diff line number Diff line Loading @@ -3473,11 +3473,14 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { } /** * Set SIM card power state. Request is equivalent to inserting or removing the card. * @param powerUp True if powering up the SIM, otherwise powering down * Set SIM card power state. * @param state State of SIM (power down, power up, pass through) * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP} * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH} **/ public void setSimPowerState(boolean powerUp) { mCi.setSimCardPower(powerUp, null); public void setSimPowerState(int state) { mCi.setSimCardPower(state, null); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading
src/java/com/android/internal/telephony/RIL.java +33 −7 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ import android.telephony.Rlog; import android.telephony.SignalStrength; import android.telephony.SmsManager; import android.telephony.TelephonyHistogram; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.SparseArray; Loading Loading @@ -3637,23 +3638,48 @@ public final class RIL extends BaseCommands implements CommandsInterface { } @Override public void setSimCardPower(boolean powerUp, Message result) { public void setSimCardPower(int state, Message result) { IRadio radioProxy = getRadioProxy(result); if (radioProxy != null) { RILRequest rr = obtainRequest(RIL_REQUEST_SET_SIM_CARD_POWER, result, mRILDefaultWorkSource); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + powerUp); riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + state); } android.hardware.radio.V1_1.IRadio radioProxy11 = android.hardware.radio.V1_1.IRadio.castFrom(radioProxy); if (radioProxy11 == null) { try { switch (state) { case TelephonyManager.CARD_POWER_DOWN: { radioProxy.setSimCardPower(rr.mSerial, false); break; } case TelephonyManager.CARD_POWER_UP: { radioProxy.setSimCardPower(rr.mSerial, true); break; } default: { if (result != null) { AsyncResult.forMessage(result, null, CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED)); result.sendToTarget(); } } } } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "setSimCardPower", e); } } else { try { radioProxy.setSimCardPower(rr.mSerial, powerUp); radioProxy11.setSimCardPower_1_1(rr.mSerial, state); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "setSimCardPower", e); } } } } @Override public void setCarrierInfoForImsiEncryption(PublicKey publicKey, String keyIdentifier, Loading
src/java/com/android/internal/telephony/RadioResponse.java +7 −0 Original line number Diff line number Diff line Loading @@ -1193,6 +1193,13 @@ public class RadioResponse extends IRadioResponse.Stub { responseVoid(responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ public void setSimCardPowerResponse_1_1(RadioResponseInfo responseInfo) { responseVoid(responseInfo); } private void responseIccCardStatus(RadioResponseInfo responseInfo, CardStatus cardStatus) { RILRequest rr = mRil.processResponse(responseInfo); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCommandInterface.java +1 −1 Original line number Diff line number Diff line Loading @@ -637,6 +637,6 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface } @Override public void setSimCardPower(boolean powerUp, Message result) { public void setSimCardPower(int state, Message result) { } }