diff options
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index cf182d4..64be410 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -803,17 +803,26 @@ public class TelephonyManager { public CellLocation getCellLocation() { try { ITelephony telephony = getITelephony(); - if (telephony == null) + if (telephony == null) { + Rlog.d(TAG, "getCellLocation returning null because telephony is null"); return null; + } Bundle bundle = telephony.getCellLocation(mContext.getOpPackageName()); - if (bundle.isEmpty()) return null; + if (bundle.isEmpty()) { + Rlog.d(TAG, "getCellLocation returning null because bundle is empty"); + return null; + } CellLocation cl = CellLocation.newFromBundle(bundle); - if (cl.isEmpty()) + if (cl.isEmpty()) { + Rlog.d(TAG, "getCellLocation returning null because CellLocation is empty"); return null; + } return cl; } catch (RemoteException ex) { + Rlog.d(TAG, "getCellLocation returning null due to RemoteException " + ex); return null; } catch (NullPointerException ex) { + Rlog.d(TAG, "getCellLocation returning null due to NullPointerException " + ex); return null; } } |