Java 类android.view.LayoutInflater.Factory2 实例源码

项目:boohee_v5.6    文件:LayoutInflaterCompatHC.java   
static void forceSetFactory2(LayoutInflater inflater, Factory2 factory) {
    if (!sCheckedField) {
        try {
            sLayoutInflaterFactory2Field = LayoutInflater.class.getDeclaredField("mFactory2");
            sLayoutInflaterFactory2Field.setAccessible(true);
        } catch (NoSuchFieldException e) {
            Log.e(TAG, "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", e);
        }
        sCheckedField = true;
    }
    if (sLayoutInflaterFactory2Field != null) {
        try {
            sLayoutInflaterFactory2Field.set(inflater, factory);
        } catch (IllegalAccessException e2) {
            Log.e(TAG, "forceSetFactory2 could not set the Factory2 on LayoutInflater " + inflater + "; inflation may have unexpected results.", e2);
        }
    }
}
项目:solved-hacking-problem    文件:ai.java   
static void m848a(LayoutInflater layoutInflater, Factory2 factory2) {
    if (!f432b) {
        try {
            f431a = LayoutInflater.class.getDeclaredField("mFactory2");
            f431a.setAccessible(true);
        } catch (Throwable e) {
            Log.e("LayoutInflaterCompatHC", "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", e);
        }
        f432b = true;
    }
    if (f431a != null) {
        try {
            f431a.set(layoutInflater, factory2);
        } catch (Throwable e2) {
            Log.e("LayoutInflaterCompatHC", "forceSetFactory2 could not set the Factory2 on LayoutInflater " + layoutInflater + "; inflation may have unexpected results.", e2);
        }
    }
}
项目:solved-hacking-problem    文件:ai.java   
static void m848a(LayoutInflater layoutInflater, Factory2 factory2) {
    if (!f432b) {
        try {
            f431a = LayoutInflater.class.getDeclaredField("mFactory2");
            f431a.setAccessible(true);
        } catch (Throwable e) {
            Log.e("LayoutInflaterCompatHC", "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", e);
        }
        f432b = true;
    }
    if (f431a != null) {
        try {
            f431a.set(layoutInflater, factory2);
        } catch (Throwable e2) {
            Log.e("LayoutInflaterCompatHC", "forceSetFactory2 could not set the Factory2 on LayoutInflater " + layoutInflater + "; inflation may have unexpected results.", e2);
        }
    }
}
项目:boohee_v5.6    文件:LayoutInflaterCompatHC.java   
static void setFactory(LayoutInflater inflater, LayoutInflaterFactory factory) {
    Factory2 factory2 = factory != null ? new FactoryWrapperHC(factory) : null;
    inflater.setFactory2(factory2);
    Factory f = inflater.getFactory();
    if (f instanceof Factory2) {
        forceSetFactory2(inflater, (Factory2) f);
    } else {
        forceSetFactory2(inflater, factory2);
    }
}
项目:solved-hacking-problem    文件:ai.java   
static void m847a(LayoutInflater layoutInflater, al alVar) {
    Factory2 ajVar = alVar != null ? new aj(alVar) : null;
    layoutInflater.setFactory2(ajVar);
    Factory factory = layoutInflater.getFactory();
    if (factory instanceof Factory2) {
        ai.m848a(layoutInflater, (Factory2) factory);
    } else {
        ai.m848a(layoutInflater, ajVar);
    }
}
项目:solved-hacking-problem    文件:ai.java   
static void m847a(LayoutInflater layoutInflater, al alVar) {
    Factory2 ajVar = alVar != null ? new aj(alVar) : null;
    layoutInflater.setFactory2(ajVar);
    Factory factory = layoutInflater.getFactory();
    if (factory instanceof Factory2) {
        ai.m848a(layoutInflater, (Factory2) factory);
    } else {
        ai.m848a(layoutInflater, ajVar);
    }
}
项目:FMTech    文件:LayoutInflaterCompatHC.java   
static void forceSetFactory2(LayoutInflater paramLayoutInflater, LayoutInflater.Factory2 paramFactory2)
{
  if (!sCheckedField) {}
  try
  {
    Field localField = LayoutInflater.class.getDeclaredField("mFactory2");
    sLayoutInflaterFactory2Field = localField;
    localField.setAccessible(true);
    sCheckedField = true;
    if (sLayoutInflaterFactory2Field == null) {}
  }
  catch (NoSuchFieldException localNoSuchFieldException)
  {
    for (;;)
    {
      try
      {
        sLayoutInflaterFactory2Field.set(paramLayoutInflater, paramFactory2);
        return;
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        Log.e("LayoutInflaterCompatHC", "forceSetFactory2 could not set the Factory2 on LayoutInflater " + paramLayoutInflater + "; inflation may have unexpected results.", localIllegalAccessException);
      }
      localNoSuchFieldException = localNoSuchFieldException;
      Log.e("LayoutInflaterCompatHC", "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", localNoSuchFieldException);
    }
  }
}
项目:FMTech    文件:LayoutInflaterCompat.java   
public void setFactory(LayoutInflater paramLayoutInflater, LayoutInflaterFactory paramLayoutInflaterFactory)
{
  if (paramLayoutInflaterFactory != null) {}
  for (LayoutInflaterCompatHC.FactoryWrapperHC localFactoryWrapperHC = new LayoutInflaterCompatHC.FactoryWrapperHC(paramLayoutInflaterFactory);; localFactoryWrapperHC = null)
  {
    paramLayoutInflater.setFactory2(localFactoryWrapperHC);
    LayoutInflater.Factory localFactory = paramLayoutInflater.getFactory();
    if (!(localFactory instanceof LayoutInflater.Factory2)) {
      break;
    }
    LayoutInflaterCompatHC.forceSetFactory2(paramLayoutInflater, (LayoutInflater.Factory2)localFactory);
    return;
  }
  LayoutInflaterCompatHC.forceSetFactory2(paramLayoutInflater, localFactoryWrapperHC);
}
项目:FMTech    文件:md.java   
public void a(LayoutInflater paramLayoutInflater, mh parammh)
{
  if (parammh != null) {}
  for (mg localmg = new mg(parammh);; localmg = null)
  {
    paramLayoutInflater.setFactory2(localmg);
    LayoutInflater.Factory localFactory = paramLayoutInflater.getFactory();
    if (!(localFactory instanceof LayoutInflater.Factory2)) {
      break;
    }
    aau.a(paramLayoutInflater, (LayoutInflater.Factory2)localFactory);
    return;
  }
  aau.a(paramLayoutInflater, localmg);
}
项目:FMTech    文件:aau.java   
public static void a(LayoutInflater paramLayoutInflater, LayoutInflater.Factory2 paramFactory2)
{
  if (!l) {}
  try
  {
    Field localField = LayoutInflater.class.getDeclaredField("mFactory2");
    k = localField;
    localField.setAccessible(true);
    l = true;
    if (k == null) {}
  }
  catch (NoSuchFieldException localNoSuchFieldException)
  {
    for (;;)
    {
      try
      {
        k.set(paramLayoutInflater, paramFactory2);
        return;
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        Log.e("LayoutInflaterCompatHC", "forceSetFactory2 could not set the Factory2 on LayoutInflater " + paramLayoutInflater + "; inflation may have unexpected results.", localIllegalAccessException);
      }
      localNoSuchFieldException = localNoSuchFieldException;
      Log.e("LayoutInflaterCompatHC", "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", localNoSuchFieldException);
    }
  }
}