From 94987a5fa375195f25afe13c24ff1a6f04143bc8 Mon Sep 17 00:00:00 2001 From: Shareef Ali Date: Mon, 29 Jul 2013 22:14:17 +0000 Subject: Revert "SamsungQualcommRIL: always convert hex to int." This reverts commit ef61f36300a3bca75bd0d06ad7d89e474c208af4. Change-Id: Ia374a84cfdb8afdea9776e8cce5ad4e23409fe68 --- src/java/com/android/internal/telephony/SamsungQualcommRIL.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/java/com/android/internal/telephony/SamsungQualcommRIL.java b/src/java/com/android/internal/telephony/SamsungQualcommRIL.java index 027af5a..229444a 100644 --- a/src/java/com/android/internal/telephony/SamsungQualcommRIL.java +++ b/src/java/com/android/internal/telephony/SamsungQualcommRIL.java @@ -521,7 +521,11 @@ public class SamsungQualcommRIL extends RIL implements CommandsInterface { if (response[i]== null){ response[i]=Integer.toString(Integer.MAX_VALUE); } else { - response[i]=Integer.toString(Integer.parseInt(response[i],16)); + try { + Integer.parseInt(response[i]); + } catch(NumberFormatException e) { + response[i]=Integer.toString(Integer.parseInt(response[i],16)); + } } } } -- cgit v1.1