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

Commit fcd21906 authored by Preeti Ahuja's avatar Preeti Ahuja Committed by Gerrit Code Review
Browse files

Handle NPE in TelephonyManager

ITelphony service instance could be null at boot up
when device activation is taking place.

Change-Id: If72622a2d22a20b1ce909134ce4c6446b132dffe
parent 6bd11f94
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3796,6 +3796,8 @@ public class TelephonyManager {
            return getITelephony().isDataPossibleForSubscription(subId, apnType);
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#isDataPossibleForSubscription", e);
        } catch (NullPointerException npe) {
            Log.e(TAG, "Error calling ITelephony#isDataPossibleForSubscription", npe);
        }
        return false;
    }
@@ -3807,6 +3809,8 @@ public class TelephonyManager {
            return getITelephony().needsOtaServiceProvisioning();
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#needsOtaServiceProvisioning", e);
        } catch (NullPointerException npe) {
            Log.e(TAG, "Error calling ITelephony#needsOtaServiceProvisioning", npe);
        }
        return false;
    }