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

Commit 1123de96 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "More robust check around TelephonyManager init."

parents 09702a0e 52d0f988
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -60,12 +60,13 @@ public class TelephonyManager {

    /** @hide */
    public TelephonyManager(Context context) {
        context = context.getApplicationContext();
        if (sContext == null) {
            sContext = context.getApplicationContext();
            sContext = context;

            sRegistry = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService(
                    "telephony.registry"));
        } else {
        } else if (sContext != context) {
            Log.e(TAG, "Hidden constructor called more than once per process!");
            Log.e(TAG, "Original: " + sContext.getPackageName() + ", new: " +
                    context.getPackageName());