AccessibilityServiceInfoCompat.java 7.57 KB
package android.support.v4.accessibilityservice;

import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Build.VERSION;

public final class AccessibilityServiceInfoCompat
{
  public static final int CAPABILITY_CAN_FILTER_KEY_EVENTS = 8;
  public static final int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4;
  public static final int CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION = 2;
  public static final int CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT = 1;
  public static final int DEFAULT = 1;
  public static final int FEEDBACK_ALL_MASK = -1;
  public static final int FEEDBACK_BRAILLE = 32;
  public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2;
  public static final int FLAG_REPORT_VIEW_IDS = 16;
  public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8;
  public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32;
  public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4;
  private static final e a = new d();
  
  static
  {
    if (Build.VERSION.SDK_INT >= 18)
    {
      a = new c();
      return;
    }
    if (Build.VERSION.SDK_INT >= 16)
    {
      a = new b();
      return;
    }
    if (Build.VERSION.SDK_INT >= 14)
    {
      a = new a();
      return;
    }
  }
  
  public static String capabilityToString(int paramInt)
  {
    switch (paramInt)
    {
    case 3: 
    case 5: 
    case 6: 
    case 7: 
    default: 
      return "UNKNOWN";
    case 1: 
      return "CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT";
    case 2: 
      return "CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION";
    case 4: 
      return "CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY";
    }
    return "CAPABILITY_CAN_FILTER_KEY_EVENTS";
  }
  
  public static String feedbackTypeToString(int paramInt)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append("[");
    while (paramInt > 0)
    {
      int i = 1 << Integer.numberOfTrailingZeros(paramInt);
      paramInt &= (i ^ 0xFFFFFFFF);
      if (localStringBuilder.length() > 1) {
        localStringBuilder.append(", ");
      }
      switch (i)
      {
      default: 
        break;
      case 1: 
        localStringBuilder.append("FEEDBACK_SPOKEN");
        break;
      case 4: 
        localStringBuilder.append("FEEDBACK_AUDIBLE");
        break;
      case 2: 
        localStringBuilder.append("FEEDBACK_HAPTIC");
        break;
      case 16: 
        localStringBuilder.append("FEEDBACK_GENERIC");
        break;
      case 8: 
        localStringBuilder.append("FEEDBACK_VISUAL");
      }
    }
    localStringBuilder.append("]");
    return localStringBuilder.toString();
  }
  
  public static String flagToString(int paramInt)
  {
    switch (paramInt)
    {
    default: 
      return null;
    case 1: 
      return "DEFAULT";
    case 2: 
      return "FLAG_INCLUDE_NOT_IMPORTANT_VIEWS";
    case 4: 
      return "FLAG_REQUEST_TOUCH_EXPLORATION_MODE";
    case 8: 
      return "FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY";
    case 16: 
      return "FLAG_REPORT_VIEW_IDS";
    }
    return "FLAG_REQUEST_FILTER_KEY_EVENTS";
  }
  
  public static boolean getCanRetrieveWindowContent(AccessibilityServiceInfo paramAccessibilityServiceInfo)
  {
    return a.a(paramAccessibilityServiceInfo);
  }
  
  public static int getCapabilities(AccessibilityServiceInfo paramAccessibilityServiceInfo)
  {
    return a.f(paramAccessibilityServiceInfo);
  }
  
  public static String getDescription(AccessibilityServiceInfo paramAccessibilityServiceInfo)
  {
    return a.b(paramAccessibilityServiceInfo);
  }
  
  public static String getId(AccessibilityServiceInfo paramAccessibilityServiceInfo)
  {
    return a.c(paramAccessibilityServiceInfo);
  }
  
  public static ResolveInfo getResolveInfo(AccessibilityServiceInfo paramAccessibilityServiceInfo)
  {
    return a.d(paramAccessibilityServiceInfo);
  }
  
  public static String getSettingsActivityName(AccessibilityServiceInfo paramAccessibilityServiceInfo)
  {
    return a.e(paramAccessibilityServiceInfo);
  }
  
  public static String loadDescription(AccessibilityServiceInfo paramAccessibilityServiceInfo, PackageManager paramPackageManager)
  {
    return a.a(paramAccessibilityServiceInfo, paramPackageManager);
  }
  
  static class a
    extends AccessibilityServiceInfoCompat.d
  {
    public final boolean a(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return paramAccessibilityServiceInfo.getCanRetrieveWindowContent();
    }
    
    public final String b(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return paramAccessibilityServiceInfo.getDescription();
    }
    
    public final String c(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return paramAccessibilityServiceInfo.getId();
    }
    
    public final ResolveInfo d(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return paramAccessibilityServiceInfo.getResolveInfo();
    }
    
    public final String e(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return paramAccessibilityServiceInfo.getSettingsActivityName();
    }
    
    public int f(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      if (paramAccessibilityServiceInfo.getCanRetrieveWindowContent()) {
        return 1;
      }
      return 0;
    }
  }
  
  static class b
    extends AccessibilityServiceInfoCompat.a
  {
    public final String a(AccessibilityServiceInfo paramAccessibilityServiceInfo, PackageManager paramPackageManager)
    {
      return paramAccessibilityServiceInfo.loadDescription(paramPackageManager);
    }
  }
  
  static final class c
    extends AccessibilityServiceInfoCompat.b
  {
    public final int f(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return paramAccessibilityServiceInfo.getCapabilities();
    }
  }
  
  static class d
    implements AccessibilityServiceInfoCompat.e
  {
    public String a(AccessibilityServiceInfo paramAccessibilityServiceInfo, PackageManager paramPackageManager)
    {
      return null;
    }
    
    public boolean a(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return false;
    }
    
    public String b(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return null;
    }
    
    public String c(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return null;
    }
    
    public ResolveInfo d(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return null;
    }
    
    public String e(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return null;
    }
    
    public int f(AccessibilityServiceInfo paramAccessibilityServiceInfo)
    {
      return 0;
    }
  }
  
  static abstract interface e
  {
    public abstract String a(AccessibilityServiceInfo paramAccessibilityServiceInfo, PackageManager paramPackageManager);
    
    public abstract boolean a(AccessibilityServiceInfo paramAccessibilityServiceInfo);
    
    public abstract String b(AccessibilityServiceInfo paramAccessibilityServiceInfo);
    
    public abstract String c(AccessibilityServiceInfo paramAccessibilityServiceInfo);
    
    public abstract ResolveInfo d(AccessibilityServiceInfo paramAccessibilityServiceInfo);
    
    public abstract String e(AccessibilityServiceInfo paramAccessibilityServiceInfo);
    
    public abstract int f(AccessibilityServiceInfo paramAccessibilityServiceInfo);
  }
}


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