PreferenceManagerCompat.java 4.25 KB
package android.support.v4.preference;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.util.Log;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public class PreferenceManagerCompat
{
  private static final String a = PreferenceManagerCompat.class.getSimpleName();
  
  static PreferenceManager a(Activity paramActivity)
  {
    try
    {
      Constructor localConstructor = PreferenceManager.class.getDeclaredConstructor(new Class[] { Activity.class, Integer.TYPE });
      localConstructor.setAccessible(true);
      paramActivity = (PreferenceManager)localConstructor.newInstance(new Object[] { paramActivity, Integer.valueOf(100) });
      return paramActivity;
    }
    catch (Exception paramActivity)
    {
      Log.w(a, "Couldn't call constructor PreferenceManager by reflection", paramActivity);
    }
    return null;
  }
  
  static PreferenceScreen a(PreferenceManager paramPreferenceManager)
  {
    try
    {
      Method localMethod = PreferenceManager.class.getDeclaredMethod("getPreferenceScreen", new Class[0]);
      localMethod.setAccessible(true);
      paramPreferenceManager = (PreferenceScreen)localMethod.invoke(paramPreferenceManager, new Object[0]);
      return paramPreferenceManager;
    }
    catch (Exception paramPreferenceManager)
    {
      Log.w(a, "Couldn't call PreferenceManager.getPreferenceScreen by reflection", paramPreferenceManager);
    }
    return null;
  }
  
  static PreferenceScreen a(PreferenceManager paramPreferenceManager, Activity paramActivity, int paramInt, PreferenceScreen paramPreferenceScreen)
  {
    try
    {
      Method localMethod = PreferenceManager.class.getDeclaredMethod("inflateFromResource", new Class[] { Context.class, Integer.TYPE, PreferenceScreen.class });
      localMethod.setAccessible(true);
      paramPreferenceManager = (PreferenceScreen)localMethod.invoke(paramPreferenceManager, new Object[] { paramActivity, Integer.valueOf(paramInt), paramPreferenceScreen });
      return paramPreferenceManager;
    }
    catch (Exception paramPreferenceManager)
    {
      Log.w(a, "Couldn't call PreferenceManager.inflateFromResource by reflection", paramPreferenceManager);
    }
    return null;
  }
  
  static void a() {}
  
  static void a(PreferenceManager paramPreferenceManager, int paramInt1, int paramInt2, Intent paramIntent)
  {
    try
    {
      Method localMethod = PreferenceManager.class.getDeclaredMethod("dispatchActivityResult", new Class[] { Integer.TYPE, Integer.TYPE, Intent.class });
      localMethod.setAccessible(true);
      localMethod.invoke(paramPreferenceManager, new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), paramIntent });
      return;
    }
    catch (Exception paramPreferenceManager)
    {
      Log.w(a, "Couldn't call PreferenceManager.dispatchActivityResult by reflection", paramPreferenceManager);
    }
  }
  
  static boolean a(PreferenceManager paramPreferenceManager, PreferenceScreen paramPreferenceScreen)
  {
    try
    {
      Method localMethod = PreferenceManager.class.getDeclaredMethod("setPreferences", new Class[] { PreferenceScreen.class });
      localMethod.setAccessible(true);
      boolean bool = ((Boolean)localMethod.invoke(paramPreferenceManager, new Object[] { paramPreferenceScreen })).booleanValue();
      return bool;
    }
    catch (Exception paramPreferenceManager)
    {
      Log.w(a, "Couldn't call PreferenceManager.setPreferences by reflection", paramPreferenceManager);
    }
    return false;
  }
  
  static void b(PreferenceManager paramPreferenceManager)
  {
    try
    {
      Method localMethod = PreferenceManager.class.getDeclaredMethod("dispatchActivityDestroy", new Class[0]);
      localMethod.setAccessible(true);
      localMethod.invoke(paramPreferenceManager, new Object[0]);
      return;
    }
    catch (Exception paramPreferenceManager)
    {
      Log.w(a, "Couldn't call PreferenceManager.dispatchActivityDestroy by reflection", paramPreferenceManager);
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/preference/PreferenceManagerCompat.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */