Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afe8c82d authored by Amit Mahajan's avatar Amit Mahajan Committed by The Android Automerger
Browse files

Adding temporary logging to debug CTS failure (for CellLocationTest).

Bug: 21209629
Change-Id: Ic99cf02f26d3cca7260a3a0141ce13eff9a885bc
parent f9f21a4d
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -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;
        }
    }