diff options
author | Amit Mahajan <amitmahajan@google.com> | 2015-05-29 17:29:26 -0700 |
---|---|---|
committer | Amit Mahajan <amitmahajan@google.com> | 2015-06-03 14:53:43 -0700 |
commit | 2e7ca76a8a1b87c2ea6102ba14fe324cfe20f8ca (patch) | |
tree | b4520b349010e083e9d1685096cae042538f2cb9 | |
parent | 42fde939ea31e061a93a01b0d2f27032bfb2f3f6 (diff) | |
download | frameworks_base-2e7ca76a8a1b87c2ea6102ba14fe324cfe20f8ca.zip frameworks_base-2e7ca76a8a1b87c2ea6102ba14fe324cfe20f8ca.tar.gz frameworks_base-2e7ca76a8a1b87c2ea6102ba14fe324cfe20f8ca.tar.bz2 |
Adding temporary logging to debug CTS failure (for CellLocationTest).
Bug: 21209629
Change-Id: Ic99cf02f26d3cca7260a3a0141ce13eff9a885bc
-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 f29a6ed..d9bdc44 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -796,17 +796,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; } } |