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

Commit 33fe4a36 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Fix TelephonyManager to grab the best context" into ics-mr1

parents fd6b64f6 8f4f814b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -60,16 +60,16 @@ public class TelephonyManager {

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

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