AppOpsManagerCompat.java 2.13 KB
package android.support.v4.app;

import android.app.AppOpsManager;
import android.content.Context;
import android.os.Build.VERSION;
import android.support.annotation.NonNull;

public final class AppOpsManagerCompat
{
  public static final int MODE_ALLOWED = 0;
  public static final int MODE_DEFAULT = 3;
  public static final int MODE_IGNORED = 1;
  private static final b a = new b();
  
  static
  {
    if (Build.VERSION.SDK_INT >= 23)
    {
      a = new a();
      return;
    }
  }
  
  public static int noteOp(@NonNull Context paramContext, @NonNull String paramString1, int paramInt, @NonNull String paramString2)
  {
    return a.a(paramContext, paramString1, paramInt, paramString2);
  }
  
  public static int noteProxyOp(@NonNull Context paramContext, @NonNull String paramString1, @NonNull String paramString2)
  {
    return a.a(paramContext, paramString1, paramString2);
  }
  
  public static String permissionToOp(@NonNull String paramString)
  {
    return a.a(paramString);
  }
  
  static final class a
    extends AppOpsManagerCompat.b
  {
    public final int a(Context paramContext, String paramString1, int paramInt, String paramString2)
    {
      return ((AppOpsManager)paramContext.getSystemService(AppOpsManager.class)).noteOp(paramString1, paramInt, paramString2);
    }
    
    public final int a(Context paramContext, String paramString1, String paramString2)
    {
      return ((AppOpsManager)paramContext.getSystemService(AppOpsManager.class)).noteProxyOp(paramString1, paramString2);
    }
    
    public final String a(String paramString)
    {
      return AppOpsManager.permissionToOp(paramString);
    }
  }
  
  static class b
  {
    public int a(Context paramContext, String paramString1, int paramInt, String paramString2)
    {
      return 1;
    }
    
    public int a(Context paramContext, String paramString1, String paramString2)
    {
      return 1;
    }
    
    public String a(String paramString)
    {
      return null;
    }
  }
}


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