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

Commit 795fcd07 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android Git Automerger
Browse files

am 33fe4a36: Merge "Fix TelephonyManager to grab the best context" into ics-mr1

* commit '33fe4a36':
  Fix TelephonyManager to grab the best context
parents 7765fc65 33fe4a36
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());
        }
    }