// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package uk.co.chrisjenx.calligraphy; import android.app.Activity; import android.content.Context; import android.content.ContextWrapper; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; // Referenced classes of package uk.co.chrisjenx.calligraphy: // CalligraphyConfig, CalligraphyLayoutInflater, CalligraphyActivityFactory public class CalligraphyContextWrapper extends ContextWrapper { private final int mAttributeId; private CalligraphyLayoutInflater mInflater; CalligraphyContextWrapper(Context context) { super(context); mAttributeId = CalligraphyConfig.get().getAttrId(); } public CalligraphyContextWrapper(Context context, int i) { super(context); mAttributeId = i; } static CalligraphyActivityFactory get(Activity activity) { if (!(activity.getLayoutInflater() instanceof CalligraphyLayoutInflater)) { throw new RuntimeException("This activity does not wrap the Base Context! See CalligraphyContextWrapper.wrap(Context)"); } else { return (CalligraphyActivityFactory)activity.getLayoutInflater(); } } public static View onActivityCreateView(Activity activity, View view, View view1, String s, Context context, AttributeSet attributeset) { return get(activity).onActivityCreateView(view, view1, s, context, attributeset); } public static ContextWrapper wrap(Context context) { return new CalligraphyContextWrapper(context); } public Object getSystemService(String s) { if ("layout_inflater".equals(s)) { if (mInflater == null) { mInflater = new CalligraphyLayoutInflater(LayoutInflater.from(getBaseContext()), this, mAttributeId, false); } return mInflater; } else { return super.getSystemService(s); } } }