Loading src/java/com/android/internal/telephony/RIL.java +22 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.hardware.radio.V1_0.RadioError; import android.hardware.radio.V1_0.RadioIndicationType; import android.hardware.radio.V1_0.RadioResponseInfo; import android.hardware.radio.V1_0.RadioResponseType; import android.hardware.radio.V1_0.ResetNvType; import android.hardware.radio.V1_0.SelectUiccSub; import android.hardware.radio.V1_0.SetupDataCallResult; import android.hardware.radio.V1_0.SimApdu; Loading Loading @@ -1287,6 +1288,26 @@ public final class RIL extends BaseCommands implements CommandsInterface { return dpi; } /** * Convert NV reset type into ResetNvType defined in types.hal. * @param resetType NV reset type. * @return Converted reset type in integer or -1 if param is invalid. */ private static int convertToHalResetNvType(int resetType) { /** * resetType values * 1 - reload all NV items * 2 - erase NV reset (SCRTN) * 3 - factory reset (RTN) */ switch (resetType) { case 1: return ResetNvType.RELOAD; case 2: return ResetNvType.ERASE; case 3: return ResetNvType.FACTORY_RESET; } return -1; } /** * Convert SetupDataCallResult defined in types.hal into DataCallResponse * @param dcResult setup data call result Loading Loading @@ -3220,7 +3241,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { } try { radioProxy.nvResetConfig(rr.mSerial, resetType); radioProxy.nvResetConfig(rr.mSerial, convertToHalResetNvType(resetType)); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "nvResetConfig", e); } Loading Loading
src/java/com/android/internal/telephony/RIL.java +22 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.hardware.radio.V1_0.RadioError; import android.hardware.radio.V1_0.RadioIndicationType; import android.hardware.radio.V1_0.RadioResponseInfo; import android.hardware.radio.V1_0.RadioResponseType; import android.hardware.radio.V1_0.ResetNvType; import android.hardware.radio.V1_0.SelectUiccSub; import android.hardware.radio.V1_0.SetupDataCallResult; import android.hardware.radio.V1_0.SimApdu; Loading Loading @@ -1287,6 +1288,26 @@ public final class RIL extends BaseCommands implements CommandsInterface { return dpi; } /** * Convert NV reset type into ResetNvType defined in types.hal. * @param resetType NV reset type. * @return Converted reset type in integer or -1 if param is invalid. */ private static int convertToHalResetNvType(int resetType) { /** * resetType values * 1 - reload all NV items * 2 - erase NV reset (SCRTN) * 3 - factory reset (RTN) */ switch (resetType) { case 1: return ResetNvType.RELOAD; case 2: return ResetNvType.ERASE; case 3: return ResetNvType.FACTORY_RESET; } return -1; } /** * Convert SetupDataCallResult defined in types.hal into DataCallResponse * @param dcResult setup data call result Loading Loading @@ -3220,7 +3241,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { } try { radioProxy.nvResetConfig(rr.mSerial, resetType); radioProxy.nvResetConfig(rr.mSerial, convertToHalResetNvType(resetType)); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "nvResetConfig", e); } Loading