package android {

  public final class Manifest {
    ctor public Manifest();
  }

  public static final class Manifest.permission {
    ctor public Manifest.permission();
    field public static final java.lang.String ACCESS_CHECKIN_PROPERTIES = "android.permission.ACCESS_CHECKIN_PROPERTIES";
    field public static final java.lang.String ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
    field public static final java.lang.String ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
    field public static final java.lang.String ACCESS_LOCATION_EXTRA_COMMANDS = "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS";
    field public static final java.lang.String ACCESS_MOCK_LOCATION = "android.permission.ACCESS_MOCK_LOCATION";
    field public static final java.lang.String ACCESS_NETWORK_STATE = "android.permission.ACCESS_NETWORK_STATE";
    field public static final java.lang.String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER";
    field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
    field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
    field public static final java.lang.String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL";
    field public static final java.lang.String AUTHENTICATE_ACCOUNTS = "android.permission.AUTHENTICATE_ACCOUNTS";
    field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
    field public static final java.lang.String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE";
    field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
    field public static final java.lang.String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
    field public static final java.lang.String BIND_CHOOSER_TARGET_SERVICE = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
    field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
    field public static final java.lang.String BIND_DREAM_SERVICE = "android.permission.BIND_DREAM_SERVICE";
    field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
    field public static final java.lang.String BIND_MEDIA_ROUTE_SERVICE = "android.permission.BIND_MEDIA_ROUTE_SERVICE";
    field public static final java.lang.String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
    field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
    field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
    field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
    field public static final java.lang.String BIND_TEXT_SERVICE = "android.permission.BIND_TEXT_SERVICE";
    field public static final java.lang.String BIND_TV_INPUT = "android.permission.BIND_TV_INPUT";
    field public static final java.lang.String BIND_VOICE_INTERACTION = "android.permission.BIND_VOICE_INTERACTION";
    field public static final java.lang.String BIND_VPN_SERVICE = "android.permission.BIND_VPN_SERVICE";
    field public static final java.lang.String BIND_WALLPAPER = "android.permission.BIND_WALLPAPER";
    field public static final java.lang.String BLUETOOTH = "android.permission.BLUETOOTH";
    field public static final java.lang.String BLUETOOTH_ADMIN = "android.permission.BLUETOOTH_ADMIN";
    field public static final java.lang.String BLUETOOTH_PRIVILEGED = "android.permission.BLUETOOTH_PRIVILEGED";
    field public static final java.lang.String BODY_SENSORS = "android.permission.BODY_SENSORS";
    field public static final java.lang.String BRICK = "android.permission.BRICK";
    field public static final java.lang.String BROADCAST_PACKAGE_REMOVED = "android.permission.BROADCAST_PACKAGE_REMOVED";
    field public static final java.lang.String BROADCAST_SMS = "android.permission.BROADCAST_SMS";
    field public static final java.lang.String BROADCAST_STICKY = "android.permission.BROADCAST_STICKY";
    field public static final java.lang.String BROADCAST_WAP_PUSH = "android.permission.BROADCAST_WAP_PUSH";
    field public static final java.lang.String CALL_PHONE = "android.permission.CALL_PHONE";
    field public static final java.lang.String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
    field public static final java.lang.String CAMERA = "android.permission.CAMERA";
    field public static final java.lang.String CAPTURE_AUDIO_OUTPUT = "android.permission.CAPTURE_AUDIO_OUTPUT";
    field public static final java.lang.String CAPTURE_SECURE_VIDEO_OUTPUT = "android.permission.CAPTURE_SECURE_VIDEO_OUTPUT";
    field public static final java.lang.String CAPTURE_VIDEO_OUTPUT = "android.permission.CAPTURE_VIDEO_OUTPUT";
    field public static final java.lang.String CHANGE_COMPONENT_ENABLED_STATE = "android.permission.CHANGE_COMPONENT_ENABLED_STATE";
    field public static final java.lang.String CHANGE_CONFIGURATION = "android.permission.CHANGE_CONFIGURATION";
    field public static final java.lang.String CHANGE_NETWORK_STATE = "android.permission.CHANGE_NETWORK_STATE";
    field public static final java.lang.String CHANGE_WIFI_MULTICAST_STATE = "android.permission.CHANGE_WIFI_MULTICAST_STATE";
    field public static final java.lang.String CHANGE_WIFI_STATE = "android.permission.CHANGE_WIFI_STATE";
    field public static final java.lang.String CLEAR_APP_CACHE = "android.permission.CLEAR_APP_CACHE";
    field public static final java.lang.String CLEAR_APP_USER_DATA = "android.permission.CLEAR_APP_USER_DATA";
    field public static final java.lang.String CONTROL_LOCATION_UPDATES = "android.permission.CONTROL_LOCATION_UPDATES";
    field public static final java.lang.String DELETE_CACHE_FILES = "android.permission.DELETE_CACHE_FILES";
    field public static final java.lang.String DELETE_PACKAGES = "android.permission.DELETE_PACKAGES";
    field public static final java.lang.String DEVICE_POWER = "android.permission.DEVICE_POWER";
    field public static final java.lang.String DIAGNOSTIC = "android.permission.DIAGNOSTIC";
    field public static final java.lang.String DISABLE_KEYGUARD = "android.permission.DISABLE_KEYGUARD";
    field public static final java.lang.String DUMP = "android.permission.DUMP";
    field public static final java.lang.String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
    field public static final java.lang.String FACTORY_TEST = "android.permission.FACTORY_TEST";
    field public static final java.lang.String FLASHLIGHT = "android.permission.FLASHLIGHT";
    field public static final java.lang.String FORCE_BACK = "android.permission.FORCE_BACK";
    field public static final java.lang.String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
    field public static final java.lang.String GET_PACKAGE_SIZE = "android.permission.GET_PACKAGE_SIZE";
    field public static final deprecated java.lang.String GET_TASKS = "android.permission.GET_TASKS";
    field public static final java.lang.String GET_TOP_ACTIVITY_INFO = "android.permission.GET_TOP_ACTIVITY_INFO";
    field public static final java.lang.String GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH";
    field public static final java.lang.String HARDWARE_TEST = "android.permission.HARDWARE_TEST";
    field public static final java.lang.String INJECT_EVENTS = "android.permission.INJECT_EVENTS";
    field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
    field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
    field public static final java.lang.String INSTALL_SHORTCUT = "com.android.launcher.permission.INSTALL_SHORTCUT";
    field public static final java.lang.String INTERNAL_SYSTEM_WINDOW = "android.permission.INTERNAL_SYSTEM_WINDOW";
    field public static final java.lang.String INTERNET = "android.permission.INTERNET";
    field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES";
    field public static final java.lang.String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
    field public static final java.lang.String MANAGE_ACCOUNTS = "android.permission.MANAGE_ACCOUNTS";
    field public static final java.lang.String MANAGE_APP_TOKENS = "android.permission.MANAGE_APP_TOKENS";
    field public static final java.lang.String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
    field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
    field public static final java.lang.String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
    field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS";
    field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
    field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
    field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
    field public static final java.lang.String NFC = "android.permission.NFC";
    field public static final java.lang.String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS";
    field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
    field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
    field public static final java.lang.String READ_CALENDAR = "android.permission.READ_CALENDAR";
    field public static final java.lang.String READ_CALL_LOG = "android.permission.READ_CALL_LOG";
    field public static final java.lang.String READ_CONTACTS = "android.permission.READ_CONTACTS";
    field public static final java.lang.String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
    field public static final java.lang.String READ_FRAME_BUFFER = "android.permission.READ_FRAME_BUFFER";
    field public static final java.lang.String READ_HISTORY_BOOKMARKS = "com.android.browser.permission.READ_HISTORY_BOOKMARKS";
    field public static final deprecated java.lang.String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE";
    field public static final java.lang.String READ_LOGS = "android.permission.READ_LOGS";
    field public static final java.lang.String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
    field public static final java.lang.String READ_PROFILE = "android.permission.READ_PROFILE";
    field public static final java.lang.String READ_SMS = "android.permission.READ_SMS";
    field public static final deprecated java.lang.String READ_SOCIAL_STREAM = "android.permission.READ_SOCIAL_STREAM";
    field public static final java.lang.String READ_SYNC_SETTINGS = "android.permission.READ_SYNC_SETTINGS";
    field public static final java.lang.String READ_SYNC_STATS = "android.permission.READ_SYNC_STATS";
    field public static final java.lang.String READ_USER_DICTIONARY = "android.permission.READ_USER_DICTIONARY";
    field public static final java.lang.String READ_VOICEMAIL = "com.android.voicemail.permission.READ_VOICEMAIL";
    field public static final java.lang.String REBOOT = "android.permission.REBOOT";
    field public static final java.lang.String RECEIVE_BOOT_COMPLETED = "android.permission.RECEIVE_BOOT_COMPLETED";
    field public static final java.lang.String RECEIVE_MMS = "android.permission.RECEIVE_MMS";
    field public static final java.lang.String RECEIVE_SMS = "android.permission.RECEIVE_SMS";
    field public static final java.lang.String RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH";
    field public static final java.lang.String RECORD_AUDIO = "android.permission.RECORD_AUDIO";
    field public static final java.lang.String REORDER_TASKS = "android.permission.REORDER_TASKS";
    field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
    field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
    field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS";
    field public static final java.lang.String SET_ACTIVITY_WATCHER = "android.permission.SET_ACTIVITY_WATCHER";
    field public static final java.lang.String SET_ALARM = "com.android.alarm.permission.SET_ALARM";
    field public static final java.lang.String SET_ALWAYS_FINISH = "android.permission.SET_ALWAYS_FINISH";
    field public static final java.lang.String SET_ANIMATION_SCALE = "android.permission.SET_ANIMATION_SCALE";
    field public static final java.lang.String SET_DEBUG_APP = "android.permission.SET_DEBUG_APP";
    field public static final java.lang.String SET_ORIENTATION = "android.permission.SET_ORIENTATION";
    field public static final java.lang.String SET_POINTER_SPEED = "android.permission.SET_POINTER_SPEED";
    field public static final deprecated java.lang.String SET_PREFERRED_APPLICATIONS = "android.permission.SET_PREFERRED_APPLICATIONS";
    field public static final java.lang.String SET_PROCESS_LIMIT = "android.permission.SET_PROCESS_LIMIT";
    field public static final java.lang.String SET_TIME = "android.permission.SET_TIME";
    field public static final java.lang.String SET_TIME_ZONE = "android.permission.SET_TIME_ZONE";
    field public static final java.lang.String SET_WALLPAPER = "android.permission.SET_WALLPAPER";
    field public static final java.lang.String SET_WALLPAPER_HINTS = "android.permission.SET_WALLPAPER_HINTS";
    field public static final java.lang.String SIGNAL_PERSISTENT_PROCESSES = "android.permission.SIGNAL_PERSISTENT_PROCESSES";
    field public static final java.lang.String STATUS_BAR = "android.permission.STATUS_BAR";
    field public static final java.lang.String SYSTEM_ALERT_WINDOW = "android.permission.SYSTEM_ALERT_WINDOW";
    field public static final java.lang.String TRANSMIT_IR = "android.permission.TRANSMIT_IR";
    field public static final java.lang.String UNINSTALL_SHORTCUT = "com.android.launcher.permission.UNINSTALL_SHORTCUT";
    field public static final java.lang.String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
    field public static final java.lang.String USE_CREDENTIALS = "android.permission.USE_CREDENTIALS";
    field public static final java.lang.String USE_FINGERPRINT = "android.permission.USE_FINGERPRINT";
    field public static final java.lang.String USE_SIP = "android.permission.USE_SIP";
    field public static final java.lang.String VIBRATE = "android.permission.VIBRATE";
    field public static final java.lang.String WAKE_LOCK = "android.permission.WAKE_LOCK";
    field public static final java.lang.String WRITE_APN_SETTINGS = "android.permission.WRITE_APN_SETTINGS";
    field public static final java.lang.String WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
    field public static final java.lang.String WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
    field public static final java.lang.String WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
    field public static final java.lang.String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
    field public static final java.lang.String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
    field public static final java.lang.String WRITE_HISTORY_BOOKMARKS = "com.android.browser.permission.WRITE_HISTORY_BOOKMARKS";
    field public static final java.lang.String WRITE_PROFILE = "android.permission.WRITE_PROFILE";
    field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
    field public static final java.lang.String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
    field public static final java.lang.String WRITE_SMS = "android.permission.WRITE_SMS";
    field public static final deprecated java.lang.String WRITE_SOCIAL_STREAM = "android.permission.WRITE_SOCIAL_STREAM";
    field public static final java.lang.String WRITE_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
    field public static final java.lang.String WRITE_USER_DICTIONARY = "android.permission.WRITE_USER_DICTIONARY";
    field public static final java.lang.String WRITE_VOICEMAIL = "com.android.voicemail.permission.WRITE_VOICEMAIL";
  }

  public static final class Manifest.permission_group {
    ctor public Manifest.permission_group();
    field public static final java.lang.String ACCOUNTS = "android.permission-group.ACCOUNTS";
    field public static final java.lang.String BOOKMARKS = "android.permission-group.BOOKMARKS";
    field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR";
    field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
    field public static final java.lang.String CONTACTS = "android.permission-group.CONTACTS";
    field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
    field public static final java.lang.String MICROPHONE = "android.permission-group.MICROPHONE";
    field public static final java.lang.String PHONE = "android.permission-group.PHONE";
    field public static final java.lang.String SENSORS = "android.permission-group.SENSORS";
    field public static final java.lang.String SMS = "android.permission-group.SMS";
    field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
    field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
  }

  public final class R {
    ctor public R();
  }

  public static final class R.anim {
    ctor public R.anim();
    field public static final int accelerate_decelerate_interpolator = 17432580; // 0x10a0004
    field public static final int accelerate_interpolator = 17432581; // 0x10a0005
    field public static final int anticipate_interpolator = 17432583; // 0x10a0007
    field public static final int anticipate_overshoot_interpolator = 17432585; // 0x10a0009
    field public static final int bounce_interpolator = 17432586; // 0x10a000a
    field public static final int cycle_interpolator = 17432588; // 0x10a000c
    field public static final int decelerate_interpolator = 17432582; // 0x10a0006
    field public static final int fade_in = 17432576; // 0x10a0000
    field public static final int fade_out = 17432577; // 0x10a0001
    field public static final int linear_interpolator = 17432587; // 0x10a000b
    field public static final int overshoot_interpolator = 17432584; // 0x10a0008
    field public static final int slide_in_left = 17432578; // 0x10a0002
    field public static final int slide_out_right = 17432579; // 0x10a0003
  }

  public static final class R.animator {
    ctor public R.animator();
    field public static final int fade_in = 17498112; // 0x10b0000
    field public static final int fade_out = 17498113; // 0x10b0001
  }

  public static final class R.array {
    ctor public R.array();
    field public static final int emailAddressTypes = 17235968; // 0x1070000
    field public static final int imProtocols = 17235969; // 0x1070001
    field public static final int organizationTypes = 17235970; // 0x1070002
    field public static final int phoneTypes = 17235971; // 0x1070003
    field public static final int postalAddressTypes = 17235972; // 0x1070004
  }

  public static final class R.attr {
    ctor public R.attr();
    field public static final int absListViewStyle = 16842858; // 0x101006a
    field public static final int accessibilityEventTypes = 16843648; // 0x1010380
    field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
    field public static final int accessibilityFlags = 16843652; // 0x1010384
    field public static final int accessibilityLiveRegion = 16843758; // 0x10103ee
    field public static final int accessibilityTraversalAfter = 16843986; // 0x10104d2
    field public static final int accessibilityTraversalBefore = 16843985; // 0x10104d1
    field public static final int accountPreferences = 16843423; // 0x101029f
    field public static final int accountType = 16843407; // 0x101028f
    field public static final int action = 16842797; // 0x101002d
    field public static final int actionBarDivider = 16843675; // 0x101039b
    field public static final int actionBarItemBackground = 16843676; // 0x101039c
    field public static final int actionBarPopupTheme = 16843917; // 0x101048d
    field public static final int actionBarSize = 16843499; // 0x10102eb
    field public static final int actionBarSplitStyle = 16843656; // 0x1010388
    field public static final int actionBarStyle = 16843470; // 0x10102ce
    field public static final int actionBarTabBarStyle = 16843508; // 0x10102f4
    field public static final int actionBarTabStyle = 16843507; // 0x10102f3
    field public static final int actionBarTabTextStyle = 16843509; // 0x10102f5
    field public static final int actionBarTheme = 16843825; // 0x1010431
    field public static final int actionBarWidgetTheme = 16843671; // 0x1010397
    field public static final int actionButtonStyle = 16843480; // 0x10102d8
    field public static final int actionDropDownStyle = 16843479; // 0x10102d7
    field public static final int actionLayout = 16843515; // 0x10102fb
    field public static final int actionMenuTextAppearance = 16843616; // 0x1010360
    field public static final int actionMenuTextColor = 16843617; // 0x1010361
    field public static final int actionModeBackground = 16843483; // 0x10102db
    field public static final int actionModeCloseButtonStyle = 16843511; // 0x10102f7
    field public static final int actionModeCloseDrawable = 16843484; // 0x10102dc
    field public static final int actionModeCopyDrawable = 16843538; // 0x1010312
    field public static final int actionModeCutDrawable = 16843537; // 0x1010311
    field public static final int actionModeFindDrawable = 16843898; // 0x101047a
    field public static final int actionModePasteDrawable = 16843539; // 0x1010313
    field public static final int actionModeSelectAllDrawable = 16843646; // 0x101037e
    field public static final int actionModeShareDrawable = 16843897; // 0x1010479
    field public static final int actionModeSplitBackground = 16843677; // 0x101039d
    field public static final int actionModeStyle = 16843668; // 0x1010394
    field public static final int actionModeWebSearchDrawable = 16843899; // 0x101047b
    field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6
    field public static final int actionOverflowMenuStyle = 16843844; // 0x1010444
    field public static final int actionProviderClass = 16843657; // 0x1010389
    field public static final int actionViewClass = 16843516; // 0x10102fc
    field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd
    field public static final int activityCloseEnterAnimation = 16842938; // 0x10100ba
    field public static final int activityCloseExitAnimation = 16842939; // 0x10100bb
    field public static final int activityOpenEnterAnimation = 16842936; // 0x10100b8
    field public static final int activityOpenExitAnimation = 16842937; // 0x10100b9
    field public static final int addPrintersActivity = 16843750; // 0x10103e6
    field public static final int addStatesFromChildren = 16842992; // 0x10100f0
    field public static final int adjustViewBounds = 16843038; // 0x101011e
    field public static final int advancedPrintOptionsActivity = 16843761; // 0x10103f1
    field public static final int alertDialogIcon = 16843605; // 0x1010355
    field public static final int alertDialogStyle = 16842845; // 0x101005d
    field public static final int alertDialogTheme = 16843529; // 0x1010309
    field public static final int alignmentMode = 16843642; // 0x101037a
    field public static final int allContactsName = 16843468; // 0x10102cc
    field public static final int allowBackup = 16843392; // 0x1010280
    field public static final int allowClearUserData = 16842757; // 0x1010005
    field public static final int allowEmbedded = 16843765; // 0x10103f5
    field public static final int allowParallelSyncs = 16843570; // 0x1010332
    field public static final int allowSingleTap = 16843353; // 0x1010259
    field public static final int allowTaskReparenting = 16843268; // 0x1010204
    field public static final int allowUndo = 16844006; // 0x10104e6
    field public static final int alpha = 16843551; // 0x101031f
    field public static final int alphabeticShortcut = 16843235; // 0x10101e3
    field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
    field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
    field public static final deprecated int amPmBackgroundColor = 16843941; // 0x10104a5
    field public static final deprecated int amPmTextColor = 16843940; // 0x10104a4
    field public static final int ambientShadowAlpha = 16843966; // 0x10104be
    field public static final int angle = 16843168; // 0x10101a0
    field public static final int animateFirstView = 16843477; // 0x10102d5
    field public static final int animateLayoutChanges = 16843506; // 0x10102f2
    field public static final int animateOnClick = 16843356; // 0x101025c
    field public static final int animation = 16843213; // 0x10101cd
    field public static final int animationCache = 16842989; // 0x10100ed
    field public static final int animationDuration = 16843026; // 0x1010112
    field public static final int animationOrder = 16843214; // 0x10101ce
    field public static final deprecated int animationResolution = 16843546; // 0x101031a
    field public static final int antialias = 16843034; // 0x101011a
    field public static final int anyDensity = 16843372; // 0x101026c
    field public static final int apduServiceBanner = 16843757; // 0x10103ed
    field public static final int apiKey = 16843281; // 0x1010211
    field public static final int author = 16843444; // 0x10102b4
    field public static final int authorities = 16842776; // 0x1010018
    field public static final int autoAdvanceViewId = 16843535; // 0x101030f
    field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b
    field public static final int autoLink = 16842928; // 0x10100b0
    field public static final int autoMirrored = 16843754; // 0x10103ea
    field public static final int autoRemoveFromRecents = 16843847; // 0x1010447
    field public static final int autoStart = 16843445; // 0x10102b5
    field public static final deprecated int autoText = 16843114; // 0x101016a
    field public static final int autoUrlDetect = 16843404; // 0x101028c
    field public static final int autoVerify = 16844010; // 0x10104ea
    field public static final int background = 16842964; // 0x10100d4
    field public static final int backgroundDimAmount = 16842802; // 0x1010032
    field public static final int backgroundDimEnabled = 16843295; // 0x101021f
    field public static final int backgroundSplit = 16843659; // 0x101038b
    field public static final int backgroundStacked = 16843658; // 0x101038a
    field public static final int backgroundTint = 16843883; // 0x101046b
    field public static final int backgroundTintMode = 16843884; // 0x101046c
    field public static final int backupAgent = 16843391; // 0x101027f
    field public static final int banner = 16843762; // 0x10103f2
    field public static final int baseline = 16843548; // 0x101031c
    field public static final int baselineAlignBottom = 16843042; // 0x1010122
    field public static final int baselineAligned = 16843046; // 0x1010126
    field public static final int baselineAlignedChildIndex = 16843047; // 0x1010127
    field public static final int borderlessButtonStyle = 16843563; // 0x101032b
    field public static final int bottom = 16843184; // 0x10101b0
    field public static final int bottomBright = 16842957; // 0x10100cd
    field public static final int bottomDark = 16842953; // 0x10100c9
    field public static final int bottomLeftRadius = 16843179; // 0x10101ab
    field public static final int bottomMedium = 16842958; // 0x10100ce
    field public static final int bottomOffset = 16843351; // 0x1010257
    field public static final int bottomRightRadius = 16843180; // 0x10101ac
    field public static final int breadCrumbShortTitle = 16843524; // 0x1010304
    field public static final int breadCrumbTitle = 16843523; // 0x1010303
    field public static final int breakStrategy = 16844011; // 0x10104eb
    field public static final int bufferType = 16843086; // 0x101014e
    field public static final int button = 16843015; // 0x1010107
    field public static final int buttonBarButtonStyle = 16843567; // 0x101032f
    field public static final int buttonBarNegativeButtonStyle = 16843915; // 0x101048b
    field public static final int buttonBarNeutralButtonStyle = 16843914; // 0x101048a
    field public static final int buttonBarPositiveButtonStyle = 16843913; // 0x1010489
    field public static final int buttonBarStyle = 16843566; // 0x101032e
    field public static final int buttonStyle = 16842824; // 0x1010048
    field public static final int buttonStyleInset = 16842826; // 0x101004a
    field public static final int buttonStyleSmall = 16842825; // 0x1010049
    field public static final int buttonStyleToggle = 16842827; // 0x101004b
    field public static final int buttonTint = 16843887; // 0x101046f
    field public static final int buttonTintMode = 16843888; // 0x1010470
    field public static final int cacheColorHint = 16843009; // 0x1010101
    field public static final int calendarTextColor = 16843931; // 0x101049b
    field public static final int calendarViewShown = 16843596; // 0x101034c
    field public static final int calendarViewStyle = 16843613; // 0x101035d
    field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
    field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9
    field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7
    field public static final int canRetrieveWindowContent = 16843653; // 0x1010385
    field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230
    field public static final deprecated int capitalize = 16843113; // 0x1010169
    field public static final int category = 16843752; // 0x10103e8
    field public static final int centerBright = 16842956; // 0x10100cc
    field public static final int centerColor = 16843275; // 0x101020b
    field public static final int centerDark = 16842952; // 0x10100c8
    field public static final int centerMedium = 16842959; // 0x10100cf
    field public static final int centerX = 16843170; // 0x10101a2
    field public static final int centerY = 16843171; // 0x10101a3
    field public static final int checkBoxPreferenceStyle = 16842895; // 0x101008f
    field public static final int checkMark = 16843016; // 0x1010108
    field public static final int checkMarkTint = 16843943; // 0x10104a7
    field public static final int checkMarkTintMode = 16843944; // 0x10104a8
    field public static final int checkable = 16843237; // 0x10101e5
    field public static final int checkableBehavior = 16843232; // 0x10101e0
    field public static final int checkboxStyle = 16842860; // 0x101006c
    field public static final int checked = 16843014; // 0x1010106
    field public static final int checkedButton = 16843080; // 0x1010148
    field public static final int checkedTextViewStyle = 16843720; // 0x10103c8
    field public static final int childDivider = 16843025; // 0x1010111
    field public static final int childIndicator = 16843020; // 0x101010c
    field public static final int childIndicatorEnd = 16843732; // 0x10103d4
    field public static final int childIndicatorLeft = 16843023; // 0x101010f
    field public static final int childIndicatorRight = 16843024; // 0x1010110
    field public static final int childIndicatorStart = 16843731; // 0x10103d3
    field public static final int choiceMode = 16843051; // 0x101012b
    field public static final int clearTaskOnLaunch = 16842773; // 0x1010015
    field public static final int clickable = 16842981; // 0x10100e5
    field public static final int clipChildren = 16842986; // 0x10100ea
    field public static final int clipOrientation = 16843274; // 0x101020a
    field public static final int clipToPadding = 16842987; // 0x10100eb
    field public static final int closeIcon = 16843905; // 0x1010481
    field public static final int codes = 16843330; // 0x1010242
    field public static final int collapseColumns = 16843083; // 0x101014b
    field public static final int collapseContentDescription = 16843984; // 0x10104d0
    field public static final int color = 16843173; // 0x10101a5
    field public static final int colorAccent = 16843829; // 0x1010435
    field public static final int colorActivatedHighlight = 16843664; // 0x1010390
    field public static final int colorBackground = 16842801; // 0x1010031
    field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
    field public static final int colorBackgroundFloating = 16844007; // 0x10104e7
    field public static final int colorButtonNormal = 16843819; // 0x101042b
    field public static final int colorControlActivated = 16843818; // 0x101042a
    field public static final int colorControlHighlight = 16843820; // 0x101042c
    field public static final int colorControlNormal = 16843817; // 0x1010429
    field public static final int colorEdgeEffect = 16843982; // 0x10104ce
    field public static final int colorFocusedHighlight = 16843663; // 0x101038f
    field public static final int colorForeground = 16842800; // 0x1010030
    field public static final int colorForegroundInverse = 16843270; // 0x1010206
    field public static final int colorLongPressedHighlight = 16843662; // 0x101038e
    field public static final int colorMultiSelectHighlight = 16843665; // 0x1010391
    field public static final int colorPressedHighlight = 16843661; // 0x101038d
    field public static final int colorPrimary = 16843827; // 0x1010433
    field public static final int colorPrimaryDark = 16843828; // 0x1010434
    field public static final int columnCount = 16843639; // 0x1010377
    field public static final int columnDelay = 16843215; // 0x10101cf
    field public static final int columnOrderPreserved = 16843640; // 0x1010378
    field public static final int columnWidth = 16843031; // 0x1010117
    field public static final int commitIcon = 16843909; // 0x1010485
    field public static final int compatibleWidthLimitDp = 16843621; // 0x1010365
    field public static final int completionHint = 16843122; // 0x1010172
    field public static final int completionHintView = 16843123; // 0x1010173
    field public static final int completionThreshold = 16843124; // 0x1010174
    field public static final int configChanges = 16842783; // 0x101001f
    field public static final int configure = 16843357; // 0x101025d
    field public static final int constantSize = 16843158; // 0x1010196
    field public static final int content = 16843355; // 0x101025b
    field public static final int contentAgeHint = 16843961; // 0x10104b9
    field public static final int contentAuthority = 16843408; // 0x1010290
    field public static final int contentDescription = 16843379; // 0x1010273
    field public static final int contentInsetEnd = 16843860; // 0x1010454
    field public static final int contentInsetLeft = 16843861; // 0x1010455
    field public static final int contentInsetRight = 16843862; // 0x1010456
    field public static final int contentInsetStart = 16843859; // 0x1010453
    field public static final int controlX1 = 16843772; // 0x10103fc
    field public static final int controlX2 = 16843774; // 0x10103fe
    field public static final int controlY1 = 16843773; // 0x10103fd
    field public static final int controlY2 = 16843775; // 0x10103ff
    field public static final int country = 16843962; // 0x10104ba
    field public static final int cropToPadding = 16843043; // 0x1010123
    field public static final int cursorVisible = 16843090; // 0x1010152
    field public static final int customNavigationLayout = 16843474; // 0x10102d2
    field public static final int customTokens = 16843579; // 0x101033b
    field public static final int cycles = 16843220; // 0x10101d4
    field public static final int dashGap = 16843175; // 0x10101a7
    field public static final int dashWidth = 16843174; // 0x10101a6
    field public static final int data = 16842798; // 0x101002e
    field public static final int datePickerDialogTheme = 16843948; // 0x10104ac
    field public static final int datePickerMode = 16843955; // 0x10104b3
    field public static final int datePickerStyle = 16843612; // 0x101035c
    field public static final int dateTextAppearance = 16843593; // 0x1010349
    field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494
    field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495
    field public static final int debuggable = 16842767; // 0x101000f
    field public static final int defaultValue = 16843245; // 0x10101ed
    field public static final int delay = 16843212; // 0x10101cc
    field public static final int dependency = 16843244; // 0x10101ec
    field public static final int descendantFocusability = 16842993; // 0x10100f1
    field public static final int description = 16842784; // 0x1010020
    field public static final int detachWallpaper = 16843430; // 0x10102a6
    field public static final int detailColumn = 16843427; // 0x10102a3
    field public static final int detailSocialSummary = 16843428; // 0x10102a4
    field public static final int detailsElementBackground = 16843598; // 0x101034e
    field public static final int dial = 16843010; // 0x1010102
    field public static final int dialogIcon = 16843252; // 0x10101f4
    field public static final int dialogLayout = 16843255; // 0x10101f7
    field public static final int dialogMessage = 16843251; // 0x10101f3
    field public static final int dialogPreferenceStyle = 16842897; // 0x1010091
    field public static final int dialogPreferredPadding = 16843987; // 0x10104d3
    field public static final int dialogTheme = 16843528; // 0x1010308
    field public static final int dialogTitle = 16843250; // 0x10101f2
    field public static final int digits = 16843110; // 0x1010166
    field public static final int direction = 16843217; // 0x10101d1
    field public static final deprecated int directionDescriptions = 16843681; // 0x10103a1
    field public static final int directionPriority = 16843218; // 0x10101d2
    field public static final int disableDependentsState = 16843249; // 0x10101f1
    field public static final int disabledAlpha = 16842803; // 0x1010033
    field public static final int displayOptions = 16843472; // 0x10102d0
    field public static final int dither = 16843036; // 0x101011c
    field public static final int divider = 16843049; // 0x1010129
    field public static final int dividerHeight = 16843050; // 0x101012a
    field public static final int dividerHorizontal = 16843564; // 0x101032c
    field public static final int dividerPadding = 16843562; // 0x101032a
    field public static final int dividerVertical = 16843530; // 0x101030a
    field public static final int documentLaunchMode = 16843845; // 0x1010445
    field public static final int drawSelectorOnTop = 16843004; // 0x10100fc
    field public static final int drawable = 16843161; // 0x1010199
    field public static final int drawableBottom = 16843118; // 0x101016e
    field public static final int drawableEnd = 16843667; // 0x1010393
    field public static final int drawableLeft = 16843119; // 0x101016f
    field public static final int drawablePadding = 16843121; // 0x1010171
    field public static final int drawableRight = 16843120; // 0x1010170
    field public static final int drawableStart = 16843666; // 0x1010392
    field public static final int drawableTint = 16843990; // 0x10104d6
    field public static final int drawableTintMode = 16843991; // 0x10104d7
    field public static final int drawableTop = 16843117; // 0x101016d
    field public static final int drawingCacheQuality = 16842984; // 0x10100e8
    field public static final int dropDownAnchor = 16843363; // 0x1010263
    field public static final int dropDownHeight = 16843395; // 0x1010283
    field public static final int dropDownHintAppearance = 16842888; // 0x1010088
    field public static final int dropDownHorizontalOffset = 16843436; // 0x10102ac
    field public static final int dropDownItemStyle = 16842886; // 0x1010086
    field public static final int dropDownListViewStyle = 16842861; // 0x101006d
    field public static final int dropDownSelector = 16843125; // 0x1010175
    field public static final int dropDownSpinnerStyle = 16843478; // 0x10102d6
    field public static final int dropDownVerticalOffset = 16843437; // 0x10102ad
    field public static final int dropDownWidth = 16843362; // 0x1010262
    field public static final int duplicateParentState = 16842985; // 0x10100e9
    field public static final int duration = 16843160; // 0x1010198
    field public static final int durationScaleHint = 16844014; // 0x10104ee
    field public static final int editTextBackground = 16843602; // 0x1010352
    field public static final int editTextColor = 16843601; // 0x1010351
    field public static final int editTextPreferenceStyle = 16842898; // 0x1010092
    field public static final int editTextStyle = 16842862; // 0x101006e
    field public static final deprecated int editable = 16843115; // 0x101016b
    field public static final int editorExtras = 16843300; // 0x1010224
    field public static final int elegantTextHeight = 16843869; // 0x101045d
    field public static final int elevation = 16843840; // 0x1010440
    field public static final int ellipsize = 16842923; // 0x10100ab
    field public static final int ems = 16843096; // 0x1010158
    field public static final int enabled = 16842766; // 0x101000e
    field public static final int end = 16843997; // 0x10104dd
    field public static final int endColor = 16843166; // 0x101019e
    field public static final deprecated int endYear = 16843133; // 0x101017d
    field public static final int enterFadeDuration = 16843532; // 0x101030c
    field public static final int entries = 16842930; // 0x10100b2
    field public static final int entryValues = 16843256; // 0x10101f8
    field public static final int eventsInterceptionEnabled = 16843389; // 0x101027d
    field public static final int excludeClass = 16843842; // 0x1010442
    field public static final int excludeFromRecents = 16842775; // 0x1010017
    field public static final int excludeId = 16843841; // 0x1010441
    field public static final int excludeName = 16843854; // 0x101044e
    field public static final int exitFadeDuration = 16843533; // 0x101030d
    field public static final int expandableListPreferredChildIndicatorLeft = 16842834; // 0x1010052
    field public static final int expandableListPreferredChildIndicatorRight = 16842835; // 0x1010053
    field public static final int expandableListPreferredChildPaddingLeft = 16842831; // 0x101004f
    field public static final int expandableListPreferredItemIndicatorLeft = 16842832; // 0x1010050
    field public static final int expandableListPreferredItemIndicatorRight = 16842833; // 0x1010051
    field public static final int expandableListPreferredItemPaddingLeft = 16842830; // 0x101004e
    field public static final int expandableListViewStyle = 16842863; // 0x101006f
    field public static final int expandableListViewWhiteStyle = 16843446; // 0x10102b6
    field public static final int exported = 16842768; // 0x1010010
    field public static final int extraTension = 16843371; // 0x101026b
    field public static final int extractNativeLibs = 16844008; // 0x10104e8
    field public static final int factor = 16843219; // 0x10101d3
    field public static final int fadeDuration = 16843384; // 0x1010278
    field public static final int fadeEnabled = 16843390; // 0x101027e
    field public static final int fadeOffset = 16843383; // 0x1010277
    field public static final int fadeScrollbars = 16843434; // 0x10102aa
    field public static final int fadingEdge = 16842975; // 0x10100df
    field public static final int fadingEdgeLength = 16842976; // 0x10100e0
    field public static final int fadingMode = 16843745; // 0x10103e1
    field public static final int fastScrollAlwaysVisible = 16843573; // 0x1010335
    field public static final int fastScrollEnabled = 16843302; // 0x1010226
    field public static final int fastScrollOverlayPosition = 16843578; // 0x101033a
    field public static final int fastScrollPreviewBackgroundLeft = 16843575; // 0x1010337
    field public static final int fastScrollPreviewBackgroundRight = 16843576; // 0x1010338
    field public static final int fastScrollStyle = 16843767; // 0x10103f7
    field public static final int fastScrollTextColor = 16843609; // 0x1010359
    field public static final int fastScrollThumbDrawable = 16843574; // 0x1010336
    field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
    field public static final int fillAfter = 16843197; // 0x10101bd
    field public static final int fillAlpha = 16843980; // 0x10104cc
    field public static final int fillBefore = 16843196; // 0x10101bc
    field public static final int fillColor = 16843780; // 0x1010404
    field public static final int fillEnabled = 16843343; // 0x101024f
    field public static final int fillViewport = 16843130; // 0x101017a
    field public static final int filter = 16843035; // 0x101011b
    field public static final int filterTouchesWhenObscured = 16843460; // 0x10102c4
    field public static final int finishOnCloseSystemDialogs = 16843431; // 0x10102a7
    field public static final int finishOnTaskLaunch = 16842772; // 0x1010014
    field public static final int firstDayOfWeek = 16843581; // 0x101033d
    field public static final int fitsSystemWindows = 16842973; // 0x10100dd
    field public static final int flipInterval = 16843129; // 0x1010179
    field public static final int focusable = 16842970; // 0x10100da
    field public static final int focusableInTouchMode = 16842971; // 0x10100db
    field public static final deprecated int focusedMonthDateColor = 16843587; // 0x1010343
    field public static final int fontFamily = 16843692; // 0x10103ac
    field public static final int fontFeatureSettings = 16843959; // 0x10104b7
    field public static final int footerDividersEnabled = 16843311; // 0x101022f
    field public static final int foreground = 16843017; // 0x1010109
    field public static final int foregroundGravity = 16843264; // 0x1010200
    field public static final int foregroundTint = 16843885; // 0x101046d
    field public static final int foregroundTintMode = 16843886; // 0x101046e
    field public static final int format = 16843013; // 0x1010105
    field public static final int format12Hour = 16843722; // 0x10103ca
    field public static final int format24Hour = 16843723; // 0x10103cb
    field public static final int fraction = 16843992; // 0x10104d8
    field public static final int fragment = 16843491; // 0x10102e3
    field public static final int fragmentAllowEnterTransitionOverlap = 16843976; // 0x10104c8
    field public static final int fragmentAllowReturnTransitionOverlap = 16843977; // 0x10104c9
    field public static final int fragmentCloseEnterAnimation = 16843495; // 0x10102e7
    field public static final int fragmentCloseExitAnimation = 16843496; // 0x10102e8
    field public static final int fragmentEnterTransition = 16843971; // 0x10104c3
    field public static final int fragmentExitTransition = 16843970; // 0x10104c2
    field public static final int fragmentFadeEnterAnimation = 16843497; // 0x10102e9
    field public static final int fragmentFadeExitAnimation = 16843498; // 0x10102ea
    field public static final int fragmentOpenEnterAnimation = 16843493; // 0x10102e5
    field public static final int fragmentOpenExitAnimation = 16843494; // 0x10102e6
    field public static final int fragmentReenterTransition = 16843975; // 0x10104c7
    field public static final int fragmentReturnTransition = 16843973; // 0x10104c5
    field public static final int fragmentSharedElementEnterTransition = 16843972; // 0x10104c4
    field public static final int fragmentSharedElementReturnTransition = 16843974; // 0x10104c6
    field public static final int freezesText = 16843116; // 0x101016c
    field public static final int fromAlpha = 16843210; // 0x10101ca
    field public static final int fromDegrees = 16843187; // 0x10101b3
    field public static final int fromId = 16843850; // 0x101044a
    field public static final int fromScene = 16843741; // 0x10103dd
    field public static final int fromXDelta = 16843206; // 0x10101c6
    field public static final int fromXScale = 16843202; // 0x10101c2
    field public static final int fromYDelta = 16843208; // 0x10101c8
    field public static final int fromYScale = 16843204; // 0x10101c4
    field public static final int fullBackupOnly = 16843891; // 0x1010473
    field public static final int fullBright = 16842954; // 0x10100ca
    field public static final int fullDark = 16842950; // 0x10100c6
    field public static final int functionalTest = 16842787; // 0x1010023
    field public static final int galleryItemBackground = 16842828; // 0x101004c
    field public static final int galleryStyle = 16842864; // 0x1010070
    field public static final int gestureColor = 16843381; // 0x1010275
    field public static final int gestureStrokeAngleThreshold = 16843388; // 0x101027c
    field public static final int gestureStrokeLengthThreshold = 16843386; // 0x101027a
    field public static final int gestureStrokeSquarenessThreshold = 16843387; // 0x101027b
    field public static final int gestureStrokeType = 16843385; // 0x1010279
    field public static final int gestureStrokeWidth = 16843380; // 0x1010274
    field public static final int glEsVersion = 16843393; // 0x1010281
    field public static final int goIcon = 16843906; // 0x1010482
    field public static final int gradientRadius = 16843172; // 0x10101a4
    field public static final int grantUriPermissions = 16842779; // 0x101001b
    field public static final int gravity = 16842927; // 0x10100af
    field public static final int gridViewStyle = 16842865; // 0x1010071
    field public static final int groupIndicator = 16843019; // 0x101010b
    field public static final int hand_hour = 16843011; // 0x1010103
    field public static final int hand_minute = 16843012; // 0x1010104
    field public static final int handle = 16843354; // 0x101025a
    field public static final int handleProfiling = 16842786; // 0x1010022
    field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
    field public static final int hardwareAccelerated = 16843475; // 0x10102d3
    field public static final int hasCode = 16842764; // 0x101000c
    field public static final deprecated int headerAmPmTextAppearance = 16843936; // 0x10104a0
    field public static final int headerBackground = 16843055; // 0x101012f
    field public static final deprecated int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
    field public static final int headerDividersEnabled = 16843310; // 0x101022e
    field public static final deprecated int headerMonthTextAppearance = 16843926; // 0x1010496
    field public static final deprecated int headerTimeTextAppearance = 16843935; // 0x101049f
    field public static final deprecated int headerYearTextAppearance = 16843928; // 0x1010498
    field public static final int height = 16843093; // 0x1010155
    field public static final int hideOnContentScroll = 16843843; // 0x1010443
    field public static final int hint = 16843088; // 0x1010150
    field public static final int homeAsUpIndicator = 16843531; // 0x101030b
    field public static final int homeLayout = 16843549; // 0x101031d
    field public static final int horizontalDivider = 16843053; // 0x101012d
    field public static final int horizontalGap = 16843327; // 0x101023f
    field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353
    field public static final int horizontalSpacing = 16843028; // 0x1010114
    field public static final int host = 16842792; // 0x1010028
    field public static final int icon = 16842754; // 0x1010002
    field public static final int iconPreview = 16843337; // 0x1010249
    field public static final int iconTint = 16844000; // 0x10104e0
    field public static final int iconTintMode = 16844001; // 0x10104e1
    field public static final int iconifiedByDefault = 16843514; // 0x10102fa
    field public static final int id = 16842960; // 0x10100d0
    field public static final int ignoreGravity = 16843263; // 0x10101ff
    field public static final int imageButtonStyle = 16842866; // 0x1010072
    field public static final int imageWellStyle = 16842867; // 0x1010073
    field public static final int imeActionId = 16843366; // 0x1010266
    field public static final int imeActionLabel = 16843365; // 0x1010265
    field public static final int imeExtractEnterAnimation = 16843368; // 0x1010268
    field public static final int imeExtractExitAnimation = 16843369; // 0x1010269
    field public static final int imeFullscreenBackground = 16843308; // 0x101022c
    field public static final int imeOptions = 16843364; // 0x1010264
    field public static final int imeSubtypeExtraValue = 16843502; // 0x10102ee
    field public static final int imeSubtypeLocale = 16843500; // 0x10102ec
    field public static final int imeSubtypeMode = 16843501; // 0x10102ed
    field public static final int immersive = 16843456; // 0x10102c0
    field public static final int importantForAccessibility = 16843690; // 0x10103aa
    field public static final int inAnimation = 16843127; // 0x1010177
    field public static final int includeFontPadding = 16843103; // 0x101015f
    field public static final int includeInGlobalSearch = 16843374; // 0x101026e
    field public static final int indeterminate = 16843065; // 0x1010139
    field public static final int indeterminateBehavior = 16843070; // 0x101013e
    field public static final int indeterminateDrawable = 16843067; // 0x101013b
    field public static final int indeterminateDuration = 16843069; // 0x101013d
    field public static final int indeterminateOnly = 16843066; // 0x101013a
    field public static final int indeterminateProgressStyle = 16843544; // 0x1010318
    field public static final int indeterminateTint = 16843881; // 0x1010469
    field public static final int indeterminateTintMode = 16843882; // 0x101046a
    field public static final int indicatorEnd = 16843730; // 0x10103d2
    field public static final int indicatorLeft = 16843021; // 0x101010d
    field public static final int indicatorRight = 16843022; // 0x101010e
    field public static final int indicatorStart = 16843729; // 0x10103d1
    field public static final int inflatedId = 16842995; // 0x10100f3
    field public static final int initOrder = 16842778; // 0x101001a
    field public static final int initialKeyguardLayout = 16843714; // 0x10103c2
    field public static final int initialLayout = 16843345; // 0x1010251
    field public static final int innerRadius = 16843359; // 0x101025f
    field public static final int innerRadiusRatio = 16843163; // 0x101019b
    field public static final deprecated int inputMethod = 16843112; // 0x1010168
    field public static final int inputType = 16843296; // 0x1010220
    field public static final int inset = 16843957; // 0x10104b5
    field public static final int insetBottom = 16843194; // 0x10101ba
    field public static final int insetLeft = 16843191; // 0x10101b7
    field public static final int insetRight = 16843192; // 0x10101b8
    field public static final int insetTop = 16843193; // 0x10101b9
    field public static final int installLocation = 16843447; // 0x10102b7
    field public static final int interpolator = 16843073; // 0x1010141
    field public static final int isAlwaysSyncable = 16843571; // 0x1010333
    field public static final int isAsciiCapable = 16843753; // 0x10103e9
    field public static final int isAuxiliary = 16843647; // 0x101037f
    field public static final int isDefault = 16843297; // 0x1010221
    field public static final int isGame = 16843764; // 0x10103f4
    field public static final int isIndicator = 16843079; // 0x1010147
    field public static final int isModifier = 16843334; // 0x1010246
    field public static final int isRepeatable = 16843336; // 0x1010248
    field public static final int isScrollContainer = 16843342; // 0x101024e
    field public static final int isSticky = 16843335; // 0x1010247
    field public static final int isolatedProcess = 16843689; // 0x10103a9
    field public static final int itemBackground = 16843056; // 0x1010130
    field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131
    field public static final int itemPadding = 16843565; // 0x101032d
    field public static final int itemTextAppearance = 16843052; // 0x101012c
    field public static final int keepScreenOn = 16843286; // 0x1010216
    field public static final int key = 16843240; // 0x10101e8
    field public static final int keyBackground = 16843315; // 0x1010233
    field public static final int keyEdgeFlags = 16843333; // 0x1010245
    field public static final int keyHeight = 16843326; // 0x101023e
    field public static final int keyIcon = 16843340; // 0x101024c
    field public static final int keyLabel = 16843339; // 0x101024b
    field public static final int keyOutputText = 16843338; // 0x101024a
    field public static final int keyPreviewHeight = 16843321; // 0x1010239
    field public static final int keyPreviewLayout = 16843319; // 0x1010237
    field public static final int keyPreviewOffset = 16843320; // 0x1010238
    field public static final int keySet = 16843739; // 0x10103db
    field public static final int keyTextColor = 16843318; // 0x1010236
    field public static final int keyTextSize = 16843316; // 0x1010234
    field public static final int keyWidth = 16843325; // 0x101023d
    field public static final int keyboardLayout = 16843691; // 0x10103ab
    field public static final int keyboardMode = 16843341; // 0x101024d
    field public static final int keycode = 16842949; // 0x10100c5
    field public static final int killAfterRestore = 16843420; // 0x101029c
    field public static final int label = 16842753; // 0x1010001
    field public static final int labelFor = 16843718; // 0x10103c6
    field public static final int labelTextSize = 16843317; // 0x1010235
    field public static final int largeHeap = 16843610; // 0x101035a
    field public static final int largeScreens = 16843398; // 0x1010286
    field public static final int largestWidthLimitDp = 16843622; // 0x1010366
    field public static final int launchMode = 16842781; // 0x101001d
    field public static final int launchTaskBehindSourceAnimation = 16843922; // 0x1010492
    field public static final int launchTaskBehindTargetAnimation = 16843921; // 0x1010491
    field public static final int layerType = 16843604; // 0x1010354
    field public static final int layout = 16842994; // 0x10100f2
    field public static final int layoutAnimation = 16842988; // 0x10100ec
    field public static final int layoutDirection = 16843698; // 0x10103b2
    field public static final int layoutMode = 16843738; // 0x10103da
    field public static final int layout_above = 16843140; // 0x1010184
    field public static final int layout_alignBaseline = 16843142; // 0x1010186
    field public static final int layout_alignBottom = 16843146; // 0x101018a
    field public static final int layout_alignEnd = 16843706; // 0x10103ba
    field public static final int layout_alignLeft = 16843143; // 0x1010187
    field public static final int layout_alignParentBottom = 16843150; // 0x101018e
    field public static final int layout_alignParentEnd = 16843708; // 0x10103bc
    field public static final int layout_alignParentLeft = 16843147; // 0x101018b
    field public static final int layout_alignParentRight = 16843149; // 0x101018d
    field public static final int layout_alignParentStart = 16843707; // 0x10103bb
    field public static final int layout_alignParentTop = 16843148; // 0x101018c
    field public static final int layout_alignRight = 16843145; // 0x1010189
    field public static final int layout_alignStart = 16843705; // 0x10103b9
    field public static final int layout_alignTop = 16843144; // 0x1010188
    field public static final int layout_alignWithParentIfMissing = 16843154; // 0x1010192
    field public static final int layout_below = 16843141; // 0x1010185
    field public static final int layout_centerHorizontal = 16843152; // 0x1010190
    field public static final int layout_centerInParent = 16843151; // 0x101018f
    field public static final int layout_centerVertical = 16843153; // 0x1010191
    field public static final int layout_column = 16843084; // 0x101014c
    field public static final int layout_columnSpan = 16843645; // 0x101037d
    field public static final int layout_columnWeight = 16843865; // 0x1010459
    field public static final int layout_gravity = 16842931; // 0x10100b3
    field public static final int layout_height = 16842997; // 0x10100f5
    field public static final int layout_margin = 16842998; // 0x10100f6
    field public static final int layout_marginBottom = 16843002; // 0x10100fa
    field public static final int layout_marginEnd = 16843702; // 0x10103b6
    field public static final int layout_marginLeft = 16842999; // 0x10100f7
    field public static final int layout_marginRight = 16843001; // 0x10100f9
    field public static final int layout_marginStart = 16843701; // 0x10103b5
    field public static final int layout_marginTop = 16843000; // 0x10100f8
    field public static final int layout_row = 16843643; // 0x101037b
    field public static final int layout_rowSpan = 16843644; // 0x101037c
    field public static final int layout_rowWeight = 16843864; // 0x1010458
    field public static final int layout_scale = 16843155; // 0x1010193
    field public static final int layout_span = 16843085; // 0x101014d
    field public static final int layout_toEndOf = 16843704; // 0x10103b8
    field public static final int layout_toLeftOf = 16843138; // 0x1010182
    field public static final int layout_toRightOf = 16843139; // 0x1010183
    field public static final int layout_toStartOf = 16843703; // 0x10103b7
    field public static final int layout_weight = 16843137; // 0x1010181
    field public static final int layout_width = 16842996; // 0x10100f4
    field public static final int layout_x = 16843135; // 0x101017f
    field public static final int layout_y = 16843136; // 0x1010180
    field public static final int left = 16843181; // 0x10101ad
    field public static final int letterSpacing = 16843958; // 0x10104b6
    field public static final int lineSpacingExtra = 16843287; // 0x1010217
    field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
    field public static final int lines = 16843092; // 0x1010154
    field public static final int linksClickable = 16842929; // 0x10100b1
    field public static final int listChoiceBackgroundIndicator = 16843504; // 0x10102f0
    field public static final int listChoiceIndicatorMultiple = 16843290; // 0x101021a
    field public static final int listChoiceIndicatorSingle = 16843289; // 0x1010219
    field public static final int listDivider = 16843284; // 0x1010214
    field public static final int listDividerAlertDialog = 16843525; // 0x1010305
    field public static final int listPopupWindowStyle = 16843519; // 0x10102ff
    field public static final int listPreferredItemHeight = 16842829; // 0x101004d
    field public static final int listPreferredItemHeightLarge = 16843654; // 0x1010386
    field public static final int listPreferredItemHeightSmall = 16843655; // 0x1010387
    field public static final int listPreferredItemPaddingEnd = 16843710; // 0x10103be
    field public static final int listPreferredItemPaddingLeft = 16843683; // 0x10103a3
    field public static final int listPreferredItemPaddingRight = 16843684; // 0x10103a4
    field public static final int listPreferredItemPaddingStart = 16843709; // 0x10103bd
    field public static final int listSelector = 16843003; // 0x10100fb
    field public static final int listSeparatorTextViewStyle = 16843272; // 0x1010208
    field public static final int listViewStyle = 16842868; // 0x1010074
    field public static final int listViewWhiteStyle = 16842869; // 0x1010075
    field public static final int logo = 16843454; // 0x10102be
    field public static final int longClickable = 16842982; // 0x10100e6
    field public static final int loopViews = 16843527; // 0x1010307
    field public static final int manageSpaceActivity = 16842756; // 0x1010004
    field public static final int mapViewStyle = 16842890; // 0x101008a
    field public static final int marqueeRepeatLimit = 16843293; // 0x101021d
    field public static final int matchOrder = 16843855; // 0x101044f
    field public static final int max = 16843062; // 0x1010136
    field public static final int maxDate = 16843584; // 0x1010340
    field public static final int maxEms = 16843095; // 0x1010157
    field public static final int maxHeight = 16843040; // 0x1010120
    field public static final int maxItemsPerRow = 16843060; // 0x1010134
    field public static final int maxLength = 16843104; // 0x1010160
    field public static final int maxLevel = 16843186; // 0x10101b2
    field public static final int maxLines = 16843091; // 0x1010153
    field public static final int maxRecents = 16843846; // 0x1010446
    field public static final int maxRows = 16843059; // 0x1010133
    field public static final int maxSdkVersion = 16843377; // 0x1010271
    field public static final int maxWidth = 16843039; // 0x101011f
    field public static final int maximumAngle = 16843903; // 0x101047f
    field public static final int measureAllChildren = 16843018; // 0x101010a
    field public static final int measureWithLargestChild = 16843476; // 0x10102d4
    field public static final int mediaRouteButtonStyle = 16843693; // 0x10103ad
    field public static final int mediaRouteTypes = 16843694; // 0x10103ae
    field public static final int menuCategory = 16843230; // 0x10101de
    field public static final int mimeType = 16842790; // 0x1010026
    field public static final int minDate = 16843583; // 0x101033f
    field public static final int minEms = 16843098; // 0x101015a
    field public static final int minHeight = 16843072; // 0x1010140
    field public static final int minLevel = 16843185; // 0x10101b1
    field public static final int minLines = 16843094; // 0x1010156
    field public static final int minResizeHeight = 16843670; // 0x1010396
    field public static final int minResizeWidth = 16843669; // 0x1010395
    field public static final int minSdkVersion = 16843276; // 0x101020c
    field public static final int minWidth = 16843071; // 0x101013f
    field public static final int minimumHorizontalAngle = 16843901; // 0x101047d
    field public static final int minimumVerticalAngle = 16843902; // 0x101047e
    field public static final int mipMap = 16843725; // 0x10103cd
    field public static final int mirrorForRtl = 16843726; // 0x10103ce
    field public static final int mode = 16843134; // 0x101017e
    field public static final int moreIcon = 16843061; // 0x1010135
    field public static final int multiArch = 16843918; // 0x101048e
    field public static final int multiprocess = 16842771; // 0x1010013
    field public static final int name = 16842755; // 0x1010003
    field public static final int navigationBarColor = 16843858; // 0x1010452
    field public static final int navigationContentDescription = 16843969; // 0x10104c1
    field public static final int navigationIcon = 16843968; // 0x10104c0
    field public static final int navigationMode = 16843471; // 0x10102cf
    field public static final int navigationTint = 16844004; // 0x10104e4
    field public static final int navigationTintMode = 16844005; // 0x10104e5
    field public static final int negativeButtonText = 16843254; // 0x10101f6
    field public static final int nestedScrollingEnabled = 16843830; // 0x1010436
    field public static final int nextFocusDown = 16842980; // 0x10100e4
    field public static final int nextFocusForward = 16843580; // 0x101033c
    field public static final int nextFocusLeft = 16842977; // 0x10100e1
    field public static final int nextFocusRight = 16842978; // 0x10100e2
    field public static final int nextFocusUp = 16842979; // 0x10100e3
    field public static final int noHistory = 16843309; // 0x101022d
    field public static final int normalScreens = 16843397; // 0x1010285
    field public static final int notificationTimeout = 16843651; // 0x1010383
    field public static final int numColumns = 16843032; // 0x1010118
    field public static final int numStars = 16843076; // 0x1010144
    field public static final int numbersBackgroundColor = 16843938; // 0x10104a2
    field public static final int numbersInnerTextColor = 16843999; // 0x10104df
    field public static final int numbersSelectorColor = 16843939; // 0x10104a3
    field public static final int numbersTextColor = 16843937; // 0x10104a1
    field public static final deprecated int numeric = 16843109; // 0x1010165
    field public static final int numericShortcut = 16843236; // 0x10101e4
    field public static final int onClick = 16843375; // 0x101026f
    field public static final int oneshot = 16843159; // 0x1010197
    field public static final int opacity = 16843550; // 0x101031e
    field public static final int order = 16843242; // 0x10101ea
    field public static final int orderInCategory = 16843231; // 0x10101df
    field public static final int ordering = 16843490; // 0x10102e2
    field public static final int orderingFromXml = 16843239; // 0x10101e7
    field public static final int orientation = 16842948; // 0x10100c4
    field public static final int outAnimation = 16843128; // 0x1010178
    field public static final int outlineProvider = 16843960; // 0x10104b8
    field public static final int overScrollFooter = 16843459; // 0x10102c3
    field public static final int overScrollHeader = 16843458; // 0x10102c2
    field public static final int overScrollMode = 16843457; // 0x10102c1
    field public static final int overflowTint = 16844002; // 0x10104e2
    field public static final int overflowTintMode = 16844003; // 0x10104e3
    field public static final int overlapAnchor = 16843874; // 0x1010462
    field public static final int overridesImplicitlyEnabledSubtype = 16843682; // 0x10103a2
    field public static final int packageNames = 16843649; // 0x1010381
    field public static final int padding = 16842965; // 0x10100d5
    field public static final int paddingBottom = 16842969; // 0x10100d9
    field public static final int paddingEnd = 16843700; // 0x10103b4
    field public static final int paddingLeft = 16842966; // 0x10100d6
    field public static final int paddingMode = 16843863; // 0x1010457
    field public static final int paddingRight = 16842968; // 0x10100d8
    field public static final int paddingStart = 16843699; // 0x10103b3
    field public static final int paddingTop = 16842967; // 0x10100d7
    field public static final int panelBackground = 16842846; // 0x101005e
    field public static final int panelColorBackground = 16842849; // 0x1010061
    field public static final int panelColorForeground = 16842848; // 0x1010060
    field public static final int panelFullBackground = 16842847; // 0x101005f
    field public static final int panelTextAppearance = 16842850; // 0x1010062
    field public static final int parentActivityName = 16843687; // 0x10103a7
    field public static final deprecated int password = 16843100; // 0x101015c
    field public static final int path = 16842794; // 0x101002a
    field public static final int pathData = 16843781; // 0x1010405
    field public static final int pathPattern = 16842796; // 0x101002c
    field public static final int pathPrefix = 16842795; // 0x101002b
    field public static final int patternPathData = 16843978; // 0x10104ca
    field public static final int permission = 16842758; // 0x1010006
    field public static final int permissionFlags = 16843719; // 0x10103c7
    field public static final int permissionGroup = 16842762; // 0x101000a
    field public static final int permissionGroupFlags = 16843717; // 0x10103c5
    field public static final int persistableMode = 16843821; // 0x101042d
    field public static final int persistent = 16842765; // 0x101000d
    field public static final int persistentDrawingCache = 16842990; // 0x10100ee
    field public static final deprecated int phoneNumber = 16843111; // 0x1010167
    field public static final int pivotX = 16843189; // 0x10101b5
    field public static final int pivotY = 16843190; // 0x10101b6
    field public static final int popupAnimationStyle = 16843465; // 0x10102c9
    field public static final int popupBackground = 16843126; // 0x1010176
    field public static final int popupCharacters = 16843332; // 0x1010244
    field public static final int popupElevation = 16843916; // 0x101048c
    field public static final int popupKeyboard = 16843331; // 0x1010243
    field public static final int popupLayout = 16843323; // 0x101023b
    field public static final int popupMenuStyle = 16843520; // 0x1010300
    field public static final int popupTheme = 16843945; // 0x10104a9
    field public static final int popupWindowStyle = 16842870; // 0x1010076
    field public static final int port = 16842793; // 0x1010029
    field public static final int positiveButtonText = 16843253; // 0x10101f5
    field public static final int preferenceCategoryStyle = 16842892; // 0x101008c
    field public static final int preferenceInformationStyle = 16842893; // 0x101008d
    field public static final int preferenceLayoutChild = 16842900; // 0x1010094
    field public static final int preferenceScreenStyle = 16842891; // 0x101008b
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int priority = 16842780; // 0x101001c
    field public static final int privateImeOptions = 16843299; // 0x1010223
    field public static final int process = 16842769; // 0x1010011
    field public static final int progress = 16843063; // 0x1010137
    field public static final int progressBackgroundTint = 16843877; // 0x1010465
    field public static final int progressBackgroundTintMode = 16843878; // 0x1010466
    field public static final int progressBarPadding = 16843545; // 0x1010319
    field public static final int progressBarStyle = 16842871; // 0x1010077
    field public static final int progressBarStyleHorizontal = 16842872; // 0x1010078
    field public static final int progressBarStyleInverse = 16843399; // 0x1010287
    field public static final int progressBarStyleLarge = 16842874; // 0x101007a
    field public static final int progressBarStyleLargeInverse = 16843401; // 0x1010289
    field public static final int progressBarStyleSmall = 16842873; // 0x1010079
    field public static final int progressBarStyleSmallInverse = 16843400; // 0x1010288
    field public static final int progressBarStyleSmallTitle = 16843279; // 0x101020f
    field public static final int progressDrawable = 16843068; // 0x101013c
    field public static final int progressTint = 16843875; // 0x1010463
    field public static final int progressTintMode = 16843876; // 0x1010464
    field public static final int prompt = 16843131; // 0x101017b
    field public static final int propertyName = 16843489; // 0x10102e1
    field public static final int propertyXName = 16843892; // 0x1010474
    field public static final int propertyYName = 16843893; // 0x1010475
    field public static final int protectionLevel = 16842761; // 0x1010009
    field public static final int publicKey = 16843686; // 0x10103a6
    field public static final int queryActionMsg = 16843227; // 0x10101db
    field public static final int queryAfterZeroResults = 16843394; // 0x1010282
    field public static final int queryBackground = 16843911; // 0x1010487
    field public static final int queryHint = 16843608; // 0x1010358
    field public static final int quickContactBadgeStyleSmallWindowLarge = 16843443; // 0x10102b3
    field public static final int quickContactBadgeStyleSmallWindowMedium = 16843442; // 0x10102b2
    field public static final int quickContactBadgeStyleSmallWindowSmall = 16843441; // 0x10102b1
    field public static final int quickContactBadgeStyleWindowLarge = 16843440; // 0x10102b0
    field public static final int quickContactBadgeStyleWindowMedium = 16843439; // 0x10102af
    field public static final int quickContactBadgeStyleWindowSmall = 16843438; // 0x10102ae
    field public static final int radioButtonStyle = 16842878; // 0x101007e
    field public static final int radius = 16843176; // 0x10101a8
    field public static final int rating = 16843077; // 0x1010145
    field public static final int ratingBarStyle = 16842876; // 0x101007c
    field public static final int ratingBarStyleIndicator = 16843280; // 0x1010210
    field public static final int ratingBarStyleSmall = 16842877; // 0x101007d
    field public static final int readPermission = 16842759; // 0x1010007
    field public static final int recognitionService = 16843932; // 0x101049c
    field public static final int relinquishTaskIdentity = 16843894; // 0x1010476
    field public static final int reparent = 16843964; // 0x10104bc
    field public static final int reparentWithOverlay = 16843965; // 0x10104bd
    field public static final int repeatCount = 16843199; // 0x10101bf
    field public static final int repeatMode = 16843200; // 0x10101c0
    field public static final int reqFiveWayNav = 16843314; // 0x1010232
    field public static final int reqHardKeyboard = 16843305; // 0x1010229
    field public static final int reqKeyboardType = 16843304; // 0x1010228
    field public static final int reqNavigation = 16843306; // 0x101022a
    field public static final int reqTouchScreen = 16843303; // 0x1010227
    field public static final int requireDeviceUnlock = 16843756; // 0x10103ec
    field public static final int required = 16843406; // 0x101028e
    field public static final int requiredAccountType = 16843734; // 0x10103d6
    field public static final int requiredForAllUsers = 16843728; // 0x10103d0
    field public static final int requiresFadingEdge = 16843685; // 0x10103a5
    field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364
    field public static final int resizeClip = 16843983; // 0x10104cf
    field public static final int resizeMode = 16843619; // 0x1010363
    field public static final int resizeable = 16843405; // 0x101028d
    field public static final int resizeableActivity = 16843995; // 0x10104db
    field public static final int resource = 16842789; // 0x1010025
    field public static final int restoreAnyVersion = 16843450; // 0x10102ba
    field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
    field public static final int restrictedAccountType = 16843733; // 0x10103d5
    field public static final int restrictionType = 16843923; // 0x1010493
    field public static final int resumeWhilePausing = 16843954; // 0x10104b2
    field public static final int reversible = 16843851; // 0x101044b
    field public static final int revisionCode = 16843989; // 0x10104d5
    field public static final int right = 16843183; // 0x10101af
    field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093
    field public static final int ringtoneType = 16843257; // 0x10101f9
    field public static final int rotation = 16843558; // 0x1010326
    field public static final int rotationX = 16843559; // 0x1010327
    field public static final int rotationY = 16843560; // 0x1010328
    field public static final int rowCount = 16843637; // 0x1010375
    field public static final int rowDelay = 16843216; // 0x10101d0
    field public static final int rowEdgeFlags = 16843329; // 0x1010241
    field public static final int rowHeight = 16843058; // 0x1010132
    field public static final int rowOrderPreserved = 16843638; // 0x1010376
    field public static final int saveEnabled = 16842983; // 0x10100e7
    field public static final int scaleGravity = 16843262; // 0x10101fe
    field public static final int scaleHeight = 16843261; // 0x10101fd
    field public static final int scaleType = 16843037; // 0x101011d
    field public static final int scaleWidth = 16843260; // 0x10101fc
    field public static final int scaleX = 16843556; // 0x1010324
    field public static final int scaleY = 16843557; // 0x1010325
    field public static final int scheme = 16842791; // 0x1010027
    field public static final int screenDensity = 16843467; // 0x10102cb
    field public static final int screenOrientation = 16842782; // 0x101001e
    field public static final int screenSize = 16843466; // 0x10102ca
    field public static final int scrollHorizontally = 16843099; // 0x101015b
    field public static final int scrollViewStyle = 16842880; // 0x1010080
    field public static final int scrollX = 16842962; // 0x10100d2
    field public static final int scrollY = 16842963; // 0x10100d3
    field public static final int scrollbarAlwaysDrawHorizontalTrack = 16842856; // 0x1010068
    field public static final int scrollbarAlwaysDrawVerticalTrack = 16842857; // 0x1010069
    field public static final int scrollbarDefaultDelayBeforeFade = 16843433; // 0x10102a9
    field public static final int scrollbarFadeDuration = 16843432; // 0x10102a8
    field public static final int scrollbarSize = 16842851; // 0x1010063
    field public static final int scrollbarStyle = 16842879; // 0x101007f
    field public static final int scrollbarThumbHorizontal = 16842852; // 0x1010064
    field public static final int scrollbarThumbVertical = 16842853; // 0x1010065
    field public static final int scrollbarTrackHorizontal = 16842854; // 0x1010066
    field public static final int scrollbarTrackVertical = 16842855; // 0x1010067
    field public static final int scrollbars = 16842974; // 0x10100de
    field public static final int scrollingCache = 16843006; // 0x10100fe
    field public static final deprecated int searchButtonText = 16843269; // 0x1010205
    field public static final int searchHintIcon = 16843988; // 0x10104d4
    field public static final int searchIcon = 16843907; // 0x1010483
    field public static final int searchMode = 16843221; // 0x10101d5
    field public static final int searchSettingsDescription = 16843402; // 0x101028a
    field public static final int searchSuggestAuthority = 16843222; // 0x10101d6
    field public static final int searchSuggestIntentAction = 16843225; // 0x10101d9
    field public static final int searchSuggestIntentData = 16843226; // 0x10101da
    field public static final int searchSuggestPath = 16843223; // 0x10101d7
    field public static final int searchSuggestSelection = 16843224; // 0x10101d8
    field public static final int searchSuggestThreshold = 16843373; // 0x101026d
    field public static final int searchViewStyle = 16843904; // 0x1010480
    field public static final int secondaryProgress = 16843064; // 0x1010138
    field public static final int secondaryProgressTint = 16843879; // 0x1010467
    field public static final int secondaryProgressTintMode = 16843880; // 0x1010468
    field public static final int seekBarStyle = 16842875; // 0x101007b
    field public static final int segmentedButtonStyle = 16843568; // 0x1010330
    field public static final int selectAllOnFocus = 16843102; // 0x101015e
    field public static final int selectable = 16843238; // 0x10101e6
    field public static final int selectableItemBackground = 16843534; // 0x101030e
    field public static final int selectableItemBackgroundBorderless = 16843868; // 0x101045c
    field public static final deprecated int selectedDateVerticalBar = 16843591; // 0x1010347
    field public static final deprecated int selectedWeekBackgroundColor = 16843586; // 0x1010342
    field public static final int sessionService = 16843837; // 0x101043d
    field public static final int settingsActivity = 16843301; // 0x1010225
    field public static final int setupActivity = 16843766; // 0x10103f6
    field public static final int shadowColor = 16843105; // 0x1010161
    field public static final int shadowDx = 16843106; // 0x1010162
    field public static final int shadowDy = 16843107; // 0x1010163
    field public static final int shadowRadius = 16843108; // 0x1010164
    field public static final int shape = 16843162; // 0x101019a
    field public static final int shareInterpolator = 16843195; // 0x10101bb
    field public static final int sharedUserId = 16842763; // 0x101000b
    field public static final int sharedUserLabel = 16843361; // 0x1010261
    field public static final int shouldDisableView = 16843246; // 0x10101ee
    field public static final int showAsAction = 16843481; // 0x10102d9
    field public static final int showDefault = 16843258; // 0x10101fa
    field public static final int showDividers = 16843561; // 0x1010329
    field public static final int showOnLockScreen = 16843721; // 0x10103c9
    field public static final int showSilent = 16843259; // 0x10101fb
    field public static final int showText = 16843949; // 0x10104ad
    field public static final deprecated int showWeekNumber = 16843582; // 0x101033e
    field public static final deprecated int shownWeekCount = 16843585; // 0x1010341
    field public static final int shrinkColumns = 16843082; // 0x101014a
    field public static final deprecated int singleLine = 16843101; // 0x101015d
    field public static final int singleUser = 16843711; // 0x10103bf
    field public static final int slideEdge = 16843824; // 0x1010430
    field public static final int smallIcon = 16843422; // 0x101029e
    field public static final int smallScreens = 16843396; // 0x1010284
    field public static final int smoothScrollbar = 16843313; // 0x1010231
    field public static final int soundEffectsEnabled = 16843285; // 0x1010215
    field public static final int spacing = 16843027; // 0x1010113
    field public static final int spinnerDropDownItemStyle = 16842887; // 0x1010087
    field public static final int spinnerItemStyle = 16842889; // 0x1010089
    field public static final int spinnerMode = 16843505; // 0x10102f1
    field public static final int spinnerStyle = 16842881; // 0x1010081
    field public static final int spinnersShown = 16843595; // 0x101034b
    field public static final int splitMotionEvents = 16843503; // 0x10102ef
    field public static final int splitTrack = 16843852; // 0x101044c
    field public static final int spotShadowAlpha = 16843967; // 0x10104bf
    field public static final int src = 16843033; // 0x1010119
    field public static final int ssp = 16843747; // 0x10103e3
    field public static final int sspPattern = 16843749; // 0x10103e5
    field public static final int sspPrefix = 16843748; // 0x10103e4
    field public static final int stackFromBottom = 16843005; // 0x10100fd
    field public static final int stackViewStyle = 16843838; // 0x101043e
    field public static final int starStyle = 16842882; // 0x1010082
    field public static final int start = 16843996; // 0x10104dc
    field public static final int startColor = 16843165; // 0x101019d
    field public static final int startDelay = 16843746; // 0x10103e2
    field public static final int startOffset = 16843198; // 0x10101be
    field public static final deprecated int startYear = 16843132; // 0x101017c
    field public static final int stateListAnimator = 16843848; // 0x1010448
    field public static final int stateNotNeeded = 16842774; // 0x1010016
    field public static final int state_above_anchor = 16842922; // 0x10100aa
    field public static final int state_accelerated = 16843547; // 0x101031b
    field public static final int state_activated = 16843518; // 0x10102fe
    field public static final int state_active = 16842914; // 0x10100a2
    field public static final int state_checkable = 16842911; // 0x101009f
    field public static final int state_checked = 16842912; // 0x10100a0
    field public static final int state_drag_can_accept = 16843624; // 0x1010368
    field public static final int state_drag_hovered = 16843625; // 0x1010369
    field public static final int state_empty = 16842921; // 0x10100a9
    field public static final int state_enabled = 16842910; // 0x101009e
    field public static final int state_expanded = 16842920; // 0x10100a8
    field public static final int state_first = 16842916; // 0x10100a4
    field public static final int state_focused = 16842908; // 0x101009c
    field public static final int state_hovered = 16843623; // 0x1010367
    field public static final int state_last = 16842918; // 0x10100a6
    field public static final int state_long_pressable = 16843324; // 0x101023c
    field public static final int state_middle = 16842917; // 0x10100a5
    field public static final int state_multiline = 16843597; // 0x101034d
    field public static final int state_pressed = 16842919; // 0x10100a7
    field public static final int state_selected = 16842913; // 0x10100a1
    field public static final int state_single = 16842915; // 0x10100a3
    field public static final int state_window_focused = 16842909; // 0x101009d
    field public static final int staticWallpaperPreview = 16843569; // 0x1010331
    field public static final int statusBarColor = 16843857; // 0x1010451
    field public static final int stepSize = 16843078; // 0x1010146
    field public static final int stopWithTask = 16843626; // 0x101036a
    field public static final int streamType = 16843273; // 0x1010209
    field public static final int stretchColumns = 16843081; // 0x1010149
    field public static final int stretchMode = 16843030; // 0x1010116
    field public static final int strokeAlpha = 16843979; // 0x10104cb
    field public static final int strokeColor = 16843782; // 0x1010406
    field public static final int strokeLineCap = 16843787; // 0x101040b
    field public static final int strokeLineJoin = 16843788; // 0x101040c
    field public static final int strokeMiterLimit = 16843789; // 0x101040d
    field public static final int strokeWidth = 16843783; // 0x1010407
    field public static final int submitBackground = 16843912; // 0x1010488
    field public static final int subtitle = 16843473; // 0x10102d1
    field public static final int subtitleTextAppearance = 16843823; // 0x101042f
    field public static final int subtitleTextStyle = 16843513; // 0x10102f9
    field public static final int subtypeExtraValue = 16843674; // 0x101039a
    field public static final int subtypeId = 16843713; // 0x10103c1
    field public static final int subtypeLocale = 16843673; // 0x1010399
    field public static final int suggestActionMsg = 16843228; // 0x10101dc
    field public static final int suggestActionMsgColumn = 16843229; // 0x10101dd
    field public static final int suggestionRowLayout = 16843910; // 0x1010486
    field public static final int summary = 16843241; // 0x10101e9
    field public static final int summaryColumn = 16843426; // 0x10102a2
    field public static final int summaryOff = 16843248; // 0x10101f0
    field public static final int summaryOn = 16843247; // 0x10101ef
    field public static final int supportsAssistGesture = 16844012; // 0x10104ec
    field public static final int supportsRtl = 16843695; // 0x10103af
    field public static final int supportsSwitchingToNextInputMethod = 16843755; // 0x10103eb
    field public static final int supportsUploading = 16843419; // 0x101029b
    field public static final int switchMinWidth = 16843632; // 0x1010370
    field public static final int switchPadding = 16843633; // 0x1010371
    field public static final int switchPreferenceStyle = 16843629; // 0x101036d
    field public static final int switchStyle = 16843839; // 0x101043f
    field public static final int switchTextAppearance = 16843630; // 0x101036e
    field public static final int switchTextOff = 16843628; // 0x101036c
    field public static final int switchTextOn = 16843627; // 0x101036b
    field public static final int syncable = 16842777; // 0x1010019
    field public static final int tabStripEnabled = 16843453; // 0x10102bd
    field public static final int tabStripLeft = 16843451; // 0x10102bb
    field public static final int tabStripRight = 16843452; // 0x10102bc
    field public static final int tabWidgetStyle = 16842883; // 0x1010083
    field public static final int tag = 16842961; // 0x10100d1
    field public static final int targetActivity = 16843266; // 0x1010202
    field public static final int targetClass = 16842799; // 0x101002f
    field public static final deprecated int targetDescriptions = 16843680; // 0x10103a0
    field public static final int targetId = 16843740; // 0x10103dc
    field public static final int targetName = 16843853; // 0x101044d
    field public static final int targetPackage = 16842785; // 0x1010021
    field public static final int targetSdkVersion = 16843376; // 0x1010270
    field public static final int taskAffinity = 16842770; // 0x1010012
    field public static final int taskCloseEnterAnimation = 16842942; // 0x10100be
    field public static final int taskCloseExitAnimation = 16842943; // 0x10100bf
    field public static final int taskOpenEnterAnimation = 16842940; // 0x10100bc
    field public static final int taskOpenExitAnimation = 16842941; // 0x10100bd
    field public static final int taskToBackEnterAnimation = 16842946; // 0x10100c2
    field public static final int taskToBackExitAnimation = 16842947; // 0x10100c3
    field public static final int taskToFrontEnterAnimation = 16842944; // 0x10100c0
    field public static final int taskToFrontExitAnimation = 16842945; // 0x10100c1
    field public static final int tension = 16843370; // 0x101026a
    field public static final int testOnly = 16843378; // 0x1010272
    field public static final int text = 16843087; // 0x101014f
    field public static final int textAlignment = 16843697; // 0x10103b1
    field public static final int textAllCaps = 16843660; // 0x101038c
    field public static final int textAppearance = 16842804; // 0x1010034
    field public static final int textAppearanceButton = 16843271; // 0x1010207
    field public static final int textAppearanceInverse = 16842805; // 0x1010035
    field public static final int textAppearanceLarge = 16842816; // 0x1010040
    field public static final int textAppearanceLargeInverse = 16842819; // 0x1010043
    field public static final int textAppearanceLargePopupMenu = 16843521; // 0x1010301
    field public static final int textAppearanceListItem = 16843678; // 0x101039e
    field public static final int textAppearanceListItemSecondary = 16843826; // 0x1010432
    field public static final int textAppearanceListItemSmall = 16843679; // 0x101039f
    field public static final int textAppearanceMedium = 16842817; // 0x1010041
    field public static final int textAppearanceMediumInverse = 16842820; // 0x1010044
    field public static final int textAppearanceSearchResultSubtitle = 16843424; // 0x10102a0
    field public static final int textAppearanceSearchResultTitle = 16843425; // 0x10102a1
    field public static final int textAppearanceSmall = 16842818; // 0x1010042
    field public static final int textAppearanceSmallInverse = 16842821; // 0x1010045
    field public static final int textAppearanceSmallPopupMenu = 16843522; // 0x1010302
    field public static final int textCheckMark = 16842822; // 0x1010046
    field public static final int textCheckMarkInverse = 16842823; // 0x1010047
    field public static final int textColor = 16842904; // 0x1010098
    field public static final int textColorAlertDialogListItem = 16843526; // 0x1010306
    field public static final int textColorHighlight = 16842905; // 0x1010099
    field public static final int textColorHighlightInverse = 16843599; // 0x101034f
    field public static final int textColorHint = 16842906; // 0x101009a
    field public static final int textColorHintInverse = 16842815; // 0x101003f
    field public static final int textColorLink = 16842907; // 0x101009b
    field public static final int textColorLinkInverse = 16843600; // 0x1010350
    field public static final int textColorPrimary = 16842806; // 0x1010036
    field public static final int textColorPrimaryDisableOnly = 16842807; // 0x1010037
    field public static final int textColorPrimaryInverse = 16842809; // 0x1010039
    field public static final int textColorPrimaryInverseDisableOnly = 16843403; // 0x101028b
    field public static final int textColorPrimaryInverseNoDisable = 16842813; // 0x101003d
    field public static final int textColorPrimaryNoDisable = 16842811; // 0x101003b
    field public static final int textColorSecondary = 16842808; // 0x1010038
    field public static final int textColorSecondaryInverse = 16842810; // 0x101003a
    field public static final int textColorSecondaryInverseNoDisable = 16842814; // 0x101003e
    field public static final int textColorSecondaryNoDisable = 16842812; // 0x101003c
    field public static final int textColorTertiary = 16843282; // 0x1010212
    field public static final int textColorTertiaryInverse = 16843283; // 0x1010213
    field public static final int textCursorDrawable = 16843618; // 0x1010362
    field public static final int textDirection = 16843696; // 0x10103b0
    field public static final int textEditNoPasteWindowLayout = 16843541; // 0x1010315
    field public static final int textEditPasteWindowLayout = 16843540; // 0x1010314
    field public static final int textEditSideNoPasteWindowLayout = 16843615; // 0x101035f
    field public static final int textEditSidePasteWindowLayout = 16843614; // 0x101035e
    field public static final int textEditSuggestionItemLayout = 16843636; // 0x1010374
    field public static final int textFilterEnabled = 16843007; // 0x10100ff
    field public static final int textIsSelectable = 16843542; // 0x1010316
    field public static final int textOff = 16843045; // 0x1010125
    field public static final int textOn = 16843044; // 0x1010124
    field public static final int textScaleX = 16843089; // 0x1010151
    field public static final int textSelectHandle = 16843463; // 0x10102c7
    field public static final int textSelectHandleLeft = 16843461; // 0x10102c5
    field public static final int textSelectHandleRight = 16843462; // 0x10102c6
    field public static final int textSelectHandleWindowStyle = 16843464; // 0x10102c8
    field public static final int textSize = 16842901; // 0x1010095
    field public static final int textStyle = 16842903; // 0x1010097
    field public static final int textSuggestionsWindowStyle = 16843635; // 0x1010373
    field public static final int textViewStyle = 16842884; // 0x1010084
    field public static final int theme = 16842752; // 0x1010000
    field public static final int thickness = 16843360; // 0x1010260
    field public static final int thicknessRatio = 16843164; // 0x101019c
    field public static final int thumb = 16843074; // 0x1010142
    field public static final int thumbOffset = 16843075; // 0x1010143
    field public static final int thumbPosition = 16844013; // 0x10104ed
    field public static final int thumbTextPadding = 16843634; // 0x1010372
    field public static final int thumbTint = 16843889; // 0x1010471
    field public static final int thumbTintMode = 16843890; // 0x1010472
    field public static final int thumbnail = 16843429; // 0x10102a5
    field public static final int tileMode = 16843265; // 0x1010201
    field public static final int tileModeX = 16843895; // 0x1010477
    field public static final int tileModeY = 16843896; // 0x1010478
    field public static final int timePickerDialogTheme = 16843934; // 0x101049e
    field public static final int timePickerMode = 16843956; // 0x10104b4
    field public static final int timePickerStyle = 16843933; // 0x101049d
    field public static final int timeZone = 16843724; // 0x10103cc
    field public static final int tint = 16843041; // 0x1010121
    field public static final int tintMode = 16843771; // 0x10103fb
    field public static final int title = 16843233; // 0x10101e1
    field public static final int titleCondensed = 16843234; // 0x10101e2
    field public static final int titleTextAppearance = 16843822; // 0x101042e
    field public static final int titleTextStyle = 16843512; // 0x10102f8
    field public static final int toAlpha = 16843211; // 0x10101cb
    field public static final int toDegrees = 16843188; // 0x10101b4
    field public static final int toId = 16843849; // 0x1010449
    field public static final int toScene = 16843742; // 0x10103de
    field public static final int toXDelta = 16843207; // 0x10101c7
    field public static final int toXScale = 16843203; // 0x10101c3
    field public static final int toYDelta = 16843209; // 0x10101c9
    field public static final int toYScale = 16843205; // 0x10101c5
    field public static final int toolbarStyle = 16843946; // 0x10104aa
    field public static final int top = 16843182; // 0x10101ae
    field public static final int topBright = 16842955; // 0x10100cb
    field public static final int topDark = 16842951; // 0x10100c7
    field public static final int topLeftRadius = 16843177; // 0x10101a9
    field public static final int topOffset = 16843352; // 0x1010258
    field public static final int topRightRadius = 16843178; // 0x10101aa
    field public static final int touchscreenBlocksFocus = 16843919; // 0x101048f
    field public static final int track = 16843631; // 0x101036f
    field public static final int trackTint = 16843993; // 0x10104d9
    field public static final int trackTintMode = 16843994; // 0x10104da
    field public static final int transcriptMode = 16843008; // 0x1010100
    field public static final int transformPivotX = 16843552; // 0x1010320
    field public static final int transformPivotY = 16843553; // 0x1010321
    field public static final int transition = 16843743; // 0x10103df
    field public static final int transitionGroup = 16843777; // 0x1010401
    field public static final int transitionName = 16843776; // 0x1010400
    field public static final int transitionOrdering = 16843744; // 0x10103e0
    field public static final int transitionVisibilityMode = 16843900; // 0x101047c
    field public static final int translateX = 16843866; // 0x101045a
    field public static final int translateY = 16843867; // 0x101045b
    field public static final int translationX = 16843554; // 0x1010322
    field public static final int translationY = 16843555; // 0x1010323
    field public static final int translationZ = 16843770; // 0x10103fa
    field public static final int trimPathEnd = 16843785; // 0x1010409
    field public static final int trimPathOffset = 16843786; // 0x101040a
    field public static final int trimPathStart = 16843784; // 0x1010408
    field public static final int type = 16843169; // 0x10101a1
    field public static final int typeface = 16842902; // 0x1010096
    field public static final int uiOptions = 16843672; // 0x1010398
    field public static final int uncertainGestureColor = 16843382; // 0x1010276
    field public static final deprecated int unfocusedMonthDateColor = 16843588; // 0x1010344
    field public static final int unselectedAlpha = 16843278; // 0x101020e
    field public static final int updatePeriodMillis = 16843344; // 0x1010250
    field public static final int useDefaultMargins = 16843641; // 0x1010379
    field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
    field public static final int useLevel = 16843167; // 0x101019f
    field public static final int userVisible = 16843409; // 0x1010291
    field public static final int usesCleartextTraffic = 16844009; // 0x10104e9
    field public static final int value = 16842788; // 0x1010024
    field public static final int valueFrom = 16843486; // 0x10102de
    field public static final int valueTo = 16843487; // 0x10102df
    field public static final int valueType = 16843488; // 0x10102e0
    field public static final int variablePadding = 16843157; // 0x1010195
    field public static final int vendor = 16843751; // 0x10103e7
    field public static final int versionCode = 16843291; // 0x101021b
    field public static final int versionName = 16843292; // 0x101021c
    field public static final int verticalCorrection = 16843322; // 0x101023a
    field public static final int verticalDivider = 16843054; // 0x101012e
    field public static final int verticalGap = 16843328; // 0x1010240
    field public static final int verticalScrollbarPosition = 16843572; // 0x1010334
    field public static final int verticalSpacing = 16843029; // 0x1010115
    field public static final int viewportHeight = 16843779; // 0x1010403
    field public static final int viewportWidth = 16843778; // 0x1010402
    field public static final int visibility = 16842972; // 0x10100dc
    field public static final int visible = 16843156; // 0x1010194
    field public static final int vmSafeMode = 16843448; // 0x10102b8
    field public static final int voiceIcon = 16843908; // 0x1010484
    field public static final int voiceLanguage = 16843349; // 0x1010255
    field public static final int voiceLanguageModel = 16843347; // 0x1010253
    field public static final int voiceMaxResults = 16843350; // 0x1010256
    field public static final int voicePromptText = 16843348; // 0x1010254
    field public static final int voiceSearchMode = 16843346; // 0x1010252
    field public static final int wallpaperCloseEnterAnimation = 16843413; // 0x1010295
    field public static final int wallpaperCloseExitAnimation = 16843414; // 0x1010296
    field public static final int wallpaperIntraCloseEnterAnimation = 16843417; // 0x1010299
    field public static final int wallpaperIntraCloseExitAnimation = 16843418; // 0x101029a
    field public static final int wallpaperIntraOpenEnterAnimation = 16843415; // 0x1010297
    field public static final int wallpaperIntraOpenExitAnimation = 16843416; // 0x1010298
    field public static final int wallpaperOpenEnterAnimation = 16843411; // 0x1010293
    field public static final int wallpaperOpenExitAnimation = 16843412; // 0x1010294
    field public static final int webTextViewStyle = 16843449; // 0x10102b9
    field public static final int webViewStyle = 16842885; // 0x1010085
    field public static final int weekDayTextAppearance = 16843592; // 0x1010348
    field public static final deprecated int weekNumberColor = 16843589; // 0x1010345
    field public static final deprecated int weekSeparatorLineColor = 16843590; // 0x1010346
    field public static final int weightSum = 16843048; // 0x1010128
    field public static final int widgetCategory = 16843716; // 0x10103c4
    field public static final int widgetLayout = 16843243; // 0x10101eb
    field public static final int width = 16843097; // 0x1010159
    field public static final int windowActionBar = 16843469; // 0x10102cd
    field public static final int windowActionBarOverlay = 16843492; // 0x10102e4
    field public static final int windowActionModeOverlay = 16843485; // 0x10102dd
    field public static final int windowActivityTransitions = 16843981; // 0x10104cd
    field public static final int windowAllowEnterTransitionOverlap = 16843836; // 0x101043c
    field public static final int windowAllowReturnTransitionOverlap = 16843835; // 0x101043b
    field public static final int windowAnimationStyle = 16842926; // 0x10100ae
    field public static final int windowBackground = 16842836; // 0x1010054
    field public static final int windowClipToOutline = 16843947; // 0x10104ab
    field public static final int windowCloseOnTouchOutside = 16843611; // 0x101035b
    field public static final int windowContentOverlay = 16842841; // 0x1010059
    field public static final int windowContentTransitionManager = 16843769; // 0x10103f9
    field public static final int windowContentTransitions = 16843768; // 0x10103f8
    field public static final int windowDisablePreview = 16843298; // 0x1010222
    field public static final int windowDrawsSystemBarBackgrounds = 16843856; // 0x1010450
    field public static final int windowElevation = 16843920; // 0x1010490
    field public static final int windowEnableSplitTouch = 16843543; // 0x1010317
    field public static final int windowEnterAnimation = 16842932; // 0x10100b4
    field public static final int windowEnterTransition = 16843831; // 0x1010437
    field public static final int windowExitAnimation = 16842933; // 0x10100b5
    field public static final int windowExitTransition = 16843832; // 0x1010438
    field public static final int windowFrame = 16842837; // 0x1010055
    field public static final int windowFullscreen = 16843277; // 0x101020d
    field public static final int windowHasLightStatusBar = 16843998; // 0x10104de
    field public static final int windowHideAnimation = 16842935; // 0x10100b7
    field public static final int windowIsFloating = 16842839; // 0x1010057
    field public static final int windowIsTranslucent = 16842840; // 0x1010058
    field public static final int windowMinWidthMajor = 16843606; // 0x1010356
    field public static final int windowMinWidthMinor = 16843607; // 0x1010357
    field public static final int windowNoDisplay = 16843294; // 0x101021e
    field public static final int windowNoTitle = 16842838; // 0x1010056
    field public static final int windowOverscan = 16843727; // 0x10103cf
    field public static final int windowReenterTransition = 16843951; // 0x10104af
    field public static final int windowReturnTransition = 16843950; // 0x10104ae
    field public static final int windowSharedElementEnterTransition = 16843833; // 0x1010439
    field public static final int windowSharedElementExitTransition = 16843834; // 0x101043a
    field public static final int windowSharedElementReenterTransition = 16843953; // 0x10104b1
    field public static final int windowSharedElementReturnTransition = 16843952; // 0x10104b0
    field public static final int windowSharedElementsUseOverlay = 16843963; // 0x10104bb
    field public static final int windowShowAnimation = 16842934; // 0x10100b6
    field public static final int windowShowWallpaper = 16843410; // 0x1010292
    field public static final int windowSoftInputMode = 16843307; // 0x101022b
    field public static final int windowSwipeToDismiss = 16843763; // 0x10103f3
    field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c
    field public static final int windowTitleSize = 16842842; // 0x101005a
    field public static final int windowTitleStyle = 16842843; // 0x101005b
    field public static final int windowTransitionBackgroundFadeDuration = 16843873; // 0x1010461
    field public static final int windowTranslucentNavigation = 16843760; // 0x10103f0
    field public static final int windowTranslucentStatus = 16843759; // 0x10103ef
    field public static final int writePermission = 16842760; // 0x1010008
    field public static final int x = 16842924; // 0x10100ac
    field public static final int xlargeScreens = 16843455; // 0x10102bf
    field public static final int y = 16842925; // 0x10100ad
    field public static final deprecated int yearListItemTextAppearance = 16843929; // 0x1010499
    field public static final deprecated int yearListSelectorColor = 16843930; // 0x101049a
    field public static final int yesNoPreferenceStyle = 16842896; // 0x1010090
    field public static final int zAdjustment = 16843201; // 0x10101c1
  }

  public static final class R.bool {
    ctor public R.bool();
  }

  public static final class R.color {
    ctor public R.color();
    field public static final int background_dark = 17170446; // 0x106000e
    field public static final int background_light = 17170447; // 0x106000f
    field public static final int black = 17170444; // 0x106000c
    field public static final int darker_gray = 17170432; // 0x1060000
    field public static final int holo_blue_bright = 17170459; // 0x106001b
    field public static final int holo_blue_dark = 17170451; // 0x1060013
    field public static final int holo_blue_light = 17170450; // 0x1060012
    field public static final int holo_green_dark = 17170453; // 0x1060015
    field public static final int holo_green_light = 17170452; // 0x1060014
    field public static final int holo_orange_dark = 17170457; // 0x1060019
    field public static final int holo_orange_light = 17170456; // 0x1060018
    field public static final int holo_purple = 17170458; // 0x106001a
    field public static final int holo_red_dark = 17170455; // 0x1060017
    field public static final int holo_red_light = 17170454; // 0x1060016
    field public static final int primary_text_dark = 17170433; // 0x1060001
    field public static final int primary_text_dark_nodisable = 17170434; // 0x1060002
    field public static final int primary_text_light = 17170435; // 0x1060003
    field public static final int primary_text_light_nodisable = 17170436; // 0x1060004
    field public static final int secondary_text_dark = 17170437; // 0x1060005
    field public static final int secondary_text_dark_nodisable = 17170438; // 0x1060006
    field public static final int secondary_text_light = 17170439; // 0x1060007
    field public static final int secondary_text_light_nodisable = 17170440; // 0x1060008
    field public static final int tab_indicator_text = 17170441; // 0x1060009
    field public static final int tertiary_text_dark = 17170448; // 0x1060010
    field public static final int tertiary_text_light = 17170449; // 0x1060011
    field public static final int transparent = 17170445; // 0x106000d
    field public static final int white = 17170443; // 0x106000b
    field public static final int widget_edittext_dark = 17170442; // 0x106000a
  }

  public static final class R.dimen {
    ctor public R.dimen();
    field public static final int app_icon_size = 17104896; // 0x1050000
    field public static final int dialog_min_width_major = 17104899; // 0x1050003
    field public static final int dialog_min_width_minor = 17104900; // 0x1050004
    field public static final int notification_large_icon_height = 17104902; // 0x1050006
    field public static final int notification_large_icon_width = 17104901; // 0x1050005
    field public static final int thumbnail_height = 17104897; // 0x1050001
    field public static final int thumbnail_width = 17104898; // 0x1050002
  }

  public static final class R.drawable {
    ctor public R.drawable();
    field public static final int alert_dark_frame = 17301504; // 0x1080000
    field public static final int alert_light_frame = 17301505; // 0x1080001
    field public static final int arrow_down_float = 17301506; // 0x1080002
    field public static final int arrow_up_float = 17301507; // 0x1080003
    field public static final int bottom_bar = 17301658; // 0x108009a
    field public static final int btn_default = 17301508; // 0x1080004
    field public static final int btn_default_small = 17301509; // 0x1080005
    field public static final int btn_dialog = 17301527; // 0x1080017
    field public static final int btn_dropdown = 17301510; // 0x1080006
    field public static final int btn_minus = 17301511; // 0x1080007
    field public static final int btn_plus = 17301512; // 0x1080008
    field public static final int btn_radio = 17301513; // 0x1080009
    field public static final int btn_star = 17301514; // 0x108000a
    field public static final int btn_star_big_off = 17301515; // 0x108000b
    field public static final int btn_star_big_on = 17301516; // 0x108000c
    field public static final int button_onoff_indicator_off = 17301518; // 0x108000e
    field public static final int button_onoff_indicator_on = 17301517; // 0x108000d
    field public static final int checkbox_off_background = 17301519; // 0x108000f
    field public static final int checkbox_on_background = 17301520; // 0x1080010
    field public static final int dark_header = 17301669; // 0x10800a5
    field public static final int dialog_frame = 17301521; // 0x1080011
    field public static final int dialog_holo_dark_frame = 17301682; // 0x10800b2
    field public static final int dialog_holo_light_frame = 17301683; // 0x10800b3
    field public static final int divider_horizontal_bright = 17301522; // 0x1080012
    field public static final int divider_horizontal_dark = 17301524; // 0x1080014
    field public static final int divider_horizontal_dim_dark = 17301525; // 0x1080015
    field public static final int divider_horizontal_textfield = 17301523; // 0x1080013
    field public static final int edit_text = 17301526; // 0x1080016
    field public static final int editbox_background = 17301528; // 0x1080018
    field public static final int editbox_background_normal = 17301529; // 0x1080019
    field public static final int editbox_dropdown_dark_frame = 17301530; // 0x108001a
    field public static final int editbox_dropdown_light_frame = 17301531; // 0x108001b
    field public static final int gallery_thumb = 17301532; // 0x108001c
    field public static final int ic_btn_speak_now = 17301668; // 0x10800a4
    field public static final int ic_delete = 17301533; // 0x108001d
    field public static final int ic_dialog_alert = 17301543; // 0x1080027
    field public static final int ic_dialog_dialer = 17301544; // 0x1080028
    field public static final int ic_dialog_email = 17301545; // 0x1080029
    field public static final int ic_dialog_info = 17301659; // 0x108009b
    field public static final int ic_dialog_map = 17301546; // 0x108002a
    field public static final int ic_input_add = 17301547; // 0x108002b
    field public static final int ic_input_delete = 17301548; // 0x108002c
    field public static final int ic_input_get = 17301549; // 0x108002d
    field public static final int ic_lock_idle_alarm = 17301550; // 0x108002e
    field public static final int ic_lock_idle_charging = 17301534; // 0x108001e
    field public static final int ic_lock_idle_lock = 17301535; // 0x108001f
    field public static final int ic_lock_idle_low_battery = 17301536; // 0x1080020
    field public static final int ic_lock_lock = 17301551; // 0x108002f
    field public static final int ic_lock_power_off = 17301552; // 0x1080030
    field public static final int ic_lock_silent_mode = 17301553; // 0x1080031
    field public static final int ic_lock_silent_mode_off = 17301554; // 0x1080032
    field public static final int ic_media_ff = 17301537; // 0x1080021
    field public static final int ic_media_next = 17301538; // 0x1080022
    field public static final int ic_media_pause = 17301539; // 0x1080023
    field public static final int ic_media_play = 17301540; // 0x1080024
    field public static final int ic_media_previous = 17301541; // 0x1080025
    field public static final int ic_media_rew = 17301542; // 0x1080026
    field public static final int ic_menu_add = 17301555; // 0x1080033
    field public static final int ic_menu_agenda = 17301556; // 0x1080034
    field public static final int ic_menu_always_landscape_portrait = 17301557; // 0x1080035
    field public static final int ic_menu_call = 17301558; // 0x1080036
    field public static final int ic_menu_camera = 17301559; // 0x1080037
    field public static final int ic_menu_close_clear_cancel = 17301560; // 0x1080038
    field public static final int ic_menu_compass = 17301561; // 0x1080039
    field public static final int ic_menu_crop = 17301562; // 0x108003a
    field public static final int ic_menu_day = 17301563; // 0x108003b
    field public static final int ic_menu_delete = 17301564; // 0x108003c
    field public static final int ic_menu_directions = 17301565; // 0x108003d
    field public static final int ic_menu_edit = 17301566; // 0x108003e
    field public static final int ic_menu_gallery = 17301567; // 0x108003f
    field public static final int ic_menu_help = 17301568; // 0x1080040
    field public static final int ic_menu_info_details = 17301569; // 0x1080041
    field public static final int ic_menu_manage = 17301570; // 0x1080042
    field public static final int ic_menu_mapmode = 17301571; // 0x1080043
    field public static final int ic_menu_month = 17301572; // 0x1080044
    field public static final int ic_menu_more = 17301573; // 0x1080045
    field public static final int ic_menu_my_calendar = 17301574; // 0x1080046
    field public static final int ic_menu_mylocation = 17301575; // 0x1080047
    field public static final int ic_menu_myplaces = 17301576; // 0x1080048
    field public static final int ic_menu_preferences = 17301577; // 0x1080049
    field public static final int ic_menu_recent_history = 17301578; // 0x108004a
    field public static final int ic_menu_report_image = 17301579; // 0x108004b
    field public static final int ic_menu_revert = 17301580; // 0x108004c
    field public static final int ic_menu_rotate = 17301581; // 0x108004d
    field public static final int ic_menu_save = 17301582; // 0x108004e
    field public static final int ic_menu_search = 17301583; // 0x108004f
    field public static final int ic_menu_send = 17301584; // 0x1080050
    field public static final int ic_menu_set_as = 17301585; // 0x1080051
    field public static final int ic_menu_share = 17301586; // 0x1080052
    field public static final int ic_menu_slideshow = 17301587; // 0x1080053
    field public static final int ic_menu_sort_alphabetically = 17301660; // 0x108009c
    field public static final int ic_menu_sort_by_size = 17301661; // 0x108009d
    field public static final int ic_menu_today = 17301588; // 0x1080054
    field public static final int ic_menu_upload = 17301589; // 0x1080055
    field public static final int ic_menu_upload_you_tube = 17301590; // 0x1080056
    field public static final int ic_menu_view = 17301591; // 0x1080057
    field public static final int ic_menu_week = 17301592; // 0x1080058
    field public static final int ic_menu_zoom = 17301593; // 0x1080059
    field public static final int ic_notification_clear_all = 17301594; // 0x108005a
    field public static final int ic_notification_overlay = 17301595; // 0x108005b
    field public static final int ic_partial_secure = 17301596; // 0x108005c
    field public static final int ic_popup_disk_full = 17301597; // 0x108005d
    field public static final int ic_popup_reminder = 17301598; // 0x108005e
    field public static final int ic_popup_sync = 17301599; // 0x108005f
    field public static final int ic_search_category_default = 17301600; // 0x1080060
    field public static final int ic_secure = 17301601; // 0x1080061
    field public static final int list_selector_background = 17301602; // 0x1080062
    field public static final int menu_frame = 17301603; // 0x1080063
    field public static final int menu_full_frame = 17301604; // 0x1080064
    field public static final int menuitem_background = 17301605; // 0x1080065
    field public static final int picture_frame = 17301606; // 0x1080066
    field public static final int presence_audio_away = 17301679; // 0x10800af
    field public static final int presence_audio_busy = 17301680; // 0x10800b0
    field public static final int presence_audio_online = 17301681; // 0x10800b1
    field public static final int presence_away = 17301607; // 0x1080067
    field public static final int presence_busy = 17301608; // 0x1080068
    field public static final int presence_invisible = 17301609; // 0x1080069
    field public static final int presence_offline = 17301610; // 0x108006a
    field public static final int presence_online = 17301611; // 0x108006b
    field public static final int presence_video_away = 17301676; // 0x10800ac
    field public static final int presence_video_busy = 17301677; // 0x10800ad
    field public static final int presence_video_online = 17301678; // 0x10800ae
    field public static final int progress_horizontal = 17301612; // 0x108006c
    field public static final int progress_indeterminate_horizontal = 17301613; // 0x108006d
    field public static final int radiobutton_off_background = 17301614; // 0x108006e
    field public static final int radiobutton_on_background = 17301615; // 0x108006f
    field public static final int screen_background_dark = 17301656; // 0x1080098
    field public static final int screen_background_dark_transparent = 17301673; // 0x10800a9
    field public static final int screen_background_light = 17301657; // 0x1080099
    field public static final int screen_background_light_transparent = 17301674; // 0x10800aa
    field public static final int spinner_background = 17301616; // 0x1080070
    field public static final int spinner_dropdown_background = 17301617; // 0x1080071
    field public static final int star_big_off = 17301619; // 0x1080073
    field public static final int star_big_on = 17301618; // 0x1080072
    field public static final int star_off = 17301621; // 0x1080075
    field public static final int star_on = 17301620; // 0x1080074
    field public static final int stat_notify_call_mute = 17301622; // 0x1080076
    field public static final int stat_notify_chat = 17301623; // 0x1080077
    field public static final int stat_notify_error = 17301624; // 0x1080078
    field public static final int stat_notify_missed_call = 17301631; // 0x108007f
    field public static final int stat_notify_more = 17301625; // 0x1080079
    field public static final int stat_notify_sdcard = 17301626; // 0x108007a
    field public static final int stat_notify_sdcard_prepare = 17301675; // 0x10800ab
    field public static final int stat_notify_sdcard_usb = 17301627; // 0x108007b
    field public static final int stat_notify_sync = 17301628; // 0x108007c
    field public static final int stat_notify_sync_noanim = 17301629; // 0x108007d
    field public static final int stat_notify_voicemail = 17301630; // 0x108007e
    field public static final int stat_sys_data_bluetooth = 17301632; // 0x1080080
    field public static final int stat_sys_download = 17301633; // 0x1080081
    field public static final int stat_sys_download_done = 17301634; // 0x1080082
    field public static final int stat_sys_headset = 17301635; // 0x1080083
    field public static final deprecated int stat_sys_phone_call = 17301636; // 0x1080084
    field public static final deprecated int stat_sys_phone_call_forward = 17301637; // 0x1080085
    field public static final deprecated int stat_sys_phone_call_on_hold = 17301638; // 0x1080086
    field public static final int stat_sys_speakerphone = 17301639; // 0x1080087
    field public static final int stat_sys_upload = 17301640; // 0x1080088
    field public static final int stat_sys_upload_done = 17301641; // 0x1080089
    field public static final deprecated int stat_sys_vp_phone_call = 17301671; // 0x10800a7
    field public static final deprecated int stat_sys_vp_phone_call_on_hold = 17301672; // 0x10800a8
    field public static final int stat_sys_warning = 17301642; // 0x108008a
    field public static final int status_bar_item_app_background = 17301643; // 0x108008b
    field public static final int status_bar_item_background = 17301644; // 0x108008c
    field public static final int sym_action_call = 17301645; // 0x108008d
    field public static final int sym_action_chat = 17301646; // 0x108008e
    field public static final int sym_action_email = 17301647; // 0x108008f
    field public static final int sym_call_incoming = 17301648; // 0x1080090
    field public static final int sym_call_missed = 17301649; // 0x1080091
    field public static final int sym_call_outgoing = 17301650; // 0x1080092
    field public static final int sym_contact_card = 17301652; // 0x1080094
    field public static final int sym_def_app_icon = 17301651; // 0x1080093
    field public static final int title_bar = 17301653; // 0x1080095
    field public static final int title_bar_tall = 17301670; // 0x10800a6
    field public static final int toast_frame = 17301654; // 0x1080096
    field public static final int zoom_plate = 17301655; // 0x1080097
  }

  public static final class R.fraction {
    ctor public R.fraction();
  }

  public static final class R.id {
    ctor public R.id();
    field public static final int accessibilityActionScrollToPosition = 16908342; // 0x1020036
    field public static final int accessibilityActionShowOnScreen = 16908341; // 0x1020035
    field public static final int addToDictionary = 16908330; // 0x102002a
    field public static final int background = 16908288; // 0x1020000
    field public static final int button1 = 16908313; // 0x1020019
    field public static final int button2 = 16908314; // 0x102001a
    field public static final int button3 = 16908315; // 0x102001b
    field public static final int candidatesArea = 16908317; // 0x102001d
    field public static final int checkbox = 16908289; // 0x1020001
    field public static final int closeButton = 16908327; // 0x1020027
    field public static final int content = 16908290; // 0x1020002
    field public static final int copy = 16908321; // 0x1020021
    field public static final int copyUrl = 16908323; // 0x1020023
    field public static final int custom = 16908331; // 0x102002b
    field public static final int cut = 16908320; // 0x1020020
    field public static final int edit = 16908291; // 0x1020003
    field public static final int empty = 16908292; // 0x1020004
    field public static final int extractArea = 16908316; // 0x102001c
    field public static final int hint = 16908293; // 0x1020005
    field public static final int home = 16908332; // 0x102002c
    field public static final int icon = 16908294; // 0x1020006
    field public static final int icon1 = 16908295; // 0x1020007
    field public static final int icon2 = 16908296; // 0x1020008
    field public static final int input = 16908297; // 0x1020009
    field public static final int inputArea = 16908318; // 0x102001e
    field public static final int inputExtractEditText = 16908325; // 0x1020025
    field public static final int keyboardView = 16908326; // 0x1020026
    field public static final int list = 16908298; // 0x102000a
    field public static final int mask = 16908334; // 0x102002e
    field public static final int message = 16908299; // 0x102000b
    field public static final int navigationBarBackground = 16908336; // 0x1020030
    field public static final int paste = 16908322; // 0x1020022
    field public static final int pasteAsPlainText = 16908337; // 0x1020031
    field public static final int primary = 16908300; // 0x102000c
    field public static final int progress = 16908301; // 0x102000d
    field public static final int redo = 16908339; // 0x1020033
    field public static final int replaceText = 16908340; // 0x1020034
    field public static final int secondaryProgress = 16908303; // 0x102000f
    field public static final int selectAll = 16908319; // 0x102001f
    field public static final int selectTextMode = 16908333; // 0x102002d
    field public static final int selectedIcon = 16908302; // 0x102000e
    field public static final int startSelectingText = 16908328; // 0x1020028
    field public static final int statusBarBackground = 16908335; // 0x102002f
    field public static final int stopSelectingText = 16908329; // 0x1020029
    field public static final int summary = 16908304; // 0x1020010
    field public static final int switchInputMethod = 16908324; // 0x1020024
    field public static final int tabcontent = 16908305; // 0x1020011
    field public static final int tabhost = 16908306; // 0x1020012
    field public static final int tabs = 16908307; // 0x1020013
    field public static final int text1 = 16908308; // 0x1020014
    field public static final int text2 = 16908309; // 0x1020015
    field public static final int title = 16908310; // 0x1020016
    field public static final int toggle = 16908311; // 0x1020017
    field public static final int undo = 16908338; // 0x1020032
    field public static final int widget_frame = 16908312; // 0x1020018
  }

  public static final class R.integer {
    ctor public R.integer();
    field public static final int config_longAnimTime = 17694722; // 0x10e0002
    field public static final int config_mediumAnimTime = 17694721; // 0x10e0001
    field public static final int config_shortAnimTime = 17694720; // 0x10e0000
    field public static final int status_bar_notification_info_maxnum = 17694723; // 0x10e0003
  }

  public static final class R.interpolator {
    ctor public R.interpolator();
    field public static final int accelerate_cubic = 17563650; // 0x10c0002
    field public static final int accelerate_decelerate = 17563654; // 0x10c0006
    field public static final int accelerate_quad = 17563648; // 0x10c0000
    field public static final int accelerate_quint = 17563652; // 0x10c0004
    field public static final int anticipate = 17563655; // 0x10c0007
    field public static final int anticipate_overshoot = 17563657; // 0x10c0009
    field public static final int bounce = 17563658; // 0x10c000a
    field public static final int cycle = 17563660; // 0x10c000c
    field public static final int decelerate_cubic = 17563651; // 0x10c0003
    field public static final int decelerate_quad = 17563649; // 0x10c0001
    field public static final int decelerate_quint = 17563653; // 0x10c0005
    field public static final int fast_out_linear_in = 17563663; // 0x10c000f
    field public static final int fast_out_slow_in = 17563661; // 0x10c000d
    field public static final int linear = 17563659; // 0x10c000b
    field public static final int linear_out_slow_in = 17563662; // 0x10c000e
    field public static final int overshoot = 17563656; // 0x10c0008
  }

  public static final class R.layout {
    ctor public R.layout();
    field public static final int activity_list_item = 17367040; // 0x1090000
    field public static final int browser_link_context_header = 17367054; // 0x109000e
    field public static final int expandable_list_content = 17367041; // 0x1090001
    field public static final int list_content = 17367060; // 0x1090014
    field public static final int preference_category = 17367042; // 0x1090002
    field public static final int select_dialog_item = 17367057; // 0x1090011
    field public static final int select_dialog_multichoice = 17367059; // 0x1090013
    field public static final int select_dialog_singlechoice = 17367058; // 0x1090012
    field public static final int simple_dropdown_item_1line = 17367050; // 0x109000a
    field public static final int simple_expandable_list_item_1 = 17367046; // 0x1090006
    field public static final int simple_expandable_list_item_2 = 17367047; // 0x1090007
    field public static final int simple_gallery_item = 17367051; // 0x109000b
    field public static final int simple_list_item_1 = 17367043; // 0x1090003
    field public static final int simple_list_item_2 = 17367044; // 0x1090004
    field public static final int simple_list_item_activated_1 = 17367062; // 0x1090016
    field public static final int simple_list_item_activated_2 = 17367063; // 0x1090017
    field public static final int simple_list_item_checked = 17367045; // 0x1090005
    field public static final int simple_list_item_multiple_choice = 17367056; // 0x1090010
    field public static final int simple_list_item_single_choice = 17367055; // 0x109000f
    field public static final int simple_selectable_list_item = 17367061; // 0x1090015
    field public static final int simple_spinner_dropdown_item = 17367049; // 0x1090009
    field public static final int simple_spinner_item = 17367048; // 0x1090008
    field public static final int test_list_item = 17367052; // 0x109000c
    field public static final int two_line_list_item = 17367053; // 0x109000d
  }

  public static final class R.menu {
    ctor public R.menu();
  }

  public static final class R.mipmap {
    ctor public R.mipmap();
    field public static final int sym_def_app_icon = 17629184; // 0x10d0000
  }

  public static final class R.plurals {
    ctor public R.plurals();
  }

  public static final class R.raw {
    ctor public R.raw();
  }

  public static final class R.string {
    ctor public R.string();
    field public static final int VideoView_error_button = 17039376; // 0x1040010
    field public static final int VideoView_error_text_invalid_progressive_playback = 17039381; // 0x1040015
    field public static final int VideoView_error_text_unknown = 17039377; // 0x1040011
    field public static final int VideoView_error_title = 17039378; // 0x1040012
    field public static final int cancel = 17039360; // 0x1040000
    field public static final int copy = 17039361; // 0x1040001
    field public static final int copyUrl = 17039362; // 0x1040002
    field public static final int cut = 17039363; // 0x1040003
    field public static final int defaultMsisdnAlphaTag = 17039365; // 0x1040005
    field public static final int defaultVoiceMailAlphaTag = 17039364; // 0x1040004
    field public static final int dialog_alert_title = 17039380; // 0x1040014
    field public static final int emptyPhoneNumber = 17039366; // 0x1040006
    field public static final int httpErrorBadUrl = 17039367; // 0x1040007
    field public static final int httpErrorUnsupportedScheme = 17039368; // 0x1040008
    field public static final int no = 17039369; // 0x1040009
    field public static final int ok = 17039370; // 0x104000a
    field public static final int paste = 17039371; // 0x104000b
    field public static final int search_go = 17039372; // 0x104000c
    field public static final int selectAll = 17039373; // 0x104000d
    field public static final int selectTextMode = 17039382; // 0x1040016
    field public static final int status_bar_notification_info_overflow = 17039383; // 0x1040017
    field public static final int unknownName = 17039374; // 0x104000e
    field public static final int untitled = 17039375; // 0x104000f
    field public static final int yes = 17039379; // 0x1040013
  }

  public static final class R.style {
    ctor public R.style();
    field public static final int Animation = 16973824; // 0x1030000
    field public static final int Animation_Activity = 16973825; // 0x1030001
    field public static final int Animation_Dialog = 16973826; // 0x1030002
    field public static final int Animation_InputMethod = 16973910; // 0x1030056
    field public static final int Animation_Toast = 16973828; // 0x1030004
    field public static final int Animation_Translucent = 16973827; // 0x1030003
    field public static final int DeviceDefault_ButtonBar = 16974287; // 0x10301cf
    field public static final int DeviceDefault_ButtonBar_AlertDialog = 16974288; // 0x10301d0
    field public static final int DeviceDefault_Light_ButtonBar = 16974290; // 0x10301d2
    field public static final int DeviceDefault_Light_ButtonBar_AlertDialog = 16974291; // 0x10301d3
    field public static final int DeviceDefault_Light_SegmentedButton = 16974292; // 0x10301d4
    field public static final int DeviceDefault_SegmentedButton = 16974289; // 0x10301d1
    field public static final int Holo_ButtonBar = 16974053; // 0x10300e5
    field public static final int Holo_ButtonBar_AlertDialog = 16974055; // 0x10300e7
    field public static final int Holo_Light_ButtonBar = 16974054; // 0x10300e6
    field public static final int Holo_Light_ButtonBar_AlertDialog = 16974056; // 0x10300e8
    field public static final int Holo_Light_SegmentedButton = 16974058; // 0x10300ea
    field public static final int Holo_SegmentedButton = 16974057; // 0x10300e9
    field public static final int MediaButton = 16973879; // 0x1030037
    field public static final int MediaButton_Ffwd = 16973883; // 0x103003b
    field public static final int MediaButton_Next = 16973881; // 0x1030039
    field public static final int MediaButton_Pause = 16973885; // 0x103003d
    field public static final int MediaButton_Play = 16973882; // 0x103003a
    field public static final int MediaButton_Previous = 16973880; // 0x1030038
    field public static final int MediaButton_Rew = 16973884; // 0x103003c
    field public static final int TextAppearance = 16973886; // 0x103003e
    field public static final int TextAppearance_DeviceDefault = 16974253; // 0x10301ad
    field public static final int TextAppearance_DeviceDefault_DialogWindowTitle = 16974264; // 0x10301b8
    field public static final int TextAppearance_DeviceDefault_Inverse = 16974254; // 0x10301ae
    field public static final int TextAppearance_DeviceDefault_Large = 16974255; // 0x10301af
    field public static final int TextAppearance_DeviceDefault_Large_Inverse = 16974256; // 0x10301b0
    field public static final int TextAppearance_DeviceDefault_Medium = 16974257; // 0x10301b1
    field public static final int TextAppearance_DeviceDefault_Medium_Inverse = 16974258; // 0x10301b2
    field public static final int TextAppearance_DeviceDefault_SearchResult_Subtitle = 16974262; // 0x10301b6
    field public static final int TextAppearance_DeviceDefault_SearchResult_Title = 16974261; // 0x10301b5
    field public static final int TextAppearance_DeviceDefault_Small = 16974259; // 0x10301b3
    field public static final int TextAppearance_DeviceDefault_Small_Inverse = 16974260; // 0x10301b4
    field public static final int TextAppearance_DeviceDefault_Widget = 16974265; // 0x10301b9
    field public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Menu = 16974286; // 0x10301ce
    field public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Subtitle = 16974279; // 0x10301c7
    field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionBar_Subtitle_Inverse = 16974283; // 0x10301cb
    field public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Title = 16974278; // 0x10301c6
    field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionBar_Title_Inverse = 16974282; // 0x10301ca
    field public static final int TextAppearance_DeviceDefault_Widget_ActionMode_Subtitle = 16974281; // 0x10301c9
    field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionMode_Subtitle_Inverse = 16974285; // 0x10301cd
    field public static final int TextAppearance_DeviceDefault_Widget_ActionMode_Title = 16974280; // 0x10301c8
    field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionMode_Title_Inverse = 16974284; // 0x10301cc
    field public static final int TextAppearance_DeviceDefault_Widget_Button = 16974266; // 0x10301ba
    field public static final int TextAppearance_DeviceDefault_Widget_DropDownHint = 16974271; // 0x10301bf
    field public static final int TextAppearance_DeviceDefault_Widget_DropDownItem = 16974272; // 0x10301c0
    field public static final int TextAppearance_DeviceDefault_Widget_EditText = 16974274; // 0x10301c2
    field public static final int TextAppearance_DeviceDefault_Widget_IconMenu_Item = 16974267; // 0x10301bb
    field public static final int TextAppearance_DeviceDefault_Widget_PopupMenu = 16974275; // 0x10301c3
    field public static final int TextAppearance_DeviceDefault_Widget_PopupMenu_Large = 16974276; // 0x10301c4
    field public static final int TextAppearance_DeviceDefault_Widget_PopupMenu_Small = 16974277; // 0x10301c5
    field public static final int TextAppearance_DeviceDefault_Widget_TabWidget = 16974268; // 0x10301bc
    field public static final int TextAppearance_DeviceDefault_Widget_TextView = 16974269; // 0x10301bd
    field public static final int TextAppearance_DeviceDefault_Widget_TextView_PopupMenu = 16974270; // 0x10301be
    field public static final int TextAppearance_DeviceDefault_Widget_TextView_SpinnerItem = 16974273; // 0x10301c1
    field public static final int TextAppearance_DeviceDefault_WindowTitle = 16974263; // 0x10301b7
    field public static final int TextAppearance_DialogWindowTitle = 16973889; // 0x1030041
    field public static final int TextAppearance_Holo = 16974075; // 0x10300fb
    field public static final int TextAppearance_Holo_DialogWindowTitle = 16974103; // 0x1030117
    field public static final int TextAppearance_Holo_Inverse = 16974076; // 0x10300fc
    field public static final int TextAppearance_Holo_Large = 16974077; // 0x10300fd
    field public static final int TextAppearance_Holo_Large_Inverse = 16974078; // 0x10300fe
    field public static final int TextAppearance_Holo_Medium = 16974079; // 0x10300ff
    field public static final int TextAppearance_Holo_Medium_Inverse = 16974080; // 0x1030100
    field public static final int TextAppearance_Holo_SearchResult_Subtitle = 16974084; // 0x1030104
    field public static final int TextAppearance_Holo_SearchResult_Title = 16974083; // 0x1030103
    field public static final int TextAppearance_Holo_Small = 16974081; // 0x1030101
    field public static final int TextAppearance_Holo_Small_Inverse = 16974082; // 0x1030102
    field public static final int TextAppearance_Holo_Widget = 16974085; // 0x1030105
    field public static final int TextAppearance_Holo_Widget_ActionBar_Menu = 16974112; // 0x1030120
    field public static final int TextAppearance_Holo_Widget_ActionBar_Subtitle = 16974099; // 0x1030113
    field public static final int TextAppearance_Holo_Widget_ActionBar_Subtitle_Inverse = 16974109; // 0x103011d
    field public static final int TextAppearance_Holo_Widget_ActionBar_Title = 16974098; // 0x1030112
    field public static final int TextAppearance_Holo_Widget_ActionBar_Title_Inverse = 16974108; // 0x103011c
    field public static final int TextAppearance_Holo_Widget_ActionMode_Subtitle = 16974101; // 0x1030115
    field public static final int TextAppearance_Holo_Widget_ActionMode_Subtitle_Inverse = 16974111; // 0x103011f
    field public static final int TextAppearance_Holo_Widget_ActionMode_Title = 16974100; // 0x1030114
    field public static final int TextAppearance_Holo_Widget_ActionMode_Title_Inverse = 16974110; // 0x103011e
    field public static final int TextAppearance_Holo_Widget_Button = 16974086; // 0x1030106
    field public static final int TextAppearance_Holo_Widget_DropDownHint = 16974091; // 0x103010b
    field public static final int TextAppearance_Holo_Widget_DropDownItem = 16974092; // 0x103010c
    field public static final int TextAppearance_Holo_Widget_EditText = 16974094; // 0x103010e
    field public static final int TextAppearance_Holo_Widget_IconMenu_Item = 16974087; // 0x1030107
    field public static final int TextAppearance_Holo_Widget_PopupMenu = 16974095; // 0x103010f
    field public static final int TextAppearance_Holo_Widget_PopupMenu_Large = 16974096; // 0x1030110
    field public static final int TextAppearance_Holo_Widget_PopupMenu_Small = 16974097; // 0x1030111
    field public static final int TextAppearance_Holo_Widget_TabWidget = 16974088; // 0x1030108
    field public static final int TextAppearance_Holo_Widget_TextView = 16974089; // 0x1030109
    field public static final int TextAppearance_Holo_Widget_TextView_PopupMenu = 16974090; // 0x103010a
    field public static final int TextAppearance_Holo_Widget_TextView_SpinnerItem = 16974093; // 0x103010d
    field public static final int TextAppearance_Holo_WindowTitle = 16974102; // 0x1030116
    field public static final int TextAppearance_Inverse = 16973887; // 0x103003f
    field public static final int TextAppearance_Large = 16973890; // 0x1030042
    field public static final int TextAppearance_Large_Inverse = 16973891; // 0x1030043
    field public static final int TextAppearance_Material = 16974317; // 0x10301ed
    field public static final int TextAppearance_Material_Body1 = 16974320; // 0x10301f0
    field public static final int TextAppearance_Material_Body2 = 16974319; // 0x10301ef
    field public static final int TextAppearance_Material_Button = 16974318; // 0x10301ee
    field public static final int TextAppearance_Material_Caption = 16974321; // 0x10301f1
    field public static final int TextAppearance_Material_DialogWindowTitle = 16974322; // 0x10301f2
    field public static final int TextAppearance_Material_Display1 = 16974326; // 0x10301f6
    field public static final int TextAppearance_Material_Display2 = 16974325; // 0x10301f5
    field public static final int TextAppearance_Material_Display3 = 16974324; // 0x10301f4
    field public static final int TextAppearance_Material_Display4 = 16974323; // 0x10301f3
    field public static final int TextAppearance_Material_Headline = 16974327; // 0x10301f7
    field public static final int TextAppearance_Material_Inverse = 16974328; // 0x10301f8
    field public static final int TextAppearance_Material_Large = 16974329; // 0x10301f9
    field public static final int TextAppearance_Material_Large_Inverse = 16974330; // 0x10301fa
    field public static final int TextAppearance_Material_Medium = 16974331; // 0x10301fb
    field public static final int TextAppearance_Material_Medium_Inverse = 16974332; // 0x10301fc
    field public static final int TextAppearance_Material_Menu = 16974333; // 0x10301fd
    field public static final int TextAppearance_Material_Notification = 16974334; // 0x10301fe
    field public static final int TextAppearance_Material_Notification_Emphasis = 16974335; // 0x10301ff
    field public static final int TextAppearance_Material_Notification_Info = 16974336; // 0x1030200
    field public static final int TextAppearance_Material_Notification_Line2 = 16974337; // 0x1030201
    field public static final int TextAppearance_Material_Notification_Time = 16974338; // 0x1030202
    field public static final int TextAppearance_Material_Notification_Title = 16974339; // 0x1030203
    field public static final int TextAppearance_Material_SearchResult_Subtitle = 16974340; // 0x1030204
    field public static final int TextAppearance_Material_SearchResult_Title = 16974341; // 0x1030205
    field public static final int TextAppearance_Material_Small = 16974342; // 0x1030206
    field public static final int TextAppearance_Material_Small_Inverse = 16974343; // 0x1030207
    field public static final int TextAppearance_Material_Subhead = 16974344; // 0x1030208
    field public static final int TextAppearance_Material_Title = 16974345; // 0x1030209
    field public static final int TextAppearance_Material_Widget = 16974347; // 0x103020b
    field public static final int TextAppearance_Material_Widget_ActionBar_Menu = 16974348; // 0x103020c
    field public static final int TextAppearance_Material_Widget_ActionBar_Subtitle = 16974349; // 0x103020d
    field public static final int TextAppearance_Material_Widget_ActionBar_Subtitle_Inverse = 16974350; // 0x103020e
    field public static final int TextAppearance_Material_Widget_ActionBar_Title = 16974351; // 0x103020f
    field public static final int TextAppearance_Material_Widget_ActionBar_Title_Inverse = 16974352; // 0x1030210
    field public static final int TextAppearance_Material_Widget_ActionMode_Subtitle = 16974353; // 0x1030211
    field public static final int TextAppearance_Material_Widget_ActionMode_Subtitle_Inverse = 16974354; // 0x1030212
    field public static final int TextAppearance_Material_Widget_ActionMode_Title = 16974355; // 0x1030213
    field public static final int TextAppearance_Material_Widget_ActionMode_Title_Inverse = 16974356; // 0x1030214
    field public static final int TextAppearance_Material_Widget_Button = 16974357; // 0x1030215
    field public static final int TextAppearance_Material_Widget_DropDownHint = 16974358; // 0x1030216
    field public static final int TextAppearance_Material_Widget_DropDownItem = 16974359; // 0x1030217
    field public static final int TextAppearance_Material_Widget_EditText = 16974360; // 0x1030218
    field public static final int TextAppearance_Material_Widget_IconMenu_Item = 16974361; // 0x1030219
    field public static final int TextAppearance_Material_Widget_PopupMenu = 16974362; // 0x103021a
    field public static final int TextAppearance_Material_Widget_PopupMenu_Large = 16974363; // 0x103021b
    field public static final int TextAppearance_Material_Widget_PopupMenu_Small = 16974364; // 0x103021c
    field public static final int TextAppearance_Material_Widget_TabWidget = 16974365; // 0x103021d
    field public static final int TextAppearance_Material_Widget_TextView = 16974366; // 0x103021e
    field public static final int TextAppearance_Material_Widget_TextView_PopupMenu = 16974367; // 0x103021f
    field public static final int TextAppearance_Material_Widget_TextView_SpinnerItem = 16974368; // 0x1030220
    field public static final int TextAppearance_Material_Widget_Toolbar_Subtitle = 16974369; // 0x1030221
    field public static final int TextAppearance_Material_Widget_Toolbar_Title = 16974370; // 0x1030222
    field public static final int TextAppearance_Material_WindowTitle = 16974346; // 0x103020a
    field public static final int TextAppearance_Medium = 16973892; // 0x1030044
    field public static final int TextAppearance_Medium_Inverse = 16973893; // 0x1030045
    field public static final int TextAppearance_Small = 16973894; // 0x1030046
    field public static final int TextAppearance_Small_Inverse = 16973895; // 0x1030047
    field public static final int TextAppearance_StatusBar_EventContent = 16973927; // 0x1030067
    field public static final int TextAppearance_StatusBar_EventContent_Title = 16973928; // 0x1030068
    field public static final int TextAppearance_StatusBar_Icon = 16973926; // 0x1030066
    field public static final int TextAppearance_StatusBar_Title = 16973925; // 0x1030065
    field public static final int TextAppearance_SuggestionHighlight = 16974104; // 0x1030118
    field public static final int TextAppearance_Theme = 16973888; // 0x1030040
    field public static final int TextAppearance_Theme_Dialog = 16973896; // 0x1030048
    field public static final int TextAppearance_Widget = 16973897; // 0x1030049
    field public static final int TextAppearance_Widget_Button = 16973898; // 0x103004a
    field public static final int TextAppearance_Widget_DropDownHint = 16973904; // 0x1030050
    field public static final int TextAppearance_Widget_DropDownItem = 16973905; // 0x1030051
    field public static final int TextAppearance_Widget_EditText = 16973900; // 0x103004c
    field public static final int TextAppearance_Widget_IconMenu_Item = 16973899; // 0x103004b
    field public static final int TextAppearance_Widget_PopupMenu_Large = 16973952; // 0x1030080
    field public static final int TextAppearance_Widget_PopupMenu_Small = 16973953; // 0x1030081
    field public static final int TextAppearance_Widget_TabWidget = 16973901; // 0x103004d
    field public static final int TextAppearance_Widget_TextView = 16973902; // 0x103004e
    field public static final int TextAppearance_Widget_TextView_PopupMenu = 16973903; // 0x103004f
    field public static final int TextAppearance_Widget_TextView_SpinnerItem = 16973906; // 0x1030052
    field public static final int TextAppearance_WindowTitle = 16973907; // 0x1030053
    field public static final int Theme = 16973829; // 0x1030005
    field public static final int ThemeOverlay = 16974407; // 0x1030247
    field public static final int ThemeOverlay_Material = 16974408; // 0x1030248
    field public static final int ThemeOverlay_Material_ActionBar = 16974409; // 0x1030249
    field public static final int ThemeOverlay_Material_Dark = 16974411; // 0x103024b
    field public static final int ThemeOverlay_Material_Dark_ActionBar = 16974412; // 0x103024c
    field public static final int ThemeOverlay_Material_Dialog = 16974564; // 0x10302e4
    field public static final int ThemeOverlay_Material_Light = 16974410; // 0x103024a
    field public static final int Theme_Black = 16973832; // 0x1030008
    field public static final int Theme_Black_NoTitleBar = 16973833; // 0x1030009
    field public static final int Theme_Black_NoTitleBar_Fullscreen = 16973834; // 0x103000a
    field public static final int Theme_DeviceDefault = 16974120; // 0x1030128
    field public static final int Theme_DeviceDefault_Dialog = 16974126; // 0x103012e
    field public static final int Theme_DeviceDefault_DialogWhenLarge = 16974134; // 0x1030136
    field public static final int Theme_DeviceDefault_DialogWhenLarge_NoActionBar = 16974135; // 0x1030137
    field public static final int Theme_DeviceDefault_Dialog_Alert = 16974545; // 0x10302d1
    field public static final int Theme_DeviceDefault_Dialog_MinWidth = 16974127; // 0x103012f
    field public static final int Theme_DeviceDefault_Dialog_NoActionBar = 16974128; // 0x1030130
    field public static final int Theme_DeviceDefault_Dialog_NoActionBar_MinWidth = 16974129; // 0x1030131
    field public static final int Theme_DeviceDefault_InputMethod = 16974142; // 0x103013e
    field public static final int Theme_DeviceDefault_Light = 16974123; // 0x103012b
    field public static final int Theme_DeviceDefault_Light_DarkActionBar = 16974143; // 0x103013f
    field public static final int Theme_DeviceDefault_Light_Dialog = 16974130; // 0x1030132
    field public static final int Theme_DeviceDefault_Light_DialogWhenLarge = 16974136; // 0x1030138
    field public static final int Theme_DeviceDefault_Light_DialogWhenLarge_NoActionBar = 16974137; // 0x1030139
    field public static final int Theme_DeviceDefault_Light_Dialog_Alert = 16974546; // 0x10302d2
    field public static final int Theme_DeviceDefault_Light_Dialog_MinWidth = 16974131; // 0x1030133
    field public static final int Theme_DeviceDefault_Light_Dialog_NoActionBar = 16974132; // 0x1030134
    field public static final int Theme_DeviceDefault_Light_Dialog_NoActionBar_MinWidth = 16974133; // 0x1030135
    field public static final int Theme_DeviceDefault_Light_NoActionBar = 16974124; // 0x103012c
    field public static final int Theme_DeviceDefault_Light_NoActionBar_Fullscreen = 16974125; // 0x103012d
    field public static final int Theme_DeviceDefault_Light_NoActionBar_Overscan = 16974304; // 0x10301e0
    field public static final int Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor = 16974308; // 0x10301e4
    field public static final int Theme_DeviceDefault_Light_Panel = 16974139; // 0x103013b
    field public static final int Theme_DeviceDefault_NoActionBar = 16974121; // 0x1030129
    field public static final int Theme_DeviceDefault_NoActionBar_Fullscreen = 16974122; // 0x103012a
    field public static final int Theme_DeviceDefault_NoActionBar_Overscan = 16974303; // 0x10301df
    field public static final int Theme_DeviceDefault_NoActionBar_TranslucentDecor = 16974307; // 0x10301e3
    field public static final int Theme_DeviceDefault_Panel = 16974138; // 0x103013a
    field public static final int Theme_DeviceDefault_Settings = 16974371; // 0x1030223
    field public static final int Theme_DeviceDefault_Wallpaper = 16974140; // 0x103013c
    field public static final int Theme_DeviceDefault_Wallpaper_NoTitleBar = 16974141; // 0x103013d
    field public static final int Theme_Dialog = 16973835; // 0x103000b
    field public static final int Theme_Holo = 16973931; // 0x103006b
    field public static final int Theme_Holo_Dialog = 16973935; // 0x103006f
    field public static final int Theme_Holo_DialogWhenLarge = 16973943; // 0x1030077
    field public static final int Theme_Holo_DialogWhenLarge_NoActionBar = 16973944; // 0x1030078
    field public static final int Theme_Holo_Dialog_MinWidth = 16973936; // 0x1030070
    field public static final int Theme_Holo_Dialog_NoActionBar = 16973937; // 0x1030071
    field public static final int Theme_Holo_Dialog_NoActionBar_MinWidth = 16973938; // 0x1030072
    field public static final int Theme_Holo_InputMethod = 16973951; // 0x103007f
    field public static final int Theme_Holo_Light = 16973934; // 0x103006e
    field public static final int Theme_Holo_Light_DarkActionBar = 16974105; // 0x1030119
    field public static final int Theme_Holo_Light_Dialog = 16973939; // 0x1030073
    field public static final int Theme_Holo_Light_DialogWhenLarge = 16973945; // 0x1030079
    field public static final int Theme_Holo_Light_DialogWhenLarge_NoActionBar = 16973946; // 0x103007a
    field public static final int Theme_Holo_Light_Dialog_MinWidth = 16973940; // 0x1030074
    field public static final int Theme_Holo_Light_Dialog_NoActionBar = 16973941; // 0x1030075
    field public static final int Theme_Holo_Light_Dialog_NoActionBar_MinWidth = 16973942; // 0x1030076
    field public static final int Theme_Holo_Light_NoActionBar = 16974064; // 0x10300f0
    field public static final int Theme_Holo_Light_NoActionBar_Fullscreen = 16974065; // 0x10300f1
    field public static final int Theme_Holo_Light_NoActionBar_Overscan = 16974302; // 0x10301de
    field public static final int Theme_Holo_Light_NoActionBar_TranslucentDecor = 16974306; // 0x10301e2
    field public static final int Theme_Holo_Light_Panel = 16973948; // 0x103007c
    field public static final int Theme_Holo_NoActionBar = 16973932; // 0x103006c
    field public static final int Theme_Holo_NoActionBar_Fullscreen = 16973933; // 0x103006d
    field public static final int Theme_Holo_NoActionBar_Overscan = 16974301; // 0x10301dd
    field public static final int Theme_Holo_NoActionBar_TranslucentDecor = 16974305; // 0x10301e1
    field public static final int Theme_Holo_Panel = 16973947; // 0x103007b
    field public static final int Theme_Holo_Wallpaper = 16973949; // 0x103007d
    field public static final int Theme_Holo_Wallpaper_NoTitleBar = 16973950; // 0x103007e
    field public static final int Theme_InputMethod = 16973908; // 0x1030054
    field public static final int Theme_Light = 16973836; // 0x103000c
    field public static final int Theme_Light_NoTitleBar = 16973837; // 0x103000d
    field public static final int Theme_Light_NoTitleBar_Fullscreen = 16973838; // 0x103000e
    field public static final int Theme_Light_Panel = 16973914; // 0x103005a
    field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062
    field public static final int Theme_Material = 16974372; // 0x1030224
    field public static final int Theme_Material_DayNight = 16974548; // 0x10302d4
    field public static final int Theme_Material_DayNight_DarkActionBar = 16974549; // 0x10302d5
    field public static final int Theme_Material_DayNight_Dialog = 16974550; // 0x10302d6
    field public static final int Theme_Material_DayNight_DialogWhenLarge = 16974556; // 0x10302dc
    field public static final int Theme_Material_DayNight_DialogWhenLarge_NoActionBar = 16974557; // 0x10302dd
    field public static final int Theme_Material_DayNight_Dialog_Alert = 16974551; // 0x10302d7
    field public static final int Theme_Material_DayNight_Dialog_MinWidth = 16974552; // 0x10302d8
    field public static final int Theme_Material_DayNight_Dialog_NoActionBar = 16974553; // 0x10302d9
    field public static final int Theme_Material_DayNight_Dialog_NoActionBar_MinWidth = 16974554; // 0x10302da
    field public static final int Theme_Material_DayNight_Dialog_Presentation = 16974555; // 0x10302db
    field public static final int Theme_Material_DayNight_NoActionBar = 16974558; // 0x10302de
    field public static final int Theme_Material_DayNight_NoActionBar_Fullscreen = 16974559; // 0x10302df
    field public static final int Theme_Material_DayNight_NoActionBar_Overscan = 16974560; // 0x10302e0
    field public static final int Theme_Material_DayNight_NoActionBar_TranslucentDecor = 16974561; // 0x10302e1
    field public static final int Theme_Material_DayNight_Panel = 16974562; // 0x10302e2
    field public static final int Theme_Material_Dialog = 16974373; // 0x1030225
    field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b
    field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c
    field public static final int Theme_Material_Dialog_Alert = 16974374; // 0x1030226
    field public static final int Theme_Material_Dialog_MinWidth = 16974375; // 0x1030227
    field public static final int Theme_Material_Dialog_NoActionBar = 16974376; // 0x1030228
    field public static final int Theme_Material_Dialog_NoActionBar_MinWidth = 16974377; // 0x1030229
    field public static final int Theme_Material_Dialog_Presentation = 16974378; // 0x103022a
    field public static final int Theme_Material_InputMethod = 16974381; // 0x103022d
    field public static final int Theme_Material_Light = 16974391; // 0x1030237
    field public static final int Theme_Material_Light_DarkActionBar = 16974392; // 0x1030238
    field public static final int Theme_Material_Light_Dialog = 16974393; // 0x1030239
    field public static final int Theme_Material_Light_DialogWhenLarge = 16974399; // 0x103023f
    field public static final int Theme_Material_Light_DialogWhenLarge_NoActionBar = 16974400; // 0x1030240
    field public static final int Theme_Material_Light_Dialog_Alert = 16974394; // 0x103023a
    field public static final int Theme_Material_Light_Dialog_MinWidth = 16974395; // 0x103023b
    field public static final int Theme_Material_Light_Dialog_NoActionBar = 16974396; // 0x103023c
    field public static final int Theme_Material_Light_Dialog_NoActionBar_MinWidth = 16974397; // 0x103023d
    field public static final int Theme_Material_Light_Dialog_Presentation = 16974398; // 0x103023e
    field public static final int Theme_Material_Light_LightStatusBar = 16974563; // 0x10302e3
    field public static final int Theme_Material_Light_NoActionBar = 16974401; // 0x1030241
    field public static final int Theme_Material_Light_NoActionBar_Fullscreen = 16974402; // 0x1030242
    field public static final int Theme_Material_Light_NoActionBar_Overscan = 16974403; // 0x1030243
    field public static final int Theme_Material_Light_NoActionBar_TranslucentDecor = 16974404; // 0x1030244
    field public static final int Theme_Material_Light_Panel = 16974405; // 0x1030245
    field public static final int Theme_Material_Light_Voice = 16974406; // 0x1030246
    field public static final int Theme_Material_NoActionBar = 16974382; // 0x103022e
    field public static final int Theme_Material_NoActionBar_Fullscreen = 16974383; // 0x103022f
    field public static final int Theme_Material_NoActionBar_Overscan = 16974384; // 0x1030230
    field public static final int Theme_Material_NoActionBar_TranslucentDecor = 16974385; // 0x1030231
    field public static final int Theme_Material_Panel = 16974386; // 0x1030232
    field public static final int Theme_Material_Settings = 16974387; // 0x1030233
    field public static final int Theme_Material_Voice = 16974388; // 0x1030234
    field public static final int Theme_Material_Wallpaper = 16974389; // 0x1030235
    field public static final int Theme_Material_Wallpaper_NoTitleBar = 16974390; // 0x1030236
    field public static final int Theme_NoDisplay = 16973909; // 0x1030055
    field public static final int Theme_NoTitleBar = 16973830; // 0x1030006
    field public static final int Theme_NoTitleBar_Fullscreen = 16973831; // 0x1030007
    field public static final int Theme_NoTitleBar_OverlayActionModes = 16973930; // 0x103006a
    field public static final int Theme_Panel = 16973913; // 0x1030059
    field public static final int Theme_Translucent = 16973839; // 0x103000f
    field public static final int Theme_Translucent_NoTitleBar = 16973840; // 0x1030010
    field public static final int Theme_Translucent_NoTitleBar_Fullscreen = 16973841; // 0x1030011
    field public static final int Theme_Wallpaper = 16973918; // 0x103005e
    field public static final int Theme_WallpaperSettings = 16973921; // 0x1030061
    field public static final int Theme_Wallpaper_NoTitleBar = 16973919; // 0x103005f
    field public static final int Theme_Wallpaper_NoTitleBar_Fullscreen = 16973920; // 0x1030060
    field public static final int Theme_WithActionBar = 16973929; // 0x1030069
    field public static final int Widget = 16973842; // 0x1030012
    field public static final int Widget_AbsListView = 16973843; // 0x1030013
    field public static final int Widget_ActionBar = 16973954; // 0x1030082
    field public static final int Widget_ActionBar_TabBar = 16974068; // 0x10300f4
    field public static final int Widget_ActionBar_TabText = 16974067; // 0x10300f3
    field public static final int Widget_ActionBar_TabView = 16974066; // 0x10300f2
    field public static final int Widget_ActionButton = 16973956; // 0x1030084
    field public static final int Widget_ActionButton_CloseMode = 16973960; // 0x1030088
    field public static final int Widget_ActionButton_Overflow = 16973959; // 0x1030087
    field public static final int Widget_AutoCompleteTextView = 16973863; // 0x1030027
    field public static final int Widget_Button = 16973844; // 0x1030014
    field public static final int Widget_Button_Inset = 16973845; // 0x1030015
    field public static final int Widget_Button_Small = 16973846; // 0x1030016
    field public static final int Widget_Button_Toggle = 16973847; // 0x1030017
    field public static final int Widget_CalendarView = 16974059; // 0x10300eb
    field public static final int Widget_CompoundButton = 16973848; // 0x1030018
    field public static final int Widget_CompoundButton_CheckBox = 16973849; // 0x1030019
    field public static final int Widget_CompoundButton_RadioButton = 16973850; // 0x103001a
    field public static final int Widget_CompoundButton_Star = 16973851; // 0x103001b
    field public static final int Widget_DatePicker = 16974062; // 0x10300ee
    field public static final int Widget_DeviceDefault = 16974144; // 0x1030140
    field public static final int Widget_DeviceDefault_ActionBar = 16974187; // 0x103016b
    field public static final int Widget_DeviceDefault_ActionBar_Solid = 16974195; // 0x1030173
    field public static final int Widget_DeviceDefault_ActionBar_TabBar = 16974194; // 0x1030172
    field public static final int Widget_DeviceDefault_ActionBar_TabText = 16974193; // 0x1030171
    field public static final int Widget_DeviceDefault_ActionBar_TabView = 16974192; // 0x1030170
    field public static final int Widget_DeviceDefault_ActionButton = 16974182; // 0x1030166
    field public static final int Widget_DeviceDefault_ActionButton_CloseMode = 16974186; // 0x103016a
    field public static final int Widget_DeviceDefault_ActionButton_Overflow = 16974183; // 0x1030167
    field public static final int Widget_DeviceDefault_ActionButton_TextButton = 16974184; // 0x1030168
    field public static final int Widget_DeviceDefault_ActionMode = 16974185; // 0x1030169
    field public static final int Widget_DeviceDefault_AutoCompleteTextView = 16974151; // 0x1030147
    field public static final int Widget_DeviceDefault_Button = 16974145; // 0x1030141
    field public static final int Widget_DeviceDefault_Button_Borderless = 16974188; // 0x103016c
    field public static final int Widget_DeviceDefault_Button_Borderless_Small = 16974149; // 0x1030145
    field public static final int Widget_DeviceDefault_Button_Inset = 16974147; // 0x1030143
    field public static final int Widget_DeviceDefault_Button_Small = 16974146; // 0x1030142
    field public static final int Widget_DeviceDefault_Button_Toggle = 16974148; // 0x1030144
    field public static final int Widget_DeviceDefault_CalendarView = 16974190; // 0x103016e
    field public static final int Widget_DeviceDefault_CheckedTextView = 16974299; // 0x10301db
    field public static final int Widget_DeviceDefault_CompoundButton_CheckBox = 16974152; // 0x1030148
    field public static final int Widget_DeviceDefault_CompoundButton_RadioButton = 16974169; // 0x1030159
    field public static final int Widget_DeviceDefault_CompoundButton_Star = 16974173; // 0x103015d
    field public static final int Widget_DeviceDefault_DatePicker = 16974191; // 0x103016f
    field public static final int Widget_DeviceDefault_DropDownItem = 16974177; // 0x1030161
    field public static final int Widget_DeviceDefault_DropDownItem_Spinner = 16974178; // 0x1030162
    field public static final int Widget_DeviceDefault_EditText = 16974154; // 0x103014a
    field public static final int Widget_DeviceDefault_ExpandableListView = 16974155; // 0x103014b
    field public static final int Widget_DeviceDefault_FastScroll = 16974313; // 0x10301e9
    field public static final int Widget_DeviceDefault_GridView = 16974156; // 0x103014c
    field public static final int Widget_DeviceDefault_HorizontalScrollView = 16974171; // 0x103015b
    field public static final int Widget_DeviceDefault_ImageButton = 16974157; // 0x103014d
    field public static final int Widget_DeviceDefault_Light = 16974196; // 0x1030174
    field public static final int Widget_DeviceDefault_Light_ActionBar = 16974243; // 0x10301a3
    field public static final int Widget_DeviceDefault_Light_ActionBar_Solid = 16974247; // 0x10301a7
    field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_Solid_Inverse = 16974248; // 0x10301a8
    field public static final int Widget_DeviceDefault_Light_ActionBar_TabBar = 16974246; // 0x10301a6
    field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_TabBar_Inverse = 16974249; // 0x10301a9
    field public static final int Widget_DeviceDefault_Light_ActionBar_TabText = 16974245; // 0x10301a5
    field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_TabText_Inverse = 16974251; // 0x10301ab
    field public static final int Widget_DeviceDefault_Light_ActionBar_TabView = 16974244; // 0x10301a4
    field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_TabView_Inverse = 16974250; // 0x10301aa
    field public static final int Widget_DeviceDefault_Light_ActionButton = 16974239; // 0x103019f
    field public static final int Widget_DeviceDefault_Light_ActionButton_CloseMode = 16974242; // 0x10301a2
    field public static final int Widget_DeviceDefault_Light_ActionButton_Overflow = 16974240; // 0x10301a0
    field public static final int Widget_DeviceDefault_Light_ActionMode = 16974241; // 0x10301a1
    field public static final deprecated int Widget_DeviceDefault_Light_ActionMode_Inverse = 16974252; // 0x10301ac
    field public static final int Widget_DeviceDefault_Light_AutoCompleteTextView = 16974203; // 0x103017b
    field public static final int Widget_DeviceDefault_Light_Button = 16974197; // 0x1030175
    field public static final int Widget_DeviceDefault_Light_Button_Borderless_Small = 16974201; // 0x1030179
    field public static final int Widget_DeviceDefault_Light_Button_Inset = 16974199; // 0x1030177
    field public static final int Widget_DeviceDefault_Light_Button_Small = 16974198; // 0x1030176
    field public static final int Widget_DeviceDefault_Light_Button_Toggle = 16974200; // 0x1030178
    field public static final int Widget_DeviceDefault_Light_CalendarView = 16974238; // 0x103019e
    field public static final int Widget_DeviceDefault_Light_CheckedTextView = 16974300; // 0x10301dc
    field public static final int Widget_DeviceDefault_Light_CompoundButton_CheckBox = 16974204; // 0x103017c
    field public static final int Widget_DeviceDefault_Light_CompoundButton_RadioButton = 16974224; // 0x1030190
    field public static final int Widget_DeviceDefault_Light_CompoundButton_Star = 16974228; // 0x1030194
    field public static final int Widget_DeviceDefault_Light_DropDownItem = 16974232; // 0x1030198
    field public static final int Widget_DeviceDefault_Light_DropDownItem_Spinner = 16974233; // 0x1030199
    field public static final int Widget_DeviceDefault_Light_EditText = 16974206; // 0x103017e
    field public static final int Widget_DeviceDefault_Light_ExpandableListView = 16974207; // 0x103017f
    field public static final int Widget_DeviceDefault_Light_FastScroll = 16974315; // 0x10301eb
    field public static final int Widget_DeviceDefault_Light_GridView = 16974208; // 0x1030180
    field public static final int Widget_DeviceDefault_Light_HorizontalScrollView = 16974226; // 0x1030192
    field public static final int Widget_DeviceDefault_Light_ImageButton = 16974209; // 0x1030181
    field public static final int Widget_DeviceDefault_Light_ListPopupWindow = 16974235; // 0x103019b
    field public static final int Widget_DeviceDefault_Light_ListView = 16974210; // 0x1030182
    field public static final int Widget_DeviceDefault_Light_ListView_DropDown = 16974205; // 0x103017d
    field public static final int Widget_DeviceDefault_Light_MediaRouteButton = 16974296; // 0x10301d8
    field public static final int Widget_DeviceDefault_Light_PopupMenu = 16974236; // 0x103019c
    field public static final int Widget_DeviceDefault_Light_PopupWindow = 16974211; // 0x1030183
    field public static final int Widget_DeviceDefault_Light_ProgressBar = 16974212; // 0x1030184
    field public static final int Widget_DeviceDefault_Light_ProgressBar_Horizontal = 16974213; // 0x1030185
    field public static final int Widget_DeviceDefault_Light_ProgressBar_Inverse = 16974217; // 0x1030189
    field public static final int Widget_DeviceDefault_Light_ProgressBar_Large = 16974216; // 0x1030188
    field public static final int Widget_DeviceDefault_Light_ProgressBar_Large_Inverse = 16974219; // 0x103018b
    field public static final int Widget_DeviceDefault_Light_ProgressBar_Small = 16974214; // 0x1030186
    field public static final int Widget_DeviceDefault_Light_ProgressBar_Small_Inverse = 16974218; // 0x103018a
    field public static final int Widget_DeviceDefault_Light_ProgressBar_Small_Title = 16974215; // 0x1030187
    field public static final int Widget_DeviceDefault_Light_RatingBar = 16974221; // 0x103018d
    field public static final int Widget_DeviceDefault_Light_RatingBar_Indicator = 16974222; // 0x103018e
    field public static final int Widget_DeviceDefault_Light_RatingBar_Small = 16974223; // 0x103018f
    field public static final int Widget_DeviceDefault_Light_ScrollView = 16974225; // 0x1030191
    field public static final int Widget_DeviceDefault_Light_SeekBar = 16974220; // 0x103018c
    field public static final int Widget_DeviceDefault_Light_Spinner = 16974227; // 0x1030193
    field public static final int Widget_DeviceDefault_Light_StackView = 16974316; // 0x10301ec
    field public static final int Widget_DeviceDefault_Light_Tab = 16974237; // 0x103019d
    field public static final int Widget_DeviceDefault_Light_TabWidget = 16974229; // 0x1030195
    field public static final int Widget_DeviceDefault_Light_TextView = 16974202; // 0x103017a
    field public static final int Widget_DeviceDefault_Light_TextView_SpinnerItem = 16974234; // 0x103019a
    field public static final int Widget_DeviceDefault_Light_WebTextView = 16974230; // 0x1030196
    field public static final int Widget_DeviceDefault_Light_WebView = 16974231; // 0x1030197
    field public static final int Widget_DeviceDefault_ListPopupWindow = 16974180; // 0x1030164
    field public static final int Widget_DeviceDefault_ListView = 16974158; // 0x103014e
    field public static final int Widget_DeviceDefault_ListView_DropDown = 16974153; // 0x1030149
    field public static final int Widget_DeviceDefault_MediaRouteButton = 16974295; // 0x10301d7
    field public static final int Widget_DeviceDefault_PopupMenu = 16974181; // 0x1030165
    field public static final int Widget_DeviceDefault_PopupWindow = 16974159; // 0x103014f
    field public static final int Widget_DeviceDefault_ProgressBar = 16974160; // 0x1030150
    field public static final int Widget_DeviceDefault_ProgressBar_Horizontal = 16974161; // 0x1030151
    field public static final int Widget_DeviceDefault_ProgressBar_Large = 16974164; // 0x1030154
    field public static final int Widget_DeviceDefault_ProgressBar_Small = 16974162; // 0x1030152
    field public static final int Widget_DeviceDefault_ProgressBar_Small_Title = 16974163; // 0x1030153
    field public static final int Widget_DeviceDefault_RatingBar = 16974166; // 0x1030156
    field public static final int Widget_DeviceDefault_RatingBar_Indicator = 16974167; // 0x1030157
    field public static final int Widget_DeviceDefault_RatingBar_Small = 16974168; // 0x1030158
    field public static final int Widget_DeviceDefault_ScrollView = 16974170; // 0x103015a
    field public static final int Widget_DeviceDefault_SeekBar = 16974165; // 0x1030155
    field public static final int Widget_DeviceDefault_Spinner = 16974172; // 0x103015c
    field public static final int Widget_DeviceDefault_StackView = 16974314; // 0x10301ea
    field public static final int Widget_DeviceDefault_Tab = 16974189; // 0x103016d
    field public static final int Widget_DeviceDefault_TabWidget = 16974174; // 0x103015e
    field public static final int Widget_DeviceDefault_TextView = 16974150; // 0x1030146
    field public static final int Widget_DeviceDefault_TextView_SpinnerItem = 16974179; // 0x1030163
    field public static final int Widget_DeviceDefault_WebTextView = 16974175; // 0x103015f
    field public static final int Widget_DeviceDefault_WebView = 16974176; // 0x1030160
    field public static final int Widget_DropDownItem = 16973867; // 0x103002b
    field public static final int Widget_DropDownItem_Spinner = 16973868; // 0x103002c
    field public static final int Widget_EditText = 16973859; // 0x1030023
    field public static final int Widget_ExpandableListView = 16973860; // 0x1030024
    field public static final int Widget_FastScroll = 16974309; // 0x10301e5
    field public static final int Widget_FragmentBreadCrumbs = 16973961; // 0x1030089
    field public static final int Widget_Gallery = 16973877; // 0x1030035
    field public static final int Widget_GridView = 16973874; // 0x1030032
    field public static final int Widget_Holo = 16973962; // 0x103008a
    field public static final int Widget_Holo_ActionBar = 16974004; // 0x10300b4
    field public static final int Widget_Holo_ActionBar_Solid = 16974113; // 0x1030121
    field public static final int Widget_Holo_ActionBar_TabBar = 16974071; // 0x10300f7
    field public static final int Widget_Holo_ActionBar_TabText = 16974070; // 0x10300f6
    field public static final int Widget_Holo_ActionBar_TabView = 16974069; // 0x10300f5
    field public static final int Widget_Holo_ActionButton = 16973999; // 0x10300af
    field public static final int Widget_Holo_ActionButton_CloseMode = 16974003; // 0x10300b3
    field public static final int Widget_Holo_ActionButton_Overflow = 16974000; // 0x10300b0
    field public static final int Widget_Holo_ActionButton_TextButton = 16974001; // 0x10300b1
    field public static final int Widget_Holo_ActionMode = 16974002; // 0x10300b2
    field public static final int Widget_Holo_AutoCompleteTextView = 16973968; // 0x1030090
    field public static final int Widget_Holo_Button = 16973963; // 0x103008b
    field public static final int Widget_Holo_Button_Borderless = 16974050; // 0x10300e2
    field public static final int Widget_Holo_Button_Borderless_Small = 16974106; // 0x103011a
    field public static final int Widget_Holo_Button_Inset = 16973965; // 0x103008d
    field public static final int Widget_Holo_Button_Small = 16973964; // 0x103008c
    field public static final int Widget_Holo_Button_Toggle = 16973966; // 0x103008e
    field public static final int Widget_Holo_CalendarView = 16974060; // 0x10300ec
    field public static final int Widget_Holo_CheckedTextView = 16974297; // 0x10301d9
    field public static final int Widget_Holo_CompoundButton_CheckBox = 16973969; // 0x1030091
    field public static final int Widget_Holo_CompoundButton_RadioButton = 16973986; // 0x10300a2
    field public static final int Widget_Holo_CompoundButton_Star = 16973990; // 0x10300a6
    field public static final int Widget_Holo_DatePicker = 16974063; // 0x10300ef
    field public static final int Widget_Holo_DropDownItem = 16973994; // 0x10300aa
    field public static final int Widget_Holo_DropDownItem_Spinner = 16973995; // 0x10300ab
    field public static final int Widget_Holo_EditText = 16973971; // 0x1030093
    field public static final int Widget_Holo_ExpandableListView = 16973972; // 0x1030094
    field public static final int Widget_Holo_GridView = 16973973; // 0x1030095
    field public static final int Widget_Holo_HorizontalScrollView = 16973988; // 0x10300a4
    field public static final int Widget_Holo_ImageButton = 16973974; // 0x1030096
    field public static final int Widget_Holo_Light = 16974005; // 0x10300b5
    field public static final int Widget_Holo_Light_ActionBar = 16974049; // 0x10300e1
    field public static final int Widget_Holo_Light_ActionBar_Solid = 16974114; // 0x1030122
    field public static final int Widget_Holo_Light_ActionBar_Solid_Inverse = 16974115; // 0x1030123
    field public static final int Widget_Holo_Light_ActionBar_TabBar = 16974074; // 0x10300fa
    field public static final int Widget_Holo_Light_ActionBar_TabBar_Inverse = 16974116; // 0x1030124
    field public static final int Widget_Holo_Light_ActionBar_TabText = 16974073; // 0x10300f9
    field public static final int Widget_Holo_Light_ActionBar_TabText_Inverse = 16974118; // 0x1030126
    field public static final int Widget_Holo_Light_ActionBar_TabView = 16974072; // 0x10300f8
    field public static final int Widget_Holo_Light_ActionBar_TabView_Inverse = 16974117; // 0x1030125
    field public static final int Widget_Holo_Light_ActionButton = 16974045; // 0x10300dd
    field public static final int Widget_Holo_Light_ActionButton_CloseMode = 16974048; // 0x10300e0
    field public static final int Widget_Holo_Light_ActionButton_Overflow = 16974046; // 0x10300de
    field public static final int Widget_Holo_Light_ActionMode = 16974047; // 0x10300df
    field public static final int Widget_Holo_Light_ActionMode_Inverse = 16974119; // 0x1030127
    field public static final int Widget_Holo_Light_AutoCompleteTextView = 16974011; // 0x10300bb
    field public static final int Widget_Holo_Light_Button = 16974006; // 0x10300b6
    field public static final int Widget_Holo_Light_Button_Borderless_Small = 16974107; // 0x103011b
    field public static final int Widget_Holo_Light_Button_Inset = 16974008; // 0x10300b8
    field public static final int Widget_Holo_Light_Button_Small = 16974007; // 0x10300b7
    field public static final int Widget_Holo_Light_Button_Toggle = 16974009; // 0x10300b9
    field public static final int Widget_Holo_Light_CalendarView = 16974061; // 0x10300ed
    field public static final int Widget_Holo_Light_CheckedTextView = 16974298; // 0x10301da
    field public static final int Widget_Holo_Light_CompoundButton_CheckBox = 16974012; // 0x10300bc
    field public static final int Widget_Holo_Light_CompoundButton_RadioButton = 16974032; // 0x10300d0
    field public static final int Widget_Holo_Light_CompoundButton_Star = 16974036; // 0x10300d4
    field public static final int Widget_Holo_Light_DropDownItem = 16974040; // 0x10300d8
    field public static final int Widget_Holo_Light_DropDownItem_Spinner = 16974041; // 0x10300d9
    field public static final int Widget_Holo_Light_EditText = 16974014; // 0x10300be
    field public static final int Widget_Holo_Light_ExpandableListView = 16974015; // 0x10300bf
    field public static final int Widget_Holo_Light_GridView = 16974016; // 0x10300c0
    field public static final int Widget_Holo_Light_HorizontalScrollView = 16974034; // 0x10300d2
    field public static final int Widget_Holo_Light_ImageButton = 16974017; // 0x10300c1
    field public static final int Widget_Holo_Light_ListPopupWindow = 16974043; // 0x10300db
    field public static final int Widget_Holo_Light_ListView = 16974018; // 0x10300c2
    field public static final int Widget_Holo_Light_ListView_DropDown = 16974013; // 0x10300bd
    field public static final int Widget_Holo_Light_MediaRouteButton = 16974294; // 0x10301d6
    field public static final int Widget_Holo_Light_PopupMenu = 16974044; // 0x10300dc
    field public static final int Widget_Holo_Light_PopupWindow = 16974019; // 0x10300c3
    field public static final int Widget_Holo_Light_ProgressBar = 16974020; // 0x10300c4
    field public static final int Widget_Holo_Light_ProgressBar_Horizontal = 16974021; // 0x10300c5
    field public static final int Widget_Holo_Light_ProgressBar_Inverse = 16974025; // 0x10300c9
    field public static final int Widget_Holo_Light_ProgressBar_Large = 16974024; // 0x10300c8
    field public static final int Widget_Holo_Light_ProgressBar_Large_Inverse = 16974027; // 0x10300cb
    field public static final int Widget_Holo_Light_ProgressBar_Small = 16974022; // 0x10300c6
    field public static final int Widget_Holo_Light_ProgressBar_Small_Inverse = 16974026; // 0x10300ca
    field public static final int Widget_Holo_Light_ProgressBar_Small_Title = 16974023; // 0x10300c7
    field public static final int Widget_Holo_Light_RatingBar = 16974029; // 0x10300cd
    field public static final int Widget_Holo_Light_RatingBar_Indicator = 16974030; // 0x10300ce
    field public static final int Widget_Holo_Light_RatingBar_Small = 16974031; // 0x10300cf
    field public static final int Widget_Holo_Light_ScrollView = 16974033; // 0x10300d1
    field public static final int Widget_Holo_Light_SeekBar = 16974028; // 0x10300cc
    field public static final int Widget_Holo_Light_Spinner = 16974035; // 0x10300d3
    field public static final int Widget_Holo_Light_Tab = 16974052; // 0x10300e4
    field public static final int Widget_Holo_Light_TabWidget = 16974037; // 0x10300d5
    field public static final int Widget_Holo_Light_TextView = 16974010; // 0x10300ba
    field public static final int Widget_Holo_Light_TextView_SpinnerItem = 16974042; // 0x10300da
    field public static final int Widget_Holo_Light_WebTextView = 16974038; // 0x10300d6
    field public static final int Widget_Holo_Light_WebView = 16974039; // 0x10300d7
    field public static final int Widget_Holo_ListPopupWindow = 16973997; // 0x10300ad
    field public static final int Widget_Holo_ListView = 16973975; // 0x1030097
    field public static final int Widget_Holo_ListView_DropDown = 16973970; // 0x1030092
    field public static final int Widget_Holo_MediaRouteButton = 16974293; // 0x10301d5
    field public static final int Widget_Holo_PopupMenu = 16973998; // 0x10300ae
    field public static final int Widget_Holo_PopupWindow = 16973976; // 0x1030098
    field public static final int Widget_Holo_ProgressBar = 16973977; // 0x1030099
    field public static final int Widget_Holo_ProgressBar_Horizontal = 16973978; // 0x103009a
    field public static final int Widget_Holo_ProgressBar_Large = 16973981; // 0x103009d
    field public static final int Widget_Holo_ProgressBar_Small = 16973979; // 0x103009b
    field public static final int Widget_Holo_ProgressBar_Small_Title = 16973980; // 0x103009c
    field public static final int Widget_Holo_RatingBar = 16973983; // 0x103009f
    field public static final int Widget_Holo_RatingBar_Indicator = 16973984; // 0x10300a0
    field public static final int Widget_Holo_RatingBar_Small = 16973985; // 0x10300a1
    field public static final int Widget_Holo_ScrollView = 16973987; // 0x10300a3
    field public static final int Widget_Holo_SeekBar = 16973982; // 0x103009e
    field public static final int Widget_Holo_Spinner = 16973989; // 0x10300a5
    field public static final int Widget_Holo_Tab = 16974051; // 0x10300e3
    field public static final int Widget_Holo_TabWidget = 16973991; // 0x10300a7
    field public static final int Widget_Holo_TextView = 16973967; // 0x103008f
    field public static final int Widget_Holo_TextView_SpinnerItem = 16973996; // 0x10300ac
    field public static final int Widget_Holo_WebTextView = 16973992; // 0x10300a8
    field public static final int Widget_Holo_WebView = 16973993; // 0x10300a9
    field public static final int Widget_ImageButton = 16973862; // 0x1030026
    field public static final int Widget_ImageWell = 16973861; // 0x1030025
    field public static final int Widget_KeyboardView = 16973911; // 0x1030057
    field public static final int Widget_ListPopupWindow = 16973957; // 0x1030085
    field public static final int Widget_ListView = 16973870; // 0x103002e
    field public static final int Widget_ListView_DropDown = 16973872; // 0x1030030
    field public static final int Widget_ListView_Menu = 16973873; // 0x1030031
    field public static final int Widget_ListView_White = 16973871; // 0x103002f
    field public static final int Widget_Material = 16974413; // 0x103024d
    field public static final int Widget_Material_ActionBar = 16974414; // 0x103024e
    field public static final int Widget_Material_ActionBar_Solid = 16974415; // 0x103024f
    field public static final int Widget_Material_ActionBar_TabBar = 16974416; // 0x1030250
    field public static final int Widget_Material_ActionBar_TabText = 16974417; // 0x1030251
    field public static final int Widget_Material_ActionBar_TabView = 16974418; // 0x1030252
    field public static final int Widget_Material_ActionButton = 16974419; // 0x1030253
    field public static final int Widget_Material_ActionButton_CloseMode = 16974420; // 0x1030254
    field public static final int Widget_Material_ActionButton_Overflow = 16974421; // 0x1030255
    field public static final int Widget_Material_ActionMode = 16974422; // 0x1030256
    field public static final int Widget_Material_AutoCompleteTextView = 16974423; // 0x1030257
    field public static final int Widget_Material_Button = 16974424; // 0x1030258
    field public static final int Widget_Material_ButtonBar = 16974431; // 0x103025f
    field public static final int Widget_Material_ButtonBar_AlertDialog = 16974432; // 0x1030260
    field public static final int Widget_Material_Button_Borderless = 16974425; // 0x1030259
    field public static final int Widget_Material_Button_Borderless_Colored = 16974426; // 0x103025a
    field public static final int Widget_Material_Button_Borderless_Small = 16974427; // 0x103025b
    field public static final int Widget_Material_Button_Colored = 16974547; // 0x10302d3
    field public static final int Widget_Material_Button_Inset = 16974428; // 0x103025c
    field public static final int Widget_Material_Button_Small = 16974429; // 0x103025d
    field public static final int Widget_Material_Button_Toggle = 16974430; // 0x103025e
    field public static final int Widget_Material_CalendarView = 16974433; // 0x1030261
    field public static final int Widget_Material_CheckedTextView = 16974434; // 0x1030262
    field public static final int Widget_Material_CompoundButton_CheckBox = 16974435; // 0x1030263
    field public static final int Widget_Material_CompoundButton_RadioButton = 16974436; // 0x1030264
    field public static final int Widget_Material_CompoundButton_Star = 16974437; // 0x1030265
    field public static final int Widget_Material_DatePicker = 16974438; // 0x1030266
    field public static final int Widget_Material_DropDownItem = 16974439; // 0x1030267
    field public static final int Widget_Material_DropDownItem_Spinner = 16974440; // 0x1030268
    field public static final int Widget_Material_EditText = 16974441; // 0x1030269
    field public static final int Widget_Material_ExpandableListView = 16974442; // 0x103026a
    field public static final int Widget_Material_FastScroll = 16974443; // 0x103026b
    field public static final int Widget_Material_GridView = 16974444; // 0x103026c
    field public static final int Widget_Material_HorizontalScrollView = 16974445; // 0x103026d
    field public static final int Widget_Material_ImageButton = 16974446; // 0x103026e
    field public static final int Widget_Material_Light = 16974478; // 0x103028e
    field public static final int Widget_Material_Light_ActionBar = 16974479; // 0x103028f
    field public static final int Widget_Material_Light_ActionBar_Solid = 16974480; // 0x1030290
    field public static final int Widget_Material_Light_ActionBar_TabBar = 16974481; // 0x1030291
    field public static final int Widget_Material_Light_ActionBar_TabText = 16974482; // 0x1030292
    field public static final int Widget_Material_Light_ActionBar_TabView = 16974483; // 0x1030293
    field public static final int Widget_Material_Light_ActionButton = 16974484; // 0x1030294
    field public static final int Widget_Material_Light_ActionButton_CloseMode = 16974485; // 0x1030295
    field public static final int Widget_Material_Light_ActionButton_Overflow = 16974486; // 0x1030296
    field public static final int Widget_Material_Light_ActionMode = 16974487; // 0x1030297
    field public static final int Widget_Material_Light_AutoCompleteTextView = 16974488; // 0x1030298
    field public static final int Widget_Material_Light_Button = 16974489; // 0x1030299
    field public static final int Widget_Material_Light_ButtonBar = 16974496; // 0x10302a0
    field public static final int Widget_Material_Light_ButtonBar_AlertDialog = 16974497; // 0x10302a1
    field public static final int Widget_Material_Light_Button_Borderless = 16974490; // 0x103029a
    field public static final int Widget_Material_Light_Button_Borderless_Colored = 16974491; // 0x103029b
    field public static final int Widget_Material_Light_Button_Borderless_Small = 16974492; // 0x103029c
    field public static final int Widget_Material_Light_Button_Inset = 16974493; // 0x103029d
    field public static final int Widget_Material_Light_Button_Small = 16974494; // 0x103029e
    field public static final int Widget_Material_Light_Button_Toggle = 16974495; // 0x103029f
    field public static final int Widget_Material_Light_CalendarView = 16974498; // 0x10302a2
    field public static final int Widget_Material_Light_CheckedTextView = 16974499; // 0x10302a3
    field public static final int Widget_Material_Light_CompoundButton_CheckBox = 16974500; // 0x10302a4
    field public static final int Widget_Material_Light_CompoundButton_RadioButton = 16974501; // 0x10302a5
    field public static final int Widget_Material_Light_CompoundButton_Star = 16974502; // 0x10302a6
    field public static final int Widget_Material_Light_DatePicker = 16974503; // 0x10302a7
    field public static final int Widget_Material_Light_DropDownItem = 16974504; // 0x10302a8
    field public static final int Widget_Material_Light_DropDownItem_Spinner = 16974505; // 0x10302a9
    field public static final int Widget_Material_Light_EditText = 16974506; // 0x10302aa
    field public static final int Widget_Material_Light_ExpandableListView = 16974507; // 0x10302ab
    field public static final int Widget_Material_Light_FastScroll = 16974508; // 0x10302ac
    field public static final int Widget_Material_Light_GridView = 16974509; // 0x10302ad
    field public static final int Widget_Material_Light_HorizontalScrollView = 16974510; // 0x10302ae
    field public static final int Widget_Material_Light_ImageButton = 16974511; // 0x10302af
    field public static final int Widget_Material_Light_ListPopupWindow = 16974512; // 0x10302b0
    field public static final int Widget_Material_Light_ListView = 16974513; // 0x10302b1
    field public static final int Widget_Material_Light_ListView_DropDown = 16974514; // 0x10302b2
    field public static final int Widget_Material_Light_MediaRouteButton = 16974515; // 0x10302b3
    field public static final int Widget_Material_Light_PopupMenu = 16974516; // 0x10302b4
    field public static final int Widget_Material_Light_PopupMenu_Overflow = 16974517; // 0x10302b5
    field public static final int Widget_Material_Light_PopupWindow = 16974518; // 0x10302b6
    field public static final int Widget_Material_Light_ProgressBar = 16974519; // 0x10302b7
    field public static final int Widget_Material_Light_ProgressBar_Horizontal = 16974520; // 0x10302b8
    field public static final int Widget_Material_Light_ProgressBar_Inverse = 16974521; // 0x10302b9
    field public static final int Widget_Material_Light_ProgressBar_Large = 16974522; // 0x10302ba
    field public static final int Widget_Material_Light_ProgressBar_Large_Inverse = 16974523; // 0x10302bb
    field public static final int Widget_Material_Light_ProgressBar_Small = 16974524; // 0x10302bc
    field public static final int Widget_Material_Light_ProgressBar_Small_Inverse = 16974525; // 0x10302bd
    field public static final int Widget_Material_Light_ProgressBar_Small_Title = 16974526; // 0x10302be
    field public static final int Widget_Material_Light_RatingBar = 16974527; // 0x10302bf
    field public static final int Widget_Material_Light_RatingBar_Indicator = 16974528; // 0x10302c0
    field public static final int Widget_Material_Light_RatingBar_Small = 16974529; // 0x10302c1
    field public static final int Widget_Material_Light_ScrollView = 16974530; // 0x10302c2
    field public static final int Widget_Material_Light_SearchView = 16974531; // 0x10302c3
    field public static final int Widget_Material_Light_SeekBar = 16974532; // 0x10302c4
    field public static final int Widget_Material_Light_SegmentedButton = 16974533; // 0x10302c5
    field public static final int Widget_Material_Light_Spinner = 16974535; // 0x10302c7
    field public static final int Widget_Material_Light_Spinner_Underlined = 16974536; // 0x10302c8
    field public static final int Widget_Material_Light_StackView = 16974534; // 0x10302c6
    field public static final int Widget_Material_Light_Tab = 16974537; // 0x10302c9
    field public static final int Widget_Material_Light_TabWidget = 16974538; // 0x10302ca
    field public static final int Widget_Material_Light_TextView = 16974539; // 0x10302cb
    field public static final int Widget_Material_Light_TextView_SpinnerItem = 16974540; // 0x10302cc
    field public static final int Widget_Material_Light_TimePicker = 16974541; // 0x10302cd
    field public static final int Widget_Material_Light_WebTextView = 16974542; // 0x10302ce
    field public static final int Widget_Material_Light_WebView = 16974543; // 0x10302cf
    field public static final int Widget_Material_ListPopupWindow = 16974447; // 0x103026f
    field public static final int Widget_Material_ListView = 16974448; // 0x1030270
    field public static final int Widget_Material_ListView_DropDown = 16974449; // 0x1030271
    field public static final int Widget_Material_MediaRouteButton = 16974450; // 0x1030272
    field public static final int Widget_Material_PopupMenu = 16974451; // 0x1030273
    field public static final int Widget_Material_PopupMenu_Overflow = 16974452; // 0x1030274
    field public static final int Widget_Material_PopupWindow = 16974453; // 0x1030275
    field public static final int Widget_Material_ProgressBar = 16974454; // 0x1030276
    field public static final int Widget_Material_ProgressBar_Horizontal = 16974455; // 0x1030277
    field public static final int Widget_Material_ProgressBar_Large = 16974456; // 0x1030278
    field public static final int Widget_Material_ProgressBar_Small = 16974457; // 0x1030279
    field public static final int Widget_Material_ProgressBar_Small_Title = 16974458; // 0x103027a
    field public static final int Widget_Material_RatingBar = 16974459; // 0x103027b
    field public static final int Widget_Material_RatingBar_Indicator = 16974460; // 0x103027c
    field public static final int Widget_Material_RatingBar_Small = 16974461; // 0x103027d
    field public static final int Widget_Material_ScrollView = 16974462; // 0x103027e
    field public static final int Widget_Material_SearchView = 16974463; // 0x103027f
    field public static final int Widget_Material_SeekBar = 16974464; // 0x1030280
    field public static final int Widget_Material_SegmentedButton = 16974465; // 0x1030281
    field public static final int Widget_Material_Spinner = 16974467; // 0x1030283
    field public static final int Widget_Material_Spinner_Underlined = 16974468; // 0x1030284
    field public static final int Widget_Material_StackView = 16974466; // 0x1030282
    field public static final int Widget_Material_Tab = 16974469; // 0x1030285
    field public static final int Widget_Material_TabWidget = 16974470; // 0x1030286
    field public static final int Widget_Material_TextView = 16974471; // 0x1030287
    field public static final int Widget_Material_TextView_SpinnerItem = 16974472; // 0x1030288
    field public static final int Widget_Material_TimePicker = 16974473; // 0x1030289
    field public static final int Widget_Material_Toolbar = 16974474; // 0x103028a
    field public static final int Widget_Material_Toolbar_Button_Navigation = 16974475; // 0x103028b
    field public static final int Widget_Material_WebTextView = 16974476; // 0x103028c
    field public static final int Widget_Material_WebView = 16974477; // 0x103028d
    field public static final int Widget_PopupMenu = 16973958; // 0x1030086
    field public static final int Widget_PopupWindow = 16973878; // 0x1030036
    field public static final int Widget_ProgressBar = 16973852; // 0x103001c
    field public static final int Widget_ProgressBar_Horizontal = 16973855; // 0x103001f
    field public static final int Widget_ProgressBar_Inverse = 16973915; // 0x103005b
    field public static final int Widget_ProgressBar_Large = 16973853; // 0x103001d
    field public static final int Widget_ProgressBar_Large_Inverse = 16973916; // 0x103005c
    field public static final int Widget_ProgressBar_Small = 16973854; // 0x103001e
    field public static final int Widget_ProgressBar_Small_Inverse = 16973917; // 0x103005d
    field public static final int Widget_RatingBar = 16973857; // 0x1030021
    field public static final int Widget_ScrollView = 16973869; // 0x103002d
    field public static final int Widget_SeekBar = 16973856; // 0x1030020
    field public static final int Widget_Spinner = 16973864; // 0x1030028
    field public static final int Widget_Spinner_DropDown = 16973955; // 0x1030083
    field public static final int Widget_StackView = 16974310; // 0x10301e6
    field public static final int Widget_TabWidget = 16973876; // 0x1030034
    field public static final int Widget_TextView = 16973858; // 0x1030022
    field public static final int Widget_TextView_PopupMenu = 16973865; // 0x1030029
    field public static final int Widget_TextView_SpinnerItem = 16973866; // 0x103002a
    field public static final int Widget_Toolbar = 16974311; // 0x10301e7
    field public static final int Widget_Toolbar_Button_Navigation = 16974312; // 0x10301e8
    field public static final int Widget_WebView = 16973875; // 0x1030033
  }

  public static final class R.transition {
    ctor public R.transition();
    field public static final int explode = 17760259; // 0x10f0003
    field public static final int fade = 17760258; // 0x10f0002
    field public static final int move = 17760257; // 0x10f0001
    field public static final int no_transition = 17760256; // 0x10f0000
    field public static final int slide_bottom = 17760260; // 0x10f0004
    field public static final int slide_left = 17760263; // 0x10f0007
    field public static final int slide_right = 17760262; // 0x10f0006
    field public static final int slide_top = 17760261; // 0x10f0005
  }

  public static final class R.xml {
    ctor public R.xml();
  }

}

package android.accessibilityservice {

  public abstract class AccessibilityService extends android.app.Service {
    ctor public AccessibilityService();
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
    method public final android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
    method public java.util.List<android.view.accessibility.AccessibilityWindowInfo> getWindows();
    method public abstract void onAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public final android.os.IBinder onBind(android.content.Intent);
    method protected boolean onGesture(int);
    method public abstract void onInterrupt();
    method protected boolean onKeyEvent(android.view.KeyEvent);
    method protected void onServiceConnected();
    method public final boolean performGlobalAction(int);
    method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo);
    field public static final int GESTURE_SWIPE_DOWN = 2; // 0x2
    field public static final int GESTURE_SWIPE_DOWN_AND_LEFT = 15; // 0xf
    field public static final int GESTURE_SWIPE_DOWN_AND_RIGHT = 16; // 0x10
    field public static final int GESTURE_SWIPE_DOWN_AND_UP = 8; // 0x8
    field public static final int GESTURE_SWIPE_LEFT = 3; // 0x3
    field public static final int GESTURE_SWIPE_LEFT_AND_DOWN = 10; // 0xa
    field public static final int GESTURE_SWIPE_LEFT_AND_RIGHT = 5; // 0x5
    field public static final int GESTURE_SWIPE_LEFT_AND_UP = 9; // 0x9
    field public static final int GESTURE_SWIPE_RIGHT = 4; // 0x4
    field public static final int GESTURE_SWIPE_RIGHT_AND_DOWN = 12; // 0xc
    field public static final int GESTURE_SWIPE_RIGHT_AND_LEFT = 6; // 0x6
    field public static final int GESTURE_SWIPE_RIGHT_AND_UP = 11; // 0xb
    field public static final int GESTURE_SWIPE_UP = 1; // 0x1
    field public static final int GESTURE_SWIPE_UP_AND_DOWN = 7; // 0x7
    field public static final int GESTURE_SWIPE_UP_AND_LEFT = 13; // 0xd
    field public static final int GESTURE_SWIPE_UP_AND_RIGHT = 14; // 0xe
    field public static final int GLOBAL_ACTION_BACK = 1; // 0x1
    field public static final int GLOBAL_ACTION_HOME = 2; // 0x2
    field public static final int GLOBAL_ACTION_NOTIFICATIONS = 4; // 0x4
    field public static final int GLOBAL_ACTION_POWER_DIALOG = 6; // 0x6
    field public static final int GLOBAL_ACTION_QUICK_SETTINGS = 5; // 0x5
    field public static final int GLOBAL_ACTION_RECENTS = 3; // 0x3
    field public static final java.lang.String SERVICE_INTERFACE = "android.accessibilityservice.AccessibilityService";
    field public static final java.lang.String SERVICE_META_DATA = "android.accessibilityservice";
  }

  public class AccessibilityServiceInfo implements android.os.Parcelable {
    ctor public AccessibilityServiceInfo();
    method public static java.lang.String capabilityToString(int);
    method public int describeContents();
    method public static java.lang.String feedbackTypeToString(int);
    method public static java.lang.String flagToString(int);
    method public deprecated boolean getCanRetrieveWindowContent();
    method public int getCapabilities();
    method public deprecated java.lang.String getDescription();
    method public java.lang.String getId();
    method public android.content.pm.ResolveInfo getResolveInfo();
    method public java.lang.String getSettingsActivityName();
    method public java.lang.String loadDescription(android.content.pm.PackageManager);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4
    field public static final int CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS = 8; // 0x8
    field public static final int CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION = 2; // 0x2
    field public static final int CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT = 1; // 0x1
    field public static final android.os.Parcelable.Creator<android.accessibilityservice.AccessibilityServiceInfo> CREATOR;
    field public static final int DEFAULT = 1; // 0x1
    field public static final int FEEDBACK_ALL_MASK = -1; // 0xffffffff
    field public static final int FEEDBACK_AUDIBLE = 4; // 0x4
    field public static final int FEEDBACK_BRAILLE = 32; // 0x20
    field public static final int FEEDBACK_GENERIC = 16; // 0x10
    field public static final int FEEDBACK_HAPTIC = 2; // 0x2
    field public static final int FEEDBACK_SPOKEN = 1; // 0x1
    field public static final int FEEDBACK_VISUAL = 8; // 0x8
    field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
    field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
    field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
    field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20
    field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4
    field public static final int FLAG_RETRIEVE_INTERACTIVE_WINDOWS = 64; // 0x40
    field public int eventTypes;
    field public int feedbackType;
    field public int flags;
    field public long notificationTimeout;
    field public java.lang.String[] packageNames;
  }

}

package android.accounts {

  public abstract class AbstractAccountAuthenticator {
    ctor public AbstractAccountAuthenticator(android.content.Context);
    method public abstract android.os.Bundle addAccount(android.accounts.AccountAuthenticatorResponse, java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle) throws android.accounts.NetworkErrorException;
    method public android.os.Bundle addAccountFromCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
    method public abstract android.os.Bundle confirmCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
    method public abstract android.os.Bundle editProperties(android.accounts.AccountAuthenticatorResponse, java.lang.String);
    method public android.os.Bundle getAccountCredentialsForCloning(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
    method public android.os.Bundle getAccountRemovalAllowed(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
    method public abstract android.os.Bundle getAuthToken(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
    method public abstract java.lang.String getAuthTokenLabel(java.lang.String);
    method public final android.os.IBinder getIBinder();
    method public abstract android.os.Bundle hasFeatures(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String[]) throws android.accounts.NetworkErrorException;
    method public abstract android.os.Bundle updateCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
  }

  public class Account implements android.os.Parcelable {
    ctor public Account(java.lang.String, java.lang.String);
    ctor public Account(android.os.Parcel);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.accounts.Account> CREATOR;
    field public final java.lang.String name;
    field public final java.lang.String type;
  }

  public class AccountAuthenticatorActivity extends android.app.Activity {
    ctor public AccountAuthenticatorActivity();
    method public final void setAccountAuthenticatorResult(android.os.Bundle);
  }

  public class AccountAuthenticatorResponse implements android.os.Parcelable {
    ctor public AccountAuthenticatorResponse(android.os.Parcel);
    method public int describeContents();
    method public void onError(int, java.lang.String);
    method public void onRequestContinued();
    method public void onResult(android.os.Bundle);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.accounts.AccountAuthenticatorResponse> CREATOR;
  }

  public class AccountManager {
    method public boolean accountAuthenticated(android.accounts.Account);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle);
    method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean);
    method public java.lang.String blockingGetAuthToken(android.accounts.Account, java.lang.String, boolean) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
    method public void clearPassword(android.accounts.Account);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public static android.accounts.AccountManager get(android.content.Context);
    method public android.accounts.Account[] getAccounts();
    method public android.accounts.Account[] getAccountsByType(java.lang.String);
    method public android.accounts.AccountManagerFuture<android.accounts.Account[]> getAccountsByTypeAndFeatures(java.lang.String, java.lang.String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler);
    method public android.accounts.Account[] getAccountsByTypeForPackage(java.lang.String, java.lang.String);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public deprecated android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthTokenByFeatures(java.lang.String, java.lang.String, java.lang.String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public android.accounts.AuthenticatorDescription[] getAuthenticatorTypes();
    method public java.lang.String getPassword(android.accounts.Account);
    method public java.lang.String getPreviousName(android.accounts.Account);
    method public java.lang.String getUserData(android.accounts.Account, java.lang.String);
    method public android.accounts.AccountManagerFuture<java.lang.Boolean> hasFeatures(android.accounts.Account, java.lang.String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
    method public void invalidateAuthToken(java.lang.String, java.lang.String);
    method public static android.content.Intent newChooseAccountIntent(android.accounts.Account, java.util.ArrayList<android.accounts.Account>, java.lang.String[], boolean, java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle);
    method public java.lang.String peekAuthToken(android.accounts.Account, java.lang.String);
    method public deprecated android.accounts.AccountManagerFuture<java.lang.Boolean> removeAccount(android.accounts.Account, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> removeAccount(android.accounts.Account, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    method public boolean removeAccountExplicitly(android.accounts.Account);
    method public void removeOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener);
    method public android.accounts.AccountManagerFuture<android.accounts.Account> renameAccount(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler);
    method public void setAuthToken(android.accounts.Account, java.lang.String, java.lang.String);
    method public void setPassword(android.accounts.Account, java.lang.String);
    method public void setUserData(android.accounts.Account, java.lang.String, java.lang.String);
    method public android.accounts.AccountManagerFuture<android.os.Bundle> updateCredentials(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
    field public static final java.lang.String ACTION_AUTHENTICATOR_INTENT = "android.accounts.AccountAuthenticator";
    field public static final java.lang.String AUTHENTICATOR_ATTRIBUTES_NAME = "account-authenticator";
    field public static final java.lang.String AUTHENTICATOR_META_DATA_NAME = "android.accounts.AccountAuthenticator";
    field public static final int ERROR_CODE_BAD_ARGUMENTS = 7; // 0x7
    field public static final int ERROR_CODE_BAD_AUTHENTICATION = 9; // 0x9
    field public static final int ERROR_CODE_BAD_REQUEST = 8; // 0x8
    field public static final int ERROR_CODE_CANCELED = 4; // 0x4
    field public static final int ERROR_CODE_INVALID_RESPONSE = 5; // 0x5
    field public static final int ERROR_CODE_NETWORK_ERROR = 3; // 0x3
    field public static final int ERROR_CODE_REMOTE_EXCEPTION = 1; // 0x1
    field public static final int ERROR_CODE_UNSUPPORTED_OPERATION = 6; // 0x6
    field public static final java.lang.String KEY_ACCOUNTS = "accounts";
    field public static final java.lang.String KEY_ACCOUNT_AUTHENTICATOR_RESPONSE = "accountAuthenticatorResponse";
    field public static final java.lang.String KEY_ACCOUNT_MANAGER_RESPONSE = "accountManagerResponse";
    field public static final java.lang.String KEY_ACCOUNT_NAME = "authAccount";
    field public static final java.lang.String KEY_ACCOUNT_TYPE = "accountType";
    field public static final java.lang.String KEY_ANDROID_PACKAGE_NAME = "androidPackageName";
    field public static final java.lang.String KEY_AUTHENTICATOR_TYPES = "authenticator_types";
    field public static final java.lang.String KEY_AUTHTOKEN = "authtoken";
    field public static final java.lang.String KEY_AUTH_FAILED_MESSAGE = "authFailedMessage";
    field public static final java.lang.String KEY_AUTH_TOKEN_LABEL = "authTokenLabelKey";
    field public static final java.lang.String KEY_BOOLEAN_RESULT = "booleanResult";
    field public static final java.lang.String KEY_CALLER_PID = "callerPid";
    field public static final java.lang.String KEY_CALLER_UID = "callerUid";
    field public static final java.lang.String KEY_ERROR_CODE = "errorCode";
    field public static final java.lang.String KEY_ERROR_MESSAGE = "errorMessage";
    field public static final java.lang.String KEY_INTENT = "intent";
    field public static final java.lang.String KEY_LAST_AUTHENTICATE_TIME_MILLIS_EPOCH = "lastAuthenticatedTimeMillisEpoch";
    field public static final java.lang.String KEY_PASSWORD = "password";
    field public static final java.lang.String KEY_USERDATA = "userdata";
    field public static final java.lang.String LOGIN_ACCOUNTS_CHANGED_ACTION = "android.accounts.LOGIN_ACCOUNTS_CHANGED";
  }

  public abstract interface AccountManagerCallback {
    method public abstract void run(android.accounts.AccountManagerFuture<V>);
  }

  public abstract interface AccountManagerFuture {
    method public abstract boolean cancel(boolean);
    method public abstract V getResult() throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
    method public abstract V getResult(long, java.util.concurrent.TimeUnit) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
    method public abstract boolean isCancelled();
    method public abstract boolean isDone();
  }

  public class AccountsException extends java.lang.Exception {
    ctor public AccountsException();
    ctor public AccountsException(java.lang.String);
    ctor public AccountsException(java.lang.String, java.lang.Throwable);
    ctor public AccountsException(java.lang.Throwable);
  }

  public class AuthenticatorDescription implements android.os.Parcelable {
    ctor public AuthenticatorDescription(java.lang.String, java.lang.String, int, int, int, int, boolean);
    ctor public AuthenticatorDescription(java.lang.String, java.lang.String, int, int, int, int);
    method public int describeContents();
    method public static android.accounts.AuthenticatorDescription newKey(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.accounts.AuthenticatorDescription> CREATOR;
    field public final int accountPreferencesId;
    field public final boolean customTokens;
    field public final int iconId;
    field public final int labelId;
    field public final java.lang.String packageName;
    field public final int smallIconId;
    field public final java.lang.String type;
  }

  public class AuthenticatorException extends android.accounts.AccountsException {
    ctor public AuthenticatorException();
    ctor public AuthenticatorException(java.lang.String);
    ctor public AuthenticatorException(java.lang.String, java.lang.Throwable);
    ctor public AuthenticatorException(java.lang.Throwable);
  }

  public class NetworkErrorException extends android.accounts.AccountsException {
    ctor public NetworkErrorException();
    ctor public NetworkErrorException(java.lang.String);
    ctor public NetworkErrorException(java.lang.String, java.lang.Throwable);
    ctor public NetworkErrorException(java.lang.Throwable);
  }

  public abstract interface OnAccountsUpdateListener {
    method public abstract void onAccountsUpdated(android.accounts.Account[]);
  }

  public class OperationCanceledException extends android.accounts.AccountsException {
    ctor public OperationCanceledException();
    ctor public OperationCanceledException(java.lang.String);
    ctor public OperationCanceledException(java.lang.String, java.lang.Throwable);
    ctor public OperationCanceledException(java.lang.Throwable);
  }

}

package android.animation {

  public abstract class Animator implements java.lang.Cloneable {
    ctor public Animator();
    method public void addListener(android.animation.Animator.AnimatorListener);
    method public void addPauseListener(android.animation.Animator.AnimatorPauseListener);
    method public void cancel();
    method public android.animation.Animator clone();
    method public void end();
    method public long getDistanceBasedDuration();
    method public abstract long getDuration();
    method public android.animation.TimeInterpolator getInterpolator();
    method public java.util.ArrayList<android.animation.Animator.AnimatorListener> getListeners();
    method public abstract long getStartDelay();
    method public boolean isPaused();
    method public abstract boolean isRunning();
    method public boolean isStarted();
    method public void pause();
    method public void removeAllListeners();
    method public void removeListener(android.animation.Animator.AnimatorListener);
    method public void removePauseListener(android.animation.Animator.AnimatorPauseListener);
    method public void resume();
    method public abstract android.animation.Animator setDuration(long);
    method public void setDurationScaleHint(int, android.content.res.Resources);
    method public abstract void setInterpolator(android.animation.TimeInterpolator);
    method public abstract void setStartDelay(long);
    method public void setTarget(java.lang.Object);
    method public void setupEndValues();
    method public void setupStartValues();
    method public void start();
    field public static final int HINT_DISTANCE_DEFINED_IN_DP = 2; // 0x2
    field public static final int HINT_DISTANCE_PROPORTIONAL_TO_SCREEN_SIZE = 1; // 0x1
    field public static final int HINT_NO_SCALE = 0; // 0x0
  }

  public static abstract interface Animator.AnimatorListener {
    method public abstract void onAnimationCancel(android.animation.Animator);
    method public abstract void onAnimationEnd(android.animation.Animator);
    method public abstract void onAnimationRepeat(android.animation.Animator);
    method public abstract void onAnimationStart(android.animation.Animator);
  }

  public static abstract interface Animator.AnimatorPauseListener {
    method public abstract void onAnimationPause(android.animation.Animator);
    method public abstract void onAnimationResume(android.animation.Animator);
  }

  public class AnimatorInflater {
    ctor public AnimatorInflater();
    method public static android.animation.Animator loadAnimator(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
    method public static android.animation.StateListAnimator loadStateListAnimator(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
  }

  public abstract class AnimatorListenerAdapter implements android.animation.Animator.AnimatorListener android.animation.Animator.AnimatorPauseListener {
    ctor public AnimatorListenerAdapter();
    method public void onAnimationCancel(android.animation.Animator);
    method public void onAnimationEnd(android.animation.Animator);
    method public void onAnimationPause(android.animation.Animator);
    method public void onAnimationRepeat(android.animation.Animator);
    method public void onAnimationResume(android.animation.Animator);
    method public void onAnimationStart(android.animation.Animator);
  }

  public final class AnimatorSet extends android.animation.Animator {
    ctor public AnimatorSet();
    method public java.util.ArrayList<android.animation.Animator> getChildAnimations();
    method public long getDuration();
    method public long getStartDelay();
    method public boolean isRunning();
    method public android.animation.AnimatorSet.Builder play(android.animation.Animator);
    method public void playSequentially(android.animation.Animator...);
    method public void playSequentially(java.util.List<android.animation.Animator>);
    method public void playTogether(android.animation.Animator...);
    method public void playTogether(java.util.Collection<android.animation.Animator>);
    method public android.animation.AnimatorSet setDuration(long);
    method public void setInterpolator(android.animation.TimeInterpolator);
    method public void setStartDelay(long);
  }

  public class AnimatorSet.Builder {
    method public android.animation.AnimatorSet.Builder after(android.animation.Animator);
    method public android.animation.AnimatorSet.Builder after(long);
    method public android.animation.AnimatorSet.Builder before(android.animation.Animator);
    method public android.animation.AnimatorSet.Builder with(android.animation.Animator);
  }

  public class ArgbEvaluator implements android.animation.TypeEvaluator {
    ctor public ArgbEvaluator();
    method public java.lang.Object evaluate(float, java.lang.Object, java.lang.Object);
  }

  public abstract class BidirectionalTypeConverter extends android.animation.TypeConverter {
    ctor public BidirectionalTypeConverter(java.lang.Class<T>, java.lang.Class<V>);
    method public abstract T convertBack(V);
    method public android.animation.BidirectionalTypeConverter<V, T> invert();
  }

  public class FloatArrayEvaluator implements android.animation.TypeEvaluator {
    ctor public FloatArrayEvaluator();
    ctor public FloatArrayEvaluator(float[]);
    method public float[] evaluate(float, float[], float[]);
  }

  public class FloatEvaluator implements android.animation.TypeEvaluator {
    ctor public FloatEvaluator();
    method public java.lang.Float evaluate(float, java.lang.Number, java.lang.Number);
  }

  public class IntArrayEvaluator implements android.animation.TypeEvaluator {
    ctor public IntArrayEvaluator();
    ctor public IntArrayEvaluator(int[]);
    method public int[] evaluate(float, int[], int[]);
  }

  public class IntEvaluator implements android.animation.TypeEvaluator {
    ctor public IntEvaluator();
    method public java.lang.Integer evaluate(float, java.lang.Integer, java.lang.Integer);
  }

  public abstract class Keyframe implements java.lang.Cloneable {
    ctor public Keyframe();
    method public abstract android.animation.Keyframe clone();
    method public float getFraction();
    method public android.animation.TimeInterpolator getInterpolator();
    method public java.lang.Class getType();
    method public abstract java.lang.Object getValue();
    method public boolean hasValue();
    method public static android.animation.Keyframe ofFloat(float, float);
    method public static android.animation.Keyframe ofFloat(float);
    method public static android.animation.Keyframe ofInt(float, int);
    method public static android.animation.Keyframe ofInt(float);
    method public static android.animation.Keyframe ofObject(float, java.lang.Object);
    method public static android.animation.Keyframe ofObject(float);
    method public void setFraction(float);
    method public void setInterpolator(android.animation.TimeInterpolator);
    method public abstract void setValue(java.lang.Object);
  }

  public class LayoutTransition {
    ctor public LayoutTransition();
    method public void addChild(android.view.ViewGroup, android.view.View);
    method public void addTransitionListener(android.animation.LayoutTransition.TransitionListener);
    method public void disableTransitionType(int);
    method public void enableTransitionType(int);
    method public android.animation.Animator getAnimator(int);
    method public long getDuration(int);
    method public android.animation.TimeInterpolator getInterpolator(int);
    method public long getStagger(int);
    method public long getStartDelay(int);
    method public java.util.List<android.animation.LayoutTransition.TransitionListener> getTransitionListeners();
    method public deprecated void hideChild(android.view.ViewGroup, android.view.View);
    method public void hideChild(android.view.ViewGroup, android.view.View, int);
    method public boolean isChangingLayout();
    method public boolean isRunning();
    method public boolean isTransitionTypeEnabled(int);
    method public void removeChild(android.view.ViewGroup, android.view.View);
    method public void removeTransitionListener(android.animation.LayoutTransition.TransitionListener);
    method public void setAnimateParentHierarchy(boolean);
    method public void setAnimator(int, android.animation.Animator);
    method public void setDuration(long);
    method public void setDuration(int, long);
    method public void setInterpolator(int, android.animation.TimeInterpolator);
    method public void setStagger(int, long);
    method public void setStartDelay(int, long);
    method public deprecated void showChild(android.view.ViewGroup, android.view.View);
    method public void showChild(android.view.ViewGroup, android.view.View, int);
    field public static final int APPEARING = 2; // 0x2
    field public static final int CHANGE_APPEARING = 0; // 0x0
    field public static final int CHANGE_DISAPPEARING = 1; // 0x1
    field public static final int CHANGING = 4; // 0x4
    field public static final int DISAPPEARING = 3; // 0x3
  }

  public static abstract interface LayoutTransition.TransitionListener {
    method public abstract void endTransition(android.animation.LayoutTransition, android.view.ViewGroup, android.view.View, int);
    method public abstract void startTransition(android.animation.LayoutTransition, android.view.ViewGroup, android.view.View, int);
  }

  public final class ObjectAnimator extends android.animation.ValueAnimator {
    ctor public ObjectAnimator();
    method public java.lang.String getPropertyName();
    method public java.lang.Object getTarget();
    method public static android.animation.ObjectAnimator ofArgb(java.lang.Object, java.lang.String, int...);
    method public static android.animation.ObjectAnimator ofArgb(T, android.util.Property<T, java.lang.Integer>, int...);
    method public static android.animation.ObjectAnimator ofFloat(java.lang.Object, java.lang.String, float...);
    method public static android.animation.ObjectAnimator ofFloat(java.lang.Object, java.lang.String, java.lang.String, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofFloat(T, android.util.Property<T, java.lang.Float>, float...);
    method public static android.animation.ObjectAnimator ofFloat(T, android.util.Property<T, java.lang.Float>, android.util.Property<T, java.lang.Float>, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofInt(java.lang.Object, java.lang.String, int...);
    method public static android.animation.ObjectAnimator ofInt(java.lang.Object, java.lang.String, java.lang.String, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofInt(T, android.util.Property<T, java.lang.Integer>, int...);
    method public static android.animation.ObjectAnimator ofInt(T, android.util.Property<T, java.lang.Integer>, android.util.Property<T, java.lang.Integer>, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, float[][]);
    method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, android.animation.TypeConverter<T, float[]>, android.animation.TypeEvaluator<T>, T...);
    method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, int[][]);
    method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, android.animation.TypeConverter<T, int[]>, android.animation.TypeEvaluator<T>, T...);
    method public static android.animation.ObjectAnimator ofObject(java.lang.Object, java.lang.String, android.animation.TypeEvaluator, java.lang.Object...);
    method public static android.animation.ObjectAnimator ofObject(java.lang.Object, java.lang.String, android.animation.TypeConverter<android.graphics.PointF, ?>, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofObject(T, android.util.Property<T, V>, android.animation.TypeEvaluator<V>, V...);
    method public static android.animation.ObjectAnimator ofObject(T, android.util.Property<T, P>, android.animation.TypeConverter<V, P>, android.animation.TypeEvaluator<V>, V...);
    method public static android.animation.ObjectAnimator ofObject(T, android.util.Property<T, V>, android.animation.TypeConverter<android.graphics.PointF, V>, android.graphics.Path);
    method public static android.animation.ObjectAnimator ofPropertyValuesHolder(java.lang.Object, android.animation.PropertyValuesHolder...);
    method public void setAutoCancel(boolean);
    method public void setProperty(android.util.Property);
    method public void setPropertyName(java.lang.String);
  }

  public class PointFEvaluator implements android.animation.TypeEvaluator {
    ctor public PointFEvaluator();
    ctor public PointFEvaluator(android.graphics.PointF);
    method public android.graphics.PointF evaluate(float, android.graphics.PointF, android.graphics.PointF);
  }

  public class PropertyValuesHolder implements java.lang.Cloneable {
    method public android.animation.PropertyValuesHolder clone();
    method public java.lang.String getPropertyName();
    method public static android.animation.PropertyValuesHolder ofFloat(java.lang.String, float...);
    method public static android.animation.PropertyValuesHolder ofFloat(android.util.Property<?, java.lang.Float>, float...);
    method public static android.animation.PropertyValuesHolder ofInt(java.lang.String, int...);
    method public static android.animation.PropertyValuesHolder ofInt(android.util.Property<?, java.lang.Integer>, int...);
    method public static android.animation.PropertyValuesHolder ofKeyframe(java.lang.String, android.animation.Keyframe...);
    method public static android.animation.PropertyValuesHolder ofKeyframe(android.util.Property, android.animation.Keyframe...);
    method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, float[][]);
    method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.graphics.Path);
    method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.animation.TypeConverter<V, float[]>, android.animation.TypeEvaluator<V>, V...);
    method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.animation.TypeConverter<T, float[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
    method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, int[][]);
    method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.graphics.Path);
    method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.animation.TypeConverter<V, int[]>, android.animation.TypeEvaluator<V>, V...);
    method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.animation.TypeConverter<T, int[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
    method public static android.animation.PropertyValuesHolder ofObject(java.lang.String, android.animation.TypeEvaluator, java.lang.Object...);
    method public static android.animation.PropertyValuesHolder ofObject(java.lang.String, android.animation.TypeConverter<android.graphics.PointF, ?>, android.graphics.Path);
    method public static android.animation.PropertyValuesHolder ofObject(android.util.Property, android.animation.TypeEvaluator<V>, V...);
    method public static android.animation.PropertyValuesHolder ofObject(android.util.Property<?, V>, android.animation.TypeConverter<T, V>, android.animation.TypeEvaluator<T>, T...);
    method public static android.animation.PropertyValuesHolder ofObject(android.util.Property<?, V>, android.animation.TypeConverter<android.graphics.PointF, V>, android.graphics.Path);
    method public void setConverter(android.animation.TypeConverter);
    method public void setEvaluator(android.animation.TypeEvaluator);
    method public void setFloatValues(float...);
    method public void setIntValues(int...);
    method public void setKeyframes(android.animation.Keyframe...);
    method public void setObjectValues(java.lang.Object...);
    method public void setProperty(android.util.Property);
    method public void setPropertyName(java.lang.String);
  }

  public class RectEvaluator implements android.animation.TypeEvaluator {
    ctor public RectEvaluator();
    ctor public RectEvaluator(android.graphics.Rect);
    method public android.graphics.Rect evaluate(float, android.graphics.Rect, android.graphics.Rect);
  }

  public class StateListAnimator implements java.lang.Cloneable {
    ctor public StateListAnimator();
    method public void addState(int[], android.animation.Animator);
    method public android.animation.StateListAnimator clone();
    method public void jumpToCurrentState();
  }

  public class TimeAnimator extends android.animation.ValueAnimator {
    ctor public TimeAnimator();
    method public void setTimeListener(android.animation.TimeAnimator.TimeListener);
  }

  public static abstract interface TimeAnimator.TimeListener {
    method public abstract void onTimeUpdate(android.animation.TimeAnimator, long, long);
  }

  public abstract interface TimeInterpolator {
    method public abstract float getInterpolation(float);
  }

  public abstract class TypeConverter {
    ctor public TypeConverter(java.lang.Class<T>, java.lang.Class<V>);
    method public abstract V convert(T);
  }

  public abstract interface TypeEvaluator {
    method public abstract T evaluate(float, T, T);
  }

  public class ValueAnimator extends android.animation.Animator {
    ctor public ValueAnimator();
    method public void addUpdateListener(android.animation.ValueAnimator.AnimatorUpdateListener);
    method public float getAnimatedFraction();
    method public java.lang.Object getAnimatedValue();
    method public java.lang.Object getAnimatedValue(java.lang.String);
    method public long getCurrentPlayTime();
    method public long getDuration();
    method public static long getFrameDelay();
    method public int getRepeatCount();
    method public int getRepeatMode();
    method public long getStartDelay();
    method public android.animation.PropertyValuesHolder[] getValues();
    method public boolean isRunning();
    method public static android.animation.ValueAnimator ofArgb(int...);
    method public static android.animation.ValueAnimator ofFloat(float...);
    method public static android.animation.ValueAnimator ofInt(int...);
    method public static android.animation.ValueAnimator ofObject(android.animation.TypeEvaluator, java.lang.Object...);
    method public static android.animation.ValueAnimator ofPropertyValuesHolder(android.animation.PropertyValuesHolder...);
    method public void removeAllUpdateListeners();
    method public void removeUpdateListener(android.animation.ValueAnimator.AnimatorUpdateListener);
    method public void reverse();
    method public void setCurrentFraction(float);
    method public void setCurrentPlayTime(long);
    method public android.animation.ValueAnimator setDuration(long);
    method public void setEvaluator(android.animation.TypeEvaluator);
    method public void setFloatValues(float...);
    method public static void setFrameDelay(long);
    method public void setIntValues(int...);
    method public void setInterpolator(android.animation.TimeInterpolator);
    method public void setObjectValues(java.lang.Object...);
    method public void setRepeatCount(int);
    method public void setRepeatMode(int);
    method public void setStartDelay(long);
    method public void setValues(android.animation.PropertyValuesHolder...);
    field public static final int INFINITE = -1; // 0xffffffff
    field public static final int RESTART = 1; // 0x1
    field public static final int REVERSE = 2; // 0x2
  }

  public static abstract interface ValueAnimator.AnimatorUpdateListener {
    method public abstract void onAnimationUpdate(android.animation.ValueAnimator);
  }

}

package android.annotation {

  public abstract class SuppressLint implements java.lang.annotation.Annotation {
  }

  public abstract class TargetApi implements java.lang.annotation.Annotation {
  }

}

package android.app {

  public abstract class ActionBar {
    ctor public ActionBar();
    method public abstract void addOnMenuVisibilityListener(android.app.ActionBar.OnMenuVisibilityListener);
    method public abstract deprecated void addTab(android.app.ActionBar.Tab);
    method public abstract deprecated void addTab(android.app.ActionBar.Tab, boolean);
    method public abstract deprecated void addTab(android.app.ActionBar.Tab, int);
    method public abstract deprecated void addTab(android.app.ActionBar.Tab, int, boolean);
    method public abstract android.view.View getCustomView();
    method public abstract int getDisplayOptions();
    method public float getElevation();
    method public abstract int getHeight();
    method public int getHideOffset();
    method public abstract deprecated int getNavigationItemCount();
    method public abstract deprecated int getNavigationMode();
    method public abstract deprecated int getSelectedNavigationIndex();
    method public abstract deprecated android.app.ActionBar.Tab getSelectedTab();
    method public abstract java.lang.CharSequence getSubtitle();
    method public abstract deprecated android.app.ActionBar.Tab getTabAt(int);
    method public abstract deprecated int getTabCount();
    method public android.content.Context getThemedContext();
    method public abstract java.lang.CharSequence getTitle();
    method public abstract void hide();
    method public boolean isHideOnContentScrollEnabled();
    method public abstract boolean isShowing();
    method public abstract deprecated android.app.ActionBar.Tab newTab();
    method public abstract deprecated void removeAllTabs();
    method public abstract void removeOnMenuVisibilityListener(android.app.ActionBar.OnMenuVisibilityListener);
    method public abstract deprecated void removeTab(android.app.ActionBar.Tab);
    method public abstract deprecated void removeTabAt(int);
    method public abstract deprecated void selectTab(android.app.ActionBar.Tab);
    method public abstract void setBackgroundDrawable(android.graphics.drawable.Drawable);
    method public abstract void setCustomView(android.view.View);
    method public abstract void setCustomView(android.view.View, android.app.ActionBar.LayoutParams);
    method public abstract void setCustomView(int);
    method public abstract void setDisplayHomeAsUpEnabled(boolean);
    method public abstract void setDisplayOptions(int);
    method public abstract void setDisplayOptions(int, int);
    method public abstract void setDisplayShowCustomEnabled(boolean);
    method public abstract void setDisplayShowHomeEnabled(boolean);
    method public abstract void setDisplayShowTitleEnabled(boolean);
    method public abstract void setDisplayUseLogoEnabled(boolean);
    method public void setElevation(float);
    method public void setHideOffset(int);
    method public void setHideOnContentScrollEnabled(boolean);
    method public void setHomeActionContentDescription(java.lang.CharSequence);
    method public void setHomeActionContentDescription(int);
    method public void setHomeAsUpIndicator(android.graphics.drawable.Drawable);
    method public void setHomeAsUpIndicator(int);
    method public void setHomeButtonEnabled(boolean);
    method public abstract void setIcon(int);
    method public abstract void setIcon(android.graphics.drawable.Drawable);
    method public abstract deprecated void setListNavigationCallbacks(android.widget.SpinnerAdapter, android.app.ActionBar.OnNavigationListener);
    method public abstract void setLogo(int);
    method public abstract void setLogo(android.graphics.drawable.Drawable);
    method public abstract deprecated void setNavigationMode(int);
    method public abstract deprecated void setSelectedNavigationItem(int);
    method public void setSplitBackgroundDrawable(android.graphics.drawable.Drawable);
    method public void setStackedBackgroundDrawable(android.graphics.drawable.Drawable);
    method public abstract void setSubtitle(java.lang.CharSequence);
    method public abstract void setSubtitle(int);
    method public abstract void setTitle(java.lang.CharSequence);
    method public abstract void setTitle(int);
    method public abstract void show();
    field public static final int DISPLAY_HOME_AS_UP = 4; // 0x4
    field public static final int DISPLAY_SHOW_CUSTOM = 16; // 0x10
    field public static final int DISPLAY_SHOW_HOME = 2; // 0x2
    field public static final int DISPLAY_SHOW_TITLE = 8; // 0x8
    field public static final int DISPLAY_USE_LOGO = 1; // 0x1
    field public static final deprecated int NAVIGATION_MODE_LIST = 1; // 0x1
    field public static final deprecated int NAVIGATION_MODE_STANDARD = 0; // 0x0
    field public static final deprecated int NAVIGATION_MODE_TABS = 2; // 0x2
  }

  public static class ActionBar.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
    ctor public ActionBar.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public ActionBar.LayoutParams(int, int);
    ctor public ActionBar.LayoutParams(int, int, int);
    ctor public ActionBar.LayoutParams(int);
    ctor public ActionBar.LayoutParams(android.app.ActionBar.LayoutParams);
    ctor public ActionBar.LayoutParams(android.view.ViewGroup.LayoutParams);
    field public int gravity;
  }

  public static abstract interface ActionBar.OnMenuVisibilityListener {
    method public abstract void onMenuVisibilityChanged(boolean);
  }

  public static abstract deprecated interface ActionBar.OnNavigationListener {
    method public abstract boolean onNavigationItemSelected(int, long);
  }

  public static abstract deprecated class ActionBar.Tab {
    ctor public ActionBar.Tab();
    method public abstract java.lang.CharSequence getContentDescription();
    method public abstract android.view.View getCustomView();
    method public abstract android.graphics.drawable.Drawable getIcon();
    method public abstract int getPosition();
    method public abstract java.lang.Object getTag();
    method public abstract java.lang.CharSequence getText();
    method public abstract void select();
    method public abstract android.app.ActionBar.Tab setContentDescription(int);
    method public abstract android.app.ActionBar.Tab setContentDescription(java.lang.CharSequence);
    method public abstract android.app.ActionBar.Tab setCustomView(android.view.View);
    method public abstract android.app.ActionBar.Tab setCustomView(int);
    method public abstract android.app.ActionBar.Tab setIcon(android.graphics.drawable.Drawable);
    method public abstract android.app.ActionBar.Tab setIcon(int);
    method public abstract android.app.ActionBar.Tab setTabListener(android.app.ActionBar.TabListener);
    method public abstract android.app.ActionBar.Tab setTag(java.lang.Object);
    method public abstract android.app.ActionBar.Tab setText(java.lang.CharSequence);
    method public abstract android.app.ActionBar.Tab setText(int);
    field public static final int INVALID_POSITION = -1; // 0xffffffff
  }

  public static abstract deprecated interface ActionBar.TabListener {
    method public abstract void onTabReselected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
    method public abstract void onTabSelected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
    method public abstract void onTabUnselected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
  }

  public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback {
    ctor public Activity();
    method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public void closeContextMenu();
    method public void closeOptionsMenu();
    method public android.app.PendingIntent createPendingResult(int, android.content.Intent, int);
    method public final deprecated void dismissDialog(int);
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method public boolean dispatchKeyEvent(android.view.KeyEvent);
    method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent);
    method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public android.view.View findViewById(int);
    method public void finish();
    method public void finishActivity(int);
    method public void finishActivityFromChild(android.app.Activity, int);
    method public void finishAffinity();
    method public void finishAfterTransition();
    method public void finishAndRemoveTask();
    method public void finishFromChild(android.app.Activity);
    method public android.app.ActionBar getActionBar();
    method public final android.app.Application getApplication();
    method public android.content.ComponentName getCallingActivity();
    method public java.lang.String getCallingPackage();
    method public int getChangingConfigurations();
    method public android.content.ComponentName getComponentName();
    method public android.transition.Scene getContentScene();
    method public android.transition.TransitionManager getContentTransitionManager();
    method public android.view.View getCurrentFocus();
    method public android.app.FragmentManager getFragmentManager();
    method public android.content.Intent getIntent();
    method public deprecated java.lang.Object getLastNonConfigurationInstance();
    method public android.view.LayoutInflater getLayoutInflater();
    method public android.app.LoaderManager getLoaderManager();
    method public java.lang.String getLocalClassName();
    method public final android.media.session.MediaController getMediaController();
    method public android.view.MenuInflater getMenuInflater();
    method public final android.app.Activity getParent();
    method public android.content.Intent getParentActivityIntent();
    method public android.content.SharedPreferences getPreferences(int);
    method public android.net.Uri getReferrer();
    method public int getRequestedOrientation();
    method public final android.view.SearchEvent getSearchEvent();
    method public int getTaskId();
    method public final java.lang.CharSequence getTitle();
    method public final int getTitleColor();
    method public android.app.VoiceInteractor getVoiceInteractor();
    method public final int getVolumeControlStream();
    method public android.view.Window getWindow();
    method public android.view.WindowManager getWindowManager();
    method public boolean hasWindowFocus();
    method public void invalidateOptionsMenu();
    method public boolean isChangingConfigurations();
    method public final boolean isChild();
    method public boolean isDestroyed();
    method public boolean isFinishing();
    method public boolean isImmersive();
    method public boolean isTaskRoot();
    method public boolean isVoiceInteraction();
    method public final deprecated android.database.Cursor managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public boolean moveTaskToBack(boolean);
    method public boolean navigateUpTo(android.content.Intent);
    method public boolean navigateUpToFromChild(android.app.Activity, android.content.Intent);
    method public void onActionModeFinished(android.view.ActionMode);
    method public void onActionModeStarted(android.view.ActionMode);
    method public void onActivityReenter(int, android.content.Intent);
    method protected void onActivityResult(int, int, android.content.Intent);
    method public void onAttachFragment(android.app.Fragment);
    method public void onAttachedToWindow();
    method public void onBackPressed();
    method protected void onChildTitleChanged(android.app.Activity, java.lang.CharSequence);
    method public void onConfigurationChanged(android.content.res.Configuration);
    method public void onContentChanged();
    method public boolean onContextItemSelected(android.view.MenuItem);
    method public void onContextMenuClosed(android.view.Menu);
    method protected void onCreate(android.os.Bundle);
    method public void onCreate(android.os.Bundle, android.os.PersistableBundle);
    method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
    method public java.lang.CharSequence onCreateDescription();
    method protected deprecated android.app.Dialog onCreateDialog(int);
    method protected deprecated android.app.Dialog onCreateDialog(int, android.os.Bundle);
    method public void onCreateNavigateUpTaskStack(android.app.TaskStackBuilder);
    method public boolean onCreateOptionsMenu(android.view.Menu);
    method public boolean onCreatePanelMenu(int, android.view.Menu);
    method public android.view.View onCreatePanelView(int);
    method public boolean onCreateThumbnail(android.graphics.Bitmap, android.graphics.Canvas);
    method public android.view.View onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet);
    method public android.view.View onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet);
    method protected void onDestroy();
    method public void onDetachedFromWindow();
    method public void onEnterAnimationComplete();
    method public boolean onGenericMotionEvent(android.view.MotionEvent);
    method public boolean onKeyDown(int, android.view.KeyEvent);
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyShortcut(int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public void onLowMemory();
    method public boolean onMenuItemSelected(int, android.view.MenuItem);
    method public boolean onMenuOpened(int, android.view.Menu);
    method public boolean onNavigateUp();
    method public boolean onNavigateUpFromChild(android.app.Activity);
    method protected void onNewIntent(android.content.Intent);
    method public boolean onOptionsItemSelected(android.view.MenuItem);
    method public void onOptionsMenuClosed(android.view.Menu);
    method public void onPanelClosed(int, android.view.Menu);
    method protected void onPause();
    method protected void onPostCreate(android.os.Bundle);
    method public void onPostCreate(android.os.Bundle, android.os.PersistableBundle);
    method protected void onPostResume();
    method protected deprecated void onPrepareDialog(int, android.app.Dialog);
    method protected deprecated void onPrepareDialog(int, android.app.Dialog, android.os.Bundle);
    method public void onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder);
    method public boolean onPrepareOptionsMenu(android.view.Menu);
    method public boolean onPreparePanel(int, android.view.View, android.view.Menu);
    method public void onProvideAssistContent(android.app.AssistContent);
    method public void onProvideAssistData(android.os.Bundle);
    method public void onRequestPermissionsResult(int, java.lang.String[], int[]);
    method protected void onRestart();
    method protected void onRestoreInstanceState(android.os.Bundle);
    method public void onRestoreInstanceState(android.os.Bundle, android.os.PersistableBundle);
    method protected void onResume();
    method public deprecated java.lang.Object onRetainNonConfigurationInstance();
    method protected void onSaveInstanceState(android.os.Bundle);
    method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle);
    method public boolean onSearchRequested(android.view.SearchEvent);
    method public boolean onSearchRequested();
    method protected void onStart();
    method protected void onStop();
    method protected void onTitleChanged(java.lang.CharSequence, int);
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public boolean onTrackballEvent(android.view.MotionEvent);
    method public void onTrimMemory(int);
    method public void onUserInteraction();
    method protected void onUserLeaveHint();
    method public void onVisibleBehindCanceled();
    method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams);
    method public void onWindowFocusChanged(boolean);
    method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
    method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
    method public void openContextMenu(android.view.View);
    method public void openOptionsMenu();
    method public void overridePendingTransition(int, int);
    method public void postponeEnterTransition();
    method public void recreate();
    method public void registerForContextMenu(android.view.View);
    method public boolean releaseInstance();
    method public final deprecated void removeDialog(int);
    method public void reportFullyDrawn();
    method public final void requestPermissions(java.lang.String[], int);
    method public boolean requestVisibleBehind(boolean);
    method public final boolean requestWindowFeature(int);
    method public final void runOnUiThread(java.lang.Runnable);
    method public void setActionBar(android.widget.Toolbar);
    method public void setContentTransitionManager(android.transition.TransitionManager);
    method public void setContentView(int);
    method public void setContentView(android.view.View);
    method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public final void setDefaultKeyMode(int);
    method public void setEnterSharedElementCallback(android.app.SharedElementCallback);
    method public void setExitSharedElementCallback(android.app.SharedElementCallback);
    method public final void setFeatureDrawable(int, android.graphics.drawable.Drawable);
    method public final void setFeatureDrawableAlpha(int, int);
    method public final void setFeatureDrawableResource(int, int);
    method public final void setFeatureDrawableUri(int, android.net.Uri);
    method public void setFinishOnTouchOutside(boolean);
    method public void setImmersive(boolean);
    method public void setIntent(android.content.Intent);
    method public final void setMediaController(android.media.session.MediaController);
    method public final void setProgress(int);
    method public final void setProgressBarIndeterminate(boolean);
    method public final void setProgressBarIndeterminateVisibility(boolean);
    method public final void setProgressBarVisibility(boolean);
    method public void setRequestedOrientation(int);
    method public final void setResult(int);
    method public final void setResult(int, android.content.Intent);
    method public final void setSecondaryProgress(int);
    method public void setTaskDescription(android.app.ActivityManager.TaskDescription);
    method public void setTitle(java.lang.CharSequence);
    method public void setTitle(int);
    method public deprecated void setTitleColor(int);
    method public void setVisible(boolean);
    method public final void setVolumeControlStream(int);
    method public boolean shouldUpRecreateTask(android.content.Intent);
    method public final deprecated void showDialog(int);
    method public final deprecated boolean showDialog(int, android.os.Bundle);
    method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback);
    method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback, int);
    method public void startActivityForResult(android.content.Intent, int);
    method public void startActivityForResult(android.content.Intent, int, android.os.Bundle);
    method public void startActivityFromChild(android.app.Activity, android.content.Intent, int);
    method public void startActivityFromChild(android.app.Activity, android.content.Intent, int, android.os.Bundle);
    method public void startActivityFromFragment(android.app.Fragment, android.content.Intent, int);
    method public void startActivityFromFragment(android.app.Fragment, android.content.Intent, int, android.os.Bundle);
    method public boolean startActivityIfNeeded(android.content.Intent, int);
    method public boolean startActivityIfNeeded(android.content.Intent, int, android.os.Bundle);
    method public void startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public void startLockTask();
    method public deprecated void startManagingCursor(android.database.Cursor);
    method public boolean startNextMatchingActivity(android.content.Intent);
    method public boolean startNextMatchingActivity(android.content.Intent, android.os.Bundle);
    method public void startPostponedEnterTransition();
    method public void startSearch(java.lang.String, boolean, android.os.Bundle, boolean);
    method public void stopLockTask();
    method public deprecated void stopManagingCursor(android.database.Cursor);
    method public void takeKeyEvents(boolean);
    method public void triggerSearch(java.lang.String, android.os.Bundle);
    method public void unregisterForContextMenu(android.view.View);
    field public static final int DEFAULT_KEYS_DIALER = 1; // 0x1
    field public static final int DEFAULT_KEYS_DISABLE = 0; // 0x0
    field public static final int DEFAULT_KEYS_SEARCH_GLOBAL = 4; // 0x4
    field public static final int DEFAULT_KEYS_SEARCH_LOCAL = 3; // 0x3
    field public static final int DEFAULT_KEYS_SHORTCUT = 2; // 0x2
    field protected static final int[] FOCUSED_STATE_SET;
    field public static final int RESULT_CANCELED = 0; // 0x0
    field public static final int RESULT_FIRST_USER = 1; // 0x1
    field public static final int RESULT_OK = -1; // 0xffffffff
  }

  public deprecated class ActivityGroup extends android.app.Activity {
    ctor public ActivityGroup();
    ctor public ActivityGroup(boolean);
    method public android.app.Activity getCurrentActivity();
    method public final android.app.LocalActivityManager getLocalActivityManager();
  }

  public class ActivityManager {
    method public int addAppTask(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap);
    method public boolean clearApplicationUserData();
    method public void clearWatchHeapLimit();
    method public void dumpPackageState(java.io.FileDescriptor, java.lang.String);
    method public android.util.Size getAppTaskThumbnailSize();
    method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks();
    method public android.content.pm.ConfigurationInfo getDeviceConfigurationInfo();
    method public int getLargeMemoryClass();
    method public int getLauncherLargeIconDensity();
    method public int getLauncherLargeIconSize();
    method public int getLockTaskModeState();
    method public int getMemoryClass();
    method public void getMemoryInfo(android.app.ActivityManager.MemoryInfo);
    method public static void getMyMemoryState(android.app.ActivityManager.RunningAppProcessInfo);
    method public android.os.Debug.MemoryInfo[] getProcessMemoryInfo(int[]);
    method public java.util.List<android.app.ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
    method public deprecated java.util.List<android.app.ActivityManager.RecentTaskInfo> getRecentTasks(int, int) throws java.lang.SecurityException;
    method public java.util.List<android.app.ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
    method public android.app.PendingIntent getRunningServiceControlPanel(android.content.ComponentName) throws java.lang.SecurityException;
    method public java.util.List<android.app.ActivityManager.RunningServiceInfo> getRunningServices(int) throws java.lang.SecurityException;
    method public deprecated java.util.List<android.app.ActivityManager.RunningTaskInfo> getRunningTasks(int) throws java.lang.SecurityException;
    method public deprecated boolean isInLockTaskMode();
    method public boolean isLowRamDevice();
    method public static boolean isRunningInTestHarness();
    method public static boolean isUserAMonkey();
    method public void killBackgroundProcesses(java.lang.String);
    method public void moveTaskToFront(int, int);
    method public void moveTaskToFront(int, int, android.os.Bundle);
    method public deprecated void restartPackage(java.lang.String);
    method public void setWatchHeapLimit(long);
    field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT";
    field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1
    field public static final int LOCK_TASK_MODE_NONE = 0; // 0x0
    field public static final int LOCK_TASK_MODE_PINNED = 2; // 0x2
    field public static final java.lang.String META_HOME_ALTERNATE = "android.app.home.alternate";
    field public static final int MOVE_TASK_NO_USER_ACTION = 2; // 0x2
    field public static final int MOVE_TASK_WITH_HOME = 1; // 0x1
    field public static final int RECENT_IGNORE_UNAVAILABLE = 2; // 0x2
    field public static final int RECENT_WITH_EXCLUDED = 1; // 0x1
  }

  public static class ActivityManager.AppTask {
    method public void finishAndRemoveTask();
    method public android.app.ActivityManager.RecentTaskInfo getTaskInfo();
    method public void moveToFront();
    method public void setExcludeFromRecents(boolean);
    method public void startActivity(android.content.Context, android.content.Intent, android.os.Bundle);
  }

  public static class ActivityManager.MemoryInfo implements android.os.Parcelable {
    ctor public ActivityManager.MemoryInfo();
    method public int describeContents();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.ActivityManager.MemoryInfo> CREATOR;
    field public long availMem;
    field public boolean lowMemory;
    field public long threshold;
    field public long totalMem;
  }

  public static class ActivityManager.ProcessErrorStateInfo implements android.os.Parcelable {
    ctor public ActivityManager.ProcessErrorStateInfo();
    method public int describeContents();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CRASHED = 1; // 0x1
    field public static final android.os.Parcelable.Creator<android.app.ActivityManager.ProcessErrorStateInfo> CREATOR;
    field public static final int NOT_RESPONDING = 2; // 0x2
    field public static final int NO_ERROR = 0; // 0x0
    field public int condition;
    field public byte[] crashData;
    field public java.lang.String longMsg;
    field public int pid;
    field public java.lang.String processName;
    field public java.lang.String shortMsg;
    field public java.lang.String stackTrace;
    field public java.lang.String tag;
    field public int uid;
  }

  public static class ActivityManager.RecentTaskInfo implements android.os.Parcelable {
    ctor public ActivityManager.RecentTaskInfo();
    method public int describeContents();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RecentTaskInfo> CREATOR;
    field public int affiliatedTaskId;
    field public android.content.Intent baseIntent;
    field public java.lang.CharSequence description;
    field public int id;
    field public android.content.ComponentName origActivity;
    field public int persistentId;
    field public android.app.ActivityManager.TaskDescription taskDescription;
  }

  public static class ActivityManager.RunningAppProcessInfo implements android.os.Parcelable {
    ctor public ActivityManager.RunningAppProcessInfo();
    ctor public ActivityManager.RunningAppProcessInfo(java.lang.String, int, java.lang.String[]);
    method public int describeContents();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningAppProcessInfo> CREATOR;
    field public static final int IMPORTANCE_BACKGROUND = 400; // 0x190
    field public static final int IMPORTANCE_EMPTY = 500; // 0x1f4
    field public static final int IMPORTANCE_FOREGROUND = 100; // 0x64
    field public static final int IMPORTANCE_GONE = 1000; // 0x3e8
    field public static final int IMPORTANCE_PERCEPTIBLE = 130; // 0x82
    field public static final int IMPORTANCE_SERVICE = 300; // 0x12c
    field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8
    field public static final int REASON_PROVIDER_IN_USE = 1; // 0x1
    field public static final int REASON_SERVICE_IN_USE = 2; // 0x2
    field public static final int REASON_UNKNOWN = 0; // 0x0
    field public int importance;
    field public int importanceReasonCode;
    field public android.content.ComponentName importanceReasonComponent;
    field public int importanceReasonPid;
    field public int lastTrimLevel;
    field public int lru;
    field public int pid;
    field public java.lang.String[] pkgList;
    field public java.lang.String processName;
    field public int uid;
  }

  public static class ActivityManager.RunningServiceInfo implements android.os.Parcelable {
    ctor public ActivityManager.RunningServiceInfo();
    method public int describeContents();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningServiceInfo> CREATOR;
    field public static final int FLAG_FOREGROUND = 2; // 0x2
    field public static final int FLAG_PERSISTENT_PROCESS = 8; // 0x8
    field public static final int FLAG_STARTED = 1; // 0x1
    field public static final int FLAG_SYSTEM_PROCESS = 4; // 0x4
    field public long activeSince;
    field public int clientCount;
    field public int clientLabel;
    field public java.lang.String clientPackage;
    field public int crashCount;
    field public int flags;
    field public boolean foreground;
    field public long lastActivityTime;
    field public int pid;
    field public java.lang.String process;
    field public long restarting;
    field public android.content.ComponentName service;
    field public boolean started;
    field public int uid;
  }

  public static class ActivityManager.RunningTaskInfo implements android.os.Parcelable {
    ctor public ActivityManager.RunningTaskInfo();
    method public int describeContents();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningTaskInfo> CREATOR;
    field public android.content.ComponentName baseActivity;
    field public java.lang.CharSequence description;
    field public int id;
    field public int numActivities;
    field public int numRunning;
    field public android.graphics.Bitmap thumbnail;
    field public android.content.ComponentName topActivity;
  }

  public static class ActivityManager.TaskDescription implements android.os.Parcelable {
    ctor public ActivityManager.TaskDescription(java.lang.String, android.graphics.Bitmap, int);
    ctor public ActivityManager.TaskDescription(java.lang.String, android.graphics.Bitmap);
    ctor public ActivityManager.TaskDescription(java.lang.String);
    ctor public ActivityManager.TaskDescription();
    ctor public ActivityManager.TaskDescription(android.app.ActivityManager.TaskDescription);
    method public int describeContents();
    method public android.graphics.Bitmap getIcon();
    method public java.lang.String getLabel();
    method public int getPrimaryColor();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.ActivityManager.TaskDescription> CREATOR;
  }

  public class ActivityOptions {
    method public static android.app.ActivityOptions makeClipRevealAnimation(android.view.View, int, int, int, int);
    method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int);
    method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int);
    method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String);
    method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.util.Pair<android.view.View, java.lang.String>...);
    method public static android.app.ActivityOptions makeTaskLaunchBehind();
    method public static android.app.ActivityOptions makeThumbnailScaleUpAnimation(android.view.View, android.graphics.Bitmap, int, int);
    method public android.os.Bundle toBundle();
    method public void update(android.app.ActivityOptions);
  }

  public class AlarmManager {
    method public void cancel(android.app.PendingIntent);
    method public android.app.AlarmManager.AlarmClockInfo getNextAlarmClock();
    method public void set(int, long, android.app.PendingIntent);
    method public void setAlarmClock(android.app.AlarmManager.AlarmClockInfo, android.app.PendingIntent);
    method public void setExact(int, long, android.app.PendingIntent);
    method public void setInexactRepeating(int, long, long, android.app.PendingIntent);
    method public void setRepeating(int, long, long, android.app.PendingIntent);
    method public void setTime(long);
    method public void setTimeZone(java.lang.String);
    method public void setWindow(int, long, long, android.app.PendingIntent);
    field public static final java.lang.String ACTION_NEXT_ALARM_CLOCK_CHANGED = "android.app.action.NEXT_ALARM_CLOCK_CHANGED";
    field public static final int ELAPSED_REALTIME = 3; // 0x3
    field public static final int ELAPSED_REALTIME_WAKEUP = 2; // 0x2
    field public static final long INTERVAL_DAY = 86400000L; // 0x5265c00L
    field public static final long INTERVAL_FIFTEEN_MINUTES = 900000L; // 0xdbba0L
    field public static final long INTERVAL_HALF_DAY = 43200000L; // 0x2932e00L
    field public static final long INTERVAL_HALF_HOUR = 1800000L; // 0x1b7740L
    field public static final long INTERVAL_HOUR = 3600000L; // 0x36ee80L
    field public static final int RTC = 1; // 0x1
    field public static final int RTC_WAKEUP = 0; // 0x0
  }

  public static final class AlarmManager.AlarmClockInfo implements android.os.Parcelable {
    ctor public AlarmManager.AlarmClockInfo(long, android.app.PendingIntent);
    method public int describeContents();
    method public android.app.PendingIntent getShowIntent();
    method public long getTriggerTime();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.AlarmManager.AlarmClockInfo> CREATOR;
  }

  public class AlertDialog extends android.app.Dialog implements android.content.DialogInterface {
    ctor protected AlertDialog(android.content.Context);
    ctor protected AlertDialog(android.content.Context, boolean, android.content.DialogInterface.OnCancelListener);
    ctor protected AlertDialog(android.content.Context, int);
    method public android.widget.Button getButton(int);
    method public android.widget.ListView getListView();
    method public void setButton(int, java.lang.CharSequence, android.os.Message);
    method public void setButton(int, java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
    method public deprecated void setButton(java.lang.CharSequence, android.os.Message);
    method public deprecated void setButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
    method public deprecated void setButton2(java.lang.CharSequence, android.os.Message);
    method public deprecated void setButton2(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
    method public deprecated void setButton3(java.lang.CharSequence, android.os.Message);
    method public deprecated void setButton3(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
    method public void setCustomTitle(android.view.View);
    method public void setIcon(int);
    method public void setIcon(android.graphics.drawable.Drawable);
    method public void setIconAttribute(int);
    method public void setInverseBackgroundForced(boolean);
    method public void setMessage(java.lang.CharSequence);
    method public void setView(android.view.View);
    method public void setView(android.view.View, int, int, int, int);
    field public static final deprecated int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
    field public static final deprecated int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
    field public static final deprecated int THEME_HOLO_DARK = 2; // 0x2
    field public static final deprecated int THEME_HOLO_LIGHT = 3; // 0x3
    field public static final deprecated int THEME_TRADITIONAL = 1; // 0x1
  }

  public static class AlertDialog.Builder {
    ctor public AlertDialog.Builder(android.content.Context);
    ctor public AlertDialog.Builder(android.content.Context, int);
    method public android.app.AlertDialog create();
    method public android.content.Context getContext();
    method public android.app.AlertDialog.Builder setAdapter(android.widget.ListAdapter, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setCancelable(boolean);
    method public android.app.AlertDialog.Builder setCursor(android.database.Cursor, android.content.DialogInterface.OnClickListener, java.lang.String);
    method public android.app.AlertDialog.Builder setCustomTitle(android.view.View);
    method public android.app.AlertDialog.Builder setIcon(int);
    method public android.app.AlertDialog.Builder setIcon(android.graphics.drawable.Drawable);
    method public android.app.AlertDialog.Builder setIconAttribute(int);
    method public deprecated android.app.AlertDialog.Builder setInverseBackgroundForced(boolean);
    method public android.app.AlertDialog.Builder setItems(int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setItems(java.lang.CharSequence[], android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setMessage(int);
    method public android.app.AlertDialog.Builder setMessage(java.lang.CharSequence);
    method public android.app.AlertDialog.Builder setMultiChoiceItems(int, boolean[], android.content.DialogInterface.OnMultiChoiceClickListener);
    method public android.app.AlertDialog.Builder setMultiChoiceItems(java.lang.CharSequence[], boolean[], android.content.DialogInterface.OnMultiChoiceClickListener);
    method public android.app.AlertDialog.Builder setMultiChoiceItems(android.database.Cursor, java.lang.String, java.lang.String, android.content.DialogInterface.OnMultiChoiceClickListener);
    method public android.app.AlertDialog.Builder setNegativeButton(int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setNegativeButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setNeutralButton(int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setNeutralButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setOnCancelListener(android.content.DialogInterface.OnCancelListener);
    method public android.app.AlertDialog.Builder setOnDismissListener(android.content.DialogInterface.OnDismissListener);
    method public android.app.AlertDialog.Builder setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener);
    method public android.app.AlertDialog.Builder setOnKeyListener(android.content.DialogInterface.OnKeyListener);
    method public android.app.AlertDialog.Builder setPositiveButton(int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setPositiveButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setSingleChoiceItems(int, int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setSingleChoiceItems(android.database.Cursor, int, java.lang.String, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setSingleChoiceItems(java.lang.CharSequence[], int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setSingleChoiceItems(android.widget.ListAdapter, int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setTitle(int);
    method public android.app.AlertDialog.Builder setTitle(java.lang.CharSequence);
    method public android.app.AlertDialog.Builder setView(int);
    method public android.app.AlertDialog.Builder setView(android.view.View);
    method public android.app.AlertDialog show();
  }

  public class AliasActivity extends android.app.Activity {
    ctor public AliasActivity();
  }

  public class AppOpsManager {
    method public int checkOp(java.lang.String, int, java.lang.String);
    method public int checkOpNoThrow(java.lang.String, int, java.lang.String);
    method public void checkPackage(int, java.lang.String);
    method public void finishOp(java.lang.String, int, java.lang.String);
    method public int noteOp(java.lang.String, int, java.lang.String);
    method public int noteOpNoThrow(java.lang.String, int, java.lang.String);
    method public int startOp(java.lang.String, int, java.lang.String);
    method public int startOpNoThrow(java.lang.String, int, java.lang.String);
    method public void startWatchingMode(java.lang.String, java.lang.String, android.app.AppOpsManager.OnOpChangedListener);
    method public void stopWatchingMode(android.app.AppOpsManager.OnOpChangedListener);
    field public static final int MODE_ALLOWED = 0; // 0x0
    field public static final int MODE_DEFAULT = 3; // 0x3
    field public static final int MODE_ERRORED = 2; // 0x2
    field public static final int MODE_IGNORED = 1; // 0x1
    field public static final java.lang.String OPSTR_COARSE_LOCATION = "android:coarse_location";
    field public static final java.lang.String OPSTR_FINE_LOCATION = "android:fine_location";
    field public static final java.lang.String OPSTR_GET_USAGE_STATS = "android:get_usage_stats";
    field public static final java.lang.String OPSTR_MONITOR_HIGH_POWER_LOCATION = "android:monitor_location_high_power";
    field public static final java.lang.String OPSTR_MONITOR_LOCATION = "android:monitor_location";
  }

  public static abstract interface AppOpsManager.OnOpChangedListener {
    method public abstract void onOpChanged(java.lang.String, java.lang.String);
  }

  public class Application extends android.content.ContextWrapper implements android.content.ComponentCallbacks2 {
    ctor public Application();
    method public void onConfigurationChanged(android.content.res.Configuration);
    method public void onCreate();
    method public void onLowMemory();
    method public void onTerminate();
    method public void onTrimMemory(int);
    method public void registerActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks);
    method public void registerOnProvideAssistDataListener(android.app.Application.OnProvideAssistDataListener);
    method public void unregisterActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks);
    method public void unregisterOnProvideAssistDataListener(android.app.Application.OnProvideAssistDataListener);
  }

  public static abstract interface Application.ActivityLifecycleCallbacks {
    method public abstract void onActivityCreated(android.app.Activity, android.os.Bundle);
    method public abstract void onActivityDestroyed(android.app.Activity);
    method public abstract void onActivityPaused(android.app.Activity);
    method public abstract void onActivityResumed(android.app.Activity);
    method public abstract void onActivitySaveInstanceState(android.app.Activity, android.os.Bundle);
    method public abstract void onActivityStarted(android.app.Activity);
    method public abstract void onActivityStopped(android.app.Activity);
  }

  public static abstract interface Application.OnProvideAssistDataListener {
    method public abstract void onProvideAssistData(android.app.Activity, android.os.Bundle);
  }

  public class ApplicationErrorReport implements android.os.Parcelable {
    ctor public ApplicationErrorReport();
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public static android.content.ComponentName getErrorReportReceiver(android.content.Context, java.lang.String, int);
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.ApplicationErrorReport> CREATOR;
    field public static final int TYPE_ANR = 2; // 0x2
    field public static final int TYPE_BATTERY = 3; // 0x3
    field public static final int TYPE_CRASH = 1; // 0x1
    field public static final int TYPE_NONE = 0; // 0x0
    field public static final int TYPE_RUNNING_SERVICE = 5; // 0x5
    field public android.app.ApplicationErrorReport.AnrInfo anrInfo;
    field public android.app.ApplicationErrorReport.BatteryInfo batteryInfo;
    field public android.app.ApplicationErrorReport.CrashInfo crashInfo;
    field public java.lang.String installerPackageName;
    field public java.lang.String packageName;
    field public java.lang.String processName;
    field public android.app.ApplicationErrorReport.RunningServiceInfo runningServiceInfo;
    field public boolean systemApp;
    field public long time;
    field public int type;
  }

  public static class ApplicationErrorReport.AnrInfo {
    ctor public ApplicationErrorReport.AnrInfo();
    ctor public ApplicationErrorReport.AnrInfo(android.os.Parcel);
    method public void dump(android.util.Printer, java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public java.lang.String activity;
    field public java.lang.String cause;
    field public java.lang.String info;
  }

  public static class ApplicationErrorReport.BatteryInfo {
    ctor public ApplicationErrorReport.BatteryInfo();
    ctor public ApplicationErrorReport.BatteryInfo(android.os.Parcel);
    method public void dump(android.util.Printer, java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public java.lang.String checkinDetails;
    field public long durationMicros;
    field public java.lang.String usageDetails;
    field public int usagePercent;
  }

  public static class ApplicationErrorReport.CrashInfo {
    ctor public ApplicationErrorReport.CrashInfo();
    ctor public ApplicationErrorReport.CrashInfo(java.lang.Throwable);
    ctor public ApplicationErrorReport.CrashInfo(android.os.Parcel);
    method public void dump(android.util.Printer, java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public java.lang.String exceptionClassName;
    field public java.lang.String exceptionMessage;
    field public java.lang.String stackTrace;
    field public java.lang.String throwClassName;
    field public java.lang.String throwFileName;
    field public int throwLineNumber;
    field public java.lang.String throwMethodName;
  }

  public static class ApplicationErrorReport.RunningServiceInfo {
    ctor public ApplicationErrorReport.RunningServiceInfo();
    ctor public ApplicationErrorReport.RunningServiceInfo(android.os.Parcel);
    method public void dump(android.util.Printer, java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public long durationMillis;
    field public java.lang.String serviceDetails;
  }

  public final class AssistAction {
    method public static void updateAssistData(android.os.Bundle, android.os.Bundle);
    field public static final java.lang.String ASSIST_ACTION_KEY = "android:assist_action";
    field public static final java.lang.String KEY_ACTION_OBJECT = "object";
    field public static final java.lang.String KEY_ACTION_STATUS = "actionStatus";
    field public static final java.lang.String KEY_DESCRIPTION = "description";
    field public static final java.lang.String KEY_ID = "@id";
    field public static final java.lang.String KEY_NAME = "name";
    field public static final java.lang.String KEY_TYPE = "@type";
    field public static final java.lang.String KEY_URL = "url";
    field public static final java.lang.String STATUS_TYPE_ACTIVE = "ActiveActionStatus";
    field public static final java.lang.String STATUS_TYPE_COMPLETED = "CompletedActionStatus";
    field public static final java.lang.String TYPE_ADD_ACTION = "AddAction";
    field public static final java.lang.String TYPE_BOOKMARK_ACTION = "BookmarkAction";
    field public static final java.lang.String TYPE_LIKE_ACTION = "LikeAction";
    field public static final java.lang.String TYPE_LISTEN_ACTION = "ListenAction";
    field public static final java.lang.String TYPE_VIEW_ACTION = "ViewAction";
    field public static final java.lang.String TYPE_WANT_ACTION = "WantAction";
    field public static final java.lang.String TYPE_WATCH_ACTION = "WatchAction";
  }

  public static final class AssistAction.ActionBuilder {
    ctor public AssistAction.ActionBuilder();
    method public android.os.Bundle build();
    method public android.app.AssistAction.ActionBuilder set(java.lang.String, java.lang.String);
    method public android.app.AssistAction.ActionBuilder set(java.lang.String, android.os.Bundle);
    method public android.app.AssistAction.ActionBuilder setObject(android.os.Bundle);
    method public android.app.AssistAction.ActionBuilder setType(java.lang.String);
  }

  public static final class AssistAction.ThingBuilder {
    ctor public AssistAction.ThingBuilder();
    method public android.os.Bundle build();
    method public android.app.AssistAction.ThingBuilder set(java.lang.String, java.lang.String);
    method public android.app.AssistAction.ThingBuilder set(java.lang.String, android.os.Bundle);
    method public android.app.AssistAction.ThingBuilder setDescription(java.lang.String);
    method public android.app.AssistAction.ThingBuilder setId(java.lang.String);
    method public android.app.AssistAction.ThingBuilder setName(java.lang.String);
    method public android.app.AssistAction.ThingBuilder setType(java.lang.String);
    method public android.app.AssistAction.ThingBuilder setUrl(android.net.Uri);
  }

  public class AssistContent implements android.os.Parcelable {
    ctor public AssistContent();
    method public int describeContents();
    method public static android.app.AssistContent getAssistContent(android.os.Bundle);
    method public android.content.ClipData getClipData();
    method public android.content.Intent getIntent();
    method public void setClipData(android.content.ClipData);
    method public void setIntent(android.content.Intent);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String ASSIST_KEY = "android:assist_content";
    field public static final android.os.Parcelable.Creator<android.app.AssistContent> CREATOR;
  }

  public final class AssistStructure implements android.os.Parcelable {
    method public int describeContents();
    method public android.content.ComponentName getActivityComponent();
    method public static android.app.AssistStructure getAssistStructure(android.os.Bundle);
    method public android.app.AssistStructure.WindowNode getWindowNodeAt(int);
    method public int getWindowNodeCount();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String ASSIST_KEY = "android:assist_structure";
    field public static final android.os.Parcelable.Creator<android.app.AssistStructure> CREATOR;
  }

  public static class AssistStructure.ViewNode {
    method public android.app.AssistStructure.ViewNode getChildAt(int);
    method public int getChildCount();
    method public java.lang.String getClassName();
    method public java.lang.CharSequence getContentDescription();
    method public android.os.Bundle getExtras();
    method public int getHeight();
    method public java.lang.String getHint();
    method public int getId();
    method public java.lang.String getIdEntry();
    method public java.lang.String getIdPackage();
    method public java.lang.String getIdType();
    method public int getLeft();
    method public int getScrollX();
    method public int getScrollY();
    method public java.lang.CharSequence getText();
    method public int getTextBackgroundColor();
    method public int getTextColor();
    method public int getTextSelectionEnd();
    method public int getTextSelectionStart();
    method public float getTextSize();
    method public int getTextStyle();
    method public int getTop();
    method public int getVisibility();
    method public int getWidth();
    method public boolean isAccessibilityFocused();
    method public boolean isActivated();
    method public boolean isCheckable();
    method public boolean isChecked();
    method public boolean isClickable();
    method public boolean isEnabled();
    method public boolean isFocusable();
    method public boolean isFocused();
    method public boolean isLongClickable();
    method public boolean isSelected();
    field public static final int TEXT_COLOR_UNDEFINED = 1; // 0x1
    field public static final int TEXT_STYLE_BOLD = 1; // 0x1
    field public static final int TEXT_STYLE_ITALIC = 2; // 0x2
    field public static final int TEXT_STYLE_STRIKE_THRU = 8; // 0x8
    field public static final int TEXT_STYLE_UNDERLINE = 4; // 0x4
  }

  public static class AssistStructure.WindowNode {
    method public int getHeight();
    method public int getLeft();
    method public android.app.AssistStructure.ViewNode getRootViewNode();
    method public java.lang.CharSequence getTitle();
    method public int getTop();
    method public int getWidth();
  }

  public class DatePickerDialog extends android.app.AlertDialog implements android.widget.DatePicker.OnDateChangedListener android.content.DialogInterface.OnClickListener {
    ctor public DatePickerDialog(android.content.Context, android.app.DatePickerDialog.OnDateSetListener, int, int, int);
    ctor public DatePickerDialog(android.content.Context, int, android.app.DatePickerDialog.OnDateSetListener, int, int, int);
    method public android.widget.DatePicker getDatePicker();
    method public void onClick(android.content.DialogInterface, int);
    method public void onDateChanged(android.widget.DatePicker, int, int, int);
    method public void updateDate(int, int, int);
  }

  public static abstract interface DatePickerDialog.OnDateSetListener {
    method public abstract void onDateSet(android.widget.DatePicker, int, int, int);
  }

  public class Dialog implements android.content.DialogInterface android.view.KeyEvent.Callback android.view.View.OnCreateContextMenuListener android.view.Window.Callback {
    ctor public Dialog(android.content.Context);
    ctor public Dialog(android.content.Context, int);
    ctor protected Dialog(android.content.Context, boolean, android.content.DialogInterface.OnCancelListener);
    method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public void cancel();
    method public void closeOptionsMenu();
    method public void create();
    method public void dismiss();
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method public boolean dispatchKeyEvent(android.view.KeyEvent);
    method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent);
    method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public android.view.View findViewById(int);
    method public android.app.ActionBar getActionBar();
    method public final android.content.Context getContext();
    method public android.view.View getCurrentFocus();
    method public android.view.LayoutInflater getLayoutInflater();
    method public final android.app.Activity getOwnerActivity();
    method public final android.view.SearchEvent getSearchEvent();
    method public final int getVolumeControlStream();
    method public android.view.Window getWindow();
    method public void hide();
    method public void invalidateOptionsMenu();
    method public boolean isShowing();
    method public void onActionModeFinished(android.view.ActionMode);
    method public void onActionModeStarted(android.view.ActionMode);
    method public void onAttachedToWindow();
    method public void onBackPressed();
    method public void onContentChanged();
    method public boolean onContextItemSelected(android.view.MenuItem);
    method public void onContextMenuClosed(android.view.Menu);
    method protected void onCreate(android.os.Bundle);
    method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
    method public boolean onCreateOptionsMenu(android.view.Menu);
    method public boolean onCreatePanelMenu(int, android.view.Menu);
    method public android.view.View onCreatePanelView(int);
    method public void onDetachedFromWindow();
    method public boolean onGenericMotionEvent(android.view.MotionEvent);
    method public boolean onKeyDown(int, android.view.KeyEvent);
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyShortcut(int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public boolean onMenuItemSelected(int, android.view.MenuItem);
    method public boolean onMenuOpened(int, android.view.Menu);
    method public boolean onOptionsItemSelected(android.view.MenuItem);
    method public void onOptionsMenuClosed(android.view.Menu);
    method public void onPanelClosed(int, android.view.Menu);
    method public boolean onPrepareOptionsMenu(android.view.Menu);
    method public boolean onPreparePanel(int, android.view.View, android.view.Menu);
    method public void onRestoreInstanceState(android.os.Bundle);
    method public android.os.Bundle onSaveInstanceState();
    method public boolean onSearchRequested(android.view.SearchEvent);
    method public boolean onSearchRequested();
    method protected void onStart();
    method protected void onStop();
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public boolean onTrackballEvent(android.view.MotionEvent);
    method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams);
    method public void onWindowFocusChanged(boolean);
    method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
    method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
    method public void openContextMenu(android.view.View);
    method public void openOptionsMenu();
    method public void registerForContextMenu(android.view.View);
    method public final boolean requestWindowFeature(int);
    method public void setCancelMessage(android.os.Message);
    method public void setCancelable(boolean);
    method public void setCanceledOnTouchOutside(boolean);
    method public void setContentView(int);
    method public void setContentView(android.view.View);
    method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public void setDismissMessage(android.os.Message);
    method public final void setFeatureDrawable(int, android.graphics.drawable.Drawable);
    method public final void setFeatureDrawableAlpha(int, int);
    method public final void setFeatureDrawableResource(int, int);
    method public final void setFeatureDrawableUri(int, android.net.Uri);
    method public void setOnCancelListener(android.content.DialogInterface.OnCancelListener);
    method public void setOnDismissListener(android.content.DialogInterface.OnDismissListener);
    method public void setOnKeyListener(android.content.DialogInterface.OnKeyListener);
    method public void setOnShowListener(android.content.DialogInterface.OnShowListener);
    method public final void setOwnerActivity(android.app.Activity);
    method public void setTitle(java.lang.CharSequence);
    method public void setTitle(int);
    method public final void setVolumeControlStream(int);
    method public void show();
    method public void takeKeyEvents(boolean);
    method public void unregisterForContextMenu(android.view.View);
  }

  public class DialogFragment extends android.app.Fragment implements android.content.DialogInterface.OnCancelListener android.content.DialogInterface.OnDismissListener {
    ctor public DialogFragment();
    method public void dismiss();
    method public void dismissAllowingStateLoss();
    method public android.app.Dialog getDialog();
    method public boolean getShowsDialog();
    method public int getTheme();
    method public boolean isCancelable();
    method public void onCancel(android.content.DialogInterface);
    method public android.app.Dialog onCreateDialog(android.os.Bundle);
    method public void onDismiss(android.content.DialogInterface);
    method public void setCancelable(boolean);
    method public void setShowsDialog(boolean);
    method public void setStyle(int, int);
    method public void show(android.app.FragmentManager, java.lang.String);
    method public int show(android.app.FragmentTransaction, java.lang.String);
    field public static final int STYLE_NORMAL = 0; // 0x0
    field public static final int STYLE_NO_FRAME = 2; // 0x2
    field public static final int STYLE_NO_INPUT = 3; // 0x3
    field public static final int STYLE_NO_TITLE = 1; // 0x1
  }

  public class DownloadManager {
    method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean);
    method public long enqueue(android.app.DownloadManager.Request);
    method public static java.lang.Long getMaxBytesOverMobile(android.content.Context);
    method public java.lang.String getMimeTypeForDownloadedFile(long);
    method public static java.lang.Long getRecommendedMaxBytesOverMobile(android.content.Context);
    method public android.net.Uri getUriForDownloadedFile(long);
    method public android.os.ParcelFileDescriptor openDownloadedFile(long) throws java.io.FileNotFoundException;
    method public android.database.Cursor query(android.app.DownloadManager.Query);
    method public int remove(long...);
    field public static final java.lang.String ACTION_DOWNLOAD_COMPLETE = "android.intent.action.DOWNLOAD_COMPLETE";
    field public static final java.lang.String ACTION_NOTIFICATION_CLICKED = "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED";
    field public static final java.lang.String ACTION_VIEW_DOWNLOADS = "android.intent.action.VIEW_DOWNLOADS";
    field public static final java.lang.String COLUMN_BYTES_DOWNLOADED_SO_FAR = "bytes_so_far";
    field public static final java.lang.String COLUMN_DESCRIPTION = "description";
    field public static final java.lang.String COLUMN_ID = "_id";
    field public static final java.lang.String COLUMN_LAST_MODIFIED_TIMESTAMP = "last_modified_timestamp";
    field public static final java.lang.String COLUMN_LOCAL_FILENAME = "local_filename";
    field public static final java.lang.String COLUMN_LOCAL_URI = "local_uri";
    field public static final java.lang.String COLUMN_MEDIAPROVIDER_URI = "mediaprovider_uri";
    field public static final java.lang.String COLUMN_MEDIA_TYPE = "media_type";
    field public static final java.lang.String COLUMN_REASON = "reason";
    field public static final java.lang.String COLUMN_STATUS = "status";
    field public static final java.lang.String COLUMN_TITLE = "title";
    field public static final java.lang.String COLUMN_TOTAL_SIZE_BYTES = "total_size";
    field public static final java.lang.String COLUMN_URI = "uri";
    field public static final int ERROR_CANNOT_RESUME = 1008; // 0x3f0
    field public static final int ERROR_DEVICE_NOT_FOUND = 1007; // 0x3ef
    field public static final int ERROR_FILE_ALREADY_EXISTS = 1009; // 0x3f1
    field public static final int ERROR_FILE_ERROR = 1001; // 0x3e9
    field public static final int ERROR_HTTP_DATA_ERROR = 1004; // 0x3ec
    field public static final int ERROR_INSUFFICIENT_SPACE = 1006; // 0x3ee
    field public static final int ERROR_TOO_MANY_REDIRECTS = 1005; // 0x3ed
    field public static final int ERROR_UNHANDLED_HTTP_CODE = 1002; // 0x3ea
    field public static final int ERROR_UNKNOWN = 1000; // 0x3e8
    field public static final java.lang.String EXTRA_DOWNLOAD_ID = "extra_download_id";
    field public static final java.lang.String EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS = "extra_click_download_ids";
    field public static final java.lang.String INTENT_EXTRAS_SORT_BY_SIZE = "android.app.DownloadManager.extra_sortBySize";
    field public static final int PAUSED_QUEUED_FOR_WIFI = 3; // 0x3
    field public static final int PAUSED_UNKNOWN = 4; // 0x4
    field public static final int PAUSED_WAITING_FOR_NETWORK = 2; // 0x2
    field public static final int PAUSED_WAITING_TO_RETRY = 1; // 0x1
    field public static final int STATUS_FAILED = 16; // 0x10
    field public static final int STATUS_PAUSED = 4; // 0x4
    field public static final int STATUS_PENDING = 1; // 0x1
    field public static final int STATUS_RUNNING = 2; // 0x2
    field public static final int STATUS_SUCCESSFUL = 8; // 0x8
  }

  public static class DownloadManager.Query {
    ctor public DownloadManager.Query();
    method public android.app.DownloadManager.Query setFilterById(long...);
    method public android.app.DownloadManager.Query setFilterByStatus(int);
  }

  public static class DownloadManager.Request {
    ctor public DownloadManager.Request(android.net.Uri);
    method public android.app.DownloadManager.Request addRequestHeader(java.lang.String, java.lang.String);
    method public void allowScanningByMediaScanner();
    method public android.app.DownloadManager.Request setAllowedNetworkTypes(int);
    method public android.app.DownloadManager.Request setAllowedOverMetered(boolean);
    method public android.app.DownloadManager.Request setAllowedOverRoaming(boolean);
    method public android.app.DownloadManager.Request setDescription(java.lang.CharSequence);
    method public android.app.DownloadManager.Request setDestinationInExternalFilesDir(android.content.Context, java.lang.String, java.lang.String);
    method public android.app.DownloadManager.Request setDestinationInExternalPublicDir(java.lang.String, java.lang.String);
    method public android.app.DownloadManager.Request setDestinationUri(android.net.Uri);
    method public android.app.DownloadManager.Request setMimeType(java.lang.String);
    method public android.app.DownloadManager.Request setNotificationVisibility(int);
    method public deprecated android.app.DownloadManager.Request setShowRunningNotification(boolean);
    method public android.app.DownloadManager.Request setTitle(java.lang.CharSequence);
    method public android.app.DownloadManager.Request setVisibleInDownloadsUi(boolean);
    field public static final int NETWORK_MOBILE = 1; // 0x1
    field public static final int NETWORK_WIFI = 2; // 0x2
    field public static final int VISIBILITY_HIDDEN = 2; // 0x2
    field public static final int VISIBILITY_VISIBLE = 0; // 0x0
    field public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED = 1; // 0x1
    field public static final int VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION = 3; // 0x3
  }

  public class ExpandableListActivity extends android.app.Activity implements android.widget.ExpandableListView.OnChildClickListener android.widget.ExpandableListView.OnGroupCollapseListener android.widget.ExpandableListView.OnGroupExpandListener android.view.View.OnCreateContextMenuListener {
    ctor public ExpandableListActivity();
    method public android.widget.ExpandableListAdapter getExpandableListAdapter();
    method public android.widget.ExpandableListView getExpandableListView();
    method public long getSelectedId();
    method public long getSelectedPosition();
    method public boolean onChildClick(android.widget.ExpandableListView, android.view.View, int, int, long);
    method public void onGroupCollapse(int);
    method public void onGroupExpand(int);
    method public void setListAdapter(android.widget.ExpandableListAdapter);
    method public boolean setSelectedChild(int, int, boolean);
    method public void setSelectedGroup(int);
  }

  public class Fragment implements android.content.ComponentCallbacks2 android.view.View.OnCreateContextMenuListener {
    ctor public Fragment();
    method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public final boolean equals(java.lang.Object);
    method public final android.app.Activity getActivity();
    method public boolean getAllowEnterTransitionOverlap();
    method public boolean getAllowReturnTransitionOverlap();
    method public final android.os.Bundle getArguments();
    method public final android.app.FragmentManager getChildFragmentManager();
    method public android.transition.Transition getEnterTransition();
    method public android.transition.Transition getExitTransition();
    method public final android.app.FragmentManager getFragmentManager();
    method public final int getId();
    method public android.app.LoaderManager getLoaderManager();
    method public final android.app.Fragment getParentFragment();
    method public android.transition.Transition getReenterTransition();
    method public final android.content.res.Resources getResources();
    method public final boolean getRetainInstance();
    method public android.transition.Transition getReturnTransition();
    method public android.transition.Transition getSharedElementEnterTransition();
    method public android.transition.Transition getSharedElementReturnTransition();
    method public final java.lang.String getString(int);
    method public final java.lang.String getString(int, java.lang.Object...);
    method public final java.lang.String getTag();
    method public final android.app.Fragment getTargetFragment();
    method public final int getTargetRequestCode();
    method public final java.lang.CharSequence getText(int);
    method public boolean getUserVisibleHint();
    method public android.view.View getView();
    method public final int hashCode();
    method public static android.app.Fragment instantiate(android.content.Context, java.lang.String);
    method public static android.app.Fragment instantiate(android.content.Context, java.lang.String, android.os.Bundle);
    method public final boolean isAdded();
    method public final boolean isDetached();
    method public final boolean isHidden();
    method public final boolean isInLayout();
    method public final boolean isRemoving();
    method public final boolean isResumed();
    method public final boolean isVisible();
    method public void onActivityCreated(android.os.Bundle);
    method public void onActivityResult(int, int, android.content.Intent);
    method public void onAttach(android.app.Activity);
    method public void onConfigurationChanged(android.content.res.Configuration);
    method public boolean onContextItemSelected(android.view.MenuItem);
    method public void onCreate(android.os.Bundle);
    method public android.animation.Animator onCreateAnimator(int, boolean, int);
    method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
    method public void onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater);
    method public android.view.View onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle);
    method public void onDestroy();
    method public void onDestroyOptionsMenu();
    method public void onDestroyView();
    method public void onDetach();
    method public void onHiddenChanged(boolean);
    method public deprecated void onInflate(android.util.AttributeSet, android.os.Bundle);
    method public void onInflate(android.app.Activity, android.util.AttributeSet, android.os.Bundle);
    method public void onLowMemory();
    method public boolean onOptionsItemSelected(android.view.MenuItem);
    method public void onOptionsMenuClosed(android.view.Menu);
    method public void onPause();
    method public void onPrepareOptionsMenu(android.view.Menu);
    method public void onRequestPermissionsResult(int, java.lang.String[], int[]);
    method public void onResume();
    method public void onSaveInstanceState(android.os.Bundle);
    method public void onStart();
    method public void onStop();
    method public void onTrimMemory(int);
    method public void onViewCreated(android.view.View, android.os.Bundle);
    method public void onViewStateRestored(android.os.Bundle);
    method public void registerForContextMenu(android.view.View);
    method public final void requestPermissions(java.lang.String[], int);
    method public void setAllowEnterTransitionOverlap(boolean);
    method public void setAllowReturnTransitionOverlap(boolean);
    method public void setArguments(android.os.Bundle);
    method public void setEnterSharedElementCallback(android.app.SharedElementCallback);
    method public void setEnterTransition(android.transition.Transition);
    method public void setExitSharedElementCallback(android.app.SharedElementCallback);
    method public void setExitTransition(android.transition.Transition);
    method public void setHasOptionsMenu(boolean);
    method public void setInitialSavedState(android.app.Fragment.SavedState);
    method public void setMenuVisibility(boolean);
    method public void setReenterTransition(android.transition.Transition);
    method public void setRetainInstance(boolean);
    method public void setReturnTransition(android.transition.Transition);
    method public void setSharedElementEnterTransition(android.transition.Transition);
    method public void setSharedElementReturnTransition(android.transition.Transition);
    method public void setTargetFragment(android.app.Fragment, int);
    method public void setUserVisibleHint(boolean);
    method public void startActivity(android.content.Intent);
    method public void startActivity(android.content.Intent, android.os.Bundle);
    method public void startActivityForResult(android.content.Intent, int);
    method public void startActivityForResult(android.content.Intent, int, android.os.Bundle);
    method public void unregisterForContextMenu(android.view.View);
  }

  public static class Fragment.InstantiationException extends android.util.AndroidRuntimeException {
    ctor public Fragment.InstantiationException(java.lang.String, java.lang.Exception);
  }

  public static class Fragment.SavedState implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.ClassLoaderCreator<android.app.Fragment.SavedState> CREATOR;
  }

  public deprecated class FragmentBreadCrumbs extends android.view.ViewGroup implements android.app.FragmentManager.OnBackStackChangedListener {
    ctor public FragmentBreadCrumbs(android.content.Context);
    ctor public FragmentBreadCrumbs(android.content.Context, android.util.AttributeSet);
    ctor public FragmentBreadCrumbs(android.content.Context, android.util.AttributeSet, int);
    method public void onBackStackChanged();
    method protected void onLayout(boolean, int, int, int, int);
    method public void setActivity(android.app.Activity);
    method public void setMaxVisible(int);
    method public void setOnBreadCrumbClickListener(android.app.FragmentBreadCrumbs.OnBreadCrumbClickListener);
    method public void setParentTitle(java.lang.CharSequence, java.lang.CharSequence, android.view.View.OnClickListener);
    method public void setTitle(java.lang.CharSequence, java.lang.CharSequence);
  }

  public static abstract interface FragmentBreadCrumbs.OnBreadCrumbClickListener {
    method public abstract boolean onBreadCrumbClick(android.app.FragmentManager.BackStackEntry, int);
  }

  public abstract class FragmentManager {
    ctor public FragmentManager();
    method public abstract void addOnBackStackChangedListener(android.app.FragmentManager.OnBackStackChangedListener);
    method public abstract android.app.FragmentTransaction beginTransaction();
    method public abstract void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public static void enableDebugLogging(boolean);
    method public abstract boolean executePendingTransactions();
    method public abstract android.app.Fragment findFragmentById(int);
    method public abstract android.app.Fragment findFragmentByTag(java.lang.String);
    method public abstract android.app.FragmentManager.BackStackEntry getBackStackEntryAt(int);
    method public abstract int getBackStackEntryCount();
    method public abstract android.app.Fragment getFragment(android.os.Bundle, java.lang.String);
    method public void invalidateOptionsMenu();
    method public abstract boolean isDestroyed();
    method public abstract void popBackStack();
    method public abstract void popBackStack(java.lang.String, int);
    method public abstract void popBackStack(int, int);
    method public abstract boolean popBackStackImmediate();
    method public abstract boolean popBackStackImmediate(java.lang.String, int);
    method public abstract boolean popBackStackImmediate(int, int);
    method public abstract void putFragment(android.os.Bundle, java.lang.String, android.app.Fragment);
    method public abstract void removeOnBackStackChangedListener(android.app.FragmentManager.OnBackStackChangedListener);
    method public abstract android.app.Fragment.SavedState saveFragmentInstanceState(android.app.Fragment);
    field public static final int POP_BACK_STACK_INCLUSIVE = 1; // 0x1
  }

  public static abstract interface FragmentManager.BackStackEntry {
    method public abstract java.lang.CharSequence getBreadCrumbShortTitle();
    method public abstract int getBreadCrumbShortTitleRes();
    method public abstract java.lang.CharSequence getBreadCrumbTitle();
    method public abstract int getBreadCrumbTitleRes();
    method public abstract int getId();
    method public abstract java.lang.String getName();
  }

  public static abstract interface FragmentManager.OnBackStackChangedListener {
    method public abstract void onBackStackChanged();
  }

  public abstract class FragmentTransaction {
    ctor public FragmentTransaction();
    method public abstract android.app.FragmentTransaction add(android.app.Fragment, java.lang.String);
    method public abstract android.app.FragmentTransaction add(int, android.app.Fragment);
    method public abstract android.app.FragmentTransaction add(int, android.app.Fragment, java.lang.String);
    method public abstract android.app.FragmentTransaction addSharedElement(android.view.View, java.lang.String);
    method public abstract android.app.FragmentTransaction addToBackStack(java.lang.String);
    method public abstract android.app.FragmentTransaction attach(android.app.Fragment);
    method public abstract int commit();
    method public abstract int commitAllowingStateLoss();
    method public abstract android.app.FragmentTransaction detach(android.app.Fragment);
    method public abstract android.app.FragmentTransaction disallowAddToBackStack();
    method public abstract android.app.FragmentTransaction hide(android.app.Fragment);
    method public abstract boolean isAddToBackStackAllowed();
    method public abstract boolean isEmpty();
    method public abstract android.app.FragmentTransaction remove(android.app.Fragment);
    method public abstract android.app.FragmentTransaction replace(int, android.app.Fragment);
    method public abstract android.app.FragmentTransaction replace(int, android.app.Fragment, java.lang.String);
    method public abstract android.app.FragmentTransaction setBreadCrumbShortTitle(int);
    method public abstract android.app.FragmentTransaction setBreadCrumbShortTitle(java.lang.CharSequence);
    method public abstract android.app.FragmentTransaction setBreadCrumbTitle(int);
    method public abstract android.app.FragmentTransaction setBreadCrumbTitle(java.lang.CharSequence);
    method public abstract android.app.FragmentTransaction setCustomAnimations(int, int);
    method public abstract android.app.FragmentTransaction setCustomAnimations(int, int, int, int);
    method public abstract android.app.FragmentTransaction setTransition(int);
    method public abstract android.app.FragmentTransaction setTransitionStyle(int);
    method public abstract android.app.FragmentTransaction show(android.app.Fragment);
    field public static final int TRANSIT_ENTER_MASK = 4096; // 0x1000
    field public static final int TRANSIT_EXIT_MASK = 8192; // 0x2000
    field public static final int TRANSIT_FRAGMENT_CLOSE = 8194; // 0x2002
    field public static final int TRANSIT_FRAGMENT_FADE = 4099; // 0x1003
    field public static final int TRANSIT_FRAGMENT_OPEN = 4097; // 0x1001
    field public static final int TRANSIT_NONE = 0; // 0x0
    field public static final int TRANSIT_UNSET = -1; // 0xffffffff
  }

  public class Instrumentation {
    ctor public Instrumentation();
    method public void addMonitor(android.app.Instrumentation.ActivityMonitor);
    method public android.app.Instrumentation.ActivityMonitor addMonitor(android.content.IntentFilter, android.app.Instrumentation.ActivityResult, boolean);
    method public android.app.Instrumentation.ActivityMonitor addMonitor(java.lang.String, android.app.Instrumentation.ActivityResult, boolean);
    method public void callActivityOnCreate(android.app.Activity, android.os.Bundle);
    method public void callActivityOnCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle);
    method public void callActivityOnDestroy(android.app.Activity);
    method public void callActivityOnNewIntent(android.app.Activity, android.content.Intent);
    method public void callActivityOnPause(android.app.Activity);
    method public void callActivityOnPostCreate(android.app.Activity, android.os.Bundle);
    method public void callActivityOnPostCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle);
    method public void callActivityOnRestart(android.app.Activity);
    method public void callActivityOnRestoreInstanceState(android.app.Activity, android.os.Bundle);
    method public void callActivityOnRestoreInstanceState(android.app.Activity, android.os.Bundle, android.os.PersistableBundle);
    method public void callActivityOnResume(android.app.Activity);
    method public void callActivityOnSaveInstanceState(android.app.Activity, android.os.Bundle);
    method public void callActivityOnSaveInstanceState(android.app.Activity, android.os.Bundle, android.os.PersistableBundle);
    method public void callActivityOnStart(android.app.Activity);
    method public void callActivityOnStop(android.app.Activity);
    method public void callActivityOnUserLeaving(android.app.Activity);
    method public void callApplicationOnCreate(android.app.Application);
    method public boolean checkMonitorHit(android.app.Instrumentation.ActivityMonitor, int);
    method public void endPerformanceSnapshot();
    method public void finish(int, android.os.Bundle);
    method public android.os.Bundle getAllocCounts();
    method public android.os.Bundle getBinderCounts();
    method public android.content.ComponentName getComponentName();
    method public android.content.Context getContext();
    method public android.content.Context getTargetContext();
    method public android.app.UiAutomation getUiAutomation();
    method public boolean invokeContextMenuAction(android.app.Activity, int, int);
    method public boolean invokeMenuActionSync(android.app.Activity, int, int);
    method public boolean isProfiling();
    method public android.app.Activity newActivity(java.lang.Class<?>, android.content.Context, android.os.IBinder, android.app.Application, android.content.Intent, android.content.pm.ActivityInfo, java.lang.CharSequence, android.app.Activity, java.lang.String, java.lang.Object) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
    method public android.app.Activity newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
    method public android.app.Application newApplication(java.lang.ClassLoader, java.lang.String, android.content.Context) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
    method public static android.app.Application newApplication(java.lang.Class<?>, android.content.Context) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
    method public void onCreate(android.os.Bundle);
    method public void onDestroy();
    method public boolean onException(java.lang.Object, java.lang.Throwable);
    method public void onStart();
    method public void removeMonitor(android.app.Instrumentation.ActivityMonitor);
    method public void runOnMainSync(java.lang.Runnable);
    method public void sendCharacterSync(int);
    method public void sendKeyDownUpSync(int);
    method public void sendKeySync(android.view.KeyEvent);
    method public void sendPointerSync(android.view.MotionEvent);
    method public void sendStatus(int, android.os.Bundle);
    method public void sendStringSync(java.lang.String);
    method public void sendTrackballEventSync(android.view.MotionEvent);
    method public void setAutomaticPerformanceSnapshots();
    method public void setInTouchMode(boolean);
    method public void start();
    method public android.app.Activity startActivitySync(android.content.Intent);
    method public deprecated void startAllocCounting();
    method public void startPerformanceSnapshot();
    method public void startProfiling();
    method public deprecated void stopAllocCounting();
    method public void stopProfiling();
    method public void waitForIdle(java.lang.Runnable);
    method public void waitForIdleSync();
    method public android.app.Activity waitForMonitor(android.app.Instrumentation.ActivityMonitor);
    method public android.app.Activity waitForMonitorWithTimeout(android.app.Instrumentation.ActivityMonitor, long);
    field public static final java.lang.String REPORT_KEY_IDENTIFIER = "id";
    field public static final java.lang.String REPORT_KEY_STREAMRESULT = "stream";
  }

  public static class Instrumentation.ActivityMonitor {
    ctor public Instrumentation.ActivityMonitor(android.content.IntentFilter, android.app.Instrumentation.ActivityResult, boolean);
    ctor public Instrumentation.ActivityMonitor(java.lang.String, android.app.Instrumentation.ActivityResult, boolean);
    method public final android.content.IntentFilter getFilter();
    method public final int getHits();
    method public final android.app.Activity getLastActivity();
    method public final android.app.Instrumentation.ActivityResult getResult();
    method public final boolean isBlocking();
    method public final android.app.Activity waitForActivity();
    method public final android.app.Activity waitForActivityWithTimeout(long);
  }

  public static final class Instrumentation.ActivityResult {
    ctor public Instrumentation.ActivityResult(int, android.content.Intent);
    method public int getResultCode();
    method public android.content.Intent getResultData();
  }

  public abstract class IntentService extends android.app.Service {
    ctor public IntentService(java.lang.String);
    method public android.os.IBinder onBind(android.content.Intent);
    method protected abstract void onHandleIntent(android.content.Intent);
    method public void setIntentRedelivery(boolean);
  }

  public class KeyguardManager {
    method public android.content.Intent createConfirmDeviceCredentialIntent(java.lang.CharSequence, java.lang.CharSequence);
    method public deprecated void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult);
    method public boolean inKeyguardRestrictedInputMode();
    method public boolean isDeviceLocked();
    method public boolean isDeviceSecure();
    method public boolean isKeyguardLocked();
    method public boolean isKeyguardSecure();
    method public deprecated android.app.KeyguardManager.KeyguardLock newKeyguardLock(java.lang.String);
  }

  public deprecated class KeyguardManager.KeyguardLock {
    method public void disableKeyguard();
    method public void reenableKeyguard();
  }

  public static abstract interface KeyguardManager.OnKeyguardExitResult {
    method public abstract void onKeyguardExitResult(boolean);
  }

  public abstract class LauncherActivity extends android.app.ListActivity {
    ctor public LauncherActivity();
    method protected android.content.Intent getTargetIntent();
    method protected android.content.Intent intentForPosition(int);
    method protected android.app.LauncherActivity.ListItem itemForPosition(int);
    method public java.util.List<android.app.LauncherActivity.ListItem> makeListItems();
    method protected java.util.List<android.content.pm.ResolveInfo> onQueryPackageManager(android.content.Intent);
    method protected void onSetContentView();
  }

  public class LauncherActivity.IconResizer {
    ctor public LauncherActivity.IconResizer();
    method public android.graphics.drawable.Drawable createIconThumbnail(android.graphics.drawable.Drawable);
  }

  public static class LauncherActivity.ListItem {
    ctor public LauncherActivity.ListItem();
    field public java.lang.String className;
    field public android.os.Bundle extras;
    field public android.graphics.drawable.Drawable icon;
    field public java.lang.CharSequence label;
    field public java.lang.String packageName;
    field public android.content.pm.ResolveInfo resolveInfo;
  }

  public class ListActivity extends android.app.Activity {
    ctor public ListActivity();
    method public android.widget.ListAdapter getListAdapter();
    method public android.widget.ListView getListView();
    method public long getSelectedItemId();
    method public int getSelectedItemPosition();
    method protected void onListItemClick(android.widget.ListView, android.view.View, int, long);
    method public void setListAdapter(android.widget.ListAdapter);
    method public void setSelection(int);
  }

  public class ListFragment extends android.app.Fragment {
    ctor public ListFragment();
    method public android.widget.ListAdapter getListAdapter();
    method public android.widget.ListView getListView();
    method public long getSelectedItemId();
    method public int getSelectedItemPosition();
    method public void onListItemClick(android.widget.ListView, android.view.View, int, long);
    method public void setEmptyText(java.lang.CharSequence);
    method public void setListAdapter(android.widget.ListAdapter);
    method public void setListShown(boolean);
    method public void setListShownNoAnimation(boolean);
    method public void setSelection(int);
  }

  public abstract class LoaderManager {
    ctor public LoaderManager();
    method public abstract void destroyLoader(int);
    method public abstract void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public static void enableDebugLogging(boolean);
    method public abstract android.content.Loader<D> getLoader(int);
    method public abstract android.content.Loader<D> initLoader(int, android.os.Bundle, android.app.LoaderManager.LoaderCallbacks<D>);
    method public abstract android.content.Loader<D> restartLoader(int, android.os.Bundle, android.app.LoaderManager.LoaderCallbacks<D>);
  }

  public static abstract interface LoaderManager.LoaderCallbacks {
    method public abstract android.content.Loader<D> onCreateLoader(int, android.os.Bundle);
    method public abstract void onLoadFinished(android.content.Loader<D>, D);
    method public abstract void onLoaderReset(android.content.Loader<D>);
  }

  public deprecated class LocalActivityManager {
    ctor public LocalActivityManager(android.app.Activity, boolean);
    method public android.view.Window destroyActivity(java.lang.String, boolean);
    method public void dispatchCreate(android.os.Bundle);
    method public void dispatchDestroy(boolean);
    method public void dispatchPause(boolean);
    method public void dispatchResume();
    method public void dispatchStop();
    method public android.app.Activity getActivity(java.lang.String);
    method public android.app.Activity getCurrentActivity();
    method public java.lang.String getCurrentId();
    method public void removeAllActivities();
    method public android.os.Bundle saveInstanceState();
    method public android.view.Window startActivity(java.lang.String, android.content.Intent);
  }

  public class MediaRouteActionProvider extends android.view.ActionProvider {
    ctor public MediaRouteActionProvider(android.content.Context);
    method public android.view.View onCreateActionView();
    method public void setExtendedSettingsClickListener(android.view.View.OnClickListener);
    method public void setRouteTypes(int);
  }

  public class MediaRouteButton extends android.view.View {
    ctor public MediaRouteButton(android.content.Context);
    ctor public MediaRouteButton(android.content.Context, android.util.AttributeSet);
    ctor public MediaRouteButton(android.content.Context, android.util.AttributeSet, int);
    ctor public MediaRouteButton(android.content.Context, android.util.AttributeSet, int, int);
    method public int getRouteTypes();
    method public void onAttachedToWindow();
    method public void onDetachedFromWindow();
    method public void setExtendedSettingsClickListener(android.view.View.OnClickListener);
    method public void setRouteTypes(int);
    method public void showDialog();
  }

  public class NativeActivity extends android.app.Activity implements android.view.InputQueue.Callback android.view.SurfaceHolder.Callback2 android.view.ViewTreeObserver.OnGlobalLayoutListener {
    ctor public NativeActivity();
    method public void onGlobalLayout();
    method public void onInputQueueCreated(android.view.InputQueue);
    method public void onInputQueueDestroyed(android.view.InputQueue);
    method public void surfaceChanged(android.view.SurfaceHolder, int, int, int);
    method public void surfaceCreated(android.view.SurfaceHolder);
    method public void surfaceDestroyed(android.view.SurfaceHolder);
    method public void surfaceRedrawNeeded(android.view.SurfaceHolder);
    field public static final java.lang.String META_DATA_FUNC_NAME = "android.app.func_name";
    field public static final java.lang.String META_DATA_LIB_NAME = "android.app.lib_name";
  }

  public class Notification implements android.os.Parcelable {
    ctor public Notification();
    ctor public deprecated Notification(int, java.lang.CharSequence, long);
    ctor public Notification(android.os.Parcel);
    method public android.app.Notification clone();
    method public int describeContents();
    method public java.lang.String getGroup();
    method public java.lang.String getSortKey();
    method public deprecated void setLatestEventInfo(android.content.Context, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT;
    field public static final java.lang.String CATEGORY_ALARM = "alarm";
    field public static final java.lang.String CATEGORY_CALL = "call";
    field public static final java.lang.String CATEGORY_EMAIL = "email";
    field public static final java.lang.String CATEGORY_ERROR = "err";
    field public static final java.lang.String CATEGORY_EVENT = "event";
    field public static final java.lang.String CATEGORY_MESSAGE = "msg";
    field public static final java.lang.String CATEGORY_PROGRESS = "progress";
    field public static final java.lang.String CATEGORY_PROMO = "promo";
    field public static final java.lang.String CATEGORY_RECOMMENDATION = "recommendation";
    field public static final java.lang.String CATEGORY_REMINDER = "reminder";
    field public static final java.lang.String CATEGORY_SERVICE = "service";
    field public static final java.lang.String CATEGORY_SOCIAL = "social";
    field public static final java.lang.String CATEGORY_STATUS = "status";
    field public static final java.lang.String CATEGORY_SYSTEM = "sys";
    field public static final java.lang.String CATEGORY_TRANSPORT = "transport";
    field public static final int COLOR_DEFAULT = 0; // 0x0
    field public static final android.os.Parcelable.Creator<android.app.Notification> CREATOR;
    field public static final int DEFAULT_ALL = -1; // 0xffffffff
    field public static final int DEFAULT_LIGHTS = 4; // 0x4
    field public static final int DEFAULT_SOUND = 1; // 0x1
    field public static final int DEFAULT_VIBRATE = 2; // 0x2
    field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
    field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
    field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
    field public static final java.lang.String EXTRA_INFO_TEXT = "android.infoText";
    field public static final java.lang.String EXTRA_LARGE_ICON = "android.largeIcon";
    field public static final java.lang.String EXTRA_LARGE_ICON_BIG = "android.largeIcon.big";
    field public static final java.lang.String EXTRA_MEDIA_SESSION = "android.mediaSession";
    field public static final java.lang.String EXTRA_PEOPLE = "android.people";
    field public static final java.lang.String EXTRA_PICTURE = "android.picture";
    field public static final java.lang.String EXTRA_PROGRESS = "android.progress";
    field public static final java.lang.String EXTRA_PROGRESS_INDETERMINATE = "android.progressIndeterminate";
    field public static final java.lang.String EXTRA_PROGRESS_MAX = "android.progressMax";
    field public static final java.lang.String EXTRA_SHOW_CHRONOMETER = "android.showChronometer";
    field public static final java.lang.String EXTRA_SHOW_WHEN = "android.showWhen";
    field public static final java.lang.String EXTRA_SMALL_ICON = "android.icon";
    field public static final java.lang.String EXTRA_SUB_TEXT = "android.subText";
    field public static final java.lang.String EXTRA_SUMMARY_TEXT = "android.summaryText";
    field public static final java.lang.String EXTRA_TEMPLATE = "android.template";
    field public static final java.lang.String EXTRA_TEXT = "android.text";
    field public static final java.lang.String EXTRA_TEXT_LINES = "android.textLines";
    field public static final java.lang.String EXTRA_TITLE = "android.title";
    field public static final java.lang.String EXTRA_TITLE_BIG = "android.title.big";
    field public static final int FLAG_AUTO_CANCEL = 16; // 0x10
    field public static final int FLAG_FOREGROUND_SERVICE = 64; // 0x40
    field public static final int FLAG_GROUP_SUMMARY = 512; // 0x200
    field public static final deprecated int FLAG_HIGH_PRIORITY = 128; // 0x80
    field public static final int FLAG_INSISTENT = 4; // 0x4
    field public static final int FLAG_LOCAL_ONLY = 256; // 0x100
    field public static final int FLAG_NO_CLEAR = 32; // 0x20
    field public static final int FLAG_ONGOING_EVENT = 2; // 0x2
    field public static final int FLAG_ONLY_ALERT_ONCE = 8; // 0x8
    field public static final int FLAG_SHOW_LIGHTS = 1; // 0x1
    field public static final java.lang.String INTENT_CATEGORY_NOTIFICATION_PREFERENCES = "android.intent.category.NOTIFICATION_PREFERENCES";
    field public static final int PRIORITY_DEFAULT = 0; // 0x0
    field public static final int PRIORITY_HIGH = 1; // 0x1
    field public static final int PRIORITY_LOW = -1; // 0xffffffff
    field public static final int PRIORITY_MAX = 2; // 0x2
    field public static final int PRIORITY_MIN = -2; // 0xfffffffe
    field public static final deprecated int STREAM_DEFAULT = -1; // 0xffffffff
    field public static final int VISIBILITY_PRIVATE = 0; // 0x0
    field public static final int VISIBILITY_PUBLIC = 1; // 0x1
    field public static final int VISIBILITY_SECRET = -1; // 0xffffffff
    field public android.app.Notification.Action[] actions;
    field public android.media.AudioAttributes audioAttributes;
    field public deprecated int audioStreamType;
    field public android.widget.RemoteViews bigContentView;
    field public java.lang.String category;
    field public int color;
    field public android.app.PendingIntent contentIntent;
    field public android.widget.RemoteViews contentView;
    field public int defaults;
    field public android.app.PendingIntent deleteIntent;
    field public android.os.Bundle extras;
    field public int flags;
    field public android.app.PendingIntent fullScreenIntent;
    field public android.widget.RemoteViews headsUpContentView;
    field public int icon;
    field public int iconLevel;
    field public android.graphics.Bitmap largeIcon;
    field public int ledARGB;
    field public int ledOffMS;
    field public int ledOnMS;
    field public int number;
    field public int priority;
    field public android.app.Notification publicVersion;
    field public android.net.Uri sound;
    field public java.lang.CharSequence tickerText;
    field public deprecated android.widget.RemoteViews tickerView;
    field public long[] vibrate;
    field public int visibility;
    field public long when;
  }

  public static class Notification.Action implements android.os.Parcelable {
    ctor public Notification.Action(int, java.lang.CharSequence, android.app.PendingIntent);
    method public android.app.Notification.Action clone();
    method public int describeContents();
    method public android.os.Bundle getExtras();
    method public android.app.RemoteInput[] getRemoteInputs();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.Notification.Action> CREATOR;
    field public android.app.PendingIntent actionIntent;
    field public int icon;
    field public java.lang.CharSequence title;
  }

  public static final class Notification.Action.Builder {
    ctor public Notification.Action.Builder(int, java.lang.CharSequence, android.app.PendingIntent);
    ctor public Notification.Action.Builder(android.app.Notification.Action);
    method public android.app.Notification.Action.Builder addExtras(android.os.Bundle);
    method public android.app.Notification.Action.Builder addRemoteInput(android.app.RemoteInput);
    method public android.app.Notification.Action build();
    method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Extender);
    method public android.os.Bundle getExtras();
  }

  public static abstract interface Notification.Action.Extender {
    method public abstract android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
  }

  public static final class Notification.Action.WearableExtender implements android.app.Notification.Action.Extender {
    ctor public Notification.Action.WearableExtender();
    ctor public Notification.Action.WearableExtender(android.app.Notification.Action);
    method public android.app.Notification.Action.WearableExtender clone();
    method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
    method public java.lang.CharSequence getCancelLabel();
    method public java.lang.CharSequence getConfirmLabel();
    method public java.lang.CharSequence getInProgressLabel();
    method public boolean isAvailableOffline();
    method public android.app.Notification.Action.WearableExtender setAvailableOffline(boolean);
    method public android.app.Notification.Action.WearableExtender setCancelLabel(java.lang.CharSequence);
    method public android.app.Notification.Action.WearableExtender setConfirmLabel(java.lang.CharSequence);
    method public android.app.Notification.Action.WearableExtender setInProgressLabel(java.lang.CharSequence);
  }

  public static class Notification.BigPictureStyle extends android.app.Notification.Style {
    ctor public Notification.BigPictureStyle();
    ctor public Notification.BigPictureStyle(android.app.Notification.Builder);
    method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.Bitmap);
    method public android.app.Notification.BigPictureStyle bigPicture(android.graphics.Bitmap);
    method public android.app.Notification.BigPictureStyle setBigContentTitle(java.lang.CharSequence);
    method public android.app.Notification.BigPictureStyle setSummaryText(java.lang.CharSequence);
  }

  public static class Notification.BigTextStyle extends android.app.Notification.Style {
    ctor public Notification.BigTextStyle();
    ctor public Notification.BigTextStyle(android.app.Notification.Builder);
    method public android.app.Notification.BigTextStyle bigText(java.lang.CharSequence);
    method public android.app.Notification.BigTextStyle setBigContentTitle(java.lang.CharSequence);
    method public android.app.Notification.BigTextStyle setSummaryText(java.lang.CharSequence);
  }

  public static class Notification.Builder {
    ctor public Notification.Builder(android.content.Context);
    method public android.app.Notification.Builder addAction(int, java.lang.CharSequence, android.app.PendingIntent);
    method public android.app.Notification.Builder addAction(android.app.Notification.Action);
    method public android.app.Notification.Builder addExtras(android.os.Bundle);
    method public android.app.Notification.Builder addPerson(java.lang.String);
    method public android.app.Notification build();
    method public android.app.Notification.Builder extend(android.app.Notification.Extender);
    method public android.os.Bundle getExtras();
    method public deprecated android.app.Notification getNotification();
    method public android.app.Notification.Builder setAutoCancel(boolean);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setColor(int);
    method public android.app.Notification.Builder setContent(android.widget.RemoteViews);
    method public android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
    method public android.app.Notification.Builder setContentIntent(android.app.PendingIntent);
    method public android.app.Notification.Builder setContentText(java.lang.CharSequence);
    method public android.app.Notification.Builder setContentTitle(java.lang.CharSequence);
    method public android.app.Notification.Builder setDefaults(int);
    method public android.app.Notification.Builder setDeleteIntent(android.app.PendingIntent);
    method public android.app.Notification.Builder setExtras(android.os.Bundle);
    method public android.app.Notification.Builder setFullScreenIntent(android.app.PendingIntent, boolean);
    method public android.app.Notification.Builder setGroup(java.lang.String);
    method public android.app.Notification.Builder setGroupSummary(boolean);
    method public android.app.Notification.Builder setLargeIcon(android.graphics.Bitmap);
    method public android.app.Notification.Builder setLights(int, int, int);
    method public android.app.Notification.Builder setLocalOnly(boolean);
    method public android.app.Notification.Builder setNumber(int);
    method public android.app.Notification.Builder setOngoing(boolean);
    method public android.app.Notification.Builder setOnlyAlertOnce(boolean);
    method public android.app.Notification.Builder setPriority(int);
    method public android.app.Notification.Builder setProgress(int, int, boolean);
    method public android.app.Notification.Builder setPublicVersion(android.app.Notification);
    method public android.app.Notification.Builder setShowWhen(boolean);
    method public android.app.Notification.Builder setSmallIcon(int);
    method public android.app.Notification.Builder setSmallIcon(int, int);
    method public android.app.Notification.Builder setSortKey(java.lang.String);
    method public android.app.Notification.Builder setSound(android.net.Uri);
    method public deprecated android.app.Notification.Builder setSound(android.net.Uri, int);
    method public android.app.Notification.Builder setSound(android.net.Uri, android.media.AudioAttributes);
    method public android.app.Notification.Builder setStyle(android.app.Notification.Style);
    method public android.app.Notification.Builder setSubText(java.lang.CharSequence);
    method public android.app.Notification.Builder setTicker(java.lang.CharSequence);
    method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews);
    method public android.app.Notification.Builder setUsesChronometer(boolean);
    method public android.app.Notification.Builder setVibrate(long[]);
    method public android.app.Notification.Builder setVisibility(int);
    method public android.app.Notification.Builder setWhen(long);
  }

  public static final class Notification.CarExtender implements android.app.Notification.Extender {
    ctor public Notification.CarExtender();
    ctor public Notification.CarExtender(android.app.Notification);
    method public android.app.Notification.Builder extend(android.app.Notification.Builder);
    method public int getColor();
    method public android.graphics.Bitmap getLargeIcon();
    method public android.app.Notification.CarExtender.UnreadConversation getUnreadConversation();
    method public android.app.Notification.CarExtender setColor(int);
    method public android.app.Notification.CarExtender setLargeIcon(android.graphics.Bitmap);
    method public android.app.Notification.CarExtender setUnreadConversation(android.app.Notification.CarExtender.UnreadConversation);
  }

  public static class Notification.CarExtender.Builder {
    ctor public Notification.CarExtender.Builder(java.lang.String);
    method public android.app.Notification.CarExtender.Builder addMessage(java.lang.String);
    method public android.app.Notification.CarExtender.UnreadConversation build();
    method public android.app.Notification.CarExtender.Builder setLatestTimestamp(long);
    method public android.app.Notification.CarExtender.Builder setReadPendingIntent(android.app.PendingIntent);
    method public android.app.Notification.CarExtender.Builder setReplyAction(android.app.PendingIntent, android.app.RemoteInput);
  }

  public static class Notification.CarExtender.UnreadConversation {
    method public long getLatestTimestamp();
    method public java.lang.String[] getMessages();
    method public java.lang.String getParticipant();
    method public java.lang.String[] getParticipants();
    method public android.app.PendingIntent getReadPendingIntent();
    method public android.app.RemoteInput getRemoteInput();
    method public android.app.PendingIntent getReplyPendingIntent();
  }

  public static final class Notification.ContentInfoExtender implements android.app.Notification.Extender {
    ctor public Notification.ContentInfoExtender();
    ctor public Notification.ContentInfoExtender(android.app.Notification);
    method public android.app.Notification.Builder extend(android.app.Notification.Builder);
    method public java.lang.String[] getContentTypes();
    method public java.lang.String[] getGenres();
    method public java.lang.String getMaturityRating();
    method public java.lang.String getPricingType();
    method public java.lang.String getPricingValue();
    method public java.lang.String getPrimaryContentType();
    method public long getRunningTime();
    method public int getStatus();
    method public android.app.Notification.ContentInfoExtender setContentTypes(java.lang.String[]);
    method public android.app.Notification.ContentInfoExtender setGenres(java.lang.String[]);
    method public android.app.Notification.ContentInfoExtender setMaturityRating(java.lang.String);
    method public android.app.Notification.ContentInfoExtender setPricingInformation(java.lang.String, java.lang.String);
    method public android.app.Notification.ContentInfoExtender setRunningTime(long);
    method public android.app.Notification.ContentInfoExtender setStatus(int);
    field public static final java.lang.String CONTENT_MATURITY_ALL = "android.contentMaturity.all";
    field public static final java.lang.String CONTENT_MATURITY_HIGH = "android.contentMaturity.high";
    field public static final java.lang.String CONTENT_MATURITY_LOW = "android.contentMaturity.low";
    field public static final java.lang.String CONTENT_MATURITY_MEDIUM = "android.contentMaturity.medium";
    field public static final java.lang.String CONTENT_PRICING_FREE = "android.contentPrice.free";
    field public static final java.lang.String CONTENT_PRICING_PURCHASE = "android.contentPrice.purchase";
    field public static final java.lang.String CONTENT_PRICING_RENTAL = "android.contentPrice.rental";
    field public static final java.lang.String CONTENT_PRICING_SUBSCRIPTION = "android.contentPrice.subscription";
    field public static final int CONTENT_STATUS_AVAILABLE = 2; // 0x2
    field public static final int CONTENT_STATUS_PENDING = 1; // 0x1
    field public static final int CONTENT_STATUS_READY = 0; // 0x0
    field public static final int CONTENT_STATUS_UNAVAILABLE = 3; // 0x3
    field public static final java.lang.String CONTENT_TYPE_APP = "android.contentType.app";
    field public static final java.lang.String CONTENT_TYPE_BOOK = "android.contentType.book";
    field public static final java.lang.String CONTENT_TYPE_COMIC = "android.contentType.comic";
    field public static final java.lang.String CONTENT_TYPE_GAME = "android.contentType.game";
    field public static final java.lang.String CONTENT_TYPE_MAGAZINE = "android.contentType.magazine";
    field public static final java.lang.String CONTENT_TYPE_MOVIE = "android.contentType.movie";
    field public static final java.lang.String CONTENT_TYPE_MUSIC = "android.contentType.music";
    field public static final java.lang.String CONTENT_TYPE_NEWS = "android.contentType.news";
    field public static final java.lang.String CONTENT_TYPE_PODCAST = "android.contentType.podcast";
    field public static final java.lang.String CONTENT_TYPE_RADIO = "android.contentType.radio";
    field public static final java.lang.String CONTENT_TYPE_SERIAL = "android.contentType.serial";
    field public static final java.lang.String CONTENT_TYPE_SPORTS = "android.contentType.sports";
    field public static final java.lang.String CONTENT_TYPE_TRAILER = "android.contentType.trailer";
    field public static final java.lang.String CONTENT_TYPE_VIDEO = "android.contentType.video";
    field public static final java.lang.String CONTENT_TYPE_WEBSITE = "android.contentType.website";
  }

  public static abstract interface Notification.Extender {
    method public abstract android.app.Notification.Builder extend(android.app.Notification.Builder);
  }

  public static class Notification.InboxStyle extends android.app.Notification.Style {
    ctor public Notification.InboxStyle();
    ctor public Notification.InboxStyle(android.app.Notification.Builder);
    method public android.app.Notification.InboxStyle addLine(java.lang.CharSequence);
    method public android.app.Notification.InboxStyle setBigContentTitle(java.lang.CharSequence);
    method public android.app.Notification.InboxStyle setSummaryText(java.lang.CharSequence);
  }

  public static class Notification.MediaStyle extends android.app.Notification.Style {
    ctor public Notification.MediaStyle();
    ctor public Notification.MediaStyle(android.app.Notification.Builder);
    method public android.app.Notification.MediaStyle setMediaSession(android.media.session.MediaSession.Token);
    method public android.app.Notification.MediaStyle setShowActionsInCompactView(int...);
  }

  public static abstract class Notification.Style {
    ctor public Notification.Style();
    method public android.app.Notification build();
    method protected void checkBuilder();
    method protected android.widget.RemoteViews getStandardView(int);
    method protected void internalSetBigContentTitle(java.lang.CharSequence);
    method protected void internalSetSummaryText(java.lang.CharSequence);
    method public void setBuilder(android.app.Notification.Builder);
    field protected android.app.Notification.Builder mBuilder;
  }

  public static final class Notification.WearableExtender implements android.app.Notification.Extender {
    ctor public Notification.WearableExtender();
    ctor public Notification.WearableExtender(android.app.Notification);
    method public android.app.Notification.WearableExtender addAction(android.app.Notification.Action);
    method public android.app.Notification.WearableExtender addActions(java.util.List<android.app.Notification.Action>);
    method public android.app.Notification.WearableExtender addPage(android.app.Notification);
    method public android.app.Notification.WearableExtender addPages(java.util.List<android.app.Notification>);
    method public android.app.Notification.WearableExtender clearActions();
    method public android.app.Notification.WearableExtender clearPages();
    method public android.app.Notification.WearableExtender clone();
    method public android.app.Notification.Builder extend(android.app.Notification.Builder);
    method public java.util.List<android.app.Notification.Action> getActions();
    method public android.graphics.Bitmap getBackground();
    method public int getContentAction();
    method public int getContentIcon();
    method public int getContentIconGravity();
    method public boolean getContentIntentAvailableOffline();
    method public int getCustomContentHeight();
    method public int getCustomSizePreset();
    method public android.app.PendingIntent getDisplayIntent();
    method public int getGravity();
    method public boolean getHintAvoidBackgroundClipping();
    method public boolean getHintHideIcon();
    method public int getHintScreenTimeout();
    method public boolean getHintShowBackgroundOnly();
    method public java.util.List<android.app.Notification> getPages();
    method public boolean getStartScrollBottom();
    method public android.app.Notification.WearableExtender setBackground(android.graphics.Bitmap);
    method public android.app.Notification.WearableExtender setContentAction(int);
    method public android.app.Notification.WearableExtender setContentIcon(int);
    method public android.app.Notification.WearableExtender setContentIconGravity(int);
    method public android.app.Notification.WearableExtender setContentIntentAvailableOffline(boolean);
    method public android.app.Notification.WearableExtender setCustomContentHeight(int);
    method public android.app.Notification.WearableExtender setCustomSizePreset(int);
    method public android.app.Notification.WearableExtender setDisplayIntent(android.app.PendingIntent);
    method public android.app.Notification.WearableExtender setGravity(int);
    method public android.app.Notification.WearableExtender setHintAvoidBackgroundClipping(boolean);
    method public android.app.Notification.WearableExtender setHintHideIcon(boolean);
    method public android.app.Notification.WearableExtender setHintScreenTimeout(int);
    method public android.app.Notification.WearableExtender setHintShowBackgroundOnly(boolean);
    method public android.app.Notification.WearableExtender setStartScrollBottom(boolean);
    field public static final int SCREEN_TIMEOUT_LONG = -1; // 0xffffffff
    field public static final int SCREEN_TIMEOUT_SHORT = 0; // 0x0
    field public static final int SIZE_DEFAULT = 0; // 0x0
    field public static final int SIZE_FULL_SCREEN = 5; // 0x5
    field public static final int SIZE_LARGE = 4; // 0x4
    field public static final int SIZE_MEDIUM = 3; // 0x3
    field public static final int SIZE_SMALL = 2; // 0x2
    field public static final int SIZE_XSMALL = 1; // 0x1
    field public static final int UNSET_ACTION_INDEX = -1; // 0xffffffff
  }

  public class NotificationManager {
    method public void cancel(int);
    method public void cancel(java.lang.String, int);
    method public void cancelAll();
    method public void notify(int, android.app.Notification);
    method public void notify(java.lang.String, int, android.app.Notification);
  }

  public final class PendingIntent implements android.os.Parcelable {
    method public void cancel();
    method public int describeContents();
    method public static android.app.PendingIntent getActivities(android.content.Context, int, android.content.Intent[], int);
    method public static android.app.PendingIntent getActivities(android.content.Context, int, android.content.Intent[], int, android.os.Bundle);
    method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int);
    method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int, android.os.Bundle);
    method public static android.app.PendingIntent getBroadcast(android.content.Context, int, android.content.Intent, int);
    method public java.lang.String getCreatorPackage();
    method public int getCreatorUid();
    method public android.os.UserHandle getCreatorUserHandle();
    method public android.content.IntentSender getIntentSender();
    method public static android.app.PendingIntent getService(android.content.Context, int, android.content.Intent, int);
    method public deprecated java.lang.String getTargetPackage();
    method public static android.app.PendingIntent readPendingIntentOrNullFromParcel(android.os.Parcel);
    method public void send() throws android.app.PendingIntent.CanceledException;
    method public void send(int) throws android.app.PendingIntent.CanceledException;
    method public void send(android.content.Context, int, android.content.Intent) throws android.app.PendingIntent.CanceledException;
    method public void send(int, android.app.PendingIntent.OnFinished, android.os.Handler) throws android.app.PendingIntent.CanceledException;
    method public void send(android.content.Context, int, android.content.Intent, android.app.PendingIntent.OnFinished, android.os.Handler) throws android.app.PendingIntent.CanceledException;
    method public void send(android.content.Context, int, android.content.Intent, android.app.PendingIntent.OnFinished, android.os.Handler, java.lang.String) throws android.app.PendingIntent.CanceledException;
    method public static void writePendingIntentOrNullToParcel(android.app.PendingIntent, android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.PendingIntent> CREATOR;
    field public static final int FLAG_CANCEL_CURRENT = 268435456; // 0x10000000
    field public static final int FLAG_IMMUTABLE = 67108864; // 0x4000000
    field public static final int FLAG_NO_CREATE = 536870912; // 0x20000000
    field public static final int FLAG_ONE_SHOT = 1073741824; // 0x40000000
    field public static final int FLAG_UPDATE_CURRENT = 134217728; // 0x8000000
  }

  public static class PendingIntent.CanceledException extends android.util.AndroidException {
    ctor public PendingIntent.CanceledException();
    ctor public PendingIntent.CanceledException(java.lang.String);
    ctor public PendingIntent.CanceledException(java.lang.Exception);
  }

  public static abstract interface PendingIntent.OnFinished {
    method public abstract void onSendFinished(android.app.PendingIntent, android.content.Intent, int, java.lang.String, android.os.Bundle);
  }

  public class Presentation extends android.app.Dialog {
    ctor public Presentation(android.content.Context, android.view.Display);
    ctor public Presentation(android.content.Context, android.view.Display, int);
    method public android.view.Display getDisplay();
    method public android.content.res.Resources getResources();
    method public void onDisplayChanged();
    method public void onDisplayRemoved();
  }

  public class ProgressDialog extends android.app.AlertDialog {
    ctor public ProgressDialog(android.content.Context);
    ctor public ProgressDialog(android.content.Context, int);
    method public int getMax();
    method public int getProgress();
    method public int getSecondaryProgress();
    method public void incrementProgressBy(int);
    method public void incrementSecondaryProgressBy(int);
    method public boolean isIndeterminate();
    method public void onStart();
    method public void setIndeterminate(boolean);
    method public void setIndeterminateDrawable(android.graphics.drawable.Drawable);
    method public void setMax(int);
    method public void setProgress(int);
    method public void setProgressDrawable(android.graphics.drawable.Drawable);
    method public void setProgressNumberFormat(java.lang.String);
    method public void setProgressPercentFormat(java.text.NumberFormat);
    method public void setProgressStyle(int);
    method public void setSecondaryProgress(int);
    method public static android.app.ProgressDialog show(android.content.Context, java.lang.CharSequence, java.lang.CharSequence);
    method public static android.app.ProgressDialog show(android.content.Context, java.lang.CharSequence, java.lang.CharSequence, boolean);
    method public static android.app.ProgressDialog show(android.content.Context, java.lang.CharSequence, java.lang.CharSequence, boolean, boolean);
    method public static android.app.ProgressDialog show(android.content.Context, java.lang.CharSequence, java.lang.CharSequence, boolean, boolean, android.content.DialogInterface.OnCancelListener);
    field public static final int STYLE_HORIZONTAL = 1; // 0x1
    field public static final int STYLE_SPINNER = 0; // 0x0
  }

  public final class RemoteInput implements android.os.Parcelable {
    method public static void addResultsToIntent(android.app.RemoteInput[], android.content.Intent, android.os.Bundle);
    method public int describeContents();
    method public boolean getAllowFreeFormInput();
    method public java.lang.CharSequence[] getChoices();
    method public android.os.Bundle getExtras();
    method public java.lang.CharSequence getLabel();
    method public java.lang.String getResultKey();
    method public static android.os.Bundle getResultsFromIntent(android.content.Intent);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.RemoteInput> CREATOR;
    field public static final java.lang.String EXTRA_RESULTS_DATA = "android.remoteinput.resultsData";
    field public static final java.lang.String RESULTS_CLIP_LABEL = "android.remoteinput.results";
  }

  public static final class RemoteInput.Builder {
    ctor public RemoteInput.Builder(java.lang.String);
    method public android.app.RemoteInput.Builder addExtras(android.os.Bundle);
    method public android.app.RemoteInput build();
    method public android.os.Bundle getExtras();
    method public android.app.RemoteInput.Builder setAllowFreeFormInput(boolean);
    method public android.app.RemoteInput.Builder setChoices(java.lang.CharSequence[]);
    method public android.app.RemoteInput.Builder setLabel(java.lang.CharSequence);
  }

  public class SearchManager implements android.content.DialogInterface.OnCancelListener android.content.DialogInterface.OnDismissListener {
    method public android.content.ComponentName getGlobalSearchActivity();
    method public android.app.SearchableInfo getSearchableInfo(android.content.ComponentName);
    method public java.util.List<android.app.SearchableInfo> getSearchablesInGlobalSearch();
    method public deprecated void onCancel(android.content.DialogInterface);
    method public deprecated void onDismiss(android.content.DialogInterface);
    method public void setOnCancelListener(android.app.SearchManager.OnCancelListener);
    method public void setOnDismissListener(android.app.SearchManager.OnDismissListener);
    method public void startSearch(java.lang.String, boolean, android.content.ComponentName, android.os.Bundle, boolean);
    method public void stopSearch();
    method public void triggerSearch(java.lang.String, android.content.ComponentName, android.os.Bundle);
    field public static final java.lang.String ACTION_KEY = "action_key";
    field public static final java.lang.String ACTION_MSG = "action_msg";
    field public static final java.lang.String APP_DATA = "app_data";
    field public static final java.lang.String CURSOR_EXTRA_KEY_IN_PROGRESS = "in_progress";
    field public static final java.lang.String EXTRA_DATA_KEY = "intent_extra_data_key";
    field public static final java.lang.String EXTRA_NEW_SEARCH = "new_search";
    field public static final java.lang.String EXTRA_SELECT_QUERY = "select_query";
    field public static final java.lang.String EXTRA_WEB_SEARCH_PENDINGINTENT = "web_search_pendingintent";
    field public static final int FLAG_QUERY_REFINEMENT = 1; // 0x1
    field public static final java.lang.String INTENT_ACTION_GLOBAL_SEARCH = "android.search.action.GLOBAL_SEARCH";
    field public static final java.lang.String INTENT_ACTION_SEARCHABLES_CHANGED = "android.search.action.SEARCHABLES_CHANGED";
    field public static final java.lang.String INTENT_ACTION_SEARCH_SETTINGS = "android.search.action.SEARCH_SETTINGS";
    field public static final java.lang.String INTENT_ACTION_SEARCH_SETTINGS_CHANGED = "android.search.action.SETTINGS_CHANGED";
    field public static final java.lang.String INTENT_ACTION_WEB_SEARCH_SETTINGS = "android.search.action.WEB_SEARCH_SETTINGS";
    field public static final java.lang.String INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED = "android.search.action.GLOBAL_SEARCH_ACTIVITY_CHANGED";
    field public static final char MENU_KEY = 115; // 0x0073 's'
    field public static final int MENU_KEYCODE = 47; // 0x2f
    field public static final java.lang.String QUERY = "query";
    field public static final java.lang.String SHORTCUT_MIME_TYPE = "vnd.android.cursor.item/vnd.android.search.suggest";
    field public static final java.lang.String SUGGEST_COLUMN_AUDIO_CHANNEL_CONFIG = "suggest_audio_channel_config";
    field public static final java.lang.String SUGGEST_COLUMN_CONTENT_TYPE = "suggest_content_type";
    field public static final java.lang.String SUGGEST_COLUMN_DURATION = "suggest_duration";
    field public static final java.lang.String SUGGEST_COLUMN_FLAGS = "suggest_flags";
    field public static final java.lang.String SUGGEST_COLUMN_FORMAT = "suggest_format";
    field public static final java.lang.String SUGGEST_COLUMN_ICON_1 = "suggest_icon_1";
    field public static final java.lang.String SUGGEST_COLUMN_ICON_2 = "suggest_icon_2";
    field public static final java.lang.String SUGGEST_COLUMN_INTENT_ACTION = "suggest_intent_action";
    field public static final java.lang.String SUGGEST_COLUMN_INTENT_DATA = "suggest_intent_data";
    field public static final java.lang.String SUGGEST_COLUMN_INTENT_DATA_ID = "suggest_intent_data_id";
    field public static final java.lang.String SUGGEST_COLUMN_INTENT_EXTRA_DATA = "suggest_intent_extra_data";
    field public static final java.lang.String SUGGEST_COLUMN_IS_LIVE = "suggest_is_live";
    field public static final java.lang.String SUGGEST_COLUMN_LAST_ACCESS_HINT = "suggest_last_access_hint";
    field public static final java.lang.String SUGGEST_COLUMN_PRODUCTION_YEAR = "suggest_production_year";
    field public static final java.lang.String SUGGEST_COLUMN_PURCHASE_PRICE = "suggest_purchase_price";
    field public static final java.lang.String SUGGEST_COLUMN_QUERY = "suggest_intent_query";
    field public static final java.lang.String SUGGEST_COLUMN_RATING_SCORE = "suggest_rating_score";
    field public static final java.lang.String SUGGEST_COLUMN_RATING_STYLE = "suggest_rating_style";
    field public static final java.lang.String SUGGEST_COLUMN_RENTAL_PRICE = "suggest_rental_price";
    field public static final java.lang.String SUGGEST_COLUMN_RESULT_CARD_IMAGE = "suggest_result_card_image";
    field public static final java.lang.String SUGGEST_COLUMN_SHORTCUT_ID = "suggest_shortcut_id";
    field public static final java.lang.String SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING = "suggest_spinner_while_refreshing";
    field public static final java.lang.String SUGGEST_COLUMN_TEXT_1 = "suggest_text_1";
    field public static final java.lang.String SUGGEST_COLUMN_TEXT_2 = "suggest_text_2";
    field public static final java.lang.String SUGGEST_COLUMN_TEXT_2_URL = "suggest_text_2_url";
    field public static final java.lang.String SUGGEST_COLUMN_VIDEO_HEIGHT = "suggest_video_height";
    field public static final java.lang.String SUGGEST_COLUMN_VIDEO_WIDTH = "suggest_video_width";
    field public static final java.lang.String SUGGEST_MIME_TYPE = "vnd.android.cursor.dir/vnd.android.search.suggest";
    field public static final java.lang.String SUGGEST_NEVER_MAKE_SHORTCUT = "_-1";
    field public static final java.lang.String SUGGEST_PARAMETER_LIMIT = "limit";
    field public static final java.lang.String SUGGEST_URI_PATH_QUERY = "search_suggest_query";
    field public static final java.lang.String SUGGEST_URI_PATH_SHORTCUT = "search_suggest_shortcut";
    field public static final java.lang.String USER_QUERY = "user_query";
  }

  public static abstract interface SearchManager.OnCancelListener {
    method public abstract void onCancel();
  }

  public static abstract interface SearchManager.OnDismissListener {
    method public abstract void onDismiss();
  }

  public final class SearchableInfo implements android.os.Parcelable {
    method public boolean autoUrlDetect();
    method public int describeContents();
    method public int getHintId();
    method public int getImeOptions();
    method public int getInputType();
    method public android.content.ComponentName getSearchActivity();
    method public int getSettingsDescriptionId();
    method public java.lang.String getSuggestAuthority();
    method public java.lang.String getSuggestIntentAction();
    method public java.lang.String getSuggestIntentData();
    method public java.lang.String getSuggestPackage();
    method public java.lang.String getSuggestPath();
    method public java.lang.String getSuggestSelection();
    method public int getSuggestThreshold();
    method public int getVoiceLanguageId();
    method public int getVoiceLanguageModeId();
    method public int getVoiceMaxResults();
    method public int getVoicePromptTextId();
    method public boolean getVoiceSearchEnabled();
    method public boolean getVoiceSearchLaunchRecognizer();
    method public boolean getVoiceSearchLaunchWebSearch();
    method public boolean queryAfterZeroResults();
    method public boolean shouldIncludeInGlobalSearch();
    method public boolean shouldRewriteQueryFromData();
    method public boolean shouldRewriteQueryFromText();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.SearchableInfo> CREATOR;
  }

  public abstract class Service extends android.content.ContextWrapper implements android.content.ComponentCallbacks2 {
    ctor public Service();
    method protected void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public final android.app.Application getApplication();
    method public abstract android.os.IBinder onBind(android.content.Intent);
    method public void onConfigurationChanged(android.content.res.Configuration);
    method public void onCreate();
    method public void onDestroy();
    method public void onLowMemory();
    method public void onRebind(android.content.Intent);
    method public deprecated void onStart(android.content.Intent, int);
    method public int onStartCommand(android.content.Intent, int, int);
    method public void onTaskRemoved(android.content.Intent);
    method public void onTrimMemory(int);
    method public boolean onUnbind(android.content.Intent);
    method public final void startForeground(int, android.app.Notification);
    method public final void stopForeground(boolean);
    method public final void stopSelf();
    method public final void stopSelf(int);
    method public final boolean stopSelfResult(int);
    field public static final int START_CONTINUATION_MASK = 15; // 0xf
    field public static final int START_FLAG_REDELIVERY = 1; // 0x1
    field public static final int START_FLAG_RETRY = 2; // 0x2
    field public static final int START_NOT_STICKY = 2; // 0x2
    field public static final int START_REDELIVER_INTENT = 3; // 0x3
    field public static final int START_STICKY = 1; // 0x1
    field public static final int START_STICKY_COMPATIBILITY = 0; // 0x0
  }

  public abstract class SharedElementCallback {
    ctor public SharedElementCallback();
    method public android.os.Parcelable onCaptureSharedElementSnapshot(android.view.View, android.graphics.Matrix, android.graphics.RectF);
    method public android.view.View onCreateSnapshotView(android.content.Context, android.os.Parcelable);
    method public void onMapSharedElements(java.util.List<java.lang.String>, java.util.Map<java.lang.String, android.view.View>);
    method public void onRejectSharedElements(java.util.List<android.view.View>);
    method public void onSharedElementEnd(java.util.List<java.lang.String>, java.util.List<android.view.View>, java.util.List<android.view.View>);
    method public void onSharedElementStart(java.util.List<java.lang.String>, java.util.List<android.view.View>, java.util.List<android.view.View>);
    method public void onSharedElementsArrived(java.util.List<java.lang.String>, java.util.List<android.view.View>, android.app.SharedElementCallback.OnSharedElementsReadyListener);
  }

  public static abstract interface SharedElementCallback.OnSharedElementsReadyListener {
    method public abstract void onSharedElementsReady();
  }

  public deprecated class TabActivity extends android.app.ActivityGroup {
    ctor public TabActivity();
    method public android.widget.TabHost getTabHost();
    method public android.widget.TabWidget getTabWidget();
    method public void setDefaultTab(java.lang.String);
    method public void setDefaultTab(int);
  }

  public class TaskStackBuilder {
    method public android.app.TaskStackBuilder addNextIntent(android.content.Intent);
    method public android.app.TaskStackBuilder addNextIntentWithParentStack(android.content.Intent);
    method public android.app.TaskStackBuilder addParentStack(android.app.Activity);
    method public android.app.TaskStackBuilder addParentStack(java.lang.Class<?>);
    method public android.app.TaskStackBuilder addParentStack(android.content.ComponentName);
    method public static android.app.TaskStackBuilder create(android.content.Context);
    method public android.content.Intent editIntentAt(int);
    method public int getIntentCount();
    method public android.content.Intent[] getIntents();
    method public android.app.PendingIntent getPendingIntent(int, int);
    method public android.app.PendingIntent getPendingIntent(int, int, android.os.Bundle);
    method public void startActivities();
    method public void startActivities(android.os.Bundle);
  }

  public class TimePickerDialog extends android.app.AlertDialog implements android.content.DialogInterface.OnClickListener android.widget.TimePicker.OnTimeChangedListener {
    ctor public TimePickerDialog(android.content.Context, android.app.TimePickerDialog.OnTimeSetListener, int, int, boolean);
    ctor public TimePickerDialog(android.content.Context, int, android.app.TimePickerDialog.OnTimeSetListener, int, int, boolean);
    method public void onClick(android.content.DialogInterface, int);
    method public void onTimeChanged(android.widget.TimePicker, int, int);
    method public void updateTime(int, int);
  }

  public static abstract interface TimePickerDialog.OnTimeSetListener {
    method public abstract void onTimeSet(android.widget.TimePicker, int, int);
  }

  public final class UiAutomation {
    method public void clearWindowAnimationFrameStats();
    method public boolean clearWindowContentFrameStats(int);
    method public android.view.accessibility.AccessibilityEvent executeAndWaitForEvent(java.lang.Runnable, android.app.UiAutomation.AccessibilityEventFilter, long) throws java.util.concurrent.TimeoutException;
    method public android.os.ParcelFileDescriptor executeShellCommand(java.lang.String);
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
    method public final android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
    method public android.view.WindowAnimationFrameStats getWindowAnimationFrameStats();
    method public android.view.WindowContentFrameStats getWindowContentFrameStats(int);
    method public java.util.List<android.view.accessibility.AccessibilityWindowInfo> getWindows();
    method public boolean injectInputEvent(android.view.InputEvent, boolean);
    method public final boolean performGlobalAction(int);
    method public void setOnAccessibilityEventListener(android.app.UiAutomation.OnAccessibilityEventListener);
    method public boolean setRotation(int);
    method public void setRunAsMonkey(boolean);
    method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo);
    method public android.graphics.Bitmap takeScreenshot();
    method public void waitForIdle(long, long) throws java.util.concurrent.TimeoutException;
    field public static final int ROTATION_FREEZE_0 = 0; // 0x0
    field public static final int ROTATION_FREEZE_180 = 2; // 0x2
    field public static final int ROTATION_FREEZE_270 = 3; // 0x3
    field public static final int ROTATION_FREEZE_90 = 1; // 0x1
    field public static final int ROTATION_FREEZE_CURRENT = -1; // 0xffffffff
    field public static final int ROTATION_UNFREEZE = -2; // 0xfffffffe
  }

  public static abstract interface UiAutomation.AccessibilityEventFilter {
    method public abstract boolean accept(android.view.accessibility.AccessibilityEvent);
  }

  public static abstract interface UiAutomation.OnAccessibilityEventListener {
    method public abstract void onAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
  }

  public class UiModeManager {
    method public void disableCarMode(int);
    method public void enableCarMode(int);
    method public int getCurrentModeType();
    method public int getNightMode();
    method public void setNightMode(int);
    field public static java.lang.String ACTION_ENTER_CAR_MODE;
    field public static java.lang.String ACTION_ENTER_DESK_MODE;
    field public static java.lang.String ACTION_EXIT_CAR_MODE;
    field public static java.lang.String ACTION_EXIT_DESK_MODE;
    field public static final int DISABLE_CAR_MODE_GO_HOME = 1; // 0x1
    field public static final int ENABLE_CAR_MODE_ALLOW_SLEEP = 2; // 0x2
    field public static final int ENABLE_CAR_MODE_GO_CAR_HOME = 1; // 0x1
    field public static final int MODE_NIGHT_AUTO = 0; // 0x0
    field public static final int MODE_NIGHT_NO = 1; // 0x1
    field public static final int MODE_NIGHT_YES = 2; // 0x2
  }

  public class VoiceInteractor {
    method public boolean submitRequest(android.app.VoiceInteractor.Request);
    method public boolean[] supportsCommands(java.lang.String[]);
  }

  public static class VoiceInteractor.AbortVoiceRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.AbortVoiceRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onAbortResult(android.os.Bundle);
  }

  public static class VoiceInteractor.CommandRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.CommandRequest(java.lang.String, android.os.Bundle);
    method public void onCommandResult(boolean, android.os.Bundle);
  }

  public static class VoiceInteractor.CompleteVoiceRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.CompleteVoiceRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onCompleteResult(android.os.Bundle);
  }

  public static class VoiceInteractor.ConfirmationRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.ConfirmationRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onConfirmationResult(boolean, android.os.Bundle);
  }

  public static class VoiceInteractor.PickOptionRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.PickOptionRequest(java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }

  public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable {
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence);
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence, int);
    method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence);
    method public int countSynonyms();
    method public int describeContents();
    method public android.os.Bundle getExtras();
    method public int getIndex();
    method public java.lang.CharSequence getLabel();
    method public java.lang.CharSequence getSynonymAt(int);
    method public void setExtras(android.os.Bundle);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.VoiceInteractor.PickOptionRequest.Option> CREATOR;
  }

  public static abstract class VoiceInteractor.Request {
    method public void cancel();
    method public android.app.Activity getActivity();
    method public android.content.Context getContext();
    method public void onAttached(android.app.Activity);
    method public void onCancel();
    method public void onDetached();
  }

  public final class WallpaperInfo implements android.os.Parcelable {
    ctor public WallpaperInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public android.content.ComponentName getComponent();
    method public java.lang.String getPackageName();
    method public android.content.pm.ServiceInfo getServiceInfo();
    method public java.lang.String getServiceName();
    method public java.lang.String getSettingsActivity();
    method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
    method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    method public android.graphics.drawable.Drawable loadThumbnail(android.content.pm.PackageManager);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.WallpaperInfo> CREATOR;
  }

  public class WallpaperManager {
    method public void clear() throws java.io.IOException;
    method public void clearWallpaperOffsets(android.os.IBinder);
    method public void forgetLoadedWallpaper();
    method public android.graphics.drawable.Drawable getBuiltInDrawable();
    method public android.graphics.drawable.Drawable getBuiltInDrawable(int, int, boolean, float, float);
    method public android.content.Intent getCropAndSetWallpaperIntent(android.net.Uri);
    method public int getDesiredMinimumHeight();
    method public int getDesiredMinimumWidth();
    method public android.graphics.drawable.Drawable getDrawable();
    method public android.graphics.drawable.Drawable getFastDrawable();
    method public static android.app.WallpaperManager getInstance(android.content.Context);
    method public android.app.WallpaperInfo getWallpaperInfo();
    method public boolean hasResourceWallpaper(int);
    method public boolean isWallpaperSupported();
    method public android.graphics.drawable.Drawable peekDrawable();
    method public android.graphics.drawable.Drawable peekFastDrawable();
    method public void sendWallpaperCommand(android.os.IBinder, java.lang.String, int, int, int, android.os.Bundle);
    method public void setBitmap(android.graphics.Bitmap) throws java.io.IOException;
    method public void setResource(int) throws java.io.IOException;
    method public void setStream(java.io.InputStream) throws java.io.IOException;
    method public void setWallpaperOffsetSteps(float, float);
    method public void setWallpaperOffsets(android.os.IBinder, float, float);
    method public void suggestDesiredDimensions(int, int);
    field public static final java.lang.String ACTION_CHANGE_LIVE_WALLPAPER = "android.service.wallpaper.CHANGE_LIVE_WALLPAPER";
    field public static final java.lang.String ACTION_CROP_AND_SET_WALLPAPER = "android.service.wallpaper.CROP_AND_SET_WALLPAPER";
    field public static final java.lang.String ACTION_LIVE_WALLPAPER_CHOOSER = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER";
    field public static final java.lang.String COMMAND_DROP = "android.home.drop";
    field public static final java.lang.String COMMAND_SECONDARY_TAP = "android.wallpaper.secondaryTap";
    field public static final java.lang.String COMMAND_TAP = "android.wallpaper.tap";
    field public static final java.lang.String EXTRA_LIVE_WALLPAPER_COMPONENT = "android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT";
    field public static final java.lang.String WALLPAPER_PREVIEW_META_DATA = "android.wallpaper.preview";
  }

}

package android.app.admin {

  public final class DeviceAdminInfo implements android.os.Parcelable {
    ctor public DeviceAdminInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public android.content.pm.ActivityInfo getActivityInfo();
    method public android.content.ComponentName getComponent();
    method public java.lang.String getPackageName();
    method public java.lang.String getReceiverName();
    method public java.lang.String getTagForPolicy(int);
    method public boolean isVisible();
    method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    method public boolean usesPolicy(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.admin.DeviceAdminInfo> CREATOR;
    field public static final int USES_ENCRYPTED_STORAGE = 7; // 0x7
    field public static final int USES_POLICY_DISABLE_CAMERA = 8; // 0x8
    field public static final int USES_POLICY_DISABLE_KEYGUARD_FEATURES = 9; // 0x9
    field public static final int USES_POLICY_EXPIRE_PASSWORD = 6; // 0x6
    field public static final int USES_POLICY_FORCE_LOCK = 3; // 0x3
    field public static final int USES_POLICY_LIMIT_PASSWORD = 0; // 0x0
    field public static final int USES_POLICY_RESET_PASSWORD = 2; // 0x2
    field public static final int USES_POLICY_WATCH_LOGIN = 1; // 0x1
    field public static final int USES_POLICY_WIPE_DATA = 4; // 0x4
  }

  public class DeviceAdminReceiver extends android.content.BroadcastReceiver {
    ctor public DeviceAdminReceiver();
    method public android.app.admin.DevicePolicyManager getManager(android.content.Context);
    method public android.content.ComponentName getWho(android.content.Context);
    method public java.lang.String onChoosePrivateKeyAlias(android.content.Context, android.content.Intent, int, java.lang.String, int, java.lang.String, java.lang.String);
    method public java.lang.CharSequence onDisableRequested(android.content.Context, android.content.Intent);
    method public void onDisabled(android.content.Context, android.content.Intent);
    method public void onEnabled(android.content.Context, android.content.Intent);
    method public void onLockTaskModeEntering(android.content.Context, android.content.Intent, java.lang.String);
    method public void onLockTaskModeExiting(android.content.Context, android.content.Intent);
    method public void onPasswordChanged(android.content.Context, android.content.Intent);
    method public void onPasswordExpiring(android.content.Context, android.content.Intent);
    method public void onPasswordFailed(android.content.Context, android.content.Intent);
    method public void onPasswordSucceeded(android.content.Context, android.content.Intent);
    method public void onProfileProvisioningComplete(android.content.Context, android.content.Intent);
    method public void onReadyForUserInitialization(android.content.Context, android.content.Intent);
    method public void onReceive(android.content.Context, android.content.Intent);
    field public static final java.lang.String ACTION_DEVICE_ADMIN_DISABLED = "android.app.action.DEVICE_ADMIN_DISABLED";
    field public static final java.lang.String ACTION_DEVICE_ADMIN_DISABLE_REQUESTED = "android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED";
    field public static final java.lang.String ACTION_DEVICE_ADMIN_ENABLED = "android.app.action.DEVICE_ADMIN_ENABLED";
    field public static final java.lang.String ACTION_LOCK_TASK_ENTERING = "android.app.action.LOCK_TASK_ENTERING";
    field public static final java.lang.String ACTION_LOCK_TASK_EXITING = "android.app.action.LOCK_TASK_EXITING";
    field public static final java.lang.String ACTION_PASSWORD_CHANGED = "android.app.action.ACTION_PASSWORD_CHANGED";
    field public static final java.lang.String ACTION_PASSWORD_EXPIRING = "android.app.action.ACTION_PASSWORD_EXPIRING";
    field public static final java.lang.String ACTION_PASSWORD_FAILED = "android.app.action.ACTION_PASSWORD_FAILED";
    field public static final java.lang.String ACTION_PASSWORD_SUCCEEDED = "android.app.action.ACTION_PASSWORD_SUCCEEDED";
    field public static final java.lang.String ACTION_PROFILE_PROVISIONING_COMPLETE = "android.app.action.PROFILE_PROVISIONING_COMPLETE";
    field public static final java.lang.String ACTION_READY_FOR_USER_INITIALIZATION = "android.app.action.READY_FOR_USER_INITIALIZATION";
    field public static final java.lang.String DEVICE_ADMIN_META_DATA = "android.app.device_admin";
    field public static final java.lang.String EXTRA_DISABLE_WARNING = "android.app.extra.DISABLE_WARNING";
    field public static final java.lang.String EXTRA_LOCK_TASK_PACKAGE = "android.app.extra.LOCK_TASK_PACKAGE";
  }

  public class DeviceInitializerStatus {
    method public static boolean isCustomStatus(int);
    method public static boolean isErrorStatus(int);
    method public static boolean isHighPriority(int);
    field public static final int FLAG_STATUS_CUSTOM = 33554432; // 0x2000000
    field public static final int FLAG_STATUS_ERROR = 16777216; // 0x1000000
    field public static final int FLAG_STATUS_HIGH_PRIORITY = 134217728; // 0x8000000
    field public static final int FLAG_STATUS_RESERVED = 67108864; // 0x4000000
    field public static final int STATUS_ERROR_CONNECT_WIFI = 16777237; // 0x1000015
    field public static final int STATUS_ERROR_DELETE_APPS = 16777242; // 0x100001a
    field public static final int STATUS_ERROR_DOUBLE_BUMP = 16777246; // 0x100001e
    field public static final int STATUS_ERROR_DOWNLOAD_PACKAGE = 16777239; // 0x1000017
    field public static final int STATUS_ERROR_INSTALL_PACKAGE = 16777240; // 0x1000018
    field public static final int STATUS_ERROR_RESET_PROTECTION_BLOCKING_PROVISIONING = 16777238; // 0x1000016
    field public static final int STATUS_ERROR_SET_DEVICE_POLICY = 16777241; // 0x1000019
    field public static final int STATUS_STATE_CONNECT_BLUETOOTH_PROXY = 134217736; // 0x8000008
    field public static final int STATUS_STATE_DEVICE_PROVISIONED = 134217738; // 0x800000a
    field public static final int STATUS_STATE_DISCONNECT_BLUETOOTH_PROXY = 134217737; // 0x8000009
  }

  public class DevicePolicyManager {
    method public void addCrossProfileIntentFilter(android.content.ComponentName, android.content.IntentFilter, int);
    method public boolean addCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
    method public void addPersistentPreferredActivity(android.content.ComponentName, android.content.IntentFilter, android.content.ComponentName);
    method public void addUserRestriction(android.content.ComponentName, java.lang.String);
    method public void clearCrossProfileIntentFilters(android.content.ComponentName);
    method public void clearDeviceInitializerApp(android.content.ComponentName);
    method public void clearDeviceOwnerApp(java.lang.String);
    method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
    method public void clearUserRestriction(android.content.ComponentName, java.lang.String);
    method public android.os.UserHandle createAndInitializeUser(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle);
    method public android.os.UserHandle createUser(android.content.ComponentName, java.lang.String);
    method public void enableSystemApp(android.content.ComponentName, java.lang.String);
    method public int enableSystemApp(android.content.ComponentName, android.content.Intent);
    method public java.lang.String[] getAccountTypesWithManagementDisabled();
    method public java.util.List<android.content.ComponentName> getActiveAdmins();
    method public android.os.Bundle getApplicationRestrictions(android.content.ComponentName, java.lang.String);
    method public boolean getAutoTimeRequired();
    method public boolean getCameraDisabled(android.content.ComponentName);
    method public java.lang.String getCertInstallerPackage(android.content.ComponentName) throws java.lang.SecurityException;
    method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName);
    method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName);
    method public int getCurrentFailedPasswordAttempts();
    method public java.util.List<byte[]> getInstalledCaCerts(android.content.ComponentName);
    method public int getKeyguardDisabledFeatures(android.content.ComponentName);
    method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName);
    method public long getMaximumTimeToLock(android.content.ComponentName);
    method public long getPasswordExpiration(android.content.ComponentName);
    method public long getPasswordExpirationTimeout(android.content.ComponentName);
    method public int getPasswordHistoryLength(android.content.ComponentName);
    method public int getPasswordMaximumLength(int);
    method public int getPasswordMinimumLength(android.content.ComponentName);
    method public int getPasswordMinimumLetters(android.content.ComponentName);
    method public int getPasswordMinimumLowerCase(android.content.ComponentName);
    method public int getPasswordMinimumNonLetter(android.content.ComponentName);
    method public int getPasswordMinimumNumeric(android.content.ComponentName);
    method public int getPasswordMinimumSymbols(android.content.ComponentName);
    method public int getPasswordMinimumUpperCase(android.content.ComponentName);
    method public int getPasswordQuality(android.content.ComponentName);
    method public java.util.List<java.lang.String> getPermittedAccessibilityServices(android.content.ComponentName);
    method public java.util.List<java.lang.String> getPermittedInputMethods(android.content.ComponentName);
    method public boolean getScreenCaptureDisabled(android.content.ComponentName);
    method public boolean getStorageEncryption(android.content.ComponentName);
    method public int getStorageEncryptionStatus();
    method public java.util.List<android.os.PersistableBundle> getTrustAgentConfiguration(android.content.ComponentName, android.content.ComponentName);
    method public boolean hasCaCertInstalled(android.content.ComponentName, byte[]);
    method public boolean hasGrantedPolicy(android.content.ComponentName, int);
    method public boolean installCaCert(android.content.ComponentName, byte[]);
    method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String);
    method public boolean isActivePasswordSufficient();
    method public boolean isAdminActive(android.content.ComponentName);
    method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String);
    method public boolean isDeviceInitializerApp(java.lang.String);
    method public boolean isDeviceOwnerApp(java.lang.String);
    method public boolean isLockTaskPermitted(java.lang.String);
    method public boolean isMasterVolumeMuted(android.content.ComponentName);
    method public boolean isProfileOwnerApp(java.lang.String);
    method public boolean isUninstallBlocked(android.content.ComponentName, java.lang.String);
    method public void lockNow();
    method public void removeActiveAdmin(android.content.ComponentName);
    method public boolean removeCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
    method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
    method public boolean resetPassword(java.lang.String, int);
    method public void sendDeviceInitializerStatus(int, java.lang.String);
    method public void setAccountManagementDisabled(android.content.ComponentName, java.lang.String, boolean);
    method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean);
    method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle);
    method public void setAutoTimeRequired(android.content.ComponentName, boolean);
    method public void setCameraDisabled(android.content.ComponentName, boolean);
    method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException;
    method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean);
    method public boolean setDeviceInitializer(android.content.ComponentName, android.content.ComponentName, java.lang.String) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String);
    method public void setKeyguardDisabledFeatures(android.content.ComponentName, int);
    method public void setLockTaskPackages(android.content.ComponentName, java.lang.String[]) throws java.lang.SecurityException;
    method public void setMasterVolumeMuted(android.content.ComponentName, boolean);
    method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int);
    method public void setMaximumTimeToLock(android.content.ComponentName, long);
    method public void setPasswordExpirationTimeout(android.content.ComponentName, long);
    method public void setPasswordHistoryLength(android.content.ComponentName, int);
    method public void setPasswordMinimumLength(android.content.ComponentName, int);
    method public void setPasswordMinimumLetters(android.content.ComponentName, int);
    method public void setPasswordMinimumLowerCase(android.content.ComponentName, int);
    method public void setPasswordMinimumNonLetter(android.content.ComponentName, int);
    method public void setPasswordMinimumNumeric(android.content.ComponentName, int);
    method public void setPasswordMinimumSymbols(android.content.ComponentName, int);
    method public void setPasswordMinimumUpperCase(android.content.ComponentName, int);
    method public void setPasswordQuality(android.content.ComponentName, int);
    method public boolean setPermittedAccessibilityServices(android.content.ComponentName, java.util.List<java.lang.String>);
    method public boolean setPermittedInputMethods(android.content.ComponentName, java.util.List<java.lang.String>);
    method public void setProfileEnabled(android.content.ComponentName);
    method public void setProfileName(android.content.ComponentName, java.lang.String);
    method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
    method public void setRestrictionsProvider(android.content.ComponentName, android.content.ComponentName);
    method public void setScreenCaptureDisabled(android.content.ComponentName, boolean);
    method public void setSecureSetting(android.content.ComponentName, java.lang.String, java.lang.String);
    method public int setStorageEncryption(android.content.ComponentName, boolean);
    method public void setTrustAgentConfiguration(android.content.ComponentName, android.content.ComponentName, android.os.PersistableBundle);
    method public void setUninstallBlocked(android.content.ComponentName, java.lang.String, boolean);
    method public boolean setUserEnabled(android.content.ComponentName);
    method public void setUserIcon(android.content.ComponentName, android.graphics.Bitmap);
    method public boolean switchUser(android.content.ComponentName, android.os.UserHandle);
    method public void uninstallAllUserCaCerts(android.content.ComponentName);
    method public void uninstallCaCert(android.content.ComponentName, byte[]);
    method public void wipeData(int);
    field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
    field public static final java.lang.String ACTION_MANAGED_PROFILE_PROVISIONED = "android.app.action.MANAGED_PROFILE_PROVISIONED";
    field public static final java.lang.String ACTION_PROVISION_MANAGED_PROFILE = "android.app.action.PROVISION_MANAGED_PROFILE";
    field public static final java.lang.String ACTION_SET_NEW_PASSWORD = "android.app.action.SET_NEW_PASSWORD";
    field public static final java.lang.String ACTION_START_ENCRYPTION = "android.app.action.START_ENCRYPTION";
    field public static final int ENCRYPTION_STATUS_ACTIVATING = 2; // 0x2
    field public static final int ENCRYPTION_STATUS_ACTIVE = 3; // 0x3
    field public static final int ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY = 4; // 0x4
    field public static final int ENCRYPTION_STATUS_INACTIVE = 1; // 0x1
    field public static final int ENCRYPTION_STATUS_UNSUPPORTED = 0; // 0x0
    field public static final java.lang.String EXTRA_ADD_EXPLANATION = "android.app.extra.ADD_EXPLANATION";
    field public static final java.lang.String EXTRA_DEVICE_ADMIN = "android.app.extra.DEVICE_ADMIN";
    field public static final java.lang.String EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE = "android.app.extra.PROVISIONING_ACCOUNT_TO_MIGRATE";
    field public static final java.lang.String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE = "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_DEVICE_ID = "android.app.extra.PROVISIONING_BT_DEVICE_ID";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_MAC_ADDRESS = "android.app.extra.PROVISIONING_BT_MAC_ADDRESS";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_USE_PROXY = "android.app.extra.PROVISIONING_BT_USE_PROXY";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_UUID = "android.app.extra.PROVISIONING_BT_UUID";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE = "android.app.extra.PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
    field public static final deprecated java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME = "android.app.extra.PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_INITIALIZER_MINIMUM_VERSION_CODE = "android.app.extra.PROVISIONING_DEVICE_INITIALIZER_MINIMUM_VERSION_CODE";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION";
    field public static final java.lang.String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.PROVISIONING_EMAIL_ADDRESS";
    field public static final java.lang.String EXTRA_PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED = "android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED";
    field public static final java.lang.String EXTRA_PROVISIONING_LOCALE = "android.app.extra.PROVISIONING_LOCALE";
    field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.PROVISIONING_LOCAL_TIME";
    field public static final java.lang.String EXTRA_PROVISIONING_RESET_PROTECTION_PARAMETERS = "android.app.extra.PROVISIONING_RESET_PROTECTION_PARAMETERS";
    field public static final java.lang.String EXTRA_PROVISIONING_SKIP_ENCRYPTION = "android.app.extra.PROVISIONING_SKIP_ENCRYPTION";
    field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.PROVISIONING_TIME_ZONE";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_HIDDEN = "android.app.extra.PROVISIONING_WIFI_HIDDEN";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PAC_URL = "android.app.extra.PROVISIONING_WIFI_PAC_URL";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PASSWORD = "android.app.extra.PROVISIONING_WIFI_PASSWORD";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_BYPASS = "android.app.extra.PROVISIONING_WIFI_PROXY_BYPASS";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_HOST = "android.app.extra.PROVISIONING_WIFI_PROXY_HOST";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_PORT = "android.app.extra.PROVISIONING_WIFI_PROXY_PORT";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SECURITY_TYPE = "android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE";
    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SSID = "android.app.extra.PROVISIONING_WIFI_SSID";
    field public static final int FLAG_MANAGED_CAN_ACCESS_PARENT = 2; // 0x2
    field public static final int FLAG_PARENT_CAN_ACCESS_MANAGED = 1; // 0x1
    field public static final int KEYGUARD_DISABLE_FEATURES_ALL = 2147483647; // 0x7fffffff
    field public static final int KEYGUARD_DISABLE_FEATURES_NONE = 0; // 0x0
    field public static final int KEYGUARD_DISABLE_FINGERPRINT = 32; // 0x20
    field public static final int KEYGUARD_DISABLE_SECURE_CAMERA = 2; // 0x2
    field public static final int KEYGUARD_DISABLE_SECURE_NOTIFICATIONS = 4; // 0x4
    field public static final int KEYGUARD_DISABLE_TRUST_AGENTS = 16; // 0x10
    field public static final int KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS = 8; // 0x8
    field public static final int KEYGUARD_DISABLE_WIDGETS_ALL = 1; // 0x1
    field public static final java.lang.String MIME_TYPE_PROVISIONING_NFC = "application/com.android.managedprovisioning";
    field public static final java.lang.String MIME_TYPE_PROVISIONING_NFC_V2 = "application/com.android.managedprovisioning.v2";
    field public static final int PASSWORD_QUALITY_ALPHABETIC = 262144; // 0x40000
    field public static final int PASSWORD_QUALITY_ALPHANUMERIC = 327680; // 0x50000
    field public static final int PASSWORD_QUALITY_BIOMETRIC_WEAK = 32768; // 0x8000
    field public static final int PASSWORD_QUALITY_COMPLEX = 393216; // 0x60000
    field public static final int PASSWORD_QUALITY_NUMERIC = 131072; // 0x20000
    field public static final int PASSWORD_QUALITY_NUMERIC_COMPLEX = 196608; // 0x30000
    field public static final int PASSWORD_QUALITY_SOMETHING = 65536; // 0x10000
    field public static final int PASSWORD_QUALITY_UNSPECIFIED = 0; // 0x0
    field public static final int RESET_PASSWORD_REQUIRE_ENTRY = 1; // 0x1
    field public static final int WIPE_EXTERNAL_STORAGE = 1; // 0x1
    field public static final int WIPE_RESET_PROTECTION_DATA = 2; // 0x2
  }

}

package android.app.backup {

  public abstract class BackupAgent extends android.content.ContextWrapper {
    ctor public BackupAgent();
    method public final void fullBackupFile(java.io.File, android.app.backup.FullBackupDataOutput);
    method public abstract void onBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor) throws java.io.IOException;
    method public void onCreate();
    method public void onDestroy();
    method public void onFullBackup(android.app.backup.FullBackupDataOutput) throws java.io.IOException;
    method public abstract void onRestore(android.app.backup.BackupDataInput, int, android.os.ParcelFileDescriptor) throws java.io.IOException;
    method public void onRestoreFile(android.os.ParcelFileDescriptor, long, java.io.File, int, long, long) throws java.io.IOException;
    method public void onRestoreFinished();
    field public static final int TYPE_DIRECTORY = 2; // 0x2
    field public static final int TYPE_FILE = 1; // 0x1
  }

  public class BackupAgentHelper extends android.app.backup.BackupAgent {
    ctor public BackupAgentHelper();
    method public void addHelper(java.lang.String, android.app.backup.BackupHelper);
    method public void onBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor) throws java.io.IOException;
    method public void onRestore(android.app.backup.BackupDataInput, int, android.os.ParcelFileDescriptor) throws java.io.IOException;
  }

  public class BackupDataInput {
    method public int getDataSize();
    method public java.lang.String getKey();
    method public int readEntityData(byte[], int, int) throws java.io.IOException;
    method public boolean readNextHeader() throws java.io.IOException;
    method public void skipEntityData() throws java.io.IOException;
  }

  public class BackupDataInputStream extends java.io.InputStream {
    method public java.lang.String getKey();
    method public int read() throws java.io.IOException;
    method public int size();
  }

  public class BackupDataOutput {
    method public int writeEntityData(byte[], int) throws java.io.IOException;
    method public int writeEntityHeader(java.lang.String, int) throws java.io.IOException;
  }

  public abstract interface BackupHelper {
    method public abstract void performBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor);
    method public abstract void restoreEntity(android.app.backup.BackupDataInputStream);
    method public abstract void writeNewStateDescription(android.os.ParcelFileDescriptor);
  }

  public class BackupManager {
    ctor public BackupManager(android.content.Context);
    method public void dataChanged();
    method public static void dataChanged(java.lang.String);
    method public int requestRestore(android.app.backup.RestoreObserver);
  }

  public class FileBackupHelper extends android.app.backup.FileBackupHelperBase implements android.app.backup.BackupHelper {
    ctor public FileBackupHelper(android.content.Context, java.lang.String...);
    method public void performBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor);
    method public void restoreEntity(android.app.backup.BackupDataInputStream);
  }

   class FileBackupHelperBase {
    method public void writeNewStateDescription(android.os.ParcelFileDescriptor);
  }

  public class FullBackupDataOutput {
  }

  public abstract class RestoreObserver {
    ctor public RestoreObserver();
    method public void onUpdate(int, java.lang.String);
    method public void restoreFinished(int);
    method public void restoreStarting(int);
  }

  public class SharedPreferencesBackupHelper extends android.app.backup.FileBackupHelperBase implements android.app.backup.BackupHelper {
    ctor public SharedPreferencesBackupHelper(android.content.Context, java.lang.String...);
    method public void performBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor);
    method public void restoreEntity(android.app.backup.BackupDataInputStream);
  }

}

package android.app.job {

  public class JobInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int getBackoffPolicy();
    method public android.os.PersistableBundle getExtras();
    method public int getId();
    method public long getInitialBackoffMillis();
    method public long getIntervalMillis();
    method public long getMaxExecutionDelayMillis();
    method public long getMinLatencyMillis();
    method public int getNetworkType();
    method public android.content.ComponentName getService();
    method public boolean isPeriodic();
    method public boolean isPersisted();
    method public boolean isRequireCharging();
    method public boolean isRequireDeviceIdle();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int BACKOFF_POLICY_EXPONENTIAL = 1; // 0x1
    field public static final int BACKOFF_POLICY_LINEAR = 0; // 0x0
    field public static final android.os.Parcelable.Creator<android.app.job.JobInfo> CREATOR;
    field public static final long DEFAULT_INITIAL_BACKOFF_MILLIS = 30000L; // 0x7530L
    field public static final long MAX_BACKOFF_DELAY_MILLIS = 18000000L; // 0x112a880L
    field public static final int NETWORK_TYPE_ANY = 1; // 0x1
    field public static final int NETWORK_TYPE_NONE = 0; // 0x0
    field public static final int NETWORK_TYPE_UNMETERED = 2; // 0x2
  }

  public static final class JobInfo.Builder {
    ctor public JobInfo.Builder(int, android.content.ComponentName);
    method public android.app.job.JobInfo build();
    method public android.app.job.JobInfo.Builder setBackoffCriteria(long, int);
    method public android.app.job.JobInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.app.job.JobInfo.Builder setMinimumLatency(long);
    method public android.app.job.JobInfo.Builder setOverrideDeadline(long);
    method public android.app.job.JobInfo.Builder setPeriodic(long);
    method public android.app.job.JobInfo.Builder setPersisted(boolean);
    method public android.app.job.JobInfo.Builder setRequiredNetworkType(int);
    method public android.app.job.JobInfo.Builder setRequiresCharging(boolean);
    method public android.app.job.JobInfo.Builder setRequiresDeviceIdle(boolean);
  }

  public class JobParameters implements android.os.Parcelable {
    method public int describeContents();
    method public android.os.PersistableBundle getExtras();
    method public int getJobId();
    method public boolean isOverrideDeadlineExpired();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.job.JobParameters> CREATOR;
  }

  public abstract class JobScheduler {
    ctor public JobScheduler();
    method public abstract void cancel(int);
    method public abstract void cancelAll();
    method public abstract java.util.List<android.app.job.JobInfo> getAllPendingJobs();
    method public abstract int schedule(android.app.job.JobInfo);
    field public static final int RESULT_FAILURE = 0; // 0x0
    field public static final int RESULT_SUCCESS = 1; // 0x1
  }

  public abstract class JobService extends android.app.Service {
    ctor public JobService();
    method public final void jobFinished(android.app.job.JobParameters, boolean);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
    method public abstract boolean onStopJob(android.app.job.JobParameters);
    field public static final java.lang.String PERMISSION_BIND = "android.permission.BIND_JOB_SERVICE";
  }

}

package android.app.usage {

  public final class ConfigurationStats implements android.os.Parcelable {
    ctor public ConfigurationStats(android.app.usage.ConfigurationStats);
    method public int describeContents();
    method public int getActivationCount();
    method public android.content.res.Configuration getConfiguration();
    method public long getFirstTimeStamp();
    method public long getLastTimeActive();
    method public long getLastTimeStamp();
    method public long getTotalTimeActive();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.usage.ConfigurationStats> CREATOR;
  }

  public class NetworkStatsManager {
    method public android.app.usage.NetworkUsageStats queryDetails(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkUsageStats queryDetailsForUid(int, java.lang.String, long, long, int) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkUsageStats querySummary(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkUsageStats.Bucket querySummaryForDevice(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkUsageStats.Bucket querySummaryForUser(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
  }

  public final class NetworkUsageStats implements java.lang.AutoCloseable {
    method public void close();
    method public boolean getNextBucket(android.app.usage.NetworkUsageStats.Bucket);
    method public boolean hasNextBucket();
  }

  public static class NetworkUsageStats.Bucket {
    ctor public NetworkUsageStats.Bucket();
    method public long getEndTimeStamp();
    method public long getRxBytes();
    method public long getRxPackets();
    method public long getStartTimeStamp();
    method public int getState();
    method public long getTxBytes();
    method public long getTxPackets();
    method public int getUid();
    field public static final int STATE_ALL = -1; // 0xffffffff
    field public static final int STATE_DEFAULT = 1; // 0x1
    field public static final int STATE_FOREGROUND = 2; // 0x2
    field public static final int UID_REMOVED = -4; // 0xfffffffc
    field public static final int UID_TETHERING = -5; // 0xfffffffb
  }

  public final class UsageEvents implements android.os.Parcelable {
    method public int describeContents();
    method public boolean getNextEvent(android.app.usage.UsageEvents.Event);
    method public boolean hasNextEvent();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.usage.UsageEvents> CREATOR;
  }

  public static final class UsageEvents.Event {
    ctor public UsageEvents.Event();
    method public java.lang.String getClassName();
    method public android.content.res.Configuration getConfiguration();
    method public int getEventType();
    method public java.lang.String getPackageName();
    method public long getTimeStamp();
    field public static final int CONFIGURATION_CHANGE = 5; // 0x5
    field public static final int INTERACTION = 6; // 0x6
    field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
    field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
    field public static final int NONE = 0; // 0x0
  }

  public final class UsageStats implements android.os.Parcelable {
    ctor public UsageStats(android.app.usage.UsageStats);
    method public void add(android.app.usage.UsageStats);
    method public int describeContents();
    method public long getFirstTimeStamp();
    method public long getLastTimeStamp();
    method public long getLastTimeUsed();
    method public java.lang.String getPackageName();
    method public long getTotalTimeInForeground();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.usage.UsageStats> CREATOR;
  }

  public final class UsageStatsManager {
    method public java.util.Map<java.lang.String, android.app.usage.UsageStats> queryAndAggregateUsageStats(long, long);
    method public java.util.List<android.app.usage.ConfigurationStats> queryConfigurations(int, long, long);
    method public android.app.usage.UsageEvents queryEvents(long, long);
    method public java.util.List<android.app.usage.UsageStats> queryUsageStats(int, long, long);
    field public static final int INTERVAL_BEST = 4; // 0x4
    field public static final int INTERVAL_DAILY = 0; // 0x0
    field public static final int INTERVAL_MONTHLY = 2; // 0x2
    field public static final int INTERVAL_WEEKLY = 1; // 0x1
    field public static final int INTERVAL_YEARLY = 3; // 0x3
  }

}

package android.appwidget {

  public class AppWidgetHost {
    ctor public AppWidgetHost(android.content.Context, int);
    method public int allocateAppWidgetId();
    method protected void clearViews();
    method public final android.appwidget.AppWidgetHostView createView(android.content.Context, int, android.appwidget.AppWidgetProviderInfo);
    method public static void deleteAllHosts();
    method public void deleteAppWidgetId(int);
    method public void deleteHost();
    method protected android.appwidget.AppWidgetHostView onCreateView(android.content.Context, int, android.appwidget.AppWidgetProviderInfo);
    method protected void onProviderChanged(int, android.appwidget.AppWidgetProviderInfo);
    method protected void onProvidersChanged();
    method public final void startAppWidgetConfigureActivityForResult(android.app.Activity, int, int, int, android.os.Bundle);
    method public void startListening();
    method public void stopListening();
  }

  public class AppWidgetHostView extends android.widget.FrameLayout {
    ctor public AppWidgetHostView(android.content.Context);
    ctor public AppWidgetHostView(android.content.Context, int, int);
    method public int getAppWidgetId();
    method public android.appwidget.AppWidgetProviderInfo getAppWidgetInfo();
    method public static android.graphics.Rect getDefaultPaddingForWidget(android.content.Context, android.content.ComponentName, android.graphics.Rect);
    method protected android.view.View getDefaultView();
    method protected android.view.View getErrorView();
    method protected void prepareView(android.view.View);
    method public void setAppWidget(int, android.appwidget.AppWidgetProviderInfo);
    method public void updateAppWidget(android.widget.RemoteViews);
    method public void updateAppWidgetOptions(android.os.Bundle);
    method public void updateAppWidgetSize(android.os.Bundle, int, int, int, int);
  }

  public class AppWidgetManager {
    method public boolean bindAppWidgetIdIfAllowed(int, android.content.ComponentName);
    method public boolean bindAppWidgetIdIfAllowed(int, android.content.ComponentName, android.os.Bundle);
    method public boolean bindAppWidgetIdIfAllowed(int, android.os.UserHandle, android.content.ComponentName, android.os.Bundle);
    method public int[] getAppWidgetIds(android.content.ComponentName);
    method public android.appwidget.AppWidgetProviderInfo getAppWidgetInfo(int);
    method public android.os.Bundle getAppWidgetOptions(int);
    method public java.util.List<android.appwidget.AppWidgetProviderInfo> getInstalledProviders();
    method public java.util.List<android.appwidget.AppWidgetProviderInfo> getInstalledProvidersForProfile(android.os.UserHandle);
    method public static android.appwidget.AppWidgetManager getInstance(android.content.Context);
    method public void notifyAppWidgetViewDataChanged(int[], int);
    method public void notifyAppWidgetViewDataChanged(int, int);
    method public void partiallyUpdateAppWidget(int[], android.widget.RemoteViews);
    method public void partiallyUpdateAppWidget(int, android.widget.RemoteViews);
    method public void updateAppWidget(int[], android.widget.RemoteViews);
    method public void updateAppWidget(int, android.widget.RemoteViews);
    method public void updateAppWidget(android.content.ComponentName, android.widget.RemoteViews);
    method public void updateAppWidgetOptions(int, android.os.Bundle);
    field public static final java.lang.String ACTION_APPWIDGET_BIND = "android.appwidget.action.APPWIDGET_BIND";
    field public static final java.lang.String ACTION_APPWIDGET_CONFIGURE = "android.appwidget.action.APPWIDGET_CONFIGURE";
    field public static final java.lang.String ACTION_APPWIDGET_DELETED = "android.appwidget.action.APPWIDGET_DELETED";
    field public static final java.lang.String ACTION_APPWIDGET_DISABLED = "android.appwidget.action.APPWIDGET_DISABLED";
    field public static final java.lang.String ACTION_APPWIDGET_ENABLED = "android.appwidget.action.APPWIDGET_ENABLED";
    field public static final java.lang.String ACTION_APPWIDGET_HOST_RESTORED = "android.appwidget.action.APPWIDGET_HOST_RESTORED";
    field public static final java.lang.String ACTION_APPWIDGET_OPTIONS_CHANGED = "android.appwidget.action.APPWIDGET_UPDATE_OPTIONS";
    field public static final java.lang.String ACTION_APPWIDGET_PICK = "android.appwidget.action.APPWIDGET_PICK";
    field public static final java.lang.String ACTION_APPWIDGET_RESTORED = "android.appwidget.action.APPWIDGET_RESTORED";
    field public static final java.lang.String ACTION_APPWIDGET_UPDATE = "android.appwidget.action.APPWIDGET_UPDATE";
    field public static final java.lang.String EXTRA_APPWIDGET_ID = "appWidgetId";
    field public static final java.lang.String EXTRA_APPWIDGET_IDS = "appWidgetIds";
    field public static final java.lang.String EXTRA_APPWIDGET_OLD_IDS = "appWidgetOldIds";
    field public static final java.lang.String EXTRA_APPWIDGET_OPTIONS = "appWidgetOptions";
    field public static final java.lang.String EXTRA_APPWIDGET_PROVIDER = "appWidgetProvider";
    field public static final java.lang.String EXTRA_APPWIDGET_PROVIDER_PROFILE = "appWidgetProviderProfile";
    field public static final java.lang.String EXTRA_CUSTOM_EXTRAS = "customExtras";
    field public static final java.lang.String EXTRA_CUSTOM_INFO = "customInfo";
    field public static final java.lang.String EXTRA_HOST_ID = "hostId";
    field public static final int INVALID_APPWIDGET_ID = 0; // 0x0
    field public static final java.lang.String META_DATA_APPWIDGET_PROVIDER = "android.appwidget.provider";
    field public static final java.lang.String OPTION_APPWIDGET_HOST_CATEGORY = "appWidgetCategory";
    field public static final java.lang.String OPTION_APPWIDGET_MAX_HEIGHT = "appWidgetMaxHeight";
    field public static final java.lang.String OPTION_APPWIDGET_MAX_WIDTH = "appWidgetMaxWidth";
    field public static final java.lang.String OPTION_APPWIDGET_MIN_HEIGHT = "appWidgetMinHeight";
    field public static final java.lang.String OPTION_APPWIDGET_MIN_WIDTH = "appWidgetMinWidth";
  }

  public class AppWidgetProvider extends android.content.BroadcastReceiver {
    ctor public AppWidgetProvider();
    method public void onAppWidgetOptionsChanged(android.content.Context, android.appwidget.AppWidgetManager, int, android.os.Bundle);
    method public void onDeleted(android.content.Context, int[]);
    method public void onDisabled(android.content.Context);
    method public void onEnabled(android.content.Context);
    method public void onReceive(android.content.Context, android.content.Intent);
    method public void onRestored(android.content.Context, int[], int[]);
    method public void onUpdate(android.content.Context, android.appwidget.AppWidgetManager, int[]);
  }

  public class AppWidgetProviderInfo implements android.os.Parcelable {
    ctor public AppWidgetProviderInfo();
    ctor public AppWidgetProviderInfo(android.os.Parcel);
    method public android.appwidget.AppWidgetProviderInfo clone();
    method public int describeContents();
    method public final android.os.UserHandle getProfile();
    method public final android.graphics.drawable.Drawable loadIcon(android.content.Context, int);
    method public final java.lang.String loadLabel(android.content.pm.PackageManager);
    method public final android.graphics.drawable.Drawable loadPreviewImage(android.content.Context, int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.appwidget.AppWidgetProviderInfo> CREATOR;
    field public static final int RESIZE_BOTH = 3; // 0x3
    field public static final int RESIZE_HORIZONTAL = 1; // 0x1
    field public static final int RESIZE_NONE = 0; // 0x0
    field public static final int RESIZE_VERTICAL = 2; // 0x2
    field public static final int WIDGET_CATEGORY_HOME_SCREEN = 1; // 0x1
    field public static final int WIDGET_CATEGORY_KEYGUARD = 2; // 0x2
    field public static final int WIDGET_CATEGORY_SEARCHBOX = 4; // 0x4
    field public int autoAdvanceViewId;
    field public android.content.ComponentName configure;
    field public int icon;
    field public int initialKeyguardLayout;
    field public int initialLayout;
    field public deprecated java.lang.String label;
    field public int minHeight;
    field public int minResizeHeight;
    field public int minResizeWidth;
    field public int minWidth;
    field public int previewImage;
    field public android.content.ComponentName provider;
    field public int resizeMode;
    field public int updatePeriodMillis;
    field public int widgetCategory;
  }

}

package android.bluetooth {

  public final class BluetoothA2dp implements android.bluetooth.BluetoothProfile {
    method public void finalize();
    method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
    method public int getConnectionState(android.bluetooth.BluetoothDevice);
    method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
    method public boolean isA2dpPlaying(android.bluetooth.BluetoothDevice);
    field public static final java.lang.String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED";
    field public static final java.lang.String ACTION_PLAYING_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED";
    field public static final int STATE_NOT_PLAYING = 11; // 0xb
    field public static final int STATE_PLAYING = 10; // 0xa
  }

  public final class BluetoothAdapter {
    method public boolean cancelDiscovery();
    method public static boolean checkBluetoothAddress(java.lang.String);
    method public void closeProfileProxy(int, android.bluetooth.BluetoothProfile);
    method public boolean disable();
    method public boolean enable();
    method public java.lang.String getAddress();
    method public android.bluetooth.le.BluetoothLeAdvertiser getBluetoothLeAdvertiser();
    method public android.bluetooth.le.BluetoothLeScanner getBluetoothLeScanner();
    method public java.util.Set<android.bluetooth.BluetoothDevice> getBondedDevices();
    method public static synchronized android.bluetooth.BluetoothAdapter getDefaultAdapter();
    method public java.lang.String getName();
    method public int getProfileConnectionState(int);
    method public boolean getProfileProxy(android.content.Context, android.bluetooth.BluetoothProfile.ServiceListener, int);
    method public android.bluetooth.BluetoothDevice getRemoteDevice(java.lang.String);
    method public android.bluetooth.BluetoothDevice getRemoteDevice(byte[]);
    method public int getScanMode();
    method public int getState();
    method public boolean isDiscovering();
    method public boolean isEnabled();
    method public boolean isMultipleAdvertisementSupported();
    method public boolean isOffloadedFilteringSupported();
    method public boolean isOffloadedScanBatchingSupported();
    method public android.bluetooth.BluetoothServerSocket listenUsingInsecureRfcommWithServiceRecord(java.lang.String, java.util.UUID) throws java.io.IOException;
    method public android.bluetooth.BluetoothServerSocket listenUsingRfcommWithServiceRecord(java.lang.String, java.util.UUID) throws java.io.IOException;
    method public boolean setName(java.lang.String);
    method public boolean startDiscovery();
    method public deprecated boolean startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback);
    method public deprecated boolean startLeScan(java.util.UUID[], android.bluetooth.BluetoothAdapter.LeScanCallback);
    method public deprecated void stopLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback);
    field public static final java.lang.String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED";
    field public static final java.lang.String ACTION_DISCOVERY_FINISHED = "android.bluetooth.adapter.action.DISCOVERY_FINISHED";
    field public static final java.lang.String ACTION_DISCOVERY_STARTED = "android.bluetooth.adapter.action.DISCOVERY_STARTED";
    field public static final java.lang.String ACTION_LOCAL_NAME_CHANGED = "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED";
    field public static final java.lang.String ACTION_REQUEST_DISCOVERABLE = "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE";
    field public static final java.lang.String ACTION_REQUEST_ENABLE = "android.bluetooth.adapter.action.REQUEST_ENABLE";
    field public static final java.lang.String ACTION_SCAN_MODE_CHANGED = "android.bluetooth.adapter.action.SCAN_MODE_CHANGED";
    field public static final java.lang.String ACTION_STATE_CHANGED = "android.bluetooth.adapter.action.STATE_CHANGED";
    field public static final int ERROR = -2147483648; // 0x80000000
    field public static final java.lang.String EXTRA_CONNECTION_STATE = "android.bluetooth.adapter.extra.CONNECTION_STATE";
    field public static final java.lang.String EXTRA_DISCOVERABLE_DURATION = "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION";
    field public static final java.lang.String EXTRA_LOCAL_NAME = "android.bluetooth.adapter.extra.LOCAL_NAME";
    field public static final java.lang.String EXTRA_PREVIOUS_CONNECTION_STATE = "android.bluetooth.adapter.extra.PREVIOUS_CONNECTION_STATE";
    field public static final java.lang.String EXTRA_PREVIOUS_SCAN_MODE = "android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE";
    field public static final java.lang.String EXTRA_PREVIOUS_STATE = "android.bluetooth.adapter.extra.PREVIOUS_STATE";
    field public static final java.lang.String EXTRA_SCAN_MODE = "android.bluetooth.adapter.extra.SCAN_MODE";
    field public static final java.lang.String EXTRA_STATE = "android.bluetooth.adapter.extra.STATE";
    field public static final int SCAN_MODE_CONNECTABLE = 21; // 0x15
    field public static final int SCAN_MODE_CONNECTABLE_DISCOVERABLE = 23; // 0x17
    field public static final int SCAN_MODE_NONE = 20; // 0x14
    field public static final int STATE_CONNECTED = 2; // 0x2
    field public static final int STATE_CONNECTING = 1; // 0x1
    field public static final int STATE_DISCONNECTED = 0; // 0x0
    field public static final int STATE_DISCONNECTING = 3; // 0x3
    field public static final int STATE_OFF = 10; // 0xa
    field public static final int STATE_ON = 12; // 0xc
    field public static final int STATE_TURNING_OFF = 13; // 0xd
    field public static final int STATE_TURNING_ON = 11; // 0xb
  }

  public static abstract interface BluetoothAdapter.LeScanCallback {
    method public abstract void onLeScan(android.bluetooth.BluetoothDevice, int, byte[]);
  }

  public class BluetoothAssignedNumbers {
    field public static final int AAMP_OF_AMERICA = 190; // 0xbe
    field public static final int ACCEL_SEMICONDUCTOR = 74; // 0x4a
    field public static final int ACE_SENSOR = 188; // 0xbc
    field public static final int ADIDAS = 195; // 0xc3
    field public static final int ADVANCED_PANMOBIL_SYSTEMS = 145; // 0x91
    field public static final int AIROHA_TECHNOLOGY = 148; // 0x94
    field public static final int ALCATEL = 36; // 0x24
    field public static final int ALPWISE = 154; // 0x9a
    field public static final int AMICCOM_ELECTRONICS = 192; // 0xc0
    field public static final int APLIX = 189; // 0xbd
    field public static final int APPLE = 76; // 0x4c
    field public static final int APT_LICENSING = 79; // 0x4f
    field public static final int ARCHOS = 207; // 0xcf
    field public static final int ARP_DEVICES = 168; // 0xa8
    field public static final int ATHEROS_COMMUNICATIONS = 69; // 0x45
    field public static final int ATMEL = 19; // 0x13
    field public static final int AUSTCO_COMMUNICATION_SYSTEMS = 213; // 0xd5
    field public static final int AUTONET_MOBILE = 127; // 0x7f
    field public static final int AVAGO = 78; // 0x4e
    field public static final int AVM_BERLIN = 31; // 0x1f
    field public static final int A_AND_D_ENGINEERING = 105; // 0x69
    field public static final int A_AND_R_CAMBRIDGE = 124; // 0x7c
    field public static final int BANDSPEED = 32; // 0x20
    field public static final int BAND_XI_INTERNATIONAL = 100; // 0x64
    field public static final int BDE_TECHNOLOGY = 180; // 0xb4
    field public static final int BEATS_ELECTRONICS = 204; // 0xcc
    field public static final int BEAUTIFUL_ENTERPRISE = 108; // 0x6c
    field public static final int BEKEY = 178; // 0xb2
    field public static final int BELKIN_INTERNATIONAL = 92; // 0x5c
    field public static final int BINAURIC = 203; // 0xcb
    field public static final int BIOSENTRONICS = 219; // 0xdb
    field public static final int BLUEGIGA = 71; // 0x47
    field public static final int BLUERADIOS = 133; // 0x85
    field public static final int BLUETOOTH_SIG = 63; // 0x3f
    field public static final int BLUETREK_TECHNOLOGIES = 151; // 0x97
    field public static final int BOSE = 158; // 0x9e
    field public static final int BRIARTEK = 109; // 0x6d
    field public static final int BROADCOM = 15; // 0xf
    field public static final int CAEN_RFID = 170; // 0xaa
    field public static final int CAMBRIDGE_SILICON_RADIO = 10; // 0xa
    field public static final int CATC = 52; // 0x34
    field public static final int CINETIX = 175; // 0xaf
    field public static final int CLARINOX_TECHNOLOGIES = 179; // 0xb3
    field public static final int COLORFY = 156; // 0x9c
    field public static final int COMMIL = 51; // 0x33
    field public static final int CONEXANT_SYSTEMS = 28; // 0x1c
    field public static final int CONNECTBLUE = 113; // 0x71
    field public static final int CONTINENTAL_AUTOMOTIVE = 75; // 0x4b
    field public static final int CONWISE_TECHNOLOGY = 66; // 0x42
    field public static final int CREATIVE_TECHNOLOGY = 118; // 0x76
    field public static final int C_TECHNOLOGIES = 38; // 0x26
    field public static final int DANLERS = 225; // 0xe1
    field public static final int DELORME_PUBLISHING_COMPANY = 128; // 0x80
    field public static final int DEXCOM = 208; // 0xd0
    field public static final int DIALOG_SEMICONDUCTOR = 210; // 0xd2
    field public static final int DIGIANSWER = 12; // 0xc
    field public static final int ECLIPSE = 53; // 0x35
    field public static final int ECOTEST = 136; // 0x88
    field public static final int ELGATO_SYSTEMS = 206; // 0xce
    field public static final int EM_MICROELECTRONIC_MARIN = 90; // 0x5a
    field public static final int EQUINOX_AG = 134; // 0x86
    field public static final int ERICSSON_TECHNOLOGY = 0; // 0x0
    field public static final int EVLUMA = 201; // 0xc9
    field public static final int FREE2MOVE = 83; // 0x53
    field public static final int FUNAI_ELECTRIC = 144; // 0x90
    field public static final int GARMIN_INTERNATIONAL = 135; // 0x87
    field public static final int GCT_SEMICONDUCTOR = 45; // 0x2d
    field public static final int GELO = 200; // 0xc8
    field public static final int GENEQ = 194; // 0xc2
    field public static final int GENERAL_MOTORS = 104; // 0x68
    field public static final int GENNUM = 59; // 0x3b
    field public static final int GEOFORCE = 157; // 0x9d
    field public static final int GIBSON_GUITARS = 98; // 0x62
    field public static final int GN_NETCOM = 103; // 0x67
    field public static final int GN_RESOUND = 137; // 0x89
    field public static final int GOOGLE = 224; // 0xe0
    field public static final int GREEN_THROTTLE_GAMES = 172; // 0xac
    field public static final int GROUP_SENSE = 115; // 0x73
    field public static final int HANLYNN_TECHNOLOGIES = 123; // 0x7b
    field public static final int HARMAN_INTERNATIONAL = 87; // 0x57
    field public static final int HEWLETT_PACKARD = 101; // 0x65
    field public static final int HITACHI = 41; // 0x29
    field public static final int HOSIDEN = 221; // 0xdd
    field public static final int IBM = 3; // 0x3
    field public static final int INFINEON_TECHNOLOGIES = 9; // 0x9
    field public static final int INGENIEUR_SYSTEMGRUPPE_ZAHN = 171; // 0xab
    field public static final int INTEGRATED_SILICON_SOLUTION = 65; // 0x41
    field public static final int INTEGRATED_SYSTEM_SOLUTION = 57; // 0x39
    field public static final int INTEL = 2; // 0x2
    field public static final int INVENTEL = 30; // 0x1e
    field public static final int IPEXTREME = 61; // 0x3d
    field public static final int I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION = 153; // 0x99
    field public static final int JAWBONE = 138; // 0x8a
    field public static final int JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS = 155; // 0x9b
    field public static final int JOHNSON_CONTROLS = 185; // 0xb9
    field public static final int J_AND_M = 82; // 0x52
    field public static final int KAWANTECH = 212; // 0xd4
    field public static final int KC_TECHNOLOGY = 22; // 0x16
    field public static final int KENSINGTON_COMPUTER_PRODUCTS_GROUP = 160; // 0xa0
    field public static final int LAIRD_TECHNOLOGIES = 119; // 0x77
    field public static final int LESSWIRE = 121; // 0x79
    field public static final int LG_ELECTRONICS = 196; // 0xc4
    field public static final int LINAK = 164; // 0xa4
    field public static final int LUCENT = 7; // 0x7
    field public static final int LUDUS_HELSINKI = 132; // 0x84
    field public static final int MACRONIX = 44; // 0x2c
    field public static final int MAGNETI_MARELLI = 169; // 0xa9
    field public static final int MANSELLA = 33; // 0x21
    field public static final int MARVELL = 72; // 0x48
    field public static final int MATSUSHITA_ELECTRIC = 58; // 0x3a
    field public static final int MC10 = 202; // 0xca
    field public static final int MEDIATEK = 70; // 0x46
    field public static final int MESO_INTERNATIONAL = 182; // 0xb6
    field public static final int META_WATCH = 163; // 0xa3
    field public static final int MEWTEL_TECHNOLOGY = 47; // 0x2f
    field public static final int MICOMMAND = 99; // 0x63
    field public static final int MICROCHIP_TECHNOLOGY = 205; // 0xcd
    field public static final int MICROSOFT = 6; // 0x6
    field public static final int MINDTREE = 106; // 0x6a
    field public static final int MISFIT_WEARABLES = 223; // 0xdf
    field public static final int MITEL_SEMICONDUCTOR = 16; // 0x10
    field public static final int MITSUBISHI_ELECTRIC = 20; // 0x14
    field public static final int MOBILIAN_CORPORATION = 55; // 0x37
    field public static final int MONSTER = 112; // 0x70
    field public static final int MOTOROLA = 8; // 0x8
    field public static final int MSTAR_SEMICONDUCTOR = 122; // 0x7a
    field public static final int MUZIK = 222; // 0xde
    field public static final int NEC = 34; // 0x22
    field public static final int NEC_LIGHTING = 149; // 0x95
    field public static final int NEWLOGIC = 23; // 0x17
    field public static final int NIKE = 120; // 0x78
    field public static final int NINE_SOLUTIONS = 102; // 0x66
    field public static final int NOKIA_MOBILE_PHONES = 1; // 0x1
    field public static final int NORDIC_SEMICONDUCTOR = 89; // 0x59
    field public static final int NORWOOD_SYSTEMS = 46; // 0x2e
    field public static final int ODM_TECHNOLOGY = 150; // 0x96
    field public static final int OMEGAWAVE = 174; // 0xae
    field public static final int ONSET_COMPUTER = 197; // 0xc5
    field public static final int OPEN_INTERFACE = 39; // 0x27
    field public static final int OTL_DYNAMICS = 165; // 0xa5
    field public static final int PANDA_OCEAN = 166; // 0xa6
    field public static final int PARROT = 67; // 0x43
    field public static final int PARTHUS_TECHNOLOGIES = 14; // 0xe
    field public static final int PASSIF_SEMICONDUCTOR = 176; // 0xb0
    field public static final int PETER_SYSTEMTECHNIK = 173; // 0xad
    field public static final int PHILIPS_SEMICONDUCTORS = 37; // 0x25
    field public static final int PLANTRONICS = 85; // 0x55
    field public static final int POLAR_ELECTRO = 107; // 0x6b
    field public static final int POLAR_ELECTRO_EUROPE = 209; // 0xd1
    field public static final int PROCTER_AND_GAMBLE = 220; // 0xdc
    field public static final int QUALCOMM = 29; // 0x1d
    field public static final int QUALCOMM_CONNECTED_EXPERIENCES = 216; // 0xd8
    field public static final int QUALCOMM_INNOVATION_CENTER = 184; // 0xb8
    field public static final int QUALCOMM_LABS = 140; // 0x8c
    field public static final int QUALCOMM_TECHNOLOGIES = 215; // 0xd7
    field public static final int QUINTIC = 142; // 0x8e
    field public static final int QUUPPA = 199; // 0xc7
    field public static final int RALINK_TECHNOLOGY = 91; // 0x5b
    field public static final int RDA_MICROELECTRONICS = 97; // 0x61
    field public static final int REALTEK_SEMICONDUCTOR = 93; // 0x5d
    field public static final int RED_M = 50; // 0x32
    field public static final int RENESAS_TECHNOLOGY = 54; // 0x36
    field public static final int RESEARCH_IN_MOTION = 60; // 0x3c
    field public static final int RF_MICRO_DEVICES = 40; // 0x28
    field public static final int RIVIERAWAVES = 96; // 0x60
    field public static final int ROHDE_AND_SCHWARZ = 25; // 0x19
    field public static final int RTX_TELECOM = 21; // 0x15
    field public static final int SAMSUNG_ELECTRONICS = 117; // 0x75
    field public static final int SARIS_CYCLING_GROUP = 177; // 0xb1
    field public static final int SEERS_TECHNOLOGY = 125; // 0x7d
    field public static final int SEIKO_EPSON = 64; // 0x40
    field public static final int SELFLY = 198; // 0xc6
    field public static final int SEMILINK = 226; // 0xe2
    field public static final int SENNHEISER_COMMUNICATIONS = 130; // 0x82
    field public static final int SHANGHAI_SUPER_SMART_ELECTRONICS = 114; // 0x72
    field public static final int SHENZHEN_EXCELSECU_DATA_TECHNOLOGY = 193; // 0xc1
    field public static final int SIGNIA_TECHNOLOGIES = 27; // 0x1b
    field public static final int SILICON_WAVE = 11; // 0xb
    field public static final int SIRF_TECHNOLOGY = 80; // 0x50
    field public static final int SOCKET_MOBILE = 68; // 0x44
    field public static final int SONY_ERICSSON = 86; // 0x56
    field public static final int SOUND_ID = 111; // 0x6f
    field public static final int SPORTS_TRACKING_TECHNOLOGIES = 126; // 0x7e
    field public static final int SR_MEDIZINELEKTRONIK = 161; // 0xa1
    field public static final int STACCATO_COMMUNICATIONS = 77; // 0x4d
    field public static final int STALMART_TECHNOLOGY = 191; // 0xbf
    field public static final int STARKEY_LABORATORIES = 186; // 0xba
    field public static final int STOLLMAN_E_PLUS_V = 143; // 0x8f
    field public static final int STONESTREET_ONE = 94; // 0x5e
    field public static final int ST_MICROELECTRONICS = 48; // 0x30
    field public static final int SUMMIT_DATA_COMMUNICATIONS = 110; // 0x6e
    field public static final int SUUNTO = 159; // 0x9f
    field public static final int SWIRL_NETWORKS = 181; // 0xb5
    field public static final int SYMBOL_TECHNOLOGIES = 42; // 0x2a
    field public static final int SYNOPSYS = 49; // 0x31
    field public static final int SYSTEMS_AND_CHIPS = 62; // 0x3e
    field public static final int S_POWER_ELECTRONICS = 187; // 0xbb
    field public static final int TAIXINGBANG_TECHNOLOGY = 211; // 0xd3
    field public static final int TENOVIS = 43; // 0x2b
    field public static final int TERAX = 56; // 0x38
    field public static final int TEXAS_INSTRUMENTS = 13; // 0xd
    field public static final int THINKOPTICS = 146; // 0x92
    field public static final int THREECOM = 5; // 0x5
    field public static final int THREE_DIJOY = 84; // 0x54
    field public static final int THREE_DSP = 73; // 0x49
    field public static final int TIMEKEEPING_SYSTEMS = 131; // 0x83
    field public static final int TIMEX_GROUP_USA = 214; // 0xd6
    field public static final int TOPCORN_POSITIONING_SYSTEMS = 139; // 0x8b
    field public static final int TOSHIBA = 4; // 0x4
    field public static final int TRANSILICA = 24; // 0x18
    field public static final int TRELAB = 183; // 0xb7
    field public static final int TTPCOM = 26; // 0x1a
    field public static final int TXTR = 218; // 0xda
    field public static final int TZERO_TECHNOLOGIES = 81; // 0x51
    field public static final int UNIVERSAL_ELECTRONICS = 147; // 0x93
    field public static final int VERTU = 162; // 0xa2
    field public static final int VISTEON = 167; // 0xa7
    field public static final int VIZIO = 88; // 0x58
    field public static final int VOYETRA_TURTLE_BEACH = 217; // 0xd9
    field public static final int WAVEPLUS_TECHNOLOGY = 35; // 0x23
    field public static final int WICENTRIC = 95; // 0x5f
    field public static final int WIDCOMM = 17; // 0x11
    field public static final int WUXI_VIMICRO = 129; // 0x81
    field public static final int ZEEVO = 18; // 0x12
    field public static final int ZER01_TV = 152; // 0x98
    field public static final int ZOMM = 116; // 0x74
    field public static final int ZSCAN_SOFTWARE = 141; // 0x8d
  }

  public final class BluetoothClass implements android.os.Parcelable {
    method public int describeContents();
    method public int getDeviceClass();
    method public int getMajorDeviceClass();
    method public boolean hasService(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothClass> CREATOR;
  }

  public static class BluetoothClass.Device {
    ctor public BluetoothClass.Device();
    field public static final int AUDIO_VIDEO_CAMCORDER = 1076; // 0x434
    field public static final int AUDIO_VIDEO_CAR_AUDIO = 1056; // 0x420
    field public static final int AUDIO_VIDEO_HANDSFREE = 1032; // 0x408
    field public static final int AUDIO_VIDEO_HEADPHONES = 1048; // 0x418
    field public static final int AUDIO_VIDEO_HIFI_AUDIO = 1064; // 0x428
    field public static final int AUDIO_VIDEO_LOUDSPEAKER = 1044; // 0x414
    field public static final int AUDIO_VIDEO_MICROPHONE = 1040; // 0x410
    field public static final int AUDIO_VIDEO_PORTABLE_AUDIO = 1052; // 0x41c
    field public static final int AUDIO_VIDEO_SET_TOP_BOX = 1060; // 0x424
    field public static final int AUDIO_VIDEO_UNCATEGORIZED = 1024; // 0x400
    field public static final int AUDIO_VIDEO_VCR = 1068; // 0x42c
    field public static final int AUDIO_VIDEO_VIDEO_CAMERA = 1072; // 0x430
    field public static final int AUDIO_VIDEO_VIDEO_CONFERENCING = 1088; // 0x440
    field public static final int AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 1084; // 0x43c
    field public static final int AUDIO_VIDEO_VIDEO_GAMING_TOY = 1096; // 0x448
    field public static final int AUDIO_VIDEO_VIDEO_MONITOR = 1080; // 0x438
    field public static final int AUDIO_VIDEO_WEARABLE_HEADSET = 1028; // 0x404
    field public static final int COMPUTER_DESKTOP = 260; // 0x104
    field public static final int COMPUTER_HANDHELD_PC_PDA = 272; // 0x110
    field public static final int COMPUTER_LAPTOP = 268; // 0x10c
    field public static final int COMPUTER_PALM_SIZE_PC_PDA = 276; // 0x114
    field public static final int COMPUTER_SERVER = 264; // 0x108
    field public static final int COMPUTER_UNCATEGORIZED = 256; // 0x100
    field public static final int COMPUTER_WEARABLE = 280; // 0x118
    field public static final int HEALTH_BLOOD_PRESSURE = 2308; // 0x904
    field public static final int HEALTH_DATA_DISPLAY = 2332; // 0x91c
    field public static final int HEALTH_GLUCOSE = 2320; // 0x910
    field public static final int HEALTH_PULSE_OXIMETER = 2324; // 0x914
    field public static final int HEALTH_PULSE_RATE = 2328; // 0x918
    field public static final int HEALTH_THERMOMETER = 2312; // 0x908
    field public static final int HEALTH_UNCATEGORIZED = 2304; // 0x900
    field public static final int HEALTH_WEIGHING = 2316; // 0x90c
    field public static final int PHONE_CELLULAR = 516; // 0x204
    field public static final int PHONE_CORDLESS = 520; // 0x208
    field public static final int PHONE_ISDN = 532; // 0x214
    field public static final int PHONE_MODEM_OR_GATEWAY = 528; // 0x210
    field public static final int PHONE_SMART = 524; // 0x20c
    field public static final int PHONE_UNCATEGORIZED = 512; // 0x200
    field public static final int TOY_CONTROLLER = 2064; // 0x810
    field public static final int TOY_DOLL_ACTION_FIGURE = 2060; // 0x80c
    field public static final int TOY_GAME = 2068; // 0x814
    field public static final int TOY_ROBOT = 2052; // 0x804
    field public static final int TOY_UNCATEGORIZED = 2048; // 0x800
    field public static final int TOY_VEHICLE = 2056; // 0x808
    field public static final int WEARABLE_GLASSES = 1812; // 0x714
    field public static final int WEARABLE_HELMET = 1808; // 0x710
    field public static final int WEARABLE_JACKET = 1804; // 0x70c
    field public static final int WEARABLE_PAGER = 1800; // 0x708
    field public static final int WEARABLE_UNCATEGORIZED = 1792; // 0x700
    field public static final int WEARABLE_WRIST_WATCH = 1796; // 0x704
  }

  public static class BluetoothClass.Device.Major {
    ctor public BluetoothClass.Device.Major();
    field public static final int AUDIO_VIDEO = 1024; // 0x400
    field public static final int COMPUTER = 256; // 0x100
    field public static final int HEALTH = 2304; // 0x900
    field public static final int IMAGING = 1536; // 0x600
    field public static final int MISC = 0; // 0x0
    field public static final int NETWORKING = 768; // 0x300
    field public static final int PERIPHERAL = 1280; // 0x500
    field public static final int PHONE = 512; // 0x200
    field public static final int TOY = 2048; // 0x800
    field public static final int UNCATEGORIZED = 7936; // 0x1f00
    field public static final int WEARABLE = 1792; // 0x700
  }

  public static final class BluetoothClass.Service {
    ctor public BluetoothClass.Service();
    field public static final int AUDIO = 2097152; // 0x200000
    field public static final int CAPTURE = 524288; // 0x80000
    field public static final int INFORMATION = 8388608; // 0x800000
    field public static final int LIMITED_DISCOVERABILITY = 8192; // 0x2000
    field public static final int NETWORKING = 131072; // 0x20000
    field public static final int OBJECT_TRANSFER = 1048576; // 0x100000
    field public static final int POSITIONING = 65536; // 0x10000
    field public static final int RENDER = 262144; // 0x40000
    field public static final int TELEPHONY = 4194304; // 0x400000
  }

  public final class BluetoothDevice implements android.os.Parcelable {
    method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback);
    method public boolean createBond();
    method public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
    method public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
    method public int describeContents();
    method public boolean fetchUuidsWithSdp();
    method public java.lang.String getAddress();
    method public android.bluetooth.BluetoothClass getBluetoothClass();
    method public int getBondState();
    method public java.lang.String getName();
    method public int getType();
    method public android.os.ParcelUuid[] getUuids();
    method public boolean setPairingConfirmation(boolean);
    method public boolean setPin(byte[]);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String ACTION_ACL_CONNECTED = "android.bluetooth.device.action.ACL_CONNECTED";
    field public static final java.lang.String ACTION_ACL_DISCONNECTED = "android.bluetooth.device.action.ACL_DISCONNECTED";
    field public static final java.lang.String ACTION_ACL_DISCONNECT_REQUESTED = "android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED";
    field public static final java.lang.String ACTION_BOND_STATE_CHANGED = "android.bluetooth.device.action.BOND_STATE_CHANGED";
    field public static final java.lang.String ACTION_CLASS_CHANGED = "android.bluetooth.device.action.CLASS_CHANGED";
    field public static final java.lang.String ACTION_FOUND = "android.bluetooth.device.action.FOUND";
    field public static final java.lang.String ACTION_NAME_CHANGED = "android.bluetooth.device.action.NAME_CHANGED";
    field public static final java.lang.String ACTION_PAIRING_REQUEST = "android.bluetooth.device.action.PAIRING_REQUEST";
    field public static final java.lang.String ACTION_UUID = "android.bluetooth.device.action.UUID";
    field public static final int BOND_BONDED = 12; // 0xc
    field public static final int BOND_BONDING = 11; // 0xb
    field public static final int BOND_NONE = 10; // 0xa
    field public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothDevice> CREATOR;
    field public static final int DEVICE_TYPE_CLASSIC = 1; // 0x1
    field public static final int DEVICE_TYPE_DUAL = 3; // 0x3
    field public static final int DEVICE_TYPE_LE = 2; // 0x2
    field public static final int DEVICE_TYPE_UNKNOWN = 0; // 0x0
    field public static final int ERROR = -2147483648; // 0x80000000
    field public static final java.lang.String EXTRA_BOND_STATE = "android.bluetooth.device.extra.BOND_STATE";
    field public static final java.lang.String EXTRA_CLASS = "android.bluetooth.device.extra.CLASS";
    field public static final java.lang.String EXTRA_DEVICE = "android.bluetooth.device.extra.DEVICE";
    field public static final java.lang.String EXTRA_NAME = "android.bluetooth.device.extra.NAME";
    field public static final java.lang.String EXTRA_PAIRING_KEY = "android.bluetooth.device.extra.PAIRING_KEY";
    field public static final java.lang.String EXTRA_PAIRING_VARIANT = "android.bluetooth.device.extra.PAIRING_VARIANT";
    field public static final java.lang.String EXTRA_PREVIOUS_BOND_STATE = "android.bluetooth.device.extra.PREVIOUS_BOND_STATE";
    field public static final java.lang.String EXTRA_RSSI = "android.bluetooth.device.extra.RSSI";
    field public static final java.lang.String EXTRA_UUID = "android.bluetooth.device.extra.UUID";
    field public static final int PAIRING_VARIANT_PASSKEY_CONFIRMATION = 2; // 0x2
    field public static final int PAIRING_VARIANT_PIN = 0; // 0x0
  }

  public final class BluetoothGatt implements android.bluetooth.BluetoothProfile {
    method public void abortReliableWrite();
    method public deprecated void abortReliableWrite(android.bluetooth.BluetoothDevice);
    method public boolean beginReliableWrite();
    method public void close();
    method public boolean connect();
    method public void disconnect();
    method public boolean discoverServices();
    method public boolean executeReliableWrite();
    method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
    method public int getConnectionState(android.bluetooth.BluetoothDevice);
    method public android.bluetooth.BluetoothDevice getDevice();
    method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
    method public android.bluetooth.BluetoothGattService getService(java.util.UUID);
    method public java.util.List<android.bluetooth.BluetoothGattService> getServices();
    method public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
    method public boolean readDescriptor(android.bluetooth.BluetoothGattDescriptor);
    method public boolean readRemoteRssi();
    method public boolean requestConnectionPriority(int);
    method public boolean requestMtu(int);
    method public boolean setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean);
    method public boolean writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
    method public boolean writeDescriptor(android.bluetooth.BluetoothGattDescriptor);
    field public static final int CONNECTION_PRIORITY_BALANCED = 0; // 0x0
    field public static final int CONNECTION_PRIORITY_HIGH = 1; // 0x1
    field public static final int CONNECTION_PRIORITY_LOW_POWER = 2; // 0x2
    field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f
    field public static final int GATT_FAILURE = 257; // 0x101
    field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5
    field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf
    field public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 13; // 0xd
    field public static final int GATT_INVALID_OFFSET = 7; // 0x7
    field public static final int GATT_READ_NOT_PERMITTED = 2; // 0x2
    field public static final int GATT_REQUEST_NOT_SUPPORTED = 6; // 0x6
    field public static final int GATT_SUCCESS = 0; // 0x0
    field public static final int GATT_WRITE_NOT_PERMITTED = 3; // 0x3
  }

  public abstract class BluetoothGattCallback {
    ctor public BluetoothGattCallback();
    method public void onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic);
    method public void onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
    method public void onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
    method public void onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int);
    method public void onDescriptorRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
    method public void onDescriptorWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
    method public void onMtuChanged(android.bluetooth.BluetoothGatt, int, int);
    method public void onReadRemoteRssi(android.bluetooth.BluetoothGatt, int, int);
    method public void onReliableWriteCompleted(android.bluetooth.BluetoothGatt, int);
    method public void onServicesDiscovered(android.bluetooth.BluetoothGatt, int);
  }

  public class BluetoothGattCharacteristic {
    ctor public BluetoothGattCharacteristic(java.util.UUID, int, int);
    method public boolean addDescriptor(android.bluetooth.BluetoothGattDescriptor);
    method public android.bluetooth.BluetoothGattDescriptor getDescriptor(java.util.UUID);
    method public java.util.List<android.bluetooth.BluetoothGattDescriptor> getDescriptors();
    method public java.lang.Float getFloatValue(int, int);
    method public int getInstanceId();
    method public java.lang.Integer getIntValue(int, int);
    method public int getPermissions();
    method public int getProperties();
    method public android.bluetooth.BluetoothGattService getService();
    method public java.lang.String getStringValue(int);
    method public java.util.UUID getUuid();
    method public byte[] getValue();
    method public int getWriteType();
    method public boolean setValue(byte[]);
    method public boolean setValue(int, int, int);
    method public boolean setValue(int, int, int, int);
    method public boolean setValue(java.lang.String);
    method public void setWriteType(int);
    field public static final int FORMAT_FLOAT = 52; // 0x34
    field public static final int FORMAT_SFLOAT = 50; // 0x32
    field public static final int FORMAT_SINT16 = 34; // 0x22
    field public static final int FORMAT_SINT32 = 36; // 0x24
    field public static final int FORMAT_SINT8 = 33; // 0x21
    field public static final int FORMAT_UINT16 = 18; // 0x12
    field public static final int FORMAT_UINT32 = 20; // 0x14
    field public static final int FORMAT_UINT8 = 17; // 0x11
    field public static final int PERMISSION_READ = 1; // 0x1
    field public static final int PERMISSION_READ_ENCRYPTED = 2; // 0x2
    field public static final int PERMISSION_READ_ENCRYPTED_MITM = 4; // 0x4
    field public static final int PERMISSION_WRITE = 16; // 0x10
    field public static final int PERMISSION_WRITE_ENCRYPTED = 32; // 0x20
    field public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 64; // 0x40
    field public static final int PERMISSION_WRITE_SIGNED = 128; // 0x80
    field public static final int PERMISSION_WRITE_SIGNED_MITM = 256; // 0x100
    field public static final int PROPERTY_BROADCAST = 1; // 0x1
    field public static final int PROPERTY_EXTENDED_PROPS = 128; // 0x80
    field public static final int PROPERTY_INDICATE = 32; // 0x20
    field public static final int PROPERTY_NOTIFY = 16; // 0x10
    field public static final int PROPERTY_READ = 2; // 0x2
    field public static final int PROPERTY_SIGNED_WRITE = 64; // 0x40
    field public static final int PROPERTY_WRITE = 8; // 0x8
    field public static final int PROPERTY_WRITE_NO_RESPONSE = 4; // 0x4
    field public static final int WRITE_TYPE_DEFAULT = 2; // 0x2
    field public static final int WRITE_TYPE_NO_RESPONSE = 1; // 0x1
    field public static final int WRITE_TYPE_SIGNED = 4; // 0x4
    field protected java.util.List<android.bluetooth.BluetoothGattDescriptor> mDescriptors;
  }

  public class BluetoothGattDescriptor {
    ctor public BluetoothGattDescriptor(java.util.UUID, int);
    method public android.bluetooth.BluetoothGattCharacteristic getCharacteristic();
    method public int getPermissions();
    method public java.util.UUID getUuid();
    method public byte[] getValue();
    method public boolean setValue(byte[]);
    field public static final byte[] DISABLE_NOTIFICATION_VALUE;
    field public static final byte[] ENABLE_INDICATION_VALUE;
    field public static final byte[] ENABLE_NOTIFICATION_VALUE;
    field public static final int PERMISSION_READ = 1; // 0x1
    field public static final int PERMISSION_READ_ENCRYPTED = 2; // 0x2
    field public static final int PERMISSION_READ_ENCRYPTED_MITM = 4; // 0x4
    field public static final int PERMISSION_WRITE = 16; // 0x10
    field public static final int PERMISSION_WRITE_ENCRYPTED = 32; // 0x20
    field public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 64; // 0x40
    field public static final int PERMISSION_WRITE_SIGNED = 128; // 0x80
    field public static final int PERMISSION_WRITE_SIGNED_MITM = 256; // 0x100
  }

  public final class BluetoothGattServer implements android.bluetooth.BluetoothProfile {
    method public boolean addService(android.bluetooth.BluetoothGattService);
    method public void cancelConnection(android.bluetooth.BluetoothDevice);
    method public void clearServices();
    method public void close();
    method public boolean connect(android.bluetooth.BluetoothDevice, boolean);
    method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
    method public int getConnectionState(android.bluetooth.BluetoothDevice);
    method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
    method public android.bluetooth.BluetoothGattService getService(java.util.UUID);
    method public java.util.List<android.bluetooth.BluetoothGattService> getServices();
    method public boolean notifyCharacteristicChanged(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothGattCharacteristic, boolean);
    method public boolean removeService(android.bluetooth.BluetoothGattService);
    method public boolean sendResponse(android.bluetooth.BluetoothDevice, int, int, int, byte[]);
  }

  public abstract class BluetoothGattServerCallback {
    ctor public BluetoothGattServerCallback();
    method public void onCharacteristicReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattCharacteristic);
    method public void onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[]);
    method public void onConnectionStateChange(android.bluetooth.BluetoothDevice, int, int);
    method public void onDescriptorReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattDescriptor);
    method public void onDescriptorWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattDescriptor, boolean, boolean, int, byte[]);
    method public void onExecuteWrite(android.bluetooth.BluetoothDevice, int, boolean);
    method public void onMtuChanged(android.bluetooth.BluetoothDevice, int);
    method public void onNotificationSent(android.bluetooth.BluetoothDevice, int);
    method public void onServiceAdded(int, android.bluetooth.BluetoothGattService);
  }

  public class BluetoothGattService {
    ctor public BluetoothGattService(java.util.UUID, int);
    method public boolean addCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
    method public boolean addService(android.bluetooth.BluetoothGattService);
    method public android.bluetooth.BluetoothGattCharacteristic getCharacteristic(java.util.UUID);
    method public java.util.List<android.bluetooth.BluetoothGattCharacteristic> getCharacteristics();
    method public java.util.List<android.bluetooth.BluetoothGattService> getIncludedServices();
    method public int getInstanceId();
    method public int getType();
    method public java.util.UUID getUuid();
    field public static final int SERVICE_TYPE_PRIMARY = 0; // 0x0
    field public static final int SERVICE_TYPE_SECONDARY = 1; // 0x1
    field protected java.util.List<android.bluetooth.BluetoothGattCharacteristic> mCharacteristics;
    field protected java.util.List<android.bluetooth.BluetoothGattService> mIncludedServices;
  }

  public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile {
    method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
    method public int getConnectionState(android.bluetooth.BluetoothDevice);
    method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
    method public boolean isAudioConnected(android.bluetooth.BluetoothDevice);
    method public boolean sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice, java.lang.String, java.lang.String);
    method public boolean startVoiceRecognition(android.bluetooth.BluetoothDevice);
    method public boolean stopVoiceRecognition(android.bluetooth.BluetoothDevice);
    field public static final java.lang.String ACTION_AUDIO_STATE_CHANGED = "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED";
    field public static final java.lang.String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED";
    field public static final java.lang.String ACTION_VENDOR_SPECIFIC_HEADSET_EVENT = "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT";
    field public static final int AT_CMD_TYPE_ACTION = 4; // 0x4
    field public static final int AT_CMD_TYPE_BASIC = 3; // 0x3
    field public static final int AT_CMD_TYPE_READ = 0; // 0x0
    field public static final int AT_CMD_TYPE_SET = 2; // 0x2
    field public static final int AT_CMD_TYPE_TEST = 1; // 0x1
    field public static final java.lang.String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_ARGS";
    field public static final java.lang.String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD";
    field public static final java.lang.String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE";
    field public static final int STATE_AUDIO_CONNECTED = 12; // 0xc
    field public static final int STATE_AUDIO_CONNECTING = 11; // 0xb
    field public static final int STATE_AUDIO_DISCONNECTED = 10; // 0xa
    field public static final java.lang.String VENDOR_RESULT_CODE_COMMAND_ANDROID = "+ANDROID";
    field public static final java.lang.String VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY = "android.bluetooth.headset.intent.category.companyid";
  }

  public final class BluetoothHealth implements android.bluetooth.BluetoothProfile {
    method public boolean connectChannelToSource(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration);
    method public boolean disconnectChannel(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration, int);
    method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
    method public int getConnectionState(android.bluetooth.BluetoothDevice);
    method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
    method public android.os.ParcelFileDescriptor getMainChannelFd(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration);
    method public boolean registerSinkAppConfiguration(java.lang.String, int, android.bluetooth.BluetoothHealthCallback);
    method public boolean unregisterAppConfiguration(android.bluetooth.BluetoothHealthAppConfiguration);
    field public static final int APP_CONFIG_REGISTRATION_FAILURE = 1; // 0x1
    field public static final int APP_CONFIG_REGISTRATION_SUCCESS = 0; // 0x0
    field public static final int APP_CONFIG_UNREGISTRATION_FAILURE = 3; // 0x3
    field public static final int APP_CONFIG_UNREGISTRATION_SUCCESS = 2; // 0x2
    field public static final int CHANNEL_TYPE_RELIABLE = 10; // 0xa
    field public static final int CHANNEL_TYPE_STREAMING = 11; // 0xb
    field public static final int SINK_ROLE = 2; // 0x2
    field public static final int SOURCE_ROLE = 1; // 0x1
    field public static final int STATE_CHANNEL_CONNECTED = 2; // 0x2
    field public static final int STATE_CHANNEL_CONNECTING = 1; // 0x1
    field public static final int STATE_CHANNEL_DISCONNECTED = 0; // 0x0
    field public static final int STATE_CHANNEL_DISCONNECTING = 3; // 0x3
  }

  public final class BluetoothHealthAppConfiguration implements android.os.Parcelable {
    method public int describeContents();
    method public int getDataType();
    method public java.lang.String getName();
    method public int getRole();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHealthAppConfiguration> CREATOR;
  }

  public abstract class BluetoothHealthCallback {
    ctor public BluetoothHealthCallback();
    method public void onHealthAppConfigurationStatusChange(android.bluetooth.BluetoothHealthAppConfiguration, int);
    method public void onHealthChannelStateChange(android.bluetooth.BluetoothHealthAppConfiguration, android.bluetooth.BluetoothDevice, int, int, android.os.ParcelFileDescriptor, int);
  }

  public final class BluetoothManager {
    method public android.bluetooth.BluetoothAdapter getAdapter();
    method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(int);
    method public int getConnectionState(android.bluetooth.BluetoothDevice, int);
    method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int, int[]);
    method public android.bluetooth.BluetoothGattServer openGattServer(android.content.Context, android.bluetooth.BluetoothGattServerCallback);
  }

  public abstract interface BluetoothProfile {
    method public abstract java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
    method public abstract int getConnectionState(android.bluetooth.BluetoothDevice);
    method public abstract java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
    field public static final int A2DP = 2; // 0x2
    field public static final java.lang.String EXTRA_PREVIOUS_STATE = "android.bluetooth.profile.extra.PREVIOUS_STATE";
    field public static final java.lang.String EXTRA_STATE = "android.bluetooth.profile.extra.STATE";
    field public static final int GATT = 7; // 0x7
    field public static final int GATT_SERVER = 8; // 0x8
    field public static final int HEADSET = 1; // 0x1
    field public static final int HEALTH = 3; // 0x3
    field public static final int STATE_CONNECTED = 2; // 0x2
    field public static final int STATE_CONNECTING = 1; // 0x1
    field public static final int STATE_DISCONNECTED = 0; // 0x0
    field public static final int STATE_DISCONNECTING = 3; // 0x3
  }

  public static abstract interface BluetoothProfile.ServiceListener {
    method public abstract void onServiceConnected(int, android.bluetooth.BluetoothProfile);
    method public abstract void onServiceDisconnected(int);
  }

  public final class BluetoothServerSocket implements java.io.Closeable {
    method public android.bluetooth.BluetoothSocket accept() throws java.io.IOException;
    method public android.bluetooth.BluetoothSocket accept(int) throws java.io.IOException;
    method public void close() throws java.io.IOException;
  }

  public final class BluetoothSocket implements java.io.Closeable {
    method public void close() throws java.io.IOException;
    method public void connect() throws java.io.IOException;
    method public java.io.InputStream getInputStream() throws java.io.IOException;
    method public java.io.OutputStream getOutputStream() throws java.io.IOException;
    method public android.bluetooth.BluetoothDevice getRemoteDevice();
    method public boolean isConnected();
  }

}

package android.bluetooth.le {

  public abstract class AdvertiseCallback {
    ctor public AdvertiseCallback();
    method public void onStartFailure(int);
    method public void onStartSuccess(android.bluetooth.le.AdvertiseSettings);
    field public static final int ADVERTISE_FAILED_ALREADY_STARTED = 3; // 0x3
    field public static final int ADVERTISE_FAILED_DATA_TOO_LARGE = 1; // 0x1
    field public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED = 5; // 0x5
    field public static final int ADVERTISE_FAILED_INTERNAL_ERROR = 4; // 0x4
    field public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS = 2; // 0x2
  }

  public final class AdvertiseData implements android.os.Parcelable {
    method public int describeContents();
    method public boolean getIncludeDeviceName();
    method public boolean getIncludeTxPowerLevel();
    method public android.util.SparseArray<byte[]> getManufacturerSpecificData();
    method public java.util.Map<android.os.ParcelUuid, byte[]> getServiceData();
    method public java.util.List<android.os.ParcelUuid> getServiceUuids();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertiseData> CREATOR;
  }

  public static final class AdvertiseData.Builder {
    ctor public AdvertiseData.Builder();
    method public android.bluetooth.le.AdvertiseData.Builder addManufacturerData(int, byte[]);
    method public android.bluetooth.le.AdvertiseData.Builder addServiceData(android.os.ParcelUuid, byte[]);
    method public android.bluetooth.le.AdvertiseData.Builder addServiceUuid(android.os.ParcelUuid);
    method public android.bluetooth.le.AdvertiseData build();
    method public android.bluetooth.le.AdvertiseData.Builder setIncludeDeviceName(boolean);
    method public android.bluetooth.le.AdvertiseData.Builder setIncludeTxPowerLevel(boolean);
  }

  public final class AdvertiseSettings implements android.os.Parcelable {
    method public int describeContents();
    method public int getMode();
    method public int getTimeout();
    method public int getTxPowerLevel();
    method public boolean isConnectable();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ADVERTISE_MODE_BALANCED = 1; // 0x1
    field public static final int ADVERTISE_MODE_LOW_LATENCY = 2; // 0x2
    field public static final int ADVERTISE_MODE_LOW_POWER = 0; // 0x0
    field public static final int ADVERTISE_TX_POWER_HIGH = 3; // 0x3
    field public static final int ADVERTISE_TX_POWER_LOW = 1; // 0x1
    field public static final int ADVERTISE_TX_POWER_MEDIUM = 2; // 0x2
    field public static final int ADVERTISE_TX_POWER_ULTRA_LOW = 0; // 0x0
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertiseSettings> CREATOR;
  }

  public static final class AdvertiseSettings.Builder {
    ctor public AdvertiseSettings.Builder();
    method public android.bluetooth.le.AdvertiseSettings build();
    method public android.bluetooth.le.AdvertiseSettings.Builder setAdvertiseMode(int);
    method public android.bluetooth.le.AdvertiseSettings.Builder setConnectable(boolean);
    method public android.bluetooth.le.AdvertiseSettings.Builder setTimeout(int);
    method public android.bluetooth.le.AdvertiseSettings.Builder setTxPowerLevel(int);
  }

  public final class BluetoothLeAdvertiser {
    method public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback);
    method public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback);
    method public void stopAdvertising(android.bluetooth.le.AdvertiseCallback);
  }

  public final class BluetoothLeScanner {
    method public void flushPendingScanResults(android.bluetooth.le.ScanCallback);
    method public void startScan(android.bluetooth.le.ScanCallback);
    method public void startScan(java.util.List<android.bluetooth.le.ScanFilter>, android.bluetooth.le.ScanSettings, android.bluetooth.le.ScanCallback);
    method public void stopScan(android.bluetooth.le.ScanCallback);
  }

  public abstract class ScanCallback {
    ctor public ScanCallback();
    method public void onBatchScanResults(java.util.List<android.bluetooth.le.ScanResult>);
    method public void onScanFailed(int);
    method public void onScanResult(int, android.bluetooth.le.ScanResult);
    field public static final int SCAN_FAILED_ALREADY_STARTED = 1; // 0x1
    field public static final int SCAN_FAILED_APPLICATION_REGISTRATION_FAILED = 2; // 0x2
    field public static final int SCAN_FAILED_FEATURE_UNSUPPORTED = 4; // 0x4
    field public static final int SCAN_FAILED_INTERNAL_ERROR = 3; // 0x3
  }

  public final class ScanFilter implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String getDeviceAddress();
    method public java.lang.String getDeviceName();
    method public byte[] getManufacturerData();
    method public byte[] getManufacturerDataMask();
    method public int getManufacturerId();
    method public byte[] getServiceData();
    method public byte[] getServiceDataMask();
    method public android.os.ParcelUuid getServiceDataUuid();
    method public android.os.ParcelUuid getServiceUuid();
    method public android.os.ParcelUuid getServiceUuidMask();
    method public boolean matches(android.bluetooth.le.ScanResult);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanFilter> CREATOR;
  }

  public static final class ScanFilter.Builder {
    ctor public ScanFilter.Builder();
    method public android.bluetooth.le.ScanFilter build();
    method public android.bluetooth.le.ScanFilter.Builder setDeviceAddress(java.lang.String);
    method public android.bluetooth.le.ScanFilter.Builder setDeviceName(java.lang.String);
    method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[]);
    method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[], byte[]);
    method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[]);
    method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[], byte[]);
    method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid);
    method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
  }

  public final class ScanRecord {
    method public int getAdvertiseFlags();
    method public byte[] getBytes();
    method public java.lang.String getDeviceName();
    method public android.util.SparseArray<byte[]> getManufacturerSpecificData();
    method public byte[] getManufacturerSpecificData(int);
    method public java.util.Map<android.os.ParcelUuid, byte[]> getServiceData();
    method public byte[] getServiceData(android.os.ParcelUuid);
    method public java.util.List<android.os.ParcelUuid> getServiceUuids();
    method public int getTxPowerLevel();
  }

  public final class ScanResult implements android.os.Parcelable {
    ctor public ScanResult(android.bluetooth.BluetoothDevice, android.bluetooth.le.ScanRecord, int, long);
    method public int describeContents();
    method public android.bluetooth.BluetoothDevice getDevice();
    method public int getRssi();
    method public android.bluetooth.le.ScanRecord getScanRecord();
    method public long getTimestampNanos();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanResult> CREATOR;
  }

  public final class ScanSettings implements android.os.Parcelable {
    method public int describeContents();
    method public int getCallbackType();
    method public long getReportDelayMillis();
    method public int getScanMode();
    method public int getScanResultType();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CALLBACK_TYPE_ALL_MATCHES = 1; // 0x1
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR;
    field public static final int SCAN_MODE_BALANCED = 1; // 0x1
    field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2
    field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0
    field public static final int SCAN_MODE_OPPORTUNISTIC = -1; // 0xffffffff
  }

  public static final class ScanSettings.Builder {
    ctor public ScanSettings.Builder();
    method public android.bluetooth.le.ScanSettings build();
    method public android.bluetooth.le.ScanSettings.Builder setReportDelay(long);
    method public android.bluetooth.le.ScanSettings.Builder setScanMode(int);
  }

}

package android.content {

  public abstract class AbstractThreadedSyncAdapter {
    ctor public AbstractThreadedSyncAdapter(android.content.Context, boolean);
    ctor public AbstractThreadedSyncAdapter(android.content.Context, boolean, boolean);
    method public android.content.Context getContext();
    method public final android.os.IBinder getSyncAdapterBinder();
    method public abstract void onPerformSync(android.accounts.Account, android.os.Bundle, java.lang.String, android.content.ContentProviderClient, android.content.SyncResult);
    method public void onSyncCanceled();
    method public void onSyncCanceled(java.lang.Thread);
    field public static final deprecated int LOG_SYNC_DETAILS = 2743; // 0xab7
  }

  public class ActivityNotFoundException extends java.lang.RuntimeException {
    ctor public ActivityNotFoundException();
    ctor public ActivityNotFoundException(java.lang.String);
  }

  public abstract class AsyncQueryHandler extends android.os.Handler {
    ctor public AsyncQueryHandler(android.content.ContentResolver);
    method public final void cancelOperation(int);
    method protected android.os.Handler createHandler(android.os.Looper);
    method protected void onDeleteComplete(int, java.lang.Object, int);
    method protected void onInsertComplete(int, java.lang.Object, android.net.Uri);
    method protected void onQueryComplete(int, java.lang.Object, android.database.Cursor);
    method protected void onUpdateComplete(int, java.lang.Object, int);
    method public final void startDelete(int, java.lang.Object, android.net.Uri, java.lang.String, java.lang.String[]);
    method public final void startInsert(int, java.lang.Object, android.net.Uri, android.content.ContentValues);
    method public void startQuery(int, java.lang.Object, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public final void startUpdate(int, java.lang.Object, android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
  }

  protected static final class AsyncQueryHandler.WorkerArgs {
    ctor protected AsyncQueryHandler.WorkerArgs();
    field public java.lang.Object cookie;
    field public android.os.Handler handler;
    field public java.lang.String orderBy;
    field public java.lang.String[] projection;
    field public java.lang.Object result;
    field public java.lang.String selection;
    field public java.lang.String[] selectionArgs;
    field public android.net.Uri uri;
    field public android.content.ContentValues values;
  }

  protected class AsyncQueryHandler.WorkerHandler extends android.os.Handler {
    ctor public AsyncQueryHandler.WorkerHandler(android.os.Looper);
  }

  public abstract class AsyncTaskLoader extends android.content.Loader {
    ctor public AsyncTaskLoader(android.content.Context);
    method public void cancelLoadInBackground();
    method public boolean isLoadInBackgroundCanceled();
    method public abstract D loadInBackground();
    method public void onCanceled(D);
    method protected D onLoadInBackground();
    method public void setUpdateThrottle(long);
  }

  public abstract class BroadcastReceiver {
    ctor public BroadcastReceiver();
    method public final void abortBroadcast();
    method public final void clearAbortBroadcast();
    method public final boolean getAbortBroadcast();
    method public final boolean getDebugUnregister();
    method public final int getResultCode();
    method public final java.lang.String getResultData();
    method public final android.os.Bundle getResultExtras(boolean);
    method public final android.content.BroadcastReceiver.PendingResult goAsync();
    method public final boolean isInitialStickyBroadcast();
    method public final boolean isOrderedBroadcast();
    method public abstract void onReceive(android.content.Context, android.content.Intent);
    method public android.os.IBinder peekService(android.content.Context, android.content.Intent);
    method public final void setDebugUnregister(boolean);
    method public final void setOrderedHint(boolean);
    method public final void setResult(int, java.lang.String, android.os.Bundle);
    method public final void setResultCode(int);
    method public final void setResultData(java.lang.String);
    method public final void setResultExtras(android.os.Bundle);
  }

  public static class BroadcastReceiver.PendingResult {
    method public final void abortBroadcast();
    method public final void clearAbortBroadcast();
    method public final void finish();
    method public final boolean getAbortBroadcast();
    method public final int getResultCode();
    method public final java.lang.String getResultData();
    method public final android.os.Bundle getResultExtras(boolean);
    method public final void setResult(int, java.lang.String, android.os.Bundle);
    method public final void setResultCode(int);
    method public final void setResultData(java.lang.String);
    method public final void setResultExtras(android.os.Bundle);
  }

  public class ClipData implements android.os.Parcelable {
    ctor public ClipData(java.lang.CharSequence, java.lang.String[], android.content.ClipData.Item);
    ctor public ClipData(android.content.ClipDescription, android.content.ClipData.Item);
    ctor public ClipData(android.content.ClipData);
    method public void addItem(android.content.ClipData.Item);
    method public int describeContents();
    method public android.content.ClipDescription getDescription();
    method public android.content.ClipData.Item getItemAt(int);
    method public int getItemCount();
    method public static android.content.ClipData newHtmlText(java.lang.CharSequence, java.lang.CharSequence, java.lang.String);
    method public static android.content.ClipData newIntent(java.lang.CharSequence, android.content.Intent);
    method public static android.content.ClipData newPlainText(java.lang.CharSequence, java.lang.CharSequence);
    method public static android.content.ClipData newRawUri(java.lang.CharSequence, android.net.Uri);
    method public static android.content.ClipData newUri(android.content.ContentResolver, java.lang.CharSequence, android.net.Uri);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.ClipData> CREATOR;
  }

  public static class ClipData.Item {
    ctor public ClipData.Item(java.lang.CharSequence);
    ctor public ClipData.Item(java.lang.CharSequence, java.lang.String);
    ctor public ClipData.Item(android.content.Intent);
    ctor public ClipData.Item(android.net.Uri);
    ctor public ClipData.Item(java.lang.CharSequence, android.content.Intent, android.net.Uri);
    ctor public ClipData.Item(java.lang.CharSequence, java.lang.String, android.content.Intent, android.net.Uri);
    method public java.lang.String coerceToHtmlText(android.content.Context);
    method public java.lang.CharSequence coerceToStyledText(android.content.Context);
    method public java.lang.CharSequence coerceToText(android.content.Context);
    method public java.lang.String getHtmlText();
    method public android.content.Intent getIntent();
    method public java.lang.CharSequence getText();
    method public android.net.Uri getUri();
  }

  public class ClipDescription implements android.os.Parcelable {
    ctor public ClipDescription(java.lang.CharSequence, java.lang.String[]);
    ctor public ClipDescription(android.content.ClipDescription);
    method public static boolean compareMimeTypes(java.lang.String, java.lang.String);
    method public int describeContents();
    method public java.lang.String[] filterMimeTypes(java.lang.String);
    method public java.lang.CharSequence getLabel();
    method public java.lang.String getMimeType(int);
    method public int getMimeTypeCount();
    method public boolean hasMimeType(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.ClipDescription> CREATOR;
    field public static final java.lang.String MIMETYPE_TEXT_HTML = "text/html";
    field public static final java.lang.String MIMETYPE_TEXT_INTENT = "text/vnd.android.intent";
    field public static final java.lang.String MIMETYPE_TEXT_PLAIN = "text/plain";
    field public static final java.lang.String MIMETYPE_TEXT_URILIST = "text/uri-list";
  }

  public class ClipboardManager extends android.text.ClipboardManager {
    method public void addPrimaryClipChangedListener(android.content.ClipboardManager.OnPrimaryClipChangedListener);
    method public android.content.ClipData getPrimaryClip();
    method public android.content.ClipDescription getPrimaryClipDescription();
    method public deprecated java.lang.CharSequence getText();
    method public boolean hasPrimaryClip();
    method public deprecated boolean hasText();
    method public void removePrimaryClipChangedListener(android.content.ClipboardManager.OnPrimaryClipChangedListener);
    method public void setPrimaryClip(android.content.ClipData);
    method public deprecated void setText(java.lang.CharSequence);
  }

  public static abstract interface ClipboardManager.OnPrimaryClipChangedListener {
    method public abstract void onPrimaryClipChanged();
  }

  public abstract interface ComponentCallbacks {
    method public abstract void onConfigurationChanged(android.content.res.Configuration);
    method public abstract void onLowMemory();
  }

  public abstract interface ComponentCallbacks2 implements android.content.ComponentCallbacks {
    method public abstract void onTrimMemory(int);
    field public static final int TRIM_MEMORY_BACKGROUND = 40; // 0x28
    field public static final int TRIM_MEMORY_COMPLETE = 80; // 0x50
    field public static final int TRIM_MEMORY_MODERATE = 60; // 0x3c
    field public static final int TRIM_MEMORY_RUNNING_CRITICAL = 15; // 0xf
    field public static final int TRIM_MEMORY_RUNNING_LOW = 10; // 0xa
    field public static final int TRIM_MEMORY_RUNNING_MODERATE = 5; // 0x5
    field public static final int TRIM_MEMORY_UI_HIDDEN = 20; // 0x14
  }

  public final class ComponentName implements java.lang.Cloneable java.lang.Comparable android.os.Parcelable {
    ctor public ComponentName(java.lang.String, java.lang.String);
    ctor public ComponentName(android.content.Context, java.lang.String);
    ctor public ComponentName(android.content.Context, java.lang.Class<?>);
    ctor public ComponentName(android.os.Parcel);
    method public android.content.ComponentName clone();
    method public int compareTo(android.content.ComponentName);
    method public int describeContents();
    method public java.lang.String flattenToShortString();
    method public java.lang.String flattenToString();
    method public java.lang.String getClassName();
    method public java.lang.String getPackageName();
    method public java.lang.String getShortClassName();
    method public static android.content.ComponentName readFromParcel(android.os.Parcel);
    method public java.lang.String toShortString();
    method public static android.content.ComponentName unflattenFromString(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    method public static void writeToParcel(android.content.ComponentName, android.os.Parcel);
    field public static final android.os.Parcelable.Creator<android.content.ComponentName> CREATOR;
  }

  public abstract class ContentProvider implements android.content.ComponentCallbacks2 {
    ctor public ContentProvider();
    method public android.content.ContentProviderResult[] applyBatch(java.util.ArrayList<android.content.ContentProviderOperation>) throws android.content.OperationApplicationException;
    method public void attachInfo(android.content.Context, android.content.pm.ProviderInfo);
    method public int bulkInsert(android.net.Uri, android.content.ContentValues[]);
    method public android.os.Bundle call(java.lang.String, java.lang.String, android.os.Bundle);
    method public android.net.Uri canonicalize(android.net.Uri);
    method public abstract int delete(android.net.Uri, java.lang.String, java.lang.String[]);
    method public void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public final java.lang.String getCallingPackage();
    method public final android.content.Context getContext();
    method public final android.content.pm.PathPermission[] getPathPermissions();
    method public final java.lang.String getReadPermission();
    method public java.lang.String[] getStreamTypes(android.net.Uri, java.lang.String);
    method public abstract java.lang.String getType(android.net.Uri);
    method public final java.lang.String getWritePermission();
    method public abstract android.net.Uri insert(android.net.Uri, android.content.ContentValues);
    method protected boolean isTemporary();
    method public void onConfigurationChanged(android.content.res.Configuration);
    method public abstract boolean onCreate();
    method public void onLowMemory();
    method public void onTrimMemory(int);
    method public android.content.res.AssetFileDescriptor openAssetFile(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public android.content.res.AssetFileDescriptor openAssetFile(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public android.os.ParcelFileDescriptor openFile(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public android.os.ParcelFileDescriptor openFile(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method protected final android.os.ParcelFileDescriptor openFileHelper(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public android.os.ParcelFileDescriptor openPipeHelper(android.net.Uri, java.lang.String, android.os.Bundle, T, android.content.ContentProvider.PipeDataWriter<T>) throws java.io.FileNotFoundException;
    method public android.content.res.AssetFileDescriptor openTypedAssetFile(android.net.Uri, java.lang.String, android.os.Bundle) throws java.io.FileNotFoundException;
    method public android.content.res.AssetFileDescriptor openTypedAssetFile(android.net.Uri, java.lang.String, android.os.Bundle, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public abstract android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal);
    method protected final void setPathPermissions(android.content.pm.PathPermission[]);
    method protected final void setReadPermission(java.lang.String);
    method protected final void setWritePermission(java.lang.String);
    method public void shutdown();
    method public android.net.Uri uncanonicalize(android.net.Uri);
    method public abstract int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
  }

  public static abstract interface ContentProvider.PipeDataWriter {
    method public abstract void writeDataToPipe(android.os.ParcelFileDescriptor, android.net.Uri, java.lang.String, android.os.Bundle, T);
  }

  public class ContentProviderClient {
    method public android.content.ContentProviderResult[] applyBatch(java.util.ArrayList<android.content.ContentProviderOperation>) throws android.content.OperationApplicationException, android.os.RemoteException;
    method public int bulkInsert(android.net.Uri, android.content.ContentValues[]) throws android.os.RemoteException;
    method public android.os.Bundle call(java.lang.String, java.lang.String, android.os.Bundle) throws android.os.RemoteException;
    method public final android.net.Uri canonicalize(android.net.Uri) throws android.os.RemoteException;
    method public int delete(android.net.Uri, java.lang.String, java.lang.String[]) throws android.os.RemoteException;
    method public android.content.ContentProvider getLocalContentProvider();
    method public java.lang.String[] getStreamTypes(android.net.Uri, java.lang.String) throws android.os.RemoteException;
    method public java.lang.String getType(android.net.Uri) throws android.os.RemoteException;
    method public android.net.Uri insert(android.net.Uri, android.content.ContentValues) throws android.os.RemoteException;
    method public android.content.res.AssetFileDescriptor openAssetFile(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException, android.os.RemoteException;
    method public android.content.res.AssetFileDescriptor openAssetFile(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException, android.os.RemoteException;
    method public android.os.ParcelFileDescriptor openFile(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException, android.os.RemoteException;
    method public android.os.ParcelFileDescriptor openFile(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException, android.os.RemoteException;
    method public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(android.net.Uri, java.lang.String, android.os.Bundle) throws java.io.FileNotFoundException, android.os.RemoteException;
    method public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(android.net.Uri, java.lang.String, android.os.Bundle, android.os.CancellationSignal) throws java.io.FileNotFoundException, android.os.RemoteException;
    method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String) throws android.os.RemoteException;
    method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal) throws android.os.RemoteException;
    method public boolean release();
    method public final android.net.Uri uncanonicalize(android.net.Uri) throws android.os.RemoteException;
    method public int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]) throws android.os.RemoteException;
  }

  public class ContentProviderOperation implements android.os.Parcelable {
    method public android.content.ContentProviderResult apply(android.content.ContentProvider, android.content.ContentProviderResult[], int) throws android.content.OperationApplicationException;
    method public int describeContents();
    method public android.net.Uri getUri();
    method public boolean isAssertQuery();
    method public boolean isDelete();
    method public boolean isInsert();
    method public boolean isReadOperation();
    method public boolean isUpdate();
    method public boolean isWriteOperation();
    method public boolean isYieldAllowed();
    method public static android.content.ContentProviderOperation.Builder newAssertQuery(android.net.Uri);
    method public static android.content.ContentProviderOperation.Builder newDelete(android.net.Uri);
    method public static android.content.ContentProviderOperation.Builder newInsert(android.net.Uri);
    method public static android.content.ContentProviderOperation.Builder newUpdate(android.net.Uri);
    method public java.lang.String[] resolveSelectionArgsBackReferences(android.content.ContentProviderResult[], int);
    method public android.content.ContentValues resolveValueBackReferences(android.content.ContentProviderResult[], int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.ContentProviderOperation> CREATOR;
  }

  public static class ContentProviderOperation.Builder {
    method public android.content.ContentProviderOperation build();
    method public android.content.ContentProviderOperation.Builder withExpectedCount(int);
    method public android.content.ContentProviderOperation.Builder withSelection(java.lang.String, java.lang.String[]);
    method public android.content.ContentProviderOperation.Builder withSelectionBackReference(int, int);
    method public android.content.ContentProviderOperation.Builder withValue(java.lang.String, java.lang.Object);
    method public android.content.ContentProviderOperation.Builder withValueBackReference(java.lang.String, int);
    method public android.content.ContentProviderOperation.Builder withValueBackReferences(android.content.ContentValues);
    method public android.content.ContentProviderOperation.Builder withValues(android.content.ContentValues);
    method public android.content.ContentProviderOperation.Builder withYieldAllowed(boolean);
  }

  public class ContentProviderResult implements android.os.Parcelable {
    ctor public ContentProviderResult(android.net.Uri);
    ctor public ContentProviderResult(int);
    ctor public ContentProviderResult(android.os.Parcel);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.ContentProviderResult> CREATOR;
    field public final java.lang.Integer count;
    field public final android.net.Uri uri;
  }

  public class ContentQueryMap extends java.util.Observable {
    ctor public ContentQueryMap(android.database.Cursor, java.lang.String, boolean, android.os.Handler);
    method public synchronized void close();
    method public synchronized java.util.Map<java.lang.String, android.content.ContentValues> getRows();
    method public synchronized android.content.ContentValues getValues(java.lang.String);
    method public void requery();
    method public void setKeepUpdated(boolean);
  }

  public abstract class ContentResolver {
    ctor public ContentResolver(android.content.Context);
    method public final android.content.ContentProviderClient acquireContentProviderClient(android.net.Uri);
    method public final android.content.ContentProviderClient acquireContentProviderClient(java.lang.String);
    method public final android.content.ContentProviderClient acquireUnstableContentProviderClient(android.net.Uri);
    method public final android.content.ContentProviderClient acquireUnstableContentProviderClient(java.lang.String);
    method public static void addPeriodicSync(android.accounts.Account, java.lang.String, android.os.Bundle, long);
    method public static java.lang.Object addStatusChangeListener(int, android.content.SyncStatusObserver);
    method public android.content.ContentProviderResult[] applyBatch(java.lang.String, java.util.ArrayList<android.content.ContentProviderOperation>) throws android.content.OperationApplicationException, android.os.RemoteException;
    method public final int bulkInsert(android.net.Uri, android.content.ContentValues[]);
    method public final android.os.Bundle call(android.net.Uri, java.lang.String, java.lang.String, android.os.Bundle);
    method public deprecated void cancelSync(android.net.Uri);
    method public static void cancelSync(android.accounts.Account, java.lang.String);
    method public static void cancelSync(android.content.SyncRequest);
    method public final android.net.Uri canonicalize(android.net.Uri);
    method public final int delete(android.net.Uri, java.lang.String, java.lang.String[]);
    method public static deprecated android.content.SyncInfo getCurrentSync();
    method public static java.util.List<android.content.SyncInfo> getCurrentSyncs();
    method public static int getIsSyncable(android.accounts.Account, java.lang.String);
    method public static boolean getMasterSyncAutomatically();
    method public java.util.List<android.content.UriPermission> getOutgoingPersistedUriPermissions();
    method public static java.util.List<android.content.PeriodicSync> getPeriodicSyncs(android.accounts.Account, java.lang.String);
    method public java.util.List<android.content.UriPermission> getPersistedUriPermissions();
    method public java.lang.String[] getStreamTypes(android.net.Uri, java.lang.String);
    method public static android.content.SyncAdapterType[] getSyncAdapterTypes();
    method public static boolean getSyncAutomatically(android.accounts.Account, java.lang.String);
    method public final java.lang.String getType(android.net.Uri);
    method public final android.net.Uri insert(android.net.Uri, android.content.ContentValues);
    method public static boolean isSyncActive(android.accounts.Account, java.lang.String);
    method public static boolean isSyncPending(android.accounts.Account, java.lang.String);
    method public void notifyChange(android.net.Uri, android.database.ContentObserver);
    method public void notifyChange(android.net.Uri, android.database.ContentObserver, boolean);
    method public final android.content.res.AssetFileDescriptor openAssetFileDescriptor(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public final android.content.res.AssetFileDescriptor openAssetFileDescriptor(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public final android.os.ParcelFileDescriptor openFileDescriptor(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public final android.os.ParcelFileDescriptor openFileDescriptor(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public final java.io.InputStream openInputStream(android.net.Uri) throws java.io.FileNotFoundException;
    method public final java.io.OutputStream openOutputStream(android.net.Uri) throws java.io.FileNotFoundException;
    method public final java.io.OutputStream openOutputStream(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(android.net.Uri, java.lang.String, android.os.Bundle) throws java.io.FileNotFoundException;
    method public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(android.net.Uri, java.lang.String, android.os.Bundle, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public final android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public final android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal);
    method public final void registerContentObserver(android.net.Uri, boolean, android.database.ContentObserver);
    method public void releasePersistableUriPermission(android.net.Uri, int);
    method public static void removePeriodicSync(android.accounts.Account, java.lang.String, android.os.Bundle);
    method public static void removeStatusChangeListener(java.lang.Object);
    method public static void requestSync(android.accounts.Account, java.lang.String, android.os.Bundle);
    method public static void requestSync(android.content.SyncRequest);
    method public static void setIsSyncable(android.accounts.Account, java.lang.String, int);
    method public static void setMasterSyncAutomatically(boolean);
    method public static void setSyncAutomatically(android.accounts.Account, java.lang.String, boolean);
    method public deprecated void startSync(android.net.Uri, android.os.Bundle);
    method public void takePersistableUriPermission(android.net.Uri, int);
    method public final android.net.Uri uncanonicalize(android.net.Uri);
    method public final void unregisterContentObserver(android.database.ContentObserver);
    method public final int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
    method public static void validateSyncExtrasBundle(android.os.Bundle);
    field public static final java.lang.String ANY_CURSOR_ITEM_TYPE = "vnd.android.cursor.item/*";
    field public static final java.lang.String CURSOR_DIR_BASE_TYPE = "vnd.android.cursor.dir";
    field public static final java.lang.String CURSOR_ITEM_BASE_TYPE = "vnd.android.cursor.item";
    field public static final java.lang.String EXTRA_SIZE = "android.content.extra.SIZE";
    field public static final java.lang.String SCHEME_ANDROID_RESOURCE = "android.resource";
    field public static final java.lang.String SCHEME_CONTENT = "content";
    field public static final java.lang.String SCHEME_FILE = "file";
    field public static final deprecated java.lang.String SYNC_EXTRAS_ACCOUNT = "account";
    field public static final java.lang.String SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS = "discard_deletions";
    field public static final java.lang.String SYNC_EXTRAS_DO_NOT_RETRY = "do_not_retry";
    field public static final java.lang.String SYNC_EXTRAS_EXPEDITED = "expedited";
    field public static final deprecated java.lang.String SYNC_EXTRAS_FORCE = "force";
    field public static final java.lang.String SYNC_EXTRAS_IGNORE_BACKOFF = "ignore_backoff";
    field public static final java.lang.String SYNC_EXTRAS_IGNORE_SETTINGS = "ignore_settings";
    field public static final java.lang.String SYNC_EXTRAS_INITIALIZE = "initialize";
    field public static final java.lang.String SYNC_EXTRAS_MANUAL = "force";
    field public static final java.lang.String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override";
    field public static final java.lang.String SYNC_EXTRAS_UPLOAD = "upload";
    field public static final int SYNC_OBSERVER_TYPE_ACTIVE = 4; // 0x4
    field public static final int SYNC_OBSERVER_TYPE_PENDING = 2; // 0x2
    field public static final int SYNC_OBSERVER_TYPE_SETTINGS = 1; // 0x1
  }

  public class ContentUris {
    ctor public ContentUris();
    method public static android.net.Uri.Builder appendId(android.net.Uri.Builder, long);
    method public static long parseId(android.net.Uri);
    method public static android.net.Uri withAppendedId(android.net.Uri, long);
  }

  public final class ContentValues implements android.os.Parcelable {
    ctor public ContentValues();
    ctor public ContentValues(int);
    ctor public ContentValues(android.content.ContentValues);
    method public void clear();
    method public boolean containsKey(java.lang.String);
    method public int describeContents();
    method public java.lang.Object get(java.lang.String);
    method public java.lang.Boolean getAsBoolean(java.lang.String);
    method public java.lang.Byte getAsByte(java.lang.String);
    method public byte[] getAsByteArray(java.lang.String);
    method public java.lang.Double getAsDouble(java.lang.String);
    method public java.lang.Float getAsFloat(java.lang.String);
    method public java.lang.Integer getAsInteger(java.lang.String);
    method public java.lang.Long getAsLong(java.lang.String);
    method public java.lang.Short getAsShort(java.lang.String);
    method public java.lang.String getAsString(java.lang.String);
    method public java.util.Set<java.lang.String> keySet();
    method public void put(java.lang.String, java.lang.String);
    method public void put(java.lang.String, java.lang.Byte);
    method public void put(java.lang.String, java.lang.Short);
    method public void put(java.lang.String, java.lang.Integer);
    method public void put(java.lang.String, java.lang.Long);
    method public void put(java.lang.String, java.lang.Float);
    method public void put(java.lang.String, java.lang.Double);
    method public void put(java.lang.String, java.lang.Boolean);
    method public void put(java.lang.String, byte[]);
    method public void putAll(android.content.ContentValues);
    method public void putNull(java.lang.String);
    method public void remove(java.lang.String);
    method public int size();
    method public java.util.Set<java.util.Map.Entry<java.lang.String, java.lang.Object>> valueSet();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.ContentValues> CREATOR;
    field public static final java.lang.String TAG = "ContentValues";
  }

  public abstract class Context {
    ctor public Context();
    method public abstract boolean bindService(android.content.Intent, android.content.ServiceConnection, int);
    method public abstract int checkCallingOrSelfPermission(java.lang.String);
    method public abstract int checkCallingOrSelfUriPermission(android.net.Uri, int);
    method public abstract int checkCallingPermission(java.lang.String);
    method public abstract int checkCallingUriPermission(android.net.Uri, int);
    method public abstract int checkPermission(java.lang.String, int, int);
    method public abstract int checkSelfPermission(java.lang.String);
    method public abstract int checkUriPermission(android.net.Uri, int, int, int);
    method public abstract int checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int);
    method public abstract deprecated void clearWallpaper() throws java.io.IOException;
    method public abstract android.content.Context createConfigurationContext(android.content.res.Configuration);
    method public abstract android.content.Context createDisplayContext(android.view.Display);
    method public abstract android.content.Context createPackageContext(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract java.lang.String[] databaseList();
    method public abstract boolean deleteDatabase(java.lang.String);
    method public abstract boolean deleteFile(java.lang.String);
    method public abstract void enforceCallingOrSelfPermission(java.lang.String, java.lang.String);
    method public abstract void enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String);
    method public abstract void enforceCallingPermission(java.lang.String, java.lang.String);
    method public abstract void enforceCallingUriPermission(android.net.Uri, int, java.lang.String);
    method public abstract void enforcePermission(java.lang.String, int, int, java.lang.String);
    method public abstract void enforceUriPermission(android.net.Uri, int, int, int, java.lang.String);
    method public abstract void enforceUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int, java.lang.String);
    method public abstract java.lang.String[] fileList();
    method public abstract android.content.Context getApplicationContext();
    method public abstract android.content.pm.ApplicationInfo getApplicationInfo();
    method public abstract android.content.res.AssetManager getAssets();
    method public abstract java.io.File getCacheDir();
    method public abstract java.lang.ClassLoader getClassLoader();
    method public abstract java.io.File getCodeCacheDir();
    method public final int getColor(int);
    method public final android.content.res.ColorStateList getColorStateList(int);
    method public abstract android.content.ContentResolver getContentResolver();
    method public abstract java.io.File getDatabasePath(java.lang.String);
    method public abstract java.io.File getDir(java.lang.String, int);
    method public final android.graphics.drawable.Drawable getDrawable(int);
    method public abstract java.io.File getExternalCacheDir();
    method public abstract java.io.File[] getExternalCacheDirs();
    method public abstract java.io.File getExternalFilesDir(java.lang.String);
    method public abstract java.io.File[] getExternalFilesDirs(java.lang.String);
    method public abstract java.io.File[] getExternalMediaDirs();
    method public abstract java.io.File getFileStreamPath(java.lang.String);
    method public abstract java.io.File getFilesDir();
    method public abstract android.os.Looper getMainLooper();
    method public abstract java.io.File getNoBackupFilesDir();
    method public abstract java.io.File getObbDir();
    method public abstract java.io.File[] getObbDirs();
    method public abstract java.lang.String getPackageCodePath();
    method public abstract android.content.pm.PackageManager getPackageManager();
    method public abstract java.lang.String getPackageName();
    method public abstract java.lang.String getPackageResourcePath();
    method public abstract android.content.res.Resources getResources();
    method public abstract android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public final java.lang.String getString(int);
    method public final java.lang.String getString(int, java.lang.Object...);
    method public abstract java.lang.Object getSystemService(java.lang.String);
    method public final T getSystemService(java.lang.Class<T>);
    method public final java.lang.CharSequence getText(int);
    method public abstract android.content.res.Resources.Theme getTheme();
    method public abstract deprecated android.graphics.drawable.Drawable getWallpaper();
    method public abstract deprecated int getWallpaperDesiredMinimumHeight();
    method public abstract deprecated int getWallpaperDesiredMinimumWidth();
    method public abstract void grantUriPermission(java.lang.String, android.net.Uri, int);
    method public boolean isRestricted();
    method public final android.content.res.TypedArray obtainStyledAttributes(int[]);
    method public final android.content.res.TypedArray obtainStyledAttributes(int, int[]) throws android.content.res.Resources.NotFoundException;
    method public final android.content.res.TypedArray obtainStyledAttributes(android.util.AttributeSet, int[]);
    method public final android.content.res.TypedArray obtainStyledAttributes(android.util.AttributeSet, int[], int, int);
    method public abstract java.io.FileInputStream openFileInput(java.lang.String) throws java.io.FileNotFoundException;
    method public abstract java.io.FileOutputStream openFileOutput(java.lang.String, int) throws java.io.FileNotFoundException;
    method public abstract android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory);
    method public abstract android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler);
    method public abstract deprecated android.graphics.drawable.Drawable peekWallpaper();
    method public void registerComponentCallbacks(android.content.ComponentCallbacks);
    method public abstract android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter);
    method public abstract android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler);
    method public abstract deprecated void removeStickyBroadcast(android.content.Intent);
    method public abstract deprecated void removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public abstract void revokeUriPermission(android.net.Uri, int);
    method public abstract void sendBroadcast(android.content.Intent);
    method public abstract void sendBroadcast(android.content.Intent, java.lang.String);
    method public abstract void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public abstract void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String);
    method public abstract void sendOrderedBroadcast(android.content.Intent, java.lang.String);
    method public abstract void sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public abstract void sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public abstract deprecated void sendStickyBroadcast(android.content.Intent);
    method public abstract deprecated void sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public abstract deprecated void sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public abstract deprecated void sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public abstract void setTheme(int);
    method public abstract deprecated void setWallpaper(android.graphics.Bitmap) throws java.io.IOException;
    method public abstract deprecated void setWallpaper(java.io.InputStream) throws java.io.IOException;
    method public abstract void startActivities(android.content.Intent[]);
    method public abstract void startActivities(android.content.Intent[], android.os.Bundle);
    method public abstract void startActivity(android.content.Intent);
    method public abstract void startActivity(android.content.Intent, android.os.Bundle);
    method public abstract boolean startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle);
    method public abstract void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public abstract void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public abstract android.content.ComponentName startService(android.content.Intent);
    method public abstract boolean stopService(android.content.Intent);
    method public abstract void unbindService(android.content.ServiceConnection);
    method public void unregisterComponentCallbacks(android.content.ComponentCallbacks);
    method public abstract void unregisterReceiver(android.content.BroadcastReceiver);
    field public static final java.lang.String ACCESSIBILITY_SERVICE = "accessibility";
    field public static final java.lang.String ACCOUNT_SERVICE = "account";
    field public static final java.lang.String ACTIVITY_SERVICE = "activity";
    field public static final java.lang.String ALARM_SERVICE = "alarm";
    field public static final java.lang.String APPWIDGET_SERVICE = "appwidget";
    field public static final java.lang.String APP_OPS_SERVICE = "appops";
    field public static final java.lang.String AUDIO_SERVICE = "audio";
    field public static final java.lang.String BATTERY_SERVICE = "batterymanager";
    field public static final int BIND_ABOVE_CLIENT = 8; // 0x8
    field public static final int BIND_ADJUST_WITH_ACTIVITY = 128; // 0x80
    field public static final int BIND_ALLOW_OOM_MANAGEMENT = 16; // 0x10
    field public static final int BIND_AUTO_CREATE = 1; // 0x1
    field public static final int BIND_DEBUG_UNBIND = 2; // 0x2
    field public static final int BIND_IMPORTANT = 64; // 0x40
    field public static final int BIND_NOT_FOREGROUND = 4; // 0x4
    field public static final int BIND_WAIVE_PRIORITY = 32; // 0x20
    field public static final java.lang.String BLUETOOTH_SERVICE = "bluetooth";
    field public static final java.lang.String CAMERA_SERVICE = "camera";
    field public static final java.lang.String CAPTIONING_SERVICE = "captioning";
    field public static final java.lang.String CLIPBOARD_SERVICE = "clipboard";
    field public static final java.lang.String CONNECTIVITY_SERVICE = "connectivity";
    field public static final java.lang.String CONSUMER_IR_SERVICE = "consumer_ir";
    field public static final int CONTEXT_IGNORE_SECURITY = 2; // 0x2
    field public static final int CONTEXT_INCLUDE_CODE = 1; // 0x1
    field public static final int CONTEXT_RESTRICTED = 4; // 0x4
    field public static final java.lang.String DEVICE_POLICY_SERVICE = "device_policy";
    field public static final java.lang.String DISPLAY_SERVICE = "display";
    field public static final java.lang.String DOWNLOAD_SERVICE = "download";
    field public static final java.lang.String DROPBOX_SERVICE = "dropbox";
    field public static final java.lang.String FINGERPRINT_SERVICE = "fingerprint";
    field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
    field public static final java.lang.String INPUT_SERVICE = "input";
    field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
    field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
    field public static final java.lang.String LAUNCHER_APPS_SERVICE = "launcherapps";
    field public static final java.lang.String LAYOUT_INFLATER_SERVICE = "layout_inflater";
    field public static final java.lang.String LOCATION_SERVICE = "location";
    field public static final java.lang.String MEDIA_PROJECTION_SERVICE = "media_projection";
    field public static final java.lang.String MEDIA_ROUTER_SERVICE = "media_router";
    field public static final java.lang.String MEDIA_SESSION_SERVICE = "media_session";
    field public static final int MODE_APPEND = 32768; // 0x8000
    field public static final int MODE_ENABLE_WRITE_AHEAD_LOGGING = 8; // 0x8
    field public static final int MODE_MULTI_PROCESS = 4; // 0x4
    field public static final int MODE_PRIVATE = 0; // 0x0
    field public static final deprecated int MODE_WORLD_READABLE = 1; // 0x1
    field public static final deprecated int MODE_WORLD_WRITEABLE = 2; // 0x2
    field public static final java.lang.String NETWORK_STATS_SERVICE = "netstats";
    field public static final java.lang.String NFC_SERVICE = "nfc";
    field public static final java.lang.String NOTIFICATION_SERVICE = "notification";
    field public static final java.lang.String NSD_SERVICE = "servicediscovery";
    field public static final java.lang.String POWER_SERVICE = "power";
    field public static final java.lang.String PRINT_SERVICE = "print";
    field public static final java.lang.String RESTRICTIONS_SERVICE = "restrictions";
    field public static final java.lang.String SEARCH_SERVICE = "search";
    field public static final java.lang.String SENSOR_SERVICE = "sensor";
    field public static final java.lang.String STORAGE_SERVICE = "storage";
    field public static final java.lang.String TELECOM_SERVICE = "telecom";
    field public static final java.lang.String TELEPHONY_SERVICE = "phone";
    field public static final java.lang.String TELEPHONY_SUBSCRIPTION_SERVICE = "telephony_subscription_service";
    field public static final java.lang.String TEXT_SERVICES_MANAGER_SERVICE = "textservices";
    field public static final java.lang.String TV_INPUT_SERVICE = "tv_input";
    field public static final java.lang.String UI_MODE_SERVICE = "uimode";
    field public static final java.lang.String USAGE_STATS_SERVICE = "usagestats";
    field public static final java.lang.String USB_SERVICE = "usb";
    field public static final java.lang.String USER_SERVICE = "user";
    field public static final java.lang.String VIBRATOR_SERVICE = "vibrator";
    field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper";
    field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p";
    field public static final java.lang.String WIFI_SERVICE = "wifi";
    field public static final java.lang.String WINDOW_SERVICE = "window";
  }

  public class ContextWrapper extends android.content.Context {
    ctor public ContextWrapper(android.content.Context);
    method protected void attachBaseContext(android.content.Context);
    method public boolean bindService(android.content.Intent, android.content.ServiceConnection, int);
    method public int checkCallingOrSelfPermission(java.lang.String);
    method public int checkCallingOrSelfUriPermission(android.net.Uri, int);
    method public int checkCallingPermission(java.lang.String);
    method public int checkCallingUriPermission(android.net.Uri, int);
    method public int checkPermission(java.lang.String, int, int);
    method public int checkSelfPermission(java.lang.String);
    method public int checkUriPermission(android.net.Uri, int, int, int);
    method public int checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int);
    method public deprecated void clearWallpaper() throws java.io.IOException;
    method public android.content.Context createConfigurationContext(android.content.res.Configuration);
    method public android.content.Context createDisplayContext(android.view.Display);
    method public android.content.Context createPackageContext(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public java.lang.String[] databaseList();
    method public boolean deleteDatabase(java.lang.String);
    method public boolean deleteFile(java.lang.String);
    method public void enforceCallingOrSelfPermission(java.lang.String, java.lang.String);
    method public void enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String);
    method public void enforceCallingPermission(java.lang.String, java.lang.String);
    method public void enforceCallingUriPermission(android.net.Uri, int, java.lang.String);
    method public void enforcePermission(java.lang.String, int, int, java.lang.String);
    method public void enforceUriPermission(android.net.Uri, int, int, int, java.lang.String);
    method public void enforceUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int, java.lang.String);
    method public java.lang.String[] fileList();
    method public android.content.Context getApplicationContext();
    method public android.content.pm.ApplicationInfo getApplicationInfo();
    method public android.content.res.AssetManager getAssets();
    method public android.content.Context getBaseContext();
    method public java.io.File getCacheDir();
    method public java.lang.ClassLoader getClassLoader();
    method public java.io.File getCodeCacheDir();
    method public android.content.ContentResolver getContentResolver();
    method public java.io.File getDatabasePath(java.lang.String);
    method public java.io.File getDir(java.lang.String, int);
    method public java.io.File getExternalCacheDir();
    method public java.io.File[] getExternalCacheDirs();
    method public java.io.File getExternalFilesDir(java.lang.String);
    method public java.io.File[] getExternalFilesDirs(java.lang.String);
    method public java.io.File[] getExternalMediaDirs();
    method public java.io.File getFileStreamPath(java.lang.String);
    method public java.io.File getFilesDir();
    method public android.os.Looper getMainLooper();
    method public java.io.File getNoBackupFilesDir();
    method public java.io.File getObbDir();
    method public java.io.File[] getObbDirs();
    method public java.lang.String getPackageCodePath();
    method public android.content.pm.PackageManager getPackageManager();
    method public java.lang.String getPackageName();
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
    method public deprecated android.graphics.drawable.Drawable getWallpaper();
    method public deprecated int getWallpaperDesiredMinimumHeight();
    method public deprecated int getWallpaperDesiredMinimumWidth();
    method public void grantUriPermission(java.lang.String, android.net.Uri, int);
    method public java.io.FileInputStream openFileInput(java.lang.String) throws java.io.FileNotFoundException;
    method public java.io.FileOutputStream openFileOutput(java.lang.String, int) throws java.io.FileNotFoundException;
    method public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory);
    method public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler);
    method public deprecated android.graphics.drawable.Drawable peekWallpaper();
    method public android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter);
    method public android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler);
    method public deprecated void removeStickyBroadcast(android.content.Intent);
    method public deprecated void removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public void revokeUriPermission(android.net.Uri, int);
    method public void sendBroadcast(android.content.Intent);
    method public void sendBroadcast(android.content.Intent, java.lang.String);
    method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String);
    method public void sendOrderedBroadcast(android.content.Intent, java.lang.String);
    method public void sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public void sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public deprecated void sendStickyBroadcast(android.content.Intent);
    method public deprecated void sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public deprecated void sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public deprecated void sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public void setTheme(int);
    method public deprecated void setWallpaper(android.graphics.Bitmap) throws java.io.IOException;
    method public deprecated void setWallpaper(java.io.InputStream) throws java.io.IOException;
    method public void startActivities(android.content.Intent[]);
    method public void startActivities(android.content.Intent[], android.os.Bundle);
    method public void startActivity(android.content.Intent);
    method public void startActivity(android.content.Intent, android.os.Bundle);
    method public boolean startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle);
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public android.content.ComponentName startService(android.content.Intent);
    method public boolean stopService(android.content.Intent);
    method public void unbindService(android.content.ServiceConnection);
    method public void unregisterReceiver(android.content.BroadcastReceiver);
  }

  public class CursorLoader extends android.content.AsyncTaskLoader {
    ctor public CursorLoader(android.content.Context);
    ctor public CursorLoader(android.content.Context, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public void deliverResult(android.database.Cursor);
    method public java.lang.String[] getProjection();
    method public java.lang.String getSelection();
    method public java.lang.String[] getSelectionArgs();
    method public java.lang.String getSortOrder();
    method public android.net.Uri getUri();
    method public android.database.Cursor loadInBackground();
    method public void onCanceled(android.database.Cursor);
    method public void setProjection(java.lang.String[]);
    method public void setSelection(java.lang.String);
    method public void setSelectionArgs(java.lang.String[]);
    method public void setSortOrder(java.lang.String);
    method public void setUri(android.net.Uri);
  }

  public abstract interface DialogInterface {
    method public abstract void cancel();
    method public abstract void dismiss();
    field public static final deprecated int BUTTON1 = -1; // 0xffffffff
    field public static final deprecated int BUTTON2 = -2; // 0xfffffffe
    field public static final deprecated int BUTTON3 = -3; // 0xfffffffd
    field public static final int BUTTON_NEGATIVE = -2; // 0xfffffffe
    field public static final int BUTTON_NEUTRAL = -3; // 0xfffffffd
    field public static final int BUTTON_POSITIVE = -1; // 0xffffffff
  }

  public static abstract interface DialogInterface.OnCancelListener {
    method public abstract void onCancel(android.content.DialogInterface);
  }

  public static abstract interface DialogInterface.OnClickListener {
    method public abstract void onClick(android.content.DialogInterface, int);
  }

  public static abstract interface DialogInterface.OnDismissListener {
    method public abstract void onDismiss(android.content.DialogInterface);
  }

  public static abstract interface DialogInterface.OnKeyListener {
    method public abstract boolean onKey(android.content.DialogInterface, int, android.view.KeyEvent);
  }

  public static abstract interface DialogInterface.OnMultiChoiceClickListener {
    method public abstract void onClick(android.content.DialogInterface, int, boolean);
  }

  public static abstract interface DialogInterface.OnShowListener {
    method public abstract void onShow(android.content.DialogInterface);
  }

  public final class Entity {
    ctor public Entity(android.content.ContentValues);
    method public void addSubValue(android.net.Uri, android.content.ContentValues);
    method public android.content.ContentValues getEntityValues();
    method public java.util.ArrayList<android.content.Entity.NamedContentValues> getSubValues();
  }

  public static class Entity.NamedContentValues {
    ctor public Entity.NamedContentValues(android.net.Uri, android.content.ContentValues);
    field public final android.net.Uri uri;
    field public final android.content.ContentValues values;
  }

  public abstract interface EntityIterator implements java.util.Iterator {
    method public abstract void close();
    method public abstract void reset();
  }

  public class Intent implements java.lang.Cloneable android.os.Parcelable {
    ctor public Intent();
    ctor public Intent(android.content.Intent);
    ctor public Intent(java.lang.String);
    ctor public Intent(java.lang.String, android.net.Uri);
    ctor public Intent(android.content.Context, java.lang.Class<?>);
    ctor public Intent(java.lang.String, android.net.Uri, android.content.Context, java.lang.Class<?>);
    method public android.content.Intent addCategory(java.lang.String);
    method public android.content.Intent addFlags(int);
    method public java.lang.Object clone();
    method public android.content.Intent cloneFilter();
    method public static android.content.Intent createChooser(android.content.Intent, java.lang.CharSequence);
    method public static android.content.Intent createChooser(android.content.Intent, java.lang.CharSequence, android.content.IntentSender);
    method public int describeContents();
    method public int fillIn(android.content.Intent, int);
    method public boolean filterEquals(android.content.Intent);
    method public int filterHashCode();
    method public java.lang.String getAction();
    method public boolean[] getBooleanArrayExtra(java.lang.String);
    method public boolean getBooleanExtra(java.lang.String, boolean);
    method public android.os.Bundle getBundleExtra(java.lang.String);
    method public byte[] getByteArrayExtra(java.lang.String);
    method public byte getByteExtra(java.lang.String, byte);
    method public java.util.Set<java.lang.String> getCategories();
    method public char[] getCharArrayExtra(java.lang.String);
    method public char getCharExtra(java.lang.String, char);
    method public java.lang.CharSequence[] getCharSequenceArrayExtra(java.lang.String);
    method public java.util.ArrayList<java.lang.CharSequence> getCharSequenceArrayListExtra(java.lang.String);
    method public java.lang.CharSequence getCharSequenceExtra(java.lang.String);
    method public android.content.ClipData getClipData();
    method public android.content.ComponentName getComponent();
    method public android.net.Uri getData();
    method public java.lang.String getDataString();
    method public double[] getDoubleArrayExtra(java.lang.String);
    method public double getDoubleExtra(java.lang.String, double);
    method public android.os.Bundle getExtras();
    method public int getFlags();
    method public float[] getFloatArrayExtra(java.lang.String);
    method public float getFloatExtra(java.lang.String, float);
    method public int[] getIntArrayExtra(java.lang.String);
    method public int getIntExtra(java.lang.String, int);
    method public java.util.ArrayList<java.lang.Integer> getIntegerArrayListExtra(java.lang.String);
    method public static deprecated android.content.Intent getIntent(java.lang.String) throws java.net.URISyntaxException;
    method public static android.content.Intent getIntentOld(java.lang.String) throws java.net.URISyntaxException;
    method public long[] getLongArrayExtra(java.lang.String);
    method public long getLongExtra(java.lang.String, long);
    method public java.lang.String getPackage();
    method public android.os.Parcelable[] getParcelableArrayExtra(java.lang.String);
    method public java.util.ArrayList<T> getParcelableArrayListExtra(java.lang.String);
    method public T getParcelableExtra(java.lang.String);
    method public java.lang.String getScheme();
    method public android.content.Intent getSelector();
    method public java.io.Serializable getSerializableExtra(java.lang.String);
    method public short[] getShortArrayExtra(java.lang.String);
    method public short getShortExtra(java.lang.String, short);
    method public android.graphics.Rect getSourceBounds();
    method public java.lang.String[] getStringArrayExtra(java.lang.String);
    method public java.util.ArrayList<java.lang.String> getStringArrayListExtra(java.lang.String);
    method public java.lang.String getStringExtra(java.lang.String);
    method public java.lang.String getType();
    method public boolean hasCategory(java.lang.String);
    method public boolean hasExtra(java.lang.String);
    method public boolean hasFileDescriptors();
    method public static android.content.Intent makeMainActivity(android.content.ComponentName);
    method public static android.content.Intent makeMainSelectorActivity(java.lang.String, java.lang.String);
    method public static android.content.Intent makeRestartActivityTask(android.content.ComponentName);
    method public static java.lang.String normalizeMimeType(java.lang.String);
    method public static android.content.Intent parseIntent(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public static android.content.Intent parseUri(java.lang.String, int) throws java.net.URISyntaxException;
    method public android.content.Intent putCharSequenceArrayListExtra(java.lang.String, java.util.ArrayList<java.lang.CharSequence>);
    method public android.content.Intent putExtra(java.lang.String, boolean);
    method public android.content.Intent putExtra(java.lang.String, byte);
    method public android.content.Intent putExtra(java.lang.String, char);
    method public android.content.Intent putExtra(java.lang.String, short);
    method public android.content.Intent putExtra(java.lang.String, int);
    method public android.content.Intent putExtra(java.lang.String, long);
    method public android.content.Intent putExtra(java.lang.String, float);
    method public android.content.Intent putExtra(java.lang.String, double);
    method public android.content.Intent putExtra(java.lang.String, java.lang.String);
    method public android.content.Intent putExtra(java.lang.String, java.lang.CharSequence);
    method public android.content.Intent putExtra(java.lang.String, android.os.Parcelable);
    method public android.content.Intent putExtra(java.lang.String, android.os.Parcelable[]);
    method public android.content.Intent putExtra(java.lang.String, java.io.Serializable);
    method public android.content.Intent putExtra(java.lang.String, boolean[]);
    method public android.content.Intent putExtra(java.lang.String, byte[]);
    method public android.content.Intent putExtra(java.lang.String, short[]);
    method public android.content.Intent putExtra(java.lang.String, char[]);
    method public android.content.Intent putExtra(java.lang.String, int[]);
    method public android.content.Intent putExtra(java.lang.String, long[]);
    method public android.content.Intent putExtra(java.lang.String, float[]);
    method public android.content.Intent putExtra(java.lang.String, double[]);
    method public android.content.Intent putExtra(java.lang.String, java.lang.String[]);
    method public android.content.Intent putExtra(java.lang.String, java.lang.CharSequence[]);
    method public android.content.Intent putExtra(java.lang.String, android.os.Bundle);
    method public android.content.Intent putExtras(android.content.Intent);
    method public android.content.Intent putExtras(android.os.Bundle);
    method public android.content.Intent putIntegerArrayListExtra(java.lang.String, java.util.ArrayList<java.lang.Integer>);
    method public android.content.Intent putParcelableArrayListExtra(java.lang.String, java.util.ArrayList<? extends android.os.Parcelable>);
    method public android.content.Intent putStringArrayListExtra(java.lang.String, java.util.ArrayList<java.lang.String>);
    method public void readFromParcel(android.os.Parcel);
    method public void removeCategory(java.lang.String);
    method public void removeExtra(java.lang.String);
    method public android.content.Intent replaceExtras(android.content.Intent);
    method public android.content.Intent replaceExtras(android.os.Bundle);
    method public android.content.ComponentName resolveActivity(android.content.pm.PackageManager);
    method public android.content.pm.ActivityInfo resolveActivityInfo(android.content.pm.PackageManager, int);
    method public java.lang.String resolveType(android.content.Context);
    method public java.lang.String resolveType(android.content.ContentResolver);
    method public java.lang.String resolveTypeIfNeeded(android.content.ContentResolver);
    method public android.content.Intent setAction(java.lang.String);
    method public android.content.Intent setClass(android.content.Context, java.lang.Class<?>);
    method public android.content.Intent setClassName(android.content.Context, java.lang.String);
    method public android.content.Intent setClassName(java.lang.String, java.lang.String);
    method public void setClipData(android.content.ClipData);
    method public android.content.Intent setComponent(android.content.ComponentName);
    method public android.content.Intent setData(android.net.Uri);
    method public android.content.Intent setDataAndNormalize(android.net.Uri);
    method public android.content.Intent setDataAndType(android.net.Uri, java.lang.String);
    method public android.content.Intent setDataAndTypeAndNormalize(android.net.Uri, java.lang.String);
    method public void setExtrasClassLoader(java.lang.ClassLoader);
    method public android.content.Intent setFlags(int);
    method public android.content.Intent setPackage(java.lang.String);
    method public void setSelector(android.content.Intent);
    method public void setSourceBounds(android.graphics.Rect);
    method public android.content.Intent setType(java.lang.String);
    method public android.content.Intent setTypeAndNormalize(java.lang.String);
    method public deprecated java.lang.String toURI();
    method public java.lang.String toUri(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.AIRPLANE_MODE";
    field public static final java.lang.String ACTION_ALL_APPS = "android.intent.action.ALL_APPS";
    field public static final java.lang.String ACTION_ANSWER = "android.intent.action.ANSWER";
    field public static final java.lang.String ACTION_APPLICATION_RESTRICTIONS_CHANGED = "android.intent.action.APPLICATION_RESTRICTIONS_CHANGED";
    field public static final java.lang.String ACTION_APP_ERROR = "android.intent.action.APP_ERROR";
    field public static final java.lang.String ACTION_ASSIST = "android.intent.action.ASSIST";
    field public static final java.lang.String ACTION_ATTACH_DATA = "android.intent.action.ATTACH_DATA";
    field public static final java.lang.String ACTION_BATTERY_CHANGED = "android.intent.action.BATTERY_CHANGED";
    field public static final java.lang.String ACTION_BATTERY_LOW = "android.intent.action.BATTERY_LOW";
    field public static final java.lang.String ACTION_BATTERY_OKAY = "android.intent.action.BATTERY_OKAY";
    field public static final java.lang.String ACTION_BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED";
    field public static final java.lang.String ACTION_BUG_REPORT = "android.intent.action.BUG_REPORT";
    field public static final java.lang.String ACTION_CALL = "android.intent.action.CALL";
    field public static final java.lang.String ACTION_CALL_BUTTON = "android.intent.action.CALL_BUTTON";
    field public static final java.lang.String ACTION_CAMERA_BUTTON = "android.intent.action.CAMERA_BUTTON";
    field public static final java.lang.String ACTION_CHOOSER = "android.intent.action.CHOOSER";
    field public static final java.lang.String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
    field public static final java.lang.String ACTION_CONFIGURATION_CHANGED = "android.intent.action.CONFIGURATION_CHANGED";
    field public static final java.lang.String ACTION_CREATE_DOCUMENT = "android.intent.action.CREATE_DOCUMENT";
    field public static final java.lang.String ACTION_CREATE_SHORTCUT = "android.intent.action.CREATE_SHORTCUT";
    field public static final java.lang.String ACTION_DATE_CHANGED = "android.intent.action.DATE_CHANGED";
    field public static final java.lang.String ACTION_DEFAULT = "android.intent.action.VIEW";
    field public static final java.lang.String ACTION_DELETE = "android.intent.action.DELETE";
    field public static final java.lang.String ACTION_DEVICE_STORAGE_LOW = "android.intent.action.DEVICE_STORAGE_LOW";
    field public static final java.lang.String ACTION_DEVICE_STORAGE_OK = "android.intent.action.DEVICE_STORAGE_OK";
    field public static final java.lang.String ACTION_DIAL = "android.intent.action.DIAL";
    field public static final java.lang.String ACTION_DOCK_EVENT = "android.intent.action.DOCK_EVENT";
    field public static final java.lang.String ACTION_DREAMING_STARTED = "android.intent.action.DREAMING_STARTED";
    field public static final java.lang.String ACTION_DREAMING_STOPPED = "android.intent.action.DREAMING_STOPPED";
    field public static final java.lang.String ACTION_EDIT = "android.intent.action.EDIT";
    field public static final java.lang.String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE";
    field public static final java.lang.String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE";
    field public static final java.lang.String ACTION_FACTORY_TEST = "android.intent.action.FACTORY_TEST";
    field public static final java.lang.String ACTION_GET_CONTENT = "android.intent.action.GET_CONTENT";
    field public static final java.lang.String ACTION_GET_RESTRICTION_ENTRIES = "android.intent.action.GET_RESTRICTION_ENTRIES";
    field public static final java.lang.String ACTION_GTALK_SERVICE_CONNECTED = "android.intent.action.GTALK_CONNECTED";
    field public static final java.lang.String ACTION_GTALK_SERVICE_DISCONNECTED = "android.intent.action.GTALK_DISCONNECTED";
    field public static final java.lang.String ACTION_HEADSET_PLUG = "android.intent.action.HEADSET_PLUG";
    field public static final java.lang.String ACTION_INPUT_METHOD_CHANGED = "android.intent.action.INPUT_METHOD_CHANGED";
    field public static final java.lang.String ACTION_INSERT = "android.intent.action.INSERT";
    field public static final java.lang.String ACTION_INSERT_OR_EDIT = "android.intent.action.INSERT_OR_EDIT";
    field public static final java.lang.String ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE";
    field public static final java.lang.String ACTION_LOCALE_CHANGED = "android.intent.action.LOCALE_CHANGED";
    field public static final java.lang.String ACTION_MAIN = "android.intent.action.MAIN";
    field public static final java.lang.String ACTION_MANAGED_PROFILE_ADDED = "android.intent.action.MANAGED_PROFILE_ADDED";
    field public static final java.lang.String ACTION_MANAGED_PROFILE_REMOVED = "android.intent.action.MANAGED_PROFILE_REMOVED";
    field public static final java.lang.String ACTION_MANAGE_NETWORK_USAGE = "android.intent.action.MANAGE_NETWORK_USAGE";
    field public static final java.lang.String ACTION_MANAGE_PACKAGE_STORAGE = "android.intent.action.MANAGE_PACKAGE_STORAGE";
    field public static final java.lang.String ACTION_MEDIA_BAD_REMOVAL = "android.intent.action.MEDIA_BAD_REMOVAL";
    field public static final java.lang.String ACTION_MEDIA_BUTTON = "android.intent.action.MEDIA_BUTTON";
    field public static final java.lang.String ACTION_MEDIA_CHECKING = "android.intent.action.MEDIA_CHECKING";
    field public static final java.lang.String ACTION_MEDIA_EJECT = "android.intent.action.MEDIA_EJECT";
    field public static final java.lang.String ACTION_MEDIA_MOUNTED = "android.intent.action.MEDIA_MOUNTED";
    field public static final java.lang.String ACTION_MEDIA_NOFS = "android.intent.action.MEDIA_NOFS";
    field public static final java.lang.String ACTION_MEDIA_REMOVED = "android.intent.action.MEDIA_REMOVED";
    field public static final java.lang.String ACTION_MEDIA_SCANNER_FINISHED = "android.intent.action.MEDIA_SCANNER_FINISHED";
    field public static final java.lang.String ACTION_MEDIA_SCANNER_SCAN_FILE = "android.intent.action.MEDIA_SCANNER_SCAN_FILE";
    field public static final java.lang.String ACTION_MEDIA_SCANNER_STARTED = "android.intent.action.MEDIA_SCANNER_STARTED";
    field public static final java.lang.String ACTION_MEDIA_SHARED = "android.intent.action.MEDIA_SHARED";
    field public static final java.lang.String ACTION_MEDIA_UNMOUNTABLE = "android.intent.action.MEDIA_UNMOUNTABLE";
    field public static final java.lang.String ACTION_MEDIA_UNMOUNTED = "android.intent.action.MEDIA_UNMOUNTED";
    field public static final java.lang.String ACTION_MY_PACKAGE_REPLACED = "android.intent.action.MY_PACKAGE_REPLACED";
    field public static final java.lang.String ACTION_NEW_OUTGOING_CALL = "android.intent.action.NEW_OUTGOING_CALL";
    field public static final java.lang.String ACTION_OPEN_DOCUMENT = "android.intent.action.OPEN_DOCUMENT";
    field public static final java.lang.String ACTION_OPEN_DOCUMENT_TREE = "android.intent.action.OPEN_DOCUMENT_TREE";
    field public static final java.lang.String ACTION_PACKAGE_ADDED = "android.intent.action.PACKAGE_ADDED";
    field public static final java.lang.String ACTION_PACKAGE_CHANGED = "android.intent.action.PACKAGE_CHANGED";
    field public static final java.lang.String ACTION_PACKAGE_DATA_CLEARED = "android.intent.action.PACKAGE_DATA_CLEARED";
    field public static final java.lang.String ACTION_PACKAGE_FIRST_LAUNCH = "android.intent.action.PACKAGE_FIRST_LAUNCH";
    field public static final java.lang.String ACTION_PACKAGE_FULLY_REMOVED = "android.intent.action.PACKAGE_FULLY_REMOVED";
    field public static final deprecated java.lang.String ACTION_PACKAGE_INSTALL = "android.intent.action.PACKAGE_INSTALL";
    field public static final java.lang.String ACTION_PACKAGE_NEEDS_VERIFICATION = "android.intent.action.PACKAGE_NEEDS_VERIFICATION";
    field public static final java.lang.String ACTION_PACKAGE_REMOVED = "android.intent.action.PACKAGE_REMOVED";
    field public static final java.lang.String ACTION_PACKAGE_REPLACED = "android.intent.action.PACKAGE_REPLACED";
    field public static final java.lang.String ACTION_PACKAGE_RESTARTED = "android.intent.action.PACKAGE_RESTARTED";
    field public static final java.lang.String ACTION_PACKAGE_VERIFIED = "android.intent.action.PACKAGE_VERIFIED";
    field public static final java.lang.String ACTION_PASTE = "android.intent.action.PASTE";
    field public static final java.lang.String ACTION_PICK = "android.intent.action.PICK";
    field public static final java.lang.String ACTION_PICK_ACTIVITY = "android.intent.action.PICK_ACTIVITY";
    field public static final java.lang.String ACTION_POWER_CONNECTED = "android.intent.action.ACTION_POWER_CONNECTED";
    field public static final java.lang.String ACTION_POWER_DISCONNECTED = "android.intent.action.ACTION_POWER_DISCONNECTED";
    field public static final java.lang.String ACTION_POWER_USAGE_SUMMARY = "android.intent.action.POWER_USAGE_SUMMARY";
    field public static final java.lang.String ACTION_PROCESS_TEXT = "android.intent.action.PROCESS_TEXT";
    field public static final java.lang.String ACTION_PROVIDER_CHANGED = "android.intent.action.PROVIDER_CHANGED";
    field public static final java.lang.String ACTION_QUICK_CLOCK = "android.intent.action.QUICK_CLOCK";
    field public static final java.lang.String ACTION_REBOOT = "android.intent.action.REBOOT";
    field public static final java.lang.String ACTION_RUN = "android.intent.action.RUN";
    field public static final java.lang.String ACTION_SCREEN_OFF = "android.intent.action.SCREEN_OFF";
    field public static final java.lang.String ACTION_SCREEN_ON = "android.intent.action.SCREEN_ON";
    field public static final java.lang.String ACTION_SEARCH = "android.intent.action.SEARCH";
    field public static final java.lang.String ACTION_SEARCH_LONG_PRESS = "android.intent.action.SEARCH_LONG_PRESS";
    field public static final java.lang.String ACTION_SEND = "android.intent.action.SEND";
    field public static final java.lang.String ACTION_SENDTO = "android.intent.action.SENDTO";
    field public static final java.lang.String ACTION_SEND_MULTIPLE = "android.intent.action.SEND_MULTIPLE";
    field public static final java.lang.String ACTION_SET_WALLPAPER = "android.intent.action.SET_WALLPAPER";
    field public static final java.lang.String ACTION_SHUTDOWN = "android.intent.action.ACTION_SHUTDOWN";
    field public static final java.lang.String ACTION_SYNC = "android.intent.action.SYNC";
    field public static final java.lang.String ACTION_SYSTEM_TUTORIAL = "android.intent.action.SYSTEM_TUTORIAL";
    field public static final java.lang.String ACTION_TIMEZONE_CHANGED = "android.intent.action.TIMEZONE_CHANGED";
    field public static final java.lang.String ACTION_TIME_CHANGED = "android.intent.action.TIME_SET";
    field public static final java.lang.String ACTION_TIME_TICK = "android.intent.action.TIME_TICK";
    field public static final java.lang.String ACTION_UID_REMOVED = "android.intent.action.UID_REMOVED";
    field public static final deprecated java.lang.String ACTION_UMS_CONNECTED = "android.intent.action.UMS_CONNECTED";
    field public static final deprecated java.lang.String ACTION_UMS_DISCONNECTED = "android.intent.action.UMS_DISCONNECTED";
    field public static final java.lang.String ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE";
    field public static final java.lang.String ACTION_USER_BACKGROUND = "android.intent.action.USER_BACKGROUND";
    field public static final java.lang.String ACTION_USER_FOREGROUND = "android.intent.action.USER_FOREGROUND";
    field public static final java.lang.String ACTION_USER_INITIALIZE = "android.intent.action.USER_INITIALIZE";
    field public static final java.lang.String ACTION_USER_PRESENT = "android.intent.action.USER_PRESENT";
    field public static final java.lang.String ACTION_VIEW = "android.intent.action.VIEW";
    field public static final java.lang.String ACTION_VOICE_COMMAND = "android.intent.action.VOICE_COMMAND";
    field public static final deprecated java.lang.String ACTION_WALLPAPER_CHANGED = "android.intent.action.WALLPAPER_CHANGED";
    field public static final java.lang.String ACTION_WEB_SEARCH = "android.intent.action.WEB_SEARCH";
    field public static final java.lang.String CATEGORY_ALTERNATIVE = "android.intent.category.ALTERNATIVE";
    field public static final java.lang.String CATEGORY_APP_BROWSER = "android.intent.category.APP_BROWSER";
    field public static final java.lang.String CATEGORY_APP_CALCULATOR = "android.intent.category.APP_CALCULATOR";
    field public static final java.lang.String CATEGORY_APP_CALENDAR = "android.intent.category.APP_CALENDAR";
    field public static final java.lang.String CATEGORY_APP_CONTACTS = "android.intent.category.APP_CONTACTS";
    field public static final java.lang.String CATEGORY_APP_EMAIL = "android.intent.category.APP_EMAIL";
    field public static final java.lang.String CATEGORY_APP_GALLERY = "android.intent.category.APP_GALLERY";
    field public static final java.lang.String CATEGORY_APP_MAPS = "android.intent.category.APP_MAPS";
    field public static final java.lang.String CATEGORY_APP_MARKET = "android.intent.category.APP_MARKET";
    field public static final java.lang.String CATEGORY_APP_MESSAGING = "android.intent.category.APP_MESSAGING";
    field public static final java.lang.String CATEGORY_APP_MUSIC = "android.intent.category.APP_MUSIC";
    field public static final java.lang.String CATEGORY_BROWSABLE = "android.intent.category.BROWSABLE";
    field public static final java.lang.String CATEGORY_CAR_DOCK = "android.intent.category.CAR_DOCK";
    field public static final java.lang.String CATEGORY_CAR_MODE = "android.intent.category.CAR_MODE";
    field public static final java.lang.String CATEGORY_DEFAULT = "android.intent.category.DEFAULT";
    field public static final java.lang.String CATEGORY_DESK_DOCK = "android.intent.category.DESK_DOCK";
    field public static final java.lang.String CATEGORY_DEVELOPMENT_PREFERENCE = "android.intent.category.DEVELOPMENT_PREFERENCE";
    field public static final java.lang.String CATEGORY_EMBED = "android.intent.category.EMBED";
    field public static final java.lang.String CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST = "android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST";
    field public static final java.lang.String CATEGORY_HE_DESK_DOCK = "android.intent.category.HE_DESK_DOCK";
    field public static final java.lang.String CATEGORY_HOME = "android.intent.category.HOME";
    field public static final java.lang.String CATEGORY_INFO = "android.intent.category.INFO";
    field public static final java.lang.String CATEGORY_LAUNCHER = "android.intent.category.LAUNCHER";
    field public static final java.lang.String CATEGORY_LEANBACK_LAUNCHER = "android.intent.category.LEANBACK_LAUNCHER";
    field public static final java.lang.String CATEGORY_LE_DESK_DOCK = "android.intent.category.LE_DESK_DOCK";
    field public static final java.lang.String CATEGORY_MONKEY = "android.intent.category.MONKEY";
    field public static final java.lang.String CATEGORY_OPENABLE = "android.intent.category.OPENABLE";
    field public static final java.lang.String CATEGORY_PREFERENCE = "android.intent.category.PREFERENCE";
    field public static final java.lang.String CATEGORY_SAMPLE_CODE = "android.intent.category.SAMPLE_CODE";
    field public static final java.lang.String CATEGORY_SELECTED_ALTERNATIVE = "android.intent.category.SELECTED_ALTERNATIVE";
    field public static final java.lang.String CATEGORY_TAB = "android.intent.category.TAB";
    field public static final java.lang.String CATEGORY_TEST = "android.intent.category.TEST";
    field public static final java.lang.String CATEGORY_UNIT_TEST = "android.intent.category.UNIT_TEST";
    field public static final java.lang.String CATEGORY_VOICE = "android.intent.category.VOICE";
    field public static final android.os.Parcelable.Creator<android.content.Intent> CREATOR;
    field public static final java.lang.String EXTRA_ALARM_COUNT = "android.intent.extra.ALARM_COUNT";
    field public static final java.lang.String EXTRA_ALLOW_MULTIPLE = "android.intent.extra.ALLOW_MULTIPLE";
    field public static final deprecated java.lang.String EXTRA_ALLOW_REPLACE = "android.intent.extra.ALLOW_REPLACE";
    field public static final java.lang.String EXTRA_ASSIST_CONTEXT = "android.intent.extra.ASSIST_CONTEXT";
    field public static final java.lang.String EXTRA_ASSIST_INPUT_HINT_KEYBOARD = "android.intent.extra.ASSIST_INPUT_HINT_KEYBOARD";
    field public static final java.lang.String EXTRA_ASSIST_PACKAGE = "android.intent.extra.ASSIST_PACKAGE";
    field public static final java.lang.String EXTRA_ASSIST_UID = "android.intent.extra.ASSIST_UID";
    field public static final java.lang.String EXTRA_BCC = "android.intent.extra.BCC";
    field public static final java.lang.String EXTRA_BUG_REPORT = "android.intent.extra.BUG_REPORT";
    field public static final java.lang.String EXTRA_CC = "android.intent.extra.CC";
    field public static final deprecated java.lang.String EXTRA_CHANGED_COMPONENT_NAME = "android.intent.extra.changed_component_name";
    field public static final java.lang.String EXTRA_CHANGED_COMPONENT_NAME_LIST = "android.intent.extra.changed_component_name_list";
    field public static final java.lang.String EXTRA_CHANGED_PACKAGE_LIST = "android.intent.extra.changed_package_list";
    field public static final java.lang.String EXTRA_CHANGED_UID_LIST = "android.intent.extra.changed_uid_list";
    field public static final java.lang.String EXTRA_CHOOSER_TARGETS = "android.intent.extra.CHOOSER_TARGETS";
    field public static final java.lang.String EXTRA_CHOSEN_COMPONENT = "android.intent.extra.CHOSEN_COMPONENT";
    field public static final java.lang.String EXTRA_CHOSEN_COMPONENT_INTENT_SENDER = "android.intent.extra.CHOSEN_COMPONENT_INTENT_SENDER";
    field public static final java.lang.String EXTRA_DATA_REMOVED = "android.intent.extra.DATA_REMOVED";
    field public static final java.lang.String EXTRA_DOCK_STATE = "android.intent.extra.DOCK_STATE";
    field public static final int EXTRA_DOCK_STATE_CAR = 2; // 0x2
    field public static final int EXTRA_DOCK_STATE_DESK = 1; // 0x1
    field public static final int EXTRA_DOCK_STATE_HE_DESK = 4; // 0x4
    field public static final int EXTRA_DOCK_STATE_LE_DESK = 3; // 0x3
    field public static final int EXTRA_DOCK_STATE_UNDOCKED = 0; // 0x0
    field public static final java.lang.String EXTRA_DONT_KILL_APP = "android.intent.extra.DONT_KILL_APP";
    field public static final java.lang.String EXTRA_EMAIL = "android.intent.extra.EMAIL";
    field public static final java.lang.String EXTRA_HTML_TEXT = "android.intent.extra.HTML_TEXT";
    field public static final java.lang.String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS";
    field public static final java.lang.String EXTRA_INSTALLER_PACKAGE_NAME = "android.intent.extra.INSTALLER_PACKAGE_NAME";
    field public static final java.lang.String EXTRA_INTENT = "android.intent.extra.INTENT";
    field public static final java.lang.String EXTRA_KEY_EVENT = "android.intent.extra.KEY_EVENT";
    field public static final java.lang.String EXTRA_LOCAL_ONLY = "android.intent.extra.LOCAL_ONLY";
    field public static final java.lang.String EXTRA_MIME_TYPES = "android.intent.extra.MIME_TYPES";
    field public static final java.lang.String EXTRA_NOT_UNKNOWN_SOURCE = "android.intent.extra.NOT_UNKNOWN_SOURCE";
    field public static final java.lang.String EXTRA_ORIGINATING_URI = "android.intent.extra.ORIGINATING_URI";
    field public static final java.lang.String EXTRA_PHONE_NUMBER = "android.intent.extra.PHONE_NUMBER";
    field public static final java.lang.String EXTRA_PROCESS_TEXT = "android.intent.extra.PROCESS_TEXT";
    field public static final java.lang.String EXTRA_PROCESS_TEXT_READONLY = "android.intent.extra.PROCESS_TEXT_READONLY";
    field public static final java.lang.String EXTRA_REFERRER = "android.intent.extra.REFERRER";
    field public static final java.lang.String EXTRA_REFERRER_NAME = "android.intent.extra.REFERRER_NAME";
    field public static final java.lang.String EXTRA_REMOTE_INTENT_TOKEN = "android.intent.extra.remote_intent_token";
    field public static final java.lang.String EXTRA_REPLACEMENT_EXTRAS = "android.intent.extra.REPLACEMENT_EXTRAS";
    field public static final java.lang.String EXTRA_REPLACING = "android.intent.extra.REPLACING";
    field public static final java.lang.String EXTRA_RESTRICTIONS_BUNDLE = "android.intent.extra.restrictions_bundle";
    field public static final java.lang.String EXTRA_RESTRICTIONS_INTENT = "android.intent.extra.restrictions_intent";
    field public static final java.lang.String EXTRA_RESTRICTIONS_LIST = "android.intent.extra.restrictions_list";
    field public static final java.lang.String EXTRA_RETURN_RESULT = "android.intent.extra.RETURN_RESULT";
    field public static final java.lang.String EXTRA_SHORTCUT_ICON = "android.intent.extra.shortcut.ICON";
    field public static final java.lang.String EXTRA_SHORTCUT_ICON_RESOURCE = "android.intent.extra.shortcut.ICON_RESOURCE";
    field public static final java.lang.String EXTRA_SHORTCUT_INTENT = "android.intent.extra.shortcut.INTENT";
    field public static final java.lang.String EXTRA_SHORTCUT_NAME = "android.intent.extra.shortcut.NAME";
    field public static final java.lang.String EXTRA_SHUTDOWN_USERSPACE_ONLY = "android.intent.extra.SHUTDOWN_USERSPACE_ONLY";
    field public static final java.lang.String EXTRA_STREAM = "android.intent.extra.STREAM";
    field public static final java.lang.String EXTRA_SUBJECT = "android.intent.extra.SUBJECT";
    field public static final java.lang.String EXTRA_TEMPLATE = "android.intent.extra.TEMPLATE";
    field public static final java.lang.String EXTRA_TEXT = "android.intent.extra.TEXT";
    field public static final java.lang.String EXTRA_TITLE = "android.intent.extra.TITLE";
    field public static final java.lang.String EXTRA_UID = "android.intent.extra.UID";
    field public static final java.lang.String EXTRA_USER = "android.intent.extra.USER";
    field public static final int FILL_IN_ACTION = 1; // 0x1
    field public static final int FILL_IN_CATEGORIES = 4; // 0x4
    field public static final int FILL_IN_CLIP_DATA = 128; // 0x80
    field public static final int FILL_IN_COMPONENT = 8; // 0x8
    field public static final int FILL_IN_DATA = 2; // 0x2
    field public static final int FILL_IN_PACKAGE = 16; // 0x10
    field public static final int FILL_IN_SELECTOR = 64; // 0x40
    field public static final int FILL_IN_SOURCE_BOUNDS = 32; // 0x20
    field public static final int FLAG_ACTIVITY_BROUGHT_TO_FRONT = 4194304; // 0x400000
    field public static final int FLAG_ACTIVITY_CLEAR_TASK = 32768; // 0x8000
    field public static final int FLAG_ACTIVITY_CLEAR_TOP = 67108864; // 0x4000000
    field public static final deprecated int FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET = 524288; // 0x80000
    field public static final int FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS = 8388608; // 0x800000
    field public static final int FLAG_ACTIVITY_FORWARD_RESULT = 33554432; // 0x2000000
    field public static final int FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY = 1048576; // 0x100000
    field public static final int FLAG_ACTIVITY_MULTIPLE_TASK = 134217728; // 0x8000000
    field public static final int FLAG_ACTIVITY_NEW_DOCUMENT = 524288; // 0x80000
    field public static final int FLAG_ACTIVITY_NEW_TASK = 268435456; // 0x10000000
    field public static final int FLAG_ACTIVITY_NO_ANIMATION = 65536; // 0x10000
    field public static final int FLAG_ACTIVITY_NO_HISTORY = 1073741824; // 0x40000000
    field public static final int FLAG_ACTIVITY_NO_USER_ACTION = 262144; // 0x40000
    field public static final int FLAG_ACTIVITY_PREVIOUS_IS_TOP = 16777216; // 0x1000000
    field public static final int FLAG_ACTIVITY_REORDER_TO_FRONT = 131072; // 0x20000
    field public static final int FLAG_ACTIVITY_RESET_TASK_IF_NEEDED = 2097152; // 0x200000
    field public static final int FLAG_ACTIVITY_RETAIN_IN_RECENTS = 8192; // 0x2000
    field public static final int FLAG_ACTIVITY_SINGLE_TOP = 536870912; // 0x20000000
    field public static final int FLAG_ACTIVITY_TASK_ON_HOME = 16384; // 0x4000
    field public static final int FLAG_DEBUG_LOG_RESOLUTION = 8; // 0x8
    field public static final int FLAG_EXCLUDE_STOPPED_PACKAGES = 16; // 0x10
    field public static final int FLAG_FROM_BACKGROUND = 4; // 0x4
    field public static final int FLAG_GRANT_PERSISTABLE_URI_PERMISSION = 64; // 0x40
    field public static final int FLAG_GRANT_PREFIX_URI_PERMISSION = 128; // 0x80
    field public static final int FLAG_GRANT_READ_URI_PERMISSION = 1; // 0x1
    field public static final int FLAG_GRANT_WRITE_URI_PERMISSION = 2; // 0x2
    field public static final int FLAG_INCLUDE_STOPPED_PACKAGES = 32; // 0x20
    field public static final int FLAG_RECEIVER_FOREGROUND = 268435456; // 0x10000000
    field public static final int FLAG_RECEIVER_NO_ABORT = 134217728; // 0x8000000
    field public static final int FLAG_RECEIVER_REGISTERED_ONLY = 1073741824; // 0x40000000
    field public static final int FLAG_RECEIVER_REPLACE_PENDING = 536870912; // 0x20000000
    field public static final java.lang.String METADATA_DOCK_HOME = "android.dock_home";
    field public static final int URI_ALLOW_UNSAFE = 4; // 0x4
    field public static final int URI_ANDROID_APP_SCHEME = 2; // 0x2
    field public static final int URI_INTENT_SCHEME = 1; // 0x1
  }

  public static final class Intent.FilterComparison {
    ctor public Intent.FilterComparison(android.content.Intent);
    method public android.content.Intent getIntent();
  }

  public static class Intent.ShortcutIconResource implements android.os.Parcelable {
    ctor public Intent.ShortcutIconResource();
    method public int describeContents();
    method public static android.content.Intent.ShortcutIconResource fromContext(android.content.Context, int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.Intent.ShortcutIconResource> CREATOR;
    field public java.lang.String packageName;
    field public java.lang.String resourceName;
  }

  public class IntentFilter implements android.os.Parcelable {
    ctor public IntentFilter();
    ctor public IntentFilter(java.lang.String);
    ctor public IntentFilter(java.lang.String, java.lang.String) throws android.content.IntentFilter.MalformedMimeTypeException;
    ctor public IntentFilter(android.content.IntentFilter);
    method public final java.util.Iterator<java.lang.String> actionsIterator();
    method public final void addAction(java.lang.String);
    method public final void addCategory(java.lang.String);
    method public final void addDataAuthority(java.lang.String, java.lang.String);
    method public final void addDataPath(java.lang.String, int);
    method public final void addDataScheme(java.lang.String);
    method public final void addDataSchemeSpecificPart(java.lang.String, int);
    method public final void addDataType(java.lang.String) throws android.content.IntentFilter.MalformedMimeTypeException;
    method public final java.util.Iterator<android.content.IntentFilter.AuthorityEntry> authoritiesIterator();
    method public final java.util.Iterator<java.lang.String> categoriesIterator();
    method public final int countActions();
    method public final int countCategories();
    method public final int countDataAuthorities();
    method public final int countDataPaths();
    method public final int countDataSchemeSpecificParts();
    method public final int countDataSchemes();
    method public final int countDataTypes();
    method public static android.content.IntentFilter create(java.lang.String, java.lang.String);
    method public final int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public final java.lang.String getAction(int);
    method public final java.lang.String getCategory(int);
    method public final android.content.IntentFilter.AuthorityEntry getDataAuthority(int);
    method public final android.os.PatternMatcher getDataPath(int);
    method public final java.lang.String getDataScheme(int);
    method public final android.os.PatternMatcher getDataSchemeSpecificPart(int);
    method public final java.lang.String getDataType(int);
    method public final int getPriority();
    method public final boolean hasAction(java.lang.String);
    method public final boolean hasCategory(java.lang.String);
    method public final boolean hasDataAuthority(android.net.Uri);
    method public final boolean hasDataPath(java.lang.String);
    method public final boolean hasDataScheme(java.lang.String);
    method public final boolean hasDataSchemeSpecificPart(java.lang.String);
    method public final boolean hasDataType(java.lang.String);
    method public final int match(android.content.ContentResolver, android.content.Intent, boolean, java.lang.String);
    method public final int match(java.lang.String, java.lang.String, java.lang.String, android.net.Uri, java.util.Set<java.lang.String>, java.lang.String);
    method public final boolean matchAction(java.lang.String);
    method public final java.lang.String matchCategories(java.util.Set<java.lang.String>);
    method public final int matchData(java.lang.String, java.lang.String, android.net.Uri);
    method public final int matchDataAuthority(android.net.Uri);
    method public final java.util.Iterator<android.os.PatternMatcher> pathsIterator();
    method public void readFromXml(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public final java.util.Iterator<android.os.PatternMatcher> schemeSpecificPartsIterator();
    method public final java.util.Iterator<java.lang.String> schemesIterator();
    method public final void setPriority(int);
    method public final java.util.Iterator<java.lang.String> typesIterator();
    method public final void writeToParcel(android.os.Parcel, int);
    method public void writeToXml(org.xmlpull.v1.XmlSerializer) throws java.io.IOException;
    field public static final android.os.Parcelable.Creator<android.content.IntentFilter> CREATOR;
    field public static final int MATCH_ADJUSTMENT_MASK = 65535; // 0xffff
    field public static final int MATCH_ADJUSTMENT_NORMAL = 32768; // 0x8000
    field public static final int MATCH_CATEGORY_EMPTY = 1048576; // 0x100000
    field public static final int MATCH_CATEGORY_HOST = 3145728; // 0x300000
    field public static final int MATCH_CATEGORY_MASK = 268369920; // 0xfff0000
    field public static final int MATCH_CATEGORY_PATH = 5242880; // 0x500000
    field public static final int MATCH_CATEGORY_PORT = 4194304; // 0x400000
    field public static final int MATCH_CATEGORY_SCHEME = 2097152; // 0x200000
    field public static final int MATCH_CATEGORY_SCHEME_SPECIFIC_PART = 5767168; // 0x580000
    field public static final int MATCH_CATEGORY_TYPE = 6291456; // 0x600000
    field public static final int NO_MATCH_ACTION = -3; // 0xfffffffd
    field public static final int NO_MATCH_CATEGORY = -4; // 0xfffffffc
    field public static final int NO_MATCH_DATA = -2; // 0xfffffffe
    field public static final int NO_MATCH_TYPE = -1; // 0xffffffff
    field public static final java.lang.String SCHEME_HTTP = "http";
    field public static final java.lang.String SCHEME_HTTPS = "https";
    field public static final int SYSTEM_HIGH_PRIORITY = 1000; // 0x3e8
    field public static final int SYSTEM_LOW_PRIORITY = -1000; // 0xfffffc18
  }

  public static final class IntentFilter.AuthorityEntry {
    ctor public IntentFilter.AuthorityEntry(java.lang.String, java.lang.String);
    method public java.lang.String getHost();
    method public int getPort();
    method public int match(android.net.Uri);
  }

  public static class IntentFilter.MalformedMimeTypeException extends android.util.AndroidException {
    ctor public IntentFilter.MalformedMimeTypeException();
    ctor public IntentFilter.MalformedMimeTypeException(java.lang.String);
  }

  public class IntentSender implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String getCreatorPackage();
    method public int getCreatorUid();
    method public android.os.UserHandle getCreatorUserHandle();
    method public deprecated java.lang.String getTargetPackage();
    method public static android.content.IntentSender readIntentSenderOrNullFromParcel(android.os.Parcel);
    method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler) throws android.content.IntentSender.SendIntentException;
    method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler, java.lang.String) throws android.content.IntentSender.SendIntentException;
    method public static void writeIntentSenderOrNullToParcel(android.content.IntentSender, android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.IntentSender> CREATOR;
  }

  public static abstract interface IntentSender.OnFinished {
    method public abstract void onSendFinished(android.content.IntentSender, android.content.Intent, int, java.lang.String, android.os.Bundle);
  }

  public static class IntentSender.SendIntentException extends android.util.AndroidException {
    ctor public IntentSender.SendIntentException();
    ctor public IntentSender.SendIntentException(java.lang.String);
    ctor public IntentSender.SendIntentException(java.lang.Exception);
  }

  public class Loader {
    ctor public Loader(android.content.Context);
    method public void abandon();
    method public boolean cancelLoad();
    method public void commitContentChanged();
    method public java.lang.String dataToString(D);
    method public void deliverCancellation();
    method public void deliverResult(D);
    method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public void forceLoad();
    method public android.content.Context getContext();
    method public int getId();
    method public boolean isAbandoned();
    method public boolean isReset();
    method public boolean isStarted();
    method protected void onAbandon();
    method protected boolean onCancelLoad();
    method public void onContentChanged();
    method protected void onForceLoad();
    method protected void onReset();
    method protected void onStartLoading();
    method protected void onStopLoading();
    method public void registerListener(int, android.content.Loader.OnLoadCompleteListener<D>);
    method public void registerOnLoadCanceledListener(android.content.Loader.OnLoadCanceledListener<D>);
    method public void reset();
    method public void rollbackContentChanged();
    method public final void startLoading();
    method public void stopLoading();
    method public boolean takeContentChanged();
    method public void unregisterListener(android.content.Loader.OnLoadCompleteListener<D>);
    method public void unregisterOnLoadCanceledListener(android.content.Loader.OnLoadCanceledListener<D>);
  }

  public final class Loader.ForceLoadContentObserver extends android.database.ContentObserver {
    ctor public Loader.ForceLoadContentObserver();
  }

  public static abstract interface Loader.OnLoadCanceledListener {
    method public abstract void onLoadCanceled(android.content.Loader<D>);
  }

  public static abstract interface Loader.OnLoadCompleteListener {
    method public abstract void onLoadComplete(android.content.Loader<D>, D);
  }

  public class MutableContextWrapper extends android.content.ContextWrapper {
    ctor public MutableContextWrapper(android.content.Context);
    method public void setBaseContext(android.content.Context);
  }

  public class OperationApplicationException extends java.lang.Exception {
    ctor public OperationApplicationException();
    ctor public OperationApplicationException(java.lang.String);
    ctor public OperationApplicationException(java.lang.String, java.lang.Throwable);
    ctor public OperationApplicationException(java.lang.Throwable);
    ctor public OperationApplicationException(int);
    ctor public OperationApplicationException(java.lang.String, int);
    method public int getNumSuccessfulYieldPoints();
  }

  public class PeriodicSync implements android.os.Parcelable {
    ctor public PeriodicSync(android.accounts.Account, java.lang.String, android.os.Bundle, long);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.PeriodicSync> CREATOR;
    field public final android.accounts.Account account;
    field public final java.lang.String authority;
    field public final android.os.Bundle extras;
    field public final long period;
  }

  public class ReceiverCallNotAllowedException extends android.util.AndroidRuntimeException {
    ctor public ReceiverCallNotAllowedException(java.lang.String);
  }

  public class RestrictionEntry implements android.os.Parcelable {
    ctor public RestrictionEntry(int, java.lang.String);
    ctor public RestrictionEntry(java.lang.String, java.lang.String);
    ctor public RestrictionEntry(java.lang.String, boolean);
    ctor public RestrictionEntry(java.lang.String, java.lang.String[]);
    ctor public RestrictionEntry(java.lang.String, int);
    ctor public RestrictionEntry(java.lang.String, android.content.RestrictionEntry[], boolean);
    ctor public RestrictionEntry(android.os.Parcel);
    method public int describeContents();
    method public java.lang.String[] getAllSelectedStrings();
    method public java.lang.String[] getChoiceEntries();
    method public java.lang.String[] getChoiceValues();
    method public java.lang.String getDescription();
    method public int getIntValue();
    method public java.lang.String getKey();
    method public android.content.RestrictionEntry[] getRestrictions();
    method public boolean getSelectedState();
    method public java.lang.String getSelectedString();
    method public java.lang.String getTitle();
    method public int getType();
    method public void setAllSelectedStrings(java.lang.String[]);
    method public void setChoiceEntries(java.lang.String[]);
    method public void setChoiceEntries(android.content.Context, int);
    method public void setChoiceValues(java.lang.String[]);
    method public void setChoiceValues(android.content.Context, int);
    method public void setDescription(java.lang.String);
    method public void setIntValue(int);
    method public void setRestrictions(android.content.RestrictionEntry[]);
    method public void setSelectedState(boolean);
    method public void setSelectedString(java.lang.String);
    method public void setTitle(java.lang.String);
    method public void setType(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.RestrictionEntry> CREATOR;
    field public static final int TYPE_BOOLEAN = 1; // 0x1
    field public static final int TYPE_BUNDLE = 7; // 0x7
    field public static final int TYPE_BUNDLE_ARRAY = 8; // 0x8
    field public static final int TYPE_CHOICE = 2; // 0x2
    field public static final int TYPE_INTEGER = 5; // 0x5
    field public static final int TYPE_MULTI_SELECT = 4; // 0x4
    field public static final int TYPE_NULL = 0; // 0x0
    field public static final int TYPE_STRING = 6; // 0x6
  }

  public class RestrictionsManager {
    method public static android.os.Bundle convertRestrictionsToBundle(java.util.List<android.content.RestrictionEntry>);
    method public android.content.Intent createLocalApprovalIntent();
    method public android.os.Bundle getApplicationRestrictions();
    method public java.util.List<android.content.RestrictionEntry> getManifestRestrictions(java.lang.String);
    method public boolean hasRestrictionsProvider();
    method public void notifyPermissionResponse(java.lang.String, android.os.PersistableBundle);
    method public void requestPermission(java.lang.String, java.lang.String, android.os.PersistableBundle);
    field public static final java.lang.String ACTION_PERMISSION_RESPONSE_RECEIVED = "android.content.action.PERMISSION_RESPONSE_RECEIVED";
    field public static final java.lang.String ACTION_REQUEST_LOCAL_APPROVAL = "android.content.action.REQUEST_LOCAL_APPROVAL";
    field public static final java.lang.String ACTION_REQUEST_PERMISSION = "android.content.action.REQUEST_PERMISSION";
    field public static final java.lang.String EXTRA_PACKAGE_NAME = "android.content.extra.PACKAGE_NAME";
    field public static final java.lang.String EXTRA_REQUEST_BUNDLE = "android.content.extra.REQUEST_BUNDLE";
    field public static final java.lang.String EXTRA_REQUEST_ID = "android.content.extra.REQUEST_ID";
    field public static final java.lang.String EXTRA_REQUEST_TYPE = "android.content.extra.REQUEST_TYPE";
    field public static final java.lang.String EXTRA_RESPONSE_BUNDLE = "android.content.extra.RESPONSE_BUNDLE";
    field public static final java.lang.String META_DATA_APP_RESTRICTIONS = "android.content.APP_RESTRICTIONS";
    field public static final java.lang.String REQUEST_KEY_APPROVE_LABEL = "android.request.approve_label";
    field public static final java.lang.String REQUEST_KEY_DATA = "android.request.data";
    field public static final java.lang.String REQUEST_KEY_DENY_LABEL = "android.request.deny_label";
    field public static final java.lang.String REQUEST_KEY_ICON = "android.request.icon";
    field public static final java.lang.String REQUEST_KEY_ID = "android.request.id";
    field public static final java.lang.String REQUEST_KEY_MESSAGE = "android.request.mesg";
    field public static final java.lang.String REQUEST_KEY_NEW_REQUEST = "android.request.new_request";
    field public static final java.lang.String REQUEST_KEY_TITLE = "android.request.title";
    field public static final java.lang.String REQUEST_TYPE_APPROVAL = "android.request.type.approval";
    field public static final java.lang.String RESPONSE_KEY_ERROR_CODE = "android.response.errorcode";
    field public static final java.lang.String RESPONSE_KEY_MESSAGE = "android.response.msg";
    field public static final java.lang.String RESPONSE_KEY_RESPONSE_TIMESTAMP = "android.response.timestamp";
    field public static final java.lang.String RESPONSE_KEY_RESULT = "android.response.result";
    field public static final int RESULT_APPROVED = 1; // 0x1
    field public static final int RESULT_DENIED = 2; // 0x2
    field public static final int RESULT_ERROR = 5; // 0x5
    field public static final int RESULT_ERROR_BAD_REQUEST = 1; // 0x1
    field public static final int RESULT_ERROR_INTERNAL = 3; // 0x3
    field public static final int RESULT_ERROR_NETWORK = 2; // 0x2
    field public static final int RESULT_NO_RESPONSE = 3; // 0x3
    field public static final int RESULT_UNKNOWN_REQUEST = 4; // 0x4
  }

  public class SearchRecentSuggestionsProvider extends android.content.ContentProvider {
    ctor public SearchRecentSuggestionsProvider();
    method public int delete(android.net.Uri, java.lang.String, java.lang.String[]);
    method public java.lang.String getType(android.net.Uri);
    method public android.net.Uri insert(android.net.Uri, android.content.ContentValues);
    method public boolean onCreate();
    method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method protected void setupSuggestions(java.lang.String, int);
    method public int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
    field public static final int DATABASE_MODE_2LINES = 2; // 0x2
    field public static final int DATABASE_MODE_QUERIES = 1; // 0x1
  }

  public abstract interface ServiceConnection {
    method public abstract void onServiceConnected(android.content.ComponentName, android.os.IBinder);
    method public abstract void onServiceDisconnected(android.content.ComponentName);
  }

  public abstract interface SharedPreferences {
    method public abstract boolean contains(java.lang.String);
    method public abstract android.content.SharedPreferences.Editor edit();
    method public abstract java.util.Map<java.lang.String, ?> getAll();
    method public abstract boolean getBoolean(java.lang.String, boolean);
    method public abstract float getFloat(java.lang.String, float);
    method public abstract int getInt(java.lang.String, int);
    method public abstract long getLong(java.lang.String, long);
    method public abstract java.lang.String getString(java.lang.String, java.lang.String);
    method public abstract java.util.Set<java.lang.String> getStringSet(java.lang.String, java.util.Set<java.lang.String>);
    method public abstract void registerOnSharedPreferenceChangeListener(android.content.SharedPreferences.OnSharedPreferenceChangeListener);
    method public abstract void unregisterOnSharedPreferenceChangeListener(android.content.SharedPreferences.OnSharedPreferenceChangeListener);
  }

  public static abstract interface SharedPreferences.Editor {
    method public abstract void apply();
    method public abstract android.content.SharedPreferences.Editor clear();
    method public abstract boolean commit();
    method public abstract android.content.SharedPreferences.Editor putBoolean(java.lang.String, boolean);
    method public abstract android.content.SharedPreferences.Editor putFloat(java.lang.String, float);
    method public abstract android.content.SharedPreferences.Editor putInt(java.lang.String, int);
    method public abstract android.content.SharedPreferences.Editor putLong(java.lang.String, long);
    method public abstract android.content.SharedPreferences.Editor putString(java.lang.String, java.lang.String);
    method public abstract android.content.SharedPreferences.Editor putStringSet(java.lang.String, java.util.Set<java.lang.String>);
    method public abstract android.content.SharedPreferences.Editor remove(java.lang.String);
  }

  public static abstract interface SharedPreferences.OnSharedPreferenceChangeListener {
    method public abstract void onSharedPreferenceChanged(android.content.SharedPreferences, java.lang.String);
  }

  public class SyncAdapterType implements android.os.Parcelable {
    ctor public SyncAdapterType(java.lang.String, java.lang.String, boolean, boolean);
    ctor public SyncAdapterType(android.os.Parcel);
    method public boolean allowParallelSyncs();
    method public int describeContents();
    method public java.lang.String getSettingsActivity();
    method public boolean isAlwaysSyncable();
    method public boolean isUserVisible();
    method public static android.content.SyncAdapterType newKey(java.lang.String, java.lang.String);
    method public boolean supportsUploading();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.SyncAdapterType> CREATOR;
    field public final java.lang.String accountType;
    field public final java.lang.String authority;
    field public final boolean isKey;
  }

  public class SyncContext {
    method public android.os.IBinder getSyncContextBinder();
    method public void onFinished(android.content.SyncResult);
  }

  public class SyncInfo implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public final android.accounts.Account account;
    field public final java.lang.String authority;
    field public final long startTime;
  }

  public class SyncRequest implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.SyncRequest> CREATOR;
  }

  public static class SyncRequest.Builder {
    ctor public SyncRequest.Builder();
    method public android.content.SyncRequest build();
    method public android.content.SyncRequest.Builder setDisallowMetered(boolean);
    method public android.content.SyncRequest.Builder setExpedited(boolean);
    method public android.content.SyncRequest.Builder setExtras(android.os.Bundle);
    method public android.content.SyncRequest.Builder setIgnoreBackoff(boolean);
    method public android.content.SyncRequest.Builder setIgnoreSettings(boolean);
    method public android.content.SyncRequest.Builder setManual(boolean);
    method public android.content.SyncRequest.Builder setNoRetry(boolean);
    method public android.content.SyncRequest.Builder setSyncAdapter(android.accounts.Account, java.lang.String);
    method public android.content.SyncRequest.Builder syncOnce();
    method public android.content.SyncRequest.Builder syncPeriodic(long, long);
  }

  public final class SyncResult implements android.os.Parcelable {
    ctor public SyncResult();
    method public void clear();
    method public int describeContents();
    method public boolean hasError();
    method public boolean hasHardError();
    method public boolean hasSoftError();
    method public boolean madeSomeProgress();
    method public java.lang.String toDebugString();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.content.SyncResult ALREADY_IN_PROGRESS;
    field public static final android.os.Parcelable.Creator<android.content.SyncResult> CREATOR;
    field public boolean databaseError;
    field public long delayUntil;
    field public boolean fullSyncRequested;
    field public boolean moreRecordsToGet;
    field public boolean partialSyncUnavailable;
    field public final android.content.SyncStats stats;
    field public final boolean syncAlreadyInProgress;
    field public boolean tooManyDeletions;
    field public boolean tooManyRetries;
  }

  public class SyncStats implements android.os.Parcelable {
    ctor public SyncStats();
    ctor public SyncStats(android.os.Parcel);
    method public void clear();
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.SyncStats> CREATOR;
    field public long numAuthExceptions;
    field public long numConflictDetectedExceptions;
    field public long numDeletes;
    field public long numEntries;
    field public long numInserts;
    field public long numIoExceptions;
    field public long numParseExceptions;
    field public long numSkippedEntries;
    field public long numUpdates;
  }

  public abstract interface SyncStatusObserver {
    method public abstract void onStatusChanged(int);
  }

  public class UriMatcher {
    ctor public UriMatcher(int);
    method public void addURI(java.lang.String, java.lang.String, int);
    method public int match(android.net.Uri);
    field public static final int NO_MATCH = -1; // 0xffffffff
  }

  public final class UriPermission implements android.os.Parcelable {
    method public int describeContents();
    method public long getPersistedTime();
    method public android.net.Uri getUri();
    method public boolean isReadPermission();
    method public boolean isWritePermission();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.UriPermission> CREATOR;
    field public static final long INVALID_TIME = -9223372036854775808L; // 0x8000000000000000L
  }

}

package android.content.pm {

  public class ActivityInfo extends android.content.pm.ComponentInfo implements android.os.Parcelable {
    ctor public ActivityInfo();
    ctor public ActivityInfo(android.content.pm.ActivityInfo);
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public final int getThemeResource();
    field public static final int CONFIG_DENSITY = 4096; // 0x1000
    field public static final int CONFIG_FONT_SCALE = 1073741824; // 0x40000000
    field public static final int CONFIG_KEYBOARD = 16; // 0x10
    field public static final int CONFIG_KEYBOARD_HIDDEN = 32; // 0x20
    field public static final int CONFIG_LAYOUT_DIRECTION = 8192; // 0x2000
    field public static final int CONFIG_LOCALE = 4; // 0x4
    field public static final int CONFIG_MCC = 1; // 0x1
    field public static final int CONFIG_MNC = 2; // 0x2
    field public static final int CONFIG_NAVIGATION = 64; // 0x40
    field public static final int CONFIG_ORIENTATION = 128; // 0x80
    field public static final int CONFIG_SCREEN_LAYOUT = 256; // 0x100
    field public static final int CONFIG_SCREEN_SIZE = 1024; // 0x400
    field public static final int CONFIG_SMALLEST_SCREEN_SIZE = 2048; // 0x800
    field public static final int CONFIG_TOUCHSCREEN = 8; // 0x8
    field public static final int CONFIG_UI_MODE = 512; // 0x200
    field public static final android.os.Parcelable.Creator<android.content.pm.ActivityInfo> CREATOR;
    field public static final int DOCUMENT_LAUNCH_ALWAYS = 2; // 0x2
    field public static final int DOCUMENT_LAUNCH_INTO_EXISTING = 1; // 0x1
    field public static final int DOCUMENT_LAUNCH_NEVER = 3; // 0x3
    field public static final int DOCUMENT_LAUNCH_NONE = 0; // 0x0
    field public static final int FLAG_ALLOW_TASK_REPARENTING = 64; // 0x40
    field public static final int FLAG_ALWAYS_RETAIN_TASK_STATE = 8; // 0x8
    field public static final int FLAG_AUTO_REMOVE_FROM_RECENTS = 8192; // 0x2000
    field public static final int FLAG_CLEAR_TASK_ON_LAUNCH = 4; // 0x4
    field public static final int FLAG_EXCLUDE_FROM_RECENTS = 32; // 0x20
    field public static final int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS = 256; // 0x100
    field public static final int FLAG_FINISH_ON_TASK_LAUNCH = 2; // 0x2
    field public static final int FLAG_HARDWARE_ACCELERATED = 512; // 0x200
    field public static final int FLAG_IMMERSIVE = 2048; // 0x800
    field public static final int FLAG_MULTIPROCESS = 1; // 0x1
    field public static final int FLAG_NO_HISTORY = 128; // 0x80
    field public static final int FLAG_RELINQUISH_TASK_IDENTITY = 4096; // 0x1000
    field public static final int FLAG_RESUME_WHILE_PAUSING = 16384; // 0x4000
    field public static final int FLAG_SINGLE_USER = 1073741824; // 0x40000000
    field public static final int FLAG_STATE_NOT_NEEDED = 16; // 0x10
    field public static final int LAUNCH_MULTIPLE = 0; // 0x0
    field public static final int LAUNCH_SINGLE_INSTANCE = 3; // 0x3
    field public static final int LAUNCH_SINGLE_TASK = 2; // 0x2
    field public static final int LAUNCH_SINGLE_TOP = 1; // 0x1
    field public static final int PERSIST_ACROSS_REBOOTS = 2; // 0x2
    field public static final int PERSIST_NEVER = 1; // 0x1
    field public static final int PERSIST_ROOT_ONLY = 0; // 0x0
    field public static final int SCREEN_ORIENTATION_BEHIND = 3; // 0x3
    field public static final int SCREEN_ORIENTATION_FULL_SENSOR = 10; // 0xa
    field public static final int SCREEN_ORIENTATION_FULL_USER = 13; // 0xd
    field public static final int SCREEN_ORIENTATION_LANDSCAPE = 0; // 0x0
    field public static final int SCREEN_ORIENTATION_LOCKED = 14; // 0xe
    field public static final int SCREEN_ORIENTATION_NOSENSOR = 5; // 0x5
    field public static final int SCREEN_ORIENTATION_PORTRAIT = 1; // 0x1
    field public static final int SCREEN_ORIENTATION_REVERSE_LANDSCAPE = 8; // 0x8
    field public static final int SCREEN_ORIENTATION_REVERSE_PORTRAIT = 9; // 0x9
    field public static final int SCREEN_ORIENTATION_SENSOR = 4; // 0x4
    field public static final int SCREEN_ORIENTATION_SENSOR_LANDSCAPE = 6; // 0x6
    field public static final int SCREEN_ORIENTATION_SENSOR_PORTRAIT = 7; // 0x7
    field public static final int SCREEN_ORIENTATION_UNSPECIFIED = -1; // 0xffffffff
    field public static final int SCREEN_ORIENTATION_USER = 2; // 0x2
    field public static final int SCREEN_ORIENTATION_USER_LANDSCAPE = 11; // 0xb
    field public static final int SCREEN_ORIENTATION_USER_PORTRAIT = 12; // 0xc
    field public static final int UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW = 1; // 0x1
    field public int configChanges;
    field public int documentLaunchMode;
    field public int flags;
    field public int launchMode;
    field public int maxRecents;
    field public java.lang.String parentActivityName;
    field public java.lang.String permission;
    field public int persistableMode;
    field public int screenOrientation;
    field public int softInputMode;
    field public java.lang.String targetActivity;
    field public java.lang.String taskAffinity;
    field public int theme;
    field public int uiOptions;
  }

  public class ApplicationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
    ctor public ApplicationInfo();
    ctor public ApplicationInfo(android.content.pm.ApplicationInfo);
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager);
    field public static final android.os.Parcelable.Creator<android.content.pm.ApplicationInfo> CREATOR;
    field public static final int FLAG_ALLOW_BACKUP = 32768; // 0x8000
    field public static final int FLAG_ALLOW_CLEAR_USER_DATA = 64; // 0x40
    field public static final int FLAG_ALLOW_TASK_REPARENTING = 32; // 0x20
    field public static final int FLAG_DEBUGGABLE = 2; // 0x2
    field public static final int FLAG_EXTERNAL_STORAGE = 262144; // 0x40000
    field public static final int FLAG_EXTRACT_NATIVE_LIBS = 268435456; // 0x10000000
    field public static final int FLAG_FACTORY_TEST = 16; // 0x10
    field public static final int FLAG_FULL_BACKUP_ONLY = 67108864; // 0x4000000
    field public static final int FLAG_HAS_CODE = 4; // 0x4
    field public static final int FLAG_INSTALLED = 8388608; // 0x800000
    field public static final int FLAG_IS_DATA_ONLY = 16777216; // 0x1000000
    field public static final int FLAG_IS_GAME = 33554432; // 0x2000000
    field public static final int FLAG_KILL_AFTER_RESTORE = 65536; // 0x10000
    field public static final int FLAG_LARGE_HEAP = 1048576; // 0x100000
    field public static final int FLAG_MULTIARCH = -2147483648; // 0x80000000
    field public static final int FLAG_PERSISTENT = 8; // 0x8
    field public static final int FLAG_RESIZEABLE_FOR_SCREENS = 4096; // 0x1000
    field public static final int FLAG_RESTORE_ANY_VERSION = 131072; // 0x20000
    field public static final int FLAG_STOPPED = 2097152; // 0x200000
    field public static final int FLAG_SUPPORTS_LARGE_SCREENS = 2048; // 0x800
    field public static final int FLAG_SUPPORTS_NORMAL_SCREENS = 1024; // 0x400
    field public static final int FLAG_SUPPORTS_RTL = 4194304; // 0x400000
    field public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 8192; // 0x2000
    field public static final int FLAG_SUPPORTS_SMALL_SCREENS = 512; // 0x200
    field public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 524288; // 0x80000
    field public static final int FLAG_SYSTEM = 1; // 0x1
    field public static final int FLAG_TEST_ONLY = 256; // 0x100
    field public static final int FLAG_UPDATED_SYSTEM_APP = 128; // 0x80
    field public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 134217728; // 0x8000000
    field public static final int FLAG_VM_SAFE_MODE = 16384; // 0x4000
    field public java.lang.String backupAgentName;
    field public java.lang.String className;
    field public int compatibleWidthLimitDp;
    field public java.lang.String dataDir;
    field public int descriptionRes;
    field public boolean enabled;
    field public int flags;
    field public boolean hardwareAccelerated;
    field public int largestWidthLimitDp;
    field public java.lang.String manageSpaceActivityName;
    field public java.lang.String nativeLibraryDir;
    field public java.lang.String permission;
    field public java.lang.String processName;
    field public java.lang.String publicSourceDir;
    field public int requiresSmallestWidthDp;
    field public java.lang.String[] sharedLibraryFiles;
    field public java.lang.String sourceDir;
    field public java.lang.String[] splitPublicSourceDirs;
    field public java.lang.String[] splitSourceDirs;
    field public int targetSdkVersion;
    field public java.lang.String taskAffinity;
    field public int theme;
    field public int uiOptions;
    field public int uid;
  }

  public static class ApplicationInfo.DisplayNameComparator implements java.util.Comparator {
    ctor public ApplicationInfo.DisplayNameComparator(android.content.pm.PackageManager);
    method public final int compare(android.content.pm.ApplicationInfo, android.content.pm.ApplicationInfo);
  }

  public class ComponentInfo extends android.content.pm.PackageItemInfo {
    ctor public ComponentInfo();
    ctor public ComponentInfo(android.content.pm.ComponentInfo);
    ctor protected ComponentInfo(android.os.Parcel);
    method public final int getBannerResource();
    method public final int getIconResource();
    method public final int getLogoResource();
    method public boolean isEnabled();
    field public android.content.pm.ApplicationInfo applicationInfo;
    field public int descriptionRes;
    field public boolean enabled;
    field public boolean exported;
    field public java.lang.String processName;
  }

  public class ConfigurationInfo implements android.os.Parcelable {
    ctor public ConfigurationInfo();
    ctor public ConfigurationInfo(android.content.pm.ConfigurationInfo);
    method public int describeContents();
    method public java.lang.String getGlEsVersion();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.ConfigurationInfo> CREATOR;
    field public static final int GL_ES_VERSION_UNDEFINED = 0; // 0x0
    field public static final int INPUT_FEATURE_FIVE_WAY_NAV = 2; // 0x2
    field public static final int INPUT_FEATURE_HARD_KEYBOARD = 1; // 0x1
    field public int reqGlEsVersion;
    field public int reqInputFeatures;
    field public int reqKeyboardType;
    field public int reqNavigation;
    field public int reqTouchScreen;
  }

  public final class FeatureGroupInfo implements android.os.Parcelable {
    ctor public FeatureGroupInfo();
    ctor public FeatureGroupInfo(android.content.pm.FeatureGroupInfo);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.FeatureGroupInfo> CREATOR;
    field public android.content.pm.FeatureInfo[] features;
  }

  public class FeatureInfo implements android.os.Parcelable {
    ctor public FeatureInfo();
    ctor public FeatureInfo(android.content.pm.FeatureInfo);
    method public int describeContents();
    method public java.lang.String getGlEsVersion();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.FeatureInfo> CREATOR;
    field public static final int FLAG_REQUIRED = 1; // 0x1
    field public static final int GL_ES_VERSION_UNDEFINED = 0; // 0x0
    field public int flags;
    field public java.lang.String name;
    field public int reqGlEsVersion;
  }

  public class InstrumentationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
    ctor public InstrumentationInfo();
    ctor public InstrumentationInfo(android.content.pm.InstrumentationInfo);
    method public int describeContents();
    field public static final android.os.Parcelable.Creator<android.content.pm.InstrumentationInfo> CREATOR;
    field public java.lang.String dataDir;
    field public boolean functionalTest;
    field public boolean handleProfiling;
    field public java.lang.String publicSourceDir;
    field public java.lang.String sourceDir;
    field public java.lang.String[] splitPublicSourceDirs;
    field public java.lang.String[] splitSourceDirs;
    field public java.lang.String targetPackage;
  }

  public class LabeledIntent extends android.content.Intent {
    ctor public LabeledIntent(android.content.Intent, java.lang.String, int, int);
    ctor public LabeledIntent(android.content.Intent, java.lang.String, java.lang.CharSequence, int);
    ctor public LabeledIntent(java.lang.String, int, int);
    ctor public LabeledIntent(java.lang.String, java.lang.CharSequence, int);
    method public int getIconResource();
    method public int getLabelResource();
    method public java.lang.CharSequence getNonLocalizedLabel();
    method public java.lang.String getSourcePackage();
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    field public static final android.os.Parcelable.Creator<android.content.pm.LabeledIntent> CREATOR;
  }

  public class LauncherActivityInfo {
    method public android.content.pm.ApplicationInfo getApplicationInfo();
    method public android.graphics.drawable.Drawable getBadgedIcon(int);
    method public android.content.ComponentName getComponentName();
    method public long getFirstInstallTime();
    method public android.graphics.drawable.Drawable getIcon(int);
    method public java.lang.CharSequence getLabel();
    method public java.lang.String getName();
    method public android.os.UserHandle getUser();
  }

  public class LauncherApps {
    method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
    method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
    method public boolean isPackageEnabled(java.lang.String, android.os.UserHandle);
    method public void registerCallback(android.content.pm.LauncherApps.Callback);
    method public void registerCallback(android.content.pm.LauncherApps.Callback, android.os.Handler);
    method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle);
    method public void startAppDetailsActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
    method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
    method public void unregisterCallback(android.content.pm.LauncherApps.Callback);
  }

  public static abstract class LauncherApps.Callback {
    ctor public LauncherApps.Callback();
    method public abstract void onPackageAdded(java.lang.String, android.os.UserHandle);
    method public abstract void onPackageChanged(java.lang.String, android.os.UserHandle);
    method public abstract void onPackageRemoved(java.lang.String, android.os.UserHandle);
    method public abstract void onPackagesAvailable(java.lang.String[], android.os.UserHandle, boolean);
    method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
  }

  public class PackageInfo implements android.os.Parcelable {
    ctor public PackageInfo();
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.PackageInfo> CREATOR;
    field public static final int INSTALL_LOCATION_AUTO = 0; // 0x0
    field public static final int INSTALL_LOCATION_INTERNAL_ONLY = 1; // 0x1
    field public static final int INSTALL_LOCATION_PREFER_EXTERNAL = 2; // 0x2
    field public static final int REQUESTED_PERMISSION_GRANTED = 2; // 0x2
    field public android.content.pm.ActivityInfo[] activities;
    field public android.content.pm.ApplicationInfo applicationInfo;
    field public int baseRevisionCode;
    field public android.content.pm.ConfigurationInfo[] configPreferences;
    field public android.content.pm.FeatureGroupInfo[] featureGroups;
    field public long firstInstallTime;
    field public int[] gids;
    field public int installLocation;
    field public android.content.pm.InstrumentationInfo[] instrumentation;
    field public long lastUpdateTime;
    field public java.lang.String packageName;
    field public android.content.pm.PermissionInfo[] permissions;
    field public android.content.pm.ProviderInfo[] providers;
    field public android.content.pm.ActivityInfo[] receivers;
    field public android.content.pm.FeatureInfo[] reqFeatures;
    field public java.lang.String[] requestedPermissions;
    field public int[] requestedPermissionsFlags;
    field public android.content.pm.ServiceInfo[] services;
    field public java.lang.String sharedUserId;
    field public int sharedUserLabel;
    field public android.content.pm.Signature[] signatures;
    field public java.lang.String[] splitNames;
    field public int[] splitRevisionCodes;
    field public int versionCode;
    field public java.lang.String versionName;
  }

  public class PackageInstaller {
    method public void abandonSession(int);
    method public int createSession(android.content.pm.PackageInstaller.SessionParams) throws java.io.IOException;
    method public java.util.List<android.content.pm.PackageInstaller.SessionInfo> getAllSessions();
    method public java.util.List<android.content.pm.PackageInstaller.SessionInfo> getMySessions();
    method public android.content.pm.PackageInstaller.SessionInfo getSessionInfo(int);
    method public android.content.pm.PackageInstaller.Session openSession(int) throws java.io.IOException;
    method public void registerSessionCallback(android.content.pm.PackageInstaller.SessionCallback);
    method public void registerSessionCallback(android.content.pm.PackageInstaller.SessionCallback, android.os.Handler);
    method public void uninstall(java.lang.String, android.content.IntentSender);
    method public void unregisterSessionCallback(android.content.pm.PackageInstaller.SessionCallback);
    method public void updateSessionAppIcon(int, android.graphics.Bitmap);
    method public void updateSessionAppLabel(int, java.lang.CharSequence);
    field public static final java.lang.String ACTION_SESSION_DETAILS = "android.content.pm.action.SESSION_DETAILS";
    field public static final java.lang.String EXTRA_OTHER_PACKAGE_NAME = "android.content.pm.extra.OTHER_PACKAGE_NAME";
    field public static final java.lang.String EXTRA_PACKAGE_NAME = "android.content.pm.extra.PACKAGE_NAME";
    field public static final java.lang.String EXTRA_SESSION_ID = "android.content.pm.extra.SESSION_ID";
    field public static final java.lang.String EXTRA_STATUS = "android.content.pm.extra.STATUS";
    field public static final java.lang.String EXTRA_STATUS_MESSAGE = "android.content.pm.extra.STATUS_MESSAGE";
    field public static final java.lang.String EXTRA_STORAGE_PATH = "android.content.pm.extra.STORAGE_PATH";
    field public static final int STATUS_FAILURE = 1; // 0x1
    field public static final int STATUS_FAILURE_ABORTED = 3; // 0x3
    field public static final int STATUS_FAILURE_BLOCKED = 2; // 0x2
    field public static final int STATUS_FAILURE_CONFLICT = 5; // 0x5
    field public static final int STATUS_FAILURE_INCOMPATIBLE = 7; // 0x7
    field public static final int STATUS_FAILURE_INVALID = 4; // 0x4
    field public static final int STATUS_FAILURE_STORAGE = 6; // 0x6
    field public static final int STATUS_PENDING_USER_ACTION = -1; // 0xffffffff
    field public static final int STATUS_SUCCESS = 0; // 0x0
  }

  public static class PackageInstaller.Session implements java.io.Closeable {
    method public void abandon();
    method public void close();
    method public void commit(android.content.IntentSender);
    method public void fsync(java.io.OutputStream) throws java.io.IOException;
    method public java.lang.String[] getNames() throws java.io.IOException;
    method public java.io.InputStream openRead(java.lang.String) throws java.io.IOException;
    method public java.io.OutputStream openWrite(java.lang.String, long, long) throws java.io.IOException;
    method public void setStagingProgress(float);
  }

  public static abstract class PackageInstaller.SessionCallback {
    ctor public PackageInstaller.SessionCallback();
    method public abstract void onActiveChanged(int, boolean);
    method public abstract void onBadgingChanged(int);
    method public abstract void onCreated(int);
    method public abstract void onFinished(int, boolean);
    method public abstract void onProgressChanged(int, float);
  }

  public static class PackageInstaller.SessionInfo implements android.os.Parcelable {
    method public android.content.Intent createDetailsIntent();
    method public int describeContents();
    method public android.graphics.Bitmap getAppIcon();
    method public java.lang.CharSequence getAppLabel();
    method public java.lang.String getAppPackageName();
    method public java.lang.String getInstallerPackageName();
    method public float getProgress();
    method public int getSessionId();
    method public boolean isActive();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.PackageInstaller.SessionInfo> CREATOR;
  }

  public static class PackageInstaller.SessionParams implements android.os.Parcelable {
    ctor public PackageInstaller.SessionParams(int);
    method public int describeContents();
    method public void setAppIcon(android.graphics.Bitmap);
    method public void setAppLabel(java.lang.CharSequence);
    method public void setAppPackageName(java.lang.String);
    method public void setInstallLocation(int);
    method public void setOriginatingUri(android.net.Uri);
    method public void setReferrerUri(android.net.Uri);
    method public void setSize(long);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.PackageInstaller.SessionParams> CREATOR;
    field public static final int MODE_FULL_INSTALL = 1; // 0x1
    field public static final int MODE_INHERIT_EXISTING = 2; // 0x2
  }

  public class PackageItemInfo {
    ctor public PackageItemInfo();
    ctor public PackageItemInfo(android.content.pm.PackageItemInfo);
    ctor protected PackageItemInfo(android.os.Parcel);
    method protected void dumpBack(android.util.Printer, java.lang.String);
    method protected void dumpFront(android.util.Printer, java.lang.String);
    method public android.graphics.drawable.Drawable loadBanner(android.content.pm.PackageManager);
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    method public android.graphics.drawable.Drawable loadLogo(android.content.pm.PackageManager);
    method public android.graphics.drawable.Drawable loadUnbadgedIcon(android.content.pm.PackageManager);
    method public android.content.res.XmlResourceParser loadXmlMetaData(android.content.pm.PackageManager, java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public int banner;
    field public int icon;
    field public int labelRes;
    field public int logo;
    field public android.os.Bundle metaData;
    field public java.lang.String name;
    field public java.lang.CharSequence nonLocalizedLabel;
    field public java.lang.String packageName;
  }

  public static class PackageItemInfo.DisplayNameComparator implements java.util.Comparator {
    ctor public PackageItemInfo.DisplayNameComparator(android.content.pm.PackageManager);
    method public final int compare(android.content.pm.PackageItemInfo, android.content.pm.PackageItemInfo);
  }

  public abstract class PackageManager {
    ctor public PackageManager();
    method public abstract deprecated void addPackageToPreferred(java.lang.String);
    method public abstract boolean addPermission(android.content.pm.PermissionInfo);
    method public abstract boolean addPermissionAsync(android.content.pm.PermissionInfo);
    method public abstract deprecated void addPreferredActivity(android.content.IntentFilter, int, android.content.ComponentName[], android.content.ComponentName);
    method public abstract java.lang.String[] canonicalToCurrentPackageNames(java.lang.String[]);
    method public abstract int checkPermission(java.lang.String, java.lang.String);
    method public abstract int checkSignatures(java.lang.String, java.lang.String);
    method public abstract int checkSignatures(int, int);
    method public abstract void clearPackagePreferredActivities(java.lang.String);
    method public abstract java.lang.String[] currentToCanonicalPackageNames(java.lang.String[]);
    method public abstract void extendVerificationTimeout(int, int, long);
    method public abstract android.graphics.drawable.Drawable getActivityBanner(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.graphics.drawable.Drawable getActivityBanner(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.graphics.drawable.Drawable getActivityIcon(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.graphics.drawable.Drawable getActivityIcon(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.ActivityInfo getActivityInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.graphics.drawable.Drawable getActivityLogo(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.graphics.drawable.Drawable getActivityLogo(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract java.util.List<android.content.pm.PermissionGroupInfo> getAllPermissionGroups(int);
    method public abstract android.graphics.drawable.Drawable getApplicationBanner(android.content.pm.ApplicationInfo);
    method public abstract android.graphics.drawable.Drawable getApplicationBanner(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract int getApplicationEnabledSetting(java.lang.String);
    method public abstract android.graphics.drawable.Drawable getApplicationIcon(android.content.pm.ApplicationInfo);
    method public abstract android.graphics.drawable.Drawable getApplicationIcon(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
    method public abstract android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
    method public abstract android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract int getComponentEnabledSetting(android.content.ComponentName);
    method public abstract android.graphics.drawable.Drawable getDefaultActivityIcon();
    method public abstract android.graphics.drawable.Drawable getDrawable(java.lang.String, int, android.content.pm.ApplicationInfo);
    method public abstract java.util.List<android.content.pm.ApplicationInfo> getInstalledApplications(int);
    method public abstract java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int);
    method public abstract java.lang.String getInstallerPackageName(java.lang.String);
    method public abstract android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.Intent getLaunchIntentForPackage(java.lang.String);
    method public abstract android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String);
    method public abstract java.lang.String getNameForUid(int);
    method public android.content.pm.PackageInfo getPackageArchiveInfo(java.lang.String, int);
    method public abstract int[] getPackageGids(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.PackageInfo getPackageInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.PackageInstaller getPackageInstaller();
    method public abstract java.lang.String[] getPackagesForUid(int);
    method public abstract java.util.List<android.content.pm.PackageInfo> getPackagesHoldingPermissions(java.lang.String[], int);
    method public abstract android.content.pm.PermissionGroupInfo getPermissionGroupInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.PermissionInfo getPermissionInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract int getPreferredActivities(java.util.List<android.content.IntentFilter>, java.util.List<android.content.ComponentName>, java.lang.String);
    method public abstract java.util.List<android.content.pm.PackageInfo> getPreferredPackages(int);
    method public abstract android.content.pm.ProviderInfo getProviderInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.ActivityInfo getReceiverInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.res.Resources getResourcesForActivity(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.res.Resources getResourcesForApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.pm.FeatureInfo[] getSystemAvailableFeatures();
    method public abstract java.lang.String[] getSystemSharedLibraryNames();
    method public abstract java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo);
    method public abstract android.graphics.drawable.Drawable getUserBadgedDrawableForDensity(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
    method public abstract android.graphics.drawable.Drawable getUserBadgedIcon(android.graphics.drawable.Drawable, android.os.UserHandle);
    method public abstract java.lang.CharSequence getUserBadgedLabel(java.lang.CharSequence, android.os.UserHandle);
    method public abstract android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo);
    method public abstract boolean hasSystemFeature(java.lang.String);
    method public abstract boolean isSafeMode();
    method public abstract java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int);
    method public abstract java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String, int, int);
    method public abstract java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String, int);
    method public abstract java.util.List<android.content.pm.ResolveInfo> queryIntentActivities(android.content.Intent, int);
    method public abstract java.util.List<android.content.pm.ResolveInfo> queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, int);
    method public abstract java.util.List<android.content.pm.ResolveInfo> queryIntentContentProviders(android.content.Intent, int);
    method public abstract java.util.List<android.content.pm.ResolveInfo> queryIntentServices(android.content.Intent, int);
    method public abstract java.util.List<android.content.pm.PermissionInfo> queryPermissionsByGroup(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract deprecated void removePackageFromPreferred(java.lang.String);
    method public abstract void removePermission(java.lang.String);
    method public abstract android.content.pm.ResolveInfo resolveActivity(android.content.Intent, int);
    method public abstract android.content.pm.ProviderInfo resolveContentProvider(java.lang.String, int);
    method public abstract android.content.pm.ResolveInfo resolveService(android.content.Intent, int);
    method public abstract void setApplicationEnabledSetting(java.lang.String, int, int);
    method public abstract void setComponentEnabledSetting(android.content.ComponentName, int, int);
    method public abstract void setInstallerPackageName(java.lang.String, java.lang.String);
    method public abstract void verifyPendingInstall(int, int);
    field public static final int COMPONENT_ENABLED_STATE_DEFAULT = 0; // 0x0
    field public static final int COMPONENT_ENABLED_STATE_DISABLED = 2; // 0x2
    field public static final int COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED = 4; // 0x4
    field public static final int COMPONENT_ENABLED_STATE_DISABLED_USER = 3; // 0x3
    field public static final int COMPONENT_ENABLED_STATE_ENABLED = 1; // 0x1
    field public static final int DONT_KILL_APP = 1; // 0x1
    field public static final java.lang.String EXTRA_VERIFICATION_ID = "android.content.pm.extra.VERIFICATION_ID";
    field public static final java.lang.String EXTRA_VERIFICATION_RESULT = "android.content.pm.extra.VERIFICATION_RESULT";
    field public static final java.lang.String FEATURE_APP_WIDGETS = "android.software.app_widgets";
    field public static final java.lang.String FEATURE_AUDIO_LOW_LATENCY = "android.hardware.audio.low_latency";
    field public static final java.lang.String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output";
    field public static final java.lang.String FEATURE_BACKUP = "android.software.backup";
    field public static final java.lang.String FEATURE_BLUETOOTH = "android.hardware.bluetooth";
    field public static final java.lang.String FEATURE_BLUETOOTH_LE = "android.hardware.bluetooth_le";
    field public static final java.lang.String FEATURE_CAMERA = "android.hardware.camera";
    field public static final java.lang.String FEATURE_CAMERA_ANY = "android.hardware.camera.any";
    field public static final java.lang.String FEATURE_CAMERA_AUTOFOCUS = "android.hardware.camera.autofocus";
    field public static final java.lang.String FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING = "android.hardware.camera.capability.manual_post_processing";
    field public static final java.lang.String FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR = "android.hardware.camera.capability.manual_sensor";
    field public static final java.lang.String FEATURE_CAMERA_CAPABILITY_RAW = "android.hardware.camera.capability.raw";
    field public static final java.lang.String FEATURE_CAMERA_EXTERNAL = "android.hardware.camera.external";
    field public static final java.lang.String FEATURE_CAMERA_FLASH = "android.hardware.camera.flash";
    field public static final java.lang.String FEATURE_CAMERA_FRONT = "android.hardware.camera.front";
    field public static final java.lang.String FEATURE_CAMERA_LEVEL_FULL = "android.hardware.camera.level.full";
    field public static final java.lang.String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice";
    field public static final java.lang.String FEATURE_CONSUMER_IR = "android.hardware.consumerir";
    field public static final java.lang.String FEATURE_DEVICE_ADMIN = "android.software.device_admin";
    field public static final java.lang.String FEATURE_FAKETOUCH = "android.hardware.faketouch";
    field public static final java.lang.String FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT = "android.hardware.faketouch.multitouch.distinct";
    field public static final java.lang.String FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND = "android.hardware.faketouch.multitouch.jazzhand";
    field public static final java.lang.String FEATURE_GAMEPAD = "android.hardware.gamepad";
    field public static final java.lang.String FEATURE_HIFI_SENSORS = "android.hardware.sensor.hifi_sensors";
    field public static final java.lang.String FEATURE_HOME_SCREEN = "android.software.home_screen";
    field public static final java.lang.String FEATURE_INPUT_METHODS = "android.software.input_methods";
    field public static final java.lang.String FEATURE_LEANBACK = "android.software.leanback";
    field public static final java.lang.String FEATURE_LIVE_TV = "android.software.live_tv";
    field public static final java.lang.String FEATURE_LIVE_WALLPAPER = "android.software.live_wallpaper";
    field public static final java.lang.String FEATURE_LOCATION = "android.hardware.location";
    field public static final java.lang.String FEATURE_LOCATION_GPS = "android.hardware.location.gps";
    field public static final java.lang.String FEATURE_LOCATION_NETWORK = "android.hardware.location.network";
    field public static final java.lang.String FEATURE_MANAGED_USERS = "android.software.managed_users";
    field public static final java.lang.String FEATURE_MICROPHONE = "android.hardware.microphone";
    field public static final java.lang.String FEATURE_MIDI = "android.software.midi";
    field public static final java.lang.String FEATURE_NFC = "android.hardware.nfc";
    field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
    field public static final java.lang.String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
    field public static final java.lang.String FEATURE_PRINTING = "android.software.print";
    field public static final java.lang.String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
    field public static final java.lang.String FEATURE_SCREEN_PORTRAIT = "android.hardware.screen.portrait";
    field public static final java.lang.String FEATURE_SECURELY_REMOVES_USERS = "android.software.securely_removes_users";
    field public static final java.lang.String FEATURE_SENSOR_ACCELEROMETER = "android.hardware.sensor.accelerometer";
    field public static final java.lang.String FEATURE_SENSOR_AMBIENT_TEMPERATURE = "android.hardware.sensor.ambient_temperature";
    field public static final java.lang.String FEATURE_SENSOR_BAROMETER = "android.hardware.sensor.barometer";
    field public static final java.lang.String FEATURE_SENSOR_COMPASS = "android.hardware.sensor.compass";
    field public static final java.lang.String FEATURE_SENSOR_GYROSCOPE = "android.hardware.sensor.gyroscope";
    field public static final java.lang.String FEATURE_SENSOR_HEART_RATE = "android.hardware.sensor.heartrate";
    field public static final java.lang.String FEATURE_SENSOR_HEART_RATE_ECG = "android.hardware.sensor.heartrate.ecg";
    field public static final java.lang.String FEATURE_SENSOR_LIGHT = "android.hardware.sensor.light";
    field public static final java.lang.String FEATURE_SENSOR_PROXIMITY = "android.hardware.sensor.proximity";
    field public static final java.lang.String FEATURE_SENSOR_RELATIVE_HUMIDITY = "android.hardware.sensor.relative_humidity";
    field public static final java.lang.String FEATURE_SENSOR_STEP_COUNTER = "android.hardware.sensor.stepcounter";
    field public static final java.lang.String FEATURE_SENSOR_STEP_DETECTOR = "android.hardware.sensor.stepdetector";
    field public static final java.lang.String FEATURE_SIP = "android.software.sip";
    field public static final java.lang.String FEATURE_SIP_VOIP = "android.software.sip.voip";
    field public static final java.lang.String FEATURE_TELEPHONY = "android.hardware.telephony";
    field public static final java.lang.String FEATURE_TELEPHONY_CDMA = "android.hardware.telephony.cdma";
    field public static final java.lang.String FEATURE_TELEPHONY_GSM = "android.hardware.telephony.gsm";
    field public static final deprecated java.lang.String FEATURE_TELEVISION = "android.hardware.type.television";
    field public static final java.lang.String FEATURE_TOUCHSCREEN = "android.hardware.touchscreen";
    field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH = "android.hardware.touchscreen.multitouch";
    field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT = "android.hardware.touchscreen.multitouch.distinct";
    field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND = "android.hardware.touchscreen.multitouch.jazzhand";
    field public static final java.lang.String FEATURE_USB_ACCESSORY = "android.hardware.usb.accessory";
    field public static final java.lang.String FEATURE_USB_HOST = "android.hardware.usb.host";
    field public static final java.lang.String FEATURE_VERIFIED_BOOT = "android.software.verified_boot";
    field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
    field public static final java.lang.String FEATURE_WEBVIEW = "android.software.webview";
    field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
    field public static final java.lang.String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
    field public static final int GET_ACTIVITIES = 1; // 0x1
    field public static final int GET_CONFIGURATIONS = 16384; // 0x4000
    field public static final int GET_DISABLED_COMPONENTS = 512; // 0x200
    field public static final int GET_DISABLED_UNTIL_USED_COMPONENTS = 32768; // 0x8000
    field public static final int GET_GIDS = 256; // 0x100
    field public static final int GET_INSTRUMENTATION = 16; // 0x10
    field public static final int GET_INTENT_FILTERS = 32; // 0x20
    field public static final int GET_META_DATA = 128; // 0x80
    field public static final int GET_PERMISSIONS = 4096; // 0x1000
    field public static final int GET_PROVIDERS = 8; // 0x8
    field public static final int GET_RECEIVERS = 2; // 0x2
    field public static final int GET_RESOLVED_FILTER = 64; // 0x40
    field public static final int GET_SERVICES = 4; // 0x4
    field public static final int GET_SHARED_LIBRARY_FILES = 1024; // 0x400
    field public static final int GET_SIGNATURES = 64; // 0x40
    field public static final int GET_UNINSTALLED_PACKAGES = 8192; // 0x2000
    field public static final int GET_URI_PERMISSION_PATTERNS = 2048; // 0x800
    field public static final int MATCH_DEFAULT_ONLY = 65536; // 0x10000
    field public static final long MAXIMUM_VERIFICATION_TIMEOUT = 3600000L; // 0x36ee80L
    field public static final int PERMISSION_DENIED = -1; // 0xffffffff
    field public static final int PERMISSION_GRANTED = 0; // 0x0
    field public static final int SIGNATURE_FIRST_NOT_SIGNED = -1; // 0xffffffff
    field public static final int SIGNATURE_MATCH = 0; // 0x0
    field public static final int SIGNATURE_NEITHER_SIGNED = 1; // 0x1
    field public static final int SIGNATURE_NO_MATCH = -3; // 0xfffffffd
    field public static final int SIGNATURE_SECOND_NOT_SIGNED = -2; // 0xfffffffe
    field public static final int SIGNATURE_UNKNOWN_PACKAGE = -4; // 0xfffffffc
    field public static final int VERIFICATION_ALLOW = 1; // 0x1
    field public static final int VERIFICATION_REJECT = -1; // 0xffffffff
  }

  public static class PackageManager.NameNotFoundException extends android.util.AndroidException {
    ctor public PackageManager.NameNotFoundException();
    ctor public PackageManager.NameNotFoundException(java.lang.String);
  }

  public class PackageStats implements android.os.Parcelable {
    ctor public PackageStats(java.lang.String);
    ctor public PackageStats(android.os.Parcel);
    ctor public PackageStats(android.content.pm.PackageStats);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.PackageStats> CREATOR;
    field public long cacheSize;
    field public long codeSize;
    field public long dataSize;
    field public long externalCacheSize;
    field public long externalCodeSize;
    field public long externalDataSize;
    field public long externalMediaSize;
    field public long externalObbSize;
    field public java.lang.String packageName;
  }

  public class PathPermission extends android.os.PatternMatcher {
    ctor public PathPermission(java.lang.String, int, java.lang.String, java.lang.String);
    ctor public PathPermission(android.os.Parcel);
    method public java.lang.String getReadPermission();
    method public java.lang.String getWritePermission();
    field public static final android.os.Parcelable.Creator<android.content.pm.PathPermission> CREATOR;
  }

  public class PermissionGroupInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
    ctor public PermissionGroupInfo();
    ctor public PermissionGroupInfo(android.content.pm.PermissionGroupInfo);
    method public int describeContents();
    method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager);
    field public static final android.os.Parcelable.Creator<android.content.pm.PermissionGroupInfo> CREATOR;
    field public static final int FLAG_PERSONAL_INFO = 1; // 0x1
    field public int descriptionRes;
    field public int flags;
    field public java.lang.CharSequence nonLocalizedDescription;
    field public int priority;
  }

  public class PermissionInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
    ctor public PermissionInfo();
    ctor public PermissionInfo(android.content.pm.PermissionInfo);
    method public int describeContents();
    method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager);
    field public static final android.os.Parcelable.Creator<android.content.pm.PermissionInfo> CREATOR;
    field public static final int FLAG_COSTS_MONEY = 1; // 0x1
    field public static final int PROTECTION_DANGEROUS = 1; // 0x1
    field public static final int PROTECTION_FLAG_APPOP = 64; // 0x40
    field public static final int PROTECTION_FLAG_DEVELOPMENT = 32; // 0x20
    field public static final int PROTECTION_FLAG_SYSTEM = 16; // 0x10
    field public static final int PROTECTION_MASK_BASE = 15; // 0xf
    field public static final int PROTECTION_MASK_FLAGS = 240; // 0xf0
    field public static final int PROTECTION_NORMAL = 0; // 0x0
    field public static final int PROTECTION_SIGNATURE = 2; // 0x2
    field public static final int PROTECTION_SIGNATURE_OR_SYSTEM = 3; // 0x3
    field public int descriptionRes;
    field public int flags;
    field public java.lang.String group;
    field public java.lang.CharSequence nonLocalizedDescription;
    field public int protectionLevel;
  }

  public final class ProviderInfo extends android.content.pm.ComponentInfo implements android.os.Parcelable {
    ctor public ProviderInfo();
    ctor public ProviderInfo(android.content.pm.ProviderInfo);
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    field public static final android.os.Parcelable.Creator<android.content.pm.ProviderInfo> CREATOR;
    field public static final int FLAG_SINGLE_USER = 1073741824; // 0x40000000
    field public java.lang.String authority;
    field public int flags;
    field public boolean grantUriPermissions;
    field public int initOrder;
    field public deprecated boolean isSyncable;
    field public boolean multiprocess;
    field public android.content.pm.PathPermission[] pathPermissions;
    field public java.lang.String readPermission;
    field public android.os.PatternMatcher[] uriPermissionPatterns;
    field public java.lang.String writePermission;
  }

  public class ResolveInfo implements android.os.Parcelable {
    ctor public ResolveInfo();
    ctor public ResolveInfo(android.content.pm.ResolveInfo);
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public final int getIconResource();
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.ResolveInfo> CREATOR;
    field public android.content.pm.ActivityInfo activityInfo;
    field public android.content.IntentFilter filter;
    field public int icon;
    field public boolean isDefault;
    field public int labelRes;
    field public int match;
    field public java.lang.CharSequence nonLocalizedLabel;
    field public int preferredOrder;
    field public int priority;
    field public android.content.pm.ProviderInfo providerInfo;
    field public java.lang.String resolvePackageName;
    field public android.content.pm.ServiceInfo serviceInfo;
    field public int specificIndex;
  }

  public static class ResolveInfo.DisplayNameComparator implements java.util.Comparator {
    ctor public ResolveInfo.DisplayNameComparator(android.content.pm.PackageManager);
    method public final int compare(android.content.pm.ResolveInfo, android.content.pm.ResolveInfo);
  }

  public class ServiceInfo extends android.content.pm.ComponentInfo implements android.os.Parcelable {
    ctor public ServiceInfo();
    ctor public ServiceInfo(android.content.pm.ServiceInfo);
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    field public static final android.os.Parcelable.Creator<android.content.pm.ServiceInfo> CREATOR;
    field public static final int FLAG_ISOLATED_PROCESS = 2; // 0x2
    field public static final int FLAG_SINGLE_USER = 1073741824; // 0x40000000
    field public static final int FLAG_STOP_WITH_TASK = 1; // 0x1
    field public int flags;
    field public java.lang.String permission;
  }

  public class Signature implements android.os.Parcelable {
    ctor public Signature(byte[]);
    ctor public Signature(java.lang.String);
    method public int describeContents();
    method public byte[] toByteArray();
    method public char[] toChars();
    method public char[] toChars(char[], int[]);
    method public java.lang.String toCharsString();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.Signature> CREATOR;
  }

}

package android.content.res {

  public class AssetFileDescriptor implements java.io.Closeable android.os.Parcelable {
    ctor public AssetFileDescriptor(android.os.ParcelFileDescriptor, long, long);
    ctor public AssetFileDescriptor(android.os.ParcelFileDescriptor, long, long, android.os.Bundle);
    method public void close() throws java.io.IOException;
    method public java.io.FileInputStream createInputStream() throws java.io.IOException;
    method public java.io.FileOutputStream createOutputStream() throws java.io.IOException;
    method public int describeContents();
    method public long getDeclaredLength();
    method public android.os.Bundle getExtras();
    method public java.io.FileDescriptor getFileDescriptor();
    method public long getLength();
    method public android.os.ParcelFileDescriptor getParcelFileDescriptor();
    method public long getStartOffset();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.res.AssetFileDescriptor> CREATOR;
    field public static final long UNKNOWN_LENGTH = -1L; // 0xffffffffffffffffL
  }

  public static class AssetFileDescriptor.AutoCloseInputStream extends android.os.ParcelFileDescriptor.AutoCloseInputStream {
    ctor public AssetFileDescriptor.AutoCloseInputStream(android.content.res.AssetFileDescriptor) throws java.io.IOException;
  }

  public static class AssetFileDescriptor.AutoCloseOutputStream extends android.os.ParcelFileDescriptor.AutoCloseOutputStream {
    ctor public AssetFileDescriptor.AutoCloseOutputStream(android.content.res.AssetFileDescriptor) throws java.io.IOException;
  }

  public final class AssetManager implements java.lang.AutoCloseable {
    method public void close();
    method public final java.lang.String[] getLocales();
    method public final java.lang.String[] list(java.lang.String) throws java.io.IOException;
    method public final java.io.InputStream open(java.lang.String) throws java.io.IOException;
    method public final java.io.InputStream open(java.lang.String, int) throws java.io.IOException;
    method public final android.content.res.AssetFileDescriptor openFd(java.lang.String) throws java.io.IOException;
    method public final android.content.res.AssetFileDescriptor openNonAssetFd(java.lang.String) throws java.io.IOException;
    method public final android.content.res.AssetFileDescriptor openNonAssetFd(int, java.lang.String) throws java.io.IOException;
    method public final android.content.res.XmlResourceParser openXmlResourceParser(java.lang.String) throws java.io.IOException;
    method public final android.content.res.XmlResourceParser openXmlResourceParser(int, java.lang.String) throws java.io.IOException;
    field public static final int ACCESS_BUFFER = 3; // 0x3
    field public static final int ACCESS_RANDOM = 1; // 0x1
    field public static final int ACCESS_STREAMING = 2; // 0x2
    field public static final int ACCESS_UNKNOWN = 0; // 0x0
  }

  public final class AssetManager.AssetInputStream extends java.io.InputStream {
    method public final int available() throws java.io.IOException;
    method public final void close() throws java.io.IOException;
    method public final void mark(int);
    method public final boolean markSupported();
    method public final int read() throws java.io.IOException;
    method public final int read(byte[]) throws java.io.IOException;
    method public final int read(byte[], int, int) throws java.io.IOException;
    method public final void reset() throws java.io.IOException;
    method public final long skip(long) throws java.io.IOException;
  }

  public class ColorStateList implements android.os.Parcelable {
    ctor public ColorStateList(int[][], int[]);
    method public static deprecated android.content.res.ColorStateList createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public static android.content.res.ColorStateList createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public int describeContents();
    method public int getChangingConfigurations();
    method public int getColorForState(int[], int);
    method public int getDefaultColor();
    method public boolean isOpaque();
    method public boolean isStateful();
    method public static android.content.res.ColorStateList valueOf(int);
    method public android.content.res.ColorStateList withAlpha(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.res.ColorStateList> CREATOR;
  }

  public final class Configuration implements java.lang.Comparable android.os.Parcelable {
    ctor public Configuration();
    ctor public Configuration(android.content.res.Configuration);
    method public int compareTo(android.content.res.Configuration);
    method public int describeContents();
    method public int diff(android.content.res.Configuration);
    method public boolean equals(android.content.res.Configuration);
    method public int getLayoutDirection();
    method public boolean isLayoutSizeAtLeast(int);
    method public static boolean needNewResources(int, int);
    method public void readFromParcel(android.os.Parcel);
    method public void setLayoutDirection(java.util.Locale);
    method public void setLocale(java.util.Locale);
    method public void setTo(android.content.res.Configuration);
    method public void setToDefaults();
    method public int updateFrom(android.content.res.Configuration);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.res.Configuration> CREATOR;
    field public static final int DENSITY_DPI_UNDEFINED = 0; // 0x0
    field public static final int HARDKEYBOARDHIDDEN_NO = 1; // 0x1
    field public static final int HARDKEYBOARDHIDDEN_UNDEFINED = 0; // 0x0
    field public static final int HARDKEYBOARDHIDDEN_YES = 2; // 0x2
    field public static final int KEYBOARDHIDDEN_NO = 1; // 0x1
    field public static final int KEYBOARDHIDDEN_UNDEFINED = 0; // 0x0
    field public static final int KEYBOARDHIDDEN_YES = 2; // 0x2
    field public static final int KEYBOARD_12KEY = 3; // 0x3
    field public static final int KEYBOARD_NOKEYS = 1; // 0x1
    field public static final int KEYBOARD_QWERTY = 2; // 0x2
    field public static final int KEYBOARD_UNDEFINED = 0; // 0x0
    field public static final int MNC_ZERO = 65535; // 0xffff
    field public static final int NAVIGATIONHIDDEN_NO = 1; // 0x1
    field public static final int NAVIGATIONHIDDEN_UNDEFINED = 0; // 0x0
    field public static final int NAVIGATIONHIDDEN_YES = 2; // 0x2
    field public static final int NAVIGATION_DPAD = 2; // 0x2
    field public static final int NAVIGATION_NONAV = 1; // 0x1
    field public static final int NAVIGATION_TRACKBALL = 3; // 0x3
    field public static final int NAVIGATION_UNDEFINED = 0; // 0x0
    field public static final int NAVIGATION_WHEEL = 4; // 0x4
    field public static final int ORIENTATION_LANDSCAPE = 2; // 0x2
    field public static final int ORIENTATION_PORTRAIT = 1; // 0x1
    field public static final deprecated int ORIENTATION_SQUARE = 3; // 0x3
    field public static final int ORIENTATION_UNDEFINED = 0; // 0x0
    field public static final int SCREENLAYOUT_LAYOUTDIR_LTR = 64; // 0x40
    field public static final int SCREENLAYOUT_LAYOUTDIR_MASK = 192; // 0xc0
    field public static final int SCREENLAYOUT_LAYOUTDIR_RTL = 128; // 0x80
    field public static final int SCREENLAYOUT_LAYOUTDIR_SHIFT = 6; // 0x6
    field public static final int SCREENLAYOUT_LAYOUTDIR_UNDEFINED = 0; // 0x0
    field public static final int SCREENLAYOUT_LONG_MASK = 48; // 0x30
    field public static final int SCREENLAYOUT_LONG_NO = 16; // 0x10
    field public static final int SCREENLAYOUT_LONG_UNDEFINED = 0; // 0x0
    field public static final int SCREENLAYOUT_LONG_YES = 32; // 0x20
    field public static final int SCREENLAYOUT_SIZE_LARGE = 3; // 0x3
    field public static final int SCREENLAYOUT_SIZE_MASK = 15; // 0xf
    field public static final int SCREENLAYOUT_SIZE_NORMAL = 2; // 0x2
    field public static final int SCREENLAYOUT_SIZE_SMALL = 1; // 0x1
    field public static final int SCREENLAYOUT_SIZE_UNDEFINED = 0; // 0x0
    field public static final int SCREENLAYOUT_SIZE_XLARGE = 4; // 0x4
    field public static final int SCREENLAYOUT_UNDEFINED = 0; // 0x0
    field public static final int SCREEN_HEIGHT_DP_UNDEFINED = 0; // 0x0
    field public static final int SCREEN_WIDTH_DP_UNDEFINED = 0; // 0x0
    field public static final int SMALLEST_SCREEN_WIDTH_DP_UNDEFINED = 0; // 0x0
    field public static final int TOUCHSCREEN_FINGER = 3; // 0x3
    field public static final int TOUCHSCREEN_NOTOUCH = 1; // 0x1
    field public static final deprecated int TOUCHSCREEN_STYLUS = 2; // 0x2
    field public static final int TOUCHSCREEN_UNDEFINED = 0; // 0x0
    field public static final int UI_MODE_NIGHT_MASK = 48; // 0x30
    field public static final int UI_MODE_NIGHT_NO = 16; // 0x10
    field public static final int UI_MODE_NIGHT_UNDEFINED = 0; // 0x0
    field public static final int UI_MODE_NIGHT_YES = 32; // 0x20
    field public static final int UI_MODE_TYPE_APPLIANCE = 5; // 0x5
    field public static final int UI_MODE_TYPE_CAR = 3; // 0x3
    field public static final int UI_MODE_TYPE_DESK = 2; // 0x2
    field public static final int UI_MODE_TYPE_MASK = 15; // 0xf
    field public static final int UI_MODE_TYPE_NORMAL = 1; // 0x1
    field public static final int UI_MODE_TYPE_TELEVISION = 4; // 0x4
    field public static final int UI_MODE_TYPE_UNDEFINED = 0; // 0x0
    field public static final int UI_MODE_TYPE_WATCH = 6; // 0x6
    field public int densityDpi;
    field public float fontScale;
    field public int hardKeyboardHidden;
    field public int keyboard;
    field public int keyboardHidden;
    field public java.util.Locale locale;
    field public int mcc;
    field public int mnc;
    field public int navigation;
    field public int navigationHidden;
    field public int orientation;
    field public int screenHeightDp;
    field public int screenLayout;
    field public int screenWidthDp;
    field public int smallestScreenWidthDp;
    field public int touchscreen;
    field public int uiMode;
  }

  public class ObbInfo implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.res.ObbInfo> CREATOR;
    field public static final int OBB_OVERLAY = 1; // 0x1
    field public java.lang.String filename;
    field public int flags;
    field public java.lang.String packageName;
    field public int version;
  }

  public class ObbScanner {
    method public static android.content.res.ObbInfo getObbInfo(java.lang.String) throws java.io.IOException;
  }

  public class Resources {
    ctor public Resources(android.content.res.AssetManager, android.util.DisplayMetrics, android.content.res.Configuration);
    method public final void finishPreloading();
    method public final void flushLayoutCache();
    method public android.content.res.XmlResourceParser getAnimation(int) throws android.content.res.Resources.NotFoundException;
    method public final android.content.res.AssetManager getAssets();
    method public boolean getBoolean(int) throws android.content.res.Resources.NotFoundException;
    method public deprecated int getColor(int) throws android.content.res.Resources.NotFoundException;
    method public int getColor(int, android.content.res.Resources.Theme) throws android.content.res.Resources.NotFoundException;
    method public deprecated android.content.res.ColorStateList getColorStateList(int) throws android.content.res.Resources.NotFoundException;
    method public android.content.res.ColorStateList getColorStateList(int, android.content.res.Resources.Theme) throws android.content.res.Resources.NotFoundException;
    method public android.content.res.Configuration getConfiguration();
    method public float getDimension(int) throws android.content.res.Resources.NotFoundException;
    method public int getDimensionPixelOffset(int) throws android.content.res.Resources.NotFoundException;
    method public int getDimensionPixelSize(int) throws android.content.res.Resources.NotFoundException;
    method public android.util.DisplayMetrics getDisplayMetrics();
    method public deprecated android.graphics.drawable.Drawable getDrawable(int) throws android.content.res.Resources.NotFoundException;
    method public android.graphics.drawable.Drawable getDrawable(int, android.content.res.Resources.Theme) throws android.content.res.Resources.NotFoundException;
    method public deprecated android.graphics.drawable.Drawable getDrawableForDensity(int, int) throws android.content.res.Resources.NotFoundException;
    method public android.graphics.drawable.Drawable getDrawableForDensity(int, int, android.content.res.Resources.Theme);
    method public float getFraction(int, int, int);
    method public int getIdentifier(java.lang.String, java.lang.String, java.lang.String);
    method public int[] getIntArray(int) throws android.content.res.Resources.NotFoundException;
    method public int getInteger(int) throws android.content.res.Resources.NotFoundException;
    method public android.content.res.XmlResourceParser getLayout(int) throws android.content.res.Resources.NotFoundException;
    method public android.graphics.Movie getMovie(int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getQuantityString(int, int, java.lang.Object...) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getQuantityString(int, int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.CharSequence getQuantityText(int, int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getResourceEntryName(int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getResourceName(int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getResourcePackageName(int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getResourceTypeName(int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getString(int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String getString(int, java.lang.Object...) throws android.content.res.Resources.NotFoundException;
    method public java.lang.String[] getStringArray(int) throws android.content.res.Resources.NotFoundException;
    method public static android.content.res.Resources getSystem();
    method public java.lang.CharSequence getText(int) throws android.content.res.Resources.NotFoundException;
    method public java.lang.CharSequence getText(int, java.lang.CharSequence);
    method public java.lang.CharSequence[] getTextArray(int) throws android.content.res.Resources.NotFoundException;
    method public void getValue(int, android.util.TypedValue, boolean) throws android.content.res.Resources.NotFoundException;
    method public void getValue(java.lang.String, android.util.TypedValue, boolean) throws android.content.res.Resources.NotFoundException;
    method public void getValueForDensity(int, int, android.util.TypedValue, boolean) throws android.content.res.Resources.NotFoundException;
    method public android.content.res.XmlResourceParser getXml(int) throws android.content.res.Resources.NotFoundException;
    method public final android.content.res.Resources.Theme newTheme();
    method public android.content.res.TypedArray obtainAttributes(android.util.AttributeSet, int[]);
    method public android.content.res.TypedArray obtainTypedArray(int) throws android.content.res.Resources.NotFoundException;
    method public java.io.InputStream openRawResource(int) throws android.content.res.Resources.NotFoundException;
    method public java.io.InputStream openRawResource(int, android.util.TypedValue) throws android.content.res.Resources.NotFoundException;
    method public android.content.res.AssetFileDescriptor openRawResourceFd(int) throws android.content.res.Resources.NotFoundException;
    method public void parseBundleExtra(java.lang.String, android.util.AttributeSet, android.os.Bundle) throws org.xmlpull.v1.XmlPullParserException;
    method public void parseBundleExtras(android.content.res.XmlResourceParser, android.os.Bundle) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public void updateConfiguration(android.content.res.Configuration, android.util.DisplayMetrics);
  }

  public static class Resources.NotFoundException extends java.lang.RuntimeException {
    ctor public Resources.NotFoundException();
    ctor public Resources.NotFoundException(java.lang.String);
  }

  public final class Resources.Theme {
    method public void applyStyle(int, boolean);
    method public void dump(int, java.lang.String, java.lang.String);
    method public android.graphics.drawable.Drawable getDrawable(int) throws android.content.res.Resources.NotFoundException;
    method public android.content.res.Resources getResources();
    method public android.content.res.TypedArray obtainStyledAttributes(int[]);
    method public android.content.res.TypedArray obtainStyledAttributes(int, int[]) throws android.content.res.Resources.NotFoundException;
    method public android.content.res.TypedArray obtainStyledAttributes(android.util.AttributeSet, int[], int, int);
    method public boolean resolveAttribute(int, android.util.TypedValue, boolean);
    method public void setTo(android.content.res.Resources.Theme);
  }

  public class TypedArray {
    method public boolean getBoolean(int, boolean);
    method public int getChangingConfigurations();
    method public int getColor(int, int);
    method public android.content.res.ColorStateList getColorStateList(int);
    method public float getDimension(int, float);
    method public int getDimensionPixelOffset(int, int);
    method public int getDimensionPixelSize(int, int);
    method public android.graphics.drawable.Drawable getDrawable(int);
    method public float getFloat(int, float);
    method public float getFraction(int, int, int, float);
    method public int getIndex(int);
    method public int getIndexCount();
    method public int getInt(int, int);
    method public int getInteger(int, int);
    method public int getLayoutDimension(int, java.lang.String);
    method public int getLayoutDimension(int, int);
    method public java.lang.String getNonResourceString(int);
    method public java.lang.String getPositionDescription();
    method public int getResourceId(int, int);
    method public android.content.res.Resources getResources();
    method public java.lang.String getString(int);
    method public java.lang.CharSequence getText(int);
    method public java.lang.CharSequence[] getTextArray(int);
    method public int getType(int);
    method public boolean getValue(int, android.util.TypedValue);
    method public boolean hasValue(int);
    method public boolean hasValueOrEmpty(int);
    method public int length();
    method public android.util.TypedValue peekValue(int);
    method public void recycle();
  }

  public abstract interface XmlResourceParser implements android.util.AttributeSet java.lang.AutoCloseable org.xmlpull.v1.XmlPullParser {
    method public abstract void close();
  }

}

package android.database {

  public abstract class AbstractCursor implements android.database.CrossProcessCursor {
    ctor public AbstractCursor();
    method protected void checkPosition();
    method public void close();
    method public void copyStringToBuffer(int, android.database.CharArrayBuffer);
    method public void deactivate();
    method public void fillWindow(int, android.database.CursorWindow);
    method public byte[] getBlob(int);
    method public int getColumnCount();
    method public int getColumnIndex(java.lang.String);
    method public int getColumnIndexOrThrow(java.lang.String);
    method public java.lang.String getColumnName(int);
    method public abstract java.lang.String[] getColumnNames();
    method public abstract int getCount();
    method public abstract double getDouble(int);
    method public android.os.Bundle getExtras();
    method public abstract float getFloat(int);
    method public abstract int getInt(int);
    method public abstract long getLong(int);
    method public android.net.Uri getNotificationUri();
    method public final int getPosition();
    method public abstract short getShort(int);
    method public abstract java.lang.String getString(int);
    method public int getType(int);
    method protected deprecated java.lang.Object getUpdatedField(int);
    method public boolean getWantsAllOnMoveCalls();
    method public android.database.CursorWindow getWindow();
    method public final boolean isAfterLast();
    method public final boolean isBeforeFirst();
    method public boolean isClosed();
    method protected deprecated boolean isFieldUpdated(int);
    method public final boolean isFirst();
    method public final boolean isLast();
    method public abstract boolean isNull(int);
    method public final boolean move(int);
    method public final boolean moveToFirst();
    method public final boolean moveToLast();
    method public final boolean moveToNext();
    method public final boolean moveToPosition(int);
    method public final boolean moveToPrevious();
    method protected void onChange(boolean);
    method public boolean onMove(int, int);
    method public void registerContentObserver(android.database.ContentObserver);
    method public void registerDataSetObserver(android.database.DataSetObserver);
    method public boolean requery();
    method public android.os.Bundle respond(android.os.Bundle);
    method public void setExtras(android.os.Bundle);
    method public void setNotificationUri(android.content.ContentResolver, android.net.Uri);
    method public void unregisterContentObserver(android.database.ContentObserver);
    method public void unregisterDataSetObserver(android.database.DataSetObserver);
    field protected deprecated boolean mClosed;
    field protected deprecated android.content.ContentResolver mContentResolver;
    field protected deprecated int mPos;
  }

  protected static class AbstractCursor.SelfContentObserver extends android.database.ContentObserver {
    ctor public AbstractCursor.SelfContentObserver(android.database.AbstractCursor);
  }

  public abstract class AbstractWindowedCursor extends android.database.AbstractCursor {
    ctor public AbstractWindowedCursor();
    method public double getDouble(int);
    method public float getFloat(int);
    method public int getInt(int);
    method public long getLong(int);
    method public short getShort(int);
    method public java.lang.String getString(int);
    method public boolean hasWindow();
    method public deprecated boolean isBlob(int);
    method public deprecated boolean isFloat(int);
    method public deprecated boolean isLong(int);
    method public boolean isNull(int);
    method public deprecated boolean isString(int);
    method public void setWindow(android.database.CursorWindow);
    field protected android.database.CursorWindow mWindow;
  }

  public final class CharArrayBuffer {
    ctor public CharArrayBuffer(int);
    ctor public CharArrayBuffer(char[]);
    field public char[] data;
    field public int sizeCopied;
  }

  public class ContentObservable extends android.database.Observable {
    ctor public ContentObservable();
    method public deprecated void dispatchChange(boolean);
    method public void dispatchChange(boolean, android.net.Uri);
    method public deprecated void notifyChange(boolean);
    method public void registerObserver(android.database.ContentObserver);
  }

  public abstract class ContentObserver {
    ctor public ContentObserver(android.os.Handler);
    method public boolean deliverSelfNotifications();
    method public final deprecated void dispatchChange(boolean);
    method public final void dispatchChange(boolean, android.net.Uri);
    method public void onChange(boolean);
    method public void onChange(boolean, android.net.Uri);
  }

  public abstract interface CrossProcessCursor implements android.database.Cursor {
    method public abstract void fillWindow(int, android.database.CursorWindow);
    method public abstract android.database.CursorWindow getWindow();
    method public abstract boolean onMove(int, int);
  }

  public class CrossProcessCursorWrapper extends android.database.CursorWrapper implements android.database.CrossProcessCursor {
    ctor public CrossProcessCursorWrapper(android.database.Cursor);
    method public void fillWindow(int, android.database.CursorWindow);
    method public android.database.CursorWindow getWindow();
    method public boolean onMove(int, int);
  }

  public abstract interface Cursor implements java.io.Closeable {
    method public abstract void close();
    method public abstract void copyStringToBuffer(int, android.database.CharArrayBuffer);
    method public abstract deprecated void deactivate();
    method public abstract byte[] getBlob(int);
    method public abstract int getColumnCount();
    method public abstract int getColumnIndex(java.lang.String);
    method public abstract int getColumnIndexOrThrow(java.lang.String) throws java.lang.IllegalArgumentException;
    method public abstract java.lang.String getColumnName(int);
    method public abstract java.lang.String[] getColumnNames();
    method public abstract int getCount();
    method public abstract double getDouble(int);
    method public abstract android.os.Bundle getExtras();
    method public abstract float getFloat(int);
    method public abstract int getInt(int);
    method public abstract long getLong(int);
    method public abstract android.net.Uri getNotificationUri();
    method public abstract int getPosition();
    method public abstract short getShort(int);
    method public abstract java.lang.String getString(int);
    method public abstract int getType(int);
    method public abstract boolean getWantsAllOnMoveCalls();
    method public abstract boolean isAfterLast();
    method public abstract boolean isBeforeFirst();
    method public abstract boolean isClosed();
    method public abstract boolean isFirst();
    method public abstract boolean isLast();
    method public abstract boolean isNull(int);
    method public abstract boolean move(int);
    method public abstract boolean moveToFirst();
    method public abstract boolean moveToLast();
    method public abstract boolean moveToNext();
    method public abstract boolean moveToPosition(int);
    method public abstract boolean moveToPrevious();
    method public abstract void registerContentObserver(android.database.ContentObserver);
    method public abstract void registerDataSetObserver(android.database.DataSetObserver);
    method public abstract deprecated boolean requery();
    method public abstract android.os.Bundle respond(android.os.Bundle);
    method public abstract void setExtras(android.os.Bundle);
    method public abstract void setNotificationUri(android.content.ContentResolver, android.net.Uri);
    method public abstract void unregisterContentObserver(android.database.ContentObserver);
    method public abstract void unregisterDataSetObserver(android.database.DataSetObserver);
    field public static final int FIELD_TYPE_BLOB = 4; // 0x4
    field public static final int FIELD_TYPE_FLOAT = 2; // 0x2
    field public static final int FIELD_TYPE_INTEGER = 1; // 0x1
    field public static final int FIELD_TYPE_NULL = 0; // 0x0
    field public static final int FIELD_TYPE_STRING = 3; // 0x3
  }

  public class CursorIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
    ctor public CursorIndexOutOfBoundsException(int, int);
    ctor public CursorIndexOutOfBoundsException(java.lang.String);
  }

  public final class CursorJoiner implements java.lang.Iterable java.util.Iterator {
    ctor public CursorJoiner(android.database.Cursor, java.lang.String[], android.database.Cursor, java.lang.String[]);
    method public boolean hasNext();
    method public java.util.Iterator<android.database.CursorJoiner.Result> iterator();
    method public android.database.CursorJoiner.Result next();
    method public void remove();
  }

  public static final class CursorJoiner.Result extends java.lang.Enum {
    method public static android.database.CursorJoiner.Result valueOf(java.lang.String);
    method public static final android.database.CursorJoiner.Result[] values();
    enum_constant public static final android.database.CursorJoiner.Result BOTH;
    enum_constant public static final android.database.CursorJoiner.Result LEFT;
    enum_constant public static final android.database.CursorJoiner.Result RIGHT;
  }

  public class CursorWindow extends android.database.sqlite.SQLiteClosable implements android.os.Parcelable {
    ctor public CursorWindow(java.lang.String);
    ctor public deprecated CursorWindow(boolean);
    method public boolean allocRow();
    method public void clear();
    method public void copyStringToBuffer(int, int, android.database.CharArrayBuffer);
    method public int describeContents();
    method public void freeLastRow();
    method public byte[] getBlob(int, int);
    method public double getDouble(int, int);
    method public float getFloat(int, int);
    method public int getInt(int, int);
    method public long getLong(int, int);
    method public int getNumRows();
    method public short getShort(int, int);
    method public int getStartPosition();
    method public java.lang.String getString(int, int);
    method public int getType(int, int);
    method public deprecated boolean isBlob(int, int);
    method public deprecated boolean isFloat(int, int);
    method public deprecated boolean isLong(int, int);
    method public deprecated boolean isNull(int, int);
    method public deprecated boolean isString(int, int);
    method public static android.database.CursorWindow newFromParcel(android.os.Parcel);
    method protected void onAllReferencesReleased();
    method public boolean putBlob(byte[], int, int);
    method public boolean putDouble(double, int, int);
    method public boolean putLong(long, int, int);
    method public boolean putNull(int, int);
    method public boolean putString(java.lang.String, int, int);
    method public boolean setNumColumns(int);
    method public void setStartPosition(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.database.CursorWindow> CREATOR;
  }

  public class CursorWrapper implements android.database.Cursor {
    ctor public CursorWrapper(android.database.Cursor);
    method public void close();
    method public void copyStringToBuffer(int, android.database.CharArrayBuffer);
    method public deprecated void deactivate();
    method public byte[] getBlob(int);
    method public int getColumnCount();
    method public int getColumnIndex(java.lang.String);
    method public int getColumnIndexOrThrow(java.lang.String) throws java.lang.IllegalArgumentException;
    method public java.lang.String getColumnName(int);
    method public java.lang.String[] getColumnNames();
    method public int getCount();
    method public double getDouble(int);
    method public android.os.Bundle getExtras();
    method public float getFloat(int);
    method public int getInt(int);
    method public long getLong(int);
    method public android.net.Uri getNotificationUri();
    method public int getPosition();
    method public short getShort(int);
    method public java.lang.String getString(int);
    method public int getType(int);
    method public boolean getWantsAllOnMoveCalls();
    method public android.database.Cursor getWrappedCursor();
    method public boolean isAfterLast();
    method public boolean isBeforeFirst();
    method public boolean isClosed();
    method public boolean isFirst();
    method public boolean isLast();
    method public boolean isNull(int);
    method public boolean move(int);
    method public boolean moveToFirst();
    method public boolean moveToLast();
    method public boolean moveToNext();
    method public boolean moveToPosition(int);
    method public boolean moveToPrevious();
    method public void registerContentObserver(android.database.ContentObserver);
    method public void registerDataSetObserver(android.database.DataSetObserver);
    method public deprecated boolean requery();
    method public android.os.Bundle respond(android.os.Bundle);
    method public void setExtras(android.os.Bundle);
    method public void setNotificationUri(android.content.ContentResolver, android.net.Uri);
    method public void unregisterContentObserver(android.database.ContentObserver);
    method public void unregisterDataSetObserver(android.database.DataSetObserver);
  }

  public class DataSetObservable extends android.database.Observable {
    ctor public DataSetObservable();
    method public void notifyChanged();
    method public void notifyInvalidated();
  }

  public abstract class DataSetObserver {
    ctor public DataSetObserver();
    method public void onChanged();
    method public void onInvalidated();
  }

  public abstract interface DatabaseErrorHandler {
    method public abstract void onCorruption(android.database.sqlite.SQLiteDatabase);
  }

  public class DatabaseUtils {
    ctor public DatabaseUtils();
    method public static void appendEscapedSQLString(java.lang.StringBuilder, java.lang.String);
    method public static java.lang.String[] appendSelectionArgs(java.lang.String[], java.lang.String[]);
    method public static final void appendValueToSql(java.lang.StringBuilder, java.lang.Object);
    method public static void bindObjectToProgram(android.database.sqlite.SQLiteProgram, int, java.lang.Object);
    method public static android.os.ParcelFileDescriptor blobFileDescriptorForQuery(android.database.sqlite.SQLiteDatabase, java.lang.String, java.lang.String[]);
    method public static android.os.ParcelFileDescriptor blobFileDescriptorForQuery(android.database.sqlite.SQLiteStatement, java.lang.String[]);
    method public static java.lang.String concatenateWhere(java.lang.String, java.lang.String);
    method public static void createDbFromSqlStatements(android.content.Context, java.lang.String, int, java.lang.String);
    method public static void cursorDoubleToContentValues(android.database.Cursor, java.lang.String, android.content.ContentValues, java.lang.String);
    method public static void cursorDoubleToContentValuesIfPresent(android.database.Cursor, android.content.ContentValues, java.lang.String);
    method public static void cursorDoubleToCursorValues(android.database.Cursor, java.lang.String, android.content.ContentValues);
    method public static void cursorFloatToContentValuesIfPresent(android.database.Cursor, android.content.ContentValues, java.lang.String);
    method public static void cursorIntToContentValues(android.database.Cursor, java.lang.String, android.content.ContentValues);
    method public static void cursorIntToContentValues(android.database.Cursor, java.lang.String, android.content.ContentValues, java.lang.String);
    method public static void cursorIntToContentValuesIfPresent(android.database.Cursor, android.content.ContentValues, java.lang.String);
    method public static void cursorLongToContentValues(android.database.Cursor, java.lang.String, android.content.ContentValues);
    method public static void cursorLongToContentValues(android.database.Cursor, java.lang.String, android.content.ContentValues, java.lang.String);
    method public static void cursorLongToContentValuesIfPresent(android.database.Cursor, android.content.ContentValues, java.lang.String);
    method public static void cursorRowToContentValues(android.database.Cursor, android.content.ContentValues);
    method public static void cursorShortToContentValuesIfPresent(android.database.Cursor, android.content.ContentValues, java.lang.String);
    method public static void cursorStringToContentValues(android.database.Cursor, java.lang.String, android.content.ContentValues);
    method public static void cursorStringToContentValues(android.database.Cursor, java.lang.String, android.content.ContentValues, java.lang.String);
    method public static void cursorStringToContentValuesIfPresent(android.database.Cursor, android.content.ContentValues, java.lang.String);
    method public static void cursorStringToInsertHelper(android.database.Cursor, java.lang.String, android.database.DatabaseUtils.InsertHelper, int);
    method public static void dumpCurrentRow(android.database.Cursor);
    method public static void dumpCurrentRow(android.database.Cursor, java.io.PrintStream);
    method public static void dumpCurrentRow(android.database.Cursor, java.lang.StringBuilder);
    method public static java.lang.String dumpCurrentRowToString(android.database.Cursor);
    method public static void dumpCursor(android.database.Cursor);
    method public static void dumpCursor(android.database.Cursor, java.io.PrintStream);
    method public static void dumpCursor(android.database.Cursor, java.lang.StringBuilder);
    method public static java.lang.String dumpCursorToString(android.database.Cursor);
    method public static java.lang.String getCollationKey(java.lang.String);
    method public static java.lang.String getHexCollationKey(java.lang.String);
    method public static int getSqlStatementType(java.lang.String);
    method public static long longForQuery(android.database.sqlite.SQLiteDatabase, java.lang.String, java.lang.String[]);
    method public static long longForQuery(android.database.sqlite.SQLiteStatement, java.lang.String[]);
    method public static long queryNumEntries(android.database.sqlite.SQLiteDatabase, java.lang.String);
    method public static long queryNumEntries(android.database.sqlite.SQLiteDatabase, java.lang.String, java.lang.String);
    method public static long queryNumEntries(android.database.sqlite.SQLiteDatabase, java.lang.String, java.lang.String, java.lang.String[]);
    method public static final void readExceptionFromParcel(android.os.Parcel);
    method public static void readExceptionWithFileNotFoundExceptionFromParcel(android.os.Parcel) throws java.io.FileNotFoundException;
    method public static void readExceptionWithOperationApplicationExceptionFromParcel(android.os.Parcel) throws android.content.OperationApplicationException;
    method public static java.lang.String sqlEscapeString(java.lang.String);
    method public static java.lang.String stringForQuery(android.database.sqlite.SQLiteDatabase, java.lang.String, java.lang.String[]);
    method public static java.lang.String stringForQuery(android.database.sqlite.SQLiteStatement, java.lang.String[]);
    method public static final void writeExceptionToParcel(android.os.Parcel, java.lang.Exception);
    field public static final int STATEMENT_ABORT = 6; // 0x6
    field public static final int STATEMENT_ATTACH = 3; // 0x3
    field public static final int STATEMENT_BEGIN = 4; // 0x4
    field public static final int STATEMENT_COMMIT = 5; // 0x5
    field public static final int STATEMENT_DDL = 8; // 0x8
    field public static final int STATEMENT_OTHER = 99; // 0x63
    field public static final int STATEMENT_PRAGMA = 7; // 0x7
    field public static final int STATEMENT_SELECT = 1; // 0x1
    field public static final int STATEMENT_UNPREPARED = 9; // 0x9
    field public static final int STATEMENT_UPDATE = 2; // 0x2
  }

  public static deprecated class DatabaseUtils.InsertHelper {
    ctor public DatabaseUtils.InsertHelper(android.database.sqlite.SQLiteDatabase, java.lang.String);
    method public void bind(int, double);
    method public void bind(int, float);
    method public void bind(int, long);
    method public void bind(int, int);
    method public void bind(int, boolean);
    method public void bind(int, byte[]);
    method public void bind(int, java.lang.String);
    method public void bindNull(int);
    method public void close();
    method public long execute();
    method public int getColumnIndex(java.lang.String);
    method public long insert(android.content.ContentValues);
    method public void prepareForInsert();
    method public void prepareForReplace();
    method public long replace(android.content.ContentValues);
  }

  public final class DefaultDatabaseErrorHandler implements android.database.DatabaseErrorHandler {
    ctor public DefaultDatabaseErrorHandler();
    method public void onCorruption(android.database.sqlite.SQLiteDatabase);
  }

  public class MatrixCursor extends android.database.AbstractCursor {
    ctor public MatrixCursor(java.lang.String[], int);
    ctor public MatrixCursor(java.lang.String[]);
    method public void addRow(java.lang.Object[]);
    method public void addRow(java.lang.Iterable<?>);
    method public java.lang.String[] getColumnNames();
    method public int getCount();
    method public double getDouble(int);
    method public float getFloat(int);
    method public int getInt(int);
    method public long getLong(int);
    method public short getShort(int);
    method public java.lang.String getString(int);
    method public boolean isNull(int);
    method public android.database.MatrixCursor.RowBuilder newRow();
  }

  public class MatrixCursor.RowBuilder {
    method public android.database.MatrixCursor.RowBuilder add(java.lang.Object);
    method public android.database.MatrixCursor.RowBuilder add(java.lang.String, java.lang.Object);
  }

  public class MergeCursor extends android.database.AbstractCursor {
    ctor public MergeCursor(android.database.Cursor[]);
    method public java.lang.String[] getColumnNames();
    method public int getCount();
    method public double getDouble(int);
    method public float getFloat(int);
    method public int getInt(int);
    method public long getLong(int);
    method public short getShort(int);
    method public java.lang.String getString(int);
    method public boolean isNull(int);
  }

  public abstract class Observable {
    ctor public Observable();
    method public void registerObserver(T);
    method public void unregisterAll();
    method public void unregisterObserver(T);
    field protected final java.util.ArrayList<T> mObservers;
  }

  public class SQLException extends java.lang.RuntimeException {
    ctor public SQLException();
    ctor public SQLException(java.lang.String);
    ctor public SQLException(java.lang.String, java.lang.Throwable);
  }

  public class StaleDataException extends java.lang.RuntimeException {
    ctor public StaleDataException();
    ctor public StaleDataException(java.lang.String);
  }

}

package android.database.sqlite {

  public class SQLiteAbortException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteAbortException();
    ctor public SQLiteAbortException(java.lang.String);
  }

  public class SQLiteAccessPermException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteAccessPermException();
    ctor public SQLiteAccessPermException(java.lang.String);
  }

  public class SQLiteBindOrColumnIndexOutOfRangeException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteBindOrColumnIndexOutOfRangeException();
    ctor public SQLiteBindOrColumnIndexOutOfRangeException(java.lang.String);
  }

  public class SQLiteBlobTooBigException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteBlobTooBigException();
    ctor public SQLiteBlobTooBigException(java.lang.String);
  }

  public class SQLiteCantOpenDatabaseException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteCantOpenDatabaseException();
    ctor public SQLiteCantOpenDatabaseException(java.lang.String);
  }

  public abstract class SQLiteClosable implements java.io.Closeable {
    ctor public SQLiteClosable();
    method public void acquireReference();
    method public void close();
    method protected abstract void onAllReferencesReleased();
    method protected deprecated void onAllReferencesReleasedFromContainer();
    method public void releaseReference();
    method public deprecated void releaseReferenceFromContainer();
  }

  public class SQLiteConstraintException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteConstraintException();
    ctor public SQLiteConstraintException(java.lang.String);
  }

  public class SQLiteCursor extends android.database.AbstractWindowedCursor {
    ctor public deprecated SQLiteCursor(android.database.sqlite.SQLiteDatabase, android.database.sqlite.SQLiteCursorDriver, java.lang.String, android.database.sqlite.SQLiteQuery);
    ctor public SQLiteCursor(android.database.sqlite.SQLiteCursorDriver, java.lang.String, android.database.sqlite.SQLiteQuery);
    method public java.lang.String[] getColumnNames();
    method public int getCount();
    method public android.database.sqlite.SQLiteDatabase getDatabase();
    method public void setSelectionArguments(java.lang.String[]);
  }

  public abstract interface SQLiteCursorDriver {
    method public abstract void cursorClosed();
    method public abstract void cursorDeactivated();
    method public abstract void cursorRequeried(android.database.Cursor);
    method public abstract android.database.Cursor query(android.database.sqlite.SQLiteDatabase.CursorFactory, java.lang.String[]);
    method public abstract void setBindArguments(java.lang.String[]);
  }

  public final class SQLiteDatabase extends android.database.sqlite.SQLiteClosable {
    method public void beginTransaction();
    method public void beginTransactionNonExclusive();
    method public void beginTransactionWithListener(android.database.sqlite.SQLiteTransactionListener);
    method public void beginTransactionWithListenerNonExclusive(android.database.sqlite.SQLiteTransactionListener);
    method public android.database.sqlite.SQLiteStatement compileStatement(java.lang.String) throws android.database.SQLException;
    method public static android.database.sqlite.SQLiteDatabase create(android.database.sqlite.SQLiteDatabase.CursorFactory);
    method public int delete(java.lang.String, java.lang.String, java.lang.String[]);
    method public static boolean deleteDatabase(java.io.File);
    method public void disableWriteAheadLogging();
    method public boolean enableWriteAheadLogging();
    method public void endTransaction();
    method public void execSQL(java.lang.String) throws android.database.SQLException;
    method public void execSQL(java.lang.String, java.lang.Object[]) throws android.database.SQLException;
    method public static java.lang.String findEditTable(java.lang.String);
    method public java.util.List<android.util.Pair<java.lang.String, java.lang.String>> getAttachedDbs();
    method public long getMaximumSize();
    method public long getPageSize();
    method public final java.lang.String getPath();
    method public deprecated java.util.Map<java.lang.String, java.lang.String> getSyncedTables();
    method public int getVersion();
    method public boolean inTransaction();
    method public long insert(java.lang.String, java.lang.String, android.content.ContentValues);
    method public long insertOrThrow(java.lang.String, java.lang.String, android.content.ContentValues) throws android.database.SQLException;
    method public long insertWithOnConflict(java.lang.String, java.lang.String, android.content.ContentValues, int);
    method public boolean isDatabaseIntegrityOk();
    method public boolean isDbLockedByCurrentThread();
    method public deprecated boolean isDbLockedByOtherThreads();
    method public boolean isOpen();
    method public boolean isReadOnly();
    method public boolean isWriteAheadLoggingEnabled();
    method public deprecated void markTableSyncable(java.lang.String, java.lang.String);
    method public deprecated void markTableSyncable(java.lang.String, java.lang.String, java.lang.String);
    method public boolean needUpgrade(int);
    method protected void onAllReferencesReleased();
    method public static android.database.sqlite.SQLiteDatabase openDatabase(java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int);
    method public static android.database.sqlite.SQLiteDatabase openDatabase(java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int, android.database.DatabaseErrorHandler);
    method public static android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.io.File, android.database.sqlite.SQLiteDatabase.CursorFactory);
    method public static android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory);
    method public static android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler);
    method public android.database.Cursor query(boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public android.database.Cursor query(boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, android.os.CancellationSignal);
    method public android.database.Cursor query(java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String);
    method public android.database.Cursor query(java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public android.database.Cursor queryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public android.database.Cursor queryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, android.os.CancellationSignal);
    method public android.database.Cursor rawQuery(java.lang.String, java.lang.String[]);
    method public android.database.Cursor rawQuery(java.lang.String, java.lang.String[], android.os.CancellationSignal);
    method public android.database.Cursor rawQueryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, java.lang.String, java.lang.String[], java.lang.String);
    method public android.database.Cursor rawQueryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal);
    method public static int releaseMemory();
    method public long replace(java.lang.String, java.lang.String, android.content.ContentValues);
    method public long replaceOrThrow(java.lang.String, java.lang.String, android.content.ContentValues) throws android.database.SQLException;
    method public void setForeignKeyConstraintsEnabled(boolean);
    method public void setLocale(java.util.Locale);
    method public deprecated void setLockingEnabled(boolean);
    method public void setMaxSqlCacheSize(int);
    method public long setMaximumSize(long);
    method public void setPageSize(long);
    method public void setTransactionSuccessful();
    method public void setVersion(int);
    method public int update(java.lang.String, android.content.ContentValues, java.lang.String, java.lang.String[]);
    method public int updateWithOnConflict(java.lang.String, android.content.ContentValues, java.lang.String, java.lang.String[], int);
    method public deprecated boolean yieldIfContended();
    method public boolean yieldIfContendedSafely();
    method public boolean yieldIfContendedSafely(long);
    field public static final int CONFLICT_ABORT = 2; // 0x2
    field public static final int CONFLICT_FAIL = 3; // 0x3
    field public static final int CONFLICT_IGNORE = 4; // 0x4
    field public static final int CONFLICT_NONE = 0; // 0x0
    field public static final int CONFLICT_REPLACE = 5; // 0x5
    field public static final int CONFLICT_ROLLBACK = 1; // 0x1
    field public static final int CREATE_IF_NECESSARY = 268435456; // 0x10000000
    field public static final int ENABLE_WRITE_AHEAD_LOGGING = 536870912; // 0x20000000
    field public static final int MAX_SQL_CACHE_SIZE = 100; // 0x64
    field public static final int NO_LOCALIZED_COLLATORS = 16; // 0x10
    field public static final int OPEN_READONLY = 1; // 0x1
    field public static final int OPEN_READWRITE = 0; // 0x0
    field public static final int SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000; // 0xc350
  }

  public static abstract interface SQLiteDatabase.CursorFactory {
    method public abstract android.database.Cursor newCursor(android.database.sqlite.SQLiteDatabase, android.database.sqlite.SQLiteCursorDriver, java.lang.String, android.database.sqlite.SQLiteQuery);
  }

  public class SQLiteDatabaseCorruptException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteDatabaseCorruptException();
    ctor public SQLiteDatabaseCorruptException(java.lang.String);
  }

  public class SQLiteDatabaseLockedException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteDatabaseLockedException();
    ctor public SQLiteDatabaseLockedException(java.lang.String);
  }

  public class SQLiteDatatypeMismatchException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteDatatypeMismatchException();
    ctor public SQLiteDatatypeMismatchException(java.lang.String);
  }

  public class SQLiteDiskIOException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteDiskIOException();
    ctor public SQLiteDiskIOException(java.lang.String);
  }

  public class SQLiteDoneException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteDoneException();
    ctor public SQLiteDoneException(java.lang.String);
  }

  public class SQLiteException extends android.database.SQLException {
    ctor public SQLiteException();
    ctor public SQLiteException(java.lang.String);
    ctor public SQLiteException(java.lang.String, java.lang.Throwable);
  }

  public class SQLiteFullException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteFullException();
    ctor public SQLiteFullException(java.lang.String);
  }

  public class SQLiteMisuseException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteMisuseException();
    ctor public SQLiteMisuseException(java.lang.String);
  }

  public abstract class SQLiteOpenHelper {
    ctor public SQLiteOpenHelper(android.content.Context, java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int);
    ctor public SQLiteOpenHelper(android.content.Context, java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int, android.database.DatabaseErrorHandler);
    method public synchronized void close();
    method public java.lang.String getDatabaseName();
    method public android.database.sqlite.SQLiteDatabase getReadableDatabase();
    method public android.database.sqlite.SQLiteDatabase getWritableDatabase();
    method public void onConfigure(android.database.sqlite.SQLiteDatabase);
    method public abstract void onCreate(android.database.sqlite.SQLiteDatabase);
    method public void onDowngrade(android.database.sqlite.SQLiteDatabase, int, int);
    method public void onOpen(android.database.sqlite.SQLiteDatabase);
    method public abstract void onUpgrade(android.database.sqlite.SQLiteDatabase, int, int);
    method public void setWriteAheadLoggingEnabled(boolean);
  }

  public class SQLiteOutOfMemoryException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteOutOfMemoryException();
    ctor public SQLiteOutOfMemoryException(java.lang.String);
  }

  public abstract class SQLiteProgram extends android.database.sqlite.SQLiteClosable {
    method public void bindAllArgsAsStrings(java.lang.String[]);
    method public void bindBlob(int, byte[]);
    method public void bindDouble(int, double);
    method public void bindLong(int, long);
    method public void bindNull(int);
    method public void bindString(int, java.lang.String);
    method public void clearBindings();
    method public final deprecated int getUniqueId();
    method protected void onAllReferencesReleased();
  }

  public final class SQLiteQuery extends android.database.sqlite.SQLiteProgram {
  }

  public class SQLiteQueryBuilder {
    ctor public SQLiteQueryBuilder();
    method public static void appendColumns(java.lang.StringBuilder, java.lang.String[]);
    method public void appendWhere(java.lang.CharSequence);
    method public void appendWhereEscapeString(java.lang.String);
    method public java.lang.String buildQuery(java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public deprecated java.lang.String buildQuery(java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public static java.lang.String buildQueryString(boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public java.lang.String buildUnionQuery(java.lang.String[], java.lang.String, java.lang.String);
    method public java.lang.String buildUnionSubQuery(java.lang.String, java.lang.String[], java.util.Set<java.lang.String>, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public deprecated java.lang.String buildUnionSubQuery(java.lang.String, java.lang.String[], java.util.Set<java.lang.String>, int, java.lang.String, java.lang.String, java.lang.String[], java.lang.String, java.lang.String);
    method public java.lang.String getTables();
    method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String);
    method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, android.os.CancellationSignal);
    method public void setCursorFactory(android.database.sqlite.SQLiteDatabase.CursorFactory);
    method public void setDistinct(boolean);
    method public void setProjectionMap(java.util.Map<java.lang.String, java.lang.String>);
    method public void setStrict(boolean);
    method public void setTables(java.lang.String);
  }

  public class SQLiteReadOnlyDatabaseException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteReadOnlyDatabaseException();
    ctor public SQLiteReadOnlyDatabaseException(java.lang.String);
  }

  public final class SQLiteStatement extends android.database.sqlite.SQLiteProgram {
    method public void execute();
    method public long executeInsert();
    method public int executeUpdateDelete();
    method public android.os.ParcelFileDescriptor simpleQueryForBlobFileDescriptor();
    method public long simpleQueryForLong();
    method public java.lang.String simpleQueryForString();
  }

  public class SQLiteTableLockedException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteTableLockedException();
    ctor public SQLiteTableLockedException(java.lang.String);
  }

  public abstract interface SQLiteTransactionListener {
    method public abstract void onBegin();
    method public abstract void onCommit();
    method public abstract void onRollback();
  }

}

package android.drm {

  public class DrmConvertedStatus {
    ctor public DrmConvertedStatus(int, byte[], int);
    field public static final int STATUS_ERROR = 3; // 0x3
    field public static final int STATUS_INPUTDATA_ERROR = 2; // 0x2
    field public static final int STATUS_OK = 1; // 0x1
    field public final byte[] convertedData;
    field public final int offset;
    field public final int statusCode;
  }

  public class DrmErrorEvent extends android.drm.DrmEvent {
    ctor public DrmErrorEvent(int, int, java.lang.String);
    ctor public DrmErrorEvent(int, int, java.lang.String, java.util.HashMap<java.lang.String, java.lang.Object>);
    field public static final int TYPE_ACQUIRE_DRM_INFO_FAILED = 2008; // 0x7d8
    field public static final int TYPE_NOT_SUPPORTED = 2003; // 0x7d3
    field public static final int TYPE_NO_INTERNET_CONNECTION = 2005; // 0x7d5
    field public static final int TYPE_OUT_OF_MEMORY = 2004; // 0x7d4
    field public static final int TYPE_PROCESS_DRM_INFO_FAILED = 2006; // 0x7d6
    field public static final int TYPE_REMOVE_ALL_RIGHTS_FAILED = 2007; // 0x7d7
    field public static final int TYPE_RIGHTS_NOT_INSTALLED = 2001; // 0x7d1
    field public static final int TYPE_RIGHTS_RENEWAL_NOT_ALLOWED = 2002; // 0x7d2
  }

  public class DrmEvent {
    ctor protected DrmEvent(int, int, java.lang.String, java.util.HashMap<java.lang.String, java.lang.Object>);
    ctor protected DrmEvent(int, int, java.lang.String);
    method public java.lang.Object getAttribute(java.lang.String);
    method public java.lang.String getMessage();
    method public int getType();
    method public int getUniqueId();
    field public static final java.lang.String DRM_INFO_OBJECT = "drm_info_object";
    field public static final java.lang.String DRM_INFO_STATUS_OBJECT = "drm_info_status_object";
    field public static final int TYPE_ALL_RIGHTS_REMOVED = 1001; // 0x3e9
    field public static final int TYPE_DRM_INFO_PROCESSED = 1002; // 0x3ea
  }

  public class DrmInfo {
    ctor public DrmInfo(int, byte[], java.lang.String);
    ctor public DrmInfo(int, java.lang.String, java.lang.String);
    method public java.lang.Object get(java.lang.String);
    method public byte[] getData();
    method public int getInfoType();
    method public java.lang.String getMimeType();
    method public java.util.Iterator<java.lang.Object> iterator();
    method public java.util.Iterator<java.lang.String> keyIterator();
    method public void put(java.lang.String, java.lang.Object);
  }

  public class DrmInfoEvent extends android.drm.DrmEvent {
    ctor public DrmInfoEvent(int, int, java.lang.String);
    ctor public DrmInfoEvent(int, int, java.lang.String, java.util.HashMap<java.lang.String, java.lang.Object>);
    field public static final int TYPE_ACCOUNT_ALREADY_REGISTERED = 5; // 0x5
    field public static final int TYPE_ALREADY_REGISTERED_BY_ANOTHER_ACCOUNT = 1; // 0x1
    field public static final int TYPE_REMOVE_RIGHTS = 2; // 0x2
    field public static final int TYPE_RIGHTS_INSTALLED = 3; // 0x3
    field public static final int TYPE_RIGHTS_REMOVED = 6; // 0x6
    field public static final int TYPE_WAIT_FOR_RIGHTS = 4; // 0x4
  }

  public class DrmInfoRequest {
    ctor public DrmInfoRequest(int, java.lang.String);
    method public java.lang.Object get(java.lang.String);
    method public int getInfoType();
    method public java.lang.String getMimeType();
    method public java.util.Iterator<java.lang.Object> iterator();
    method public java.util.Iterator<java.lang.String> keyIterator();
    method public void put(java.lang.String, java.lang.Object);
    field public static final java.lang.String ACCOUNT_ID = "account_id";
    field public static final java.lang.String SUBSCRIPTION_ID = "subscription_id";
    field public static final int TYPE_REGISTRATION_INFO = 1; // 0x1
    field public static final int TYPE_RIGHTS_ACQUISITION_INFO = 3; // 0x3
    field public static final int TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO = 4; // 0x4
    field public static final int TYPE_UNREGISTRATION_INFO = 2; // 0x2
  }

  public class DrmInfoStatus {
    ctor public DrmInfoStatus(int, int, android.drm.ProcessedData, java.lang.String);
    field public static final int STATUS_ERROR = 2; // 0x2
    field public static final int STATUS_OK = 1; // 0x1
    field public final android.drm.ProcessedData data;
    field public final int infoType;
    field public final java.lang.String mimeType;
    field public final int statusCode;
  }

  public class DrmManagerClient {
    ctor public DrmManagerClient(android.content.Context);
    method public android.drm.DrmInfo acquireDrmInfo(android.drm.DrmInfoRequest);
    method public int acquireRights(android.drm.DrmInfoRequest);
    method public boolean canHandle(java.lang.String, java.lang.String);
    method public boolean canHandle(android.net.Uri, java.lang.String);
    method public int checkRightsStatus(java.lang.String);
    method public int checkRightsStatus(android.net.Uri);
    method public int checkRightsStatus(java.lang.String, int);
    method public int checkRightsStatus(android.net.Uri, int);
    method public android.drm.DrmConvertedStatus closeConvertSession(int);
    method public android.drm.DrmConvertedStatus convertData(int, byte[]);
    method public java.lang.String[] getAvailableDrmEngines();
    method public android.content.ContentValues getConstraints(java.lang.String, int);
    method public android.content.ContentValues getConstraints(android.net.Uri, int);
    method public int getDrmObjectType(java.lang.String, java.lang.String);
    method public int getDrmObjectType(android.net.Uri, java.lang.String);
    method public android.content.ContentValues getMetadata(java.lang.String);
    method public android.content.ContentValues getMetadata(android.net.Uri);
    method public java.lang.String getOriginalMimeType(java.lang.String);
    method public java.lang.String getOriginalMimeType(android.net.Uri);
    method public int openConvertSession(java.lang.String);
    method public int processDrmInfo(android.drm.DrmInfo);
    method public void release();
    method public int removeAllRights();
    method public int removeRights(java.lang.String);
    method public int removeRights(android.net.Uri);
    method public int saveRights(android.drm.DrmRights, java.lang.String, java.lang.String) throws java.io.IOException;
    method public synchronized void setOnErrorListener(android.drm.DrmManagerClient.OnErrorListener);
    method public synchronized void setOnEventListener(android.drm.DrmManagerClient.OnEventListener);
    method public synchronized void setOnInfoListener(android.drm.DrmManagerClient.OnInfoListener);
    field public static final int ERROR_NONE = 0; // 0x0
    field public static final int ERROR_UNKNOWN = -2000; // 0xfffff830
  }

  public static abstract interface DrmManagerClient.OnErrorListener {
    method public abstract void onError(android.drm.DrmManagerClient, android.drm.DrmErrorEvent);
  }

  public static abstract interface DrmManagerClient.OnEventListener {
    method public abstract void onEvent(android.drm.DrmManagerClient, android.drm.DrmEvent);
  }

  public static abstract interface DrmManagerClient.OnInfoListener {
    method public abstract void onInfo(android.drm.DrmManagerClient, android.drm.DrmInfoEvent);
  }

  public class DrmRights {
    ctor public DrmRights(java.lang.String, java.lang.String);
    ctor public DrmRights(java.lang.String, java.lang.String, java.lang.String);
    ctor public DrmRights(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    ctor public DrmRights(java.io.File, java.lang.String);
    ctor public DrmRights(android.drm.ProcessedData, java.lang.String);
    method public java.lang.String getAccountId();
    method public byte[] getData();
    method public java.lang.String getMimeType();
    method public java.lang.String getSubscriptionId();
  }

  public class DrmStore {
    ctor public deprecated DrmStore();
  }

  public static class DrmStore.Action {
    ctor public deprecated DrmStore.Action();
    field public static final int DEFAULT = 0; // 0x0
    field public static final int DISPLAY = 7; // 0x7
    field public static final int EXECUTE = 6; // 0x6
    field public static final int OUTPUT = 4; // 0x4
    field public static final int PLAY = 1; // 0x1
    field public static final int PREVIEW = 5; // 0x5
    field public static final int RINGTONE = 2; // 0x2
    field public static final int TRANSFER = 3; // 0x3
  }

  public static abstract interface DrmStore.ConstraintsColumns {
    field public static final java.lang.String EXTENDED_METADATA = "extended_metadata";
    field public static final java.lang.String LICENSE_AVAILABLE_TIME = "license_available_time";
    field public static final java.lang.String LICENSE_EXPIRY_TIME = "license_expiry_time";
    field public static final java.lang.String LICENSE_START_TIME = "license_start_time";
    field public static final java.lang.String MAX_REPEAT_COUNT = "max_repeat_count";
    field public static final java.lang.String REMAINING_REPEAT_COUNT = "remaining_repeat_count";
  }

  public static class DrmStore.DrmObjectType {
    ctor public deprecated DrmStore.DrmObjectType();
    field public static final int CONTENT = 1; // 0x1
    field public static final int RIGHTS_OBJECT = 2; // 0x2
    field public static final int TRIGGER_OBJECT = 3; // 0x3
    field public static final int UNKNOWN = 0; // 0x0
  }

  public static class DrmStore.Playback {
    ctor public deprecated DrmStore.Playback();
    field public static final int PAUSE = 2; // 0x2
    field public static final int RESUME = 3; // 0x3
    field public static final int START = 0; // 0x0
    field public static final int STOP = 1; // 0x1
  }

  public static class DrmStore.RightsStatus {
    ctor public deprecated DrmStore.RightsStatus();
    field public static final int RIGHTS_EXPIRED = 2; // 0x2
    field public static final int RIGHTS_INVALID = 1; // 0x1
    field public static final int RIGHTS_NOT_ACQUIRED = 3; // 0x3
    field public static final int RIGHTS_VALID = 0; // 0x0
  }

  public class DrmSupportInfo {
    ctor public DrmSupportInfo();
    method public void addFileSuffix(java.lang.String);
    method public void addMimeType(java.lang.String);
    method public deprecated java.lang.String getDescriprition();
    method public java.lang.String getDescription();
    method public java.util.Iterator<java.lang.String> getFileSuffixIterator();
    method public java.util.Iterator<java.lang.String> getMimeTypeIterator();
    method public void setDescription(java.lang.String);
  }

  public class DrmUtils {
    ctor public DrmUtils();
    method public static android.drm.DrmUtils.ExtendedMetadataParser getExtendedMetadataParser(byte[]);
  }

  public static class DrmUtils.ExtendedMetadataParser {
    method public java.lang.String get(java.lang.String);
    method public java.util.Iterator<java.lang.String> iterator();
    method public java.util.Iterator<java.lang.String> keyIterator();
  }

  public class ProcessedData {
    method public java.lang.String getAccountId();
    method public byte[] getData();
    method public java.lang.String getSubscriptionId();
  }

}

package android.gesture {

  public class Gesture implements android.os.Parcelable {
    ctor public Gesture();
    method public void addStroke(android.gesture.GestureStroke);
    method public java.lang.Object clone();
    method public int describeContents();
    method public android.graphics.RectF getBoundingBox();
    method public long getID();
    method public float getLength();
    method public java.util.ArrayList<android.gesture.GestureStroke> getStrokes();
    method public int getStrokesCount();
    method public android.graphics.Bitmap toBitmap(int, int, int, int, int);
    method public android.graphics.Bitmap toBitmap(int, int, int, int);
    method public android.graphics.Path toPath();
    method public android.graphics.Path toPath(android.graphics.Path);
    method public android.graphics.Path toPath(int, int, int, int);
    method public android.graphics.Path toPath(android.graphics.Path, int, int, int, int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.gesture.Gesture> CREATOR;
  }

  public final class GestureLibraries {
    method public static android.gesture.GestureLibrary fromFile(java.lang.String);
    method public static android.gesture.GestureLibrary fromFile(java.io.File);
    method public static android.gesture.GestureLibrary fromPrivateFile(android.content.Context, java.lang.String);
    method public static android.gesture.GestureLibrary fromRawResource(android.content.Context, int);
  }

  public abstract class GestureLibrary {
    ctor protected GestureLibrary();
    method public void addGesture(java.lang.String, android.gesture.Gesture);
    method public java.util.Set<java.lang.String> getGestureEntries();
    method public java.util.ArrayList<android.gesture.Gesture> getGestures(java.lang.String);
    method public int getOrientationStyle();
    method public int getSequenceType();
    method public boolean isReadOnly();
    method public abstract boolean load();
    method public java.util.ArrayList<android.gesture.Prediction> recognize(android.gesture.Gesture);
    method public void removeEntry(java.lang.String);
    method public void removeGesture(java.lang.String, android.gesture.Gesture);
    method public abstract boolean save();
    method public void setOrientationStyle(int);
    method public void setSequenceType(int);
    field protected final android.gesture.GestureStore mStore;
  }

  public class GestureOverlayView extends android.widget.FrameLayout {
    ctor public GestureOverlayView(android.content.Context);
    ctor public GestureOverlayView(android.content.Context, android.util.AttributeSet);
    ctor public GestureOverlayView(android.content.Context, android.util.AttributeSet, int);
    ctor public GestureOverlayView(android.content.Context, android.util.AttributeSet, int, int);
    method public void addOnGestureListener(android.gesture.GestureOverlayView.OnGestureListener);
    method public void addOnGesturePerformedListener(android.gesture.GestureOverlayView.OnGesturePerformedListener);
    method public void addOnGesturingListener(android.gesture.GestureOverlayView.OnGesturingListener);
    method public void cancelClearAnimation();
    method public void cancelGesture();
    method public void clear(boolean);
    method public java.util.ArrayList<android.gesture.GesturePoint> getCurrentStroke();
    method public long getFadeOffset();
    method public android.gesture.Gesture getGesture();
    method public int getGestureColor();
    method public android.graphics.Path getGesturePath();
    method public android.graphics.Path getGesturePath(android.graphics.Path);
    method public float getGestureStrokeAngleThreshold();
    method public float getGestureStrokeLengthThreshold();
    method public float getGestureStrokeSquarenessTreshold();
    method public int getGestureStrokeType();
    method public float getGestureStrokeWidth();
    method public int getOrientation();
    method public int getUncertainGestureColor();
    method public boolean isEventsInterceptionEnabled();
    method public boolean isFadeEnabled();
    method public boolean isGestureVisible();
    method public boolean isGesturing();
    method public void removeAllOnGestureListeners();
    method public void removeAllOnGesturePerformedListeners();
    method public void removeAllOnGesturingListeners();
    method public void removeOnGestureListener(android.gesture.GestureOverlayView.OnGestureListener);
    method public void removeOnGesturePerformedListener(android.gesture.GestureOverlayView.OnGesturePerformedListener);
    method public void removeOnGesturingListener(android.gesture.GestureOverlayView.OnGesturingListener);
    method public void setEventsInterceptionEnabled(boolean);
    method public void setFadeEnabled(boolean);
    method public void setFadeOffset(long);
    method public void setGesture(android.gesture.Gesture);
    method public void setGestureColor(int);
    method public void setGestureStrokeAngleThreshold(float);
    method public void setGestureStrokeLengthThreshold(float);
    method public void setGestureStrokeSquarenessTreshold(float);
    method public void setGestureStrokeType(int);
    method public void setGestureStrokeWidth(float);
    method public void setGestureVisible(boolean);
    method public void setOrientation(int);
    method public void setUncertainGestureColor(int);
    field public static final int GESTURE_STROKE_TYPE_MULTIPLE = 1; // 0x1
    field public static final int GESTURE_STROKE_TYPE_SINGLE = 0; // 0x0
    field public static final int ORIENTATION_HORIZONTAL = 0; // 0x0
    field public static final int ORIENTATION_VERTICAL = 1; // 0x1
  }

  public static abstract interface GestureOverlayView.OnGestureListener {
    method public abstract void onGesture(android.gesture.GestureOverlayView, android.view.MotionEvent);
    method public abstract void onGestureCancelled(android.gesture.GestureOverlayView, android.view.MotionEvent);
    method public abstract void onGestureEnded(android.gesture.GestureOverlayView, android.view.MotionEvent);
    method public abstract void onGestureStarted(android.gesture.GestureOverlayView, android.view.MotionEvent);
  }

  public static abstract interface GestureOverlayView.OnGesturePerformedListener {
    method public abstract void onGesturePerformed(android.gesture.GestureOverlayView, android.gesture.Gesture);
  }

  public static abstract interface GestureOverlayView.OnGesturingListener {
    method public abstract void onGesturingEnded(android.gesture.GestureOverlayView);
    method public abstract void onGesturingStarted(android.gesture.GestureOverlayView);
  }

  public class GesturePoint {
    ctor public GesturePoint(float, float, long);
    method public java.lang.Object clone();
    field public final long timestamp;
    field public final float x;
    field public final float y;
  }

  public class GestureStore {
    ctor public GestureStore();
    method public void addGesture(java.lang.String, android.gesture.Gesture);
    method public java.util.Set<java.lang.String> getGestureEntries();
    method public java.util.ArrayList<android.gesture.Gesture> getGestures(java.lang.String);
    method public int getOrientationStyle();
    method public int getSequenceType();
    method public boolean hasChanged();
    method public void load(java.io.InputStream) throws java.io.IOException;
    method public void load(java.io.InputStream, boolean) throws java.io.IOException;
    method public java.util.ArrayList<android.gesture.Prediction> recognize(android.gesture.Gesture);
    method public void removeEntry(java.lang.String);
    method public void removeGesture(java.lang.String, android.gesture.Gesture);
    method public void save(java.io.OutputStream) throws java.io.IOException;
    method public void save(java.io.OutputStream, boolean) throws java.io.IOException;
    method public void setOrientationStyle(int);
    method public void setSequenceType(int);
    field public static final int ORIENTATION_INVARIANT = 1; // 0x1
    field public static final int ORIENTATION_SENSITIVE = 2; // 0x2
    field public static final int SEQUENCE_INVARIANT = 1; // 0x1
    field public static final int SEQUENCE_SENSITIVE = 2; // 0x2
  }

  public class GestureStroke {
    ctor public GestureStroke(java.util.ArrayList<android.gesture.GesturePoint>);
    method public void clearPath();
    method public java.lang.Object clone();
    method public android.gesture.OrientedBoundingBox computeOrientedBoundingBox();
    method public android.graphics.Path getPath();
    method public android.graphics.Path toPath(float, float, int);
    field public final android.graphics.RectF boundingBox;
    field public final float length;
    field public final float[] points;
  }

  public final class GestureUtils {
    method public static android.gesture.OrientedBoundingBox computeOrientedBoundingBox(java.util.ArrayList<android.gesture.GesturePoint>);
    method public static android.gesture.OrientedBoundingBox computeOrientedBoundingBox(float[]);
    method public static float[] spatialSampling(android.gesture.Gesture, int);
    method public static float[] spatialSampling(android.gesture.Gesture, int, boolean);
    method public static float[] temporalSampling(android.gesture.GestureStroke, int);
  }

  public class OrientedBoundingBox {
    field public final float centerX;
    field public final float centerY;
    field public final float height;
    field public final float orientation;
    field public final float squareness;
    field public final float width;
  }

  public class Prediction {
    field public final java.lang.String name;
    field public double score;
  }

}

package android.graphics {

  public deprecated class AvoidXfermode extends android.graphics.Xfermode {
    ctor public AvoidXfermode(int, int, android.graphics.AvoidXfermode.Mode);
  }

  public static final class AvoidXfermode.Mode extends java.lang.Enum {
    method public static android.graphics.AvoidXfermode.Mode valueOf(java.lang.String);
    method public static final android.graphics.AvoidXfermode.Mode[] values();
    enum_constant public static final android.graphics.AvoidXfermode.Mode AVOID;
    enum_constant public static final android.graphics.AvoidXfermode.Mode TARGET;
  }

  public final class Bitmap implements android.os.Parcelable {
    method public boolean compress(android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream);
    method public android.graphics.Bitmap copy(android.graphics.Bitmap.Config, boolean);
    method public void copyPixelsFromBuffer(java.nio.Buffer);
    method public void copyPixelsToBuffer(java.nio.Buffer);
    method public static android.graphics.Bitmap createBitmap(android.graphics.Bitmap);
    method public static android.graphics.Bitmap createBitmap(android.graphics.Bitmap, int, int, int, int);
    method public static android.graphics.Bitmap createBitmap(android.graphics.Bitmap, int, int, int, int, android.graphics.Matrix, boolean);
    method public static android.graphics.Bitmap createBitmap(int, int, android.graphics.Bitmap.Config);
    method public static android.graphics.Bitmap createBitmap(android.util.DisplayMetrics, int, int, android.graphics.Bitmap.Config);
    method public static android.graphics.Bitmap createBitmap(int[], int, int, int, int, android.graphics.Bitmap.Config);
    method public static android.graphics.Bitmap createBitmap(android.util.DisplayMetrics, int[], int, int, int, int, android.graphics.Bitmap.Config);
    method public static android.graphics.Bitmap createBitmap(int[], int, int, android.graphics.Bitmap.Config);
    method public static android.graphics.Bitmap createBitmap(android.util.DisplayMetrics, int[], int, int, android.graphics.Bitmap.Config);
    method public static android.graphics.Bitmap createScaledBitmap(android.graphics.Bitmap, int, int, boolean);
    method public int describeContents();
    method public void eraseColor(int);
    method public android.graphics.Bitmap extractAlpha();
    method public android.graphics.Bitmap extractAlpha(android.graphics.Paint, int[]);
    method public final int getAllocationByteCount();
    method public final int getByteCount();
    method public final android.graphics.Bitmap.Config getConfig();
    method public int getDensity();
    method public int getGenerationId();
    method public final int getHeight();
    method public byte[] getNinePatchChunk();
    method public int getPixel(int, int);
    method public void getPixels(int[], int, int, int, int, int, int);
    method public final int getRowBytes();
    method public int getScaledHeight(android.graphics.Canvas);
    method public int getScaledHeight(android.util.DisplayMetrics);
    method public int getScaledHeight(int);
    method public int getScaledWidth(android.graphics.Canvas);
    method public int getScaledWidth(android.util.DisplayMetrics);
    method public int getScaledWidth(int);
    method public final int getWidth();
    method public final boolean hasAlpha();
    method public final boolean hasMipMap();
    method public final boolean isMutable();
    method public final boolean isPremultiplied();
    method public final boolean isRecycled();
    method public void prepareToDraw();
    method public void reconfigure(int, int, android.graphics.Bitmap.Config);
    method public void recycle();
    method public boolean sameAs(android.graphics.Bitmap);
    method public void setConfig(android.graphics.Bitmap.Config);
    method public void setDensity(int);
    method public void setHasAlpha(boolean);
    method public final void setHasMipMap(boolean);
    method public void setHeight(int);
    method public void setPixel(int, int, int);
    method public void setPixels(int[], int, int, int, int, int, int);
    method public final void setPremultiplied(boolean);
    method public void setWidth(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.graphics.Bitmap> CREATOR;
    field public static final int DENSITY_NONE = 0; // 0x0
  }

  public static final class Bitmap.CompressFormat extends java.lang.Enum {
    method public static android.graphics.Bitmap.CompressFormat valueOf(java.lang.String);
    method public static final android.graphics.Bitmap.CompressFormat[] values();
    enum_constant public static final android.graphics.Bitmap.CompressFormat JPEG;
    enum_constant public static final android.graphics.Bitmap.CompressFormat PNG;
    enum_constant public static final android.graphics.Bitmap.CompressFormat WEBP;
  }

  public static final class Bitmap.Config extends java.lang.Enum {
    method public static android.graphics.Bitmap.Config valueOf(java.lang.String);
    method public static final android.graphics.Bitmap.Config[] values();
    enum_constant public static final android.graphics.Bitmap.Config ALPHA_8;
    enum_constant public static final deprecated android.graphics.Bitmap.Config ARGB_4444;
    enum_constant public static final android.graphics.Bitmap.Config ARGB_8888;
    enum_constant public static final android.graphics.Bitmap.Config RGB_565;
  }

  public class BitmapFactory {
    ctor public BitmapFactory();
    method public static android.graphics.Bitmap decodeByteArray(byte[], int, int, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap decodeByteArray(byte[], int, int);
    method public static android.graphics.Bitmap decodeFile(java.lang.String, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap decodeFile(java.lang.String);
    method public static android.graphics.Bitmap decodeFileDescriptor(java.io.FileDescriptor, android.graphics.Rect, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap decodeFileDescriptor(java.io.FileDescriptor);
    method public static android.graphics.Bitmap decodeResource(android.content.res.Resources, int, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap decodeResource(android.content.res.Resources, int);
    method public static android.graphics.Bitmap decodeResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, android.graphics.Rect, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap decodeStream(java.io.InputStream, android.graphics.Rect, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap decodeStream(java.io.InputStream);
  }

  public static class BitmapFactory.Options {
    ctor public BitmapFactory.Options();
    method public void requestCancelDecode();
    field public android.graphics.Bitmap inBitmap;
    field public int inDensity;
    field public boolean inDither;
    field public deprecated boolean inInputShareable;
    field public boolean inJustDecodeBounds;
    field public boolean inMutable;
    field public boolean inPreferQualityOverSpeed;
    field public android.graphics.Bitmap.Config inPreferredConfig;
    field public boolean inPremultiplied;
    field public deprecated boolean inPurgeable;
    field public int inSampleSize;
    field public boolean inScaled;
    field public int inScreenDensity;
    field public int inTargetDensity;
    field public byte[] inTempStorage;
    field public boolean mCancel;
    field public int outHeight;
    field public java.lang.String outMimeType;
    field public int outWidth;
  }

  public final class BitmapRegionDecoder {
    method public android.graphics.Bitmap decodeRegion(android.graphics.Rect, android.graphics.BitmapFactory.Options);
    method public int getHeight();
    method public int getWidth();
    method public final boolean isRecycled();
    method public static android.graphics.BitmapRegionDecoder newInstance(byte[], int, int, boolean) throws java.io.IOException;
    method public static android.graphics.BitmapRegionDecoder newInstance(java.io.FileDescriptor, boolean) throws java.io.IOException;
    method public static android.graphics.BitmapRegionDecoder newInstance(java.io.InputStream, boolean) throws java.io.IOException;
    method public static android.graphics.BitmapRegionDecoder newInstance(java.lang.String, boolean) throws java.io.IOException;
    method public void recycle();
  }

  public class BitmapShader extends android.graphics.Shader {
    ctor public BitmapShader(android.graphics.Bitmap, android.graphics.Shader.TileMode, android.graphics.Shader.TileMode);
  }

  public class BlurMaskFilter extends android.graphics.MaskFilter {
    ctor public BlurMaskFilter(float, android.graphics.BlurMaskFilter.Blur);
  }

  public static final class BlurMaskFilter.Blur extends java.lang.Enum {
    method public static android.graphics.BlurMaskFilter.Blur valueOf(java.lang.String);
    method public static final android.graphics.BlurMaskFilter.Blur[] values();
    enum_constant public static final android.graphics.BlurMaskFilter.Blur INNER;
    enum_constant public static final android.graphics.BlurMaskFilter.Blur NORMAL;
    enum_constant public static final android.graphics.BlurMaskFilter.Blur OUTER;
    enum_constant public static final android.graphics.BlurMaskFilter.Blur SOLID;
  }

  public class Camera {
    ctor public Camera();
    method public void applyToCanvas(android.graphics.Canvas);
    method public float dotWithNormal(float, float, float);
    method public float getLocationX();
    method public float getLocationY();
    method public float getLocationZ();
    method public void getMatrix(android.graphics.Matrix);
    method public void restore();
    method public void rotate(float, float, float);
    method public void rotateX(float);
    method public void rotateY(float);
    method public void rotateZ(float);
    method public void save();
    method public void setLocation(float, float, float);
    method public void translate(float, float, float);
  }

  public class Canvas {
    ctor public Canvas();
    ctor public Canvas(android.graphics.Bitmap);
    method public boolean clipPath(android.graphics.Path, android.graphics.Region.Op);
    method public boolean clipPath(android.graphics.Path);
    method public boolean clipRect(android.graphics.RectF, android.graphics.Region.Op);
    method public boolean clipRect(android.graphics.Rect, android.graphics.Region.Op);
    method public boolean clipRect(android.graphics.RectF);
    method public boolean clipRect(android.graphics.Rect);
    method public boolean clipRect(float, float, float, float, android.graphics.Region.Op);
    method public boolean clipRect(float, float, float, float);
    method public boolean clipRect(int, int, int, int);
    method public deprecated boolean clipRegion(android.graphics.Region, android.graphics.Region.Op);
    method public deprecated boolean clipRegion(android.graphics.Region);
    method public void concat(android.graphics.Matrix);
    method public void drawARGB(int, int, int, int);
    method public void drawArc(android.graphics.RectF, float, float, boolean, android.graphics.Paint);
    method public void drawArc(float, float, float, float, float, float, boolean, android.graphics.Paint);
    method public void drawBitmap(android.graphics.Bitmap, float, float, android.graphics.Paint);
    method public void drawBitmap(android.graphics.Bitmap, android.graphics.Rect, android.graphics.RectF, android.graphics.Paint);
    method public void drawBitmap(android.graphics.Bitmap, android.graphics.Rect, android.graphics.Rect, android.graphics.Paint);
    method public deprecated void drawBitmap(int[], int, int, float, float, int, int, boolean, android.graphics.Paint);
    method public deprecated void drawBitmap(int[], int, int, int, int, int, int, boolean, android.graphics.Paint);
    method public void drawBitmap(android.graphics.Bitmap, android.graphics.Matrix, android.graphics.Paint);
    method public void drawBitmapMesh(android.graphics.Bitmap, int, int, float[], int, int[], int, android.graphics.Paint);
    method public void drawCircle(float, float, float, android.graphics.Paint);
    method public void drawColor(int);
    method public void drawColor(int, android.graphics.PorterDuff.Mode);
    method public void drawLine(float, float, float, float, android.graphics.Paint);
    method public void drawLines(float[], int, int, android.graphics.Paint);
    method public void drawLines(float[], android.graphics.Paint);
    method public void drawOval(android.graphics.RectF, android.graphics.Paint);
    method public void drawOval(float, float, float, float, android.graphics.Paint);
    method public void drawPaint(android.graphics.Paint);
    method public void drawPath(android.graphics.Path, android.graphics.Paint);
    method public void drawPicture(android.graphics.Picture);
    method public void drawPicture(android.graphics.Picture, android.graphics.RectF);
    method public void drawPicture(android.graphics.Picture, android.graphics.Rect);
    method public void drawPoint(float, float, android.graphics.Paint);
    method public void drawPoints(float[], int, int, android.graphics.Paint);
    method public void drawPoints(float[], android.graphics.Paint);
    method public deprecated void drawPosText(char[], int, int, float[], android.graphics.Paint);
    method public deprecated void drawPosText(java.lang.String, float[], android.graphics.Paint);
    method public void drawRGB(int, int, int);
    method public void drawRect(android.graphics.RectF, android.graphics.Paint);
    method public void drawRect(android.graphics.Rect, android.graphics.Paint);
    method public void drawRect(float, float, float, float, android.graphics.Paint);
    method public void drawRoundRect(android.graphics.RectF, float, float, android.graphics.Paint);
    method public void drawRoundRect(float, float, float, float, float, float, android.graphics.Paint);
    method public void drawText(char[], int, int, float, float, android.graphics.Paint);
    method public void drawText(java.lang.String, float, float, android.graphics.Paint);
    method public void drawText(java.lang.String, int, int, float, float, android.graphics.Paint);
    method public void drawText(java.lang.CharSequence, int, int, float, float, android.graphics.Paint);
    method public void drawTextOnPath(char[], int, int, android.graphics.Path, float, float, android.graphics.Paint);
    method public void drawTextOnPath(java.lang.String, android.graphics.Path, float, float, android.graphics.Paint);
    method public void drawVertices(android.graphics.Canvas.VertexMode, int, float[], int, float[], int, int[], int, short[], int, int, android.graphics.Paint);
    method public boolean getClipBounds(android.graphics.Rect);
    method public final android.graphics.Rect getClipBounds();
    method public int getDensity();
    method public android.graphics.DrawFilter getDrawFilter();
    method public int getHeight();
    method public deprecated void getMatrix(android.graphics.Matrix);
    method public final deprecated android.graphics.Matrix getMatrix();
    method public int getMaximumBitmapHeight();
    method public int getMaximumBitmapWidth();
    method public int getSaveCount();
    method public int getWidth();
    method public boolean isHardwareAccelerated();
    method public boolean isOpaque();
    method public boolean quickReject(android.graphics.RectF, android.graphics.Canvas.EdgeType);
    method public boolean quickReject(android.graphics.Path, android.graphics.Canvas.EdgeType);
    method public boolean quickReject(float, float, float, float, android.graphics.Canvas.EdgeType);
    method public void restore();
    method public void restoreToCount(int);
    method public void rotate(float);
    method public final void rotate(float, float, float);
    method public int save();
    method public int save(int);
    method public int saveLayer(android.graphics.RectF, android.graphics.Paint, int);
    method public int saveLayer(android.graphics.RectF, android.graphics.Paint);
    method public int saveLayer(float, float, float, float, android.graphics.Paint, int);
    method public int saveLayer(float, float, float, float, android.graphics.Paint);
    method public int saveLayerAlpha(android.graphics.RectF, int, int);
    method public int saveLayerAlpha(android.graphics.RectF, int);
    method public int saveLayerAlpha(float, float, float, float, int, int);
    method public int saveLayerAlpha(float, float, float, float, int);
    method public void scale(float, float);
    method public final void scale(float, float, float, float);
    method public void setBitmap(android.graphics.Bitmap);
    method public void setDensity(int);
    method public void setDrawFilter(android.graphics.DrawFilter);
    method public void setMatrix(android.graphics.Matrix);
    method public void skew(float, float);
    method public void translate(float, float);
    field public static final int ALL_SAVE_FLAG = 31; // 0x1f
    field public static final int CLIP_SAVE_FLAG = 2; // 0x2
    field public static final int CLIP_TO_LAYER_SAVE_FLAG = 16; // 0x10
    field public static final int FULL_COLOR_LAYER_SAVE_FLAG = 8; // 0x8
    field public static final int HAS_ALPHA_LAYER_SAVE_FLAG = 4; // 0x4
    field public static final int MATRIX_SAVE_FLAG = 1; // 0x1
  }

  public static final class Canvas.EdgeType extends java.lang.Enum {
    method public static android.graphics.Canvas.EdgeType valueOf(java.lang.String);
    method public static final android.graphics.Canvas.EdgeType[] values();
    enum_constant public static final android.graphics.Canvas.EdgeType AA;
    enum_constant public static final android.graphics.Canvas.EdgeType BW;
  }

  public static final class Canvas.VertexMode extends java.lang.Enum {
    method public static android.graphics.Canvas.VertexMode valueOf(java.lang.String);
    method public static final android.graphics.Canvas.VertexMode[] values();
    enum_constant public static final android.graphics.Canvas.VertexMode TRIANGLES;
    enum_constant public static final android.graphics.Canvas.VertexMode TRIANGLE_FAN;
    enum_constant public static final android.graphics.Canvas.VertexMode TRIANGLE_STRIP;
  }

  public class Color {
    ctor public Color();
    method public static int HSVToColor(float[]);
    method public static int HSVToColor(int, float[]);
    method public static void RGBToHSV(int, int, int, float[]);
    method public static int alpha(int);
    method public static int argb(int, int, int, int);
    method public static int blue(int);
    method public static void colorToHSV(int, float[]);
    method public static int green(int);
    method public static int parseColor(java.lang.String);
    method public static int red(int);
    method public static int rgb(int, int, int);
    field public static final int BLACK = -16777216; // 0xff000000
    field public static final int BLUE = -16776961; // 0xff0000ff
    field public static final int CYAN = -16711681; // 0xff00ffff
    field public static final int DKGRAY = -12303292; // 0xff444444
    field public static final int GRAY = -7829368; // 0xff888888
    field public static final int GREEN = -16711936; // 0xff00ff00
    field public static final int LTGRAY = -3355444; // 0xffcccccc
    field public static final int MAGENTA = -65281; // 0xffff00ff
    field public static final int RED = -65536; // 0xffff0000
    field public static final int TRANSPARENT = 0; // 0x0
    field public static final int WHITE = -1; // 0xffffffff
    field public static final int YELLOW = -256; // 0xffffff00
  }

  public class ColorFilter {
    ctor public ColorFilter();
  }

  public class ColorMatrix {
    ctor public ColorMatrix();
    ctor public ColorMatrix(float[]);
    ctor public ColorMatrix(android.graphics.ColorMatrix);
    method public final float[] getArray();
    method public void postConcat(android.graphics.ColorMatrix);
    method public void preConcat(android.graphics.ColorMatrix);
    method public void reset();
    method public void set(android.graphics.ColorMatrix);
    method public void set(float[]);
    method public void setConcat(android.graphics.ColorMatrix, android.graphics.ColorMatrix);
    method public void setRGB2YUV();
    method public void setRotate(int, float);
    method public void setSaturation(float);
    method public void setScale(float, float, float, float);
    method public void setYUV2RGB();
  }

  public class ColorMatrixColorFilter extends android.graphics.ColorFilter {
    ctor public ColorMatrixColorFilter(android.graphics.ColorMatrix);
    ctor public ColorMatrixColorFilter(float[]);
  }

  public class ComposePathEffect extends android.graphics.PathEffect {
    ctor public ComposePathEffect(android.graphics.PathEffect, android.graphics.PathEffect);
  }

  public class ComposeShader extends android.graphics.Shader {
    ctor public ComposeShader(android.graphics.Shader, android.graphics.Shader, android.graphics.Xfermode);
    ctor public ComposeShader(android.graphics.Shader, android.graphics.Shader, android.graphics.PorterDuff.Mode);
  }

  public class CornerPathEffect extends android.graphics.PathEffect {
    ctor public CornerPathEffect(float);
  }

  public class DashPathEffect extends android.graphics.PathEffect {
    ctor public DashPathEffect(float[], float);
  }

  public class DiscretePathEffect extends android.graphics.PathEffect {
    ctor public DiscretePathEffect(float, float);
  }

  public class DrawFilter {
    ctor public DrawFilter();
  }

  public class EmbossMaskFilter extends android.graphics.MaskFilter {
    ctor public EmbossMaskFilter(float[], float, float, float);
  }

  public class ImageFormat {
    ctor public ImageFormat();
    method public static int getBitsPerPixel(int);
    field public static final int DEPTH16 = 1144402265; // 0x44363159
    field public static final int DEPTH_POINT_CLOUD = 257; // 0x101
    field public static final int JPEG = 256; // 0x100
    field public static final int NV16 = 16; // 0x10
    field public static final int NV21 = 17; // 0x11
    field public static final int PRIVATE = 34; // 0x22
    field public static final int RAW10 = 37; // 0x25
    field public static final int RAW12 = 38; // 0x26
    field public static final int RAW_SENSOR = 32; // 0x20
    field public static final int RGB_565 = 4; // 0x4
    field public static final int UNKNOWN = 0; // 0x0
    field public static final int YUV_420_888 = 35; // 0x23
    field public static final int YUY2 = 20; // 0x14
    field public static final int YV12 = 842094169; // 0x32315659
  }

  public class Interpolator {
    ctor public Interpolator(int);
    ctor public Interpolator(int, int);
    method public final int getKeyFrameCount();
    method public final int getValueCount();
    method public void reset(int);
    method public void reset(int, int);
    method public void setKeyFrame(int, int, float[]);
    method public void setKeyFrame(int, int, float[], float[]);
    method public void setRepeatMirror(float, boolean);
    method public android.graphics.Interpolator.Result timeToValues(float[]);
    method public android.graphics.Interpolator.Result timeToValues(int, float[]);
  }

  public static final class Interpolator.Result extends java.lang.Enum {
    method public static android.graphics.Interpolator.Result valueOf(java.lang.String);
    method public static final android.graphics.Interpolator.Result[] values();
    enum_constant public static final android.graphics.Interpolator.Result FREEZE_END;
    enum_constant public static final android.graphics.Interpolator.Result FREEZE_START;
    enum_constant public static final android.graphics.Interpolator.Result NORMAL;
  }

  public deprecated class LayerRasterizer extends android.graphics.Rasterizer {
    ctor public LayerRasterizer();
    method public void addLayer(android.graphics.Paint, float, float);
    method public void addLayer(android.graphics.Paint);
  }

  public class LightingColorFilter extends android.graphics.ColorFilter {
    ctor public LightingColorFilter(int, int);
  }

  public class LinearGradient extends android.graphics.Shader {
    ctor public LinearGradient(float, float, float, float, int[], float[], android.graphics.Shader.TileMode);
    ctor public LinearGradient(float, float, float, float, int, int, android.graphics.Shader.TileMode);
  }

  public class MaskFilter {
    ctor public MaskFilter();
  }

  public class Matrix {
    ctor public Matrix();
    ctor public Matrix(android.graphics.Matrix);
    method public void getValues(float[]);
    method public boolean invert(android.graphics.Matrix);
    method public boolean isAffine();
    method public boolean isIdentity();
    method public void mapPoints(float[], int, float[], int, int);
    method public void mapPoints(float[], float[]);
    method public void mapPoints(float[]);
    method public float mapRadius(float);
    method public boolean mapRect(android.graphics.RectF, android.graphics.RectF);
    method public boolean mapRect(android.graphics.RectF);
    method public void mapVectors(float[], int, float[], int, int);
    method public void mapVectors(float[], float[]);
    method public void mapVectors(float[]);
    method public boolean postConcat(android.graphics.Matrix);
    method public boolean postRotate(float, float, float);
    method public boolean postRotate(float);
    method public boolean postScale(float, float, float, float);
    method public boolean postScale(float, float);
    method public boolean postSkew(float, float, float, float);
    method public boolean postSkew(float, float);
    method public boolean postTranslate(float, float);
    method public boolean preConcat(android.graphics.Matrix);
    method public boolean preRotate(float, float, float);
    method public boolean preRotate(float);
    method public boolean preScale(float, float, float, float);
    method public boolean preScale(float, float);
    method public boolean preSkew(float, float, float, float);
    method public boolean preSkew(float, float);
    method public boolean preTranslate(float, float);
    method public boolean rectStaysRect();
    method public void reset();
    method public void set(android.graphics.Matrix);
    method public boolean setConcat(android.graphics.Matrix, android.graphics.Matrix);
    method public boolean setPolyToPoly(float[], int, float[], int, int);
    method public boolean setRectToRect(android.graphics.RectF, android.graphics.RectF, android.graphics.Matrix.ScaleToFit);
    method public void setRotate(float, float, float);
    method public void setRotate(float);
    method public void setScale(float, float, float, float);
    method public void setScale(float, float);
    method public void setSinCos(float, float, float, float);
    method public void setSinCos(float, float);
    method public void setSkew(float, float, float, float);
    method public void setSkew(float, float);
    method public void setTranslate(float, float);
    method public void setValues(float[]);
    method public java.lang.String toShortString();
    field public static final int MPERSP_0 = 6; // 0x6
    field public static final int MPERSP_1 = 7; // 0x7
    field public static final int MPERSP_2 = 8; // 0x8
    field public static final int MSCALE_X = 0; // 0x0
    field public static final int MSCALE_Y = 4; // 0x4
    field public static final int MSKEW_X = 1; // 0x1
    field public static final int MSKEW_Y = 3; // 0x3
    field public static final int MTRANS_X = 2; // 0x2
    field public static final int MTRANS_Y = 5; // 0x5
  }

  public static final class Matrix.ScaleToFit extends java.lang.Enum {
    method public static android.graphics.Matrix.ScaleToFit valueOf(java.lang.String);
    method public static final android.graphics.Matrix.ScaleToFit[] values();
    enum_constant public static final android.graphics.Matrix.ScaleToFit CENTER;
    enum_constant public static final android.graphics.Matrix.ScaleToFit END;
    enum_constant public static final android.graphics.Matrix.ScaleToFit FILL;
    enum_constant public static final android.graphics.Matrix.ScaleToFit START;
  }

  public class Movie {
    method public static android.graphics.Movie decodeByteArray(byte[], int, int);
    method public static android.graphics.Movie decodeFile(java.lang.String);
    method public static android.graphics.Movie decodeStream(java.io.InputStream);
    method public void draw(android.graphics.Canvas, float, float, android.graphics.Paint);
    method public void draw(android.graphics.Canvas, float, float);
    method public int duration();
    method public int height();
    method public boolean isOpaque();
    method public boolean setTime(int);
    method public int width();
  }

  public class NinePatch {
    ctor public NinePatch(android.graphics.Bitmap, byte[]);
    ctor public NinePatch(android.graphics.Bitmap, byte[], java.lang.String);
    method public void draw(android.graphics.Canvas, android.graphics.RectF);
    method public void draw(android.graphics.Canvas, android.graphics.Rect);
    method public void draw(android.graphics.Canvas, android.graphics.Rect, android.graphics.Paint);
    method public android.graphics.Bitmap getBitmap();
    method public int getDensity();
    method public int getHeight();
    method public java.lang.String getName();
    method public android.graphics.Paint getPaint();
    method public final android.graphics.Region getTransparentRegion(android.graphics.Rect);
    method public int getWidth();
    method public final boolean hasAlpha();
    method public static boolean isNinePatchChunk(byte[]);
    method public void setPaint(android.graphics.Paint);
  }

  public final class Outline {
    ctor public Outline();
    ctor public Outline(android.graphics.Outline);
    method public boolean canClip();
    method public float getAlpha();
    method public boolean isEmpty();
    method public void offset(int, int);
    method public void set(android.graphics.Outline);
    method public void setAlpha(float);
    method public void setConvexPath(android.graphics.Path);
    method public void setEmpty();
    method public void setOval(int, int, int, int);
    method public void setOval(android.graphics.Rect);
    method public void setRect(int, int, int, int);
    method public void setRect(android.graphics.Rect);
    method public void setRoundRect(int, int, int, int, float);
    method public void setRoundRect(android.graphics.Rect, float);
  }

  public class Paint {
    ctor public Paint();
    ctor public Paint(int);
    ctor public Paint(android.graphics.Paint);
    method public float ascent();
    method public int breakText(char[], int, int, float, float[]);
    method public int breakText(java.lang.CharSequence, int, int, boolean, float, float[]);
    method public int breakText(java.lang.String, boolean, float, float[]);
    method public void clearShadowLayer();
    method public float descent();
    method public int getAlpha();
    method public int getColor();
    method public android.graphics.ColorFilter getColorFilter();
    method public boolean getFillPath(android.graphics.Path, android.graphics.Path);
    method public int getFlags();
    method public java.lang.String getFontFeatureSettings();
    method public float getFontMetrics(android.graphics.Paint.FontMetrics);
    method public android.graphics.Paint.FontMetrics getFontMetrics();
    method public int getFontMetricsInt(android.graphics.Paint.FontMetricsInt);
    method public android.graphics.Paint.FontMetricsInt getFontMetricsInt();
    method public float getFontSpacing();
    method public int getHinting();
    method public float getLetterSpacing();
    method public android.graphics.MaskFilter getMaskFilter();
    method public android.graphics.PathEffect getPathEffect();
    method public deprecated android.graphics.Rasterizer getRasterizer();
    method public android.graphics.Shader getShader();
    method public android.graphics.Paint.Cap getStrokeCap();
    method public android.graphics.Paint.Join getStrokeJoin();
    method public float getStrokeMiter();
    method public float getStrokeWidth();
    method public android.graphics.Paint.Style getStyle();
    method public android.graphics.Paint.Align getTextAlign();
    method public void getTextBounds(java.lang.String, int, int, android.graphics.Rect);
    method public void getTextBounds(char[], int, int, android.graphics.Rect);
    method public java.util.Locale getTextLocale();
    method public void getTextPath(char[], int, int, float, float, android.graphics.Path);
    method public void getTextPath(java.lang.String, int, int, float, float, android.graphics.Path);
    method public float getTextScaleX();
    method public float getTextSize();
    method public float getTextSkewX();
    method public int getTextWidths(char[], int, int, float[]);
    method public int getTextWidths(java.lang.CharSequence, int, int, float[]);
    method public int getTextWidths(java.lang.String, int, int, float[]);
    method public int getTextWidths(java.lang.String, float[]);
    method public android.graphics.Typeface getTypeface();
    method public android.graphics.Xfermode getXfermode();
    method public boolean hasGlyph(java.lang.String);
    method public final boolean isAntiAlias();
    method public final boolean isDither();
    method public boolean isElegantTextHeight();
    method public final boolean isFakeBoldText();
    method public final boolean isFilterBitmap();
    method public final boolean isLinearText();
    method public final boolean isStrikeThruText();
    method public final boolean isSubpixelText();
    method public final boolean isUnderlineText();
    method public float measureText(char[], int, int);
    method public float measureText(java.lang.String, int, int);
    method public float measureText(java.lang.String);
    method public float measureText(java.lang.CharSequence, int, int);
    method public void reset();
    method public void set(android.graphics.Paint);
    method public void setARGB(int, int, int, int);
    method public void setAlpha(int);
    method public void setAntiAlias(boolean);
    method public void setColor(int);
    method public android.graphics.ColorFilter setColorFilter(android.graphics.ColorFilter);
    method public void setDither(boolean);
    method public void setElegantTextHeight(boolean);
    method public void setFakeBoldText(boolean);
    method public void setFilterBitmap(boolean);
    method public void setFlags(int);
    method public void setFontFeatureSettings(java.lang.String);
    method public void setHinting(int);
    method public void setLetterSpacing(float);
    method public void setLinearText(boolean);
    method public android.graphics.MaskFilter setMaskFilter(android.graphics.MaskFilter);
    method public android.graphics.PathEffect setPathEffect(android.graphics.PathEffect);
    method public deprecated android.graphics.Rasterizer setRasterizer(android.graphics.Rasterizer);
    method public android.graphics.Shader setShader(android.graphics.Shader);
    method public void setShadowLayer(float, float, float, int);
    method public void setStrikeThruText(boolean);
    method public void setStrokeCap(android.graphics.Paint.Cap);
    method public void setStrokeJoin(android.graphics.Paint.Join);
    method public void setStrokeMiter(float);
    method public void setStrokeWidth(float);
    method public void setStyle(android.graphics.Paint.Style);
    method public void setSubpixelText(boolean);
    method public void setTextAlign(android.graphics.Paint.Align);
    method public void setTextLocale(java.util.Locale);
    method public void setTextScaleX(float);
    method public void setTextSize(float);
    method public void setTextSkewX(float);
    method public android.graphics.Typeface setTypeface(android.graphics.Typeface);
    method public void setUnderlineText(boolean);
    method public android.graphics.Xfermode setXfermode(android.graphics.Xfermode);
    field public static final int ANTI_ALIAS_FLAG = 1; // 0x1
    field public static final int DEV_KERN_TEXT_FLAG = 256; // 0x100
    field public static final int DITHER_FLAG = 4; // 0x4
    field public static final int EMBEDDED_BITMAP_TEXT_FLAG = 1024; // 0x400
    field public static final int FAKE_BOLD_TEXT_FLAG = 32; // 0x20
    field public static final int FILTER_BITMAP_FLAG = 2; // 0x2
    field public static final int HINTING_OFF = 0; // 0x0
    field public static final int HINTING_ON = 1; // 0x1
    field public static final int LINEAR_TEXT_FLAG = 64; // 0x40
    field public static final int STRIKE_THRU_TEXT_FLAG = 16; // 0x10
    field public static final int SUBPIXEL_TEXT_FLAG = 128; // 0x80
    field public static final int UNDERLINE_TEXT_FLAG = 8; // 0x8
  }

  public static final class Paint.Align extends java.lang.Enum {
    method public static android.graphics.Paint.Align valueOf(java.lang.String);
    method public static final android.graphics.Paint.Align[] values();
    enum_constant public static final android.graphics.Paint.Align CENTER;
    enum_constant public static final android.graphics.Paint.Align LEFT;
    enum_constant public static final android.graphics.Paint.Align RIGHT;
  }

  public static final class Paint.Cap extends java.lang.Enum {
    method public static android.graphics.Paint.Cap valueOf(java.lang.String);
    method public static final android.graphics.Paint.Cap[] values();
    enum_constant public static final android.graphics.Paint.Cap BUTT;
    enum_constant public static final android.graphics.Paint.Cap ROUND;
    enum_constant public static final android.graphics.Paint.Cap SQUARE;
  }

  public static class Paint.FontMetrics {
    ctor public Paint.FontMetrics();
    field public float ascent;
    field public float bottom;
    field public float descent;
    field public float leading;
    field public float top;
  }

  public static class Paint.FontMetricsInt {
    ctor public Paint.FontMetricsInt();
    field public int ascent;
    field public int bottom;
    field public int descent;
    field public int leading;
    field public int top;
  }

  public static final class Paint.Join extends java.lang.Enum {
    method public static android.graphics.Paint.Join valueOf(java.lang.String);
    method public static final android.graphics.Paint.Join[] values();
    enum_constant public static final android.graphics.Paint.Join BEVEL;
    enum_constant public static final android.graphics.Paint.Join MITER;
    enum_constant public static final android.graphics.Paint.Join ROUND;
  }

  public static final class Paint.Style extends java.lang.Enum {
    method public static android.graphics.Paint.Style valueOf(java.lang.String);
    method public static final android.graphics.Paint.Style[] values();
    enum_constant public static final android.graphics.Paint.Style FILL;
    enum_constant public static final android.graphics.Paint.Style FILL_AND_STROKE;
    enum_constant public static final android.graphics.Paint.Style STROKE;
  }

  public class PaintFlagsDrawFilter extends android.graphics.DrawFilter {
    ctor public PaintFlagsDrawFilter(int, int);
  }

  public class Path {
    ctor public Path();
    ctor public Path(android.graphics.Path);
    method public void addArc(android.graphics.RectF, float, float);
    method public void addArc(float, float, float, float, float, float);
    method public void addCircle(float, float, float, android.graphics.Path.Direction);
    method public void addOval(android.graphics.RectF, android.graphics.Path.Direction);
    method public void addOval(float, float, float, float, android.graphics.Path.Direction);
    method public void addPath(android.graphics.Path, float, float);
    method public void addPath(android.graphics.Path);
    method public void addPath(android.graphics.Path, android.graphics.Matrix);
    method public void addRect(android.graphics.RectF, android.graphics.Path.Direction);
    method public void addRect(float, float, float, float, android.graphics.Path.Direction);
    method public void addRoundRect(android.graphics.RectF, float, float, android.graphics.Path.Direction);
    method public void addRoundRect(float, float, float, float, float, float, android.graphics.Path.Direction);
    method public void addRoundRect(android.graphics.RectF, float[], android.graphics.Path.Direction);
    method public void addRoundRect(float, float, float, float, float[], android.graphics.Path.Direction);
    method public void arcTo(android.graphics.RectF, float, float, boolean);
    method public void arcTo(android.graphics.RectF, float, float);
    method public void arcTo(float, float, float, float, float, float, boolean);
    method public void close();
    method public void computeBounds(android.graphics.RectF, boolean);
    method public void cubicTo(float, float, float, float, float, float);
    method public android.graphics.Path.FillType getFillType();
    method public void incReserve(int);
    method public boolean isConvex();
    method public boolean isEmpty();
    method public boolean isInverseFillType();
    method public boolean isRect(android.graphics.RectF);
    method public void lineTo(float, float);
    method public void moveTo(float, float);
    method public void offset(float, float, android.graphics.Path);
    method public void offset(float, float);
    method public boolean op(android.graphics.Path, android.graphics.Path.Op);
    method public boolean op(android.graphics.Path, android.graphics.Path, android.graphics.Path.Op);
    method public void quadTo(float, float, float, float);
    method public void rCubicTo(float, float, float, float, float, float);
    method public void rLineTo(float, float);
    method public void rMoveTo(float, float);
    method public void rQuadTo(float, float, float, float);
    method public void reset();
    method public void rewind();
    method public void set(android.graphics.Path);
    method public void setFillType(android.graphics.Path.FillType);
    method public void setLastPoint(float, float);
    method public void toggleInverseFillType();
    method public void transform(android.graphics.Matrix, android.graphics.Path);
    method public void transform(android.graphics.Matrix);
  }

  public static final class Path.Direction extends java.lang.Enum {
    method public static android.graphics.Path.Direction valueOf(java.lang.String);
    method public static final android.graphics.Path.Direction[] values();
    enum_constant public static final android.graphics.Path.Direction CCW;
    enum_constant public static final android.graphics.Path.Direction CW;
  }

  public static final class Path.FillType extends java.lang.Enum {
    method public static android.graphics.Path.FillType valueOf(java.lang.String);
    method public static final android.graphics.Path.FillType[] values();
    enum_constant public static final android.graphics.Path.FillType EVEN_ODD;
    enum_constant public static final android.graphics.Path.FillType INVERSE_EVEN_ODD;
    enum_constant public static final android.graphics.Path.FillType INVERSE_WINDING;
    enum_constant public static final android.graphics.Path.FillType WINDING;
  }

  public static final class Path.Op extends java.lang.Enum {
    method public static android.graphics.Path.Op valueOf(java.lang.String);
    method public static final android.graphics.Path.Op[] values();
    enum_constant public static final android.graphics.Path.Op DIFFERENCE;
    enum_constant public static final android.graphics.Path.Op INTERSECT;
    enum_constant public static final android.graphics.Path.Op REVERSE_DIFFERENCE;
    enum_constant public static final android.graphics.Path.Op UNION;
    enum_constant public static final android.graphics.Path.Op XOR;
  }

  public class PathDashPathEffect extends android.graphics.PathEffect {
    ctor public PathDashPathEffect(android.graphics.Path, float, float, android.graphics.PathDashPathEffect.Style);
  }

  public static final class PathDashPathEffect.Style extends java.lang.Enum {
    method public static android.graphics.PathDashPathEffect.Style valueOf(java.lang.String);
    method public static final android.graphics.PathDashPathEffect.Style[] values();
    enum_constant public static final android.graphics.PathDashPathEffect.Style MORPH;
    enum_constant public static final android.graphics.PathDashPathEffect.Style ROTATE;
    enum_constant public static final android.graphics.PathDashPathEffect.Style TRANSLATE;
  }

  public class PathEffect {
    ctor public PathEffect();
  }

  public class PathMeasure {
    ctor public PathMeasure();
    ctor public PathMeasure(android.graphics.Path, boolean);
    method public float getLength();
    method public boolean getMatrix(float, android.graphics.Matrix, int);
    method public boolean getPosTan(float, float[], float[]);
    method public boolean getSegment(float, float, android.graphics.Path, boolean);
    method public boolean isClosed();
    method public boolean nextContour();
    method public void setPath(android.graphics.Path, boolean);
    field public static final int POSITION_MATRIX_FLAG = 1; // 0x1
    field public static final int TANGENT_MATRIX_FLAG = 2; // 0x2
  }

  public class Picture {
    ctor public Picture();
    ctor public Picture(android.graphics.Picture);
    method public android.graphics.Canvas beginRecording(int, int);
    method public static deprecated android.graphics.Picture createFromStream(java.io.InputStream);
    method public void draw(android.graphics.Canvas);
    method public void endRecording();
    method public int getHeight();
    method public int getWidth();
    method public deprecated void writeToStream(java.io.OutputStream);
  }

  public class PixelFormat {
    ctor public PixelFormat();
    method public static boolean formatHasAlpha(int);
    method public static void getPixelFormatInfo(int, android.graphics.PixelFormat);
    field public static final deprecated int A_8 = 8; // 0x8
    field public static final deprecated int JPEG = 256; // 0x100
    field public static final deprecated int LA_88 = 10; // 0xa
    field public static final deprecated int L_8 = 9; // 0x9
    field public static final int OPAQUE = -1; // 0xffffffff
    field public static final deprecated int RGBA_4444 = 7; // 0x7
    field public static final deprecated int RGBA_5551 = 6; // 0x6
    field public static final int RGBA_8888 = 1; // 0x1
    field public static final int RGBX_8888 = 2; // 0x2
    field public static final deprecated int RGB_332 = 11; // 0xb
    field public static final int RGB_565 = 4; // 0x4
    field public static final int RGB_888 = 3; // 0x3
    field public static final int TRANSLUCENT = -3; // 0xfffffffd
    field public static final int TRANSPARENT = -2; // 0xfffffffe
    field public static final int UNKNOWN = 0; // 0x0
    field public static final deprecated int YCbCr_420_SP = 17; // 0x11
    field public static final deprecated int YCbCr_422_I = 20; // 0x14
    field public static final deprecated int YCbCr_422_SP = 16; // 0x10
    field public int bitsPerPixel;
    field public int bytesPerPixel;
  }

  public deprecated class PixelXorXfermode extends android.graphics.Xfermode {
    ctor public PixelXorXfermode(int);
  }

  public class Point implements android.os.Parcelable {
    ctor public Point();
    ctor public Point(int, int);
    ctor public Point(android.graphics.Point);
    method public int describeContents();
    method public final boolean equals(int, int);
    method public final void negate();
    method public final void offset(int, int);
    method public void readFromParcel(android.os.Parcel);
    method public void set(int, int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.graphics.Point> CREATOR;
    field public int x;
    field public int y;
  }

  public class PointF implements android.os.Parcelable {
    ctor public PointF();
    ctor public PointF(float, float);
    ctor public PointF(android.graphics.Point);
    method public int describeContents();
    method public final boolean equals(float, float);
    method public final float length();
    method public static float length(float, float);
    method public final void negate();
    method public final void offset(float, float);
    method public void readFromParcel(android.os.Parcel);
    method public final void set(float, float);
    method public final void set(android.graphics.PointF);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.graphics.PointF> CREATOR;
    field public float x;
    field public float y;
  }

  public class PorterDuff {
    ctor public PorterDuff();
  }

  public static final class PorterDuff.Mode extends java.lang.Enum {
    method public static android.graphics.PorterDuff.Mode valueOf(java.lang.String);
    method public static final android.graphics.PorterDuff.Mode[] values();
    enum_constant public static final android.graphics.PorterDuff.Mode ADD;
    enum_constant public static final android.graphics.PorterDuff.Mode CLEAR;
    enum_constant public static final android.graphics.PorterDuff.Mode DARKEN;
    enum_constant public static final android.graphics.PorterDuff.Mode DST;
    enum_constant public static final android.graphics.PorterDuff.Mode DST_ATOP;
    enum_constant public static final android.graphics.PorterDuff.Mode DST_IN;
    enum_constant public static final android.graphics.PorterDuff.Mode DST_OUT;
    enum_constant public static final android.graphics.PorterDuff.Mode DST_OVER;
    enum_constant public static final android.graphics.PorterDuff.Mode LIGHTEN;
    enum_constant public static final android.graphics.PorterDuff.Mode MULTIPLY;
    enum_constant public static final android.graphics.PorterDuff.Mode OVERLAY;
    enum_constant public static final android.graphics.PorterDuff.Mode SCREEN;
    enum_constant public static final android.graphics.PorterDuff.Mode SRC;
    enum_constant public static final android.graphics.PorterDuff.Mode SRC_ATOP;
    enum_constant public static final android.graphics.PorterDuff.Mode SRC_IN;
    enum_constant public static final android.graphics.PorterDuff.Mode SRC_OUT;
    enum_constant public static final android.graphics.PorterDuff.Mode SRC_OVER;
    enum_constant public static final android.graphics.PorterDuff.Mode XOR;
  }

  public class PorterDuffColorFilter extends android.graphics.ColorFilter {
    ctor public PorterDuffColorFilter(int, android.graphics.PorterDuff.Mode);
  }

  public class PorterDuffXfermode extends android.graphics.Xfermode {
    ctor public PorterDuffXfermode(android.graphics.PorterDuff.Mode);
  }

  public class RadialGradient extends android.graphics.Shader {
    ctor public RadialGradient(float, float, float, int[], float[], android.graphics.Shader.TileMode);
    ctor public RadialGradient(float, float, float, int, int, android.graphics.Shader.TileMode);
  }

  public deprecated class Rasterizer {
    ctor public Rasterizer();
  }

  public final class Rect implements android.os.Parcelable {
    ctor public Rect();
    ctor public Rect(int, int, int, int);
    ctor public Rect(android.graphics.Rect);
    method public final int centerX();
    method public final int centerY();
    method public boolean contains(int, int);
    method public boolean contains(int, int, int, int);
    method public boolean contains(android.graphics.Rect);
    method public int describeContents();
    method public final float exactCenterX();
    method public final float exactCenterY();
    method public java.lang.String flattenToString();
    method public final int height();
    method public void inset(int, int);
    method public boolean intersect(int, int, int, int);
    method public boolean intersect(android.graphics.Rect);
    method public boolean intersects(int, int, int, int);
    method public static boolean intersects(android.graphics.Rect, android.graphics.Rect);
    method public final boolean isEmpty();
    method public void offset(int, int);
    method public void offsetTo(int, int);
    method public void readFromParcel(android.os.Parcel);
    method public void set(int, int, int, int);
    method public void set(android.graphics.Rect);
    method public void setEmpty();
    method public boolean setIntersect(android.graphics.Rect, android.graphics.Rect);
    method public void sort();
    method public java.lang.String toShortString();
    method public static android.graphics.Rect unflattenFromString(java.lang.String);
    method public void union(int, int, int, int);
    method public void union(android.graphics.Rect);
    method public void union(int, int);
    method public final int width();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.graphics.Rect> CREATOR;
    field public int bottom;
    field public int left;
    field public int right;
    field public int top;
  }

  public class RectF implements android.os.Parcelable {
    ctor public RectF();
    ctor public RectF(float, float, float, float);
    ctor public RectF(android.graphics.RectF);
    ctor public RectF(android.graphics.Rect);
    method public final float centerX();
    method public final float centerY();
    method public boolean contains(float, float);
    method public boolean contains(float, float, float, float);
    method public boolean contains(android.graphics.RectF);
    method public int describeContents();
    method public final float height();
    method public void inset(float, float);
    method public boolean intersect(float, float, float, float);
    method public boolean intersect(android.graphics.RectF);
    method public boolean intersects(float, float, float, float);
    method public static boolean intersects(android.graphics.RectF, android.graphics.RectF);
    method public final boolean isEmpty();
    method public void offset(float, float);
    method public void offsetTo(float, float);
    method public void readFromParcel(android.os.Parcel);
    method public void round(android.graphics.Rect);
    method public void roundOut(android.graphics.Rect);
    method public void set(float, float, float, float);
    method public void set(android.graphics.RectF);
    method public void set(android.graphics.Rect);
    method public void setEmpty();
    method public boolean setIntersect(android.graphics.RectF, android.graphics.RectF);
    method public void sort();
    method public java.lang.String toShortString();
    method public void union(float, float, float, float);
    method public void union(android.graphics.RectF);
    method public void union(float, float);
    method public final float width();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.graphics.RectF> CREATOR;
    field public float bottom;
    field public float left;
    field public float right;
    field public float top;
  }

  public class Region implements android.os.Parcelable {
    ctor public Region();
    ctor public Region(android.graphics.Region);
    ctor public Region(android.graphics.Rect);
    ctor public Region(int, int, int, int);
    method public boolean contains(int, int);
    method public int describeContents();
    method public android.graphics.Path getBoundaryPath();
    method public boolean getBoundaryPath(android.graphics.Path);
    method public android.graphics.Rect getBounds();
    method public boolean getBounds(android.graphics.Rect);
    method public boolean isComplex();
    method public boolean isEmpty();
    method public boolean isRect();
    method public boolean op(android.graphics.Rect, android.graphics.Region.Op);
    method public boolean op(int, int, int, int, android.graphics.Region.Op);
    method public boolean op(android.graphics.Region, android.graphics.Region.Op);
    method public boolean op(android.graphics.Rect, android.graphics.Region, android.graphics.Region.Op);
    method public boolean op(android.graphics.Region, android.graphics.Region, android.graphics.Region.Op);
    method public boolean quickContains(android.graphics.Rect);
    method public boolean quickContains(int, int, int, int);
    method public boolean quickReject(android.graphics.Rect);
    method public boolean quickReject(int, int, int, int);
    method public boolean quickReject(android.graphics.Region);
    method public boolean set(android.graphics.Region);
    method public boolean set(android.graphics.Rect);
    method public boolean set(int, int, int, int);
    method public void setEmpty();
    method public boolean setPath(android.graphics.Path, android.graphics.Region);
    method public void translate(int, int);
    method public void translate(int, int, android.graphics.Region);
    method public final boolean union(android.graphics.Rect);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.graphics.Region> CREATOR;
  }

  public static final class Region.Op extends java.lang.Enum {
    method public static android.graphics.Region.Op valueOf(java.lang.String);
    method public static final android.graphics.Region.Op[] values();
    enum_constant public static final android.graphics.Region.Op DIFFERENCE;
    enum_constant public static final android.graphics.Region.Op INTERSECT;
    enum_constant public static final android.graphics.Region.Op REPLACE;
    enum_constant public static final android.graphics.Region.Op REVERSE_DIFFERENCE;
    enum_constant public static final android.graphics.Region.Op UNION;
    enum_constant public static final android.graphics.Region.Op XOR;
  }

  public class RegionIterator {
    ctor public RegionIterator(android.graphics.Region);
    method public final boolean next(android.graphics.Rect);
  }

  public class Shader {
    ctor public Shader();
    method public boolean getLocalMatrix(android.graphics.Matrix);
    method public void setLocalMatrix(android.graphics.Matrix);
  }

  public static final class Shader.TileMode extends java.lang.Enum {
    method public static android.graphics.Shader.TileMode valueOf(java.lang.String);
    method public static final android.graphics.Shader.TileMode[] values();
    enum_constant public static final android.graphics.Shader.TileMode CLAMP;
    enum_constant public static final android.graphics.Shader.TileMode MIRROR;
    enum_constant public static final android.graphics.Shader.TileMode REPEAT;
  }

  public class SumPathEffect extends android.graphics.PathEffect {
    ctor public SumPathEffect(android.graphics.PathEffect, android.graphics.PathEffect);
  }

  public class SurfaceTexture {
    ctor public SurfaceTexture(int);
    ctor public SurfaceTexture(int, boolean);
    method public void attachToGLContext(int);
    method public void detachFromGLContext();
    method public long getTimestamp();
    method public void getTransformMatrix(float[]);
    method public void release();
    method public void releaseTexImage();
    method public void setDefaultBufferSize(int, int);
    method public void setOnFrameAvailableListener(android.graphics.SurfaceTexture.OnFrameAvailableListener);
    method public void setOnFrameAvailableListener(android.graphics.SurfaceTexture.OnFrameAvailableListener, android.os.Handler);
    method public void updateTexImage();
  }

  public static abstract interface SurfaceTexture.OnFrameAvailableListener {
    method public abstract void onFrameAvailable(android.graphics.SurfaceTexture);
  }

  public static deprecated class SurfaceTexture.OutOfResourcesException extends java.lang.Exception {
    ctor public SurfaceTexture.OutOfResourcesException();
    ctor public SurfaceTexture.OutOfResourcesException(java.lang.String);
  }

  public class SweepGradient extends android.graphics.Shader {
    ctor public SweepGradient(float, float, int[], float[]);
    ctor public SweepGradient(float, float, int, int);
  }

  public class Typeface {
    method public static android.graphics.Typeface create(java.lang.String, int);
    method public static android.graphics.Typeface create(android.graphics.Typeface, int);
    method public static android.graphics.Typeface createFromAsset(android.content.res.AssetManager, java.lang.String);
    method public static android.graphics.Typeface createFromFile(java.io.File);
    method public static android.graphics.Typeface createFromFile(java.lang.String);
    method public static android.graphics.Typeface defaultFromStyle(int);
    method public int getStyle();
    method public final boolean isBold();
    method public final boolean isItalic();
    field public static final int BOLD = 1; // 0x1
    field public static final int BOLD_ITALIC = 3; // 0x3
    field public static final android.graphics.Typeface DEFAULT;
    field public static final android.graphics.Typeface DEFAULT_BOLD;
    field public static final int ITALIC = 2; // 0x2
    field public static final android.graphics.Typeface MONOSPACE;
    field public static final int NORMAL = 0; // 0x0
    field public static final android.graphics.Typeface SANS_SERIF;
    field public static final android.graphics.Typeface SERIF;
  }

  public class Xfermode {
    ctor public Xfermode();
  }

  public class YuvImage {
    ctor public YuvImage(byte[], int, int, int, int[]);
    method public boolean compressToJpeg(android.graphics.Rect, int, java.io.OutputStream);
    method public int getHeight();
    method public int[] getStrides();
    method public int getWidth();
    method public byte[] getYuvData();
    method public int getYuvFormat();
  }

}

package android.graphics.drawable {

  public abstract interface Animatable {
    method public abstract boolean isRunning();
    method public abstract void start();
    method public abstract void stop();
  }

  public class AnimatedStateListDrawable extends android.graphics.drawable.StateListDrawable {
    ctor public AnimatedStateListDrawable();
    method public void addState(int[], android.graphics.drawable.Drawable, int);
    method public void addTransition(int, int, T, boolean);
  }

  public class AnimatedVectorDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Animatable {
    ctor public AnimatedVectorDrawable();
    method public void addListener(android.animation.Animator.AnimatorListener);
    method public void draw(android.graphics.Canvas);
    method public java.util.List<android.animation.Animator.AnimatorListener> getListeners();
    method public int getOpacity();
    method public boolean isRunning();
    method public void removeListener(android.animation.Animator.AnimatorListener);
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void start();
    method public void stop();
  }

  public class AnimationDrawable extends android.graphics.drawable.DrawableContainer implements android.graphics.drawable.Animatable java.lang.Runnable {
    ctor public AnimationDrawable();
    method public void addFrame(android.graphics.drawable.Drawable, int);
    method public int getDuration(int);
    method public android.graphics.drawable.Drawable getFrame(int);
    method public int getNumberOfFrames();
    method public boolean isOneShot();
    method public boolean isRunning();
    method public void run();
    method public void setOneShot(boolean);
    method public void start();
    method public void stop();
  }

  public class BitmapDrawable extends android.graphics.drawable.Drawable {
    ctor public deprecated BitmapDrawable();
    ctor public deprecated BitmapDrawable(android.content.res.Resources);
    ctor public deprecated BitmapDrawable(android.graphics.Bitmap);
    ctor public BitmapDrawable(android.content.res.Resources, android.graphics.Bitmap);
    ctor public deprecated BitmapDrawable(java.lang.String);
    ctor public BitmapDrawable(android.content.res.Resources, java.lang.String);
    ctor public deprecated BitmapDrawable(java.io.InputStream);
    ctor public BitmapDrawable(android.content.res.Resources, java.io.InputStream);
    method public void draw(android.graphics.Canvas);
    method public final android.graphics.Bitmap getBitmap();
    method public final android.graphics.drawable.Drawable.ConstantState getConstantState();
    method public int getGravity();
    method public int getOpacity();
    method public final android.graphics.Paint getPaint();
    method public android.graphics.Shader.TileMode getTileModeX();
    method public android.graphics.Shader.TileMode getTileModeY();
    method public boolean hasAntiAlias();
    method public boolean hasMipMap();
    method public final boolean isAutoMirrored();
    method public void setAlpha(int);
    method public void setAntiAlias(boolean);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setGravity(int);
    method public void setMipMap(boolean);
    method public void setTargetDensity(android.graphics.Canvas);
    method public void setTargetDensity(android.util.DisplayMetrics);
    method public void setTargetDensity(int);
    method public void setTileModeX(android.graphics.Shader.TileMode);
    method public void setTileModeXY(android.graphics.Shader.TileMode, android.graphics.Shader.TileMode);
    method public final void setTileModeY(android.graphics.Shader.TileMode);
  }

  public class ClipDrawable extends android.graphics.drawable.DrawableWrapper {
    ctor public ClipDrawable(android.graphics.drawable.Drawable, int, int);
    field public static final int HORIZONTAL = 1; // 0x1
    field public static final int VERTICAL = 2; // 0x2
  }

  public class ColorDrawable extends android.graphics.drawable.Drawable {
    ctor public ColorDrawable();
    ctor public ColorDrawable(int);
    method public void draw(android.graphics.Canvas);
    method public int getColor();
    method public int getOpacity();
    method public void setAlpha(int);
    method public void setColor(int);
    method public void setColorFilter(android.graphics.ColorFilter);
  }

  public abstract class Drawable {
    ctor public Drawable();
    method public void applyTheme(android.content.res.Resources.Theme);
    method public boolean canApplyTheme();
    method public void clearColorFilter();
    method public final void copyBounds(android.graphics.Rect);
    method public final android.graphics.Rect copyBounds();
    method public static android.graphics.drawable.Drawable createFromPath(java.lang.String);
    method public static android.graphics.drawable.Drawable createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String);
    method public static android.graphics.drawable.Drawable createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String, android.graphics.BitmapFactory.Options);
    method public static android.graphics.drawable.Drawable createFromStream(java.io.InputStream, java.lang.String);
    method public static android.graphics.drawable.Drawable createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public static android.graphics.drawable.Drawable createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public static android.graphics.drawable.Drawable createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public static android.graphics.drawable.Drawable createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public abstract void draw(android.graphics.Canvas);
    method public int getAlpha();
    method public final android.graphics.Rect getBounds();
    method public android.graphics.drawable.Drawable.Callback getCallback();
    method public int getChangingConfigurations();
    method public android.graphics.ColorFilter getColorFilter();
    method public android.graphics.drawable.Drawable.ConstantState getConstantState();
    method public android.graphics.drawable.Drawable getCurrent();
    method public android.graphics.Rect getDirtyBounds();
    method public boolean getDither();
    method public boolean getFilterBitmap();
    method public void getHotspotBounds(android.graphics.Rect);
    method public int getIntrinsicHeight();
    method public int getIntrinsicWidth();
    method public int getLayoutDirection();
    method public final int getLevel();
    method public int getMinimumHeight();
    method public int getMinimumWidth();
    method public abstract int getOpacity();
    method public void getOutline(android.graphics.Outline);
    method public boolean getPadding(android.graphics.Rect);
    method public int[] getState();
    method public android.graphics.Region getTransparentRegion();
    method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public void invalidateSelf();
    method public boolean isAutoMirrored();
    method public boolean isStateful();
    method public final boolean isVisible();
    method public void jumpToCurrentState();
    method public android.graphics.drawable.Drawable mutate();
    method protected void onBoundsChange(android.graphics.Rect);
    method public boolean onLayoutDirectionChange(int);
    method protected boolean onLevelChange(int);
    method protected boolean onStateChange(int[]);
    method public static int resolveOpacity(int, int);
    method public void scheduleSelf(java.lang.Runnable, long);
    method public abstract void setAlpha(int);
    method public void setAutoMirrored(boolean);
    method public void setBounds(int, int, int, int);
    method public void setBounds(android.graphics.Rect);
    method public final void setCallback(android.graphics.drawable.Drawable.Callback);
    method public void setChangingConfigurations(int);
    method public abstract void setColorFilter(android.graphics.ColorFilter);
    method public void setColorFilter(int, android.graphics.PorterDuff.Mode);
    method public void setDither(boolean);
    method public void setFilterBitmap(boolean);
    method public void setHotspot(float, float);
    method public void setHotspotBounds(int, int, int, int);
    method public final boolean setLayoutDirection(int);
    method public final boolean setLevel(int);
    method public boolean setState(int[]);
    method public void setTint(int);
    method public void setTintList(android.content.res.ColorStateList);
    method public void setTintMode(android.graphics.PorterDuff.Mode);
    method public boolean setVisible(boolean, boolean);
    method public void unscheduleSelf(java.lang.Runnable);
  }

  public static abstract interface Drawable.Callback {
    method public abstract void invalidateDrawable(android.graphics.drawable.Drawable);
    method public abstract void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
    method public abstract void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
  }

  public static abstract class Drawable.ConstantState {
    ctor public Drawable.ConstantState();
    method public boolean canApplyTheme();
    method public abstract int getChangingConfigurations();
    method public abstract android.graphics.drawable.Drawable newDrawable();
    method public android.graphics.drawable.Drawable newDrawable(android.content.res.Resources);
    method public android.graphics.drawable.Drawable newDrawable(android.content.res.Resources, android.content.res.Resources.Theme);
  }

  public class DrawableContainer extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
    ctor public DrawableContainer();
    method public void draw(android.graphics.Canvas);
    method public int getOpacity();
    method public void invalidateDrawable(android.graphics.drawable.Drawable);
    method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
    method public boolean selectDrawable(int);
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method protected void setConstantState(android.graphics.drawable.DrawableContainer.DrawableContainerState);
    method public void setEnterFadeDuration(int);
    method public void setExitFadeDuration(int);
    method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
  }

  public static abstract class DrawableContainer.DrawableContainerState extends android.graphics.drawable.Drawable.ConstantState {
    method public final int addChild(android.graphics.drawable.Drawable);
    method public synchronized boolean canConstantState();
    method protected void computeConstantSize();
    method public int getChangingConfigurations();
    method public final android.graphics.drawable.Drawable getChild(int);
    method public final int getChildCount();
    method public final android.graphics.drawable.Drawable[] getChildren();
    method public final int getConstantHeight();
    method public final int getConstantMinimumHeight();
    method public final int getConstantMinimumWidth();
    method public final android.graphics.Rect getConstantPadding();
    method public final int getConstantWidth();
    method public final int getEnterFadeDuration();
    method public final int getExitFadeDuration();
    method public final int getOpacity();
    method public void growArray(int, int);
    method public final boolean isConstantSize();
    method public final boolean isStateful();
    method public final void setConstantSize(boolean);
    method public final void setEnterFadeDuration(int);
    method public final void setExitFadeDuration(int);
    method public final void setVariablePadding(boolean);
  }

  public abstract class DrawableWrapper extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
    ctor public DrawableWrapper(android.graphics.drawable.Drawable);
    method public void draw(android.graphics.Canvas);
    method public android.graphics.drawable.Drawable getDrawable();
    method public int getOpacity();
    method public void invalidateDrawable(android.graphics.drawable.Drawable);
    method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setDrawable(android.graphics.drawable.Drawable);
    method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
  }

  public class GradientDrawable extends android.graphics.drawable.Drawable {
    ctor public GradientDrawable();
    ctor public GradientDrawable(android.graphics.drawable.GradientDrawable.Orientation, int[]);
    method public void draw(android.graphics.Canvas);
    method public float getGradientRadius();
    method public int getOpacity();
    method public android.graphics.drawable.GradientDrawable.Orientation getOrientation();
    method public void setAlpha(int);
    method public void setColor(int);
    method public void setColor(android.content.res.ColorStateList);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setColors(int[]);
    method public void setCornerRadii(float[]);
    method public void setCornerRadius(float);
    method public void setGradientCenter(float, float);
    method public void setGradientRadius(float);
    method public void setGradientType(int);
    method public void setOrientation(android.graphics.drawable.GradientDrawable.Orientation);
    method public void setShape(int);
    method public void setSize(int, int);
    method public void setStroke(int, int);
    method public void setStroke(int, android.content.res.ColorStateList);
    method public void setStroke(int, int, float, float);
    method public void setStroke(int, android.content.res.ColorStateList, float, float);
    method public void setUseLevel(boolean);
    field public static final int LINE = 2; // 0x2
    field public static final int LINEAR_GRADIENT = 0; // 0x0
    field public static final int OVAL = 1; // 0x1
    field public static final int RADIAL_GRADIENT = 1; // 0x1
    field public static final int RECTANGLE = 0; // 0x0
    field public static final int RING = 3; // 0x3
    field public static final int SWEEP_GRADIENT = 2; // 0x2
  }

  public static final class GradientDrawable.Orientation extends java.lang.Enum {
    method public static android.graphics.drawable.GradientDrawable.Orientation valueOf(java.lang.String);
    method public static final android.graphics.drawable.GradientDrawable.Orientation[] values();
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation BL_TR;
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation BOTTOM_TOP;
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation BR_TL;
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation LEFT_RIGHT;
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation RIGHT_LEFT;
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation TL_BR;
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation TOP_BOTTOM;
    enum_constant public static final android.graphics.drawable.GradientDrawable.Orientation TR_BL;
  }

  public class InsetDrawable extends android.graphics.drawable.DrawableWrapper {
    ctor public InsetDrawable(android.graphics.drawable.Drawable, int);
    ctor public InsetDrawable(android.graphics.drawable.Drawable, int, int, int, int);
  }

  public class LayerDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
    ctor public LayerDrawable(android.graphics.drawable.Drawable[]);
    method public int addLayer(android.graphics.drawable.Drawable);
    method public void draw(android.graphics.Canvas);
    method public android.graphics.drawable.Drawable findDrawableByLayerId(int);
    method public int findIndexByLayerId(int);
    method public android.graphics.drawable.Drawable getDrawable(int);
    method public int getId(int);
    method public int getLayerGravity(int);
    method public int getLayerHeight(int);
    method public int getLayerInsetBottom(int);
    method public int getLayerInsetEnd(int);
    method public int getLayerInsetLeft(int);
    method public int getLayerInsetRight(int);
    method public int getLayerInsetStart(int);
    method public int getLayerInsetTop(int);
    method public int getLayerWidth(int);
    method public int getNumberOfLayers();
    method public int getOpacity();
    method public int getPaddingMode();
    method public void invalidateDrawable(android.graphics.drawable.Drawable);
    method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setDrawable(int, android.graphics.drawable.Drawable);
    method public boolean setDrawableByLayerId(int, android.graphics.drawable.Drawable);
    method public void setId(int, int);
    method public void setLayerGravity(int, int);
    method public void setLayerHeight(int, int);
    method public void setLayerInset(int, int, int, int, int);
    method public void setLayerInsetBottom(int, int);
    method public void setLayerInsetEnd(int, int);
    method public void setLayerInsetLeft(int, int);
    method public void setLayerInsetRelative(int, int, int, int, int);
    method public void setLayerInsetRight(int, int);
    method public void setLayerInsetStart(int, int);
    method public void setLayerInsetTop(int, int);
    method public void setLayerSize(int, int, int);
    method public void setLayerWidth(int, int);
    method public void setOpacity(int);
    method public void setPaddingMode(int);
    method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
    field public static final int PADDING_MODE_NEST = 0; // 0x0
    field public static final int PADDING_MODE_STACK = 1; // 0x1
  }

  public class LevelListDrawable extends android.graphics.drawable.DrawableContainer {
    ctor public LevelListDrawable();
    method public void addLevel(int, int, android.graphics.drawable.Drawable);
  }

  public class NinePatchDrawable extends android.graphics.drawable.Drawable {
    ctor public deprecated NinePatchDrawable(android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
    ctor public NinePatchDrawable(android.content.res.Resources, android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
    ctor public deprecated NinePatchDrawable(android.graphics.NinePatch);
    ctor public NinePatchDrawable(android.content.res.Resources, android.graphics.NinePatch);
    method public void draw(android.graphics.Canvas);
    method public int getOpacity();
    method public android.graphics.Paint getPaint();
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setTargetDensity(android.graphics.Canvas);
    method public void setTargetDensity(android.util.DisplayMetrics);
    method public void setTargetDensity(int);
  }

  public class PaintDrawable extends android.graphics.drawable.ShapeDrawable {
    ctor public PaintDrawable();
    ctor public PaintDrawable(int);
    method public void setCornerRadii(float[]);
    method public void setCornerRadius(float);
  }

  public class PictureDrawable extends android.graphics.drawable.Drawable {
    ctor public PictureDrawable(android.graphics.Picture);
    method public void draw(android.graphics.Canvas);
    method public int getOpacity();
    method public android.graphics.Picture getPicture();
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setPicture(android.graphics.Picture);
  }

  public class RippleDrawable extends android.graphics.drawable.LayerDrawable {
    ctor public RippleDrawable(android.content.res.ColorStateList, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
    method public int getRadius();
    method public void setColor(android.content.res.ColorStateList);
    method public void setRadius(int);
    field public static final int RADIUS_AUTO = -1; // 0xffffffff
  }

  public class RotateDrawable extends android.graphics.drawable.DrawableWrapper {
    ctor public RotateDrawable();
    method public float getFromDegrees();
    method public float getPivotX();
    method public float getPivotY();
    method public float getToDegrees();
    method public boolean isPivotXRelative();
    method public boolean isPivotYRelative();
    method public void setFromDegrees(float);
    method public void setPivotX(float);
    method public void setPivotXRelative(boolean);
    method public void setPivotY(float);
    method public void setPivotYRelative(boolean);
    method public void setToDegrees(float);
  }

  public class ScaleDrawable extends android.graphics.drawable.DrawableWrapper {
    ctor public ScaleDrawable(android.graphics.drawable.Drawable, int, float, float);
  }

  public class ShapeDrawable extends android.graphics.drawable.Drawable {
    ctor public ShapeDrawable();
    ctor public ShapeDrawable(android.graphics.drawable.shapes.Shape);
    method public void draw(android.graphics.Canvas);
    method public int getOpacity();
    method public android.graphics.Paint getPaint();
    method public android.graphics.drawable.ShapeDrawable.ShaderFactory getShaderFactory();
    method public android.graphics.drawable.shapes.Shape getShape();
    method protected boolean inflateTag(java.lang.String, android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet);
    method protected void onDraw(android.graphics.drawable.shapes.Shape, android.graphics.Canvas, android.graphics.Paint);
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setIntrinsicHeight(int);
    method public void setIntrinsicWidth(int);
    method public void setPadding(int, int, int, int);
    method public void setPadding(android.graphics.Rect);
    method public void setShaderFactory(android.graphics.drawable.ShapeDrawable.ShaderFactory);
    method public void setShape(android.graphics.drawable.shapes.Shape);
  }

  public static abstract class ShapeDrawable.ShaderFactory {
    ctor public ShapeDrawable.ShaderFactory();
    method public abstract android.graphics.Shader resize(int, int);
  }

  public class StateListDrawable extends android.graphics.drawable.DrawableContainer {
    ctor public StateListDrawable();
    method public void addState(int[], android.graphics.drawable.Drawable);
  }

  public class TransitionDrawable extends android.graphics.drawable.LayerDrawable implements android.graphics.drawable.Drawable.Callback {
    ctor public TransitionDrawable(android.graphics.drawable.Drawable[]);
    method public boolean isCrossFadeEnabled();
    method public void resetTransition();
    method public void reverseTransition(int);
    method public void setCrossFadeEnabled(boolean);
    method public void startTransition(int);
  }

  public class VectorDrawable extends android.graphics.drawable.Drawable {
    ctor public VectorDrawable();
    method public void draw(android.graphics.Canvas);
    method public int getOpacity();
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
  }

}

package android.graphics.drawable.shapes {

  public class ArcShape extends android.graphics.drawable.shapes.RectShape {
    ctor public ArcShape(float, float);
  }

  public class OvalShape extends android.graphics.drawable.shapes.RectShape {
    ctor public OvalShape();
  }

  public class PathShape extends android.graphics.drawable.shapes.Shape {
    ctor public PathShape(android.graphics.Path, float, float);
    method public void draw(android.graphics.Canvas, android.graphics.Paint);
  }

  public class RectShape extends android.graphics.drawable.shapes.Shape {
    ctor public RectShape();
    method public void draw(android.graphics.Canvas, android.graphics.Paint);
    method protected final android.graphics.RectF rect();
  }

  public class RoundRectShape extends android.graphics.drawable.shapes.RectShape {
    ctor public RoundRectShape(float[], android.graphics.RectF, float[]);
  }

  public abstract class Shape implements java.lang.Cloneable {
    ctor public Shape();
    method public android.graphics.drawable.shapes.Shape clone() throws java.lang.CloneNotSupportedException;
    method public abstract void draw(android.graphics.Canvas, android.graphics.Paint);
    method public final float getHeight();
    method public void getOutline(android.graphics.Outline);
    method public final float getWidth();
    method public boolean hasAlpha();
    method protected void onResize(float, float);
    method public final void resize(float, float);
  }

}

package android.graphics.pdf {

  public class PdfDocument {
    ctor public PdfDocument();
    method public void close();
    method public void finishPage(android.graphics.pdf.PdfDocument.Page);
    method public java.util.List<android.graphics.pdf.PdfDocument.PageInfo> getPages();
    method public android.graphics.pdf.PdfDocument.Page startPage(android.graphics.pdf.PdfDocument.PageInfo);
    method public void writeTo(java.io.OutputStream) throws java.io.IOException;
  }

  public static final class PdfDocument.Page {
    method public android.graphics.Canvas getCanvas();
    method public android.graphics.pdf.PdfDocument.PageInfo getInfo();
  }

  public static final class PdfDocument.PageInfo {
    method public android.graphics.Rect getContentRect();
    method public int getPageHeight();
    method public int getPageNumber();
    method public int getPageWidth();
  }

  public static final class PdfDocument.PageInfo.Builder {
    ctor public PdfDocument.PageInfo.Builder(int, int, int);
    method public android.graphics.pdf.PdfDocument.PageInfo create();
    method public android.graphics.pdf.PdfDocument.PageInfo.Builder setContentRect(android.graphics.Rect);
  }

  public final class PdfRenderer implements java.lang.AutoCloseable {
    ctor public PdfRenderer(android.os.ParcelFileDescriptor) throws java.io.IOException;
    method public void close();
    method public int getPageCount();
    method public android.graphics.pdf.PdfRenderer.Page openPage(int);
    method public boolean shouldScaleForPrinting();
  }

  public final class PdfRenderer.Page implements java.lang.AutoCloseable {
    method public void close();
    method public int getHeight();
    method public int getIndex();
    method public int getWidth();
    method public void render(android.graphics.Bitmap, android.graphics.Rect, android.graphics.Matrix, int);
    field public static final int RENDER_MODE_FOR_DISPLAY = 1; // 0x1
    field public static final int RENDER_MODE_FOR_PRINT = 2; // 0x2
  }

}

package android.hardware {

  public deprecated class Camera {
    method public final void addCallbackBuffer(byte[]);
    method public final void autoFocus(android.hardware.Camera.AutoFocusCallback);
    method public final void cancelAutoFocus();
    method public final boolean enableShutterSound(boolean);
    method public static void getCameraInfo(int, android.hardware.Camera.CameraInfo);
    method public static int getNumberOfCameras();
    method public android.hardware.Camera.Parameters getParameters();
    method public final void lock();
    method public static android.hardware.Camera open(int);
    method public static android.hardware.Camera open();
    method public final void reconnect() throws java.io.IOException;
    method public final void release();
    method public void setAutoFocusMoveCallback(android.hardware.Camera.AutoFocusMoveCallback);
    method public final void setDisplayOrientation(int);
    method public final void setErrorCallback(android.hardware.Camera.ErrorCallback);
    method public final void setFaceDetectionListener(android.hardware.Camera.FaceDetectionListener);
    method public final void setOneShotPreviewCallback(android.hardware.Camera.PreviewCallback);
    method public void setParameters(android.hardware.Camera.Parameters);
    method public final void setPreviewCallback(android.hardware.Camera.PreviewCallback);
    method public final void setPreviewCallbackWithBuffer(android.hardware.Camera.PreviewCallback);
    method public final void setPreviewDisplay(android.view.SurfaceHolder) throws java.io.IOException;
    method public final void setPreviewTexture(android.graphics.SurfaceTexture) throws java.io.IOException;
    method public final void setZoomChangeListener(android.hardware.Camera.OnZoomChangeListener);
    method public final void startFaceDetection();
    method public final void startPreview();
    method public final void startSmoothZoom(int);
    method public final void stopFaceDetection();
    method public final void stopPreview();
    method public final void stopSmoothZoom();
    method public final void takePicture(android.hardware.Camera.ShutterCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback);
    method public final void takePicture(android.hardware.Camera.ShutterCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback);
    method public final void unlock();
    field public static final java.lang.String ACTION_NEW_PICTURE = "android.hardware.action.NEW_PICTURE";
    field public static final java.lang.String ACTION_NEW_VIDEO = "android.hardware.action.NEW_VIDEO";
    field public static final int CAMERA_ERROR_SERVER_DIED = 100; // 0x64
    field public static final int CAMERA_ERROR_UNKNOWN = 1; // 0x1
  }

  public static deprecated class Camera.Area {
    ctor public Camera.Area(android.graphics.Rect, int);
    field public android.graphics.Rect rect;
    field public int weight;
  }

  public static abstract deprecated interface Camera.AutoFocusCallback {
    method public abstract void onAutoFocus(boolean, android.hardware.Camera);
  }

  public static abstract deprecated interface Camera.AutoFocusMoveCallback {
    method public abstract void onAutoFocusMoving(boolean, android.hardware.Camera);
  }

  public static deprecated class Camera.CameraInfo {
    ctor public Camera.CameraInfo();
    field public static final int CAMERA_FACING_BACK = 0; // 0x0
    field public static final int CAMERA_FACING_FRONT = 1; // 0x1
    field public boolean canDisableShutterSound;
    field public int facing;
    field public int orientation;
  }

  public static abstract deprecated interface Camera.ErrorCallback {
    method public abstract void onError(int, android.hardware.Camera);
  }

  public static deprecated class Camera.Face {
    ctor public Camera.Face();
    field public int id;
    field public android.graphics.Point leftEye;
    field public android.graphics.Point mouth;
    field public android.graphics.Rect rect;
    field public android.graphics.Point rightEye;
    field public int score;
  }

  public static abstract deprecated interface Camera.FaceDetectionListener {
    method public abstract void onFaceDetection(android.hardware.Camera.Face[], android.hardware.Camera);
  }

  public static abstract deprecated interface Camera.OnZoomChangeListener {
    method public abstract void onZoomChange(int, boolean, android.hardware.Camera);
  }

  public deprecated class Camera.Parameters {
    method public java.lang.String flatten();
    method public java.lang.String get(java.lang.String);
    method public java.lang.String getAntibanding();
    method public boolean getAutoExposureLock();
    method public boolean getAutoWhiteBalanceLock();
    method public java.lang.String getColorEffect();
    method public int getExposureCompensation();
    method public float getExposureCompensationStep();
    method public java.lang.String getFlashMode();
    method public float getFocalLength();
    method public java.util.List<android.hardware.Camera.Area> getFocusAreas();
    method public void getFocusDistances(float[]);
    method public java.lang.String getFocusMode();
    method public float getHorizontalViewAngle();
    method public int getInt(java.lang.String);
    method public int getJpegQuality();
    method public int getJpegThumbnailQuality();
    method public android.hardware.Camera.Size getJpegThumbnailSize();
    method public int getMaxExposureCompensation();
    method public int getMaxNumDetectedFaces();
    method public int getMaxNumFocusAreas();
    method public int getMaxNumMeteringAreas();
    method public int getMaxZoom();
    method public java.util.List<android.hardware.Camera.Area> getMeteringAreas();
    method public int getMinExposureCompensation();
    method public int getPictureFormat();
    method public android.hardware.Camera.Size getPictureSize();
    method public android.hardware.Camera.Size getPreferredPreviewSizeForVideo();
    method public int getPreviewFormat();
    method public void getPreviewFpsRange(int[]);
    method public deprecated int getPreviewFrameRate();
    method public android.hardware.Camera.Size getPreviewSize();
    method public java.lang.String getSceneMode();
    method public java.util.List<java.lang.String> getSupportedAntibanding();
    method public java.util.List<java.lang.String> getSupportedColorEffects();
    method public java.util.List<java.lang.String> getSupportedFlashModes();
    method public java.util.List<java.lang.String> getSupportedFocusModes();
    method public java.util.List<android.hardware.Camera.Size> getSupportedJpegThumbnailSizes();
    method public java.util.List<java.lang.Integer> getSupportedPictureFormats();
    method public java.util.List<android.hardware.Camera.Size> getSupportedPictureSizes();
    method public java.util.List<java.lang.Integer> getSupportedPreviewFormats();
    method public java.util.List<int[]> getSupportedPreviewFpsRange();
    method public deprecated java.util.List<java.lang.Integer> getSupportedPreviewFrameRates();
    method public java.util.List<android.hardware.Camera.Size> getSupportedPreviewSizes();
    method public java.util.List<java.lang.String> getSupportedSceneModes();
    method public java.util.List<android.hardware.Camera.Size> getSupportedVideoSizes();
    method public java.util.List<java.lang.String> getSupportedWhiteBalance();
    method public float getVerticalViewAngle();
    method public boolean getVideoStabilization();
    method public java.lang.String getWhiteBalance();
    method public int getZoom();
    method public java.util.List<java.lang.Integer> getZoomRatios();
    method public boolean isAutoExposureLockSupported();
    method public boolean isAutoWhiteBalanceLockSupported();
    method public boolean isSmoothZoomSupported();
    method public boolean isVideoSnapshotSupported();
    method public boolean isVideoStabilizationSupported();
    method public boolean isZoomSupported();
    method public void remove(java.lang.String);
    method public void removeGpsData();
    method public void set(java.lang.String, java.lang.String);
    method public void set(java.lang.String, int);
    method public void setAntibanding(java.lang.String);
    method public void setAutoExposureLock(boolean);
    method public void setAutoWhiteBalanceLock(boolean);
    method public void setColorEffect(java.lang.String);
    method public void setExposureCompensation(int);
    method public void setFlashMode(java.lang.String);
    method public void setFocusAreas(java.util.List<android.hardware.Camera.Area>);
    method public void setFocusMode(java.lang.String);
    method public void setGpsAltitude(double);
    method public void setGpsLatitude(double);
    method public void setGpsLongitude(double);
    method public void setGpsProcessingMethod(java.lang.String);
    method public void setGpsTimestamp(long);
    method public void setJpegQuality(int);
    method public void setJpegThumbnailQuality(int);
    method public void setJpegThumbnailSize(int, int);
    method public void setMeteringAreas(java.util.List<android.hardware.Camera.Area>);
    method public void setPictureFormat(int);
    method public void setPictureSize(int, int);
    method public void setPreviewFormat(int);
    method public void setPreviewFpsRange(int, int);
    method public deprecated void setPreviewFrameRate(int);
    method public void setPreviewSize(int, int);
    method public void setRecordingHint(boolean);
    method public void setRotation(int);
    method public void setSceneMode(java.lang.String);
    method public void setVideoStabilization(boolean);
    method public void setWhiteBalance(java.lang.String);
    method public void setZoom(int);
    method public void unflatten(java.lang.String);
    field public static final java.lang.String ANTIBANDING_50HZ = "50hz";
    field public static final java.lang.String ANTIBANDING_60HZ = "60hz";
    field public static final java.lang.String ANTIBANDING_AUTO = "auto";
    field public static final java.lang.String ANTIBANDING_OFF = "off";
    field public static final java.lang.String EFFECT_AQUA = "aqua";
    field public static final java.lang.String EFFECT_BLACKBOARD = "blackboard";
    field public static final java.lang.String EFFECT_MONO = "mono";
    field public static final java.lang.String EFFECT_NEGATIVE = "negative";
    field public static final java.lang.String EFFECT_NONE = "none";
    field public static final java.lang.String EFFECT_POSTERIZE = "posterize";
    field public static final java.lang.String EFFECT_SEPIA = "sepia";
    field public static final java.lang.String EFFECT_SOLARIZE = "solarize";
    field public static final java.lang.String EFFECT_WHITEBOARD = "whiteboard";
    field public static final java.lang.String FLASH_MODE_AUTO = "auto";
    field public static final java.lang.String FLASH_MODE_OFF = "off";
    field public static final java.lang.String FLASH_MODE_ON = "on";
    field public static final java.lang.String FLASH_MODE_RED_EYE = "red-eye";
    field public static final java.lang.String FLASH_MODE_TORCH = "torch";
    field public static final int FOCUS_DISTANCE_FAR_INDEX = 2; // 0x2
    field public static final int FOCUS_DISTANCE_NEAR_INDEX = 0; // 0x0
    field public static final int FOCUS_DISTANCE_OPTIMAL_INDEX = 1; // 0x1
    field public static final java.lang.String FOCUS_MODE_AUTO = "auto";
    field public static final java.lang.String FOCUS_MODE_CONTINUOUS_PICTURE = "continuous-picture";
    field public static final java.lang.String FOCUS_MODE_CONTINUOUS_VIDEO = "continuous-video";
    field public static final java.lang.String FOCUS_MODE_EDOF = "edof";
    field public static final java.lang.String FOCUS_MODE_FIXED = "fixed";
    field public static final java.lang.String FOCUS_MODE_INFINITY = "infinity";
    field public static final java.lang.String FOCUS_MODE_MACRO = "macro";
    field public static final int PREVIEW_FPS_MAX_INDEX = 1; // 0x1
    field public static final int PREVIEW_FPS_MIN_INDEX = 0; // 0x0
    field public static final java.lang.String SCENE_MODE_ACTION = "action";
    field public static final java.lang.String SCENE_MODE_AUTO = "auto";
    field public static final java.lang.String SCENE_MODE_BARCODE = "barcode";
    field public static final java.lang.String SCENE_MODE_BEACH = "beach";
    field public static final java.lang.String SCENE_MODE_CANDLELIGHT = "candlelight";
    field public static final java.lang.String SCENE_MODE_FIREWORKS = "fireworks";
    field public static final java.lang.String SCENE_MODE_HDR = "hdr";
    field public static final java.lang.String SCENE_MODE_LANDSCAPE = "landscape";
    field public static final java.lang.String SCENE_MODE_NIGHT = "night";
    field public static final java.lang.String SCENE_MODE_NIGHT_PORTRAIT = "night-portrait";
    field public static final java.lang.String SCENE_MODE_PARTY = "party";
    field public static final java.lang.String SCENE_MODE_PORTRAIT = "portrait";
    field public static final java.lang.String SCENE_MODE_SNOW = "snow";
    field public static final java.lang.String SCENE_MODE_SPORTS = "sports";
    field public static final java.lang.String SCENE_MODE_STEADYPHOTO = "steadyphoto";
    field public static final java.lang.String SCENE_MODE_SUNSET = "sunset";
    field public static final java.lang.String SCENE_MODE_THEATRE = "theatre";
    field public static final java.lang.String WHITE_BALANCE_AUTO = "auto";
    field public static final java.lang.String WHITE_BALANCE_CLOUDY_DAYLIGHT = "cloudy-daylight";
    field public static final java.lang.String WHITE_BALANCE_DAYLIGHT = "daylight";
    field public static final java.lang.String WHITE_BALANCE_FLUORESCENT = "fluorescent";
    field public static final java.lang.String WHITE_BALANCE_INCANDESCENT = "incandescent";
    field public static final java.lang.String WHITE_BALANCE_SHADE = "shade";
    field public static final java.lang.String WHITE_BALANCE_TWILIGHT = "twilight";
    field public static final java.lang.String WHITE_BALANCE_WARM_FLUORESCENT = "warm-fluorescent";
  }

  public static abstract deprecated interface Camera.PictureCallback {
    method public abstract void onPictureTaken(byte[], android.hardware.Camera);
  }

  public static abstract deprecated interface Camera.PreviewCallback {
    method public abstract void onPreviewFrame(byte[], android.hardware.Camera);
  }

  public static abstract deprecated interface Camera.ShutterCallback {
    method public abstract void onShutter();
  }

  public deprecated class Camera.Size {
    ctor public Camera.Size(int, int);
    field public int height;
    field public int width;
  }

  public final class ConsumerIrManager {
    method public android.hardware.ConsumerIrManager.CarrierFrequencyRange[] getCarrierFrequencies();
    method public boolean hasIrEmitter();
    method public void transmit(int, int[]);
  }

  public final class ConsumerIrManager.CarrierFrequencyRange {
    ctor public ConsumerIrManager.CarrierFrequencyRange(int, int);
    method public int getMaxFrequency();
    method public int getMinFrequency();
  }

  public class GeomagneticField {
    ctor public GeomagneticField(float, float, float, long);
    method public float getDeclination();
    method public float getFieldStrength();
    method public float getHorizontalStrength();
    method public float getInclination();
    method public float getX();
    method public float getY();
    method public float getZ();
  }

  public final class Sensor {
    method public int getFifoMaxEventCount();
    method public int getFifoReservedEventCount();
    method public int getMaxDelay();
    method public float getMaximumRange();
    method public int getMinDelay();
    method public java.lang.String getName();
    method public float getPower();
    method public int getReportingMode();
    method public float getResolution();
    method public java.lang.String getStringType();
    method public int getType();
    method public java.lang.String getVendor();
    method public int getVersion();
    method public boolean isWakeUpSensor();
    field public static final int REPORTING_MODE_CONTINUOUS = 0; // 0x0
    field public static final int REPORTING_MODE_ONE_SHOT = 2; // 0x2
    field public static final int REPORTING_MODE_ON_CHANGE = 1; // 0x1
    field public static final int REPORTING_MODE_SPECIAL_TRIGGER = 3; // 0x3
    field public static final java.lang.String STRING_TYPE_ACCELEROMETER = "android.sensor.accelerometer";
    field public static final java.lang.String STRING_TYPE_AMBIENT_TEMPERATURE = "android.sensor.ambient_temperature";
    field public static final java.lang.String STRING_TYPE_GAME_ROTATION_VECTOR = "android.sensor.game_rotation_vector";
    field public static final java.lang.String STRING_TYPE_GEOMAGNETIC_ROTATION_VECTOR = "android.sensor.geomagnetic_rotation_vector";
    field public static final java.lang.String STRING_TYPE_GRAVITY = "android.sensor.gravity";
    field public static final java.lang.String STRING_TYPE_GYROSCOPE = "android.sensor.gyroscope";
    field public static final java.lang.String STRING_TYPE_GYROSCOPE_UNCALIBRATED = "android.sensor.gyroscope_uncalibrated";
    field public static final java.lang.String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate";
    field public static final java.lang.String STRING_TYPE_LIGHT = "android.sensor.light";
    field public static final java.lang.String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration";
    field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field";
    field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED = "android.sensor.magnetic_field_uncalibrated";
    field public static final deprecated java.lang.String STRING_TYPE_ORIENTATION = "android.sensor.orientation";
    field public static final java.lang.String STRING_TYPE_PRESSURE = "android.sensor.pressure";
    field public static final java.lang.String STRING_TYPE_PROXIMITY = "android.sensor.proximity";
    field public static final java.lang.String STRING_TYPE_RELATIVE_HUMIDITY = "android.sensor.relative_humidity";
    field public static final java.lang.String STRING_TYPE_ROTATION_VECTOR = "android.sensor.rotation_vector";
    field public static final java.lang.String STRING_TYPE_SIGNIFICANT_MOTION = "android.sensor.significant_motion";
    field public static final java.lang.String STRING_TYPE_STEP_COUNTER = "android.sensor.step_counter";
    field public static final java.lang.String STRING_TYPE_STEP_DETECTOR = "android.sensor.step_detector";
    field public static final deprecated java.lang.String STRING_TYPE_TEMPERATURE = "android.sensor.temperature";
    field public static final int TYPE_ACCELEROMETER = 1; // 0x1
    field public static final int TYPE_ALL = -1; // 0xffffffff
    field public static final int TYPE_AMBIENT_TEMPERATURE = 13; // 0xd
    field public static final int TYPE_GAME_ROTATION_VECTOR = 15; // 0xf
    field public static final int TYPE_GEOMAGNETIC_ROTATION_VECTOR = 20; // 0x14
    field public static final int TYPE_GRAVITY = 9; // 0x9
    field public static final int TYPE_GYROSCOPE = 4; // 0x4
    field public static final int TYPE_GYROSCOPE_UNCALIBRATED = 16; // 0x10
    field public static final int TYPE_HEART_RATE = 21; // 0x15
    field public static final int TYPE_LIGHT = 5; // 0x5
    field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa
    field public static final int TYPE_MAGNETIC_FIELD = 2; // 0x2
    field public static final int TYPE_MAGNETIC_FIELD_UNCALIBRATED = 14; // 0xe
    field public static final deprecated int TYPE_ORIENTATION = 3; // 0x3
    field public static final int TYPE_PRESSURE = 6; // 0x6
    field public static final int TYPE_PROXIMITY = 8; // 0x8
    field public static final int TYPE_RELATIVE_HUMIDITY = 12; // 0xc
    field public static final int TYPE_ROTATION_VECTOR = 11; // 0xb
    field public static final int TYPE_SIGNIFICANT_MOTION = 17; // 0x11
    field public static final int TYPE_STEP_COUNTER = 19; // 0x13
    field public static final int TYPE_STEP_DETECTOR = 18; // 0x12
    field public static final deprecated int TYPE_TEMPERATURE = 7; // 0x7
  }

  public class SensorEvent {
    field public int accuracy;
    field public android.hardware.Sensor sensor;
    field public long timestamp;
    field public final float[] values;
  }

  public abstract interface SensorEventListener {
    method public abstract void onAccuracyChanged(android.hardware.Sensor, int);
    method public abstract void onSensorChanged(android.hardware.SensorEvent);
  }

  public abstract interface SensorEventListener2 implements android.hardware.SensorEventListener {
    method public abstract void onFlushCompleted(android.hardware.Sensor);
  }

  public abstract deprecated interface SensorListener {
    method public abstract void onAccuracyChanged(int, int);
    method public abstract void onSensorChanged(int, float[]);
  }

  public abstract class SensorManager {
    method public boolean cancelTriggerSensor(android.hardware.TriggerEventListener, android.hardware.Sensor);
    method public boolean flush(android.hardware.SensorEventListener);
    method public static float getAltitude(float, float);
    method public static void getAngleChange(float[], float[], float[]);
    method public android.hardware.Sensor getDefaultSensor(int);
    method public android.hardware.Sensor getDefaultSensor(int, boolean);
    method public static float getInclination(float[]);
    method public static float[] getOrientation(float[], float[]);
    method public static void getQuaternionFromVector(float[], float[]);
    method public static boolean getRotationMatrix(float[], float[], float[], float[]);
    method public static void getRotationMatrixFromVector(float[], float[]);
    method public java.util.List<android.hardware.Sensor> getSensorList(int);
    method public deprecated int getSensors();
    method public deprecated boolean registerListener(android.hardware.SensorListener, int);
    method public deprecated boolean registerListener(android.hardware.SensorListener, int, int);
    method public boolean registerListener(android.hardware.SensorEventListener, android.hardware.Sensor, int);
    method public boolean registerListener(android.hardware.SensorEventListener, android.hardware.Sensor, int, int);
    method public boolean registerListener(android.hardware.SensorEventListener, android.hardware.Sensor, int, android.os.Handler);
    method public boolean registerListener(android.hardware.SensorEventListener, android.hardware.Sensor, int, int, android.os.Handler);
    method public static boolean remapCoordinateSystem(float[], int, int, float[]);
    method public boolean requestTriggerSensor(android.hardware.TriggerEventListener, android.hardware.Sensor);
    method public deprecated void unregisterListener(android.hardware.SensorListener);
    method public deprecated void unregisterListener(android.hardware.SensorListener, int);
    method public void unregisterListener(android.hardware.SensorEventListener, android.hardware.Sensor);
    method public void unregisterListener(android.hardware.SensorEventListener);
    field public static final int AXIS_MINUS_X = 129; // 0x81
    field public static final int AXIS_MINUS_Y = 130; // 0x82
    field public static final int AXIS_MINUS_Z = 131; // 0x83
    field public static final int AXIS_X = 1; // 0x1
    field public static final int AXIS_Y = 2; // 0x2
    field public static final int AXIS_Z = 3; // 0x3
    field public static final deprecated int DATA_X = 0; // 0x0
    field public static final deprecated int DATA_Y = 1; // 0x1
    field public static final deprecated int DATA_Z = 2; // 0x2
    field public static final float GRAVITY_DEATH_STAR_I = 3.5303614E-7f;
    field public static final float GRAVITY_EARTH = 9.80665f;
    field public static final float GRAVITY_JUPITER = 23.12f;
    field public static final float GRAVITY_MARS = 3.71f;
    field public static final float GRAVITY_MERCURY = 3.7f;
    field public static final float GRAVITY_MOON = 1.6f;
    field public static final float GRAVITY_NEPTUNE = 11.0f;
    field public static final float GRAVITY_PLUTO = 0.6f;
    field public static final float GRAVITY_SATURN = 8.96f;
    field public static final float GRAVITY_SUN = 275.0f;
    field public static final float GRAVITY_THE_ISLAND = 4.815162f;
    field public static final float GRAVITY_URANUS = 8.69f;
    field public static final float GRAVITY_VENUS = 8.87f;
    field public static final float LIGHT_CLOUDY = 100.0f;
    field public static final float LIGHT_FULLMOON = 0.25f;
    field public static final float LIGHT_NO_MOON = 0.001f;
    field public static final float LIGHT_OVERCAST = 10000.0f;
    field public static final float LIGHT_SHADE = 20000.0f;
    field public static final float LIGHT_SUNLIGHT = 110000.0f;
    field public static final float LIGHT_SUNLIGHT_MAX = 120000.0f;
    field public static final float LIGHT_SUNRISE = 400.0f;
    field public static final float MAGNETIC_FIELD_EARTH_MAX = 60.0f;
    field public static final float MAGNETIC_FIELD_EARTH_MIN = 30.0f;
    field public static final float PRESSURE_STANDARD_ATMOSPHERE = 1013.25f;
    field public static final deprecated int RAW_DATA_INDEX = 3; // 0x3
    field public static final deprecated int RAW_DATA_X = 3; // 0x3
    field public static final deprecated int RAW_DATA_Y = 4; // 0x4
    field public static final deprecated int RAW_DATA_Z = 5; // 0x5
    field public static final deprecated int SENSOR_ACCELEROMETER = 2; // 0x2
    field public static final deprecated int SENSOR_ALL = 127; // 0x7f
    field public static final int SENSOR_DELAY_FASTEST = 0; // 0x0
    field public static final int SENSOR_DELAY_GAME = 1; // 0x1
    field public static final int SENSOR_DELAY_NORMAL = 3; // 0x3
    field public static final int SENSOR_DELAY_UI = 2; // 0x2
    field public static final deprecated int SENSOR_LIGHT = 16; // 0x10
    field public static final deprecated int SENSOR_MAGNETIC_FIELD = 8; // 0x8
    field public static final deprecated int SENSOR_MAX = 64; // 0x40
    field public static final deprecated int SENSOR_MIN = 1; // 0x1
    field public static final deprecated int SENSOR_ORIENTATION = 1; // 0x1
    field public static final deprecated int SENSOR_ORIENTATION_RAW = 128; // 0x80
    field public static final deprecated int SENSOR_PROXIMITY = 32; // 0x20
    field public static final int SENSOR_STATUS_ACCURACY_HIGH = 3; // 0x3
    field public static final int SENSOR_STATUS_ACCURACY_LOW = 1; // 0x1
    field public static final int SENSOR_STATUS_ACCURACY_MEDIUM = 2; // 0x2
    field public static final int SENSOR_STATUS_NO_CONTACT = -1; // 0xffffffff
    field public static final int SENSOR_STATUS_UNRELIABLE = 0; // 0x0
    field public static final deprecated int SENSOR_TEMPERATURE = 4; // 0x4
    field public static final deprecated int SENSOR_TRICORDER = 64; // 0x40
    field public static final float STANDARD_GRAVITY = 9.80665f;
  }

  public final class TriggerEvent {
    field public android.hardware.Sensor sensor;
    field public long timestamp;
    field public final float[] values;
  }

  public abstract class TriggerEventListener {
    ctor public TriggerEventListener();
    method public abstract void onTrigger(android.hardware.TriggerEvent);
  }

}

package android.hardware.camera2 {

  public class CameraAccessException extends android.util.AndroidException {
    ctor public CameraAccessException(int);
    ctor public CameraAccessException(int, java.lang.String);
    ctor public CameraAccessException(int, java.lang.String, java.lang.Throwable);
    ctor public CameraAccessException(int, java.lang.Throwable);
    method public final int getReason();
    field public static final int CAMERA_DISABLED = 1; // 0x1
    field public static final int CAMERA_DISCONNECTED = 2; // 0x2
    field public static final int CAMERA_ERROR = 3; // 0x3
    field public static final int CAMERA_IN_USE = 4; // 0x4
    field public static final int MAX_CAMERAS_IN_USE = 5; // 0x5
  }

  public abstract class CameraCaptureSession implements java.lang.AutoCloseable {
    ctor public CameraCaptureSession();
    method public abstract void abortCaptures() throws android.hardware.camera2.CameraAccessException;
    method public abstract int capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract int captureBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract void close();
    method public abstract android.hardware.camera2.CameraDevice getDevice();
    method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract void stopRepeating() throws android.hardware.camera2.CameraAccessException;
  }

  public static abstract class CameraCaptureSession.CaptureCallback {
    ctor public CameraCaptureSession.CaptureCallback();
    method public void onCaptureCompleted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.TotalCaptureResult);
    method public void onCaptureFailed(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureFailure);
    method public void onCaptureProgressed(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureResult);
    method public void onCaptureSequenceAborted(android.hardware.camera2.CameraCaptureSession, int);
    method public void onCaptureSequenceCompleted(android.hardware.camera2.CameraCaptureSession, int, long);
    method public void onCaptureStarted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, long, long);
  }

  public static abstract class CameraCaptureSession.StateCallback {
    ctor public CameraCaptureSession.StateCallback();
    method public void onActive(android.hardware.camera2.CameraCaptureSession);
    method public void onClosed(android.hardware.camera2.CameraCaptureSession);
    method public abstract void onConfigureFailed(android.hardware.camera2.CameraCaptureSession);
    method public abstract void onConfigured(android.hardware.camera2.CameraCaptureSession);
    method public void onReady(android.hardware.camera2.CameraCaptureSession);
  }

  public final class CameraCharacteristics extends android.hardware.camera2.CameraMetadata {
    method public T get(android.hardware.camera2.CameraCharacteristics.Key<T>);
    method public java.util.List<android.hardware.camera2.CaptureRequest.Key<?>> getAvailableCaptureRequestKeys();
    method public java.util.List<android.hardware.camera2.CaptureResult.Key<?>> getAvailableCaptureResultKeys();
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AE_AVAILABLE_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Range<java.lang.Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Range<java.lang.Integer>> CONTROL_AE_COMPENSATION_RANGE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Rational> CONTROL_AE_COMPENSATION_STEP;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Boolean> CONTROL_AE_LOCK_AVAILABLE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AF_AVAILABLE_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_EFFECTS;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_SCENE_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AWB_AVAILABLE_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Boolean> CONTROL_AWB_LOCK_AVAILABLE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> CONTROL_MAX_REGIONS_AE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> CONTROL_MAX_REGIONS_AF;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> CONTROL_MAX_REGIONS_AWB;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> EDGE_AVAILABLE_EDGE_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Boolean> FLASH_INFO_AVAILABLE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> INFO_SUPPORTED_HARDWARE_LEVEL;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> LENS_FACING;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<float[]> LENS_INFO_AVAILABLE_APERTURES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Float> LENS_INFO_HYPERFOCAL_DISTANCE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<float[]> LENS_INTRINSIC_CALIBRATION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<float[]> LENS_POSE_ROTATION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<float[]> LENS_POSE_TRANSLATION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<float[]> LENS_RADIAL_DISTORTION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> REQUEST_AVAILABLE_CAPABILITIES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_INPUT_STREAMS;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_PROC;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_RAW;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_PARTIAL_RESULT_COUNT;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Byte> REQUEST_PIPELINE_MAX_DEPTH;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SCALER_CROPPING_TYPE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Range<java.lang.Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Boolean> SENSOR_INFO_LENS_SHADING_APPLIED;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Long> SENSOR_INFO_MAX_FRAME_DURATION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Range<java.lang.Integer>> SENSOR_INFO_SENSITIVITY_RANGE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SENSOR_INFO_TIMESTAMP_SOURCE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SENSOR_INFO_WHITE_LEVEL;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SENSOR_MAX_ANALOG_SENSITIVITY;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SENSOR_ORIENTATION;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SENSOR_REFERENCE_ILLUMINANT1;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Byte> SENSOR_REFERENCE_ILLUMINANT2;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> SHADING_AVAILABLE_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<byte[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> STATISTICS_INFO_MAX_FACE_COUNT;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SYNC_MAX_LATENCY;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> TONEMAP_MAX_CURVE_POINTS;
  }

  public static final class CameraCharacteristics.Key {
    method public final boolean equals(java.lang.Object);
    method public java.lang.String getName();
    method public final int hashCode();
  }

  public abstract class CameraDevice implements java.lang.AutoCloseable {
    method public abstract void close();
    method public abstract android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int) throws android.hardware.camera2.CameraAccessException;
    method public abstract void createCaptureSession(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract java.lang.String getId();
    field public static final int TEMPLATE_MANUAL = 6; // 0x6
    field public static final int TEMPLATE_PREVIEW = 1; // 0x1
    field public static final int TEMPLATE_RECORD = 3; // 0x3
    field public static final int TEMPLATE_STILL_CAPTURE = 2; // 0x2
    field public static final int TEMPLATE_VIDEO_SNAPSHOT = 4; // 0x4
    field public static final int TEMPLATE_ZERO_SHUTTER_LAG = 5; // 0x5
  }

  public static abstract class CameraDevice.StateCallback {
    ctor public CameraDevice.StateCallback();
    method public void onClosed(android.hardware.camera2.CameraDevice);
    method public abstract void onDisconnected(android.hardware.camera2.CameraDevice);
    method public abstract void onError(android.hardware.camera2.CameraDevice, int);
    method public abstract void onOpened(android.hardware.camera2.CameraDevice);
    field public static final int ERROR_CAMERA_DEVICE = 4; // 0x4
    field public static final int ERROR_CAMERA_DISABLED = 3; // 0x3
    field public static final int ERROR_CAMERA_IN_USE = 1; // 0x1
    field public static final int ERROR_CAMERA_SERVICE = 5; // 0x5
    field public static final int ERROR_MAX_CAMERAS_IN_USE = 2; // 0x2
  }

  public final class CameraManager {
    method public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(java.lang.String) throws android.hardware.camera2.CameraAccessException;
    method public java.lang.String[] getCameraIdList() throws android.hardware.camera2.CameraAccessException;
    method public void openCamera(java.lang.String, android.hardware.camera2.CameraDevice.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public void registerAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback, android.os.Handler);
    method public void registerTorchCallback(android.hardware.camera2.CameraManager.TorchCallback, android.os.Handler);
    method public void setTorchMode(java.lang.String, boolean) throws android.hardware.camera2.CameraAccessException;
    method public void unregisterAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback);
    method public void unregisterTorchCallback(android.hardware.camera2.CameraManager.TorchCallback);
  }

  public static abstract class CameraManager.AvailabilityCallback {
    ctor public CameraManager.AvailabilityCallback();
    method public void onCameraAvailable(java.lang.String);
    method public void onCameraUnavailable(java.lang.String);
  }

  public static abstract class CameraManager.TorchCallback {
    ctor public CameraManager.TorchCallback();
    method public void onTorchModeChanged(java.lang.String, boolean);
    method public void onTorchModeUnavailable(java.lang.String);
  }

  public abstract class CameraMetadata {
    method public java.util.List<TKey> getKeys();
    field public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1; // 0x1
    field public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0; // 0x0
    field public static final int COLOR_CORRECTION_MODE_FAST = 1; // 0x1
    field public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0; // 0x0
    field public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1; // 0x1
    field public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2; // 0x2
    field public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3; // 0x3
    field public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0; // 0x0
    field public static final int CONTROL_AE_MODE_OFF = 0; // 0x0
    field public static final int CONTROL_AE_MODE_ON = 1; // 0x1
    field public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3; // 0x3
    field public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2; // 0x2
    field public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4; // 0x4
    field public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2; // 0x2
    field public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0; // 0x0
    field public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1; // 0x1
    field public static final int CONTROL_AE_STATE_CONVERGED = 2; // 0x2
    field public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; // 0x4
    field public static final int CONTROL_AE_STATE_INACTIVE = 0; // 0x0
    field public static final int CONTROL_AE_STATE_LOCKED = 3; // 0x3
    field public static final int CONTROL_AE_STATE_PRECAPTURE = 5; // 0x5
    field public static final int CONTROL_AE_STATE_SEARCHING = 1; // 0x1
    field public static final int CONTROL_AF_MODE_AUTO = 1; // 0x1
    field public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4; // 0x4
    field public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3; // 0x3
    field public static final int CONTROL_AF_MODE_EDOF = 5; // 0x5
    field public static final int CONTROL_AF_MODE_MACRO = 2; // 0x2
    field public static final int CONTROL_AF_MODE_OFF = 0; // 0x0
    field public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3; // 0x3
    field public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4; // 0x4
    field public static final int CONTROL_AF_STATE_INACTIVE = 0; // 0x0
    field public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; // 0x5
    field public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; // 0x2
    field public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; // 0x1
    field public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; // 0x6
    field public static final int CONTROL_AF_TRIGGER_CANCEL = 2; // 0x2
    field public static final int CONTROL_AF_TRIGGER_IDLE = 0; // 0x0
    field public static final int CONTROL_AF_TRIGGER_START = 1; // 0x1
    field public static final int CONTROL_AWB_MODE_AUTO = 1; // 0x1
    field public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6; // 0x6
    field public static final int CONTROL_AWB_MODE_DAYLIGHT = 5; // 0x5
    field public static final int CONTROL_AWB_MODE_FLUORESCENT = 3; // 0x3
    field public static final int CONTROL_AWB_MODE_INCANDESCENT = 2; // 0x2
    field public static final int CONTROL_AWB_MODE_OFF = 0; // 0x0
    field public static final int CONTROL_AWB_MODE_SHADE = 8; // 0x8
    field public static final int CONTROL_AWB_MODE_TWILIGHT = 7; // 0x7
    field public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4; // 0x4
    field public static final int CONTROL_AWB_STATE_CONVERGED = 2; // 0x2
    field public static final int CONTROL_AWB_STATE_INACTIVE = 0; // 0x0
    field public static final int CONTROL_AWB_STATE_LOCKED = 3; // 0x3
    field public static final int CONTROL_AWB_STATE_SEARCHING = 1; // 0x1
    field public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; // 0x0
    field public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6; // 0x6
    field public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1; // 0x1
    field public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2; // 0x2
    field public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3; // 0x3
    field public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4; // 0x4
    field public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5; // 0x5
    field public static final int CONTROL_EFFECT_MODE_AQUA = 8; // 0x8
    field public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7; // 0x7
    field public static final int CONTROL_EFFECT_MODE_MONO = 1; // 0x1
    field public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2; // 0x2
    field public static final int CONTROL_EFFECT_MODE_OFF = 0; // 0x0
    field public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5; // 0x5
    field public static final int CONTROL_EFFECT_MODE_SEPIA = 4; // 0x4
    field public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3; // 0x3
    field public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6; // 0x6
    field public static final int CONTROL_MODE_AUTO = 1; // 0x1
    field public static final int CONTROL_MODE_OFF = 0; // 0x0
    field public static final int CONTROL_MODE_OFF_KEEP_STATE = 3; // 0x3
    field public static final int CONTROL_MODE_USE_SCENE_MODE = 2; // 0x2
    field public static final int CONTROL_SCENE_MODE_ACTION = 2; // 0x2
    field public static final int CONTROL_SCENE_MODE_BARCODE = 16; // 0x10
    field public static final int CONTROL_SCENE_MODE_BEACH = 8; // 0x8
    field public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15; // 0xf
    field public static final int CONTROL_SCENE_MODE_DISABLED = 0; // 0x0
    field public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1; // 0x1
    field public static final int CONTROL_SCENE_MODE_FIREWORKS = 12; // 0xc
    field public static final int CONTROL_SCENE_MODE_HDR = 18; // 0x12
    field public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17; // 0x11
    field public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4; // 0x4
    field public static final int CONTROL_SCENE_MODE_NIGHT = 5; // 0x5
    field public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6; // 0x6
    field public static final int CONTROL_SCENE_MODE_PARTY = 14; // 0xe
    field public static final int CONTROL_SCENE_MODE_PORTRAIT = 3; // 0x3
    field public static final int CONTROL_SCENE_MODE_SNOW = 9; // 0x9
    field public static final int CONTROL_SCENE_MODE_SPORTS = 13; // 0xd
    field public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11; // 0xb
    field public static final int CONTROL_SCENE_MODE_SUNSET = 10; // 0xa
    field public static final int CONTROL_SCENE_MODE_THEATRE = 7; // 0x7
    field public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0; // 0x0
    field public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1; // 0x1
    field public static final int EDGE_MODE_FAST = 1; // 0x1
    field public static final int EDGE_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int EDGE_MODE_OFF = 0; // 0x0
    field public static final int FLASH_MODE_OFF = 0; // 0x0
    field public static final int FLASH_MODE_SINGLE = 1; // 0x1
    field public static final int FLASH_MODE_TORCH = 2; // 0x2
    field public static final int FLASH_STATE_CHARGING = 1; // 0x1
    field public static final int FLASH_STATE_FIRED = 3; // 0x3
    field public static final int FLASH_STATE_PARTIAL = 4; // 0x4
    field public static final int FLASH_STATE_READY = 2; // 0x2
    field public static final int FLASH_STATE_UNAVAILABLE = 0; // 0x0
    field public static final int HOT_PIXEL_MODE_FAST = 1; // 0x1
    field public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int HOT_PIXEL_MODE_OFF = 0; // 0x0
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; // 0x1
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2; // 0x2
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; // 0x0
    field public static final int LENS_FACING_BACK = 1; // 0x1
    field public static final int LENS_FACING_EXTERNAL = 2; // 0x2
    field public static final int LENS_FACING_FRONT = 0; // 0x0
    field public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1; // 0x1
    field public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2; // 0x2
    field public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0; // 0x0
    field public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0; // 0x0
    field public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1; // 0x1
    field public static final int LENS_STATE_MOVING = 1; // 0x1
    field public static final int LENS_STATE_STATIONARY = 0; // 0x0
    field public static final int NOISE_REDUCTION_MODE_FAST = 1; // 0x1
    field public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int NOISE_REDUCTION_MODE_MINIMAL = 3; // 0x3
    field public static final int NOISE_REDUCTION_MODE_OFF = 0; // 0x0
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0; // 0x0
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6; // 0x6
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; // 0x2
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1; // 0x1
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4; // 0x4
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; // 0x3
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; // 0x5
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; // 0x7
    field public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0; // 0x0
    field public static final int SCALER_CROPPING_TYPE_FREEFORM = 1; // 0x1
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3; // 0x3
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2; // 0x2
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1; // 0x1
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4; // 0x4
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0; // 0x0
    field public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1; // 0x1
    field public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0; // 0x0
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10; // 0xa
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14; // 0xe
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23; // 0x17
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20; // 0x14
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21; // 0x15
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22; // 0x16
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1; // 0x1
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12; // 0xc
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13; // 0xd
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9; // 0x9
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4; // 0x4
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2; // 0x2
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24; // 0x18
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11; // 0xb
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17; // 0x11
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18; // 0x12
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19; // 0x13
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3; // 0x3
    field public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15; // 0xf
    field public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2; // 0x2
    field public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3; // 0x3
    field public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256; // 0x100
    field public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0; // 0x0
    field public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4; // 0x4
    field public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1; // 0x1
    field public static final int SHADING_MODE_FAST = 1; // 0x1
    field public static final int SHADING_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int SHADING_MODE_OFF = 0; // 0x0
    field public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2; // 0x2
    field public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0; // 0x0
    field public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1; // 0x1
    field public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0; // 0x0
    field public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1; // 0x1
    field public static final int STATISTICS_SCENE_FLICKER_50HZ = 1; // 0x1
    field public static final int STATISTICS_SCENE_FLICKER_60HZ = 2; // 0x2
    field public static final int STATISTICS_SCENE_FLICKER_NONE = 0; // 0x0
    field public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0; // 0x0
    field public static final int SYNC_MAX_LATENCY_UNKNOWN = -1; // 0xffffffff
    field public static final int TONEMAP_MODE_CONTRAST_CURVE = 0; // 0x0
    field public static final int TONEMAP_MODE_FAST = 1; // 0x1
    field public static final int TONEMAP_MODE_GAMMA_VALUE = 3; // 0x3
    field public static final int TONEMAP_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int TONEMAP_MODE_PRESET_CURVE = 4; // 0x4
    field public static final int TONEMAP_PRESET_CURVE_REC709 = 1; // 0x1
    field public static final int TONEMAP_PRESET_CURVE_SRGB = 0; // 0x0
  }

  public class CaptureFailure {
    method public long getFrameNumber();
    method public int getReason();
    method public android.hardware.camera2.CaptureRequest getRequest();
    method public int getSequenceId();
    method public boolean wasImageCaptured();
    field public static final int REASON_ERROR = 0; // 0x0
    field public static final int REASON_FLUSHED = 1; // 0x1
  }

  public final class CaptureRequest extends android.hardware.camera2.CameraMetadata implements android.os.Parcelable {
    method public int describeContents();
    method public T get(android.hardware.camera2.CaptureRequest.Key<T>);
    method public java.lang.Object getTag();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> BLACK_LEVEL_LOCK;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> COLOR_CORRECTION_ABERRATION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> COLOR_CORRECTION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AE_ANTIBANDING_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AE_EXPOSURE_COMPENSATION;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> CONTROL_AE_LOCK;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AE_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AE_PRECAPTURE_TRIGGER;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.util.Range<java.lang.Integer>> CONTROL_AE_TARGET_FPS_RANGE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AF_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AF_TRIGGER;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> CONTROL_AWB_LOCK;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AWB_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_CAPTURE_INTENT;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_EFFECT_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_SCENE_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_VIDEO_STABILIZATION_MODE;
    field public static final android.os.Parcelable.Creator<android.hardware.camera2.CaptureRequest> CREATOR;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> EDGE_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> FLASH_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> HOT_PIXEL_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.location.Location> JPEG_GPS_LOCATION;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> JPEG_ORIENTATION;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Byte> JPEG_QUALITY;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Byte> JPEG_THUMBNAIL_QUALITY;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.util.Size> JPEG_THUMBNAIL_SIZE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> LENS_APERTURE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> LENS_FILTER_DENSITY;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> LENS_FOCAL_LENGTH;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> LENS_FOCUS_DISTANCE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> LENS_OPTICAL_STABILIZATION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> NOISE_REDUCTION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.graphics.Rect> SCALER_CROP_REGION;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> SENSOR_EXPOSURE_TIME;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> SENSOR_FRAME_DURATION;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> SENSOR_SENSITIVITY;
    field public static final android.hardware.camera2.CaptureRequest.Key<int[]> SENSOR_TEST_PATTERN_DATA;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> SENSOR_TEST_PATTERN_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> SHADING_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> STATISTICS_FACE_DETECT_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> STATISTICS_HOT_PIXEL_MAP_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> STATISTICS_LENS_SHADING_MAP_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> TONEMAP_GAMMA;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> TONEMAP_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> TONEMAP_PRESET_CURVE;
  }

  public static final class CaptureRequest.Builder {
    method public void addTarget(android.view.Surface);
    method public android.hardware.camera2.CaptureRequest build();
    method public T get(android.hardware.camera2.CaptureRequest.Key<T>);
    method public void removeTarget(android.view.Surface);
    method public void set(android.hardware.camera2.CaptureRequest.Key<T>, T);
    method public void setTag(java.lang.Object);
  }

  public static final class CaptureRequest.Key {
    method public final boolean equals(java.lang.Object);
    method public java.lang.String getName();
    method public final int hashCode();
  }

  public class CaptureResult extends android.hardware.camera2.CameraMetadata {
    method public T get(android.hardware.camera2.CaptureResult.Key<T>);
    method public long getFrameNumber();
    method public android.hardware.camera2.CaptureRequest getRequest();
    method public int getSequenceId();
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Boolean> BLACK_LEVEL_LOCK;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> COLOR_CORRECTION_ABERRATION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> COLOR_CORRECTION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AE_ANTIBANDING_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AE_EXPOSURE_COMPENSATION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Boolean> CONTROL_AE_LOCK;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AE_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AE_PRECAPTURE_TRIGGER;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AE_STATE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.util.Range<java.lang.Integer>> CONTROL_AE_TARGET_FPS_RANGE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AF_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AF_STATE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AF_TRIGGER;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Boolean> CONTROL_AWB_LOCK;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AWB_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AWB_STATE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_CAPTURE_INTENT;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_EFFECT_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_SCENE_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_VIDEO_STABILIZATION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> EDGE_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> FLASH_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> FLASH_STATE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> HOT_PIXEL_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.location.Location> JPEG_GPS_LOCATION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> JPEG_ORIENTATION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Byte> JPEG_QUALITY;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Byte> JPEG_THUMBNAIL_QUALITY;
    field public static final android.hardware.camera2.CaptureResult.Key<android.util.Size> JPEG_THUMBNAIL_SIZE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> LENS_APERTURE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> LENS_FILTER_DENSITY;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> LENS_FOCAL_LENGTH;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> LENS_FOCUS_DISTANCE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.util.Pair<java.lang.Float, java.lang.Float>> LENS_FOCUS_RANGE;
    field public static final android.hardware.camera2.CaptureResult.Key<float[]> LENS_INTRINSIC_CALIBRATION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> LENS_OPTICAL_STABILIZATION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<float[]> LENS_POSE_ROTATION;
    field public static final android.hardware.camera2.CaptureResult.Key<float[]> LENS_POSE_TRANSLATION;
    field public static final android.hardware.camera2.CaptureResult.Key<float[]> LENS_RADIAL_DISTORTION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> LENS_STATE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> NOISE_REDUCTION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Byte> REQUEST_PIPELINE_DEPTH;
    field public static final android.hardware.camera2.CaptureResult.Key<android.graphics.Rect> SCALER_CROP_REGION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Long> SENSOR_EXPOSURE_TIME;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Long> SENSOR_FRAME_DURATION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> SENSOR_GREEN_SPLIT;
    field public static final android.hardware.camera2.CaptureResult.Key<android.util.Rational[]> SENSOR_NEUTRAL_COLOR_POINT;
    field public static final android.hardware.camera2.CaptureResult.Key<android.util.Pair<java.lang.Double, java.lang.Double>[]> SENSOR_NOISE_PROFILE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Long> SENSOR_ROLLING_SHUTTER_SKEW;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> SENSOR_SENSITIVITY;
    field public static final android.hardware.camera2.CaptureResult.Key<int[]> SENSOR_TEST_PATTERN_DATA;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> SENSOR_TEST_PATTERN_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Long> SENSOR_TIMESTAMP;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> SHADING_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.Face[]> STATISTICS_FACES;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> STATISTICS_FACE_DETECT_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.graphics.Point[]> STATISTICS_HOT_PIXEL_MAP;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Boolean> STATISTICS_HOT_PIXEL_MAP_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.LensShadingMap> STATISTICS_LENS_SHADING_CORRECTION_MAP;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> STATISTICS_LENS_SHADING_MAP_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> STATISTICS_SCENE_FLICKER;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> TONEMAP_GAMMA;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> TONEMAP_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> TONEMAP_PRESET_CURVE;
  }

  public static final class CaptureResult.Key {
    method public final boolean equals(java.lang.Object);
    method public java.lang.String getName();
    method public final int hashCode();
  }

  public final class DngCreator implements java.lang.AutoCloseable {
    ctor public DngCreator(android.hardware.camera2.CameraCharacteristics, android.hardware.camera2.CaptureResult);
    method public void close();
    method public android.hardware.camera2.DngCreator setDescription(java.lang.String);
    method public android.hardware.camera2.DngCreator setLocation(android.location.Location);
    method public android.hardware.camera2.DngCreator setOrientation(int);
    method public android.hardware.camera2.DngCreator setThumbnail(android.graphics.Bitmap);
    method public android.hardware.camera2.DngCreator setThumbnail(android.media.Image);
    method public void writeByteBuffer(java.io.OutputStream, android.util.Size, java.nio.ByteBuffer, long) throws java.io.IOException;
    method public void writeImage(java.io.OutputStream, android.media.Image) throws java.io.IOException;
    method public void writeInputStream(java.io.OutputStream, android.util.Size, java.io.InputStream, long) throws java.io.IOException;
    field public static final int MAX_THUMBNAIL_DIMENSION = 256; // 0x100
  }

  public final class TotalCaptureResult extends android.hardware.camera2.CaptureResult {
    method public java.util.List<android.hardware.camera2.CaptureResult> getPartialResults();
  }

}

package android.hardware.camera2.params {

  public final class BlackLevelPattern {
    method public void copyTo(int[], int);
    method public int getOffsetForIndex(int, int);
    field public static final int COUNT = 4; // 0x4
  }

  public final class ColorSpaceTransform {
    ctor public ColorSpaceTransform(android.util.Rational[]);
    ctor public ColorSpaceTransform(int[]);
    method public void copyElements(android.util.Rational[], int);
    method public void copyElements(int[], int);
    method public android.util.Rational getElement(int, int);
  }

  public final class Face {
    method public android.graphics.Rect getBounds();
    method public int getId();
    method public android.graphics.Point getLeftEyePosition();
    method public android.graphics.Point getMouthPosition();
    method public android.graphics.Point getRightEyePosition();
    method public int getScore();
    field public static final int ID_UNSUPPORTED = -1; // 0xffffffff
    field public static final int SCORE_MAX = 100; // 0x64
    field public static final int SCORE_MIN = 1; // 0x1
  }

  public final class LensShadingMap {
    method public void copyGainFactors(float[], int);
    method public int getColumnCount();
    method public float getGainFactor(int, int, int);
    method public int getGainFactorCount();
    method public android.hardware.camera2.params.RggbChannelVector getGainFactorVector(int, int);
    method public int getRowCount();
    field public static final float MINIMUM_GAIN_FACTOR = 1.0f;
  }

  public final class MeteringRectangle {
    ctor public MeteringRectangle(int, int, int, int, int);
    ctor public MeteringRectangle(android.graphics.Point, android.util.Size, int);
    ctor public MeteringRectangle(android.graphics.Rect, int);
    method public boolean equals(android.hardware.camera2.params.MeteringRectangle);
    method public int getHeight();
    method public int getMeteringWeight();
    method public android.graphics.Rect getRect();
    method public android.util.Size getSize();
    method public android.graphics.Point getUpperLeftPoint();
    method public int getWidth();
    method public int getX();
    method public int getY();
    field public static final int METERING_WEIGHT_DONT_CARE = 0; // 0x0
    field public static final int METERING_WEIGHT_MAX = 1000; // 0x3e8
    field public static final int METERING_WEIGHT_MIN = 0; // 0x0
  }

  public final class RggbChannelVector {
    ctor public RggbChannelVector(float, float, float, float);
    method public void copyTo(float[], int);
    method public float getBlue();
    method public float getComponent(int);
    method public float getGreenEven();
    method public float getGreenOdd();
    method public final float getRed();
    field public static final int BLUE = 3; // 0x3
    field public static final int COUNT = 4; // 0x4
    field public static final int GREEN_EVEN = 1; // 0x1
    field public static final int GREEN_ODD = 2; // 0x2
    field public static final int RED = 0; // 0x0
  }

  public final class StreamConfigurationMap {
    method public android.util.Range<java.lang.Integer>[] getHighSpeedVideoFpsRanges();
    method public android.util.Range<java.lang.Integer>[] getHighSpeedVideoFpsRangesFor(android.util.Size);
    method public android.util.Size[] getHighSpeedVideoSizes();
    method public android.util.Size[] getHighSpeedVideoSizesFor(android.util.Range<java.lang.Integer>);
    method public final int[] getInputFormats();
    method public android.util.Size[] getInputSizes(int);
    method public final int[] getOutputFormats();
    method public long getOutputMinFrameDuration(int, android.util.Size);
    method public long getOutputMinFrameDuration(java.lang.Class<T>, android.util.Size);
    method public android.util.Size[] getOutputSizes(java.lang.Class<T>);
    method public android.util.Size[] getOutputSizes(int);
    method public long getOutputStallDuration(int, android.util.Size);
    method public long getOutputStallDuration(java.lang.Class<T>, android.util.Size);
    method public final int[] getValidOutputFormatsForInput(int);
    method public boolean isOutputSupportedFor(int);
    method public static boolean isOutputSupportedFor(java.lang.Class<T>);
    method public boolean isOutputSupportedFor(android.view.Surface);
  }

  public final class TonemapCurve {
    ctor public TonemapCurve(float[], float[], float[]);
    method public void copyColorCurve(int, float[], int);
    method public android.graphics.PointF getPoint(int, int);
    method public int getPointCount(int);
    field public static final int CHANNEL_BLUE = 2; // 0x2
    field public static final int CHANNEL_GREEN = 1; // 0x1
    field public static final int CHANNEL_RED = 0; // 0x0
    field public static final float LEVEL_BLACK = 0.0f;
    field public static final float LEVEL_WHITE = 1.0f;
    field public static final int POINT_SIZE = 2; // 0x2
  }

}

package android.hardware.display {

  public final class DisplayManager {
    method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, android.view.Surface, int);
    method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, android.view.Surface, int, android.hardware.display.VirtualDisplay.Callback, android.os.Handler);
    method public android.view.Display getDisplay(int);
    method public android.view.Display[] getDisplays();
    method public android.view.Display[] getDisplays(java.lang.String);
    method public void registerDisplayListener(android.hardware.display.DisplayManager.DisplayListener, android.os.Handler);
    method public void unregisterDisplayListener(android.hardware.display.DisplayManager.DisplayListener);
    field public static final java.lang.String DISPLAY_CATEGORY_PRESENTATION = "android.hardware.display.category.PRESENTATION";
    field public static final int VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 16; // 0x10
    field public static final int VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY = 8; // 0x8
    field public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2; // 0x2
    field public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1; // 0x1
    field public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 4; // 0x4
  }

  public static abstract interface DisplayManager.DisplayListener {
    method public abstract void onDisplayAdded(int);
    method public abstract void onDisplayChanged(int);
    method public abstract void onDisplayRemoved(int);
  }

  public final class VirtualDisplay {
    method public android.view.Display getDisplay();
    method public android.view.Surface getSurface();
    method public void release();
    method public void resize(int, int, int);
    method public void setSurface(android.view.Surface);
  }

  public static abstract class VirtualDisplay.Callback {
    ctor public VirtualDisplay.Callback();
    method public void onPaused();
    method public void onResumed();
    method public void onStopped();
  }

}

package android.hardware.fingerprint {

  public final class Fingerprint implements android.os.Parcelable {
    ctor public Fingerprint(java.lang.CharSequence, int, int, long);
    method public int describeContents();
    method public java.lang.CharSequence getName();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.fingerprint.Fingerprint> CREATOR;
  }

  public class FingerprintManager {
    method public void authenticate(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.CancellationSignal, android.hardware.fingerprint.FingerprintManager.AuthenticationCallback, int);
    field public static final int FINGERPRINT_ACQUIRED_GOOD = 0; // 0x0
    field public static final int FINGERPRINT_ACQUIRED_IMAGER_DIRTY = 3; // 0x3
    field public static final int FINGERPRINT_ACQUIRED_INSUFFICIENT = 2; // 0x2
    field public static final int FINGERPRINT_ACQUIRED_PARTIAL = 1; // 0x1
    field public static final int FINGERPRINT_ACQUIRED_TOO_FAST = 5; // 0x5
    field public static final int FINGERPRINT_ACQUIRED_TOO_SLOW = 4; // 0x4
    field public static final int FINGERPRINT_ACQUIRED_VENDOR_BASE = 1000; // 0x3e8
    field public static final int FINGERPRINT_ERROR_CANCELED = 5; // 0x5
    field public static final int FINGERPRINT_ERROR_HW_UNAVAILABLE = 1; // 0x1
    field public static final int FINGERPRINT_ERROR_NO_SPACE = 4; // 0x4
    field public static final int FINGERPRINT_ERROR_TIMEOUT = 3; // 0x3
    field public static final int FINGERPRINT_ERROR_UNABLE_TO_PROCESS = 2; // 0x2
    field public static final int FINGERPRINT_ERROR_VENDOR_BASE = 1000; // 0x3e8
  }

  public static abstract class FingerprintManager.AuthenticationCallback {
    ctor public FingerprintManager.AuthenticationCallback();
    method public void onAuthenticationError(int, java.lang.CharSequence);
    method public void onAuthenticationFailed();
    method public void onAuthenticationHelp(int, java.lang.CharSequence);
    method public void onAuthenticationSucceeded(android.hardware.fingerprint.FingerprintManager.AuthenticationResult);
  }

  public static final class FingerprintManager.AuthenticationResult {
    ctor public FingerprintManager.AuthenticationResult(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.hardware.fingerprint.Fingerprint);
    method public android.hardware.fingerprint.FingerprintManager.CryptoObject getCryptoObject();
  }

  public static class FingerprintManager.CryptoObject {
    method public javax.crypto.Cipher getCipher();
    method public java.security.Signature getSignature();
  }

}

package android.hardware.input {

  public final class InputManager {
    method public android.view.InputDevice getInputDevice(int);
    method public int[] getInputDeviceIds();
    method public void registerInputDeviceListener(android.hardware.input.InputManager.InputDeviceListener, android.os.Handler);
    method public void unregisterInputDeviceListener(android.hardware.input.InputManager.InputDeviceListener);
    field public static final java.lang.String ACTION_QUERY_KEYBOARD_LAYOUTS = "android.hardware.input.action.QUERY_KEYBOARD_LAYOUTS";
    field public static final java.lang.String META_DATA_KEYBOARD_LAYOUTS = "android.hardware.input.metadata.KEYBOARD_LAYOUTS";
  }

  public static abstract interface InputManager.InputDeviceListener {
    method public abstract void onInputDeviceAdded(int);
    method public abstract void onInputDeviceChanged(int);
    method public abstract void onInputDeviceRemoved(int);
  }

}

package android.hardware.usb {

  public class UsbAccessory implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String getDescription();
    method public java.lang.String getManufacturer();
    method public java.lang.String getModel();
    method public java.lang.String getSerial();
    method public java.lang.String getUri();
    method public java.lang.String getVersion();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.usb.UsbAccessory> CREATOR;
  }

  public class UsbConfiguration implements android.os.Parcelable {
    method public int describeContents();
    method public int getId();
    method public android.hardware.usb.UsbInterface getInterface(int);
    method public int getInterfaceCount();
    method public int getMaxPower();
    method public java.lang.String getName();
    method public boolean isRemoteWakeup();
    method public boolean isSelfPowered();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.usb.UsbConfiguration> CREATOR;
  }

  public final class UsbConstants {
    ctor public UsbConstants();
    field public static final int USB_CLASS_APP_SPEC = 254; // 0xfe
    field public static final int USB_CLASS_AUDIO = 1; // 0x1
    field public static final int USB_CLASS_CDC_DATA = 10; // 0xa
    field public static final int USB_CLASS_COMM = 2; // 0x2
    field public static final int USB_CLASS_CONTENT_SEC = 13; // 0xd
    field public static final int USB_CLASS_CSCID = 11; // 0xb
    field public static final int USB_CLASS_HID = 3; // 0x3
    field public static final int USB_CLASS_HUB = 9; // 0x9
    field public static final int USB_CLASS_MASS_STORAGE = 8; // 0x8
    field public static final int USB_CLASS_MISC = 239; // 0xef
    field public static final int USB_CLASS_PER_INTERFACE = 0; // 0x0
    field public static final int USB_CLASS_PHYSICA = 5; // 0x5
    field public static final int USB_CLASS_PRINTER = 7; // 0x7
    field public static final int USB_CLASS_STILL_IMAGE = 6; // 0x6
    field public static final int USB_CLASS_VENDOR_SPEC = 255; // 0xff
    field public static final int USB_CLASS_VIDEO = 14; // 0xe
    field public static final int USB_CLASS_WIRELESS_CONTROLLER = 224; // 0xe0
    field public static final int USB_DIR_IN = 128; // 0x80
    field public static final int USB_DIR_OUT = 0; // 0x0
    field public static final int USB_ENDPOINT_DIR_MASK = 128; // 0x80
    field public static final int USB_ENDPOINT_NUMBER_MASK = 15; // 0xf
    field public static final int USB_ENDPOINT_XFERTYPE_MASK = 3; // 0x3
    field public static final int USB_ENDPOINT_XFER_BULK = 2; // 0x2
    field public static final int USB_ENDPOINT_XFER_CONTROL = 0; // 0x0
    field public static final int USB_ENDPOINT_XFER_INT = 3; // 0x3
    field public static final int USB_ENDPOINT_XFER_ISOC = 1; // 0x1
    field public static final int USB_INTERFACE_SUBCLASS_BOOT = 1; // 0x1
    field public static final int USB_SUBCLASS_VENDOR_SPEC = 255; // 0xff
    field public static final int USB_TYPE_CLASS = 32; // 0x20
    field public static final int USB_TYPE_MASK = 96; // 0x60
    field public static final int USB_TYPE_RESERVED = 96; // 0x60
    field public static final int USB_TYPE_STANDARD = 0; // 0x0
    field public static final int USB_TYPE_VENDOR = 64; // 0x40
  }

  public class UsbDevice implements android.os.Parcelable {
    method public int describeContents();
    method public android.hardware.usb.UsbConfiguration getConfiguration(int);
    method public int getConfigurationCount();
    method public int getDeviceClass();
    method public int getDeviceId();
    method public static int getDeviceId(java.lang.String);
    method public java.lang.String getDeviceName();
    method public static java.lang.String getDeviceName(int);
    method public int getDeviceProtocol();
    method public int getDeviceSubclass();
    method public android.hardware.usb.UsbInterface getInterface(int);
    method public int getInterfaceCount();
    method public java.lang.String getManufacturerName();
    method public int getProductId();
    method public java.lang.String getProductName();
    method public java.lang.String getSerialNumber();
    method public int getVendorId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.usb.UsbDevice> CREATOR;
  }

  public class UsbDeviceConnection {
    method public int bulkTransfer(android.hardware.usb.UsbEndpoint, byte[], int, int);
    method public int bulkTransfer(android.hardware.usb.UsbEndpoint, byte[], int, int, int);
    method public boolean claimInterface(android.hardware.usb.UsbInterface, boolean);
    method public void close();
    method public int controlTransfer(int, int, int, int, byte[], int, int);
    method public int controlTransfer(int, int, int, int, byte[], int, int, int);
    method public int getFileDescriptor();
    method public byte[] getRawDescriptors();
    method public java.lang.String getSerial();
    method public boolean releaseInterface(android.hardware.usb.UsbInterface);
    method public android.hardware.usb.UsbRequest requestWait();
    method public boolean setConfiguration(android.hardware.usb.UsbConfiguration);
    method public boolean setInterface(android.hardware.usb.UsbInterface);
  }

  public class UsbEndpoint implements android.os.Parcelable {
    method public int describeContents();
    method public int getAddress();
    method public int getAttributes();
    method public int getDirection();
    method public int getEndpointNumber();
    method public int getInterval();
    method public int getMaxPacketSize();
    method public int getType();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.usb.UsbEndpoint> CREATOR;
  }

  public class UsbInterface implements android.os.Parcelable {
    method public int describeContents();
    method public int getAlternateSetting();
    method public android.hardware.usb.UsbEndpoint getEndpoint(int);
    method public int getEndpointCount();
    method public int getId();
    method public int getInterfaceClass();
    method public int getInterfaceProtocol();
    method public int getInterfaceSubclass();
    method public java.lang.String getName();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.usb.UsbInterface> CREATOR;
  }

  public class UsbManager {
    method public android.hardware.usb.UsbAccessory[] getAccessoryList();
    method public java.util.HashMap<java.lang.String, android.hardware.usb.UsbDevice> getDeviceList();
    method public boolean hasPermission(android.hardware.usb.UsbDevice);
    method public boolean hasPermission(android.hardware.usb.UsbAccessory);
    method public android.os.ParcelFileDescriptor openAccessory(android.hardware.usb.UsbAccessory);
    method public android.hardware.usb.UsbDeviceConnection openDevice(android.hardware.usb.UsbDevice);
    method public void requestPermission(android.hardware.usb.UsbDevice, android.app.PendingIntent);
    method public void requestPermission(android.hardware.usb.UsbAccessory, android.app.PendingIntent);
    field public static final java.lang.String ACTION_USB_ACCESSORY_ATTACHED = "android.hardware.usb.action.USB_ACCESSORY_ATTACHED";
    field public static final java.lang.String ACTION_USB_ACCESSORY_DETACHED = "android.hardware.usb.action.USB_ACCESSORY_DETACHED";
    field public static final java.lang.String ACTION_USB_DEVICE_ATTACHED = "android.hardware.usb.action.USB_DEVICE_ATTACHED";
    field public static final java.lang.String ACTION_USB_DEVICE_DETACHED = "android.hardware.usb.action.USB_DEVICE_DETACHED";
    field public static final java.lang.String EXTRA_ACCESSORY = "accessory";
    field public static final java.lang.String EXTRA_DEVICE = "device";
    field public static final java.lang.String EXTRA_PERMISSION_GRANTED = "permission";
  }

  public class UsbRequest {
    ctor public UsbRequest();
    method public boolean cancel();
    method public void close();
    method public java.lang.Object getClientData();
    method public android.hardware.usb.UsbEndpoint getEndpoint();
    method public boolean initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint);
    method public boolean queue(java.nio.ByteBuffer, int);
    method public void setClientData(java.lang.Object);
  }

}

package android.inputmethodservice {

  public abstract class AbstractInputMethodService extends android.app.Service implements android.view.KeyEvent.Callback {
    ctor public AbstractInputMethodService();
    method public android.view.KeyEvent.DispatcherState getKeyDispatcherState();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl onCreateInputMethodInterface();
    method public abstract android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl onCreateInputMethodSessionInterface();
    method public boolean onGenericMotionEvent(android.view.MotionEvent);
    method public boolean onTrackballEvent(android.view.MotionEvent);
  }

  public abstract class AbstractInputMethodService.AbstractInputMethodImpl implements android.view.inputmethod.InputMethod {
    ctor public AbstractInputMethodService.AbstractInputMethodImpl();
    method public void createSession(android.view.inputmethod.InputMethod.SessionCallback);
    method public void revokeSession(android.view.inputmethod.InputMethodSession);
    method public void setSessionEnabled(android.view.inputmethod.InputMethodSession, boolean);
  }

  public abstract class AbstractInputMethodService.AbstractInputMethodSessionImpl implements android.view.inputmethod.InputMethodSession {
    ctor public AbstractInputMethodService.AbstractInputMethodSessionImpl();
    method public void dispatchGenericMotionEvent(int, android.view.MotionEvent, android.view.inputmethod.InputMethodSession.EventCallback);
    method public void dispatchKeyEvent(int, android.view.KeyEvent, android.view.inputmethod.InputMethodSession.EventCallback);
    method public void dispatchTrackballEvent(int, android.view.MotionEvent, android.view.inputmethod.InputMethodSession.EventCallback);
    method public boolean isEnabled();
    method public boolean isRevoked();
    method public void revokeSelf();
    method public void setEnabled(boolean);
  }

  public class ExtractEditText extends android.widget.EditText {
    ctor public ExtractEditText(android.content.Context);
    ctor public ExtractEditText(android.content.Context, android.util.AttributeSet);
    ctor public ExtractEditText(android.content.Context, android.util.AttributeSet, int);
    ctor public ExtractEditText(android.content.Context, android.util.AttributeSet, int, int);
    method public void finishInternalChanges();
    method public boolean hasVerticalScrollBar();
    method public void startInternalChanges();
  }

  public class InputMethodService extends android.inputmethodservice.AbstractInputMethodService {
    ctor public InputMethodService();
    method public deprecated boolean enableHardwareAcceleration();
    method public int getBackDisposition();
    method public int getCandidatesHiddenVisibility();
    method public android.view.inputmethod.InputBinding getCurrentInputBinding();
    method public android.view.inputmethod.InputConnection getCurrentInputConnection();
    method public android.view.inputmethod.EditorInfo getCurrentInputEditorInfo();
    method public boolean getCurrentInputStarted();
    method public int getInputMethodWindowRecommendedHeight();
    method public android.view.LayoutInflater getLayoutInflater();
    method public int getMaxWidth();
    method public java.lang.CharSequence getTextForImeAction(int);
    method public android.app.Dialog getWindow();
    method public void hideStatusIcon();
    method public void hideWindow();
    method public boolean isExtractViewShown();
    method public boolean isFullscreenMode();
    method public boolean isInputViewShown();
    method public boolean isShowInputRequested();
    method public void onAppPrivateCommand(java.lang.String, android.os.Bundle);
    method public void onBindInput();
    method public void onComputeInsets(android.inputmethodservice.InputMethodService.Insets);
    method public void onConfigureWindow(android.view.Window, boolean, boolean);
    method public android.view.View onCreateCandidatesView();
    method public android.view.View onCreateExtractTextView();
    method public android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl onCreateInputMethodInterface();
    method public android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl onCreateInputMethodSessionInterface();
    method public android.view.View onCreateInputView();
    method protected void onCurrentInputMethodSubtypeChanged(android.view.inputmethod.InputMethodSubtype);
    method public void onDisplayCompletions(android.view.inputmethod.CompletionInfo[]);
    method public boolean onEvaluateFullscreenMode();
    method public boolean onEvaluateInputViewShown();
    method public boolean onExtractTextContextMenuItem(int);
    method public void onExtractedCursorMovement(int, int);
    method public void onExtractedSelectionChanged(int, int);
    method public void onExtractedTextClicked();
    method public void onExtractingInputChanged(android.view.inputmethod.EditorInfo);
    method public void onFinishCandidatesView(boolean);
    method public void onFinishInput();
    method public void onFinishInputView(boolean);
    method public void onInitializeInterface();
    method public boolean onKeyDown(int, android.view.KeyEvent);
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public boolean onShowInputRequested(int, boolean);
    method public void onStartCandidatesView(android.view.inputmethod.EditorInfo, boolean);
    method public void onStartInput(android.view.inputmethod.EditorInfo, boolean);
    method public void onStartInputView(android.view.inputmethod.EditorInfo, boolean);
    method public void onUnbindInput();
    method public deprecated void onUpdateCursor(android.graphics.Rect);
    method public void onUpdateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo);
    method public void onUpdateExtractedText(int, android.view.inputmethod.ExtractedText);
    method public void onUpdateExtractingViews(android.view.inputmethod.EditorInfo);
    method public void onUpdateExtractingVisibility(android.view.inputmethod.EditorInfo);
    method public void onUpdateSelection(int, int, int, int, int, int);
    method public void onViewClicked(boolean);
    method public void onWindowHidden();
    method public void onWindowShown();
    method public void requestHideSelf(int);
    method public boolean sendDefaultEditorAction(boolean);
    method public void sendDownUpKeyEvents(int);
    method public void sendKeyChar(char);
    method public void setBackDisposition(int);
    method public void setCandidatesView(android.view.View);
    method public void setCandidatesViewShown(boolean);
    method public void setExtractView(android.view.View);
    method public void setExtractViewShown(boolean);
    method public void setInputView(android.view.View);
    method public void showStatusIcon(int);
    method public void showWindow(boolean);
    method public void switchInputMethod(java.lang.String);
    method public void updateFullscreenMode();
    method public void updateInputViewShown();
    field public static final int BACK_DISPOSITION_DEFAULT = 0; // 0x0
    field public static final int BACK_DISPOSITION_WILL_DISMISS = 2; // 0x2
    field public static final int BACK_DISPOSITION_WILL_NOT_DISMISS = 1; // 0x1
  }

  public class InputMethodService.InputMethodImpl extends android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl {
    ctor public InputMethodService.InputMethodImpl();
    method public void attachToken(android.os.IBinder);
    method public void bindInput(android.view.inputmethod.InputBinding);
    method public void changeInputMethodSubtype(android.view.inputmethod.InputMethodSubtype);
    method public void hideSoftInput(int, android.os.ResultReceiver);
    method public void restartInput(android.view.inputmethod.InputConnection, android.view.inputmethod.EditorInfo);
    method public void showSoftInput(int, android.os.ResultReceiver);
    method public void startInput(android.view.inputmethod.InputConnection, android.view.inputmethod.EditorInfo);
    method public void unbindInput();
  }

  public class InputMethodService.InputMethodSessionImpl extends android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodSessionImpl {
    ctor public InputMethodService.InputMethodSessionImpl();
    method public void appPrivateCommand(java.lang.String, android.os.Bundle);
    method public void displayCompletions(android.view.inputmethod.CompletionInfo[]);
    method public void finishInput();
    method public void toggleSoftInput(int, int);
    method public void updateCursor(android.graphics.Rect);
    method public void updateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo);
    method public void updateExtractedText(int, android.view.inputmethod.ExtractedText);
    method public void updateSelection(int, int, int, int, int, int);
    method public void viewClicked(boolean);
  }

  public static final class InputMethodService.Insets {
    ctor public InputMethodService.Insets();
    field public static final int TOUCHABLE_INSETS_CONTENT = 1; // 0x1
    field public static final int TOUCHABLE_INSETS_FRAME = 0; // 0x0
    field public static final int TOUCHABLE_INSETS_REGION = 3; // 0x3
    field public static final int TOUCHABLE_INSETS_VISIBLE = 2; // 0x2
    field public int contentTopInsets;
    field public int touchableInsets;
    field public final android.graphics.Region touchableRegion;
    field public int visibleTopInsets;
  }

  public class Keyboard {
    ctor public Keyboard(android.content.Context, int);
    ctor public Keyboard(android.content.Context, int, int, int, int);
    ctor public Keyboard(android.content.Context, int, int);
    ctor public Keyboard(android.content.Context, int, java.lang.CharSequence, int, int);
    method protected android.inputmethodservice.Keyboard.Key createKeyFromXml(android.content.res.Resources, android.inputmethodservice.Keyboard.Row, int, int, android.content.res.XmlResourceParser);
    method protected android.inputmethodservice.Keyboard.Row createRowFromXml(android.content.res.Resources, android.content.res.XmlResourceParser);
    method public int getHeight();
    method protected int getHorizontalGap();
    method protected int getKeyHeight();
    method protected int getKeyWidth();
    method public java.util.List<android.inputmethodservice.Keyboard.Key> getKeys();
    method public int getMinWidth();
    method public java.util.List<android.inputmethodservice.Keyboard.Key> getModifierKeys();
    method public int[] getNearestKeys(int, int);
    method public int getShiftKeyIndex();
    method protected int getVerticalGap();
    method public boolean isShifted();
    method protected void setHorizontalGap(int);
    method protected void setKeyHeight(int);
    method protected void setKeyWidth(int);
    method public boolean setShifted(boolean);
    method protected void setVerticalGap(int);
    field public static final int EDGE_BOTTOM = 8; // 0x8
    field public static final int EDGE_LEFT = 1; // 0x1
    field public static final int EDGE_RIGHT = 2; // 0x2
    field public static final int EDGE_TOP = 4; // 0x4
    field public static final int KEYCODE_ALT = -6; // 0xfffffffa
    field public static final int KEYCODE_CANCEL = -3; // 0xfffffffd
    field public static final int KEYCODE_DELETE = -5; // 0xfffffffb
    field public static final int KEYCODE_DONE = -4; // 0xfffffffc
    field public static final int KEYCODE_MODE_CHANGE = -2; // 0xfffffffe
    field public static final int KEYCODE_SHIFT = -1; // 0xffffffff
  }

  public static class Keyboard.Key {
    ctor public Keyboard.Key(android.inputmethodservice.Keyboard.Row);
    ctor public Keyboard.Key(android.content.res.Resources, android.inputmethodservice.Keyboard.Row, int, int, android.content.res.XmlResourceParser);
    method public int[] getCurrentDrawableState();
    method public boolean isInside(int, int);
    method public void onPressed();
    method public void onReleased(boolean);
    method public int squaredDistanceFrom(int, int);
    field public int[] codes;
    field public int edgeFlags;
    field public int gap;
    field public int height;
    field public android.graphics.drawable.Drawable icon;
    field public android.graphics.drawable.Drawable iconPreview;
    field public java.lang.CharSequence label;
    field public boolean modifier;
    field public boolean on;
    field public java.lang.CharSequence popupCharacters;
    field public int popupResId;
    field public boolean pressed;
    field public boolean repeatable;
    field public boolean sticky;
    field public java.lang.CharSequence text;
    field public int width;
    field public int x;
    field public int y;
  }

  public static class Keyboard.Row {
    ctor public Keyboard.Row(android.inputmethodservice.Keyboard);
    ctor public Keyboard.Row(android.content.res.Resources, android.inputmethodservice.Keyboard, android.content.res.XmlResourceParser);
    field public int defaultHeight;
    field public int defaultHorizontalGap;
    field public int defaultWidth;
    field public int mode;
    field public int rowEdgeFlags;
    field public int verticalGap;
  }

  public class KeyboardView extends android.view.View implements android.view.View.OnClickListener {
    ctor public KeyboardView(android.content.Context, android.util.AttributeSet);
    ctor public KeyboardView(android.content.Context, android.util.AttributeSet, int);
    ctor public KeyboardView(android.content.Context, android.util.AttributeSet, int, int);
    method public void closing();
    method public android.inputmethodservice.Keyboard getKeyboard();
    method protected android.inputmethodservice.KeyboardView.OnKeyboardActionListener getOnKeyboardActionListener();
    method public boolean handleBack();
    method public void invalidateAllKeys();
    method public void invalidateKey(int);
    method public boolean isPreviewEnabled();
    method public boolean isProximityCorrectionEnabled();
    method public boolean isShifted();
    method public void onClick(android.view.View);
    method public void onDetachedFromWindow();
    method public void onDraw(android.graphics.Canvas);
    method protected boolean onLongPress(android.inputmethodservice.Keyboard.Key);
    method public void onMeasure(int, int);
    method public void onSizeChanged(int, int, int, int);
    method public void setKeyboard(android.inputmethodservice.Keyboard);
    method public void setOnKeyboardActionListener(android.inputmethodservice.KeyboardView.OnKeyboardActionListener);
    method public void setPopupOffset(int, int);
    method public void setPopupParent(android.view.View);
    method public void setPreviewEnabled(boolean);
    method public void setProximityCorrectionEnabled(boolean);
    method public boolean setShifted(boolean);
    method public void setVerticalCorrection(int);
    method protected void swipeDown();
    method protected void swipeLeft();
    method protected void swipeRight();
    method protected void swipeUp();
  }

  public static abstract interface KeyboardView.OnKeyboardActionListener {
    method public abstract void onKey(int, int[]);
    method public abstract void onPress(int);
    method public abstract void onRelease(int);
    method public abstract void onText(java.lang.CharSequence);
    method public abstract void swipeDown();
    method public abstract void swipeLeft();
    method public abstract void swipeRight();
    method public abstract void swipeUp();
  }

}

package android.location {

  public class Address implements android.os.Parcelable {
    ctor public Address(java.util.Locale);
    method public void clearLatitude();
    method public void clearLongitude();
    method public int describeContents();
    method public java.lang.String getAddressLine(int);
    method public java.lang.String getAdminArea();
    method public java.lang.String getCountryCode();
    method public java.lang.String getCountryName();
    method public android.os.Bundle getExtras();
    method public java.lang.String getFeatureName();
    method public double getLatitude();
    method public java.util.Locale getLocale();
    method public java.lang.String getLocality();
    method public double getLongitude();
    method public int getMaxAddressLineIndex();
    method public java.lang.String getPhone();
    method public java.lang.String getPostalCode();
    method public java.lang.String getPremises();
    method public java.lang.String getSubAdminArea();
    method public java.lang.String getSubLocality();
    method public java.lang.String getSubThoroughfare();
    method public java.lang.String getThoroughfare();
    method public java.lang.String getUrl();
    method public boolean hasLatitude();
    method public boolean hasLongitude();
    method public void setAddressLine(int, java.lang.String);
    method public void setAdminArea(java.lang.String);
    method public void setCountryCode(java.lang.String);
    method public void setCountryName(java.lang.String);
    method public void setExtras(android.os.Bundle);
    method public void setFeatureName(java.lang.String);
    method public void setLatitude(double);
    method public void setLocality(java.lang.String);
    method public void setLongitude(double);
    method public void setPhone(java.lang.String);
    method public void setPostalCode(java.lang.String);
    method public void setPremises(java.lang.String);
    method public void setSubAdminArea(java.lang.String);
    method public void setSubLocality(java.lang.String);
    method public void setSubThoroughfare(java.lang.String);
    method public void setThoroughfare(java.lang.String);
    method public void setUrl(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.Address> CREATOR;
  }

  public class Criteria implements android.os.Parcelable {
    ctor public Criteria();
    ctor public Criteria(android.location.Criteria);
    method public int describeContents();
    method public int getAccuracy();
    method public int getBearingAccuracy();
    method public int getHorizontalAccuracy();
    method public int getPowerRequirement();
    method public int getSpeedAccuracy();
    method public int getVerticalAccuracy();
    method public boolean isAltitudeRequired();
    method public boolean isBearingRequired();
    method public boolean isCostAllowed();
    method public boolean isSpeedRequired();
    method public void setAccuracy(int);
    method public void setAltitudeRequired(boolean);
    method public void setBearingAccuracy(int);
    method public void setBearingRequired(boolean);
    method public void setCostAllowed(boolean);
    method public void setHorizontalAccuracy(int);
    method public void setPowerRequirement(int);
    method public void setSpeedAccuracy(int);
    method public void setSpeedRequired(boolean);
    method public void setVerticalAccuracy(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ACCURACY_COARSE = 2; // 0x2
    field public static final int ACCURACY_FINE = 1; // 0x1
    field public static final int ACCURACY_HIGH = 3; // 0x3
    field public static final int ACCURACY_LOW = 1; // 0x1
    field public static final int ACCURACY_MEDIUM = 2; // 0x2
    field public static final android.os.Parcelable.Creator<android.location.Criteria> CREATOR;
    field public static final int NO_REQUIREMENT = 0; // 0x0
    field public static final int POWER_HIGH = 3; // 0x3
    field public static final int POWER_LOW = 1; // 0x1
    field public static final int POWER_MEDIUM = 2; // 0x2
  }

  public final class Geocoder {
    ctor public Geocoder(android.content.Context, java.util.Locale);
    ctor public Geocoder(android.content.Context);
    method public java.util.List<android.location.Address> getFromLocation(double, double, int) throws java.io.IOException;
    method public java.util.List<android.location.Address> getFromLocationName(java.lang.String, int) throws java.io.IOException;
    method public java.util.List<android.location.Address> getFromLocationName(java.lang.String, int, double, double, double, double) throws java.io.IOException;
    method public static boolean isPresent();
  }

  public final class GpsSatellite {
    method public float getAzimuth();
    method public float getElevation();
    method public int getPrn();
    method public float getSnr();
    method public boolean hasAlmanac();
    method public boolean hasEphemeris();
    method public boolean usedInFix();
  }

  public final class GpsStatus {
    method public int getMaxSatellites();
    method public java.lang.Iterable<android.location.GpsSatellite> getSatellites();
    method public int getTimeToFirstFix();
    field public static final int GPS_EVENT_FIRST_FIX = 3; // 0x3
    field public static final int GPS_EVENT_SATELLITE_STATUS = 4; // 0x4
    field public static final int GPS_EVENT_STARTED = 1; // 0x1
    field public static final int GPS_EVENT_STOPPED = 2; // 0x2
  }

  public static abstract interface GpsStatus.Listener {
    method public abstract void onGpsStatusChanged(int);
  }

  public static abstract interface GpsStatus.NmeaListener {
    method public abstract void onNmeaReceived(long, java.lang.String);
  }

  public class Location implements android.os.Parcelable {
    ctor public Location(java.lang.String);
    ctor public Location(android.location.Location);
    method public float bearingTo(android.location.Location);
    method public static java.lang.String convert(double, int);
    method public static double convert(java.lang.String);
    method public int describeContents();
    method public static void distanceBetween(double, double, double, double, float[]);
    method public float distanceTo(android.location.Location);
    method public void dump(android.util.Printer, java.lang.String);
    method public float getAccuracy();
    method public double getAltitude();
    method public float getBearing();
    method public long getElapsedRealtimeNanos();
    method public android.os.Bundle getExtras();
    method public double getLatitude();
    method public double getLongitude();
    method public java.lang.String getProvider();
    method public float getSpeed();
    method public long getTime();
    method public boolean hasAccuracy();
    method public boolean hasAltitude();
    method public boolean hasBearing();
    method public boolean hasSpeed();
    method public boolean isFromMockProvider();
    method public void removeAccuracy();
    method public void removeAltitude();
    method public void removeBearing();
    method public void removeSpeed();
    method public void reset();
    method public void set(android.location.Location);
    method public void setAccuracy(float);
    method public void setAltitude(double);
    method public void setBearing(float);
    method public void setElapsedRealtimeNanos(long);
    method public void setExtras(android.os.Bundle);
    method public void setLatitude(double);
    method public void setLongitude(double);
    method public void setProvider(java.lang.String);
    method public void setSpeed(float);
    method public void setTime(long);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.Location> CREATOR;
    field public static final int FORMAT_DEGREES = 0; // 0x0
    field public static final int FORMAT_MINUTES = 1; // 0x1
    field public static final int FORMAT_SECONDS = 2; // 0x2
  }

  public abstract interface LocationListener {
    method public abstract void onLocationChanged(android.location.Location);
    method public abstract void onProviderDisabled(java.lang.String);
    method public abstract void onProviderEnabled(java.lang.String);
    method public abstract void onStatusChanged(java.lang.String, int, android.os.Bundle);
  }

  public class LocationManager {
    method public boolean addGpsStatusListener(android.location.GpsStatus.Listener);
    method public boolean addNmeaListener(android.location.GpsStatus.NmeaListener);
    method public void addProximityAlert(double, double, float, long, android.app.PendingIntent);
    method public void addTestProvider(java.lang.String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
    method public void clearTestProviderEnabled(java.lang.String);
    method public void clearTestProviderLocation(java.lang.String);
    method public void clearTestProviderStatus(java.lang.String);
    method public java.util.List<java.lang.String> getAllProviders();
    method public java.lang.String getBestProvider(android.location.Criteria, boolean);
    method public android.location.GpsStatus getGpsStatus(android.location.GpsStatus);
    method public android.location.Location getLastKnownLocation(java.lang.String);
    method public android.location.LocationProvider getProvider(java.lang.String);
    method public java.util.List<java.lang.String> getProviders(boolean);
    method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
    method public boolean isProviderEnabled(java.lang.String);
    method public void removeGpsStatusListener(android.location.GpsStatus.Listener);
    method public void removeNmeaListener(android.location.GpsStatus.NmeaListener);
    method public void removeProximityAlert(android.app.PendingIntent);
    method public void removeTestProvider(java.lang.String);
    method public void removeUpdates(android.location.LocationListener);
    method public void removeUpdates(android.app.PendingIntent);
    method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
    method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(java.lang.String, long, float, android.app.PendingIntent);
    method public void requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent);
    method public void requestSingleUpdate(java.lang.String, android.location.LocationListener, android.os.Looper);
    method public void requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public void requestSingleUpdate(java.lang.String, android.app.PendingIntent);
    method public void requestSingleUpdate(android.location.Criteria, android.app.PendingIntent);
    method public boolean sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle);
    method public void setTestProviderEnabled(java.lang.String, boolean);
    method public void setTestProviderLocation(java.lang.String, android.location.Location);
    method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
    field public static final java.lang.String GPS_PROVIDER = "gps";
    field public static final java.lang.String KEY_LOCATION_CHANGED = "location";
    field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
    field public static final java.lang.String KEY_PROXIMITY_ENTERING = "entering";
    field public static final java.lang.String KEY_STATUS_CHANGED = "status";
    field public static final java.lang.String MODE_CHANGED_ACTION = "android.location.MODE_CHANGED";
    field public static final java.lang.String NETWORK_PROVIDER = "network";
    field public static final java.lang.String PASSIVE_PROVIDER = "passive";
    field public static final java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
  }

  public class LocationProvider {
    method public int getAccuracy();
    method public java.lang.String getName();
    method public int getPowerRequirement();
    method public boolean hasMonetaryCost();
    method public boolean meetsCriteria(android.location.Criteria);
    method public boolean requiresCell();
    method public boolean requiresNetwork();
    method public boolean requiresSatellite();
    method public boolean supportsAltitude();
    method public boolean supportsBearing();
    method public boolean supportsSpeed();
    field public static final int AVAILABLE = 2; // 0x2
    field public static final int OUT_OF_SERVICE = 0; // 0x0
    field public static final int TEMPORARILY_UNAVAILABLE = 1; // 0x1
  }

  public abstract class SettingInjectorService extends android.app.Service {
    ctor public SettingInjectorService(java.lang.String);
    method public final android.os.IBinder onBind(android.content.Intent);
    method protected abstract boolean onGetEnabled();
    method protected abstract deprecated java.lang.String onGetSummary();
    method public final void onStart(android.content.Intent, int);
    method public final int onStartCommand(android.content.Intent, int, int);
    field public static final java.lang.String ACTION_INJECTED_SETTING_CHANGED = "android.location.InjectedSettingChanged";
    field public static final java.lang.String ACTION_SERVICE_INTENT = "android.location.SettingInjectorService";
    field public static final java.lang.String ATTRIBUTES_NAME = "injected-location-setting";
    field public static final java.lang.String META_DATA_NAME = "android.location.SettingInjectorService";
  }

}

package android.media {

  public class AsyncPlayer {
    ctor public AsyncPlayer(java.lang.String);
    method public deprecated void play(android.content.Context, android.net.Uri, boolean, int);
    method public void play(android.content.Context, android.net.Uri, boolean, android.media.AudioAttributes) throws java.lang.IllegalArgumentException;
    method public void stop();
  }

  public final class AudioAttributes implements android.os.Parcelable {
    method public int describeContents();
    method public int getContentType();
    method public int getFlags();
    method public int getUsage();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CONTENT_TYPE_MOVIE = 3; // 0x3
    field public static final int CONTENT_TYPE_MUSIC = 2; // 0x2
    field public static final int CONTENT_TYPE_SONIFICATION = 4; // 0x4
    field public static final int CONTENT_TYPE_SPEECH = 1; // 0x1
    field public static final int CONTENT_TYPE_UNKNOWN = 0; // 0x0
    field public static final android.os.Parcelable.Creator<android.media.AudioAttributes> CREATOR;
    field public static final int FLAG_AUDIBILITY_ENFORCED = 1; // 0x1
    field public static final int FLAG_HW_AV_SYNC = 16; // 0x10
    field public static final int USAGE_ALARM = 4; // 0x4
    field public static final int USAGE_ASSISTANCE_ACCESSIBILITY = 11; // 0xb
    field public static final int USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 12; // 0xc
    field public static final int USAGE_ASSISTANCE_SONIFICATION = 13; // 0xd
    field public static final int USAGE_GAME = 14; // 0xe
    field public static final int USAGE_MEDIA = 1; // 0x1
    field public static final int USAGE_NOTIFICATION = 5; // 0x5
    field public static final int USAGE_NOTIFICATION_COMMUNICATION_DELAYED = 9; // 0x9
    field public static final int USAGE_NOTIFICATION_COMMUNICATION_INSTANT = 8; // 0x8
    field public static final int USAGE_NOTIFICATION_COMMUNICATION_REQUEST = 7; // 0x7
    field public static final int USAGE_NOTIFICATION_EVENT = 10; // 0xa
    field public static final int USAGE_NOTIFICATION_RINGTONE = 6; // 0x6
    field public static final int USAGE_UNKNOWN = 0; // 0x0
    field public static final int USAGE_VOICE_COMMUNICATION = 2; // 0x2
    field public static final int USAGE_VOICE_COMMUNICATION_SIGNALLING = 3; // 0x3
  }

  public static class AudioAttributes.Builder {
    ctor public AudioAttributes.Builder();
    ctor public AudioAttributes.Builder(android.media.AudioAttributes);
    method public android.media.AudioAttributes build();
    method public android.media.AudioAttributes.Builder setContentType(int);
    method public android.media.AudioAttributes.Builder setFlags(int);
    method public android.media.AudioAttributes.Builder setLegacyStreamType(int);
    method public android.media.AudioAttributes.Builder setUsage(int);
  }

  public class AudioFormat {
    method public int getChannelCount();
    method public int getChannelIndexMask();
    method public int getChannelMask();
    method public int getEncoding();
    method public int getSampleRate();
    field public static final deprecated int CHANNEL_CONFIGURATION_DEFAULT = 1; // 0x1
    field public static final deprecated int CHANNEL_CONFIGURATION_INVALID = 0; // 0x0
    field public static final deprecated int CHANNEL_CONFIGURATION_MONO = 2; // 0x2
    field public static final deprecated int CHANNEL_CONFIGURATION_STEREO = 3; // 0x3
    field public static final int CHANNEL_INVALID = 0; // 0x0
    field public static final int CHANNEL_IN_BACK = 32; // 0x20
    field public static final int CHANNEL_IN_BACK_PROCESSED = 512; // 0x200
    field public static final int CHANNEL_IN_DEFAULT = 1; // 0x1
    field public static final int CHANNEL_IN_FRONT = 16; // 0x10
    field public static final int CHANNEL_IN_FRONT_PROCESSED = 256; // 0x100
    field public static final int CHANNEL_IN_LEFT = 4; // 0x4
    field public static final int CHANNEL_IN_LEFT_PROCESSED = 64; // 0x40
    field public static final int CHANNEL_IN_MONO = 16; // 0x10
    field public static final int CHANNEL_IN_PRESSURE = 1024; // 0x400
    field public static final int CHANNEL_IN_RIGHT = 8; // 0x8
    field public static final int CHANNEL_IN_RIGHT_PROCESSED = 128; // 0x80
    field public static final int CHANNEL_IN_STEREO = 12; // 0xc
    field public static final int CHANNEL_IN_VOICE_DNLINK = 32768; // 0x8000
    field public static final int CHANNEL_IN_VOICE_UPLINK = 16384; // 0x4000
    field public static final int CHANNEL_IN_X_AXIS = 2048; // 0x800
    field public static final int CHANNEL_IN_Y_AXIS = 4096; // 0x1000
    field public static final int CHANNEL_IN_Z_AXIS = 8192; // 0x2000
    field public static final int CHANNEL_OUT_5POINT1 = 252; // 0xfc
    field public static final int CHANNEL_OUT_7POINT1 = 1020; // 0x3fc
    field public static final int CHANNEL_OUT_BACK_CENTER = 1024; // 0x400
    field public static final int CHANNEL_OUT_BACK_LEFT = 64; // 0x40
    field public static final int CHANNEL_OUT_BACK_RIGHT = 128; // 0x80
    field public static final int CHANNEL_OUT_DEFAULT = 1; // 0x1
    field public static final int CHANNEL_OUT_FRONT_CENTER = 16; // 0x10
    field public static final int CHANNEL_OUT_FRONT_LEFT = 4; // 0x4
    field public static final int CHANNEL_OUT_FRONT_LEFT_OF_CENTER = 256; // 0x100
    field public static final int CHANNEL_OUT_FRONT_RIGHT = 8; // 0x8
    field public static final int CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 512; // 0x200
    field public static final int CHANNEL_OUT_LOW_FREQUENCY = 32; // 0x20
    field public static final int CHANNEL_OUT_MONO = 4; // 0x4
    field public static final int CHANNEL_OUT_QUAD = 204; // 0xcc
    field public static final int CHANNEL_OUT_SIDE_LEFT = 2048; // 0x800
    field public static final int CHANNEL_OUT_SIDE_RIGHT = 4096; // 0x1000
    field public static final int CHANNEL_OUT_STEREO = 12; // 0xc
    field public static final int CHANNEL_OUT_SURROUND = 1052; // 0x41c
    field public static final int ENCODING_AC3 = 5; // 0x5
    field public static final int ENCODING_DEFAULT = 1; // 0x1
    field public static final int ENCODING_DTS = 7; // 0x7
    field public static final int ENCODING_DTS_HD = 8; // 0x8
    field public static final int ENCODING_E_AC3 = 6; // 0x6
    field public static final int ENCODING_INVALID = 0; // 0x0
    field public static final int ENCODING_PCM_16BIT = 2; // 0x2
    field public static final int ENCODING_PCM_8BIT = 3; // 0x3
    field public static final int ENCODING_PCM_FLOAT = 4; // 0x4
  }

  public static class AudioFormat.Builder {
    ctor public AudioFormat.Builder();
    ctor public AudioFormat.Builder(android.media.AudioFormat);
    method public android.media.AudioFormat build();
    method public android.media.AudioFormat.Builder setChannelIndexMask(int) throws java.lang.IllegalArgumentException;
    method public android.media.AudioFormat.Builder setChannelMask(int) throws java.lang.IllegalArgumentException;
    method public android.media.AudioFormat.Builder setEncoding(int) throws java.lang.IllegalArgumentException;
    method public android.media.AudioFormat.Builder setSampleRate(int) throws java.lang.IllegalArgumentException;
  }

  public class AudioManager {
    method public int abandonAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener);
    method public void adjustStreamVolume(int, int, int);
    method public void adjustSuggestedStreamVolume(int, int, int);
    method public void adjustVolume(int, int);
    method public void dispatchMediaKeyEvent(android.view.KeyEvent);
    method public int generateAudioSessionId();
    method public int getMode();
    method public java.lang.String getParameters(java.lang.String);
    method public java.lang.String getProperty(java.lang.String);
    method public int getRingerMode();
    method public deprecated int getRouting(int);
    method public int getStreamMaxVolume(int);
    method public int getStreamVolume(int);
    method public deprecated int getVibrateSetting(int);
    method public boolean isBluetoothA2dpOn();
    method public boolean isBluetoothScoAvailableOffCall();
    method public boolean isBluetoothScoOn();
    method public boolean isMicrophoneMute();
    method public boolean isMusicActive();
    method public boolean isSpeakerphoneOn();
    method public boolean isStreamMute(int);
    method public boolean isVolumeFixed();
    method public deprecated boolean isWiredHeadsetOn();
    method public void loadSoundEffects();
    method public void playSoundEffect(int);
    method public void playSoundEffect(int, float);
    method public deprecated void registerMediaButtonEventReceiver(android.content.ComponentName);
    method public deprecated void registerMediaButtonEventReceiver(android.app.PendingIntent);
    method public deprecated void registerRemoteControlClient(android.media.RemoteControlClient);
    method public deprecated boolean registerRemoteController(android.media.RemoteController);
    method public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, int, int);
    method public deprecated void setBluetoothA2dpOn(boolean);
    method public void setBluetoothScoOn(boolean);
    method public void setMicrophoneMute(boolean);
    method public void setMode(int);
    method public void setParameters(java.lang.String);
    method public void setRingerMode(int);
    method public deprecated void setRouting(int, int, int);
    method public void setSpeakerphoneOn(boolean);
    method public deprecated void setStreamMute(int, boolean);
    method public deprecated void setStreamSolo(int, boolean);
    method public void setStreamVolume(int, int, int);
    method public deprecated void setVibrateSetting(int, int);
    method public deprecated void setWiredHeadsetOn(boolean);
    method public deprecated boolean shouldVibrate(int);
    method public void startBluetoothSco();
    method public void stopBluetoothSco();
    method public void unloadSoundEffects();
    method public deprecated void unregisterMediaButtonEventReceiver(android.content.ComponentName);
    method public deprecated void unregisterMediaButtonEventReceiver(android.app.PendingIntent);
    method public deprecated void unregisterRemoteControlClient(android.media.RemoteControlClient);
    method public deprecated void unregisterRemoteController(android.media.RemoteController);
    field public static final java.lang.String ACTION_AUDIO_BECOMING_NOISY = "android.media.AUDIO_BECOMING_NOISY";
    field public static final java.lang.String ACTION_HDMI_AUDIO_PLUG = "android.media.action.HDMI_AUDIO_PLUG";
    field public static final java.lang.String ACTION_HEADSET_PLUG = "android.intent.action.HEADSET_PLUG";
    field public static final deprecated java.lang.String ACTION_SCO_AUDIO_STATE_CHANGED = "android.media.SCO_AUDIO_STATE_CHANGED";
    field public static final java.lang.String ACTION_SCO_AUDIO_STATE_UPDATED = "android.media.ACTION_SCO_AUDIO_STATE_UPDATED";
    field public static final int ADJUST_LOWER = -1; // 0xffffffff
    field public static final int ADJUST_MUTE = -100; // 0xffffff9c
    field public static final int ADJUST_RAISE = 1; // 0x1
    field public static final int ADJUST_SAME = 0; // 0x0
    field public static final int ADJUST_TOGGLE_MUTE = 101; // 0x65
    field public static final int ADJUST_UNMUTE = 100; // 0x64
    field public static final int AUDIOFOCUS_GAIN = 1; // 0x1
    field public static final int AUDIOFOCUS_GAIN_TRANSIENT = 2; // 0x2
    field public static final int AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE = 4; // 0x4
    field public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK = 3; // 0x3
    field public static final int AUDIOFOCUS_LOSS = -1; // 0xffffffff
    field public static final int AUDIOFOCUS_LOSS_TRANSIENT = -2; // 0xfffffffe
    field public static final int AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK = -3; // 0xfffffffd
    field public static final int AUDIOFOCUS_REQUEST_FAILED = 0; // 0x0
    field public static final int AUDIOFOCUS_REQUEST_GRANTED = 1; // 0x1
    field public static final int AUDIO_SESSION_ID_GENERATE = 0; // 0x0
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_DEAD_OBJECT = -6; // 0xfffffffa
    field public static final java.lang.String EXTRA_AUDIO_PLUG_STATE = "android.media.extra.AUDIO_PLUG_STATE";
    field public static final java.lang.String EXTRA_ENCODINGS = "android.media.extra.ENCODINGS";
    field public static final java.lang.String EXTRA_MAX_CHANNEL_COUNT = "android.media.extra.MAX_CHANNEL_COUNT";
    field public static final java.lang.String EXTRA_RINGER_MODE = "android.media.EXTRA_RINGER_MODE";
    field public static final java.lang.String EXTRA_SCO_AUDIO_PREVIOUS_STATE = "android.media.extra.SCO_AUDIO_PREVIOUS_STATE";
    field public static final java.lang.String EXTRA_SCO_AUDIO_STATE = "android.media.extra.SCO_AUDIO_STATE";
    field public static final deprecated java.lang.String EXTRA_VIBRATE_SETTING = "android.media.EXTRA_VIBRATE_SETTING";
    field public static final deprecated java.lang.String EXTRA_VIBRATE_TYPE = "android.media.EXTRA_VIBRATE_TYPE";
    field public static final int FLAG_ALLOW_RINGER_MODES = 2; // 0x2
    field public static final int FLAG_PLAY_SOUND = 4; // 0x4
    field public static final int FLAG_REMOVE_SOUND_AND_VIBRATE = 8; // 0x8
    field public static final int FLAG_SHOW_UI = 1; // 0x1
    field public static final int FLAG_VIBRATE = 16; // 0x10
    field public static final int FX_FOCUS_NAVIGATION_DOWN = 2; // 0x2
    field public static final int FX_FOCUS_NAVIGATION_LEFT = 3; // 0x3
    field public static final int FX_FOCUS_NAVIGATION_RIGHT = 4; // 0x4
    field public static final int FX_FOCUS_NAVIGATION_UP = 1; // 0x1
    field public static final int FX_KEYPRESS_DELETE = 7; // 0x7
    field public static final int FX_KEYPRESS_INVALID = 9; // 0x9
    field public static final int FX_KEYPRESS_RETURN = 8; // 0x8
    field public static final int FX_KEYPRESS_SPACEBAR = 6; // 0x6
    field public static final int FX_KEYPRESS_STANDARD = 5; // 0x5
    field public static final int FX_KEY_CLICK = 0; // 0x0
    field public static final int MODE_CURRENT = -1; // 0xffffffff
    field public static final int MODE_INVALID = -2; // 0xfffffffe
    field public static final int MODE_IN_CALL = 2; // 0x2
    field public static final int MODE_IN_COMMUNICATION = 3; // 0x3
    field public static final int MODE_NORMAL = 0; // 0x0
    field public static final int MODE_RINGTONE = 1; // 0x1
    field public static final deprecated int NUM_STREAMS = 5; // 0x5
    field public static final java.lang.String PROPERTY_OUTPUT_FRAMES_PER_BUFFER = "android.media.property.OUTPUT_FRAMES_PER_BUFFER";
    field public static final java.lang.String PROPERTY_OUTPUT_SAMPLE_RATE = "android.media.property.OUTPUT_SAMPLE_RATE";
    field public static final java.lang.String RINGER_MODE_CHANGED_ACTION = "android.media.RINGER_MODE_CHANGED";
    field public static final int RINGER_MODE_NORMAL = 2; // 0x2
    field public static final int RINGER_MODE_SILENT = 0; // 0x0
    field public static final int RINGER_MODE_VIBRATE = 1; // 0x1
    field public static final deprecated int ROUTE_ALL = -1; // 0xffffffff
    field public static final deprecated int ROUTE_BLUETOOTH = 4; // 0x4
    field public static final deprecated int ROUTE_BLUETOOTH_A2DP = 16; // 0x10
    field public static final deprecated int ROUTE_BLUETOOTH_SCO = 4; // 0x4
    field public static final deprecated int ROUTE_EARPIECE = 1; // 0x1
    field public static final deprecated int ROUTE_HEADSET = 8; // 0x8
    field public static final deprecated int ROUTE_SPEAKER = 2; // 0x2
    field public static final int SCO_AUDIO_STATE_CONNECTED = 1; // 0x1
    field public static final int SCO_AUDIO_STATE_CONNECTING = 2; // 0x2
    field public static final int SCO_AUDIO_STATE_DISCONNECTED = 0; // 0x0
    field public static final int SCO_AUDIO_STATE_ERROR = -1; // 0xffffffff
    field public static final int STREAM_ALARM = 4; // 0x4
    field public static final int STREAM_DTMF = 8; // 0x8
    field public static final int STREAM_MUSIC = 3; // 0x3
    field public static final int STREAM_NOTIFICATION = 5; // 0x5
    field public static final int STREAM_RING = 2; // 0x2
    field public static final int STREAM_SYSTEM = 1; // 0x1
    field public static final int STREAM_VOICE_CALL = 0; // 0x0
    field public static final int USE_DEFAULT_STREAM_TYPE = -2147483648; // 0x80000000
    field public static final deprecated java.lang.String VIBRATE_SETTING_CHANGED_ACTION = "android.media.VIBRATE_SETTING_CHANGED";
    field public static final deprecated int VIBRATE_SETTING_OFF = 0; // 0x0
    field public static final deprecated int VIBRATE_SETTING_ON = 1; // 0x1
    field public static final deprecated int VIBRATE_SETTING_ONLY_SILENT = 2; // 0x2
    field public static final deprecated int VIBRATE_TYPE_NOTIFICATION = 1; // 0x1
    field public static final deprecated int VIBRATE_TYPE_RINGER = 0; // 0x0
  }

  public static abstract interface AudioManager.OnAudioFocusChangeListener {
    method public abstract void onAudioFocusChange(int);
  }

  public class AudioRecord {
    ctor public AudioRecord(int, int, int, int, int) throws java.lang.IllegalArgumentException;
    method public int getAudioFormat();
    method public int getAudioSessionId();
    method public int getAudioSource();
    method public int getChannelConfiguration();
    method public int getChannelCount();
    method public static int getMinBufferSize(int, int, int);
    method public int getNotificationMarkerPosition();
    method public int getPositionNotificationPeriod();
    method public int getRecordingState();
    method public int getSampleRate();
    method public int getState();
    method public int read(byte[], int, int);
    method public int read(short[], int, int);
    method public int read(float[], int, int, int);
    method public int read(java.nio.ByteBuffer, int);
    method public void release();
    method public int setNotificationMarkerPosition(int);
    method public int setPositionNotificationPeriod(int);
    method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener);
    method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener, android.os.Handler);
    method public void startRecording() throws java.lang.IllegalStateException;
    method public void startRecording(android.media.MediaSyncEvent) throws java.lang.IllegalStateException;
    method public void stop() throws java.lang.IllegalStateException;
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
    field public static final int ERROR_INVALID_OPERATION = -3; // 0xfffffffd
    field public static final int READ_BLOCKING = 0; // 0x0
    field public static final int READ_NON_BLOCKING = 1; // 0x1
    field public static final int RECORDSTATE_RECORDING = 3; // 0x3
    field public static final int RECORDSTATE_STOPPED = 1; // 0x1
    field public static final int STATE_INITIALIZED = 1; // 0x1
    field public static final int STATE_UNINITIALIZED = 0; // 0x0
    field public static final int SUCCESS = 0; // 0x0
  }

  public static class AudioRecord.Builder {
    ctor public AudioRecord.Builder();
    method public android.media.AudioRecord build() throws java.lang.UnsupportedOperationException;
    method public android.media.AudioRecord.Builder setAudioFormat(android.media.AudioFormat) throws java.lang.IllegalArgumentException;
    method public android.media.AudioRecord.Builder setBufferSizeInBytes(int) throws java.lang.IllegalArgumentException;
    method public android.media.AudioRecord.Builder setCapturePreset(int) throws java.lang.IllegalArgumentException;
  }

  public static abstract interface AudioRecord.OnRecordPositionUpdateListener {
    method public abstract void onMarkerReached(android.media.AudioRecord);
    method public abstract void onPeriodicNotification(android.media.AudioRecord);
  }

  public final class AudioTimestamp {
    ctor public AudioTimestamp();
    field public long framePosition;
    field public long nanoTime;
  }

  public class AudioTrack {
    ctor public AudioTrack(int, int, int, int, int, int) throws java.lang.IllegalArgumentException;
    ctor public AudioTrack(int, int, int, int, int, int, int) throws java.lang.IllegalArgumentException;
    ctor public AudioTrack(android.media.AudioAttributes, android.media.AudioFormat, int, int, int) throws java.lang.IllegalArgumentException;
    method public int attachAuxEffect(int);
    method public void flush();
    method public int getAudioFormat();
    method public int getAudioSessionId();
    method public int getChannelConfiguration();
    method public int getChannelCount();
    method public static float getMaxVolume();
    method public static int getMinBufferSize(int, int, int);
    method public static float getMinVolume();
    method public int getNativeFrameCount() throws java.lang.IllegalStateException;
    method public static int getNativeOutputSampleRate(int);
    method public int getNotificationMarkerPosition();
    method public int getPlayState();
    method public int getPlaybackHeadPosition();
    method public int getPlaybackRate();
    method public int getPositionNotificationPeriod();
    method public int getSampleRate();
    method public int getState();
    method public int getStreamType();
    method public boolean getTimestamp(android.media.AudioTimestamp);
    method public void pause() throws java.lang.IllegalStateException;
    method public void play() throws java.lang.IllegalStateException;
    method public void release();
    method public int reloadStaticData();
    method public int setAuxEffectSendLevel(float);
    method public int setLoopPoints(int, int, int);
    method public int setNotificationMarkerPosition(int);
    method public int setPlaybackHeadPosition(int);
    method public void setPlaybackPositionUpdateListener(android.media.AudioTrack.OnPlaybackPositionUpdateListener);
    method public void setPlaybackPositionUpdateListener(android.media.AudioTrack.OnPlaybackPositionUpdateListener, android.os.Handler);
    method public int setPlaybackRate(int);
    method public int setPositionNotificationPeriod(int);
    method protected deprecated void setState(int);
    method public deprecated int setStereoVolume(float, float);
    method public int setVolume(float);
    method public void stop() throws java.lang.IllegalStateException;
    method public int write(byte[], int, int);
    method public int write(short[], int, int);
    method public int write(float[], int, int, int);
    method public int write(java.nio.ByteBuffer, int, int);
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
    field public static final int ERROR_INVALID_OPERATION = -3; // 0xfffffffd
    field public static final int MODE_STATIC = 0; // 0x0
    field public static final int MODE_STREAM = 1; // 0x1
    field public static final int PLAYSTATE_PAUSED = 2; // 0x2
    field public static final int PLAYSTATE_PLAYING = 3; // 0x3
    field public static final int PLAYSTATE_STOPPED = 1; // 0x1
    field public static final int STATE_INITIALIZED = 1; // 0x1
    field public static final int STATE_NO_STATIC_DATA = 2; // 0x2
    field public static final int STATE_UNINITIALIZED = 0; // 0x0
    field public static final int SUCCESS = 0; // 0x0
    field public static final int WRITE_BLOCKING = 0; // 0x0
    field public static final int WRITE_NON_BLOCKING = 1; // 0x1
  }

  public static class AudioTrack.Builder {
    ctor public AudioTrack.Builder();
    method public android.media.AudioTrack build() throws java.lang.UnsupportedOperationException;
    method public android.media.AudioTrack.Builder setAudioAttributes(android.media.AudioAttributes) throws java.lang.IllegalArgumentException;
    method public android.media.AudioTrack.Builder setAudioFormat(android.media.AudioFormat) throws java.lang.IllegalArgumentException;
    method public android.media.AudioTrack.Builder setBufferSizeInBytes(int) throws java.lang.IllegalArgumentException;
    method public android.media.AudioTrack.Builder setSessionId(int) throws java.lang.IllegalArgumentException;
    method public android.media.AudioTrack.Builder setTransferMode(int) throws java.lang.IllegalArgumentException;
  }

  public static abstract interface AudioTrack.OnPlaybackPositionUpdateListener {
    method public abstract void onMarkerReached(android.media.AudioTrack);
    method public abstract void onPeriodicNotification(android.media.AudioTrack);
  }

  public class CamcorderProfile {
    method public static android.media.CamcorderProfile get(int);
    method public static android.media.CamcorderProfile get(int, int);
    method public static boolean hasProfile(int);
    method public static boolean hasProfile(int, int);
    field public static final int QUALITY_1080P = 6; // 0x6
    field public static final int QUALITY_2160P = 8; // 0x8
    field public static final int QUALITY_480P = 4; // 0x4
    field public static final int QUALITY_720P = 5; // 0x5
    field public static final int QUALITY_CIF = 3; // 0x3
    field public static final int QUALITY_HIGH = 1; // 0x1
    field public static final int QUALITY_HIGH_SPEED_1080P = 2004; // 0x7d4
    field public static final int QUALITY_HIGH_SPEED_2160P = 2005; // 0x7d5
    field public static final int QUALITY_HIGH_SPEED_480P = 2002; // 0x7d2
    field public static final int QUALITY_HIGH_SPEED_720P = 2003; // 0x7d3
    field public static final int QUALITY_HIGH_SPEED_HIGH = 2001; // 0x7d1
    field public static final int QUALITY_HIGH_SPEED_LOW = 2000; // 0x7d0
    field public static final int QUALITY_LOW = 0; // 0x0
    field public static final int QUALITY_QCIF = 2; // 0x2
    field public static final int QUALITY_QVGA = 7; // 0x7
    field public static final int QUALITY_TIME_LAPSE_1080P = 1006; // 0x3ee
    field public static final int QUALITY_TIME_LAPSE_2160P = 1008; // 0x3f0
    field public static final int QUALITY_TIME_LAPSE_480P = 1004; // 0x3ec
    field public static final int QUALITY_TIME_LAPSE_720P = 1005; // 0x3ed
    field public static final int QUALITY_TIME_LAPSE_CIF = 1003; // 0x3eb
    field public static final int QUALITY_TIME_LAPSE_HIGH = 1001; // 0x3e9
    field public static final int QUALITY_TIME_LAPSE_LOW = 1000; // 0x3e8
    field public static final int QUALITY_TIME_LAPSE_QCIF = 1002; // 0x3ea
    field public static final int QUALITY_TIME_LAPSE_QVGA = 1007; // 0x3ef
    field public int audioBitRate;
    field public int audioChannels;
    field public int audioCodec;
    field public int audioSampleRate;
    field public int duration;
    field public int fileFormat;
    field public int quality;
    field public int videoBitRate;
    field public int videoCodec;
    field public int videoFrameHeight;
    field public int videoFrameRate;
    field public int videoFrameWidth;
  }

  public class CameraProfile {
    ctor public CameraProfile();
    method public static int getJpegEncodingQualityParameter(int);
    method public static int getJpegEncodingQualityParameter(int, int);
    field public static final int QUALITY_HIGH = 2; // 0x2
    field public static final int QUALITY_LOW = 0; // 0x0
    field public static final int QUALITY_MEDIUM = 1; // 0x1
  }

  public final class DeniedByServerException extends android.media.MediaDrmException {
    ctor public DeniedByServerException(java.lang.String);
  }

  public class ExifInterface {
    ctor public ExifInterface(java.lang.String) throws java.io.IOException;
    method public double getAltitude(double);
    method public java.lang.String getAttribute(java.lang.String);
    method public double getAttributeDouble(java.lang.String, double);
    method public int getAttributeInt(java.lang.String, int);
    method public boolean getLatLong(float[]);
    method public byte[] getThumbnail();
    method public boolean hasThumbnail();
    method public void saveAttributes() throws java.io.IOException;
    method public void setAttribute(java.lang.String, java.lang.String);
    field public static final int ORIENTATION_FLIP_HORIZONTAL = 2; // 0x2
    field public static final int ORIENTATION_FLIP_VERTICAL = 4; // 0x4
    field public static final int ORIENTATION_NORMAL = 1; // 0x1
    field public static final int ORIENTATION_ROTATE_180 = 3; // 0x3
    field public static final int ORIENTATION_ROTATE_270 = 8; // 0x8
    field public static final int ORIENTATION_ROTATE_90 = 6; // 0x6
    field public static final int ORIENTATION_TRANSPOSE = 5; // 0x5
    field public static final int ORIENTATION_TRANSVERSE = 7; // 0x7
    field public static final int ORIENTATION_UNDEFINED = 0; // 0x0
    field public static final java.lang.String TAG_APERTURE = "FNumber";
    field public static final java.lang.String TAG_DATETIME = "DateTime";
    field public static final java.lang.String TAG_EXPOSURE_TIME = "ExposureTime";
    field public static final java.lang.String TAG_FLASH = "Flash";
    field public static final java.lang.String TAG_FOCAL_LENGTH = "FocalLength";
    field public static final java.lang.String TAG_GPS_ALTITUDE = "GPSAltitude";
    field public static final java.lang.String TAG_GPS_ALTITUDE_REF = "GPSAltitudeRef";
    field public static final java.lang.String TAG_GPS_DATESTAMP = "GPSDateStamp";
    field public static final java.lang.String TAG_GPS_LATITUDE = "GPSLatitude";
    field public static final java.lang.String TAG_GPS_LATITUDE_REF = "GPSLatitudeRef";
    field public static final java.lang.String TAG_GPS_LONGITUDE = "GPSLongitude";
    field public static final java.lang.String TAG_GPS_LONGITUDE_REF = "GPSLongitudeRef";
    field public static final java.lang.String TAG_GPS_PROCESSING_METHOD = "GPSProcessingMethod";
    field public static final java.lang.String TAG_GPS_TIMESTAMP = "GPSTimeStamp";
    field public static final java.lang.String TAG_IMAGE_LENGTH = "ImageLength";
    field public static final java.lang.String TAG_IMAGE_WIDTH = "ImageWidth";
    field public static final java.lang.String TAG_ISO = "ISOSpeedRatings";
    field public static final java.lang.String TAG_MAKE = "Make";
    field public static final java.lang.String TAG_MODEL = "Model";
    field public static final java.lang.String TAG_ORIENTATION = "Orientation";
    field public static final java.lang.String TAG_WHITE_BALANCE = "WhiteBalance";
    field public static final int WHITEBALANCE_AUTO = 0; // 0x0
    field public static final int WHITEBALANCE_MANUAL = 1; // 0x1
  }

  public class FaceDetector {
    ctor public FaceDetector(int, int, int);
    method public int findFaces(android.graphics.Bitmap, android.media.FaceDetector.Face[]);
  }

  public class FaceDetector.Face {
    method public float confidence();
    method public float eyesDistance();
    method public void getMidPoint(android.graphics.PointF);
    method public float pose(int);
    field public static final float CONFIDENCE_THRESHOLD = 0.4f;
    field public static final int EULER_X = 0; // 0x0
    field public static final int EULER_Y = 1; // 0x1
    field public static final int EULER_Z = 2; // 0x2
  }

  public abstract class Image implements java.lang.AutoCloseable {
    method public abstract void close();
    method public android.graphics.Rect getCropRect();
    method public abstract int getFormat();
    method public abstract int getHeight();
    method public abstract android.media.Image.Plane[] getPlanes();
    method public abstract long getTimestamp();
    method public abstract int getWidth();
    method public boolean isOpaque();
    method public void setCropRect(android.graphics.Rect);
    method public void setTimestamp(long);
  }

  public static abstract class Image.Plane {
    method public abstract java.nio.ByteBuffer getBuffer();
    method public abstract int getPixelStride();
    method public abstract int getRowStride();
  }

  public class ImageReader implements java.lang.AutoCloseable {
    method public android.media.Image acquireLatestImage();
    method public android.media.Image acquireNextImage();
    method public void close();
    method public int getHeight();
    method public int getImageFormat();
    method public int getMaxImages();
    method public android.view.Surface getSurface();
    method public int getWidth();
    method public boolean isOpaque();
    method public static android.media.ImageReader newInstance(int, int, int, int);
    method public static android.media.ImageReader newOpaqueInstance(int, int, int);
    method public void setOnImageAvailableListener(android.media.ImageReader.OnImageAvailableListener, android.os.Handler);
  }

  public static abstract interface ImageReader.OnImageAvailableListener {
    method public abstract void onImageAvailable(android.media.ImageReader);
  }

  public class ImageWriter implements java.lang.AutoCloseable {
    method public void close();
    method public android.media.Image dequeueInputImage();
    method public int getFormat();
    method public int getMaxImages();
    method public static android.media.ImageWriter newInstance(android.view.Surface, int);
    method public void queueInputImage(android.media.Image);
    method public void setImageListener(android.media.ImageWriter.ImageListener, android.os.Handler);
  }

  public static abstract interface ImageWriter.ImageListener {
    method public abstract void onInputImageReleased(android.media.ImageWriter);
  }

  public class JetPlayer {
    method public boolean clearQueue();
    method public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method public boolean closeJetFile();
    method public static android.media.JetPlayer getJetPlayer();
    method public static int getMaxTracks();
    method public boolean loadJetFile(java.lang.String);
    method public boolean loadJetFile(android.content.res.AssetFileDescriptor);
    method public boolean pause();
    method public boolean play();
    method public boolean queueJetSegment(int, int, int, int, int, byte);
    method public boolean queueJetSegmentMuteArray(int, int, int, int, boolean[], byte);
    method public void release();
    method public void setEventListener(android.media.JetPlayer.OnJetEventListener);
    method public void setEventListener(android.media.JetPlayer.OnJetEventListener, android.os.Handler);
    method public boolean setMuteArray(boolean[], boolean);
    method public boolean setMuteFlag(int, boolean, boolean);
    method public boolean setMuteFlags(int, boolean);
    method public boolean triggerClip(int);
  }

  public static abstract interface JetPlayer.OnJetEventListener {
    method public abstract void onJetEvent(android.media.JetPlayer, short, byte, byte, byte, byte);
    method public abstract void onJetNumQueuedSegmentUpdate(android.media.JetPlayer, int);
    method public abstract void onJetPauseUpdate(android.media.JetPlayer, int);
    method public abstract void onJetUserIdUpdate(android.media.JetPlayer, int, int);
  }

  public class MediaActionSound {
    ctor public MediaActionSound();
    method public synchronized void load(int);
    method public synchronized void play(int);
    method public void release();
    field public static final int FOCUS_COMPLETE = 1; // 0x1
    field public static final int SHUTTER_CLICK = 0; // 0x0
    field public static final int START_VIDEO_RECORDING = 2; // 0x2
    field public static final int STOP_VIDEO_RECORDING = 3; // 0x3
  }

  public final class MediaCodec {
    method public void configure(android.media.MediaFormat, android.view.Surface, android.media.MediaCrypto, int);
    method public static android.media.MediaCodec createByCodecName(java.lang.String) throws java.io.IOException;
    method public static android.media.MediaCodec createDecoderByType(java.lang.String) throws java.io.IOException;
    method public static android.media.MediaCodec createEncoderByType(java.lang.String) throws java.io.IOException;
    method public final android.view.Surface createInputSurface();
    method public final int dequeueInputBuffer(long);
    method public final int dequeueOutputBuffer(android.media.MediaCodec.BufferInfo, long);
    method public final void flush();
    method public android.media.MediaCodecInfo getCodecInfo();
    method public java.nio.ByteBuffer getInputBuffer(int);
    method public deprecated java.nio.ByteBuffer[] getInputBuffers();
    method public final android.media.MediaFormat getInputFormat();
    method public android.media.Image getInputImage(int);
    method public final java.lang.String getName();
    method public java.nio.ByteBuffer getOutputBuffer(int);
    method public deprecated java.nio.ByteBuffer[] getOutputBuffers();
    method public final android.media.MediaFormat getOutputFormat();
    method public final android.media.MediaFormat getOutputFormat(int);
    method public android.media.Image getOutputImage(int);
    method public final void queueInputBuffer(int, int, int, long, int) throws android.media.MediaCodec.CryptoException;
    method public final void queueSecureInputBuffer(int, int, android.media.MediaCodec.CryptoInfo, long, int) throws android.media.MediaCodec.CryptoException;
    method public final void release();
    method public final void releaseOutputBuffer(int, boolean);
    method public final void releaseOutputBuffer(int, long);
    method public final void reset();
    method public void setCallback(android.media.MediaCodec.Callback);
    method public final void setParameters(android.os.Bundle);
    method public final void setVideoScalingMode(int);
    method public final void signalEndOfInputStream();
    method public final void start();
    method public final void stop();
    field public static final int BUFFER_FLAG_CODEC_CONFIG = 2; // 0x2
    field public static final int BUFFER_FLAG_END_OF_STREAM = 4; // 0x4
    field public static final int BUFFER_FLAG_KEY_FRAME = 1; // 0x1
    field public static final deprecated int BUFFER_FLAG_SYNC_FRAME = 1; // 0x1
    field public static final int CONFIGURE_FLAG_ENCODE = 1; // 0x1
    field public static final int CRYPTO_MODE_AES_CTR = 1; // 0x1
    field public static final int CRYPTO_MODE_UNENCRYPTED = 0; // 0x0
    field public static final deprecated int INFO_OUTPUT_BUFFERS_CHANGED = -3; // 0xfffffffd
    field public static final int INFO_OUTPUT_FORMAT_CHANGED = -2; // 0xfffffffe
    field public static final int INFO_TRY_AGAIN_LATER = -1; // 0xffffffff
    field public static final java.lang.String PARAMETER_KEY_REQUEST_SYNC_FRAME = "request-sync";
    field public static final java.lang.String PARAMETER_KEY_SUSPEND = "drop-input-frames";
    field public static final java.lang.String PARAMETER_KEY_VIDEO_BITRATE = "video-bitrate";
    field public static final int REASON_RECLAIMED = 1; // 0x1
    field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT = 1; // 0x1
    field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2; // 0x2
  }

  public static final class MediaCodec.BufferInfo {
    ctor public MediaCodec.BufferInfo();
    method public void set(int, int, long, int);
    field public int flags;
    field public int offset;
    field public long presentationTimeUs;
    field public int size;
  }

  public static abstract class MediaCodec.Callback {
    ctor public MediaCodec.Callback();
    method public void onCodecReleased(android.media.MediaCodec, int);
    method public abstract void onError(android.media.MediaCodec, android.media.MediaCodec.CodecException);
    method public abstract void onInputBufferAvailable(android.media.MediaCodec, int);
    method public abstract void onOutputBufferAvailable(android.media.MediaCodec, int, android.media.MediaCodec.BufferInfo);
    method public abstract void onOutputFormatChanged(android.media.MediaCodec, android.media.MediaFormat);
  }

  public static final class MediaCodec.CodecException extends java.lang.IllegalStateException {
    method public java.lang.String getDiagnosticInfo();
    method public int getReason();
    method public boolean isRecoverable();
    method public boolean isTransient();
    field public static final int REASON_HARDWARE = 0; // 0x0
    field public static final int REASON_RECLAIMED = 1; // 0x1
  }

  public static final class MediaCodec.CryptoException extends java.lang.RuntimeException {
    ctor public MediaCodec.CryptoException(int, java.lang.String);
    method public int getErrorCode();
    field public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4; // 0x4
    field public static final int ERROR_KEY_EXPIRED = 2; // 0x2
    field public static final int ERROR_NO_KEY = 1; // 0x1
    field public static final int ERROR_RESOURCE_BUSY = 3; // 0x3
  }

  public static final class MediaCodec.CryptoInfo {
    ctor public MediaCodec.CryptoInfo();
    method public void set(int, int[], int[], byte[], byte[], int);
    field public byte[] iv;
    field public byte[] key;
    field public int mode;
    field public int[] numBytesOfClearData;
    field public int[] numBytesOfEncryptedData;
    field public int numSubSamples;
  }

  public final class MediaCodecInfo {
    method public final android.media.MediaCodecInfo.CodecCapabilities getCapabilitiesForType(java.lang.String);
    method public final java.lang.String getName();
    method public final java.lang.String[] getSupportedTypes();
    method public final boolean isEncoder();
  }

  public static final class MediaCodecInfo.AudioCapabilities {
    method public android.util.Range<java.lang.Integer> getBitrateRange();
    method public int getMaxInputChannelCount();
    method public android.util.Range<java.lang.Integer>[] getSupportedSampleRateRanges();
    method public int[] getSupportedSampleRates();
    method public boolean isSampleRateSupported(int);
  }

  public static final class MediaCodecInfo.CodecCapabilities {
    ctor public MediaCodecInfo.CodecCapabilities();
    method public static android.media.MediaCodecInfo.CodecCapabilities createFromProfileLevel(java.lang.String, int, int);
    method public android.media.MediaCodecInfo.AudioCapabilities getAudioCapabilities();
    method public android.media.MediaFormat getDefaultFormat();
    method public android.media.MediaCodecInfo.EncoderCapabilities getEncoderCapabilities();
    method public int getMaxSupportedInstances();
    method public java.lang.String getMimeType();
    method public android.media.MediaCodecInfo.VideoCapabilities getVideoCapabilities();
    method public final boolean isFeatureRequired(java.lang.String);
    method public final boolean isFeatureSupported(java.lang.String);
    method public final boolean isFormatSupported(android.media.MediaFormat);
    field public static final int COLOR_Format12bitRGB444 = 3; // 0x3
    field public static final int COLOR_Format16bitARGB1555 = 5; // 0x5
    field public static final int COLOR_Format16bitARGB4444 = 4; // 0x4
    field public static final int COLOR_Format16bitBGR565 = 7; // 0x7
    field public static final int COLOR_Format16bitRGB565 = 6; // 0x6
    field public static final int COLOR_Format18BitBGR666 = 41; // 0x29
    field public static final int COLOR_Format18bitARGB1665 = 9; // 0x9
    field public static final int COLOR_Format18bitRGB666 = 8; // 0x8
    field public static final int COLOR_Format19bitARGB1666 = 10; // 0xa
    field public static final int COLOR_Format24BitABGR6666 = 43; // 0x2b
    field public static final int COLOR_Format24BitARGB6666 = 42; // 0x2a
    field public static final int COLOR_Format24bitARGB1887 = 13; // 0xd
    field public static final int COLOR_Format24bitBGR888 = 12; // 0xc
    field public static final int COLOR_Format24bitRGB888 = 11; // 0xb
    field public static final int COLOR_Format25bitARGB1888 = 14; // 0xe
    field public static final int COLOR_Format32BitRGBA8888 = 2130747392; // 0x7f00a000
    field public static final int COLOR_Format32bitARGB8888 = 16; // 0x10
    field public static final int COLOR_Format32bitBGRA8888 = 15; // 0xf
    field public static final int COLOR_Format8bitRGB332 = 2; // 0x2
    field public static final int COLOR_FormatCbYCrY = 27; // 0x1b
    field public static final int COLOR_FormatCrYCbY = 28; // 0x1c
    field public static final int COLOR_FormatL16 = 36; // 0x24
    field public static final int COLOR_FormatL2 = 33; // 0x21
    field public static final int COLOR_FormatL24 = 37; // 0x25
    field public static final int COLOR_FormatL32 = 38; // 0x26
    field public static final int COLOR_FormatL4 = 34; // 0x22
    field public static final int COLOR_FormatL8 = 35; // 0x23
    field public static final int COLOR_FormatMonochrome = 1; // 0x1
    field public static final int COLOR_FormatRawBayer10bit = 31; // 0x1f
    field public static final int COLOR_FormatRawBayer8bit = 30; // 0x1e
    field public static final int COLOR_FormatRawBayer8bitcompressed = 32; // 0x20
    field public static final int COLOR_FormatSurface = 2130708361; // 0x7f000789
    field public static final int COLOR_FormatYCbYCr = 25; // 0x19
    field public static final int COLOR_FormatYCrYCb = 26; // 0x1a
    field public static final int COLOR_FormatYUV411PackedPlanar = 18; // 0x12
    field public static final int COLOR_FormatYUV411Planar = 17; // 0x11
    field public static final int COLOR_FormatYUV420Flexible = 2135033992; // 0x7f420888
    field public static final int COLOR_FormatYUV420PackedPlanar = 20; // 0x14
    field public static final int COLOR_FormatYUV420PackedSemiPlanar = 39; // 0x27
    field public static final int COLOR_FormatYUV420Planar = 19; // 0x13
    field public static final int COLOR_FormatYUV420SemiPlanar = 21; // 0x15
    field public static final int COLOR_FormatYUV422PackedPlanar = 23; // 0x17
    field public static final int COLOR_FormatYUV422PackedSemiPlanar = 40; // 0x28
    field public static final int COLOR_FormatYUV422Planar = 22; // 0x16
    field public static final int COLOR_FormatYUV422SemiPlanar = 24; // 0x18
    field public static final int COLOR_FormatYUV444Interleaved = 29; // 0x1d
    field public static final int COLOR_QCOM_FormatYUV420SemiPlanar = 2141391872; // 0x7fa30c00
    field public static final int COLOR_TI_FormatYUV420PackedSemiPlanar = 2130706688; // 0x7f000100
    field public static final java.lang.String FEATURE_AdaptivePlayback = "adaptive-playback";
    field public static final java.lang.String FEATURE_SecurePlayback = "secure-playback";
    field public static final java.lang.String FEATURE_TunneledPlayback = "tunneled-playback";
    field public int[] colorFormats;
    field public android.media.MediaCodecInfo.CodecProfileLevel[] profileLevels;
  }

  public static final class MediaCodecInfo.CodecProfileLevel {
    ctor public MediaCodecInfo.CodecProfileLevel();
    field public static final int AACObjectELD = 39; // 0x27
    field public static final int AACObjectERLC = 17; // 0x11
    field public static final int AACObjectHE = 5; // 0x5
    field public static final int AACObjectHE_PS = 29; // 0x1d
    field public static final int AACObjectLC = 2; // 0x2
    field public static final int AACObjectLD = 23; // 0x17
    field public static final int AACObjectLTP = 4; // 0x4
    field public static final int AACObjectMain = 1; // 0x1
    field public static final int AACObjectSSR = 3; // 0x3
    field public static final int AACObjectScalable = 6; // 0x6
    field public static final int AVCLevel1 = 1; // 0x1
    field public static final int AVCLevel11 = 4; // 0x4
    field public static final int AVCLevel12 = 8; // 0x8
    field public static final int AVCLevel13 = 16; // 0x10
    field public static final int AVCLevel1b = 2; // 0x2
    field public static final int AVCLevel2 = 32; // 0x20
    field public static final int AVCLevel21 = 64; // 0x40
    field public static final int AVCLevel22 = 128; // 0x80
    field public static final int AVCLevel3 = 256; // 0x100
    field public static final int AVCLevel31 = 512; // 0x200
    field public static final int AVCLevel32 = 1024; // 0x400
    field public static final int AVCLevel4 = 2048; // 0x800
    field public static final int AVCLevel41 = 4096; // 0x1000
    field public static final int AVCLevel42 = 8192; // 0x2000
    field public static final int AVCLevel5 = 16384; // 0x4000
    field public static final int AVCLevel51 = 32768; // 0x8000
    field public static final int AVCLevel52 = 65536; // 0x10000
    field public static final int AVCProfileBaseline = 1; // 0x1
    field public static final int AVCProfileExtended = 4; // 0x4
    field public static final int AVCProfileHigh = 8; // 0x8
    field public static final int AVCProfileHigh10 = 16; // 0x10
    field public static final int AVCProfileHigh422 = 32; // 0x20
    field public static final int AVCProfileHigh444 = 64; // 0x40
    field public static final int AVCProfileMain = 2; // 0x2
    field public static final int H263Level10 = 1; // 0x1
    field public static final int H263Level20 = 2; // 0x2
    field public static final int H263Level30 = 4; // 0x4
    field public static final int H263Level40 = 8; // 0x8
    field public static final int H263Level45 = 16; // 0x10
    field public static final int H263Level50 = 32; // 0x20
    field public static final int H263Level60 = 64; // 0x40
    field public static final int H263Level70 = 128; // 0x80
    field public static final int H263ProfileBackwardCompatible = 4; // 0x4
    field public static final int H263ProfileBaseline = 1; // 0x1
    field public static final int H263ProfileH320Coding = 2; // 0x2
    field public static final int H263ProfileHighCompression = 32; // 0x20
    field public static final int H263ProfileHighLatency = 256; // 0x100
    field public static final int H263ProfileISWV2 = 8; // 0x8
    field public static final int H263ProfileISWV3 = 16; // 0x10
    field public static final int H263ProfileInterlace = 128; // 0x80
    field public static final int H263ProfileInternet = 64; // 0x40
    field public static final int HEVCHighTierLevel1 = 2; // 0x2
    field public static final int HEVCHighTierLevel2 = 8; // 0x8
    field public static final int HEVCHighTierLevel21 = 32; // 0x20
    field public static final int HEVCHighTierLevel3 = 128; // 0x80
    field public static final int HEVCHighTierLevel31 = 512; // 0x200
    field public static final int HEVCHighTierLevel4 = 2048; // 0x800
    field public static final int HEVCHighTierLevel41 = 8192; // 0x2000
    field public static final int HEVCHighTierLevel5 = 32768; // 0x8000
    field public static final int HEVCHighTierLevel51 = 131072; // 0x20000
    field public static final int HEVCHighTierLevel52 = 524288; // 0x80000
    field public static final int HEVCHighTierLevel6 = 2097152; // 0x200000
    field public static final int HEVCHighTierLevel61 = 8388608; // 0x800000
    field public static final int HEVCHighTierLevel62 = 33554432; // 0x2000000
    field public static final int HEVCMainTierLevel1 = 1; // 0x1
    field public static final int HEVCMainTierLevel2 = 4; // 0x4
    field public static final int HEVCMainTierLevel21 = 16; // 0x10
    field public static final int HEVCMainTierLevel3 = 64; // 0x40
    field public static final int HEVCMainTierLevel31 = 256; // 0x100
    field public static final int HEVCMainTierLevel4 = 1024; // 0x400
    field public static final int HEVCMainTierLevel41 = 4096; // 0x1000
    field public static final int HEVCMainTierLevel5 = 16384; // 0x4000
    field public static final int HEVCMainTierLevel51 = 65536; // 0x10000
    field public static final int HEVCMainTierLevel52 = 262144; // 0x40000
    field public static final int HEVCMainTierLevel6 = 1048576; // 0x100000
    field public static final int HEVCMainTierLevel61 = 4194304; // 0x400000
    field public static final int HEVCMainTierLevel62 = 16777216; // 0x1000000
    field public static final int HEVCProfileMain = 1; // 0x1
    field public static final int HEVCProfileMain10 = 2; // 0x2
    field public static final int MPEG4Level0 = 1; // 0x1
    field public static final int MPEG4Level0b = 2; // 0x2
    field public static final int MPEG4Level1 = 4; // 0x4
    field public static final int MPEG4Level2 = 8; // 0x8
    field public static final int MPEG4Level3 = 16; // 0x10
    field public static final int MPEG4Level4 = 32; // 0x20
    field public static final int MPEG4Level4a = 64; // 0x40
    field public static final int MPEG4Level5 = 128; // 0x80
    field public static final int MPEG4ProfileAdvancedCoding = 4096; // 0x1000
    field public static final int MPEG4ProfileAdvancedCore = 8192; // 0x2000
    field public static final int MPEG4ProfileAdvancedRealTime = 1024; // 0x400
    field public static final int MPEG4ProfileAdvancedScalable = 16384; // 0x4000
    field public static final int MPEG4ProfileAdvancedSimple = 32768; // 0x8000
    field public static final int MPEG4ProfileBasicAnimated = 256; // 0x100
    field public static final int MPEG4ProfileCore = 4; // 0x4
    field public static final int MPEG4ProfileCoreScalable = 2048; // 0x800
    field public static final int MPEG4ProfileHybrid = 512; // 0x200
    field public static final int MPEG4ProfileMain = 8; // 0x8
    field public static final int MPEG4ProfileNbit = 16; // 0x10
    field public static final int MPEG4ProfileScalableTexture = 32; // 0x20
    field public static final int MPEG4ProfileSimple = 1; // 0x1
    field public static final int MPEG4ProfileSimpleFBA = 128; // 0x80
    field public static final int MPEG4ProfileSimpleFace = 64; // 0x40
    field public static final int MPEG4ProfileSimpleScalable = 2; // 0x2
    field public static final int VP8Level_Version0 = 1; // 0x1
    field public static final int VP8Level_Version1 = 2; // 0x2
    field public static final int VP8Level_Version2 = 4; // 0x4
    field public static final int VP8Level_Version3 = 8; // 0x8
    field public static final int VP8ProfileMain = 1; // 0x1
    field public int level;
    field public int profile;
  }

  public static final class MediaCodecInfo.EncoderCapabilities {
    method public android.util.Range<java.lang.Integer> getComplexityRange();
    method public boolean isBitrateModeSupported(int);
    field public static final int BITRATE_MODE_CBR = 2; // 0x2
    field public static final int BITRATE_MODE_CQ = 0; // 0x0
    field public static final int BITRATE_MODE_VBR = 1; // 0x1
  }

  public static final class MediaCodecInfo.VideoCapabilities {
    method public boolean areSizeAndRateSupported(int, int, double);
    method public android.util.Range<java.lang.Integer> getBitrateRange();
    method public int getHeightAlignment();
    method public android.util.Range<java.lang.Integer> getSupportedFrameRates();
    method public android.util.Range<java.lang.Double> getSupportedFrameRatesFor(int, int);
    method public android.util.Range<java.lang.Integer> getSupportedHeights();
    method public android.util.Range<java.lang.Integer> getSupportedHeightsFor(int);
    method public android.util.Range<java.lang.Integer> getSupportedWidths();
    method public android.util.Range<java.lang.Integer> getSupportedWidthsFor(int);
    method public int getWidthAlignment();
    method public boolean isSizeSupported(int, int);
  }

  public final class MediaCodecList {
    ctor public MediaCodecList(int);
    method public final java.lang.String findDecoderForFormat(android.media.MediaFormat);
    method public final java.lang.String findEncoderForFormat(android.media.MediaFormat);
    method public static final deprecated int getCodecCount();
    method public static final deprecated android.media.MediaCodecInfo getCodecInfoAt(int);
    method public final android.media.MediaCodecInfo[] getCodecInfos();
    field public static final int ALL_CODECS = 1; // 0x1
    field public static final int REGULAR_CODECS = 0; // 0x0
  }

  public final class MediaCrypto {
    ctor public MediaCrypto(java.util.UUID, byte[]) throws android.media.MediaCryptoException;
    method public static final boolean isCryptoSchemeSupported(java.util.UUID);
    method public final void release();
    method public final boolean requiresSecureDecoderComponent(java.lang.String);
    method public final void setMediaDrmSession(byte[]) throws android.media.MediaCryptoException;
  }

  public final class MediaCryptoException extends java.lang.Exception {
    ctor public MediaCryptoException(java.lang.String);
  }

  public class MediaDescription implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.CharSequence getDescription();
    method public android.os.Bundle getExtras();
    method public android.graphics.Bitmap getIconBitmap();
    method public android.net.Uri getIconUri();
    method public java.lang.String getMediaId();
    method public android.net.Uri getMediaUri();
    method public java.lang.CharSequence getSubtitle();
    method public java.lang.CharSequence getTitle();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.MediaDescription> CREATOR;
  }

  public static class MediaDescription.Builder {
    ctor public MediaDescription.Builder();
    method public android.media.MediaDescription build();
    method public android.media.MediaDescription.Builder setDescription(java.lang.CharSequence);
    method public android.media.MediaDescription.Builder setExtras(android.os.Bundle);
    method public android.media.MediaDescription.Builder setIconBitmap(android.graphics.Bitmap);
    method public android.media.MediaDescription.Builder setIconUri(android.net.Uri);
    method public android.media.MediaDescription.Builder setMediaId(java.lang.String);
    method public android.media.MediaDescription.Builder setMediaUri(android.net.Uri);
    method public android.media.MediaDescription.Builder setSubtitle(java.lang.CharSequence);
    method public android.media.MediaDescription.Builder setTitle(java.lang.CharSequence);
  }

  public final class MediaDrm {
    ctor public MediaDrm(java.util.UUID) throws android.media.UnsupportedSchemeException;
    method public void closeSession(byte[]);
    method public android.media.MediaDrm.CryptoSession getCryptoSession(byte[], java.lang.String, java.lang.String);
    method public android.media.MediaDrm.KeyRequest getKeyRequest(byte[], byte[], java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>) throws android.media.NotProvisionedException;
    method public byte[] getPropertyByteArray(java.lang.String);
    method public java.lang.String getPropertyString(java.lang.String);
    method public android.media.MediaDrm.ProvisionRequest getProvisionRequest();
    method public byte[] getSecureStop(byte[]);
    method public java.util.List<byte[]> getSecureStops();
    method public static final boolean isCryptoSchemeSupported(java.util.UUID);
    method public static final boolean isCryptoSchemeSupported(java.util.UUID, java.lang.String);
    method public byte[] openSession() throws android.media.NotProvisionedException, android.media.ResourceBusyException;
    method public byte[] provideKeyResponse(byte[], byte[]) throws android.media.DeniedByServerException, android.media.NotProvisionedException;
    method public void provideProvisionResponse(byte[]) throws android.media.DeniedByServerException;
    method public java.util.HashMap<java.lang.String, java.lang.String> queryKeyStatus(byte[]);
    method public final void release();
    method public void releaseAllSecureStops();
    method public void releaseSecureStops(byte[]);
    method public void removeKeys(byte[]);
    method public void restoreKeys(byte[], byte[]);
    method public void setOnEventListener(android.media.MediaDrm.OnEventListener);
    method public void setOnExpirationUpdateListener(android.media.MediaDrm.OnExpirationUpdateListener, android.os.Handler);
    method public void setOnKeysChangeListener(android.media.MediaDrm.OnKeysChangeListener, android.os.Handler);
    method public void setPropertyByteArray(java.lang.String, byte[]);
    method public void setPropertyString(java.lang.String, java.lang.String);
    field public static final int EVENT_KEY_EXPIRED = 3; // 0x3
    field public static final int EVENT_KEY_REQUIRED = 2; // 0x2
    field public static final deprecated int EVENT_PROVISION_REQUIRED = 1; // 0x1
    field public static final int EVENT_SESSION_RECLAIMED = 5; // 0x5
    field public static final int EVENT_VENDOR_DEFINED = 4; // 0x4
    field public static final int KEY_STATUS_EXPIRED = 1; // 0x1
    field public static final int KEY_STATUS_INTERNAL_ERROR = 4; // 0x4
    field public static final int KEY_STATUS_OUTPUT_NOT_ALLOWED = 2; // 0x2
    field public static final int KEY_STATUS_PENDING = 3; // 0x3
    field public static final int KEY_STATUS_USABLE = 0; // 0x0
    field public static final int KEY_TYPE_OFFLINE = 2; // 0x2
    field public static final int KEY_TYPE_RELEASE = 3; // 0x3
    field public static final int KEY_TYPE_STREAMING = 1; // 0x1
    field public static final java.lang.String PROPERTY_ALGORITHMS = "algorithms";
    field public static final java.lang.String PROPERTY_DESCRIPTION = "description";
    field public static final java.lang.String PROPERTY_DEVICE_UNIQUE_ID = "deviceUniqueId";
    field public static final java.lang.String PROPERTY_VENDOR = "vendor";
    field public static final java.lang.String PROPERTY_VERSION = "version";
    field public static final int REQUEST_TYPE_INITIAL = 0; // 0x0
    field public static final int REQUEST_TYPE_RELEASE = 2; // 0x2
    field public static final int REQUEST_TYPE_RENEWAL = 1; // 0x1
  }

  public final class MediaDrm.CryptoSession {
    method public byte[] decrypt(byte[], byte[], byte[]);
    method public byte[] encrypt(byte[], byte[], byte[]);
    method public byte[] sign(byte[], byte[]);
    method public boolean verify(byte[], byte[], byte[]);
  }

  public static final class MediaDrm.KeyRequest {
    method public byte[] getData();
    method public java.lang.String getDefaultUrl();
    method public int getRequestType();
  }

  public static final class MediaDrm.KeyStatus {
    method public byte[] getKeyId();
    method public int getStatusCode();
  }

  public static final class MediaDrm.MediaDrmStateException extends java.lang.IllegalStateException {
    method public java.lang.String getDiagnosticInfo();
  }

  public static abstract interface MediaDrm.OnEventListener {
    method public abstract void onEvent(android.media.MediaDrm, byte[], int, int, byte[]);
  }

  public static abstract interface MediaDrm.OnExpirationUpdateListener {
    method public abstract void onExpirationUpdate(android.media.MediaDrm, byte[], long);
  }

  public static abstract interface MediaDrm.OnKeysChangeListener {
    method public abstract void onKeysChange(android.media.MediaDrm, byte[], java.util.List<android.media.MediaDrm.KeyStatus>, boolean);
  }

  public static final class MediaDrm.ProvisionRequest {
    method public byte[] getData();
    method public java.lang.String getDefaultUrl();
  }

  public class MediaDrmException extends java.lang.Exception {
    ctor public MediaDrmException(java.lang.String);
  }

  public final class MediaExtractor {
    ctor public MediaExtractor();
    method public boolean advance();
    method public long getCachedDuration();
    method public java.util.Map<java.util.UUID, byte[]> getPsshInfo();
    method public boolean getSampleCryptoInfo(android.media.MediaCodec.CryptoInfo);
    method public int getSampleFlags();
    method public long getSampleTime();
    method public int getSampleTrackIndex();
    method public final int getTrackCount();
    method public android.media.MediaFormat getTrackFormat(int);
    method public boolean hasCacheReachedEndOfStream();
    method public int readSampleData(java.nio.ByteBuffer, int);
    method public final void release();
    method public void seekTo(long, int);
    method public void selectTrack(int);
    method public final void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
    method public final void setDataSource(java.lang.String, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
    method public final void setDataSource(java.lang.String) throws java.io.IOException;
    method public final void setDataSource(java.io.FileDescriptor) throws java.io.IOException;
    method public final void setDataSource(java.io.FileDescriptor, long, long) throws java.io.IOException;
    method public void unselectTrack(int);
    field public static final int SAMPLE_FLAG_ENCRYPTED = 2; // 0x2
    field public static final int SAMPLE_FLAG_SYNC = 1; // 0x1
    field public static final int SEEK_TO_CLOSEST_SYNC = 2; // 0x2
    field public static final int SEEK_TO_NEXT_SYNC = 1; // 0x1
    field public static final int SEEK_TO_PREVIOUS_SYNC = 0; // 0x0
  }

  public final class MediaFormat {
    ctor public MediaFormat();
    method public final boolean containsKey(java.lang.String);
    method public static final android.media.MediaFormat createAudioFormat(java.lang.String, int, int);
    method public static final android.media.MediaFormat createSubtitleFormat(java.lang.String, java.lang.String);
    method public static final android.media.MediaFormat createVideoFormat(java.lang.String, int, int);
    method public final java.nio.ByteBuffer getByteBuffer(java.lang.String);
    method public boolean getFeatureEnabled(java.lang.String);
    method public final float getFloat(java.lang.String);
    method public final int getInteger(java.lang.String);
    method public final long getLong(java.lang.String);
    method public final java.lang.String getString(java.lang.String);
    method public final void setByteBuffer(java.lang.String, java.nio.ByteBuffer);
    method public void setFeatureEnabled(java.lang.String, boolean);
    method public final void setFloat(java.lang.String, float);
    method public final void setInteger(java.lang.String, int);
    method public final void setLong(java.lang.String, long);
    method public final void setString(java.lang.String, java.lang.String);
    field public static final java.lang.String KEY_AAC_DRC_ATTENUATION_FACTOR = "aac-drc-cut-level";
    field public static final java.lang.String KEY_AAC_DRC_BOOST_FACTOR = "aac-drc-boost-level";
    field public static final java.lang.String KEY_AAC_DRC_HEAVY_COMPRESSION = "aac-drc-heavy-compression";
    field public static final java.lang.String KEY_AAC_DRC_TARGET_REFERENCE_LEVEL = "aac-target-ref-level";
    field public static final java.lang.String KEY_AAC_ENCODED_TARGET_LEVEL = "aac-encoded-target-level";
    field public static final java.lang.String KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT = "aac-max-output-channel_count";
    field public static final java.lang.String KEY_AAC_PROFILE = "aac-profile";
    field public static final java.lang.String KEY_AAC_SBR_MODE = "aac-sbr-mode";
    field public static final java.lang.String KEY_AUDIO_SESSION_ID = "audio-session-id";
    field public static final java.lang.String KEY_BITRATE_MODE = "bitrate-mode";
    field public static final java.lang.String KEY_BIT_RATE = "bitrate";
    field public static final java.lang.String KEY_CAPTURE_RATE = "capture-rate";
    field public static final java.lang.String KEY_CHANNEL_COUNT = "channel-count";
    field public static final java.lang.String KEY_CHANNEL_MASK = "channel-mask";
    field public static final java.lang.String KEY_COLOR_FORMAT = "color-format";
    field public static final java.lang.String KEY_COMPLEXITY = "complexity";
    field public static final java.lang.String KEY_DURATION = "durationUs";
    field public static final java.lang.String KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level";
    field public static final java.lang.String KEY_FRAME_RATE = "frame-rate";
    field public static final java.lang.String KEY_HEIGHT = "height";
    field public static final java.lang.String KEY_IS_ADTS = "is-adts";
    field public static final java.lang.String KEY_IS_AUTOSELECT = "is-autoselect";
    field public static final java.lang.String KEY_IS_DEFAULT = "is-default";
    field public static final java.lang.String KEY_IS_FORCED_SUBTITLE = "is-forced-subtitle";
    field public static final java.lang.String KEY_I_FRAME_INTERVAL = "i-frame-interval";
    field public static final java.lang.String KEY_LANGUAGE = "language";
    field public static final java.lang.String KEY_MAX_HEIGHT = "max-height";
    field public static final java.lang.String KEY_MAX_INPUT_SIZE = "max-input-size";
    field public static final java.lang.String KEY_MAX_WIDTH = "max-width";
    field public static final java.lang.String KEY_MIME = "mime";
    field public static final java.lang.String KEY_OPERATING_RATE = "operating-rate";
    field public static final java.lang.String KEY_PRIORITY = "priority";
    field public static final java.lang.String KEY_PROFILE = "profile";
    field public static final java.lang.String KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown";
    field public static final java.lang.String KEY_REPEAT_PREVIOUS_FRAME_AFTER = "repeat-previous-frame-after";
    field public static final java.lang.String KEY_SAMPLE_RATE = "sample-rate";
    field public static final java.lang.String KEY_TEMPORAL_LAYERING = "ts-schema";
    field public static final java.lang.String KEY_WIDTH = "width";
    field public static final java.lang.String MIMETYPE_AUDIO_AAC = "audio/mp4a-latm";
    field public static final java.lang.String MIMETYPE_AUDIO_AC3 = "audio/ac3";
    field public static final java.lang.String MIMETYPE_AUDIO_AMR_NB = "audio/3gpp";
    field public static final java.lang.String MIMETYPE_AUDIO_AMR_WB = "audio/amr-wb";
    field public static final java.lang.String MIMETYPE_AUDIO_FLAC = "audio/flac";
    field public static final java.lang.String MIMETYPE_AUDIO_G711_ALAW = "audio/g711-alaw";
    field public static final java.lang.String MIMETYPE_AUDIO_G711_MLAW = "audio/g711-mlaw";
    field public static final java.lang.String MIMETYPE_AUDIO_MPEG = "audio/mpeg";
    field public static final java.lang.String MIMETYPE_AUDIO_MSGSM = "audio/gsm";
    field public static final java.lang.String MIMETYPE_AUDIO_OPUS = "audio/opus";
    field public static final java.lang.String MIMETYPE_AUDIO_QCELP = "audio/qcelp";
    field public static final java.lang.String MIMETYPE_AUDIO_RAW = "audio/raw";
    field public static final java.lang.String MIMETYPE_AUDIO_VORBIS = "audio/vorbis";
    field public static final java.lang.String MIMETYPE_TEXT_CEA_608 = "text/cea-608";
    field public static final java.lang.String MIMETYPE_TEXT_VTT = "text/vtt";
    field public static final java.lang.String MIMETYPE_VIDEO_AVC = "video/avc";
    field public static final java.lang.String MIMETYPE_VIDEO_H263 = "video/3gpp";
    field public static final java.lang.String MIMETYPE_VIDEO_HEVC = "video/hevc";
    field public static final java.lang.String MIMETYPE_VIDEO_MPEG2 = "video/mpeg2";
    field public static final java.lang.String MIMETYPE_VIDEO_MPEG4 = "video/mp4v-es";
    field public static final java.lang.String MIMETYPE_VIDEO_RAW = "video/raw";
    field public static final java.lang.String MIMETYPE_VIDEO_VP8 = "video/x-vnd.on2.vp8";
    field public static final java.lang.String MIMETYPE_VIDEO_VP9 = "video/x-vnd.on2.vp9";
  }

  public final class MediaMetadata implements android.os.Parcelable {
    method public boolean containsKey(java.lang.String);
    method public int describeContents();
    method public android.graphics.Bitmap getBitmap(java.lang.String);
    method public android.media.MediaDescription getDescription();
    method public long getLong(java.lang.String);
    method public android.media.Rating getRating(java.lang.String);
    method public java.lang.String getString(java.lang.String);
    method public java.lang.CharSequence getText(java.lang.String);
    method public java.util.Set<java.lang.String> keySet();
    method public int size();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.MediaMetadata> CREATOR;
    field public static final java.lang.String METADATA_KEY_ALBUM = "android.media.metadata.ALBUM";
    field public static final java.lang.String METADATA_KEY_ALBUM_ART = "android.media.metadata.ALBUM_ART";
    field public static final java.lang.String METADATA_KEY_ALBUM_ARTIST = "android.media.metadata.ALBUM_ARTIST";
    field public static final java.lang.String METADATA_KEY_ALBUM_ART_URI = "android.media.metadata.ALBUM_ART_URI";
    field public static final java.lang.String METADATA_KEY_ART = "android.media.metadata.ART";
    field public static final java.lang.String METADATA_KEY_ARTIST = "android.media.metadata.ARTIST";
    field public static final java.lang.String METADATA_KEY_ART_URI = "android.media.metadata.ART_URI";
    field public static final java.lang.String METADATA_KEY_AUTHOR = "android.media.metadata.AUTHOR";
    field public static final java.lang.String METADATA_KEY_COMPILATION = "android.media.metadata.COMPILATION";
    field public static final java.lang.String METADATA_KEY_COMPOSER = "android.media.metadata.COMPOSER";
    field public static final java.lang.String METADATA_KEY_DATE = "android.media.metadata.DATE";
    field public static final java.lang.String METADATA_KEY_DISC_NUMBER = "android.media.metadata.DISC_NUMBER";
    field public static final java.lang.String METADATA_KEY_DISPLAY_DESCRIPTION = "android.media.metadata.DISPLAY_DESCRIPTION";
    field public static final java.lang.String METADATA_KEY_DISPLAY_ICON = "android.media.metadata.DISPLAY_ICON";
    field public static final java.lang.String METADATA_KEY_DISPLAY_ICON_URI = "android.media.metadata.DISPLAY_ICON_URI";
    field public static final java.lang.String METADATA_KEY_DISPLAY_SUBTITLE = "android.media.metadata.DISPLAY_SUBTITLE";
    field public static final java.lang.String METADATA_KEY_DISPLAY_TITLE = "android.media.metadata.DISPLAY_TITLE";
    field public static final java.lang.String METADATA_KEY_DURATION = "android.media.metadata.DURATION";
    field public static final java.lang.String METADATA_KEY_GENRE = "android.media.metadata.GENRE";
    field public static final java.lang.String METADATA_KEY_MEDIA_ID = "android.media.metadata.MEDIA_ID";
    field public static final java.lang.String METADATA_KEY_NUM_TRACKS = "android.media.metadata.NUM_TRACKS";
    field public static final java.lang.String METADATA_KEY_RATING = "android.media.metadata.RATING";
    field public static final java.lang.String METADATA_KEY_TITLE = "android.media.metadata.TITLE";
    field public static final java.lang.String METADATA_KEY_TRACK_NUMBER = "android.media.metadata.TRACK_NUMBER";
    field public static final java.lang.String METADATA_KEY_USER_RATING = "android.media.metadata.USER_RATING";
    field public static final java.lang.String METADATA_KEY_WRITER = "android.media.metadata.WRITER";
    field public static final java.lang.String METADATA_KEY_YEAR = "android.media.metadata.YEAR";
  }

  public static final class MediaMetadata.Builder {
    ctor public MediaMetadata.Builder();
    ctor public MediaMetadata.Builder(android.media.MediaMetadata);
    method public android.media.MediaMetadata build();
    method public android.media.MediaMetadata.Builder putBitmap(java.lang.String, android.graphics.Bitmap);
    method public android.media.MediaMetadata.Builder putLong(java.lang.String, long);
    method public android.media.MediaMetadata.Builder putRating(java.lang.String, android.media.Rating);
    method public android.media.MediaMetadata.Builder putString(java.lang.String, java.lang.String);
    method public android.media.MediaMetadata.Builder putText(java.lang.String, java.lang.CharSequence);
  }

  public abstract deprecated class MediaMetadataEditor {
    method public synchronized void addEditableKey(int);
    method public abstract void apply();
    method public synchronized void clear();
    method public synchronized android.graphics.Bitmap getBitmap(int, android.graphics.Bitmap) throws java.lang.IllegalArgumentException;
    method public synchronized int[] getEditableKeys();
    method public synchronized long getLong(int, long) throws java.lang.IllegalArgumentException;
    method public synchronized java.lang.Object getObject(int, java.lang.Object) throws java.lang.IllegalArgumentException;
    method public synchronized java.lang.String getString(int, java.lang.String) throws java.lang.IllegalArgumentException;
    method public synchronized android.media.MediaMetadataEditor putBitmap(int, android.graphics.Bitmap) throws java.lang.IllegalArgumentException;
    method public synchronized android.media.MediaMetadataEditor putLong(int, long) throws java.lang.IllegalArgumentException;
    method public synchronized android.media.MediaMetadataEditor putObject(int, java.lang.Object) throws java.lang.IllegalArgumentException;
    method public synchronized android.media.MediaMetadataEditor putString(int, java.lang.String) throws java.lang.IllegalArgumentException;
    method public synchronized void removeEditableKeys();
    field public static final int BITMAP_KEY_ARTWORK = 100; // 0x64
    field public static final int RATING_KEY_BY_OTHERS = 101; // 0x65
    field public static final int RATING_KEY_BY_USER = 268435457; // 0x10000001
  }

  public class MediaMetadataRetriever {
    ctor public MediaMetadataRetriever();
    method public java.lang.String extractMetadata(int);
    method public byte[] getEmbeddedPicture();
    method public android.graphics.Bitmap getFrameAtTime(long, int);
    method public android.graphics.Bitmap getFrameAtTime(long);
    method public android.graphics.Bitmap getFrameAtTime();
    method public void release();
    method public void setDataSource(java.lang.String) throws java.lang.IllegalArgumentException;
    method public void setDataSource(java.lang.String, java.util.Map<java.lang.String, java.lang.String>) throws java.lang.IllegalArgumentException;
    method public void setDataSource(java.io.FileDescriptor, long, long) throws java.lang.IllegalArgumentException;
    method public void setDataSource(java.io.FileDescriptor) throws java.lang.IllegalArgumentException;
    method public void setDataSource(android.content.Context, android.net.Uri) throws java.lang.IllegalArgumentException, java.lang.SecurityException;
    field public static final int METADATA_KEY_ALBUM = 1; // 0x1
    field public static final int METADATA_KEY_ALBUMARTIST = 13; // 0xd
    field public static final int METADATA_KEY_ARTIST = 2; // 0x2
    field public static final int METADATA_KEY_AUTHOR = 3; // 0x3
    field public static final int METADATA_KEY_BITRATE = 20; // 0x14
    field public static final int METADATA_KEY_CAPTURE_FRAMERATE = 25; // 0x19
    field public static final int METADATA_KEY_CD_TRACK_NUMBER = 0; // 0x0
    field public static final int METADATA_KEY_COMPILATION = 15; // 0xf
    field public static final int METADATA_KEY_COMPOSER = 4; // 0x4
    field public static final int METADATA_KEY_DATE = 5; // 0x5
    field public static final int METADATA_KEY_DISC_NUMBER = 14; // 0xe
    field public static final int METADATA_KEY_DURATION = 9; // 0x9
    field public static final int METADATA_KEY_GENRE = 6; // 0x6
    field public static final int METADATA_KEY_HAS_AUDIO = 16; // 0x10
    field public static final int METADATA_KEY_HAS_VIDEO = 17; // 0x11
    field public static final int METADATA_KEY_LOCATION = 23; // 0x17
    field public static final int METADATA_KEY_MIMETYPE = 12; // 0xc
    field public static final int METADATA_KEY_NUM_TRACKS = 10; // 0xa
    field public static final int METADATA_KEY_TITLE = 7; // 0x7
    field public static final int METADATA_KEY_VIDEO_HEIGHT = 19; // 0x13
    field public static final int METADATA_KEY_VIDEO_ROTATION = 24; // 0x18
    field public static final int METADATA_KEY_VIDEO_WIDTH = 18; // 0x12
    field public static final int METADATA_KEY_WRITER = 11; // 0xb
    field public static final int METADATA_KEY_YEAR = 8; // 0x8
    field public static final int OPTION_CLOSEST = 3; // 0x3
    field public static final int OPTION_CLOSEST_SYNC = 2; // 0x2
    field public static final int OPTION_NEXT_SYNC = 1; // 0x1
    field public static final int OPTION_PREVIOUS_SYNC = 0; // 0x0
  }

  public final class MediaMuxer {
    ctor public MediaMuxer(java.lang.String, int) throws java.io.IOException;
    method public int addTrack(android.media.MediaFormat);
    method public void release();
    method public void setLocation(float, float);
    method public void setOrientationHint(int);
    method public void start();
    method public void stop();
    method public void writeSampleData(int, java.nio.ByteBuffer, android.media.MediaCodec.BufferInfo);
  }

  public static final class MediaMuxer.OutputFormat {
    field public static final int MUXER_OUTPUT_MPEG_4 = 0; // 0x0
    field public static final int MUXER_OUTPUT_WEBM = 1; // 0x1
  }

  public class MediaPlayer {
    ctor public MediaPlayer();
    method public void addTimedTextSource(java.lang.String, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void addTimedTextSource(android.content.Context, android.net.Uri, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void addTimedTextSource(java.io.FileDescriptor, java.lang.String) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void addTimedTextSource(java.io.FileDescriptor, long, long, java.lang.String) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void attachAuxEffect(int);
    method public static android.media.MediaPlayer create(android.content.Context, android.net.Uri);
    method public static android.media.MediaPlayer create(android.content.Context, android.net.Uri, android.view.SurfaceHolder);
    method public static android.media.MediaPlayer create(android.content.Context, android.net.Uri, android.view.SurfaceHolder, android.media.AudioAttributes, int);
    method public static android.media.MediaPlayer create(android.content.Context, int);
    method public static android.media.MediaPlayer create(android.content.Context, int, android.media.AudioAttributes, int);
    method public void deselectTrack(int) throws java.lang.IllegalStateException;
    method public int getAudioSessionId();
    method public int getCurrentPosition();
    method public int getDuration();
    method public int getSelectedTrack(int) throws java.lang.IllegalStateException;
    method public android.media.MediaPlayer.TrackInfo[] getTrackInfo() throws java.lang.IllegalStateException;
    method public int getVideoHeight();
    method public int getVideoWidth();
    method public boolean isLooping();
    method public boolean isPlaying();
    method public void pause() throws java.lang.IllegalStateException;
    method public void prepare() throws java.io.IOException, java.lang.IllegalStateException;
    method public void prepareAsync() throws java.lang.IllegalStateException;
    method public void release();
    method public void reset();
    method public void seekTo(int) throws java.lang.IllegalStateException;
    method public void selectTrack(int) throws java.lang.IllegalStateException;
    method public void setAudioAttributes(android.media.AudioAttributes) throws java.lang.IllegalArgumentException;
    method public void setAudioSessionId(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void setAudioStreamType(int);
    method public void setAuxEffectSendLevel(float);
    method public void setDataSource(android.content.Context, android.net.Uri) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
    method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
    method public void setDataSource(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
    method public void setDataSource(java.io.FileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void setDataSource(java.io.FileDescriptor, long, long) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public void setDisplay(android.view.SurfaceHolder);
    method public void setLooping(boolean);
    method public void setNextMediaPlayer(android.media.MediaPlayer);
    method public void setOnBufferingUpdateListener(android.media.MediaPlayer.OnBufferingUpdateListener);
    method public void setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener);
    method public void setOnErrorListener(android.media.MediaPlayer.OnErrorListener);
    method public void setOnInfoListener(android.media.MediaPlayer.OnInfoListener);
    method public void setOnPreparedListener(android.media.MediaPlayer.OnPreparedListener);
    method public void setOnSeekCompleteListener(android.media.MediaPlayer.OnSeekCompleteListener);
    method public void setOnTimedTextListener(android.media.MediaPlayer.OnTimedTextListener);
    method public void setOnVideoSizeChangedListener(android.media.MediaPlayer.OnVideoSizeChangedListener);
    method public void setPlaybackRate(float, int);
    method public void setScreenOnWhilePlaying(boolean);
    method public void setSurface(android.view.Surface);
    method public void setVideoScalingMode(int);
    method public void setVolume(float, float);
    method public void setWakeMode(android.content.Context, int);
    method public void start() throws java.lang.IllegalStateException;
    method public void stop() throws java.lang.IllegalStateException;
    field public static final int MEDIA_ERROR_IO = -1004; // 0xfffffc14
    field public static final int MEDIA_ERROR_MALFORMED = -1007; // 0xfffffc11
    field public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200; // 0xc8
    field public static final int MEDIA_ERROR_SERVER_DIED = 100; // 0x64
    field public static final int MEDIA_ERROR_TIMED_OUT = -110; // 0xffffff92
    field public static final int MEDIA_ERROR_UNKNOWN = 1; // 0x1
    field public static final int MEDIA_ERROR_UNSUPPORTED = -1010; // 0xfffffc0e
    field public static final int MEDIA_INFO_BAD_INTERLEAVING = 800; // 0x320
    field public static final int MEDIA_INFO_BUFFERING_END = 702; // 0x2be
    field public static final int MEDIA_INFO_BUFFERING_START = 701; // 0x2bd
    field public static final int MEDIA_INFO_METADATA_UPDATE = 802; // 0x322
    field public static final int MEDIA_INFO_NOT_SEEKABLE = 801; // 0x321
    field public static final int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902; // 0x386
    field public static final int MEDIA_INFO_UNKNOWN = 1; // 0x1
    field public static final int MEDIA_INFO_UNSUPPORTED_SUBTITLE = 901; // 0x385
    field public static final int MEDIA_INFO_VIDEO_RENDERING_START = 3; // 0x3
    field public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700; // 0x2bc
    field public static final java.lang.String MEDIA_MIMETYPE_TEXT_SUBRIP = "application/x-subrip";
    field public static final int PLAYBACK_RATE_AUDIO_MODE_RESAMPLE = 0; // 0x0
    field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT = 1; // 0x1
    field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2; // 0x2
  }

  public static abstract interface MediaPlayer.OnBufferingUpdateListener {
    method public abstract void onBufferingUpdate(android.media.MediaPlayer, int);
  }

  public static abstract interface MediaPlayer.OnCompletionListener {
    method public abstract void onCompletion(android.media.MediaPlayer);
  }

  public static abstract interface MediaPlayer.OnErrorListener {
    method public abstract boolean onError(android.media.MediaPlayer, int, int);
  }

  public static abstract interface MediaPlayer.OnInfoListener {
    method public abstract boolean onInfo(android.media.MediaPlayer, int, int);
  }

  public static abstract interface MediaPlayer.OnPreparedListener {
    method public abstract void onPrepared(android.media.MediaPlayer);
  }

  public static abstract interface MediaPlayer.OnSeekCompleteListener {
    method public abstract void onSeekComplete(android.media.MediaPlayer);
  }

  public static abstract interface MediaPlayer.OnTimedTextListener {
    method public abstract void onTimedText(android.media.MediaPlayer, android.media.TimedText);
  }

  public static abstract interface MediaPlayer.OnVideoSizeChangedListener {
    method public abstract void onVideoSizeChanged(android.media.MediaPlayer, int, int);
  }

  public static class MediaPlayer.TrackInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.media.MediaFormat getFormat();
    method public java.lang.String getLanguage();
    method public int getTrackType();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int MEDIA_TRACK_TYPE_AUDIO = 2; // 0x2
    field public static final int MEDIA_TRACK_TYPE_SUBTITLE = 4; // 0x4
    field public static final int MEDIA_TRACK_TYPE_TIMEDTEXT = 3; // 0x3
    field public static final int MEDIA_TRACK_TYPE_UNKNOWN = 0; // 0x0
    field public static final int MEDIA_TRACK_TYPE_VIDEO = 1; // 0x1
  }

  public class MediaRecorder {
    ctor public MediaRecorder();
    method public static final int getAudioSourceMax();
    method public int getMaxAmplitude() throws java.lang.IllegalStateException;
    method public android.view.Surface getSurface();
    method public void prepare() throws java.io.IOException, java.lang.IllegalStateException;
    method public void release();
    method public void reset();
    method public void setAudioChannels(int);
    method public void setAudioEncoder(int) throws java.lang.IllegalStateException;
    method public void setAudioEncodingBitRate(int);
    method public void setAudioSamplingRate(int);
    method public void setAudioSource(int) throws java.lang.IllegalStateException;
    method public deprecated void setCamera(android.hardware.Camera);
    method public void setCaptureRate(double);
    method public void setLocation(float, float);
    method public void setMaxDuration(int) throws java.lang.IllegalArgumentException;
    method public void setMaxFileSize(long) throws java.lang.IllegalArgumentException;
    method public void setOnErrorListener(android.media.MediaRecorder.OnErrorListener);
    method public void setOnInfoListener(android.media.MediaRecorder.OnInfoListener);
    method public void setOrientationHint(int);
    method public void setOutputFile(java.io.FileDescriptor) throws java.lang.IllegalStateException;
    method public void setOutputFile(java.lang.String) throws java.lang.IllegalStateException;
    method public void setOutputFormat(int) throws java.lang.IllegalStateException;
    method public void setPreviewDisplay(android.view.Surface);
    method public void setProfile(android.media.CamcorderProfile);
    method public void setVideoEncoder(int) throws java.lang.IllegalStateException;
    method public void setVideoEncodingBitRate(int);
    method public void setVideoFrameRate(int) throws java.lang.IllegalStateException;
    method public void setVideoSize(int, int) throws java.lang.IllegalStateException;
    method public void setVideoSource(int) throws java.lang.IllegalStateException;
    method public void start() throws java.lang.IllegalStateException;
    method public void stop() throws java.lang.IllegalStateException;
    field public static final int MEDIA_ERROR_SERVER_DIED = 100; // 0x64
    field public static final int MEDIA_RECORDER_ERROR_UNKNOWN = 1; // 0x1
    field public static final int MEDIA_RECORDER_INFO_MAX_DURATION_REACHED = 800; // 0x320
    field public static final int MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED = 801; // 0x321
    field public static final int MEDIA_RECORDER_INFO_UNKNOWN = 1; // 0x1
  }

  public final class MediaRecorder.AudioEncoder {
    field public static final int AAC = 3; // 0x3
    field public static final int AAC_ELD = 5; // 0x5
    field public static final int AMR_NB = 1; // 0x1
    field public static final int AMR_WB = 2; // 0x2
    field public static final int DEFAULT = 0; // 0x0
    field public static final int HE_AAC = 4; // 0x4
    field public static final int VORBIS = 6; // 0x6
  }

  public final class MediaRecorder.AudioSource {
    field public static final int CAMCORDER = 5; // 0x5
    field public static final int DEFAULT = 0; // 0x0
    field public static final int MIC = 1; // 0x1
    field public static final int REMOTE_SUBMIX = 8; // 0x8
    field public static final int VOICE_CALL = 4; // 0x4
    field public static final int VOICE_COMMUNICATION = 7; // 0x7
    field public static final int VOICE_DOWNLINK = 3; // 0x3
    field public static final int VOICE_RECOGNITION = 6; // 0x6
    field public static final int VOICE_UPLINK = 2; // 0x2
  }

  public static abstract interface MediaRecorder.OnErrorListener {
    method public abstract void onError(android.media.MediaRecorder, int, int);
  }

  public static abstract interface MediaRecorder.OnInfoListener {
    method public abstract void onInfo(android.media.MediaRecorder, int, int);
  }

  public final class MediaRecorder.OutputFormat {
    field public static final int AAC_ADTS = 6; // 0x6
    field public static final int AMR_NB = 3; // 0x3
    field public static final int AMR_WB = 4; // 0x4
    field public static final int DEFAULT = 0; // 0x0
    field public static final int MPEG_4 = 2; // 0x2
    field public static final deprecated int RAW_AMR = 3; // 0x3
    field public static final int THREE_GPP = 1; // 0x1
    field public static final int WEBM = 9; // 0x9
  }

  public final class MediaRecorder.VideoEncoder {
    field public static final int DEFAULT = 0; // 0x0
    field public static final int H263 = 1; // 0x1
    field public static final int H264 = 2; // 0x2
    field public static final int MPEG_4_SP = 3; // 0x3
    field public static final int VP8 = 4; // 0x4
  }

  public final class MediaRecorder.VideoSource {
    field public static final int CAMERA = 1; // 0x1
    field public static final int DEFAULT = 0; // 0x0
    field public static final int SURFACE = 2; // 0x2
  }

  public class MediaRouter {
    method public void addCallback(int, android.media.MediaRouter.Callback);
    method public void addCallback(int, android.media.MediaRouter.Callback, int);
    method public void addUserRoute(android.media.MediaRouter.UserRouteInfo);
    method public void clearUserRoutes();
    method public android.media.MediaRouter.RouteCategory createRouteCategory(java.lang.CharSequence, boolean);
    method public android.media.MediaRouter.RouteCategory createRouteCategory(int, boolean);
    method public android.media.MediaRouter.UserRouteInfo createUserRoute(android.media.MediaRouter.RouteCategory);
    method public android.media.MediaRouter.RouteCategory getCategoryAt(int);
    method public int getCategoryCount();
    method public android.media.MediaRouter.RouteInfo getDefaultRoute();
    method public android.media.MediaRouter.RouteInfo getRouteAt(int);
    method public int getRouteCount();
    method public android.media.MediaRouter.RouteInfo getSelectedRoute(int);
    method public void removeCallback(android.media.MediaRouter.Callback);
    method public void removeUserRoute(android.media.MediaRouter.UserRouteInfo);
    method public void selectRoute(int, android.media.MediaRouter.RouteInfo);
    field public static final int CALLBACK_FLAG_PERFORM_ACTIVE_SCAN = 1; // 0x1
    field public static final int CALLBACK_FLAG_UNFILTERED_EVENTS = 2; // 0x2
    field public static final int ROUTE_TYPE_LIVE_AUDIO = 1; // 0x1
    field public static final int ROUTE_TYPE_LIVE_VIDEO = 2; // 0x2
    field public static final int ROUTE_TYPE_USER = 8388608; // 0x800000
  }

  public static abstract class MediaRouter.Callback {
    ctor public MediaRouter.Callback();
    method public abstract void onRouteAdded(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
    method public abstract void onRouteChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
    method public abstract void onRouteGrouped(android.media.MediaRouter, android.media.MediaRouter.RouteInfo, android.media.MediaRouter.RouteGroup, int);
    method public void onRoutePresentationDisplayChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
    method public abstract void onRouteRemoved(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
    method public abstract void onRouteSelected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo);
    method public abstract void onRouteUngrouped(android.media.MediaRouter, android.media.MediaRouter.RouteInfo, android.media.MediaRouter.RouteGroup);
    method public abstract void onRouteUnselected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo);
    method public abstract void onRouteVolumeChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
  }

  public static class MediaRouter.RouteCategory {
    method public java.lang.CharSequence getName();
    method public java.lang.CharSequence getName(android.content.Context);
    method public java.util.List<android.media.MediaRouter.RouteInfo> getRoutes(java.util.List<android.media.MediaRouter.RouteInfo>);
    method public int getSupportedTypes();
    method public boolean isGroupable();
  }

  public static class MediaRouter.RouteGroup extends android.media.MediaRouter.RouteInfo {
    method public void addRoute(android.media.MediaRouter.RouteInfo);
    method public void addRoute(android.media.MediaRouter.RouteInfo, int);
    method public android.media.MediaRouter.RouteInfo getRouteAt(int);
    method public int getRouteCount();
    method public void removeRoute(android.media.MediaRouter.RouteInfo);
    method public void removeRoute(int);
    method public void setIconDrawable(android.graphics.drawable.Drawable);
    method public void setIconResource(int);
  }

  public static class MediaRouter.RouteInfo {
    method public android.media.MediaRouter.RouteCategory getCategory();
    method public java.lang.CharSequence getDescription();
    method public android.media.MediaRouter.RouteGroup getGroup();
    method public android.graphics.drawable.Drawable getIconDrawable();
    method public java.lang.CharSequence getName();
    method public java.lang.CharSequence getName(android.content.Context);
    method public int getPlaybackStream();
    method public int getPlaybackType();
    method public android.view.Display getPresentationDisplay();
    method public java.lang.CharSequence getStatus();
    method public int getSupportedTypes();
    method public java.lang.Object getTag();
    method public int getVolume();
    method public int getVolumeHandling();
    method public int getVolumeMax();
    method public boolean isConnecting();
    method public boolean isEnabled();
    method public void requestSetVolume(int);
    method public void requestUpdateVolume(int);
    method public void setTag(java.lang.Object);
    field public static final int PLAYBACK_TYPE_LOCAL = 0; // 0x0
    field public static final int PLAYBACK_TYPE_REMOTE = 1; // 0x1
    field public static final int PLAYBACK_VOLUME_FIXED = 0; // 0x0
    field public static final int PLAYBACK_VOLUME_VARIABLE = 1; // 0x1
  }

  public static class MediaRouter.SimpleCallback extends android.media.MediaRouter.Callback {
    ctor public MediaRouter.SimpleCallback();
    method public void onRouteAdded(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
    method public void onRouteChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
    method public void onRouteGrouped(android.media.MediaRouter, android.media.MediaRouter.RouteInfo, android.media.MediaRouter.RouteGroup, int);
    method public void onRouteRemoved(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
    method public void onRouteSelected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo);
    method public void onRouteUngrouped(android.media.MediaRouter, android.media.MediaRouter.RouteInfo, android.media.MediaRouter.RouteGroup);
    method public void onRouteUnselected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo);
    method public void onRouteVolumeChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo);
  }

  public static class MediaRouter.UserRouteInfo extends android.media.MediaRouter.RouteInfo {
    method public android.media.RemoteControlClient getRemoteControlClient();
    method public void setDescription(java.lang.CharSequence);
    method public void setIconDrawable(android.graphics.drawable.Drawable);
    method public void setIconResource(int);
    method public void setName(java.lang.CharSequence);
    method public void setName(int);
    method public void setPlaybackStream(int);
    method public void setPlaybackType(int);
    method public void setRemoteControlClient(android.media.RemoteControlClient);
    method public void setStatus(java.lang.CharSequence);
    method public void setVolume(int);
    method public void setVolumeCallback(android.media.MediaRouter.VolumeCallback);
    method public void setVolumeHandling(int);
    method public void setVolumeMax(int);
  }

  public static abstract class MediaRouter.VolumeCallback {
    ctor public MediaRouter.VolumeCallback();
    method public abstract void onVolumeSetRequest(android.media.MediaRouter.RouteInfo, int);
    method public abstract void onVolumeUpdateRequest(android.media.MediaRouter.RouteInfo, int);
  }

  public class MediaScannerConnection implements android.content.ServiceConnection {
    ctor public MediaScannerConnection(android.content.Context, android.media.MediaScannerConnection.MediaScannerConnectionClient);
    method public void connect();
    method public void disconnect();
    method public synchronized boolean isConnected();
    method public void onServiceConnected(android.content.ComponentName, android.os.IBinder);
    method public void onServiceDisconnected(android.content.ComponentName);
    method public void scanFile(java.lang.String, java.lang.String);
    method public static void scanFile(android.content.Context, java.lang.String[], java.lang.String[], android.media.MediaScannerConnection.OnScanCompletedListener);
  }

  public static abstract interface MediaScannerConnection.MediaScannerConnectionClient implements android.media.MediaScannerConnection.OnScanCompletedListener {
    method public abstract void onMediaScannerConnected();
    method public abstract void onScanCompleted(java.lang.String, android.net.Uri);
  }

  public static abstract interface MediaScannerConnection.OnScanCompletedListener {
    method public abstract void onScanCompleted(java.lang.String, android.net.Uri);
  }

  public final class MediaSync {
    ctor public MediaSync();
    method public void configureAudioTrack(android.media.AudioTrack, int);
    method public void configureSurface(android.view.Surface);
    method public final android.view.Surface createInputSurface();
    method public boolean getTimestamp(android.media.MediaTimestamp);
    method public void queueAudio(java.nio.ByteBuffer, int, int, long);
    method public final void release();
    method public void setCallback(android.media.MediaSync.Callback, android.os.Handler);
    method public void setPlaybackRate(float, int);
    field public static final int PLAYBACK_RATE_AUDIO_MODE_RESAMPLE = 0; // 0x0
  }

  public static abstract class MediaSync.Callback {
    ctor public MediaSync.Callback();
    method public abstract void onReturnAudioBuffer(android.media.MediaSync, java.nio.ByteBuffer, int);
  }

  public class MediaSyncEvent {
    method public static android.media.MediaSyncEvent createEvent(int) throws java.lang.IllegalArgumentException;
    method public int getAudioSessionId();
    method public int getType();
    method public android.media.MediaSyncEvent setAudioSessionId(int) throws java.lang.IllegalArgumentException;
    field public static final int SYNC_EVENT_NONE = 0; // 0x0
    field public static final int SYNC_EVENT_PRESENTATION_COMPLETE = 1; // 0x1
  }

  public final class MediaTimestamp {
    ctor public MediaTimestamp();
    field public float clockRate;
    field public long mediaTimeUs;
    field public long nanoTime;
  }

  public final class NotProvisionedException extends android.media.MediaDrmException {
    ctor public NotProvisionedException(java.lang.String);
  }

  public final class Rating implements android.os.Parcelable {
    method public int describeContents();
    method public float getPercentRating();
    method public int getRatingStyle();
    method public float getStarRating();
    method public boolean hasHeart();
    method public boolean isRated();
    method public boolean isThumbUp();
    method public static android.media.Rating newHeartRating(boolean);
    method public static android.media.Rating newPercentageRating(float);
    method public static android.media.Rating newStarRating(int, float);
    method public static android.media.Rating newThumbRating(boolean);
    method public static android.media.Rating newUnratedRating(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.Rating> CREATOR;
    field public static final int RATING_3_STARS = 3; // 0x3
    field public static final int RATING_4_STARS = 4; // 0x4
    field public static final int RATING_5_STARS = 5; // 0x5
    field public static final int RATING_HEART = 1; // 0x1
    field public static final int RATING_NONE = 0; // 0x0
    field public static final int RATING_PERCENTAGE = 6; // 0x6
    field public static final int RATING_THUMB_UP_DOWN = 2; // 0x2
  }

  public deprecated class RemoteControlClient {
    ctor public RemoteControlClient(android.app.PendingIntent);
    ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper);
    method public android.media.RemoteControlClient.MetadataEditor editMetadata(boolean);
    method public android.media.session.MediaSession getMediaSession();
    method public void setMetadataUpdateListener(android.media.RemoteControlClient.OnMetadataUpdateListener);
    method public void setOnGetPlaybackPositionListener(android.media.RemoteControlClient.OnGetPlaybackPositionListener);
    method public void setPlaybackPositionUpdateListener(android.media.RemoteControlClient.OnPlaybackPositionUpdateListener);
    method public void setPlaybackState(int);
    method public void setPlaybackState(int, long, float);
    method public void setTransportControlFlags(int);
    field public static final int FLAG_KEY_MEDIA_FAST_FORWARD = 64; // 0x40
    field public static final int FLAG_KEY_MEDIA_NEXT = 128; // 0x80
    field public static final int FLAG_KEY_MEDIA_PAUSE = 16; // 0x10
    field public static final int FLAG_KEY_MEDIA_PLAY = 4; // 0x4
    field public static final int FLAG_KEY_MEDIA_PLAY_PAUSE = 8; // 0x8
    field public static final int FLAG_KEY_MEDIA_POSITION_UPDATE = 256; // 0x100
    field public static final int FLAG_KEY_MEDIA_PREVIOUS = 1; // 0x1
    field public static final int FLAG_KEY_MEDIA_RATING = 512; // 0x200
    field public static final int FLAG_KEY_MEDIA_REWIND = 2; // 0x2
    field public static final int FLAG_KEY_MEDIA_STOP = 32; // 0x20
    field public static final int PLAYSTATE_BUFFERING = 8; // 0x8
    field public static final int PLAYSTATE_ERROR = 9; // 0x9
    field public static final int PLAYSTATE_FAST_FORWARDING = 4; // 0x4
    field public static final int PLAYSTATE_PAUSED = 2; // 0x2
    field public static final int PLAYSTATE_PLAYING = 3; // 0x3
    field public static final int PLAYSTATE_REWINDING = 5; // 0x5
    field public static final int PLAYSTATE_SKIPPING_BACKWARDS = 7; // 0x7
    field public static final int PLAYSTATE_SKIPPING_FORWARDS = 6; // 0x6
    field public static final int PLAYSTATE_STOPPED = 1; // 0x1
  }

  public deprecated class RemoteControlClient.MetadataEditor extends android.media.MediaMetadataEditor {
    method public synchronized void apply();
    field public static final int BITMAP_KEY_ARTWORK = 100; // 0x64
  }

  public static abstract interface RemoteControlClient.OnGetPlaybackPositionListener {
    method public abstract long onGetPlaybackPosition();
  }

  public static abstract interface RemoteControlClient.OnMetadataUpdateListener {
    method public abstract void onMetadataUpdate(int, java.lang.Object);
  }

  public static abstract interface RemoteControlClient.OnPlaybackPositionUpdateListener {
    method public abstract void onPlaybackPositionUpdate(long);
  }

  public final deprecated class RemoteController {
    ctor public RemoteController(android.content.Context, android.media.RemoteController.OnClientUpdateListener) throws java.lang.IllegalArgumentException;
    ctor public RemoteController(android.content.Context, android.media.RemoteController.OnClientUpdateListener, android.os.Looper) throws java.lang.IllegalArgumentException;
    method public boolean clearArtworkConfiguration();
    method public android.media.RemoteController.MetadataEditor editMetadata();
    method public long getEstimatedMediaPosition();
    method public boolean seekTo(long) throws java.lang.IllegalArgumentException;
    method public boolean sendMediaKeyEvent(android.view.KeyEvent) throws java.lang.IllegalArgumentException;
    method public boolean setArtworkConfiguration(int, int) throws java.lang.IllegalArgumentException;
    method public boolean setSynchronizationMode(int) throws java.lang.IllegalArgumentException;
    field public static final int POSITION_SYNCHRONIZATION_CHECK = 1; // 0x1
    field public static final int POSITION_SYNCHRONIZATION_NONE = 0; // 0x0
  }

  public class RemoteController.MetadataEditor extends android.media.MediaMetadataEditor {
    method public synchronized void apply();
  }

  public static abstract interface RemoteController.OnClientUpdateListener {
    method public abstract void onClientChange(boolean);
    method public abstract void onClientMetadataUpdate(android.media.RemoteController.MetadataEditor);
    method public abstract void onClientPlaybackStateUpdate(int);
    method public abstract void onClientPlaybackStateUpdate(int, long, long, float);
    method public abstract void onClientTransportControlUpdate(int);
  }

  public final class ResourceBusyException extends android.media.MediaDrmException {
    ctor public ResourceBusyException(java.lang.String);
  }

  public class Ringtone {
    method public android.media.AudioAttributes getAudioAttributes();
    method public deprecated int getStreamType();
    method public java.lang.String getTitle(android.content.Context);
    method public boolean isPlaying();
    method public void play();
    method public void setAudioAttributes(android.media.AudioAttributes) throws java.lang.IllegalArgumentException;
    method public deprecated void setStreamType(int);
    method public void stop();
  }

  public class RingtoneManager {
    ctor public RingtoneManager(android.app.Activity);
    ctor public RingtoneManager(android.content.Context);
    method public static android.net.Uri getActualDefaultRingtoneUri(android.content.Context, int);
    method public android.database.Cursor getCursor();
    method public static int getDefaultType(android.net.Uri);
    method public static android.net.Uri getDefaultUri(int);
    method public deprecated boolean getIncludeDrm();
    method public android.media.Ringtone getRingtone(int);
    method public static android.media.Ringtone getRingtone(android.content.Context, android.net.Uri);
    method public int getRingtonePosition(android.net.Uri);
    method public android.net.Uri getRingtoneUri(int);
    method public boolean getStopPreviousRingtone();
    method public static android.net.Uri getValidRingtoneUri(android.content.Context);
    method public int inferStreamType();
    method public static boolean isDefault(android.net.Uri);
    method public static void setActualDefaultRingtoneUri(android.content.Context, int, android.net.Uri);
    method public deprecated void setIncludeDrm(boolean);
    method public void setStopPreviousRingtone(boolean);
    method public void setType(int);
    method public void stopPreviousRingtone();
    field public static final java.lang.String ACTION_RINGTONE_PICKER = "android.intent.action.RINGTONE_PICKER";
    field public static final java.lang.String EXTRA_RINGTONE_DEFAULT_URI = "android.intent.extra.ringtone.DEFAULT_URI";
    field public static final java.lang.String EXTRA_RINGTONE_EXISTING_URI = "android.intent.extra.ringtone.EXISTING_URI";
    field public static final deprecated java.lang.String EXTRA_RINGTONE_INCLUDE_DRM = "android.intent.extra.ringtone.INCLUDE_DRM";
    field public static final java.lang.String EXTRA_RINGTONE_PICKED_URI = "android.intent.extra.ringtone.PICKED_URI";
    field public static final java.lang.String EXTRA_RINGTONE_SHOW_DEFAULT = "android.intent.extra.ringtone.SHOW_DEFAULT";
    field public static final java.lang.String EXTRA_RINGTONE_SHOW_SILENT = "android.intent.extra.ringtone.SHOW_SILENT";
    field public static final java.lang.String EXTRA_RINGTONE_TITLE = "android.intent.extra.ringtone.TITLE";
    field public static final java.lang.String EXTRA_RINGTONE_TYPE = "android.intent.extra.ringtone.TYPE";
    field public static final int ID_COLUMN_INDEX = 0; // 0x0
    field public static final int TITLE_COLUMN_INDEX = 1; // 0x1
    field public static final int TYPE_ALARM = 4; // 0x4
    field public static final int TYPE_ALL = 7; // 0x7
    field public static final int TYPE_NOTIFICATION = 2; // 0x2
    field public static final int TYPE_RINGTONE = 1; // 0x1
    field public static final int URI_COLUMN_INDEX = 2; // 0x2
  }

  public class SoundPool {
    ctor public deprecated SoundPool(int, int, int);
    method public final void autoPause();
    method public final void autoResume();
    method public int load(java.lang.String, int);
    method public int load(android.content.Context, int, int);
    method public int load(android.content.res.AssetFileDescriptor, int);
    method public int load(java.io.FileDescriptor, long, long, int);
    method public final void pause(int);
    method public final int play(int, float, float, int, int, float);
    method public final void release();
    method public final void resume(int);
    method public final void setLoop(int, int);
    method public void setOnLoadCompleteListener(android.media.SoundPool.OnLoadCompleteListener);
    method public final void setPriority(int, int);
    method public final void setRate(int, float);
    method public final void setVolume(int, float, float);
    method public final void stop(int);
    method public final boolean unload(int);
  }

  public static class SoundPool.Builder {
    ctor public SoundPool.Builder();
    method public android.media.SoundPool build();
    method public android.media.SoundPool.Builder setAudioAttributes(android.media.AudioAttributes) throws java.lang.IllegalArgumentException;
    method public android.media.SoundPool.Builder setMaxStreams(int) throws java.lang.IllegalArgumentException;
  }

  public static abstract interface SoundPool.OnLoadCompleteListener {
    method public abstract void onLoadComplete(android.media.SoundPool, int, int);
  }

  public class ThumbnailUtils {
    ctor public ThumbnailUtils();
    method public static android.graphics.Bitmap createVideoThumbnail(java.lang.String, int);
    method public static android.graphics.Bitmap extractThumbnail(android.graphics.Bitmap, int, int);
    method public static android.graphics.Bitmap extractThumbnail(android.graphics.Bitmap, int, int, int);
    field public static final int OPTIONS_RECYCLE_INPUT = 2; // 0x2
  }

  public final class TimedText {
    method public android.graphics.Rect getBounds();
    method public java.lang.String getText();
  }

  public class ToneGenerator {
    ctor public ToneGenerator(int, int);
    method public final int getAudioSessionId();
    method public void release();
    method public boolean startTone(int);
    method public boolean startTone(int, int);
    method public void stopTone();
    field public static final int MAX_VOLUME = 100; // 0x64
    field public static final int MIN_VOLUME = 0; // 0x0
    field public static final int TONE_CDMA_ABBR_ALERT = 97; // 0x61
    field public static final int TONE_CDMA_ABBR_INTERCEPT = 37; // 0x25
    field public static final int TONE_CDMA_ABBR_REORDER = 39; // 0x27
    field public static final int TONE_CDMA_ALERT_AUTOREDIAL_LITE = 87; // 0x57
    field public static final int TONE_CDMA_ALERT_CALL_GUARD = 93; // 0x5d
    field public static final int TONE_CDMA_ALERT_INCALL_LITE = 91; // 0x5b
    field public static final int TONE_CDMA_ALERT_NETWORK_LITE = 86; // 0x56
    field public static final int TONE_CDMA_ANSWER = 42; // 0x2a
    field public static final int TONE_CDMA_CALLDROP_LITE = 95; // 0x5f
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP = 46; // 0x2e
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL = 45; // 0x2d
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT3 = 48; // 0x30
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT5 = 50; // 0x32
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT6 = 51; // 0x33
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT7 = 52; // 0x34
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING = 49; // 0x31
    field public static final int TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI = 47; // 0x2f
    field public static final int TONE_CDMA_CONFIRM = 41; // 0x29
    field public static final int TONE_CDMA_DIAL_TONE_LITE = 34; // 0x22
    field public static final int TONE_CDMA_EMERGENCY_RINGBACK = 92; // 0x5c
    field public static final int TONE_CDMA_HIGH_L = 53; // 0x35
    field public static final int TONE_CDMA_HIGH_PBX_L = 71; // 0x47
    field public static final int TONE_CDMA_HIGH_PBX_SLS = 80; // 0x50
    field public static final int TONE_CDMA_HIGH_PBX_SS = 74; // 0x4a
    field public static final int TONE_CDMA_HIGH_PBX_SSL = 77; // 0x4d
    field public static final int TONE_CDMA_HIGH_PBX_S_X4 = 83; // 0x53
    field public static final int TONE_CDMA_HIGH_SLS = 65; // 0x41
    field public static final int TONE_CDMA_HIGH_SS = 56; // 0x38
    field public static final int TONE_CDMA_HIGH_SSL = 59; // 0x3b
    field public static final int TONE_CDMA_HIGH_SS_2 = 62; // 0x3e
    field public static final int TONE_CDMA_HIGH_S_X4 = 68; // 0x44
    field public static final int TONE_CDMA_INTERCEPT = 36; // 0x24
    field public static final int TONE_CDMA_KEYPAD_VOLUME_KEY_LITE = 89; // 0x59
    field public static final int TONE_CDMA_LOW_L = 55; // 0x37
    field public static final int TONE_CDMA_LOW_PBX_L = 73; // 0x49
    field public static final int TONE_CDMA_LOW_PBX_SLS = 82; // 0x52
    field public static final int TONE_CDMA_LOW_PBX_SS = 76; // 0x4c
    field public static final int TONE_CDMA_LOW_PBX_SSL = 79; // 0x4f
    field public static final int TONE_CDMA_LOW_PBX_S_X4 = 85; // 0x55
    field public static final int TONE_CDMA_LOW_SLS = 67; // 0x43
    field public static final int TONE_CDMA_LOW_SS = 58; // 0x3a
    field public static final int TONE_CDMA_LOW_SSL = 61; // 0x3d
    field public static final int TONE_CDMA_LOW_SS_2 = 64; // 0x40
    field public static final int TONE_CDMA_LOW_S_X4 = 70; // 0x46
    field public static final int TONE_CDMA_MED_L = 54; // 0x36
    field public static final int TONE_CDMA_MED_PBX_L = 72; // 0x48
    field public static final int TONE_CDMA_MED_PBX_SLS = 81; // 0x51
    field public static final int TONE_CDMA_MED_PBX_SS = 75; // 0x4b
    field public static final int TONE_CDMA_MED_PBX_SSL = 78; // 0x4e
    field public static final int TONE_CDMA_MED_PBX_S_X4 = 84; // 0x54
    field public static final int TONE_CDMA_MED_SLS = 66; // 0x42
    field public static final int TONE_CDMA_MED_SS = 57; // 0x39
    field public static final int TONE_CDMA_MED_SSL = 60; // 0x3c
    field public static final int TONE_CDMA_MED_SS_2 = 63; // 0x3f
    field public static final int TONE_CDMA_MED_S_X4 = 69; // 0x45
    field public static final int TONE_CDMA_NETWORK_BUSY = 40; // 0x28
    field public static final int TONE_CDMA_NETWORK_BUSY_ONE_SHOT = 96; // 0x60
    field public static final int TONE_CDMA_NETWORK_CALLWAITING = 43; // 0x2b
    field public static final int TONE_CDMA_NETWORK_USA_RINGBACK = 35; // 0x23
    field public static final int TONE_CDMA_ONE_MIN_BEEP = 88; // 0x58
    field public static final int TONE_CDMA_PIP = 44; // 0x2c
    field public static final int TONE_CDMA_PRESSHOLDKEY_LITE = 90; // 0x5a
    field public static final int TONE_CDMA_REORDER = 38; // 0x26
    field public static final int TONE_CDMA_SIGNAL_OFF = 98; // 0x62
    field public static final int TONE_CDMA_SOFT_ERROR_LITE = 94; // 0x5e
    field public static final int TONE_DTMF_0 = 0; // 0x0
    field public static final int TONE_DTMF_1 = 1; // 0x1
    field public static final int TONE_DTMF_2 = 2; // 0x2
    field public static final int TONE_DTMF_3 = 3; // 0x3
    field public static final int TONE_DTMF_4 = 4; // 0x4
    field public static final int TONE_DTMF_5 = 5; // 0x5
    field public static final int TONE_DTMF_6 = 6; // 0x6
    field public static final int TONE_DTMF_7 = 7; // 0x7
    field public static final int TONE_DTMF_8 = 8; // 0x8
    field public static final int TONE_DTMF_9 = 9; // 0x9
    field public static final int TONE_DTMF_A = 12; // 0xc
    field public static final int TONE_DTMF_B = 13; // 0xd
    field public static final int TONE_DTMF_C = 14; // 0xe
    field public static final int TONE_DTMF_D = 15; // 0xf
    field public static final int TONE_DTMF_P = 11; // 0xb
    field public static final int TONE_DTMF_S = 10; // 0xa
    field public static final int TONE_PROP_ACK = 25; // 0x19
    field public static final int TONE_PROP_BEEP = 24; // 0x18
    field public static final int TONE_PROP_BEEP2 = 28; // 0x1c
    field public static final int TONE_PROP_NACK = 26; // 0x1a
    field public static final int TONE_PROP_PROMPT = 27; // 0x1b
    field public static final int TONE_SUP_BUSY = 17; // 0x11
    field public static final int TONE_SUP_CALL_WAITING = 22; // 0x16
    field public static final int TONE_SUP_CONFIRM = 32; // 0x20
    field public static final int TONE_SUP_CONGESTION = 18; // 0x12
    field public static final int TONE_SUP_CONGESTION_ABBREV = 31; // 0x1f
    field public static final int TONE_SUP_DIAL = 16; // 0x10
    field public static final int TONE_SUP_ERROR = 21; // 0x15
    field public static final int TONE_SUP_INTERCEPT = 29; // 0x1d
    field public static final int TONE_SUP_INTERCEPT_ABBREV = 30; // 0x1e
    field public static final int TONE_SUP_PIP = 33; // 0x21
    field public static final int TONE_SUP_RADIO_ACK = 19; // 0x13
    field public static final int TONE_SUP_RADIO_NOTAVAIL = 20; // 0x14
    field public static final int TONE_SUP_RINGTONE = 23; // 0x17
  }

  public final class UnsupportedSchemeException extends android.media.MediaDrmException {
    ctor public UnsupportedSchemeException(java.lang.String);
  }

  public abstract class VolumeProvider {
    ctor public VolumeProvider(int, int, int);
    method public final int getCurrentVolume();
    method public final int getMaxVolume();
    method public final int getVolumeControl();
    method public void onAdjustVolume(int);
    method public void onSetVolumeTo(int);
    method public final void setCurrentVolume(int);
    field public static final int VOLUME_CONTROL_ABSOLUTE = 2; // 0x2
    field public static final int VOLUME_CONTROL_FIXED = 0; // 0x0
    field public static final int VOLUME_CONTROL_RELATIVE = 1; // 0x1
  }

}

package android.media.audiofx {

  public class AcousticEchoCanceler extends android.media.audiofx.AudioEffect {
    method public static android.media.audiofx.AcousticEchoCanceler create(int);
    method public static boolean isAvailable();
  }

  public class AudioEffect {
    method public android.media.audiofx.AudioEffect.Descriptor getDescriptor() throws java.lang.IllegalStateException;
    method public boolean getEnabled() throws java.lang.IllegalStateException;
    method public int getId() throws java.lang.IllegalStateException;
    method public boolean hasControl() throws java.lang.IllegalStateException;
    method public static android.media.audiofx.AudioEffect.Descriptor[] queryEffects();
    method public void release();
    method public void setControlStatusListener(android.media.audiofx.AudioEffect.OnControlStatusChangeListener);
    method public void setEnableStatusListener(android.media.audiofx.AudioEffect.OnEnableStatusChangeListener);
    method public int setEnabled(boolean) throws java.lang.IllegalStateException;
    field public static final java.lang.String ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION = "android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION";
    field public static final java.lang.String ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL = "android.media.action.DISPLAY_AUDIO_EFFECT_CONTROL_PANEL";
    field public static final java.lang.String ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION = "android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION";
    field public static final int ALREADY_EXISTS = -2; // 0xfffffffe
    field public static final int CONTENT_TYPE_GAME = 2; // 0x2
    field public static final int CONTENT_TYPE_MOVIE = 1; // 0x1
    field public static final int CONTENT_TYPE_MUSIC = 0; // 0x0
    field public static final int CONTENT_TYPE_VOICE = 3; // 0x3
    field public static final java.lang.String EFFECT_AUXILIARY = "Auxiliary";
    field public static final java.lang.String EFFECT_INSERT = "Insert";
    field public static final java.util.UUID EFFECT_TYPE_AEC;
    field public static final java.util.UUID EFFECT_TYPE_AGC;
    field public static final java.util.UUID EFFECT_TYPE_BASS_BOOST;
    field public static final java.util.UUID EFFECT_TYPE_ENV_REVERB;
    field public static final java.util.UUID EFFECT_TYPE_EQUALIZER;
    field public static final java.util.UUID EFFECT_TYPE_LOUDNESS_ENHANCER;
    field public static final java.util.UUID EFFECT_TYPE_NS;
    field public static final java.util.UUID EFFECT_TYPE_PRESET_REVERB;
    field public static final java.util.UUID EFFECT_TYPE_VIRTUALIZER;
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_BAD_VALUE = -4; // 0xfffffffc
    field public static final int ERROR_DEAD_OBJECT = -7; // 0xfffffff9
    field public static final int ERROR_INVALID_OPERATION = -5; // 0xfffffffb
    field public static final int ERROR_NO_INIT = -3; // 0xfffffffd
    field public static final int ERROR_NO_MEMORY = -6; // 0xfffffffa
    field public static final java.lang.String EXTRA_AUDIO_SESSION = "android.media.extra.AUDIO_SESSION";
    field public static final java.lang.String EXTRA_CONTENT_TYPE = "android.media.extra.CONTENT_TYPE";
    field public static final java.lang.String EXTRA_PACKAGE_NAME = "android.media.extra.PACKAGE_NAME";
    field public static final int SUCCESS = 0; // 0x0
  }

  public static class AudioEffect.Descriptor {
    ctor public AudioEffect.Descriptor();
    ctor public AudioEffect.Descriptor(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    field public java.lang.String connectMode;
    field public java.lang.String implementor;
    field public java.lang.String name;
    field public java.util.UUID type;
    field public java.util.UUID uuid;
  }

  public static abstract interface AudioEffect.OnControlStatusChangeListener {
    method public abstract void onControlStatusChange(android.media.audiofx.AudioEffect, boolean);
  }

  public static abstract interface AudioEffect.OnEnableStatusChangeListener {
    method public abstract void onEnableStatusChange(android.media.audiofx.AudioEffect, boolean);
  }

  public class AutomaticGainControl extends android.media.audiofx.AudioEffect {
    method public static android.media.audiofx.AutomaticGainControl create(int);
    method public static boolean isAvailable();
  }

  public class BassBoost extends android.media.audiofx.AudioEffect {
    ctor public BassBoost(int, int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
    method public android.media.audiofx.BassBoost.Settings getProperties() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getRoundedStrength() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public boolean getStrengthSupported();
    method public void setParameterListener(android.media.audiofx.BassBoost.OnParameterChangeListener);
    method public void setProperties(android.media.audiofx.BassBoost.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setStrength(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    field public static final int PARAM_STRENGTH = 1; // 0x1
    field public static final int PARAM_STRENGTH_SUPPORTED = 0; // 0x0
  }

  public static abstract interface BassBoost.OnParameterChangeListener {
    method public abstract void onParameterChange(android.media.audiofx.BassBoost, int, int, short);
  }

  public static class BassBoost.Settings {
    ctor public BassBoost.Settings();
    ctor public BassBoost.Settings(java.lang.String);
    field public short strength;
  }

  public class EnvironmentalReverb extends android.media.audiofx.AudioEffect {
    ctor public EnvironmentalReverb(int, int) throws java.lang.IllegalArgumentException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
    method public short getDecayHFRatio() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public int getDecayTime() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getDensity() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getDiffusion() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public android.media.audiofx.EnvironmentalReverb.Settings getProperties() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public int getReflectionsDelay() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getReflectionsLevel() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public int getReverbDelay() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getReverbLevel() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getRoomHFLevel() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getRoomLevel() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setDecayHFRatio(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setDecayTime(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setDensity(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setDiffusion(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setParameterListener(android.media.audiofx.EnvironmentalReverb.OnParameterChangeListener);
    method public void setProperties(android.media.audiofx.EnvironmentalReverb.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setReflectionsDelay(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setReflectionsLevel(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setReverbDelay(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setReverbLevel(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setRoomHFLevel(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setRoomLevel(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    field public static final int PARAM_DECAY_HF_RATIO = 3; // 0x3
    field public static final int PARAM_DECAY_TIME = 2; // 0x2
    field public static final int PARAM_DENSITY = 9; // 0x9
    field public static final int PARAM_DIFFUSION = 8; // 0x8
    field public static final int PARAM_REFLECTIONS_DELAY = 5; // 0x5
    field public static final int PARAM_REFLECTIONS_LEVEL = 4; // 0x4
    field public static final int PARAM_REVERB_DELAY = 7; // 0x7
    field public static final int PARAM_REVERB_LEVEL = 6; // 0x6
    field public static final int PARAM_ROOM_HF_LEVEL = 1; // 0x1
    field public static final int PARAM_ROOM_LEVEL = 0; // 0x0
  }

  public static abstract interface EnvironmentalReverb.OnParameterChangeListener {
    method public abstract void onParameterChange(android.media.audiofx.EnvironmentalReverb, int, int, int);
  }

  public static class EnvironmentalReverb.Settings {
    ctor public EnvironmentalReverb.Settings();
    ctor public EnvironmentalReverb.Settings(java.lang.String);
    field public short decayHFRatio;
    field public int decayTime;
    field public short density;
    field public short diffusion;
    field public int reflectionsDelay;
    field public short reflectionsLevel;
    field public int reverbDelay;
    field public short reverbLevel;
    field public short roomHFLevel;
    field public short roomLevel;
  }

  public class Equalizer extends android.media.audiofx.AudioEffect {
    ctor public Equalizer(int, int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
    method public short getBand(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public int[] getBandFreqRange(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getBandLevel(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short[] getBandLevelRange() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public int getCenterFreq(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getCurrentPreset() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getNumberOfBands() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getNumberOfPresets() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public java.lang.String getPresetName(short);
    method public android.media.audiofx.Equalizer.Settings getProperties() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setBandLevel(short, short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setParameterListener(android.media.audiofx.Equalizer.OnParameterChangeListener);
    method public void setProperties(android.media.audiofx.Equalizer.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void usePreset(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    field public static final int PARAM_BAND_FREQ_RANGE = 4; // 0x4
    field public static final int PARAM_BAND_LEVEL = 2; // 0x2
    field public static final int PARAM_CENTER_FREQ = 3; // 0x3
    field public static final int PARAM_CURRENT_PRESET = 6; // 0x6
    field public static final int PARAM_GET_BAND = 5; // 0x5
    field public static final int PARAM_GET_NUM_OF_PRESETS = 7; // 0x7
    field public static final int PARAM_GET_PRESET_NAME = 8; // 0x8
    field public static final int PARAM_LEVEL_RANGE = 1; // 0x1
    field public static final int PARAM_NUM_BANDS = 0; // 0x0
    field public static final int PARAM_STRING_SIZE_MAX = 32; // 0x20
  }

  public static abstract interface Equalizer.OnParameterChangeListener {
    method public abstract void onParameterChange(android.media.audiofx.Equalizer, int, int, int, int);
  }

  public static class Equalizer.Settings {
    ctor public Equalizer.Settings();
    ctor public Equalizer.Settings(java.lang.String);
    field public short[] bandLevels;
    field public short curPreset;
    field public short numBands;
  }

  public class LoudnessEnhancer extends android.media.audiofx.AudioEffect {
    ctor public LoudnessEnhancer(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
    method public float getTargetGain() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setTargetGain(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    field public static final int PARAM_TARGET_GAIN_MB = 0; // 0x0
  }

  public class NoiseSuppressor extends android.media.audiofx.AudioEffect {
    method public static android.media.audiofx.NoiseSuppressor create(int);
    method public static boolean isAvailable();
  }

  public class PresetReverb extends android.media.audiofx.AudioEffect {
    ctor public PresetReverb(int, int) throws java.lang.IllegalArgumentException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
    method public short getPreset() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public android.media.audiofx.PresetReverb.Settings getProperties() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setParameterListener(android.media.audiofx.PresetReverb.OnParameterChangeListener);
    method public void setPreset(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setProperties(android.media.audiofx.PresetReverb.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    field public static final int PARAM_PRESET = 0; // 0x0
    field public static final short PRESET_LARGEHALL = 5; // 0x5
    field public static final short PRESET_LARGEROOM = 3; // 0x3
    field public static final short PRESET_MEDIUMHALL = 4; // 0x4
    field public static final short PRESET_MEDIUMROOM = 2; // 0x2
    field public static final short PRESET_NONE = 0; // 0x0
    field public static final short PRESET_PLATE = 6; // 0x6
    field public static final short PRESET_SMALLROOM = 1; // 0x1
  }

  public static abstract interface PresetReverb.OnParameterChangeListener {
    method public abstract void onParameterChange(android.media.audiofx.PresetReverb, int, int, short);
  }

  public static class PresetReverb.Settings {
    ctor public PresetReverb.Settings();
    ctor public PresetReverb.Settings(java.lang.String);
    field public short preset;
  }

  public class Virtualizer extends android.media.audiofx.AudioEffect {
    ctor public Virtualizer(int, int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
    method public boolean canVirtualize(int, int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public boolean forceVirtualizationMode(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public android.media.audiofx.Virtualizer.Settings getProperties() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public short getRoundedStrength() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public boolean getSpeakerAngles(int, int, int[]) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public boolean getStrengthSupported();
    method public int getVirtualizationMode() throws java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setParameterListener(android.media.audiofx.Virtualizer.OnParameterChangeListener);
    method public void setProperties(android.media.audiofx.Virtualizer.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setStrength(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    field public static final int PARAM_STRENGTH = 1; // 0x1
    field public static final int PARAM_STRENGTH_SUPPORTED = 0; // 0x0
    field public static final int VIRTUALIZATION_MODE_AUTO = 1; // 0x1
    field public static final int VIRTUALIZATION_MODE_BINAURAL = 2; // 0x2
    field public static final int VIRTUALIZATION_MODE_OFF = 0; // 0x0
    field public static final int VIRTUALIZATION_MODE_TRANSAURAL = 3; // 0x3
  }

  public static abstract interface Virtualizer.OnParameterChangeListener {
    method public abstract void onParameterChange(android.media.audiofx.Virtualizer, int, int, short);
  }

  public static class Virtualizer.Settings {
    ctor public Virtualizer.Settings();
    ctor public Virtualizer.Settings(java.lang.String);
    field public short strength;
  }

  public class Visualizer {
    ctor public Visualizer(int) throws java.lang.RuntimeException, java.lang.UnsupportedOperationException;
    method public int getCaptureSize() throws java.lang.IllegalStateException;
    method public static int[] getCaptureSizeRange();
    method public boolean getEnabled();
    method public int getFft(byte[]) throws java.lang.IllegalStateException;
    method public static int getMaxCaptureRate();
    method public int getMeasurementMode() throws java.lang.IllegalStateException;
    method public int getMeasurementPeakRms(android.media.audiofx.Visualizer.MeasurementPeakRms);
    method public int getSamplingRate() throws java.lang.IllegalStateException;
    method public int getScalingMode() throws java.lang.IllegalStateException;
    method public int getWaveForm(byte[]) throws java.lang.IllegalStateException;
    method public void release();
    method public int setCaptureSize(int) throws java.lang.IllegalStateException;
    method public int setDataCaptureListener(android.media.audiofx.Visualizer.OnDataCaptureListener, int, boolean, boolean);
    method public int setEnabled(boolean) throws java.lang.IllegalStateException;
    method public int setMeasurementMode(int) throws java.lang.IllegalStateException;
    method public int setScalingMode(int) throws java.lang.IllegalStateException;
    field public static final int ALREADY_EXISTS = -2; // 0xfffffffe
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_BAD_VALUE = -4; // 0xfffffffc
    field public static final int ERROR_DEAD_OBJECT = -7; // 0xfffffff9
    field public static final int ERROR_INVALID_OPERATION = -5; // 0xfffffffb
    field public static final int ERROR_NO_INIT = -3; // 0xfffffffd
    field public static final int ERROR_NO_MEMORY = -6; // 0xfffffffa
    field public static final int MEASUREMENT_MODE_NONE = 0; // 0x0
    field public static final int MEASUREMENT_MODE_PEAK_RMS = 1; // 0x1
    field public static final int SCALING_MODE_AS_PLAYED = 1; // 0x1
    field public static final int SCALING_MODE_NORMALIZED = 0; // 0x0
    field public static final int STATE_ENABLED = 2; // 0x2
    field public static final int STATE_INITIALIZED = 1; // 0x1
    field public static final int STATE_UNINITIALIZED = 0; // 0x0
    field public static final int SUCCESS = 0; // 0x0
  }

  public static final class Visualizer.MeasurementPeakRms {
    ctor public Visualizer.MeasurementPeakRms();
    field public int mPeak;
    field public int mRms;
  }

  public static abstract interface Visualizer.OnDataCaptureListener {
    method public abstract void onFftDataCapture(android.media.audiofx.Visualizer, byte[], int);
    method public abstract void onWaveFormDataCapture(android.media.audiofx.Visualizer, byte[], int);
  }

}

package android.media.browse {

  public final class MediaBrowser {
    ctor public MediaBrowser(android.content.Context, android.content.ComponentName, android.media.browse.MediaBrowser.ConnectionCallback, android.os.Bundle);
    method public void connect();
    method public void disconnect();
    method public android.os.Bundle getExtras();
    method public void getMediaItem(java.lang.String, android.media.browse.MediaBrowser.MediaItemCallback);
    method public java.lang.String getRoot();
    method public android.content.ComponentName getServiceComponent();
    method public android.media.session.MediaSession.Token getSessionToken();
    method public boolean isConnected();
    method public void subscribe(java.lang.String, android.media.browse.MediaBrowser.SubscriptionCallback);
    method public void unsubscribe(java.lang.String);
  }

  public static class MediaBrowser.ConnectionCallback {
    ctor public MediaBrowser.ConnectionCallback();
    method public void onConnected();
    method public void onConnectionFailed();
    method public void onConnectionSuspended();
  }

  public static class MediaBrowser.MediaItem implements android.os.Parcelable {
    ctor public MediaBrowser.MediaItem(android.media.MediaDescription, int);
    method public int describeContents();
    method public android.media.MediaDescription getDescription();
    method public int getFlags();
    method public java.lang.String getMediaId();
    method public boolean isBrowsable();
    method public boolean isPlayable();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.browse.MediaBrowser.MediaItem> CREATOR;
    field public static final int FLAG_BROWSABLE = 1; // 0x1
    field public static final int FLAG_PLAYABLE = 2; // 0x2
  }

  public static abstract class MediaBrowser.MediaItemCallback {
    ctor public MediaBrowser.MediaItemCallback();
    method public void onError();
    method public void onMediaItemLoaded(android.media.browse.MediaBrowser.MediaItem);
  }

  public static abstract class MediaBrowser.SubscriptionCallback {
    ctor public MediaBrowser.SubscriptionCallback();
    method public void onChildrenLoaded(java.lang.String, java.util.List<android.media.browse.MediaBrowser.MediaItem>);
    method public void onError(java.lang.String);
  }

}

package android.media.effect {

  public abstract class Effect {
    ctor public Effect();
    method public abstract void apply(int, int, int, int);
    method public abstract java.lang.String getName();
    method public abstract void release();
    method public abstract void setParameter(java.lang.String, java.lang.Object);
    method public void setUpdateListener(android.media.effect.EffectUpdateListener);
  }

  public class EffectContext {
    method public static android.media.effect.EffectContext createWithCurrentGlContext();
    method public android.media.effect.EffectFactory getFactory();
    method public void release();
  }

  public class EffectFactory {
    method public android.media.effect.Effect createEffect(java.lang.String);
    method public static boolean isEffectSupported(java.lang.String);
    field public static final java.lang.String EFFECT_AUTOFIX = "android.media.effect.effects.AutoFixEffect";
    field public static final java.lang.String EFFECT_BACKDROPPER = "android.media.effect.effects.BackDropperEffect";
    field public static final java.lang.String EFFECT_BITMAPOVERLAY = "android.media.effect.effects.BitmapOverlayEffect";
    field public static final java.lang.String EFFECT_BLACKWHITE = "android.media.effect.effects.BlackWhiteEffect";
    field public static final java.lang.String EFFECT_BRIGHTNESS = "android.media.effect.effects.BrightnessEffect";
    field public static final java.lang.String EFFECT_CONTRAST = "android.media.effect.effects.ContrastEffect";
    field public static final java.lang.String EFFECT_CROP = "android.media.effect.effects.CropEffect";
    field public static final java.lang.String EFFECT_CROSSPROCESS = "android.media.effect.effects.CrossProcessEffect";
    field public static final java.lang.String EFFECT_DOCUMENTARY = "android.media.effect.effects.DocumentaryEffect";
    field public static final java.lang.String EFFECT_DUOTONE = "android.media.effect.effects.DuotoneEffect";
    field public static final java.lang.String EFFECT_FILLLIGHT = "android.media.effect.effects.FillLightEffect";
    field public static final java.lang.String EFFECT_FISHEYE = "android.media.effect.effects.FisheyeEffect";
    field public static final java.lang.String EFFECT_FLIP = "android.media.effect.effects.FlipEffect";
    field public static final java.lang.String EFFECT_GRAIN = "android.media.effect.effects.GrainEffect";
    field public static final java.lang.String EFFECT_GRAYSCALE = "android.media.effect.effects.GrayscaleEffect";
    field public static final java.lang.String EFFECT_LOMOISH = "android.media.effect.effects.LomoishEffect";
    field public static final java.lang.String EFFECT_NEGATIVE = "android.media.effect.effects.NegativeEffect";
    field public static final java.lang.String EFFECT_POSTERIZE = "android.media.effect.effects.PosterizeEffect";
    field public static final java.lang.String EFFECT_REDEYE = "android.media.effect.effects.RedEyeEffect";
    field public static final java.lang.String EFFECT_ROTATE = "android.media.effect.effects.RotateEffect";
    field public static final java.lang.String EFFECT_SATURATE = "android.media.effect.effects.SaturateEffect";
    field public static final java.lang.String EFFECT_SEPIA = "android.media.effect.effects.SepiaEffect";
    field public static final java.lang.String EFFECT_SHARPEN = "android.media.effect.effects.SharpenEffect";
    field public static final java.lang.String EFFECT_STRAIGHTEN = "android.media.effect.effects.StraightenEffect";
    field public static final java.lang.String EFFECT_TEMPERATURE = "android.media.effect.effects.ColorTemperatureEffect";
    field public static final java.lang.String EFFECT_TINT = "android.media.effect.effects.TintEffect";
    field public static final java.lang.String EFFECT_VIGNETTE = "android.media.effect.effects.VignetteEffect";
  }

  public abstract interface EffectUpdateListener {
    method public abstract void onEffectUpdated(android.media.effect.Effect, java.lang.Object);
  }

}

package android.media.midi {

  public final class MidiDevice implements java.io.Closeable {
    method public void close() throws java.io.IOException;
    method public android.media.midi.MidiDevice.MidiConnection connectPorts(android.media.midi.MidiInputPort, int);
    method public android.media.midi.MidiDeviceInfo getInfo();
    method public android.media.midi.MidiInputPort openInputPort(int);
    method public android.media.midi.MidiOutputPort openOutputPort(int);
  }

  public class MidiDevice.MidiConnection implements java.io.Closeable {
    method public void close() throws java.io.IOException;
  }

  public final class MidiDeviceInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int getId();
    method public int getInputPortCount();
    method public int getOutputPortCount();
    method public android.media.midi.MidiDeviceInfo.PortInfo[] getPortList();
    method public android.os.Bundle getProperties();
    method public int getType();
    method public boolean isPrivate();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.midi.MidiDeviceInfo> CREATOR;
    field public static final java.lang.String PROPERTY_BLUETOOTH_DEVICE = "bluetooth_device";
    field public static final java.lang.String PROPERTY_MANUFACTURER = "manufacturer";
    field public static final java.lang.String PROPERTY_NAME = "name";
    field public static final java.lang.String PROPERTY_PRODUCT = "product";
    field public static final java.lang.String PROPERTY_SERIAL_NUMBER = "serial_number";
    field public static final java.lang.String PROPERTY_USB_DEVICE = "usb_device";
    field public static final int TYPE_BLUETOOTH = 3; // 0x3
    field public static final int TYPE_USB = 1; // 0x1
    field public static final int TYPE_VIRTUAL = 2; // 0x2
  }

  public static final class MidiDeviceInfo.PortInfo {
    method public java.lang.String getName();
    method public int getPortNumber();
    method public int getType();
    field public static final int TYPE_INPUT = 1; // 0x1
    field public static final int TYPE_OUTPUT = 2; // 0x2
  }

  public abstract class MidiDeviceService extends android.app.Service {
    ctor public MidiDeviceService();
    method public final android.media.midi.MidiDeviceInfo getDeviceInfo();
    method public final android.media.midi.MidiReceiver[] getOutputPortReceivers();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onDeviceStatusChanged(android.media.midi.MidiDeviceStatus);
    method public abstract android.media.midi.MidiReceiver[] onGetInputPortReceivers();
    field public static final java.lang.String SERVICE_INTERFACE = "android.media.midi.MidiDeviceService";
  }

  public final class MidiDeviceStatus implements android.os.Parcelable {
    method public int describeContents();
    method public android.media.midi.MidiDeviceInfo getDeviceInfo();
    method public int getOutputPortOpenCount(int);
    method public boolean isInputPortOpen(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.midi.MidiDeviceStatus> CREATOR;
  }

  public final class MidiInputPort extends android.media.midi.MidiReceiver implements java.io.Closeable {
    method public void close() throws java.io.IOException;
    method public final int getPortNumber();
    method public void onReceive(byte[], int, int, long) throws java.io.IOException;
  }

  public final class MidiManager {
    method public android.media.midi.MidiDeviceInfo[] getDeviceList();
    method public void openBluetoothDevice(android.bluetooth.BluetoothDevice, android.media.midi.MidiManager.BluetoothOpenCallback, android.os.Handler);
    method public void openDevice(android.media.midi.MidiDeviceInfo, android.media.midi.MidiManager.DeviceOpenCallback, android.os.Handler);
    method public void registerDeviceCallback(android.media.midi.MidiManager.DeviceCallback, android.os.Handler);
    method public void unregisterDeviceCallback(android.media.midi.MidiManager.DeviceCallback);
  }

  public static abstract class MidiManager.BluetoothOpenCallback {
    ctor public MidiManager.BluetoothOpenCallback();
    method public abstract void onDeviceOpened(android.bluetooth.BluetoothDevice, android.media.midi.MidiDevice);
  }

  public static class MidiManager.DeviceCallback {
    ctor public MidiManager.DeviceCallback();
    method public void onDeviceAdded(android.media.midi.MidiDeviceInfo);
    method public void onDeviceRemoved(android.media.midi.MidiDeviceInfo);
    method public void onDeviceStatusChanged(android.media.midi.MidiDeviceStatus);
  }

  public static abstract class MidiManager.DeviceOpenCallback {
    ctor public MidiManager.DeviceOpenCallback();
    method public abstract void onDeviceOpened(android.media.midi.MidiDeviceInfo, android.media.midi.MidiDevice);
  }

  public final class MidiOutputPort extends android.media.midi.MidiSender implements java.io.Closeable {
    method public void close() throws java.io.IOException;
    method public void connect(android.media.midi.MidiReceiver);
    method public void disconnect(android.media.midi.MidiReceiver);
    method public final int getPortNumber();
  }

  public abstract class MidiReceiver {
    ctor public MidiReceiver();
    method public void flush() throws java.io.IOException;
    method public int getMaxMessageSize();
    method public abstract void onReceive(byte[], int, int, long) throws java.io.IOException;
    method public void send(byte[], int, int) throws java.io.IOException;
    method public void sendWithTimestamp(byte[], int, int, long) throws java.io.IOException;
  }

  public abstract class MidiSender {
    ctor public MidiSender();
    method public abstract void connect(android.media.midi.MidiReceiver);
    method public abstract void disconnect(android.media.midi.MidiReceiver);
  }

}

package android.media.projection {

  public final class MediaProjection {
    method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay.Callback, android.os.Handler);
    method public void registerCallback(android.media.projection.MediaProjection.Callback, android.os.Handler);
    method public void stop();
    method public void unregisterCallback(android.media.projection.MediaProjection.Callback);
  }

  public static abstract class MediaProjection.Callback {
    ctor public MediaProjection.Callback();
    method public void onStop();
  }

  public final class MediaProjectionManager {
    method public android.content.Intent createScreenCaptureIntent();
    method public android.media.projection.MediaProjection getMediaProjection(int, android.content.Intent);
  }

}

package android.media.routing {

  public final class MediaRouteSelector implements android.os.Parcelable {
    method public boolean containsProtocol(java.lang.Class<?>);
    method public boolean containsProtocol(java.lang.String);
    method public int describeContents();
    method public android.os.Bundle getExtras();
    method public int getOptionalFeatures();
    method public java.util.List<java.lang.String> getOptionalProtocols();
    method public int getRequiredFeatures();
    method public java.util.List<java.lang.String> getRequiredProtocols();
    method public java.lang.String getServicePackageName();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.routing.MediaRouteSelector> CREATOR;
  }

  public static final class MediaRouteSelector.Builder {
    ctor public MediaRouteSelector.Builder();
    method public android.media.routing.MediaRouteSelector.Builder addOptionalProtocol(java.lang.Class<?>);
    method public android.media.routing.MediaRouteSelector.Builder addOptionalProtocol(java.lang.String);
    method public android.media.routing.MediaRouteSelector.Builder addRequiredProtocol(java.lang.Class<?>);
    method public android.media.routing.MediaRouteSelector.Builder addRequiredProtocol(java.lang.String);
    method public android.media.routing.MediaRouteSelector build();
    method public android.media.routing.MediaRouteSelector.Builder setExtras(android.os.Bundle);
    method public android.media.routing.MediaRouteSelector.Builder setOptionalFeatures(int);
    method public android.media.routing.MediaRouteSelector.Builder setRequiredFeatures(int);
    method public android.media.routing.MediaRouteSelector.Builder setServicePackageName(java.lang.String);
  }

  public abstract class MediaRouteService extends android.app.Service {
    ctor public MediaRouteService();
    method public android.media.routing.MediaRouter.ServiceMetadata getServiceMetadata();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract android.media.routing.MediaRouteService.ClientSession onCreateClientSession(android.media.routing.MediaRouteService.ClientInfo);
    field public static final java.lang.String SERVICE_INTERFACE = "android.media.routing.MediaRouteService";
  }

  public static final class MediaRouteService.ClientInfo {
    method public java.lang.String getPackageName();
    method public int getUid();
  }

  public static abstract class MediaRouteService.ClientSession {
    ctor public MediaRouteService.ClientSession();
    method public abstract boolean onConnect(android.media.routing.MediaRouter.ConnectionRequest, android.media.routing.MediaRouteService.ConnectionCallback);
    method public abstract void onDisconnect();
    method public void onPauseStream();
    method public void onRelease();
    method public void onResumeStream();
    method public abstract boolean onStartDiscovery(android.media.routing.MediaRouter.DiscoveryRequest, android.media.routing.MediaRouteService.DiscoveryCallback);
    method public abstract void onStopDiscovery();
  }

  public final class MediaRouteService.ConnectionCallback {
    method public void onConnected(android.media.routing.MediaRouter.ConnectionInfo);
    method public void onConnectionFailed(int, java.lang.CharSequence, android.os.Bundle);
    method public void onDisconnected();
  }

  public final class MediaRouteService.DiscoveryCallback {
    method public void onDestinationFound(android.media.routing.MediaRouter.DestinationInfo, java.util.List<android.media.routing.MediaRouter.RouteInfo>);
    method public void onDestinationLost(android.media.routing.MediaRouter.DestinationInfo);
    method public void onDiscoveryFailed(int, java.lang.CharSequence, android.os.Bundle);
  }

  public final class MediaRouter {
    ctor public MediaRouter(android.content.Context);
    method public void addSelector(android.media.routing.MediaRouteSelector);
    method public void clearSelectors();
    method public android.media.routing.MediaRouter.Delegate createDelegate();
    method public android.media.routing.MediaRouter.ConnectionInfo getConnection();
    method public int getConnectionState();
    method public java.util.List<android.media.routing.MediaRouter.DestinationInfo> getDiscoveredDestinations();
    method public java.util.List<android.media.routing.MediaRouter.RouteInfo> getDiscoveredRoutes(android.media.routing.MediaRouter.DestinationInfo);
    method public int getDiscoveryState();
    method public android.media.AudioAttributes getPreferredAudioAttributes();
    method public android.view.Display getPreferredPresentationDisplay();
    method public android.media.VolumeProvider getPreferredVolumeProvider();
    method public android.media.routing.MediaRouter.DestinationInfo getSelectedDestination();
    method public android.media.routing.MediaRouter.RouteInfo getSelectedRoute();
    method public java.util.List<android.media.routing.MediaRouteSelector> getSelectors();
    method public boolean isReleased();
    method public void pauseStream();
    method public void release();
    method public void removeSelector(android.media.routing.MediaRouteSelector);
    method public void resumeStream();
    method public void setRoutingCallback(android.media.routing.MediaRouter.RoutingCallback, android.os.Handler);
    field public static final int CONNECTION_ERROR_ABORTED = 1; // 0x1
    field public static final int CONNECTION_ERROR_BARGED = 7; // 0x7
    field public static final int CONNECTION_ERROR_BROKEN = 6; // 0x6
    field public static final int CONNECTION_ERROR_BUSY = 4; // 0x4
    field public static final int CONNECTION_ERROR_TIMEOUT = 5; // 0x5
    field public static final int CONNECTION_ERROR_UNAUTHORIZED = 2; // 0x2
    field public static final int CONNECTION_ERROR_UNKNOWN = 0; // 0x0
    field public static final int CONNECTION_ERROR_UNREACHABLE = 3; // 0x3
    field public static final int CONNECTION_FLAG_BARGE = 1; // 0x1
    field public static final int CONNECTION_STATE_CONNECTED = 2; // 0x2
    field public static final int CONNECTION_STATE_CONNECTING = 1; // 0x1
    field public static final int CONNECTION_STATE_DISCONNECTED = 0; // 0x0
    field public static final int DISCONNECTION_REASON_APPLICATION_REQUEST = 0; // 0x0
    field public static final int DISCONNECTION_REASON_ERROR = 2; // 0x2
    field public static final int DISCONNECTION_REASON_USER_REQUEST = 1; // 0x1
    field public static final int DISCOVERY_ERROR_ABORTED = 1; // 0x1
    field public static final int DISCOVERY_ERROR_NO_CONNECTIVITY = 2; // 0x2
    field public static final int DISCOVERY_ERROR_UNKNOWN = 0; // 0x0
    field public static final int DISCOVERY_FLAG_BACKGROUND = 1; // 0x1
    field public static final int DISCOVERY_STATE_STARTED = 1; // 0x1
    field public static final int DISCOVERY_STATE_STOPPED = 0; // 0x0
    field public static final int ROUTE_FEATURE_LIVE_AUDIO = 1; // 0x1
    field public static final int ROUTE_FEATURE_LIVE_VIDEO = 2; // 0x2
  }

  public static final class MediaRouter.ConnectionInfo {
    method public android.media.AudioAttributes getAudioAttributes();
    method public android.os.Bundle getExtras();
    method public int getFeatures();
    method public android.view.Display getPresentationDisplay();
    method public android.os.IBinder getProtocolBinder(java.lang.String);
    method public android.os.IBinder getProtocolBinder(int);
    method public T getProtocolObject(java.lang.Class<T>);
    method public java.util.List<java.lang.String> getProtocols();
    method public android.media.routing.MediaRouter.RouteInfo getRoute();
    method public android.media.VolumeProvider getVolumeProvider();
  }

  public static final class MediaRouter.ConnectionInfo.Builder {
    ctor public MediaRouter.ConnectionInfo.Builder(android.media.routing.MediaRouter.RouteInfo);
    method public android.media.routing.MediaRouter.ConnectionInfo build();
    method public android.media.routing.MediaRouter.ConnectionInfo.Builder setAudioAttributes(android.media.AudioAttributes);
    method public android.media.routing.MediaRouter.ConnectionInfo.Builder setExtras(android.os.Bundle);
    method public android.media.routing.MediaRouter.ConnectionInfo.Builder setPresentationDisplay(android.view.Display);
    method public android.media.routing.MediaRouter.ConnectionInfo.Builder setProtocolBinder(java.lang.String, android.os.IBinder);
    method public android.media.routing.MediaRouter.ConnectionInfo.Builder setProtocolStub(java.lang.Class<?>, android.os.IInterface);
    method public android.media.routing.MediaRouter.ConnectionInfo.Builder setVolumeProvider(android.media.VolumeProvider);
  }

  public static final class MediaRouter.ConnectionRequest {
    method public android.os.Bundle getExtras();
    method public int getFlags();
    method public android.media.routing.MediaRouter.RouteInfo getRoute();
    method public void setExtras(android.os.Bundle);
    method public void setFlags(int);
    method public void setRoute(android.media.routing.MediaRouter.RouteInfo);
  }

  public static final class MediaRouter.Delegate {
    ctor public MediaRouter.Delegate();
    method public void addStateCallback(android.media.routing.MediaRouter.StateCallback, android.os.Handler);
    method public void connect(android.media.routing.MediaRouter.DestinationInfo, int);
    method public void disconnect(int);
    method public int getConnectionState();
    method public java.util.List<android.media.routing.MediaRouter.DestinationInfo> getDiscoveredDestinations();
    method public int getDiscoveryState();
    method public android.media.routing.MediaRouter.DestinationInfo getSelectedDestination();
    method public boolean isReleased();
    method public void removeStateCallback(android.media.routing.MediaRouter.StateCallback);
    method public void startDiscovery(int);
    method public void stopDiscovery();
  }

  public static final class MediaRouter.DestinationInfo {
    method public java.lang.CharSequence getDescription();
    method public android.os.Bundle getExtras();
    method public int getIconResourceId();
    method public java.lang.String getId();
    method public java.lang.CharSequence getName();
    method public android.media.routing.MediaRouter.ServiceMetadata getServiceMetadata();
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
  }

  public static final class MediaRouter.DestinationInfo.Builder {
    ctor public MediaRouter.DestinationInfo.Builder(java.lang.String, android.media.routing.MediaRouter.ServiceMetadata, java.lang.CharSequence);
    method public android.media.routing.MediaRouter.DestinationInfo build();
    method public android.media.routing.MediaRouter.DestinationInfo.Builder setDescription(java.lang.CharSequence);
    method public android.media.routing.MediaRouter.DestinationInfo.Builder setExtras(android.os.Bundle);
    method public android.media.routing.MediaRouter.DestinationInfo.Builder setIconResourceId(int);
  }

  public static final class MediaRouter.DiscoveryRequest {
    method public int getFlags();
    method public java.util.List<android.media.routing.MediaRouteSelector> getSelectors();
    method public void setFlags(int);
    method public void setSelectors(java.util.List<android.media.routing.MediaRouteSelector>);
  }

  public static final class MediaRouter.RouteInfo {
    method public android.media.routing.MediaRouter.DestinationInfo getDestination();
    method public android.os.Bundle getExtras();
    method public int getFeatures();
    method public java.lang.String getId();
    method public java.util.List<java.lang.String> getProtocols();
    method public android.media.routing.MediaRouteSelector getSelector();
  }

  public static final class MediaRouter.RouteInfo.Builder {
    ctor public MediaRouter.RouteInfo.Builder(java.lang.String, android.media.routing.MediaRouter.DestinationInfo, android.media.routing.MediaRouteSelector);
    method public android.media.routing.MediaRouter.RouteInfo.Builder addProtocol(java.lang.Class<T>);
    method public android.media.routing.MediaRouter.RouteInfo.Builder addProtocol(java.lang.String);
    method public android.media.routing.MediaRouter.RouteInfo build();
    method public android.media.routing.MediaRouter.RouteInfo.Builder setExtras(android.os.Bundle);
    method public android.media.routing.MediaRouter.RouteInfo.Builder setFeatures(int);
  }

  public static abstract class MediaRouter.RoutingCallback extends android.media.routing.MediaRouter.StateCallback {
    ctor public MediaRouter.RoutingCallback();
    method public boolean onPrepareConnectionRequest(android.media.routing.MediaRouter.ConnectionRequest, android.media.routing.MediaRouter.DestinationInfo, java.util.List<android.media.routing.MediaRouter.RouteInfo>);
    method public boolean onPrepareDiscoveryRequest(android.media.routing.MediaRouter.DiscoveryRequest, java.util.List<android.media.routing.MediaRouteSelector>);
  }

  public static final class MediaRouter.ServiceMetadata {
    method public android.content.ComponentName getComponentName();
    method public android.graphics.drawable.Drawable getIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence getLabel(android.content.pm.PackageManager);
    method public java.lang.String getPackageName();
    method public android.content.pm.ServiceInfo getService();
  }

  public static abstract class MediaRouter.StateCallback {
    ctor public MediaRouter.StateCallback();
    method public void onConnected();
    method public void onConnecting();
    method public void onConnectionFailed(int, java.lang.CharSequence, android.os.Bundle);
    method public void onConnectionStateChanged(int);
    method public void onDestinationFound(android.media.routing.MediaRouter.DestinationInfo);
    method public void onDestinationLost(android.media.routing.MediaRouter.DestinationInfo);
    method public void onDisconnected();
    method public void onDiscoveryFailed(int, java.lang.CharSequence, android.os.Bundle);
    method public void onDiscoveryStarted();
    method public void onDiscoveryStateChanged(int);
    method public void onDiscoveryStopped();
    method public void onReleased();
    method public void onSelectedDestinationChanged(android.media.routing.MediaRouter.DestinationInfo);
  }

}

package android.media.session {

  public final class MediaController {
    ctor public MediaController(android.content.Context, android.media.session.MediaSession.Token);
    method public void adjustVolume(int, int);
    method public android.media.routing.MediaRouter.Delegate createMediaRouterDelegate();
    method public boolean dispatchMediaButtonEvent(android.view.KeyEvent);
    method public android.os.Bundle getExtras();
    method public long getFlags();
    method public android.media.MediaMetadata getMetadata();
    method public java.lang.String getPackageName();
    method public android.media.session.MediaController.PlaybackInfo getPlaybackInfo();
    method public android.media.session.PlaybackState getPlaybackState();
    method public java.util.List<android.media.session.MediaSession.QueueItem> getQueue();
    method public java.lang.CharSequence getQueueTitle();
    method public int getRatingType();
    method public android.app.PendingIntent getSessionActivity();
    method public android.media.session.MediaSession.Token getSessionToken();
    method public android.media.session.MediaController.TransportControls getTransportControls();
    method public void registerCallback(android.media.session.MediaController.Callback);
    method public void registerCallback(android.media.session.MediaController.Callback, android.os.Handler);
    method public void sendCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
    method public void setVolumeTo(int, int);
    method public void unregisterCallback(android.media.session.MediaController.Callback);
  }

  public static abstract class MediaController.Callback {
    ctor public MediaController.Callback();
    method public void onAudioInfoChanged(android.media.session.MediaController.PlaybackInfo);
    method public void onExtrasChanged(android.os.Bundle);
    method public void onMetadataChanged(android.media.MediaMetadata);
    method public void onPlaybackStateChanged(android.media.session.PlaybackState);
    method public void onQueueChanged(java.util.List<android.media.session.MediaSession.QueueItem>);
    method public void onQueueTitleChanged(java.lang.CharSequence);
    method public void onSessionDestroyed();
    method public void onSessionEvent(java.lang.String, android.os.Bundle);
  }

  public static final class MediaController.PlaybackInfo {
    method public android.media.AudioAttributes getAudioAttributes();
    method public int getCurrentVolume();
    method public int getMaxVolume();
    method public int getPlaybackType();
    method public int getVolumeControl();
    field public static final int PLAYBACK_TYPE_LOCAL = 1; // 0x1
    field public static final int PLAYBACK_TYPE_REMOTE = 2; // 0x2
  }

  public final class MediaController.TransportControls {
    method public void fastForward();
    method public void pause();
    method public void play();
    method public void playFromMediaId(java.lang.String, android.os.Bundle);
    method public void playFromSearch(java.lang.String, android.os.Bundle);
    method public void playFromUri(android.net.Uri, android.os.Bundle);
    method public void rewind();
    method public void seekTo(long);
    method public void sendCustomAction(android.media.session.PlaybackState.CustomAction, android.os.Bundle);
    method public void sendCustomAction(java.lang.String, android.os.Bundle);
    method public void setRating(android.media.Rating);
    method public void skipToNext();
    method public void skipToPrevious();
    method public void skipToQueueItem(long);
    method public void stop();
  }

  public final class MediaSession {
    ctor public MediaSession(android.content.Context, java.lang.String);
    method public android.media.session.MediaController getController();
    method public android.media.session.MediaSession.Token getSessionToken();
    method public boolean isActive();
    method public void release();
    method public void sendSessionEvent(java.lang.String, android.os.Bundle);
    method public void setActive(boolean);
    method public void setCallback(android.media.session.MediaSession.Callback);
    method public void setCallback(android.media.session.MediaSession.Callback, android.os.Handler);
    method public void setExtras(android.os.Bundle);
    method public void setFlags(int);
    method public void setMediaButtonReceiver(android.app.PendingIntent);
    method public void setMediaRouter(android.media.routing.MediaRouter);
    method public void setMetadata(android.media.MediaMetadata);
    method public void setPlaybackState(android.media.session.PlaybackState);
    method public void setPlaybackToLocal(android.media.AudioAttributes);
    method public void setPlaybackToRemote(android.media.VolumeProvider);
    method public void setQueue(java.util.List<android.media.session.MediaSession.QueueItem>);
    method public void setQueueTitle(java.lang.CharSequence);
    method public void setRatingType(int);
    method public void setSessionActivity(android.app.PendingIntent);
    field public static final int FLAG_HANDLES_MEDIA_BUTTONS = 1; // 0x1
    field public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 2; // 0x2
  }

  public static abstract class MediaSession.Callback {
    ctor public MediaSession.Callback();
    method public void onCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
    method public void onCustomAction(java.lang.String, android.os.Bundle);
    method public void onFastForward();
    method public boolean onMediaButtonEvent(android.content.Intent);
    method public void onPause();
    method public void onPlay();
    method public void onPlayFromMediaId(java.lang.String, android.os.Bundle);
    method public void onPlayFromSearch(java.lang.String, android.os.Bundle);
    method public void onPlayFromUri(android.net.Uri, android.os.Bundle);
    method public void onRewind();
    method public void onSeekTo(long);
    method public void onSetRating(android.media.Rating);
    method public void onSkipToNext();
    method public void onSkipToPrevious();
    method public void onSkipToQueueItem(long);
    method public void onStop();
  }

  public static final class MediaSession.QueueItem implements android.os.Parcelable {
    ctor public MediaSession.QueueItem(android.media.MediaDescription, long);
    method public int describeContents();
    method public android.media.MediaDescription getDescription();
    method public long getQueueId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.session.MediaSession.QueueItem> CREATOR;
    field public static final int UNKNOWN_ID = -1; // 0xffffffff
  }

  public static final class MediaSession.Token implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.session.MediaSession.Token> CREATOR;
  }

  public final class MediaSessionManager {
    method public void addOnActiveSessionsChangedListener(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener, android.content.ComponentName);
    method public void addOnActiveSessionsChangedListener(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener, android.content.ComponentName, android.os.Handler);
    method public java.util.List<android.media.session.MediaController> getActiveSessions(android.content.ComponentName);
    method public void removeOnActiveSessionsChangedListener(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener);
  }

  public static abstract interface MediaSessionManager.OnActiveSessionsChangedListener {
    method public abstract void onActiveSessionsChanged(java.util.List<android.media.session.MediaController>);
  }

  public final class PlaybackState implements android.os.Parcelable {
    method public int describeContents();
    method public long getActions();
    method public long getActiveQueueItemId();
    method public long getBufferedPosition();
    method public java.util.List<android.media.session.PlaybackState.CustomAction> getCustomActions();
    method public java.lang.CharSequence getErrorMessage();
    method public android.os.Bundle getExtras();
    method public long getLastPositionUpdateTime();
    method public float getPlaybackSpeed();
    method public long getPosition();
    method public int getState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final long ACTION_FAST_FORWARD = 64L; // 0x40L
    field public static final long ACTION_PAUSE = 2L; // 0x2L
    field public static final long ACTION_PLAY = 4L; // 0x4L
    field public static final long ACTION_PLAY_FROM_MEDIA_ID = 1024L; // 0x400L
    field public static final long ACTION_PLAY_FROM_SEARCH = 2048L; // 0x800L
    field public static final long ACTION_PLAY_FROM_URI = 8192L; // 0x2000L
    field public static final long ACTION_PLAY_PAUSE = 512L; // 0x200L
    field public static final long ACTION_REWIND = 8L; // 0x8L
    field public static final long ACTION_SEEK_TO = 256L; // 0x100L
    field public static final long ACTION_SET_RATING = 128L; // 0x80L
    field public static final long ACTION_SKIP_TO_NEXT = 32L; // 0x20L
    field public static final long ACTION_SKIP_TO_PREVIOUS = 16L; // 0x10L
    field public static final long ACTION_SKIP_TO_QUEUE_ITEM = 4096L; // 0x1000L
    field public static final long ACTION_STOP = 1L; // 0x1L
    field public static final android.os.Parcelable.Creator<android.media.session.PlaybackState> CREATOR;
    field public static final long PLAYBACK_POSITION_UNKNOWN = -1L; // 0xffffffffffffffffL
    field public static final int STATE_BUFFERING = 6; // 0x6
    field public static final int STATE_CONNECTING = 8; // 0x8
    field public static final int STATE_ERROR = 7; // 0x7
    field public static final int STATE_FAST_FORWARDING = 4; // 0x4
    field public static final int STATE_NONE = 0; // 0x0
    field public static final int STATE_PAUSED = 2; // 0x2
    field public static final int STATE_PLAYING = 3; // 0x3
    field public static final int STATE_REWINDING = 5; // 0x5
    field public static final int STATE_SKIPPING_TO_NEXT = 10; // 0xa
    field public static final int STATE_SKIPPING_TO_PREVIOUS = 9; // 0x9
    field public static final int STATE_SKIPPING_TO_QUEUE_ITEM = 11; // 0xb
    field public static final int STATE_STOPPED = 1; // 0x1
  }

  public static final class PlaybackState.Builder {
    ctor public PlaybackState.Builder();
    ctor public PlaybackState.Builder(android.media.session.PlaybackState);
    method public android.media.session.PlaybackState.Builder addCustomAction(java.lang.String, java.lang.String, int);
    method public android.media.session.PlaybackState.Builder addCustomAction(android.media.session.PlaybackState.CustomAction);
    method public android.media.session.PlaybackState build();
    method public android.media.session.PlaybackState.Builder setActions(long);
    method public android.media.session.PlaybackState.Builder setActiveQueueItemId(long);
    method public android.media.session.PlaybackState.Builder setBufferedPosition(long);
    method public android.media.session.PlaybackState.Builder setErrorMessage(java.lang.CharSequence);
    method public android.media.session.PlaybackState.Builder setExtras(android.os.Bundle);
    method public android.media.session.PlaybackState.Builder setState(int, long, float, long);
    method public android.media.session.PlaybackState.Builder setState(int, long, float);
  }

  public static final class PlaybackState.CustomAction implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String getAction();
    method public android.os.Bundle getExtras();
    method public int getIcon();
    method public java.lang.CharSequence getName();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.session.PlaybackState.CustomAction> CREATOR;
  }

  public static final class PlaybackState.CustomAction.Builder {
    ctor public PlaybackState.CustomAction.Builder(java.lang.String, java.lang.CharSequence, int);
    method public android.media.session.PlaybackState.CustomAction build();
    method public android.media.session.PlaybackState.CustomAction.Builder setExtras(android.os.Bundle);
  }

}

package android.media.tv {

  public final class TvContentRating {
    method public static android.media.tv.TvContentRating createRating(java.lang.String, java.lang.String, java.lang.String, java.lang.String...);
    method public java.lang.String flattenToString();
    method public java.lang.String getDomain();
    method public java.lang.String getMainRating();
    method public java.lang.String getRatingSystem();
    method public java.util.List<java.lang.String> getSubRatings();
    method public static android.media.tv.TvContentRating unflattenFromString(java.lang.String);
  }

  public final class TvContract {
    method public static final android.net.Uri buildChannelLogoUri(long);
    method public static final android.net.Uri buildChannelLogoUri(android.net.Uri);
    method public static final android.net.Uri buildChannelUri(long);
    method public static final android.net.Uri buildChannelUriForPassthroughInput(java.lang.String);
    method public static final android.net.Uri buildChannelsUriForInput(java.lang.String);
    method public static final java.lang.String buildInputId(android.content.ComponentName);
    method public static final android.net.Uri buildProgramUri(long);
    method public static final android.net.Uri buildProgramsUriForChannel(long);
    method public static final android.net.Uri buildProgramsUriForChannel(android.net.Uri);
    method public static final android.net.Uri buildProgramsUriForChannel(long, long, long);
    method public static final android.net.Uri buildProgramsUriForChannel(android.net.Uri, long, long);
    field public static final java.lang.String AUTHORITY = "android.media.tv";
  }

  public static abstract interface TvContract.BaseTvColumns implements android.provider.BaseColumns {
    field public static final java.lang.String COLUMN_PACKAGE_NAME = "package_name";
  }

  public static final class TvContract.Channels implements android.media.tv.TvContract.BaseTvColumns {
    method public static final java.lang.String getVideoResolution(java.lang.String);
    field public static final java.lang.String COLUMN_DESCRIPTION = "description";
    field public static final java.lang.String COLUMN_DISPLAY_NAME = "display_name";
    field public static final java.lang.String COLUMN_DISPLAY_NUMBER = "display_number";
    field public static final java.lang.String COLUMN_INPUT_ID = "input_id";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
    field public static final java.lang.String COLUMN_NETWORK_AFFILIATION = "network_affiliation";
    field public static final java.lang.String COLUMN_ORIGINAL_NETWORK_ID = "original_network_id";
    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
    field public static final java.lang.String COLUMN_SERVICE_ID = "service_id";
    field public static final java.lang.String COLUMN_SERVICE_TYPE = "service_type";
    field public static final java.lang.String COLUMN_TRANSPORT_STREAM_ID = "transport_stream_id";
    field public static final java.lang.String COLUMN_TYPE = "type";
    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
    field public static final java.lang.String COLUMN_VIDEO_FORMAT = "video_format";
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/channel";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/channel";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String SERVICE_TYPE_AUDIO = "SERVICE_TYPE_AUDIO";
    field public static final java.lang.String SERVICE_TYPE_AUDIO_VIDEO = "SERVICE_TYPE_AUDIO_VIDEO";
    field public static final java.lang.String SERVICE_TYPE_OTHER = "SERVICE_TYPE_OTHER";
    field public static final java.lang.String TYPE_1SEG = "TYPE_1SEG";
    field public static final java.lang.String TYPE_ATSC_C = "TYPE_ATSC_C";
    field public static final java.lang.String TYPE_ATSC_M_H = "TYPE_ATSC_M_H";
    field public static final java.lang.String TYPE_ATSC_T = "TYPE_ATSC_T";
    field public static final java.lang.String TYPE_CMMB = "TYPE_CMMB";
    field public static final java.lang.String TYPE_DTMB = "TYPE_DTMB";
    field public static final java.lang.String TYPE_DVB_C = "TYPE_DVB_C";
    field public static final java.lang.String TYPE_DVB_C2 = "TYPE_DVB_C2";
    field public static final java.lang.String TYPE_DVB_H = "TYPE_DVB_H";
    field public static final java.lang.String TYPE_DVB_S = "TYPE_DVB_S";
    field public static final java.lang.String TYPE_DVB_S2 = "TYPE_DVB_S2";
    field public static final java.lang.String TYPE_DVB_SH = "TYPE_DVB_SH";
    field public static final java.lang.String TYPE_DVB_T = "TYPE_DVB_T";
    field public static final java.lang.String TYPE_DVB_T2 = "TYPE_DVB_T2";
    field public static final java.lang.String TYPE_ISDB_C = "TYPE_ISDB_C";
    field public static final java.lang.String TYPE_ISDB_S = "TYPE_ISDB_S";
    field public static final java.lang.String TYPE_ISDB_T = "TYPE_ISDB_T";
    field public static final java.lang.String TYPE_ISDB_TB = "TYPE_ISDB_TB";
    field public static final java.lang.String TYPE_NTSC = "TYPE_NTSC";
    field public static final java.lang.String TYPE_OTHER = "TYPE_OTHER";
    field public static final java.lang.String TYPE_PAL = "TYPE_PAL";
    field public static final java.lang.String TYPE_SECAM = "TYPE_SECAM";
    field public static final java.lang.String TYPE_S_DMB = "TYPE_S_DMB";
    field public static final java.lang.String TYPE_T_DMB = "TYPE_T_DMB";
    field public static final java.lang.String VIDEO_FORMAT_1080I = "VIDEO_FORMAT_1080I";
    field public static final java.lang.String VIDEO_FORMAT_1080P = "VIDEO_FORMAT_1080P";
    field public static final java.lang.String VIDEO_FORMAT_2160P = "VIDEO_FORMAT_2160P";
    field public static final java.lang.String VIDEO_FORMAT_240P = "VIDEO_FORMAT_240P";
    field public static final java.lang.String VIDEO_FORMAT_360P = "VIDEO_FORMAT_360P";
    field public static final java.lang.String VIDEO_FORMAT_4320P = "VIDEO_FORMAT_4320P";
    field public static final java.lang.String VIDEO_FORMAT_480I = "VIDEO_FORMAT_480I";
    field public static final java.lang.String VIDEO_FORMAT_480P = "VIDEO_FORMAT_480P";
    field public static final java.lang.String VIDEO_FORMAT_576I = "VIDEO_FORMAT_576I";
    field public static final java.lang.String VIDEO_FORMAT_576P = "VIDEO_FORMAT_576P";
    field public static final java.lang.String VIDEO_FORMAT_720P = "VIDEO_FORMAT_720P";
    field public static final java.lang.String VIDEO_RESOLUTION_ED = "VIDEO_RESOLUTION_ED";
    field public static final java.lang.String VIDEO_RESOLUTION_FHD = "VIDEO_RESOLUTION_FHD";
    field public static final java.lang.String VIDEO_RESOLUTION_HD = "VIDEO_RESOLUTION_HD";
    field public static final java.lang.String VIDEO_RESOLUTION_SD = "VIDEO_RESOLUTION_SD";
    field public static final java.lang.String VIDEO_RESOLUTION_UHD = "VIDEO_RESOLUTION_UHD";
  }

  public static final class TvContract.Channels.Logo {
    field public static final java.lang.String CONTENT_DIRECTORY = "logo";
  }

  public static final class TvContract.Programs implements android.media.tv.TvContract.BaseTvColumns {
    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
    field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
    field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
    field public static final java.lang.String COLUMN_EPISODE_NUMBER = "episode_number";
    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
    field public static final java.lang.String COLUMN_SEASON_NUMBER = "season_number";
    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
    field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
    field public static final java.lang.String COLUMN_TITLE = "title";
    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/program";
    field public static final android.net.Uri CONTENT_URI;
  }

  public static final class TvContract.Programs.Genres {
    method public static java.lang.String[] decode(java.lang.String);
    method public static java.lang.String encode(java.lang.String...);
    field public static final java.lang.String ANIMAL_WILDLIFE = "ANIMAL_WILDLIFE";
    field public static final java.lang.String ARTS = "ARTS";
    field public static final java.lang.String COMEDY = "COMEDY";
    field public static final java.lang.String DRAMA = "DRAMA";
    field public static final java.lang.String EDUCATION = "EDUCATION";
    field public static final java.lang.String ENTERTAINMENT = "ENTERTAINMENT";
    field public static final java.lang.String FAMILY_KIDS = "FAMILY_KIDS";
    field public static final java.lang.String GAMING = "GAMING";
    field public static final java.lang.String LIFE_STYLE = "LIFE_STYLE";
    field public static final java.lang.String MOVIES = "MOVIES";
    field public static final java.lang.String MUSIC = "MUSIC";
    field public static final java.lang.String NEWS = "NEWS";
    field public static final java.lang.String PREMIER = "PREMIER";
    field public static final java.lang.String SHOPPING = "SHOPPING";
    field public static final java.lang.String SPORTS = "SPORTS";
    field public static final java.lang.String TECH_SCIENCE = "TECH_SCIENCE";
    field public static final java.lang.String TRAVEL = "TRAVEL";
  }

  public final class TvInputInfo implements android.os.Parcelable {
    method public android.content.Intent createSettingsIntent();
    method public android.content.Intent createSetupIntent();
    method public int describeContents();
    method public java.lang.String getId();
    method public java.lang.String getParentId();
    method public android.content.pm.ServiceInfo getServiceInfo();
    method public int getType();
    method public boolean isPassthroughInput();
    method public android.graphics.drawable.Drawable loadIcon(android.content.Context);
    method public java.lang.CharSequence loadLabel(android.content.Context);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.tv.TvInputInfo> CREATOR;
    field public static final java.lang.String EXTRA_INPUT_ID = "android.media.tv.extra.INPUT_ID";
    field public static final int TYPE_COMPONENT = 1004; // 0x3ec
    field public static final int TYPE_COMPOSITE = 1001; // 0x3e9
    field public static final int TYPE_DISPLAY_PORT = 1008; // 0x3f0
    field public static final int TYPE_DVI = 1006; // 0x3ee
    field public static final int TYPE_HDMI = 1007; // 0x3ef
    field public static final int TYPE_OTHER = 1000; // 0x3e8
    field public static final int TYPE_SCART = 1003; // 0x3eb
    field public static final int TYPE_SVIDEO = 1002; // 0x3ea
    field public static final int TYPE_TUNER = 0; // 0x0
    field public static final int TYPE_VGA = 1005; // 0x3ed
  }

  public final class TvInputManager {
    method public int getInputState(java.lang.String);
    method public android.media.tv.TvInputInfo getTvInputInfo(java.lang.String);
    method public java.util.List<android.media.tv.TvInputInfo> getTvInputList();
    method public boolean isParentalControlsEnabled();
    method public boolean isRatingBlocked(android.media.tv.TvContentRating);
    method public void registerCallback(android.media.tv.TvInputManager.TvInputCallback, android.os.Handler);
    method public void unregisterCallback(android.media.tv.TvInputManager.TvInputCallback);
    field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
    field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
    field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
    field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
    field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
    field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
    field public static final java.lang.String META_DATA_CONTENT_RATING_SYSTEMS = "android.media.tv.metadata.CONTENT_RATING_SYSTEMS";
    field public static final long TIME_SHIFT_INVALID_TIME = -9223372036854775808L; // 0x8000000000000000L
    field public static final int TIME_SHIFT_STATUS_AVAILABLE = 3; // 0x3
    field public static final int TIME_SHIFT_STATUS_UNAVAILABLE = 2; // 0x2
    field public static final int TIME_SHIFT_STATUS_UNKNOWN = 0; // 0x0
    field public static final int TIME_SHIFT_STATUS_UNSUPPORTED = 1; // 0x1
    field public static final int VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY = 4; // 0x4
    field public static final int VIDEO_UNAVAILABLE_REASON_BUFFERING = 3; // 0x3
    field public static final int VIDEO_UNAVAILABLE_REASON_TUNING = 1; // 0x1
    field public static final int VIDEO_UNAVAILABLE_REASON_UNKNOWN = 0; // 0x0
    field public static final int VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL = 2; // 0x2
  }

  public static abstract class TvInputManager.TvInputCallback {
    ctor public TvInputManager.TvInputCallback();
    method public void onInputAdded(java.lang.String);
    method public void onInputRemoved(java.lang.String);
    method public void onInputStateChanged(java.lang.String, int);
  }

  public abstract class TvInputService extends android.app.Service {
    ctor public TvInputService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract android.media.tv.TvInputService.Session onCreateSession(java.lang.String);
    field public static final java.lang.String SERVICE_INTERFACE = "android.media.tv.TvInputService";
    field public static final java.lang.String SERVICE_META_DATA = "android.media.tv.input";
  }

  public static abstract class TvInputService.HardwareSession extends android.media.tv.TvInputService.Session {
    ctor public TvInputService.HardwareSession(android.content.Context);
    method public abstract java.lang.String getHardwareInputId();
    method public void onHardwareVideoAvailable();
    method public void onHardwareVideoUnavailable(int);
    method public final boolean onSetSurface(android.view.Surface);
  }

  public static abstract class TvInputService.Session implements android.view.KeyEvent.Callback {
    ctor public TvInputService.Session(android.content.Context);
    method public void notifyChannelRetuned(android.net.Uri);
    method public void notifyContentAllowed();
    method public void notifyContentBlocked(android.media.tv.TvContentRating);
    method public void notifyTimeShiftStatusChanged(int);
    method public void notifyTrackSelected(int, java.lang.String);
    method public void notifyTracksChanged(java.util.List<android.media.tv.TvTrackInfo>);
    method public void notifyVideoAvailable();
    method public void notifyVideoUnavailable(int);
    method public android.view.View onCreateOverlayView();
    method public boolean onGenericMotionEvent(android.view.MotionEvent);
    method public boolean onKeyDown(int, android.view.KeyEvent);
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public abstract void onRelease();
    method public boolean onSelectTrack(int, java.lang.String);
    method public abstract void onSetCaptionEnabled(boolean);
    method public abstract void onSetStreamVolume(float);
    method public abstract boolean onSetSurface(android.view.Surface);
    method public void onSurfaceChanged(int, int, int);
    method public long onTimeShiftGetCurrentPosition();
    method public long onTimeShiftGetStartPosition();
    method public void onTimeShiftPause();
    method public void onTimeShiftResume();
    method public void onTimeShiftSeekTo(long);
    method public void onTimeShiftSetPlaybackRate(float, int);
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public boolean onTrackballEvent(android.view.MotionEvent);
    method public abstract boolean onTune(android.net.Uri);
    method public void onUnblockContent(android.media.tv.TvContentRating);
    method public void setOverlayViewEnabled(boolean);
  }

  public final class TvTrackInfo implements android.os.Parcelable {
    method public int describeContents();
    method public final int getAudioChannelCount();
    method public final int getAudioSampleRate();
    method public final java.lang.String getDescription();
    method public final android.os.Bundle getExtra();
    method public final java.lang.String getId();
    method public final java.lang.String getLanguage();
    method public final int getType();
    method public final float getVideoFrameRate();
    method public final int getVideoHeight();
    method public final int getVideoWidth();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.tv.TvTrackInfo> CREATOR;
    field public static final int TYPE_AUDIO = 0; // 0x0
    field public static final int TYPE_SUBTITLE = 2; // 0x2
    field public static final int TYPE_VIDEO = 1; // 0x1
  }

  public static final class TvTrackInfo.Builder {
    ctor public TvTrackInfo.Builder(int, java.lang.String);
    method public android.media.tv.TvTrackInfo build();
    method public final android.media.tv.TvTrackInfo.Builder setAudioChannelCount(int);
    method public final android.media.tv.TvTrackInfo.Builder setAudioSampleRate(int);
    method public final android.media.tv.TvTrackInfo.Builder setDescription(java.lang.String);
    method public final android.media.tv.TvTrackInfo.Builder setExtra(android.os.Bundle);
    method public final android.media.tv.TvTrackInfo.Builder setLanguage(java.lang.String);
    method public final android.media.tv.TvTrackInfo.Builder setVideoFrameRate(float);
    method public final android.media.tv.TvTrackInfo.Builder setVideoHeight(int);
    method public final android.media.tv.TvTrackInfo.Builder setVideoWidth(int);
  }

  public class TvView extends android.view.ViewGroup {
    ctor public TvView(android.content.Context);
    ctor public TvView(android.content.Context, android.util.AttributeSet);
    ctor public TvView(android.content.Context, android.util.AttributeSet, int);
    method public boolean dispatchUnhandledInputEvent(android.view.InputEvent);
    method public java.lang.String getSelectedTrack(int);
    method public java.util.List<android.media.tv.TvTrackInfo> getTracks(int);
    method protected void onLayout(boolean, int, int, int, int);
    method public boolean onUnhandledInputEvent(android.view.InputEvent);
    method public void reset();
    method public void selectTrack(int, java.lang.String);
    method public void setCallback(android.media.tv.TvView.TvInputCallback);
    method public void setCaptionEnabled(boolean);
    method public void setOnUnhandledInputEventListener(android.media.tv.TvView.OnUnhandledInputEventListener);
    method public void setStreamVolume(float);
    method public void setTimeShiftPositionCallback(android.media.tv.TvView.TimeShiftPositionCallback);
    method public void timeShiftPause();
    method public void timeShiftResume();
    method public void timeShiftSeekTo(long);
    method public void timeShiftSetPlaybackRate(float, int);
    method public void tune(java.lang.String, android.net.Uri);
  }

  public static abstract interface TvView.OnUnhandledInputEventListener {
    method public abstract boolean onUnhandledInputEvent(android.view.InputEvent);
  }

  public static abstract class TvView.TimeShiftPositionCallback {
    ctor public TvView.TimeShiftPositionCallback();
    method public void onTimeShiftCurrentPositionChanged(java.lang.String, long);
    method public void onTimeShiftStartPositionChanged(java.lang.String, long);
  }

  public static abstract class TvView.TvInputCallback {
    ctor public TvView.TvInputCallback();
    method public void onChannelRetuned(java.lang.String, android.net.Uri);
    method public void onConnectionFailed(java.lang.String);
    method public void onContentAllowed(java.lang.String);
    method public void onContentBlocked(java.lang.String, android.media.tv.TvContentRating);
    method public void onDisconnected(java.lang.String);
    method public void onTimeShiftStatusChanged(java.lang.String, int);
    method public void onTrackSelected(java.lang.String, int, java.lang.String);
    method public void onTracksChanged(java.lang.String, java.util.List<android.media.tv.TvTrackInfo>);
    method public void onVideoAvailable(java.lang.String);
    method public void onVideoSizeChanged(java.lang.String, int, int);
    method public void onVideoUnavailable(java.lang.String, int);
  }

}

package android.mtp {

  public final class MtpConstants {
    ctor public MtpConstants();
    method public static boolean isAbstractObject(int);
    field public static final int ASSOCIATION_TYPE_GENERIC_FOLDER = 1; // 0x1
    field public static final int FORMAT_3GP_CONTAINER = 47492; // 0xb984
    field public static final int FORMAT_AAC = 47363; // 0xb903
    field public static final int FORMAT_ABSTRACT_AUDIO_ALBUM = 47619; // 0xba03
    field public static final int FORMAT_ABSTRACT_AUDIO_PLAYLIST = 47625; // 0xba09
    field public static final int FORMAT_ABSTRACT_AV_PLAYLIST = 47621; // 0xba05
    field public static final int FORMAT_ABSTRACT_DOCUMENT = 47745; // 0xba81
    field public static final int FORMAT_ABSTRACT_IMAGE_ALBUM = 47618; // 0xba02
    field public static final int FORMAT_ABSTRACT_MEDIACAST = 47627; // 0xba0b
    field public static final int FORMAT_ABSTRACT_MULTIMEDIA_ALBUM = 47617; // 0xba01
    field public static final int FORMAT_ABSTRACT_VIDEO_ALBUM = 47620; // 0xba04
    field public static final int FORMAT_ABSTRACT_VIDEO_PLAYLIST = 47626; // 0xba0a
    field public static final int FORMAT_AIFF = 12295; // 0x3007
    field public static final int FORMAT_ASF = 12300; // 0x300c
    field public static final int FORMAT_ASSOCIATION = 12289; // 0x3001
    field public static final int FORMAT_ASX_PLAYLIST = 47635; // 0xba13
    field public static final int FORMAT_AUDIBLE = 47364; // 0xb904
    field public static final int FORMAT_AVI = 12298; // 0x300a
    field public static final int FORMAT_BMP = 14340; // 0x3804
    field public static final int FORMAT_DPOF = 12294; // 0x3006
    field public static final int FORMAT_EXECUTABLE = 12291; // 0x3003
    field public static final int FORMAT_EXIF_JPEG = 14337; // 0x3801
    field public static final int FORMAT_FLAC = 47366; // 0xb906
    field public static final int FORMAT_GIF = 14343; // 0x3807
    field public static final int FORMAT_HTML = 12293; // 0x3005
    field public static final int FORMAT_JFIF = 14344; // 0x3808
    field public static final int FORMAT_JP2 = 14351; // 0x380f
    field public static final int FORMAT_JPX = 14352; // 0x3810
    field public static final int FORMAT_M3U_PLAYLIST = 47633; // 0xba11
    field public static final int FORMAT_MP2 = 47491; // 0xb983
    field public static final int FORMAT_MP3 = 12297; // 0x3009
    field public static final int FORMAT_MP4_CONTAINER = 47490; // 0xb982
    field public static final int FORMAT_MPEG = 12299; // 0x300b
    field public static final int FORMAT_MPL_PLAYLIST = 47634; // 0xba12
    field public static final int FORMAT_MS_EXCEL_SPREADSHEET = 47749; // 0xba85
    field public static final int FORMAT_MS_POWERPOINT_PRESENTATION = 47750; // 0xba86
    field public static final int FORMAT_MS_WORD_DOCUMENT = 47747; // 0xba83
    field public static final int FORMAT_OGG = 47362; // 0xb902
    field public static final int FORMAT_PICT = 14346; // 0x380a
    field public static final int FORMAT_PLS_PLAYLIST = 47636; // 0xba14
    field public static final int FORMAT_PNG = 14347; // 0x380b
    field public static final int FORMAT_SCRIPT = 12290; // 0x3002
    field public static final int FORMAT_TEXT = 12292; // 0x3004
    field public static final int FORMAT_TIFF = 14349; // 0x380d
    field public static final int FORMAT_TIFF_EP = 14338; // 0x3802
    field public static final int FORMAT_UNDEFINED = 12288; // 0x3000
    field public static final int FORMAT_UNDEFINED_AUDIO = 47360; // 0xb900
    field public static final int FORMAT_UNDEFINED_COLLECTION = 47616; // 0xba00
    field public static final int FORMAT_UNDEFINED_DOCUMENT = 47744; // 0xba80
    field public static final int FORMAT_UNDEFINED_FIRMWARE = 47106; // 0xb802
    field public static final int FORMAT_UNDEFINED_VIDEO = 47488; // 0xb980
    field public static final int FORMAT_WAV = 12296; // 0x3008
    field public static final int FORMAT_WINDOWS_IMAGE_FORMAT = 47233; // 0xb881
    field public static final int FORMAT_WMA = 47361; // 0xb901
    field public static final int FORMAT_WMV = 47489; // 0xb981
    field public static final int FORMAT_WPL_PLAYLIST = 47632; // 0xba10
    field public static final int FORMAT_XML_DOCUMENT = 47746; // 0xba82
    field public static final int PROTECTION_STATUS_NONE = 0; // 0x0
    field public static final int PROTECTION_STATUS_NON_TRANSFERABLE_DATA = 32771; // 0x8003
    field public static final int PROTECTION_STATUS_READ_ONLY = 32769; // 0x8001
    field public static final int PROTECTION_STATUS_READ_ONLY_DATA = 32770; // 0x8002
  }

  public final class MtpDevice {
    ctor public MtpDevice(android.hardware.usb.UsbDevice);
    method public void close();
    method public boolean deleteObject(int);
    method public int getDeviceId();
    method public android.mtp.MtpDeviceInfo getDeviceInfo();
    method public java.lang.String getDeviceName();
    method public byte[] getObject(int, int);
    method public int[] getObjectHandles(int, int, int);
    method public android.mtp.MtpObjectInfo getObjectInfo(int);
    method public long getParent(int);
    method public long getStorageId(int);
    method public int[] getStorageIds();
    method public android.mtp.MtpStorageInfo getStorageInfo(int);
    method public byte[] getThumbnail(int);
    method public boolean importFile(int, java.lang.String);
    method public boolean open(android.hardware.usb.UsbDeviceConnection);
  }

  public class MtpDeviceInfo {
    method public final java.lang.String getManufacturer();
    method public final java.lang.String getModel();
    method public final java.lang.String getSerialNumber();
    method public final java.lang.String getVersion();
  }

  public final class MtpObjectInfo {
    method public final int getAssociationDesc();
    method public final int getAssociationType();
    method public final int getCompressedSize();
    method public final long getDateCreated();
    method public final long getDateModified();
    method public final int getFormat();
    method public final int getImagePixDepth();
    method public final int getImagePixHeight();
    method public final int getImagePixWidth();
    method public final java.lang.String getKeywords();
    method public final java.lang.String getName();
    method public final int getObjectHandle();
    method public final int getParent();
    method public final int getProtectionStatus();
    method public final int getSequenceNumber();
    method public final int getStorageId();
    method public final int getThumbCompressedSize();
    method public final int getThumbFormat();
    method public final int getThumbPixHeight();
    method public final int getThumbPixWidth();
  }

  public final class MtpStorageInfo {
    method public final java.lang.String getDescription();
    method public final long getFreeSpace();
    method public final long getMaxCapacity();
    method public final int getStorageId();
    method public final java.lang.String getVolumeIdentifier();
  }

}

package android.net {

  public class ConnectivityManager {
    method public void addDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
    method public boolean bindProcessToNetwork(android.net.Network);
    method public android.net.NetworkInfo getActiveNetworkInfo();
    method public android.net.NetworkInfo[] getAllNetworkInfo();
    method public android.net.Network[] getAllNetworks();
    method public deprecated boolean getBackgroundDataSetting();
    method public android.net.Network getBoundNetworkForProcess();
    method public android.net.ProxyInfo getDefaultProxy();
    method public android.net.LinkProperties getLinkProperties(android.net.Network);
    method public android.net.NetworkCapabilities getNetworkCapabilities(android.net.Network);
    method public android.net.NetworkInfo getNetworkInfo(int);
    method public android.net.NetworkInfo getNetworkInfo(android.net.Network);
    method public deprecated int getNetworkPreference();
    method public static deprecated android.net.Network getProcessDefaultNetwork();
    method public boolean isActiveNetworkMetered();
    method public boolean isDefaultNetworkActive();
    method public static boolean isNetworkTypeValid(int);
    method public void registerNetworkCallback(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
    method public void releaseNetworkRequest(android.app.PendingIntent);
    method public void removeDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
    method public void reportBadNetwork(android.net.Network);
    method public void requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
    method public void requestNetwork(android.net.NetworkRequest, android.app.PendingIntent);
    method public deprecated boolean requestRouteToHost(int, int);
    method public deprecated void setNetworkPreference(int);
    method public static deprecated boolean setProcessDefaultNetwork(android.net.Network);
    method public deprecated int startUsingNetworkFeature(int, java.lang.String);
    method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
    method public void unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback);
    field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
    field public static final java.lang.String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
    field public static final deprecated int DEFAULT_NETWORK_PREFERENCE = 1; // 0x1
    field public static final java.lang.String EXTRA_EXTRA_INFO = "extraInfo";
    field public static final java.lang.String EXTRA_IS_FAILOVER = "isFailover";
    field public static final java.lang.String EXTRA_NETWORK = "android.net.extra.NETWORK";
    field public static final deprecated java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
    field public static final java.lang.String EXTRA_NETWORK_REQUEST = "android.net.extra.NETWORK_REQUEST";
    field public static final java.lang.String EXTRA_NETWORK_TYPE = "networkType";
    field public static final java.lang.String EXTRA_NO_CONNECTIVITY = "noConnectivity";
    field public static final java.lang.String EXTRA_OTHER_NETWORK_INFO = "otherNetwork";
    field public static final java.lang.String EXTRA_REASON = "reason";
    field public static final int TYPE_BLUETOOTH = 7; // 0x7
    field public static final int TYPE_DUMMY = 8; // 0x8
    field public static final int TYPE_ETHERNET = 9; // 0x9
    field public static final int TYPE_MOBILE = 0; // 0x0
    field public static final int TYPE_MOBILE_DUN = 4; // 0x4
    field public static final int TYPE_MOBILE_HIPRI = 5; // 0x5
    field public static final int TYPE_MOBILE_MMS = 2; // 0x2
    field public static final int TYPE_MOBILE_SUPL = 3; // 0x3
    field public static final int TYPE_VPN = 17; // 0x11
    field public static final int TYPE_WIFI = 1; // 0x1
    field public static final int TYPE_WIMAX = 6; // 0x6
  }

  public static class ConnectivityManager.NetworkCallback {
    ctor public ConnectivityManager.NetworkCallback();
    method public void onAvailable(android.net.Network);
    method public void onCapabilitiesChanged(android.net.Network, android.net.NetworkCapabilities);
    method public void onLinkPropertiesChanged(android.net.Network, android.net.LinkProperties);
    method public void onLosing(android.net.Network, int);
    method public void onLost(android.net.Network);
  }

  public static abstract interface ConnectivityManager.OnNetworkActiveListener {
    method public abstract void onNetworkActive();
  }

  public class Credentials {
    ctor public Credentials(int, int, int);
    method public int getGid();
    method public int getPid();
    method public int getUid();
  }

  public class DhcpInfo implements android.os.Parcelable {
    ctor public DhcpInfo();
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public int dns1;
    field public int dns2;
    field public int gateway;
    field public int ipAddress;
    field public int leaseDuration;
    field public int netmask;
    field public int serverAddress;
  }

  public final class IpPrefix implements android.os.Parcelable {
    method public int describeContents();
    method public java.net.InetAddress getAddress();
    method public int getPrefixLength();
    method public byte[] getRawAddress();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.IpPrefix> CREATOR;
  }

  public class LinkAddress implements android.os.Parcelable {
    method public int describeContents();
    method public java.net.InetAddress getAddress();
    method public int getFlags();
    method public int getPrefixLength();
    method public int getScope();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.LinkAddress> CREATOR;
  }

  public final class LinkProperties implements android.os.Parcelable {
    method public int describeContents();
    method public java.util.List<java.net.InetAddress> getDnsServers();
    method public java.lang.String getDomains();
    method public android.net.ProxyInfo getHttpProxy();
    method public java.lang.String getInterfaceName();
    method public java.util.List<android.net.LinkAddress> getLinkAddresses();
    method public java.util.List<android.net.RouteInfo> getRoutes();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.LinkProperties> CREATOR;
  }

  public class LocalServerSocket {
    ctor public LocalServerSocket(java.lang.String) throws java.io.IOException;
    ctor public LocalServerSocket(java.io.FileDescriptor) throws java.io.IOException;
    method public android.net.LocalSocket accept() throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public java.io.FileDescriptor getFileDescriptor();
    method public android.net.LocalSocketAddress getLocalSocketAddress();
  }

  public class LocalSocket implements java.io.Closeable {
    ctor public LocalSocket();
    ctor public LocalSocket(int);
    method public void bind(android.net.LocalSocketAddress) throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public void connect(android.net.LocalSocketAddress) throws java.io.IOException;
    method public void connect(android.net.LocalSocketAddress, int) throws java.io.IOException;
    method public java.io.FileDescriptor[] getAncillaryFileDescriptors() throws java.io.IOException;
    method public java.io.FileDescriptor getFileDescriptor();
    method public java.io.InputStream getInputStream() throws java.io.IOException;
    method public android.net.LocalSocketAddress getLocalSocketAddress();
    method public java.io.OutputStream getOutputStream() throws java.io.IOException;
    method public android.net.Credentials getPeerCredentials() throws java.io.IOException;
    method public int getReceiveBufferSize() throws java.io.IOException;
    method public android.net.LocalSocketAddress getRemoteSocketAddress();
    method public int getSendBufferSize() throws java.io.IOException;
    method public int getSoTimeout() throws java.io.IOException;
    method public synchronized boolean isBound();
    method public boolean isClosed();
    method public synchronized boolean isConnected();
    method public boolean isInputShutdown();
    method public boolean isOutputShutdown();
    method public void setFileDescriptorsForSend(java.io.FileDescriptor[]);
    method public void setReceiveBufferSize(int) throws java.io.IOException;
    method public void setSendBufferSize(int) throws java.io.IOException;
    method public void setSoTimeout(int) throws java.io.IOException;
    method public void shutdownInput() throws java.io.IOException;
    method public void shutdownOutput() throws java.io.IOException;
    field public static final int SOCKET_DGRAM = 1; // 0x1
    field public static final int SOCKET_SEQPACKET = 3; // 0x3
    field public static final int SOCKET_STREAM = 2; // 0x2
  }

  public class LocalSocketAddress {
    ctor public LocalSocketAddress(java.lang.String, android.net.LocalSocketAddress.Namespace);
    ctor public LocalSocketAddress(java.lang.String);
    method public java.lang.String getName();
    method public android.net.LocalSocketAddress.Namespace getNamespace();
  }

  public static final class LocalSocketAddress.Namespace extends java.lang.Enum {
    method public static android.net.LocalSocketAddress.Namespace valueOf(java.lang.String);
    method public static final android.net.LocalSocketAddress.Namespace[] values();
    enum_constant public static final android.net.LocalSocketAddress.Namespace ABSTRACT;
    enum_constant public static final android.net.LocalSocketAddress.Namespace FILESYSTEM;
    enum_constant public static final android.net.LocalSocketAddress.Namespace RESERVED;
  }

  public class MailTo {
    method public java.lang.String getBody();
    method public java.lang.String getCc();
    method public java.util.Map<java.lang.String, java.lang.String> getHeaders();
    method public java.lang.String getSubject();
    method public java.lang.String getTo();
    method public static boolean isMailTo(java.lang.String);
    method public static android.net.MailTo parse(java.lang.String) throws android.net.ParseException;
    field public static final java.lang.String MAILTO_SCHEME = "mailto:";
  }

  public class Network implements android.os.Parcelable {
    method public void bindSocket(java.net.DatagramSocket) throws java.io.IOException;
    method public void bindSocket(java.net.Socket) throws java.io.IOException;
    method public int describeContents();
    method public java.net.InetAddress[] getAllByName(java.lang.String) throws java.net.UnknownHostException;
    method public java.net.InetAddress getByName(java.lang.String) throws java.net.UnknownHostException;
    method public javax.net.SocketFactory getSocketFactory();
    method public java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException;
    method public java.net.URLConnection openConnection(java.net.URL, java.net.Proxy) throws java.io.IOException;
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.Network> CREATOR;
  }

  public final class NetworkCapabilities implements android.os.Parcelable {
    ctor public NetworkCapabilities(android.net.NetworkCapabilities);
    method public int describeContents();
    method public int getLinkDownstreamBandwidthKbps();
    method public int getLinkUpstreamBandwidthKbps();
    method public boolean hasCapability(int);
    method public boolean hasTransport(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.NetworkCapabilities> CREATOR;
    field public static final int NET_CAPABILITY_CBS = 5; // 0x5
    field public static final int NET_CAPABILITY_DUN = 2; // 0x2
    field public static final int NET_CAPABILITY_EIMS = 10; // 0xa
    field public static final int NET_CAPABILITY_FOTA = 3; // 0x3
    field public static final int NET_CAPABILITY_IA = 7; // 0x7
    field public static final int NET_CAPABILITY_IMS = 4; // 0x4
    field public static final int NET_CAPABILITY_INTERNET = 12; // 0xc
    field public static final int NET_CAPABILITY_MMS = 0; // 0x0
    field public static final int NET_CAPABILITY_NOT_METERED = 11; // 0xb
    field public static final int NET_CAPABILITY_NOT_RESTRICTED = 13; // 0xd
    field public static final int NET_CAPABILITY_NOT_VPN = 15; // 0xf
    field public static final int NET_CAPABILITY_RCS = 8; // 0x8
    field public static final int NET_CAPABILITY_SUPL = 1; // 0x1
    field public static final int NET_CAPABILITY_TRUSTED = 14; // 0xe
    field public static final int NET_CAPABILITY_WIFI_P2P = 6; // 0x6
    field public static final int NET_CAPABILITY_XCAP = 9; // 0x9
    field public static final int TRANSPORT_BLUETOOTH = 2; // 0x2
    field public static final int TRANSPORT_CELLULAR = 0; // 0x0
    field public static final int TRANSPORT_ETHERNET = 3; // 0x3
    field public static final int TRANSPORT_VPN = 4; // 0x4
    field public static final int TRANSPORT_WIFI = 1; // 0x1
  }

  public class NetworkInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.net.NetworkInfo.DetailedState getDetailedState();
    method public java.lang.String getExtraInfo();
    method public java.lang.String getReason();
    method public android.net.NetworkInfo.State getState();
    method public int getSubtype();
    method public java.lang.String getSubtypeName();
    method public int getType();
    method public java.lang.String getTypeName();
    method public boolean isAvailable();
    method public boolean isConnected();
    method public boolean isConnectedOrConnecting();
    method public boolean isFailover();
    method public boolean isRoaming();
    method public void writeToParcel(android.os.Parcel, int);
  }

  public static final class NetworkInfo.DetailedState extends java.lang.Enum {
    method public static android.net.NetworkInfo.DetailedState valueOf(java.lang.String);
    method public static final android.net.NetworkInfo.DetailedState[] values();
    enum_constant public static final android.net.NetworkInfo.DetailedState AUTHENTICATING;
    enum_constant public static final android.net.NetworkInfo.DetailedState BLOCKED;
    enum_constant public static final android.net.NetworkInfo.DetailedState CAPTIVE_PORTAL_CHECK;
    enum_constant public static final android.net.NetworkInfo.DetailedState CONNECTED;
    enum_constant public static final android.net.NetworkInfo.DetailedState CONNECTING;
    enum_constant public static final android.net.NetworkInfo.DetailedState DISCONNECTED;
    enum_constant public static final android.net.NetworkInfo.DetailedState DISCONNECTING;
    enum_constant public static final android.net.NetworkInfo.DetailedState FAILED;
    enum_constant public static final android.net.NetworkInfo.DetailedState IDLE;
    enum_constant public static final android.net.NetworkInfo.DetailedState OBTAINING_IPADDR;
    enum_constant public static final android.net.NetworkInfo.DetailedState SCANNING;
    enum_constant public static final android.net.NetworkInfo.DetailedState SUSPENDED;
    enum_constant public static final android.net.NetworkInfo.DetailedState VERIFYING_POOR_LINK;
  }

  public static final class NetworkInfo.State extends java.lang.Enum {
    method public static android.net.NetworkInfo.State valueOf(java.lang.String);
    method public static final android.net.NetworkInfo.State[] values();
    enum_constant public static final android.net.NetworkInfo.State CONNECTED;
    enum_constant public static final android.net.NetworkInfo.State CONNECTING;
    enum_constant public static final android.net.NetworkInfo.State DISCONNECTED;
    enum_constant public static final android.net.NetworkInfo.State DISCONNECTING;
    enum_constant public static final android.net.NetworkInfo.State SUSPENDED;
    enum_constant public static final android.net.NetworkInfo.State UNKNOWN;
  }

  public class NetworkRequest implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.NetworkRequest> CREATOR;
  }

  public static class NetworkRequest.Builder {
    ctor public NetworkRequest.Builder();
    method public android.net.NetworkRequest.Builder addCapability(int);
    method public android.net.NetworkRequest.Builder addTransportType(int);
    method public android.net.NetworkRequest build();
    method public android.net.NetworkRequest.Builder removeCapability(int);
    method public android.net.NetworkRequest.Builder removeTransportType(int);
    method public android.net.NetworkRequest.Builder setNetworkSpecifier(java.lang.String);
  }

  public class ParseException extends java.lang.RuntimeException {
    field public java.lang.String response;
  }

  public final class Proxy {
    ctor public Proxy();
    method public static final deprecated java.lang.String getDefaultHost();
    method public static final deprecated int getDefaultPort();
    method public static final deprecated java.lang.String getHost(android.content.Context);
    method public static final deprecated int getPort(android.content.Context);
    field public static final deprecated java.lang.String EXTRA_PROXY_INFO = "android.intent.extra.PROXY_INFO";
    field public static final java.lang.String PROXY_CHANGE_ACTION = "android.intent.action.PROXY_CHANGE";
  }

  public deprecated class ProxyInfo implements android.os.Parcelable {
    method public static android.net.ProxyInfo buildDirectProxy(java.lang.String, int);
    method public static android.net.ProxyInfo buildDirectProxy(java.lang.String, int, java.util.List<java.lang.String>);
    method public static android.net.ProxyInfo buildPacProxy(android.net.Uri);
    method public int describeContents();
    method public java.lang.String[] getExclusionList();
    method public java.lang.String getHost();
    method public android.net.Uri getPacFileUrl();
    method public int getPort();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.ProxyInfo> CREATOR;
  }

  public abstract class PskKeyManager {
    ctor public PskKeyManager();
    method public java.lang.String chooseClientKeyIdentity(java.lang.String, java.net.Socket);
    method public java.lang.String chooseClientKeyIdentity(java.lang.String, javax.net.ssl.SSLEngine);
    method public java.lang.String chooseServerKeyIdentityHint(java.net.Socket);
    method public java.lang.String chooseServerKeyIdentityHint(javax.net.ssl.SSLEngine);
    method public javax.crypto.SecretKey getKey(java.lang.String, java.lang.String, java.net.Socket);
    method public javax.crypto.SecretKey getKey(java.lang.String, java.lang.String, javax.net.ssl.SSLEngine);
    field public static final int MAX_IDENTITY_HINT_LENGTH_BYTES = 128; // 0x80
    field public static final int MAX_IDENTITY_LENGTH_BYTES = 128; // 0x80
    field public static final int MAX_KEY_LENGTH_BYTES = 256; // 0x100
  }

  public final class RouteInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.net.IpPrefix getDestination();
    method public java.net.InetAddress getGateway();
    method public java.lang.String getInterface();
    method public boolean isDefaultRoute();
    method public boolean matches(java.net.InetAddress);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.RouteInfo> CREATOR;
  }

  public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory {
    ctor public deprecated SSLCertificateSocketFactory(int);
    method public java.net.Socket createSocket(java.net.Socket, java.lang.String, int, boolean) throws java.io.IOException;
    method public java.net.Socket createSocket(java.net.InetAddress, int, java.net.InetAddress, int) throws java.io.IOException;
    method public java.net.Socket createSocket(java.net.InetAddress, int) throws java.io.IOException;
    method public java.net.Socket createSocket(java.lang.String, int, java.net.InetAddress, int) throws java.io.IOException;
    method public java.net.Socket createSocket(java.lang.String, int) throws java.io.IOException;
    method public static javax.net.SocketFactory getDefault(int);
    method public static javax.net.ssl.SSLSocketFactory getDefault(int, android.net.SSLSessionCache);
    method public java.lang.String[] getDefaultCipherSuites();
    method public static javax.net.ssl.SSLSocketFactory getInsecure(int, android.net.SSLSessionCache);
    method public byte[] getNpnSelectedProtocol(java.net.Socket);
    method public java.lang.String[] getSupportedCipherSuites();
    method public void setHostname(java.net.Socket, java.lang.String);
    method public void setKeyManagers(javax.net.ssl.KeyManager[]);
    method public void setNpnProtocols(byte[][]);
    method public void setTrustManagers(javax.net.ssl.TrustManager[]);
    method public void setUseSessionTickets(java.net.Socket, boolean);
  }

  public final class SSLSessionCache {
    ctor public SSLSessionCache(java.io.File) throws java.io.IOException;
    ctor public SSLSessionCache(android.content.Context);
  }

  public class TrafficStats {
    ctor public TrafficStats();
    method public static void clearThreadStatsTag();
    method public static long getMobileRxBytes();
    method public static long getMobileRxPackets();
    method public static long getMobileTxBytes();
    method public static long getMobileTxPackets();
    method public static int getThreadStatsTag();
    method public static long getTotalRxBytes();
    method public static long getTotalRxPackets();
    method public static long getTotalTxBytes();
    method public static long getTotalTxPackets();
    method public static long getUidRxBytes(int);
    method public static long getUidRxPackets(int);
    method public static deprecated long getUidTcpRxBytes(int);
    method public static deprecated long getUidTcpRxSegments(int);
    method public static deprecated long getUidTcpTxBytes(int);
    method public static deprecated long getUidTcpTxSegments(int);
    method public static long getUidTxBytes(int);
    method public static long getUidTxPackets(int);
    method public static deprecated long getUidUdpRxBytes(int);
    method public static deprecated long getUidUdpRxPackets(int);
    method public static deprecated long getUidUdpTxBytes(int);
    method public static deprecated long getUidUdpTxPackets(int);
    method public static void incrementOperationCount(int);
    method public static void incrementOperationCount(int, int);
    method public static void setThreadStatsTag(int);
    method public static void tagSocket(java.net.Socket) throws java.net.SocketException;
    method public static void untagSocket(java.net.Socket) throws java.net.SocketException;
    field public static final int UNSUPPORTED = -1; // 0xffffffff
  }

  public abstract class Uri implements java.lang.Comparable android.os.Parcelable {
    method public abstract android.net.Uri.Builder buildUpon();
    method public int compareTo(android.net.Uri);
    method public static java.lang.String decode(java.lang.String);
    method public static java.lang.String encode(java.lang.String);
    method public static java.lang.String encode(java.lang.String, java.lang.String);
    method public static android.net.Uri fromFile(java.io.File);
    method public static android.net.Uri fromParts(java.lang.String, java.lang.String, java.lang.String);
    method public abstract java.lang.String getAuthority();
    method public boolean getBooleanQueryParameter(java.lang.String, boolean);
    method public abstract java.lang.String getEncodedAuthority();
    method public abstract java.lang.String getEncodedFragment();
    method public abstract java.lang.String getEncodedPath();
    method public abstract java.lang.String getEncodedQuery();
    method public abstract java.lang.String getEncodedSchemeSpecificPart();
    method public abstract java.lang.String getEncodedUserInfo();
    method public abstract java.lang.String getFragment();
    method public abstract java.lang.String getHost();
    method public abstract java.lang.String getLastPathSegment();
    method public abstract java.lang.String getPath();
    method public abstract java.util.List<java.lang.String> getPathSegments();
    method public abstract int getPort();
    method public abstract java.lang.String getQuery();
    method public java.lang.String getQueryParameter(java.lang.String);
    method public java.util.Set<java.lang.String> getQueryParameterNames();
    method public java.util.List<java.lang.String> getQueryParameters(java.lang.String);
    method public abstract java.lang.String getScheme();
    method public abstract java.lang.String getSchemeSpecificPart();
    method public abstract java.lang.String getUserInfo();
    method public boolean isAbsolute();
    method public abstract boolean isHierarchical();
    method public boolean isOpaque();
    method public abstract boolean isRelative();
    method public android.net.Uri normalizeScheme();
    method public static android.net.Uri parse(java.lang.String);
    method public abstract java.lang.String toString();
    method public static android.net.Uri withAppendedPath(android.net.Uri, java.lang.String);
    method public static void writeToParcel(android.os.Parcel, android.net.Uri);
    field public static final android.os.Parcelable.Creator<android.net.Uri> CREATOR;
    field public static final android.net.Uri EMPTY;
  }

  public static final class Uri.Builder {
    ctor public Uri.Builder();
    method public android.net.Uri.Builder appendEncodedPath(java.lang.String);
    method public android.net.Uri.Builder appendPath(java.lang.String);
    method public android.net.Uri.Builder appendQueryParameter(java.lang.String, java.lang.String);
    method public android.net.Uri.Builder authority(java.lang.String);
    method public android.net.Uri build();
    method public android.net.Uri.Builder clearQuery();
    method public android.net.Uri.Builder encodedAuthority(java.lang.String);
    method public android.net.Uri.Builder encodedFragment(java.lang.String);
    method public android.net.Uri.Builder encodedOpaquePart(java.lang.String);
    method public android.net.Uri.Builder encodedPath(java.lang.String);
    method public android.net.Uri.Builder encodedQuery(java.lang.String);
    method public android.net.Uri.Builder fragment(java.lang.String);
    method public android.net.Uri.Builder opaquePart(java.lang.String);
    method public android.net.Uri.Builder path(java.lang.String);
    method public android.net.Uri.Builder query(java.lang.String);
    method public android.net.Uri.Builder scheme(java.lang.String);
  }

  public class UrlQuerySanitizer {
    ctor public UrlQuerySanitizer();
    ctor public UrlQuerySanitizer(java.lang.String);
    method protected void addSanitizedEntry(java.lang.String, java.lang.String);
    method protected void clear();
    method protected int decodeHexDigit(char);
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getAllButNulAndAngleBracketsLegal();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getAllButNulLegal();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getAllButWhitespaceLegal();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getAllIllegal();
    method public boolean getAllowUnregisteredParamaters();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getAmpAndSpaceLegal();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getAmpLegal();
    method public android.net.UrlQuerySanitizer.ValueSanitizer getEffectiveValueSanitizer(java.lang.String);
    method public java.util.List<android.net.UrlQuerySanitizer.ParameterValuePair> getParameterList();
    method public java.util.Set<java.lang.String> getParameterSet();
    method public boolean getPreferFirstRepeatedParameter();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getSpaceLegal();
    method public android.net.UrlQuerySanitizer.ValueSanitizer getUnregisteredParameterValueSanitizer();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getUrlAndSpaceLegal();
    method public static final android.net.UrlQuerySanitizer.ValueSanitizer getUrlLegal();
    method public java.lang.String getValue(java.lang.String);
    method public android.net.UrlQuerySanitizer.ValueSanitizer getValueSanitizer(java.lang.String);
    method public boolean hasParameter(java.lang.String);
    method protected boolean isHexDigit(char);
    method protected void parseEntry(java.lang.String, java.lang.String);
    method public void parseQuery(java.lang.String);
    method public void parseUrl(java.lang.String);
    method public void registerParameter(java.lang.String, android.net.UrlQuerySanitizer.ValueSanitizer);
    method public void registerParameters(java.lang.String[], android.net.UrlQuerySanitizer.ValueSanitizer);
    method public void setAllowUnregisteredParamaters(boolean);
    method public void setPreferFirstRepeatedParameter(boolean);
    method public void setUnregisteredParameterValueSanitizer(android.net.UrlQuerySanitizer.ValueSanitizer);
    method public java.lang.String unescape(java.lang.String);
  }

  public static class UrlQuerySanitizer.IllegalCharacterValueSanitizer implements android.net.UrlQuerySanitizer.ValueSanitizer {
    ctor public UrlQuerySanitizer.IllegalCharacterValueSanitizer(int);
    method public java.lang.String sanitize(java.lang.String);
    field public static final int ALL_BUT_NUL_AND_ANGLE_BRACKETS_LEGAL = 1439; // 0x59f
    field public static final int ALL_BUT_NUL_LEGAL = 1535; // 0x5ff
    field public static final int ALL_BUT_WHITESPACE_LEGAL = 1532; // 0x5fc
    field public static final int ALL_ILLEGAL = 0; // 0x0
    field public static final int ALL_OK = 2047; // 0x7ff
    field public static final int ALL_WHITESPACE_OK = 3; // 0x3
    field public static final int AMP_AND_SPACE_LEGAL = 129; // 0x81
    field public static final int AMP_LEGAL = 128; // 0x80
    field public static final int AMP_OK = 128; // 0x80
    field public static final int DQUOTE_OK = 8; // 0x8
    field public static final int GT_OK = 64; // 0x40
    field public static final int LT_OK = 32; // 0x20
    field public static final int NON_7_BIT_ASCII_OK = 4; // 0x4
    field public static final int NUL_OK = 512; // 0x200
    field public static final int OTHER_WHITESPACE_OK = 2; // 0x2
    field public static final int PCT_OK = 256; // 0x100
    field public static final int SCRIPT_URL_OK = 1024; // 0x400
    field public static final int SPACE_LEGAL = 1; // 0x1
    field public static final int SPACE_OK = 1; // 0x1
    field public static final int SQUOTE_OK = 16; // 0x10
    field public static final int URL_AND_SPACE_LEGAL = 405; // 0x195
    field public static final int URL_LEGAL = 404; // 0x194
  }

  public class UrlQuerySanitizer.ParameterValuePair {
    ctor public UrlQuerySanitizer.ParameterValuePair(java.lang.String, java.lang.String);
    field public java.lang.String mParameter;
    field public java.lang.String mValue;
  }

  public static abstract interface UrlQuerySanitizer.ValueSanitizer {
    method public abstract java.lang.String sanitize(java.lang.String);
  }

  public class VpnService extends android.app.Service {
    ctor public VpnService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onRevoke();
    method public static android.content.Intent prepare(android.content.Context);
    method public boolean protect(int);
    method public boolean protect(java.net.Socket);
    method public boolean protect(java.net.DatagramSocket);
    method public boolean setUnderlyingNetworks(android.net.Network[]);
    field public static final java.lang.String SERVICE_INTERFACE = "android.net.VpnService";
  }

  public class VpnService.Builder {
    ctor public VpnService.Builder();
    method public android.net.VpnService.Builder addAddress(java.net.InetAddress, int);
    method public android.net.VpnService.Builder addAddress(java.lang.String, int);
    method public android.net.VpnService.Builder addAllowedApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.net.VpnService.Builder addDisallowedApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.net.VpnService.Builder addDnsServer(java.net.InetAddress);
    method public android.net.VpnService.Builder addDnsServer(java.lang.String);
    method public android.net.VpnService.Builder addRoute(java.net.InetAddress, int);
    method public android.net.VpnService.Builder addRoute(java.lang.String, int);
    method public android.net.VpnService.Builder addSearchDomain(java.lang.String);
    method public android.net.VpnService.Builder allowBypass();
    method public android.net.VpnService.Builder allowFamily(int);
    method public android.os.ParcelFileDescriptor establish();
    method public android.net.VpnService.Builder setBlocking(boolean);
    method public android.net.VpnService.Builder setConfigureIntent(android.app.PendingIntent);
    method public android.net.VpnService.Builder setMtu(int);
    method public android.net.VpnService.Builder setSession(java.lang.String);
    method public android.net.VpnService.Builder setUnderlyingNetworks(android.net.Network[]);
  }

}

package android.net.http {

  public final class HttpResponseCache extends java.net.ResponseCache implements java.io.Closeable {
    method public void close() throws java.io.IOException;
    method public void delete() throws java.io.IOException;
    method public void flush();
    method public java.net.CacheResponse get(java.net.URI, java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>) throws java.io.IOException;
    method public int getHitCount();
    method public static android.net.http.HttpResponseCache getInstalled();
    method public int getNetworkCount();
    method public int getRequestCount();
    method public static synchronized android.net.http.HttpResponseCache install(java.io.File, long) throws java.io.IOException;
    method public long maxSize();
    method public java.net.CacheRequest put(java.net.URI, java.net.URLConnection) throws java.io.IOException;
    method public long size();
  }

  public class SslCertificate {
    ctor public deprecated SslCertificate(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    ctor public deprecated SslCertificate(java.lang.String, java.lang.String, java.util.Date, java.util.Date);
    ctor public SslCertificate(java.security.cert.X509Certificate);
    method public android.net.http.SslCertificate.DName getIssuedBy();
    method public android.net.http.SslCertificate.DName getIssuedTo();
    method public deprecated java.lang.String getValidNotAfter();
    method public java.util.Date getValidNotAfterDate();
    method public deprecated java.lang.String getValidNotBefore();
    method public java.util.Date getValidNotBeforeDate();
    method public static android.net.http.SslCertificate restoreState(android.os.Bundle);
    method public static android.os.Bundle saveState(android.net.http.SslCertificate);
  }

  public class SslCertificate.DName {
    ctor public SslCertificate.DName(java.lang.String);
    method public java.lang.String getCName();
    method public java.lang.String getDName();
    method public java.lang.String getOName();
    method public java.lang.String getUName();
  }

  public class SslError {
    ctor public deprecated SslError(int, android.net.http.SslCertificate);
    ctor public deprecated SslError(int, java.security.cert.X509Certificate);
    ctor public SslError(int, android.net.http.SslCertificate, java.lang.String);
    ctor public SslError(int, java.security.cert.X509Certificate, java.lang.String);
    method public boolean addError(int);
    method public android.net.http.SslCertificate getCertificate();
    method public int getPrimaryError();
    method public java.lang.String getUrl();
    method public boolean hasError(int);
    field public static final int SSL_DATE_INVALID = 4; // 0x4
    field public static final int SSL_EXPIRED = 1; // 0x1
    field public static final int SSL_IDMISMATCH = 2; // 0x2
    field public static final int SSL_INVALID = 5; // 0x5
    field public static final deprecated int SSL_MAX_ERROR = 6; // 0x6
    field public static final int SSL_NOTYETVALID = 0; // 0x0
    field public static final int SSL_UNTRUSTED = 3; // 0x3
  }

  public class X509TrustManagerExtensions {
    ctor public X509TrustManagerExtensions(javax.net.ssl.X509TrustManager) throws java.lang.IllegalArgumentException;
    method public java.util.List<java.security.cert.X509Certificate> checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.lang.String) throws java.security.cert.CertificateException;
    method public boolean isUserAddedCertificate(java.security.cert.X509Certificate);
  }

}

package android.net.nsd {

  public final class NsdManager {
    method public void discoverServices(java.lang.String, int, android.net.nsd.NsdManager.DiscoveryListener);
    method public void registerService(android.net.nsd.NsdServiceInfo, int, android.net.nsd.NsdManager.RegistrationListener);
    method public void resolveService(android.net.nsd.NsdServiceInfo, android.net.nsd.NsdManager.ResolveListener);
    method public void stopServiceDiscovery(android.net.nsd.NsdManager.DiscoveryListener);
    method public void unregisterService(android.net.nsd.NsdManager.RegistrationListener);
    field public static final java.lang.String ACTION_NSD_STATE_CHANGED = "android.net.nsd.STATE_CHANGED";
    field public static final java.lang.String EXTRA_NSD_STATE = "nsd_state";
    field public static final int FAILURE_ALREADY_ACTIVE = 3; // 0x3
    field public static final int FAILURE_INTERNAL_ERROR = 0; // 0x0
    field public static final int FAILURE_MAX_LIMIT = 4; // 0x4
    field public static final int NSD_STATE_DISABLED = 1; // 0x1
    field public static final int NSD_STATE_ENABLED = 2; // 0x2
    field public static final int PROTOCOL_DNS_SD = 1; // 0x1
  }

  public static abstract interface NsdManager.DiscoveryListener {
    method public abstract void onDiscoveryStarted(java.lang.String);
    method public abstract void onDiscoveryStopped(java.lang.String);
    method public abstract void onServiceFound(android.net.nsd.NsdServiceInfo);
    method public abstract void onServiceLost(android.net.nsd.NsdServiceInfo);
    method public abstract void onStartDiscoveryFailed(java.lang.String, int);
    method public abstract void onStopDiscoveryFailed(java.lang.String, int);
  }

  public static abstract interface NsdManager.RegistrationListener {
    method public abstract void onRegistrationFailed(android.net.nsd.NsdServiceInfo, int);
    method public abstract void onServiceRegistered(android.net.nsd.NsdServiceInfo);
    method public abstract void onServiceUnregistered(android.net.nsd.NsdServiceInfo);
    method public abstract void onUnregistrationFailed(android.net.nsd.NsdServiceInfo, int);
  }

  public static abstract interface NsdManager.ResolveListener {
    method public abstract void onResolveFailed(android.net.nsd.NsdServiceInfo, int);
    method public abstract void onServiceResolved(android.net.nsd.NsdServiceInfo);
  }

  public final class NsdServiceInfo implements android.os.Parcelable {
    ctor public NsdServiceInfo();
    method public int describeContents();
    method public java.util.Map<java.lang.String, byte[]> getAttributes();
    method public java.net.InetAddress getHost();
    method public int getPort();
    method public java.lang.String getServiceName();
    method public java.lang.String getServiceType();
    method public void removeAttribute(java.lang.String);
    method public void setAttribute(java.lang.String, java.lang.String);
    method public void setHost(java.net.InetAddress);
    method public void setPort(int);
    method public void setServiceName(java.lang.String);
    method public void setServiceType(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.nsd.NsdServiceInfo> CREATOR;
  }

}

package android.net.rtp {

  public class AudioCodec {
    method public static android.net.rtp.AudioCodec getCodec(int, java.lang.String, java.lang.String);
    method public static android.net.rtp.AudioCodec[] getCodecs();
    field public static final android.net.rtp.AudioCodec AMR;
    field public static final android.net.rtp.AudioCodec GSM;
    field public static final android.net.rtp.AudioCodec GSM_EFR;
    field public static final android.net.rtp.AudioCodec PCMA;
    field public static final android.net.rtp.AudioCodec PCMU;
    field public final java.lang.String fmtp;
    field public final java.lang.String rtpmap;
    field public final int type;
  }

  public class AudioGroup {
    ctor public AudioGroup();
    method public void clear();
    method public int getMode();
    method public android.net.rtp.AudioStream[] getStreams();
    method public void sendDtmf(int);
    method public void setMode(int);
    field public static final int MODE_ECHO_SUPPRESSION = 3; // 0x3
    field public static final int MODE_MUTED = 1; // 0x1
    field public static final int MODE_NORMAL = 2; // 0x2
    field public static final int MODE_ON_HOLD = 0; // 0x0
  }

  public class AudioStream extends android.net.rtp.RtpStream {
    ctor public AudioStream(java.net.InetAddress) throws java.net.SocketException;
    method public android.net.rtp.AudioCodec getCodec();
    method public int getDtmfType();
    method public android.net.rtp.AudioGroup getGroup();
    method public final boolean isBusy();
    method public void join(android.net.rtp.AudioGroup);
    method public void setCodec(android.net.rtp.AudioCodec);
    method public void setDtmfType(int);
  }

  public class RtpStream {
    method public void associate(java.net.InetAddress, int);
    method public java.net.InetAddress getLocalAddress();
    method public int getLocalPort();
    method public int getMode();
    method public java.net.InetAddress getRemoteAddress();
    method public int getRemotePort();
    method public boolean isBusy();
    method public void release();
    method public void setMode(int);
    field public static final int MODE_NORMAL = 0; // 0x0
    field public static final int MODE_RECEIVE_ONLY = 2; // 0x2
    field public static final int MODE_SEND_ONLY = 1; // 0x1
  }

}

package android.net.sip {

  public class SipAudioCall {
    ctor public SipAudioCall(android.content.Context, android.net.sip.SipProfile);
    method public void answerCall(int) throws android.net.sip.SipException;
    method public void attachCall(android.net.sip.SipSession, java.lang.String) throws android.net.sip.SipException;
    method public void close();
    method public void continueCall(int) throws android.net.sip.SipException;
    method public void endCall() throws android.net.sip.SipException;
    method public android.net.sip.SipProfile getLocalProfile();
    method public android.net.sip.SipProfile getPeerProfile();
    method public int getState();
    method public void holdCall(int) throws android.net.sip.SipException;
    method public boolean isInCall();
    method public boolean isMuted();
    method public boolean isOnHold();
    method public void makeCall(android.net.sip.SipProfile, android.net.sip.SipSession, int) throws android.net.sip.SipException;
    method public void sendDtmf(int);
    method public void sendDtmf(int, android.os.Message);
    method public void setListener(android.net.sip.SipAudioCall.Listener);
    method public void setListener(android.net.sip.SipAudioCall.Listener, boolean);
    method public void setSpeakerMode(boolean);
    method public void startAudio();
    method public void toggleMute();
  }

  public static class SipAudioCall.Listener {
    ctor public SipAudioCall.Listener();
    method public void onCallBusy(android.net.sip.SipAudioCall);
    method public void onCallEnded(android.net.sip.SipAudioCall);
    method public void onCallEstablished(android.net.sip.SipAudioCall);
    method public void onCallHeld(android.net.sip.SipAudioCall);
    method public void onCalling(android.net.sip.SipAudioCall);
    method public void onChanged(android.net.sip.SipAudioCall);
    method public void onError(android.net.sip.SipAudioCall, int, java.lang.String);
    method public void onReadyToCall(android.net.sip.SipAudioCall);
    method public void onRinging(android.net.sip.SipAudioCall, android.net.sip.SipProfile);
    method public void onRingingBack(android.net.sip.SipAudioCall);
  }

  public class SipErrorCode {
    method public static java.lang.String toString(int);
    field public static final int CLIENT_ERROR = -4; // 0xfffffffc
    field public static final int CROSS_DOMAIN_AUTHENTICATION = -11; // 0xfffffff5
    field public static final int DATA_CONNECTION_LOST = -10; // 0xfffffff6
    field public static final int INVALID_CREDENTIALS = -8; // 0xfffffff8
    field public static final int INVALID_REMOTE_URI = -6; // 0xfffffffa
    field public static final int IN_PROGRESS = -9; // 0xfffffff7
    field public static final int NO_ERROR = 0; // 0x0
    field public static final int PEER_NOT_REACHABLE = -7; // 0xfffffff9
    field public static final int SERVER_ERROR = -2; // 0xfffffffe
    field public static final int SERVER_UNREACHABLE = -12; // 0xfffffff4
    field public static final int SOCKET_ERROR = -1; // 0xffffffff
    field public static final int TIME_OUT = -5; // 0xfffffffb
    field public static final int TRANSACTION_TERMINTED = -3; // 0xfffffffd
  }

  public class SipException extends java.lang.Exception {
    ctor public SipException();
    ctor public SipException(java.lang.String);
    ctor public SipException(java.lang.String, java.lang.Throwable);
  }

  public class SipManager {
    method public void close(java.lang.String) throws android.net.sip.SipException;
    method public android.net.sip.SipSession createSipSession(android.net.sip.SipProfile, android.net.sip.SipSession.Listener) throws android.net.sip.SipException;
    method public static java.lang.String getCallId(android.content.Intent);
    method public static java.lang.String getOfferSessionDescription(android.content.Intent);
    method public android.net.sip.SipSession getSessionFor(android.content.Intent) throws android.net.sip.SipException;
    method public static boolean isApiSupported(android.content.Context);
    method public static boolean isIncomingCallIntent(android.content.Intent);
    method public boolean isOpened(java.lang.String) throws android.net.sip.SipException;
    method public boolean isRegistered(java.lang.String) throws android.net.sip.SipException;
    method public static boolean isSipWifiOnly(android.content.Context);
    method public static boolean isVoipSupported(android.content.Context);
    method public android.net.sip.SipAudioCall makeAudioCall(android.net.sip.SipProfile, android.net.sip.SipProfile, android.net.sip.SipAudioCall.Listener, int) throws android.net.sip.SipException;
    method public android.net.sip.SipAudioCall makeAudioCall(java.lang.String, java.lang.String, android.net.sip.SipAudioCall.Listener, int) throws android.net.sip.SipException;
    method public static android.net.sip.SipManager newInstance(android.content.Context);
    method public void open(android.net.sip.SipProfile) throws android.net.sip.SipException;
    method public void open(android.net.sip.SipProfile, android.app.PendingIntent, android.net.sip.SipRegistrationListener) throws android.net.sip.SipException;
    method public void register(android.net.sip.SipProfile, int, android.net.sip.SipRegistrationListener) throws android.net.sip.SipException;
    method public void setRegistrationListener(java.lang.String, android.net.sip.SipRegistrationListener) throws android.net.sip.SipException;
    method public android.net.sip.SipAudioCall takeAudioCall(android.content.Intent, android.net.sip.SipAudioCall.Listener) throws android.net.sip.SipException;
    method public void unregister(android.net.sip.SipProfile, android.net.sip.SipRegistrationListener) throws android.net.sip.SipException;
    field public static final java.lang.String EXTRA_CALL_ID = "android:sipCallID";
    field public static final java.lang.String EXTRA_OFFER_SD = "android:sipOfferSD";
    field public static final int INCOMING_CALL_RESULT_CODE = 101; // 0x65
  }

  public class SipProfile implements java.lang.Cloneable android.os.Parcelable java.io.Serializable {
    method public int describeContents();
    method public java.lang.String getAuthUserName();
    method public boolean getAutoRegistration();
    method public java.lang.String getDisplayName();
    method public java.lang.String getPassword();
    method public int getPort();
    method public java.lang.String getProfileName();
    method public java.lang.String getProtocol();
    method public java.lang.String getProxyAddress();
    method public boolean getSendKeepAlive();
    method public java.lang.String getSipDomain();
    method public java.lang.String getUriString();
    method public java.lang.String getUserName();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.sip.SipProfile> CREATOR;
  }

  public static class SipProfile.Builder {
    ctor public SipProfile.Builder(android.net.sip.SipProfile);
    ctor public SipProfile.Builder(java.lang.String) throws java.text.ParseException;
    ctor public SipProfile.Builder(java.lang.String, java.lang.String) throws java.text.ParseException;
    method public android.net.sip.SipProfile build();
    method public android.net.sip.SipProfile.Builder setAuthUserName(java.lang.String);
    method public android.net.sip.SipProfile.Builder setAutoRegistration(boolean);
    method public android.net.sip.SipProfile.Builder setDisplayName(java.lang.String);
    method public android.net.sip.SipProfile.Builder setOutboundProxy(java.lang.String);
    method public android.net.sip.SipProfile.Builder setPassword(java.lang.String);
    method public android.net.sip.SipProfile.Builder setPort(int) throws java.lang.IllegalArgumentException;
    method public android.net.sip.SipProfile.Builder setProfileName(java.lang.String);
    method public android.net.sip.SipProfile.Builder setProtocol(java.lang.String) throws java.lang.IllegalArgumentException;
    method public android.net.sip.SipProfile.Builder setSendKeepAlive(boolean);
  }

  public abstract interface SipRegistrationListener {
    method public abstract void onRegistering(java.lang.String);
    method public abstract void onRegistrationDone(java.lang.String, long);
    method public abstract void onRegistrationFailed(java.lang.String, int, java.lang.String);
  }

  public final class SipSession {
    method public void answerCall(java.lang.String, int);
    method public void changeCall(java.lang.String, int);
    method public void endCall();
    method public java.lang.String getCallId();
    method public java.lang.String getLocalIp();
    method public android.net.sip.SipProfile getLocalProfile();
    method public android.net.sip.SipProfile getPeerProfile();
    method public int getState();
    method public boolean isInCall();
    method public void makeCall(android.net.sip.SipProfile, java.lang.String, int);
    method public void register(int);
    method public void setListener(android.net.sip.SipSession.Listener);
    method public void unregister();
  }

  public static class SipSession.Listener {
    ctor public SipSession.Listener();
    method public void onCallBusy(android.net.sip.SipSession);
    method public void onCallChangeFailed(android.net.sip.SipSession, int, java.lang.String);
    method public void onCallEnded(android.net.sip.SipSession);
    method public void onCallEstablished(android.net.sip.SipSession, java.lang.String);
    method public void onCalling(android.net.sip.SipSession);
    method public void onError(android.net.sip.SipSession, int, java.lang.String);
    method public void onRegistering(android.net.sip.SipSession);
    method public void onRegistrationDone(android.net.sip.SipSession, int);
    method public void onRegistrationFailed(android.net.sip.SipSession, int, java.lang.String);
    method public void onRegistrationTimeout(android.net.sip.SipSession);
    method public void onRinging(android.net.sip.SipSession, android.net.sip.SipProfile, java.lang.String);
    method public void onRingingBack(android.net.sip.SipSession);
  }

  public static class SipSession.State {
    method public static java.lang.String toString(int);
    field public static final int DEREGISTERING = 2; // 0x2
    field public static final int INCOMING_CALL = 3; // 0x3
    field public static final int INCOMING_CALL_ANSWERING = 4; // 0x4
    field public static final int IN_CALL = 8; // 0x8
    field public static final int NOT_DEFINED = 101; // 0x65
    field public static final int OUTGOING_CALL = 5; // 0x5
    field public static final int OUTGOING_CALL_CANCELING = 7; // 0x7
    field public static final int OUTGOING_CALL_RING_BACK = 6; // 0x6
    field public static final int PINGING = 9; // 0x9
    field public static final int READY_TO_CALL = 0; // 0x0
    field public static final int REGISTERING = 1; // 0x1
  }

}

package android.net.wifi {

  public class ScanResult implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public java.lang.String BSSID;
    field public static final int CHANNEL_WIDTH_160MHZ = 3; // 0x3
    field public static final int CHANNEL_WIDTH_20MHZ = 0; // 0x0
    field public static final int CHANNEL_WIDTH_40MHZ = 1; // 0x1
    field public static final int CHANNEL_WIDTH_80MHZ = 2; // 0x2
    field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; // 0x4
    field public java.lang.String SSID;
    field public java.lang.String capabilities;
    field public int centerFreq0;
    field public int centerFreq1;
    field public int channelWidth;
    field public int frequency;
    field public boolean is80211McRTTResponder;
    field public int level;
    field public java.lang.String operatorFriendlyName;
    field public boolean passpointNetwork;
    field public long timestamp;
    field public java.lang.String venueName;
  }

  public final class SupplicantState extends java.lang.Enum implements android.os.Parcelable {
    method public int describeContents();
    method public static boolean isValidState(android.net.wifi.SupplicantState);
    method public static android.net.wifi.SupplicantState valueOf(java.lang.String);
    method public static final android.net.wifi.SupplicantState[] values();
    method public void writeToParcel(android.os.Parcel, int);
    enum_constant public static final android.net.wifi.SupplicantState ASSOCIATED;
    enum_constant public static final android.net.wifi.SupplicantState ASSOCIATING;
    enum_constant public static final android.net.wifi.SupplicantState AUTHENTICATING;
    enum_constant public static final android.net.wifi.SupplicantState COMPLETED;
    enum_constant public static final android.net.wifi.SupplicantState DISCONNECTED;
    enum_constant public static final android.net.wifi.SupplicantState DORMANT;
    enum_constant public static final android.net.wifi.SupplicantState FOUR_WAY_HANDSHAKE;
    enum_constant public static final android.net.wifi.SupplicantState GROUP_HANDSHAKE;
    enum_constant public static final android.net.wifi.SupplicantState INACTIVE;
    enum_constant public static final android.net.wifi.SupplicantState INTERFACE_DISABLED;
    enum_constant public static final android.net.wifi.SupplicantState INVALID;
    enum_constant public static final android.net.wifi.SupplicantState SCANNING;
    enum_constant public static final android.net.wifi.SupplicantState UNINITIALIZED;
  }

  public class WifiConfiguration implements android.os.Parcelable {
    ctor public WifiConfiguration();
    method public int describeContents();
    method public boolean isPasspoint();
    method public void writeToParcel(android.os.Parcel, int);
    field public java.lang.String BSSID;
    field public java.lang.String FQDN;
    field public java.lang.String SSID;
    field public java.util.BitSet allowedAuthAlgorithms;
    field public java.util.BitSet allowedGroupCiphers;
    field public java.util.BitSet allowedKeyManagement;
    field public java.util.BitSet allowedPairwiseCiphers;
    field public java.util.BitSet allowedProtocols;
    field public int apBand;
    field public int apChannel;
    field public android.net.wifi.WifiEnterpriseConfig enterpriseConfig;
    field public boolean hiddenSSID;
    field public int networkId;
    field public java.lang.String preSharedKey;
    field public int priority;
    field public java.lang.String providerFriendlyName;
    field public java.util.HashSet<java.lang.Long> roamingConsortiumIds;
    field public int status;
    field public java.lang.String[] wepKeys;
    field public int wepTxKeyIndex;
  }

  public static class WifiConfiguration.AuthAlgorithm {
    field public static final int LEAP = 2; // 0x2
    field public static final int OPEN = 0; // 0x0
    field public static final int SHARED = 1; // 0x1
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "auth_alg";
  }

  public static class WifiConfiguration.GroupCipher {
    field public static final int CCMP = 3; // 0x3
    field public static final int TKIP = 2; // 0x2
    field public static final int WEP104 = 1; // 0x1
    field public static final int WEP40 = 0; // 0x0
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "group";
  }

  public static class WifiConfiguration.KeyMgmt {
    field public static final int IEEE8021X = 3; // 0x3
    field public static final int NONE = 0; // 0x0
    field public static final int WPA_EAP = 2; // 0x2
    field public static final int WPA_PSK = 1; // 0x1
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "key_mgmt";
  }

  public static class WifiConfiguration.PairwiseCipher {
    field public static final int CCMP = 2; // 0x2
    field public static final int NONE = 0; // 0x0
    field public static final int TKIP = 1; // 0x1
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "pairwise";
  }

  public static class WifiConfiguration.Protocol {
    field public static final int RSN = 1; // 0x1
    field public static final int WPA = 0; // 0x0
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "proto";
  }

  public static class WifiConfiguration.Status {
    field public static final int CURRENT = 0; // 0x0
    field public static final int DISABLED = 1; // 0x1
    field public static final int ENABLED = 2; // 0x2
    field public static final java.lang.String[] strings;
  }

  public class WifiEnterpriseConfig implements android.os.Parcelable {
    ctor public WifiEnterpriseConfig();
    ctor public WifiEnterpriseConfig(android.net.wifi.WifiEnterpriseConfig);
    method public int describeContents();
    method public java.lang.String getAltSubjectMatch();
    method public java.lang.String getAnonymousIdentity();
    method public java.security.cert.X509Certificate getCaCertificate();
    method public java.security.cert.X509Certificate getClientCertificate();
    method public int getEapMethod();
    method public java.lang.String getIdentity();
    method public java.lang.String getPassword();
    method public int getPhase2Method();
    method public java.lang.String getPlmn();
    method public java.lang.String getRealm();
    method public deprecated java.lang.String getSubjectMatch();
    method public void setAltSubjectMatch(java.lang.String);
    method public void setAnonymousIdentity(java.lang.String);
    method public void setCaCertificate(java.security.cert.X509Certificate);
    method public void setClientKeyEntry(java.security.PrivateKey, java.security.cert.X509Certificate);
    method public void setEapMethod(int);
    method public void setIdentity(java.lang.String);
    method public void setPassword(java.lang.String);
    method public void setPhase2Method(int);
    method public void setPlmn(java.lang.String);
    method public void setRealm(java.lang.String);
    method public deprecated void setSubjectMatch(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.wifi.WifiEnterpriseConfig> CREATOR;
  }

  public static final class WifiEnterpriseConfig.Eap {
    field public static final int AKA = 5; // 0x5
    field public static final int AKA_PRIME = 6; // 0x6
    field public static final int NONE = -1; // 0xffffffff
    field public static final int PEAP = 0; // 0x0
    field public static final int PWD = 3; // 0x3
    field public static final int SIM = 4; // 0x4
    field public static final int TLS = 1; // 0x1
    field public static final int TTLS = 2; // 0x2
  }

  public static final class WifiEnterpriseConfig.Phase2 {
    field public static final int GTC = 4; // 0x4
    field public static final int MSCHAP = 2; // 0x2
    field public static final int MSCHAPV2 = 3; // 0x3
    field public static final int NONE = 0; // 0x0
    field public static final int PAP = 1; // 0x1
  }

  public class WifiInfo implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String getBSSID();
    method public static android.net.NetworkInfo.DetailedState getDetailedStateOf(android.net.wifi.SupplicantState);
    method public int getFrequency();
    method public boolean getHiddenSSID();
    method public int getIpAddress();
    method public int getLinkSpeed();
    method public java.lang.String getMacAddress();
    method public int getNetworkId();
    method public int getRssi();
    method public java.lang.String getSSID();
    method public android.net.wifi.SupplicantState getSupplicantState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String FREQUENCY_UNITS = "MHz";
    field public static final java.lang.String LINK_SPEED_UNITS = "Mbps";
  }

  public class WifiManager {
    method public int addNetwork(android.net.wifi.WifiConfiguration);
    method public static int calculateSignalLevel(int, int);
    method public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
    method public static int compareSignalLevel(int, int);
    method public android.net.wifi.WifiManager.MulticastLock createMulticastLock(java.lang.String);
    method public android.net.wifi.WifiManager.WifiLock createWifiLock(int, java.lang.String);
    method public android.net.wifi.WifiManager.WifiLock createWifiLock(java.lang.String);
    method public boolean disableNetwork(int);
    method public boolean disconnect();
    method public boolean enableNetwork(int, boolean);
    method public java.util.List<android.net.wifi.WifiConfiguration> getConfiguredNetworks();
    method public android.net.wifi.WifiInfo getConnectionInfo();
    method public android.net.DhcpInfo getDhcpInfo();
    method public java.util.List<android.net.wifi.ScanResult> getScanResults();
    method public int getWifiState();
    method public boolean is5GHzBandSupported();
    method public boolean isDeviceToApRttSupported();
    method public boolean isEnhancedPowerReportingSupported();
    method public boolean isP2pSupported();
    method public boolean isPreferredNetworkOffloadSupported();
    method public boolean isScanAlwaysAvailable();
    method public boolean isTdlsSupported();
    method public boolean isWifiEnabled();
    method public boolean pingSupplicant();
    method public boolean reassociate();
    method public boolean reconnect();
    method public boolean removeNetwork(int);
    method public boolean saveConfiguration();
    method public void setTdlsEnabled(java.net.InetAddress, boolean);
    method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean);
    method public boolean setWifiEnabled(boolean);
    method public boolean startScan();
    method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback);
    method public int updateNetwork(android.net.wifi.WifiConfiguration);
    field public static final java.lang.String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
    field public static final java.lang.String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE = "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
    field public static final int ERROR_AUTHENTICATING = 1; // 0x1
    field public static final java.lang.String EXTRA_BSSID = "bssid";
    field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
    field public static final java.lang.String EXTRA_NEW_RSSI = "newRssi";
    field public static final java.lang.String EXTRA_NEW_STATE = "newState";
    field public static final java.lang.String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
    field public static final java.lang.String EXTRA_SUPPLICANT_CONNECTED = "connected";
    field public static final java.lang.String EXTRA_SUPPLICANT_ERROR = "supplicantError";
    field public static final java.lang.String EXTRA_WIFI_INFO = "wifiInfo";
    field public static final java.lang.String EXTRA_WIFI_STATE = "wifi_state";
    field public static final java.lang.String NETWORK_IDS_CHANGED_ACTION = "android.net.wifi.NETWORK_IDS_CHANGED";
    field public static final java.lang.String NETWORK_STATE_CHANGED_ACTION = "android.net.wifi.STATE_CHANGE";
    field public static final java.lang.String RSSI_CHANGED_ACTION = "android.net.wifi.RSSI_CHANGED";
    field public static final java.lang.String SCAN_RESULTS_AVAILABLE_ACTION = "android.net.wifi.SCAN_RESULTS";
    field public static final java.lang.String SUPPLICANT_CONNECTION_CHANGE_ACTION = "android.net.wifi.supplicant.CONNECTION_CHANGE";
    field public static final java.lang.String SUPPLICANT_STATE_CHANGED_ACTION = "android.net.wifi.supplicant.STATE_CHANGE";
    field public static final int WIFI_MODE_FULL = 1; // 0x1
    field public static final int WIFI_MODE_FULL_HIGH_PERF = 3; // 0x3
    field public static final int WIFI_MODE_SCAN_ONLY = 2; // 0x2
    field public static final java.lang.String WIFI_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_STATE_CHANGED";
    field public static final int WIFI_STATE_DISABLED = 1; // 0x1
    field public static final int WIFI_STATE_DISABLING = 0; // 0x0
    field public static final int WIFI_STATE_ENABLED = 3; // 0x3
    field public static final int WIFI_STATE_ENABLING = 2; // 0x2
    field public static final int WIFI_STATE_UNKNOWN = 4; // 0x4
    field public static final int WPS_AUTH_FAILURE = 6; // 0x6
    field public static final int WPS_OVERLAP_ERROR = 3; // 0x3
    field public static final int WPS_TIMED_OUT = 7; // 0x7
    field public static final int WPS_TKIP_ONLY_PROHIBITED = 5; // 0x5
    field public static final int WPS_WEP_PROHIBITED = 4; // 0x4
  }

  public class WifiManager.MulticastLock {
    method public void acquire();
    method public boolean isHeld();
    method public void release();
    method public void setReferenceCounted(boolean);
  }

  public class WifiManager.WifiLock {
    method public void acquire();
    method public boolean isHeld();
    method public void release();
    method public void setReferenceCounted(boolean);
    method public void setWorkSource(android.os.WorkSource);
  }

  public static abstract class WifiManager.WpsCallback {
    ctor public WifiManager.WpsCallback();
    method public abstract void onFailed(int);
    method public abstract void onStarted(java.lang.String);
    method public abstract void onSucceeded();
  }

  public class WpsInfo implements android.os.Parcelable {
    ctor public WpsInfo();
    ctor public WpsInfo(android.net.wifi.WpsInfo);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public java.lang.String BSSID;
    field public static final android.os.Parcelable.Creator<android.net.wifi.WpsInfo> CREATOR;
    field public static final int DISPLAY = 1; // 0x1
    field public static final int INVALID = 4; // 0x4
    field public static final int KEYPAD = 2; // 0x2
    field public static final int LABEL = 3; // 0x3
    field public static final int PBC = 0; // 0x0
    field public java.lang.String pin;
    field public int setup;
  }

}

package android.net.wifi.p2p {

  public class WifiP2pConfig implements android.os.Parcelable {
    ctor public WifiP2pConfig();
    ctor public WifiP2pConfig(android.net.wifi.p2p.WifiP2pConfig);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pConfig> CREATOR;
    field public java.lang.String deviceAddress;
    field public int groupOwnerIntent;
    field public android.net.wifi.WpsInfo wps;
  }

  public class WifiP2pDevice implements android.os.Parcelable {
    ctor public WifiP2pDevice();
    ctor public WifiP2pDevice(android.net.wifi.p2p.WifiP2pDevice);
    method public int describeContents();
    method public boolean isGroupOwner();
    method public boolean isServiceDiscoveryCapable();
    method public boolean wpsDisplaySupported();
    method public boolean wpsKeypadSupported();
    method public boolean wpsPbcSupported();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int AVAILABLE = 3; // 0x3
    field public static final int CONNECTED = 0; // 0x0
    field public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pDevice> CREATOR;
    field public static final int FAILED = 2; // 0x2
    field public static final int INVITED = 1; // 0x1
    field public static final int UNAVAILABLE = 4; // 0x4
    field public java.lang.String deviceAddress;
    field public java.lang.String deviceName;
    field public java.lang.String primaryDeviceType;
    field public java.lang.String secondaryDeviceType;
    field public int status;
  }

  public class WifiP2pDeviceList implements android.os.Parcelable {
    ctor public WifiP2pDeviceList();
    ctor public WifiP2pDeviceList(android.net.wifi.p2p.WifiP2pDeviceList);
    method public int describeContents();
    method public android.net.wifi.p2p.WifiP2pDevice get(java.lang.String);
    method public java.util.Collection<android.net.wifi.p2p.WifiP2pDevice> getDeviceList();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pDeviceList> CREATOR;
  }

  public class WifiP2pGroup implements android.os.Parcelable {
    ctor public WifiP2pGroup();
    ctor public WifiP2pGroup(android.net.wifi.p2p.WifiP2pGroup);
    method public int describeContents();
    method public java.util.Collection<android.net.wifi.p2p.WifiP2pDevice> getClientList();
    method public java.lang.String getInterface();
    method public java.lang.String getNetworkName();
    method public android.net.wifi.p2p.WifiP2pDevice getOwner();
    method public java.lang.String getPassphrase();
    method public boolean isGroupOwner();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pGroup> CREATOR;
  }

  public class WifiP2pInfo implements android.os.Parcelable {
    ctor public WifiP2pInfo();
    ctor public WifiP2pInfo(android.net.wifi.p2p.WifiP2pInfo);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pInfo> CREATOR;
    field public boolean groupFormed;
    field public java.net.InetAddress groupOwnerAddress;
    field public boolean isGroupOwner;
  }

  public class WifiP2pManager {
    method public void addLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void addServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void cancelConnect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void clearLocalServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void clearServiceRequests(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void connect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pConfig, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void createGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void discoverPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void discoverServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public android.net.wifi.p2p.WifiP2pManager.Channel initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager.ChannelListener);
    method public void removeGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void removeLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void removeServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    method public void requestConnectionInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener);
    method public void requestGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.GroupInfoListener);
    method public void requestPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.PeerListListener);
    method public void setDnsSdResponseListeners(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.DnsSdServiceResponseListener, android.net.wifi.p2p.WifiP2pManager.DnsSdTxtRecordListener);
    method public void setServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ServiceResponseListener);
    method public void setUpnpServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.UpnpServiceResponseListener);
    method public void stopPeerDiscovery(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
    field public static final int BUSY = 2; // 0x2
    field public static final int ERROR = 0; // 0x0
    field public static final java.lang.String EXTRA_DISCOVERY_STATE = "discoveryState";
    field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
    field public static final java.lang.String EXTRA_P2P_DEVICE_LIST = "wifiP2pDeviceList";
    field public static final java.lang.String EXTRA_WIFI_P2P_DEVICE = "wifiP2pDevice";
    field public static final java.lang.String EXTRA_WIFI_P2P_GROUP = "p2pGroupInfo";
    field public static final java.lang.String EXTRA_WIFI_P2P_INFO = "wifiP2pInfo";
    field public static final java.lang.String EXTRA_WIFI_STATE = "wifi_p2p_state";
    field public static final int NO_SERVICE_REQUESTS = 3; // 0x3
    field public static final int P2P_UNSUPPORTED = 1; // 0x1
    field public static final java.lang.String WIFI_P2P_CONNECTION_CHANGED_ACTION = "android.net.wifi.p2p.CONNECTION_STATE_CHANGE";
    field public static final java.lang.String WIFI_P2P_DISCOVERY_CHANGED_ACTION = "android.net.wifi.p2p.DISCOVERY_STATE_CHANGE";
    field public static final int WIFI_P2P_DISCOVERY_STARTED = 2; // 0x2
    field public static final int WIFI_P2P_DISCOVERY_STOPPED = 1; // 0x1
    field public static final java.lang.String WIFI_P2P_PEERS_CHANGED_ACTION = "android.net.wifi.p2p.PEERS_CHANGED";
    field public static final java.lang.String WIFI_P2P_STATE_CHANGED_ACTION = "android.net.wifi.p2p.STATE_CHANGED";
    field public static final int WIFI_P2P_STATE_DISABLED = 1; // 0x1
    field public static final int WIFI_P2P_STATE_ENABLED = 2; // 0x2
    field public static final java.lang.String WIFI_P2P_THIS_DEVICE_CHANGED_ACTION = "android.net.wifi.p2p.THIS_DEVICE_CHANGED";
  }

  public static abstract interface WifiP2pManager.ActionListener {
    method public abstract void onFailure(int);
    method public abstract void onSuccess();
  }

  public static class WifiP2pManager.Channel {
  }

  public static abstract interface WifiP2pManager.ChannelListener {
    method public abstract void onChannelDisconnected();
  }

  public static abstract interface WifiP2pManager.ConnectionInfoListener {
    method public abstract void onConnectionInfoAvailable(android.net.wifi.p2p.WifiP2pInfo);
  }

  public static abstract interface WifiP2pManager.DnsSdServiceResponseListener {
    method public abstract void onDnsSdServiceAvailable(java.lang.String, java.lang.String, android.net.wifi.p2p.WifiP2pDevice);
  }

  public static abstract interface WifiP2pManager.DnsSdTxtRecordListener {
    method public abstract void onDnsSdTxtRecordAvailable(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, android.net.wifi.p2p.WifiP2pDevice);
  }

  public static abstract interface WifiP2pManager.GroupInfoListener {
    method public abstract void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup);
  }

  public static abstract interface WifiP2pManager.PeerListListener {
    method public abstract void onPeersAvailable(android.net.wifi.p2p.WifiP2pDeviceList);
  }

  public static abstract interface WifiP2pManager.ServiceResponseListener {
    method public abstract void onServiceAvailable(int, byte[], android.net.wifi.p2p.WifiP2pDevice);
  }

  public static abstract interface WifiP2pManager.UpnpServiceResponseListener {
    method public abstract void onUpnpServiceAvailable(java.util.List<java.lang.String>, android.net.wifi.p2p.WifiP2pDevice);
  }

}

package android.net.wifi.p2p.nsd {

  public class WifiP2pDnsSdServiceInfo extends android.net.wifi.p2p.nsd.WifiP2pServiceInfo {
    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo newInstance(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
  }

  public class WifiP2pDnsSdServiceRequest extends android.net.wifi.p2p.nsd.WifiP2pServiceRequest {
    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance();
    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance(java.lang.String);
    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance(java.lang.String, java.lang.String);
  }

  public class WifiP2pServiceInfo implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int SERVICE_TYPE_ALL = 0; // 0x0
    field public static final int SERVICE_TYPE_BONJOUR = 1; // 0x1
    field public static final int SERVICE_TYPE_UPNP = 2; // 0x2
    field public static final int SERVICE_TYPE_VENDOR_SPECIFIC = 255; // 0xff
  }

  public class WifiP2pServiceRequest implements android.os.Parcelable {
    method public int describeContents();
    method public static android.net.wifi.p2p.nsd.WifiP2pServiceRequest newInstance(int, java.lang.String);
    method public static android.net.wifi.p2p.nsd.WifiP2pServiceRequest newInstance(int);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class WifiP2pUpnpServiceInfo extends android.net.wifi.p2p.nsd.WifiP2pServiceInfo {
    method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceInfo newInstance(java.lang.String, java.lang.String, java.util.List<java.lang.String>);
  }

  public class WifiP2pUpnpServiceRequest extends android.net.wifi.p2p.nsd.WifiP2pServiceRequest {
    method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceRequest newInstance();
    method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceRequest newInstance(java.lang.String);
  }

}

package android.nfc {

  public class FormatException extends java.lang.Exception {
    ctor public FormatException();
    ctor public FormatException(java.lang.String);
    ctor public FormatException(java.lang.String, java.lang.Throwable);
  }

  public final class NdefMessage implements android.os.Parcelable {
    ctor public NdefMessage(byte[]) throws android.nfc.FormatException;
    ctor public NdefMessage(android.nfc.NdefRecord, android.nfc.NdefRecord...);
    ctor public NdefMessage(android.nfc.NdefRecord[]);
    method public int describeContents();
    method public int getByteArrayLength();
    method public android.nfc.NdefRecord[] getRecords();
    method public byte[] toByteArray();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.nfc.NdefMessage> CREATOR;
  }

  public final class NdefRecord implements android.os.Parcelable {
    ctor public NdefRecord(short, byte[], byte[], byte[]);
    ctor public deprecated NdefRecord(byte[]) throws android.nfc.FormatException;
    method public static android.nfc.NdefRecord createApplicationRecord(java.lang.String);
    method public static android.nfc.NdefRecord createExternal(java.lang.String, java.lang.String, byte[]);
    method public static android.nfc.NdefRecord createMime(java.lang.String, byte[]);
    method public static android.nfc.NdefRecord createTextRecord(java.lang.String, java.lang.String);
    method public static android.nfc.NdefRecord createUri(android.net.Uri);
    method public static android.nfc.NdefRecord createUri(java.lang.String);
    method public int describeContents();
    method public byte[] getId();
    method public byte[] getPayload();
    method public short getTnf();
    method public byte[] getType();
    method public deprecated byte[] toByteArray();
    method public java.lang.String toMimeType();
    method public android.net.Uri toUri();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.nfc.NdefRecord> CREATOR;
    field public static final byte[] RTD_ALTERNATIVE_CARRIER;
    field public static final byte[] RTD_HANDOVER_CARRIER;
    field public static final byte[] RTD_HANDOVER_REQUEST;
    field public static final byte[] RTD_HANDOVER_SELECT;
    field public static final byte[] RTD_SMART_POSTER;
    field public static final byte[] RTD_TEXT;
    field public static final byte[] RTD_URI;
    field public static final short TNF_ABSOLUTE_URI = 3; // 0x3
    field public static final short TNF_EMPTY = 0; // 0x0
    field public static final short TNF_EXTERNAL_TYPE = 4; // 0x4
    field public static final short TNF_MIME_MEDIA = 2; // 0x2
    field public static final short TNF_UNCHANGED = 6; // 0x6
    field public static final short TNF_UNKNOWN = 5; // 0x5
    field public static final short TNF_WELL_KNOWN = 1; // 0x1
  }

  public final class NfcAdapter {
    method public void disableForegroundDispatch(android.app.Activity);
    method public deprecated void disableForegroundNdefPush(android.app.Activity);
    method public void disableReaderMode(android.app.Activity);
    method public void enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], java.lang.String[][]);
    method public deprecated void enableForegroundNdefPush(android.app.Activity, android.nfc.NdefMessage);
    method public void enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle);
    method public static android.nfc.NfcAdapter getDefaultAdapter(android.content.Context);
    method public boolean invokeBeam(android.app.Activity);
    method public boolean isEnabled();
    method public boolean isNdefPushEnabled();
    method public void setBeamPushUris(android.net.Uri[], android.app.Activity);
    method public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity);
    method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...);
    method public void setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...);
    method public void setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...);
    field public static final java.lang.String ACTION_ADAPTER_STATE_CHANGED = "android.nfc.action.ADAPTER_STATE_CHANGED";
    field public static final java.lang.String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED";
    field public static final java.lang.String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED";
    field public static final java.lang.String ACTION_TECH_DISCOVERED = "android.nfc.action.TECH_DISCOVERED";
    field public static final java.lang.String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE";
    field public static final java.lang.String EXTRA_ID = "android.nfc.extra.ID";
    field public static final java.lang.String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES";
    field public static final java.lang.String EXTRA_READER_PRESENCE_CHECK_DELAY = "presence";
    field public static final java.lang.String EXTRA_TAG = "android.nfc.extra.TAG";
    field public static final int FLAG_READER_NFC_A = 1; // 0x1
    field public static final int FLAG_READER_NFC_B = 2; // 0x2
    field public static final int FLAG_READER_NFC_BARCODE = 16; // 0x10
    field public static final int FLAG_READER_NFC_F = 4; // 0x4
    field public static final int FLAG_READER_NFC_V = 8; // 0x8
    field public static final int FLAG_READER_NO_PLATFORM_SOUNDS = 256; // 0x100
    field public static final int FLAG_READER_SKIP_NDEF_CHECK = 128; // 0x80
    field public static final int STATE_OFF = 1; // 0x1
    field public static final int STATE_ON = 3; // 0x3
    field public static final int STATE_TURNING_OFF = 4; // 0x4
    field public static final int STATE_TURNING_ON = 2; // 0x2
  }

  public static abstract interface NfcAdapter.CreateBeamUrisCallback {
    method public abstract android.net.Uri[] createBeamUris(android.nfc.NfcEvent);
  }

  public static abstract interface NfcAdapter.CreateNdefMessageCallback {
    method public abstract android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent);
  }

  public static abstract interface NfcAdapter.OnNdefPushCompleteCallback {
    method public abstract void onNdefPushComplete(android.nfc.NfcEvent);
  }

  public static abstract interface NfcAdapter.ReaderCallback {
    method public abstract void onTagDiscovered(android.nfc.Tag);
  }

  public final class NfcEvent {
    field public final android.nfc.NfcAdapter nfcAdapter;
  }

  public final class NfcManager {
    method public android.nfc.NfcAdapter getDefaultAdapter();
  }

  public final class Tag implements android.os.Parcelable {
    method public int describeContents();
    method public byte[] getId();
    method public java.lang.String[] getTechList();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.nfc.Tag> CREATOR;
  }

  public class TagLostException extends java.io.IOException {
    ctor public TagLostException();
    ctor public TagLostException(java.lang.String);
  }

}

package android.nfc.cardemulation {

  public final class CardEmulation {
    method public boolean categoryAllowsForegroundPreference(java.lang.String);
    method public java.util.List<java.lang.String> getAidsForService(android.content.ComponentName, java.lang.String);
    method public static synchronized android.nfc.cardemulation.CardEmulation getInstance(android.nfc.NfcAdapter);
    method public int getSelectionModeForCategory(java.lang.String);
    method public boolean isDefaultServiceForAid(android.content.ComponentName, java.lang.String);
    method public boolean isDefaultServiceForCategory(android.content.ComponentName, java.lang.String);
    method public boolean registerAidsForService(android.content.ComponentName, java.lang.String, java.util.List<java.lang.String>);
    method public boolean removeAidsForService(android.content.ComponentName, java.lang.String);
    method public boolean setPreferredService(android.app.Activity, android.content.ComponentName);
    method public boolean supportsAidPrefixRegistration();
    method public boolean unsetPreferredService(android.app.Activity);
    field public static final java.lang.String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT";
    field public static final java.lang.String CATEGORY_OTHER = "other";
    field public static final java.lang.String CATEGORY_PAYMENT = "payment";
    field public static final java.lang.String EXTRA_CATEGORY = "category";
    field public static final java.lang.String EXTRA_SERVICE_COMPONENT = "component";
    field public static final int SELECTION_MODE_ALWAYS_ASK = 1; // 0x1
    field public static final int SELECTION_MODE_ASK_IF_CONFLICT = 2; // 0x2
    field public static final int SELECTION_MODE_PREFER_DEFAULT = 0; // 0x0
  }

  public abstract class HostApduService extends android.app.Service {
    ctor public HostApduService();
    method public final void notifyUnhandled();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract void onDeactivated(int);
    method public abstract byte[] processCommandApdu(byte[], android.os.Bundle);
    method public final void sendResponseApdu(byte[]);
    field public static final int DEACTIVATION_DESELECTED = 1; // 0x1
    field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0
    field public static final java.lang.String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_APDU_SERVICE";
    field public static final java.lang.String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service";
  }

  public abstract class OffHostApduService extends android.app.Service {
    ctor public OffHostApduService();
    method public abstract android.os.IBinder onBind(android.content.Intent);
    field public static final java.lang.String SERVICE_INTERFACE = "android.nfc.cardemulation.action.OFF_HOST_APDU_SERVICE";
    field public static final java.lang.String SERVICE_META_DATA = "android.nfc.cardemulation.off_host_apdu_service";
  }

}

package android.nfc.tech {

   abstract class BasicTagTechnology implements android.nfc.tech.TagTechnology {
    method public void close() throws java.io.IOException;
    method public void connect() throws java.io.IOException;
    method public android.nfc.Tag getTag();
    method public boolean isConnected();
  }

  public final class IsoDep extends android.nfc.tech.BasicTagTechnology {
    method public static android.nfc.tech.IsoDep get(android.nfc.Tag);
    method public byte[] getHiLayerResponse();
    method public byte[] getHistoricalBytes();
    method public int getMaxTransceiveLength();
    method public int getTimeout();
    method public boolean isExtendedLengthApduSupported();
    method public void setTimeout(int);
    method public byte[] transceive(byte[]) throws java.io.IOException;
  }

  public final class MifareClassic extends android.nfc.tech.BasicTagTechnology {
    method public boolean authenticateSectorWithKeyA(int, byte[]) throws java.io.IOException;
    method public boolean authenticateSectorWithKeyB(int, byte[]) throws java.io.IOException;
    method public int blockToSector(int);
    method public void decrement(int, int) throws java.io.IOException;
    method public static android.nfc.tech.MifareClassic get(android.nfc.Tag);
    method public int getBlockCount();
    method public int getBlockCountInSector(int);
    method public int getMaxTransceiveLength();
    method public int getSectorCount();
    method public int getSize();
    method public int getTimeout();
    method public int getType();
    method public void increment(int, int) throws java.io.IOException;
    method public byte[] readBlock(int) throws java.io.IOException;
    method public void restore(int) throws java.io.IOException;
    method public int sectorToBlock(int);
    method public void setTimeout(int);
    method public byte[] transceive(byte[]) throws java.io.IOException;
    method public void transfer(int) throws java.io.IOException;
    method public void writeBlock(int, byte[]) throws java.io.IOException;
    field public static final int BLOCK_SIZE = 16; // 0x10
    field public static final byte[] KEY_DEFAULT;
    field public static final byte[] KEY_MIFARE_APPLICATION_DIRECTORY;
    field public static final byte[] KEY_NFC_FORUM;
    field public static final int SIZE_1K = 1024; // 0x400
    field public static final int SIZE_2K = 2048; // 0x800
    field public static final int SIZE_4K = 4096; // 0x1000
    field public static final int SIZE_MINI = 320; // 0x140
    field public static final int TYPE_CLASSIC = 0; // 0x0
    field public static final int TYPE_PLUS = 1; // 0x1
    field public static final int TYPE_PRO = 2; // 0x2
    field public static final int TYPE_UNKNOWN = -1; // 0xffffffff
  }

  public final class MifareUltralight extends android.nfc.tech.BasicTagTechnology {
    method public static android.nfc.tech.MifareUltralight get(android.nfc.Tag);
    method public int getMaxTransceiveLength();
    method public int getTimeout();
    method public int getType();
    method public byte[] readPages(int) throws java.io.IOException;
    method public void setTimeout(int);
    method public byte[] transceive(byte[]) throws java.io.IOException;
    method public void writePage(int, byte[]) throws java.io.IOException;
    field public static final int PAGE_SIZE = 4; // 0x4
    field public static final int TYPE_ULTRALIGHT = 1; // 0x1
    field public static final int TYPE_ULTRALIGHT_C = 2; // 0x2
    field public static final int TYPE_UNKNOWN = -1; // 0xffffffff
  }

  public final class Ndef extends android.nfc.tech.BasicTagTechnology {
    method public boolean canMakeReadOnly();
    method public static android.nfc.tech.Ndef get(android.nfc.Tag);
    method public android.nfc.NdefMessage getCachedNdefMessage();
    method public int getMaxSize();
    method public android.nfc.NdefMessage getNdefMessage() throws android.nfc.FormatException, java.io.IOException;
    method public java.lang.String getType();
    method public boolean isWritable();
    method public boolean makeReadOnly() throws java.io.IOException;
    method public void writeNdefMessage(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException;
    field public static final java.lang.String MIFARE_CLASSIC = "com.nxp.ndef.mifareclassic";
    field public static final java.lang.String NFC_FORUM_TYPE_1 = "org.nfcforum.ndef.type1";
    field public static final java.lang.String NFC_FORUM_TYPE_2 = "org.nfcforum.ndef.type2";
    field public static final java.lang.String NFC_FORUM_TYPE_3 = "org.nfcforum.ndef.type3";
    field public static final java.lang.String NFC_FORUM_TYPE_4 = "org.nfcforum.ndef.type4";
  }

  public final class NdefFormatable extends android.nfc.tech.BasicTagTechnology {
    method public void format(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException;
    method public void formatReadOnly(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException;
    method public static android.nfc.tech.NdefFormatable get(android.nfc.Tag);
  }

  public final class NfcA extends android.nfc.tech.BasicTagTechnology {
    method public static android.nfc.tech.NfcA get(android.nfc.Tag);
    method public byte[] getAtqa();
    method public int getMaxTransceiveLength();
    method public short getSak();
    method public int getTimeout();
    method public void setTimeout(int);
    method public byte[] transceive(byte[]) throws java.io.IOException;
  }

  public final class NfcB extends android.nfc.tech.BasicTagTechnology {
    method public static android.nfc.tech.NfcB get(android.nfc.Tag);
    method public byte[] getApplicationData();
    method public int getMaxTransceiveLength();
    method public byte[] getProtocolInfo();
    method public byte[] transceive(byte[]) throws java.io.IOException;
  }

  public final class NfcBarcode extends android.nfc.tech.BasicTagTechnology {
    method public static android.nfc.tech.NfcBarcode get(android.nfc.Tag);
    method public byte[] getBarcode();
    method public int getType();
    field public static final int TYPE_KOVIO = 1; // 0x1
    field public static final int TYPE_UNKNOWN = -1; // 0xffffffff
  }

  public final class NfcF extends android.nfc.tech.BasicTagTechnology {
    method public static android.nfc.tech.NfcF get(android.nfc.Tag);
    method public byte[] getManufacturer();
    method public int getMaxTransceiveLength();
    method public byte[] getSystemCode();
    method public int getTimeout();
    method public void setTimeout(int);
    method public byte[] transceive(byte[]) throws java.io.IOException;
  }

  public final class NfcV extends android.nfc.tech.BasicTagTechnology {
    method public static android.nfc.tech.NfcV get(android.nfc.Tag);
    method public byte getDsfId();
    method public int getMaxTransceiveLength();
    method public byte getResponseFlags();
    method public byte[] transceive(byte[]) throws java.io.IOException;
  }

  public abstract interface TagTechnology implements java.io.Closeable {
    method public abstract void close() throws java.io.IOException;
    method public abstract void connect() throws java.io.IOException;
    method public abstract android.nfc.Tag getTag();
    method public abstract boolean isConnected();
  }

}

package android.opengl {

  public class EGL14 {
    ctor public EGL14();
    method public static boolean eglBindAPI(int);
    method public static boolean eglBindTexImage(android.opengl.EGLDisplay, android.opengl.EGLSurface, int);
    method public static boolean eglChooseConfig(android.opengl.EGLDisplay, int[], int, android.opengl.EGLConfig[], int, int, int[], int);
    method public static boolean eglCopyBuffers(android.opengl.EGLDisplay, android.opengl.EGLSurface, int);
    method public static android.opengl.EGLContext eglCreateContext(android.opengl.EGLDisplay, android.opengl.EGLConfig, android.opengl.EGLContext, int[], int);
    method public static android.opengl.EGLSurface eglCreatePbufferFromClientBuffer(android.opengl.EGLDisplay, int, int, android.opengl.EGLConfig, int[], int);
    method public static android.opengl.EGLSurface eglCreatePbufferSurface(android.opengl.EGLDisplay, android.opengl.EGLConfig, int[], int);
    method public static android.opengl.EGLSurface eglCreatePixmapSurface(android.opengl.EGLDisplay, android.opengl.EGLConfig, int, int[], int);
    method public static android.opengl.EGLSurface eglCreateWindowSurface(android.opengl.EGLDisplay, android.opengl.EGLConfig, java.lang.Object, int[], int);
    method public static boolean eglDestroyContext(android.opengl.EGLDisplay, android.opengl.EGLContext);
    method public static boolean eglDestroySurface(android.opengl.EGLDisplay, android.opengl.EGLSurface);
    method public static boolean eglGetConfigAttrib(android.opengl.EGLDisplay, android.opengl.EGLConfig, int, int[], int);
    method public static boolean eglGetConfigs(android.opengl.EGLDisplay, android.opengl.EGLConfig[], int, int, int[], int);
    method public static android.opengl.EGLContext eglGetCurrentContext();
    method public static android.opengl.EGLDisplay eglGetCurrentDisplay();
    method public static android.opengl.EGLSurface eglGetCurrentSurface(int);
    method public static android.opengl.EGLDisplay eglGetDisplay(int);
    method public static int eglGetError();
    method public static boolean eglInitialize(android.opengl.EGLDisplay, int[], int, int[], int);
    method public static boolean eglMakeCurrent(android.opengl.EGLDisplay, android.opengl.EGLSurface, android.opengl.EGLSurface, android.opengl.EGLContext);
    method public static int eglQueryAPI();
    method public static boolean eglQueryContext(android.opengl.EGLDisplay, android.opengl.EGLContext, int, int[], int);
    method public static java.lang.String eglQueryString(android.opengl.EGLDisplay, int);
    method public static boolean eglQuerySurface(android.opengl.EGLDisplay, android.opengl.EGLSurface, int, int[], int);
    method public static boolean eglReleaseTexImage(android.opengl.EGLDisplay, android.opengl.EGLSurface, int);
    method public static boolean eglReleaseThread();
    method public static boolean eglSurfaceAttrib(android.opengl.EGLDisplay, android.opengl.EGLSurface, int, int);
    method public static boolean eglSwapBuffers(android.opengl.EGLDisplay, android.opengl.EGLSurface);
    method public static boolean eglSwapInterval(android.opengl.EGLDisplay, int);
    method public static boolean eglTerminate(android.opengl.EGLDisplay);
    method public static boolean eglWaitClient();
    method public static boolean eglWaitGL();
    method public static boolean eglWaitNative(int);
    field public static final int EGL_ALPHA_MASK_SIZE = 12350; // 0x303e
    field public static final int EGL_ALPHA_SIZE = 12321; // 0x3021
    field public static final int EGL_BACK_BUFFER = 12420; // 0x3084
    field public static final int EGL_BAD_ACCESS = 12290; // 0x3002
    field public static final int EGL_BAD_ALLOC = 12291; // 0x3003
    field public static final int EGL_BAD_ATTRIBUTE = 12292; // 0x3004
    field public static final int EGL_BAD_CONFIG = 12293; // 0x3005
    field public static final int EGL_BAD_CONTEXT = 12294; // 0x3006
    field public static final int EGL_BAD_CURRENT_SURFACE = 12295; // 0x3007
    field public static final int EGL_BAD_DISPLAY = 12296; // 0x3008
    field public static final int EGL_BAD_MATCH = 12297; // 0x3009
    field public static final int EGL_BAD_NATIVE_PIXMAP = 12298; // 0x300a
    field public static final int EGL_BAD_NATIVE_WINDOW = 12299; // 0x300b
    field public static final int EGL_BAD_PARAMETER = 12300; // 0x300c
    field public static final int EGL_BAD_SURFACE = 12301; // 0x300d
    field public static final int EGL_BIND_TO_TEXTURE_RGB = 12345; // 0x3039
    field public static final int EGL_BIND_TO_TEXTURE_RGBA = 12346; // 0x303a
    field public static final int EGL_BLUE_SIZE = 12322; // 0x3022
    field public static final int EGL_BUFFER_DESTROYED = 12437; // 0x3095
    field public static final int EGL_BUFFER_PRESERVED = 12436; // 0x3094
    field public static final int EGL_BUFFER_SIZE = 12320; // 0x3020
    field public static final int EGL_CLIENT_APIS = 12429; // 0x308d
    field public static final int EGL_COLOR_BUFFER_TYPE = 12351; // 0x303f
    field public static final int EGL_CONFIG_CAVEAT = 12327; // 0x3027
    field public static final int EGL_CONFIG_ID = 12328; // 0x3028
    field public static final int EGL_CONFORMANT = 12354; // 0x3042
    field public static final int EGL_CONTEXT_CLIENT_TYPE = 12439; // 0x3097
    field public static final int EGL_CONTEXT_CLIENT_VERSION = 12440; // 0x3098
    field public static final int EGL_CONTEXT_LOST = 12302; // 0x300e
    field public static final int EGL_CORE_NATIVE_ENGINE = 12379; // 0x305b
    field public static final int EGL_DEFAULT_DISPLAY = 0; // 0x0
    field public static final int EGL_DEPTH_SIZE = 12325; // 0x3025
    field public static final int EGL_DISPLAY_SCALING = 10000; // 0x2710
    field public static final int EGL_DRAW = 12377; // 0x3059
    field public static final int EGL_EXTENSIONS = 12373; // 0x3055
    field public static final int EGL_FALSE = 0; // 0x0
    field public static final int EGL_GREEN_SIZE = 12323; // 0x3023
    field public static final int EGL_HEIGHT = 12374; // 0x3056
    field public static final int EGL_HORIZONTAL_RESOLUTION = 12432; // 0x3090
    field public static final int EGL_LARGEST_PBUFFER = 12376; // 0x3058
    field public static final int EGL_LEVEL = 12329; // 0x3029
    field public static final int EGL_LUMINANCE_BUFFER = 12431; // 0x308f
    field public static final int EGL_LUMINANCE_SIZE = 12349; // 0x303d
    field public static final int EGL_MATCH_NATIVE_PIXMAP = 12353; // 0x3041
    field public static final int EGL_MAX_PBUFFER_HEIGHT = 12330; // 0x302a
    field public static final int EGL_MAX_PBUFFER_PIXELS = 12331; // 0x302b
    field public static final int EGL_MAX_PBUFFER_WIDTH = 12332; // 0x302c
    field public static final int EGL_MAX_SWAP_INTERVAL = 12348; // 0x303c
    field public static final int EGL_MIN_SWAP_INTERVAL = 12347; // 0x303b
    field public static final int EGL_MIPMAP_LEVEL = 12419; // 0x3083
    field public static final int EGL_MIPMAP_TEXTURE = 12418; // 0x3082
    field public static final int EGL_MULTISAMPLE_RESOLVE = 12441; // 0x3099
    field public static final int EGL_MULTISAMPLE_RESOLVE_BOX = 12443; // 0x309b
    field public static final int EGL_MULTISAMPLE_RESOLVE_BOX_BIT = 512; // 0x200
    field public static final int EGL_MULTISAMPLE_RESOLVE_DEFAULT = 12442; // 0x309a
    field public static final int EGL_NATIVE_RENDERABLE = 12333; // 0x302d
    field public static final int EGL_NATIVE_VISUAL_ID = 12334; // 0x302e
    field public static final int EGL_NATIVE_VISUAL_TYPE = 12335; // 0x302f
    field public static final int EGL_NONE = 12344; // 0x3038
    field public static final int EGL_NON_CONFORMANT_CONFIG = 12369; // 0x3051
    field public static final int EGL_NOT_INITIALIZED = 12289; // 0x3001
    field public static android.opengl.EGLContext EGL_NO_CONTEXT;
    field public static android.opengl.EGLDisplay EGL_NO_DISPLAY;
    field public static android.opengl.EGLSurface EGL_NO_SURFACE;
    field public static final int EGL_NO_TEXTURE = 12380; // 0x305c
    field public static final int EGL_OPENGL_API = 12450; // 0x30a2
    field public static final int EGL_OPENGL_BIT = 8; // 0x8
    field public static final int EGL_OPENGL_ES2_BIT = 4; // 0x4
    field public static final int EGL_OPENGL_ES_API = 12448; // 0x30a0
    field public static final int EGL_OPENGL_ES_BIT = 1; // 0x1
    field public static final int EGL_OPENVG_API = 12449; // 0x30a1
    field public static final int EGL_OPENVG_BIT = 2; // 0x2
    field public static final int EGL_OPENVG_IMAGE = 12438; // 0x3096
    field public static final int EGL_PBUFFER_BIT = 1; // 0x1
    field public static final int EGL_PIXEL_ASPECT_RATIO = 12434; // 0x3092
    field public static final int EGL_PIXMAP_BIT = 2; // 0x2
    field public static final int EGL_READ = 12378; // 0x305a
    field public static final int EGL_RED_SIZE = 12324; // 0x3024
    field public static final int EGL_RENDERABLE_TYPE = 12352; // 0x3040
    field public static final int EGL_RENDER_BUFFER = 12422; // 0x3086
    field public static final int EGL_RGB_BUFFER = 12430; // 0x308e
    field public static final int EGL_SAMPLES = 12337; // 0x3031
    field public static final int EGL_SAMPLE_BUFFERS = 12338; // 0x3032
    field public static final int EGL_SINGLE_BUFFER = 12421; // 0x3085
    field public static final int EGL_SLOW_CONFIG = 12368; // 0x3050
    field public static final int EGL_STENCIL_SIZE = 12326; // 0x3026
    field public static final int EGL_SUCCESS = 12288; // 0x3000
    field public static final int EGL_SURFACE_TYPE = 12339; // 0x3033
    field public static final int EGL_SWAP_BEHAVIOR = 12435; // 0x3093
    field public static final int EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 1024; // 0x400
    field public static final int EGL_TEXTURE_2D = 12383; // 0x305f
    field public static final int EGL_TEXTURE_FORMAT = 12416; // 0x3080
    field public static final int EGL_TEXTURE_RGB = 12381; // 0x305d
    field public static final int EGL_TEXTURE_RGBA = 12382; // 0x305e
    field public static final int EGL_TEXTURE_TARGET = 12417; // 0x3081
    field public static final int EGL_TRANSPARENT_BLUE_VALUE = 12341; // 0x3035
    field public static final int EGL_TRANSPARENT_GREEN_VALUE = 12342; // 0x3036
    field public static final int EGL_TRANSPARENT_RED_VALUE = 12343; // 0x3037
    field public static final int EGL_TRANSPARENT_RGB = 12370; // 0x3052
    field public static final int EGL_TRANSPARENT_TYPE = 12340; // 0x3034
    field public static final int EGL_TRUE = 1; // 0x1
    field public static final int EGL_VENDOR = 12371; // 0x3053
    field public static final int EGL_VERSION = 12372; // 0x3054
    field public static final int EGL_VERTICAL_RESOLUTION = 12433; // 0x3091
    field public static final int EGL_VG_ALPHA_FORMAT = 12424; // 0x3088
    field public static final int EGL_VG_ALPHA_FORMAT_NONPRE = 12427; // 0x308b
    field public static final int EGL_VG_ALPHA_FORMAT_PRE = 12428; // 0x308c
    field public static final int EGL_VG_ALPHA_FORMAT_PRE_BIT = 64; // 0x40
    field public static final int EGL_VG_COLORSPACE = 12423; // 0x3087
    field public static final int EGL_VG_COLORSPACE_LINEAR = 12426; // 0x308a
    field public static final int EGL_VG_COLORSPACE_LINEAR_BIT = 32; // 0x20
    field public static final int EGL_VG_COLORSPACE_sRGB = 12425; // 0x3089
    field public static final int EGL_WIDTH = 12375; // 0x3057
    field public static final int EGL_WINDOW_BIT = 4; // 0x4
  }

  public class EGLConfig extends android.opengl.EGLObjectHandle {
  }

  public class EGLContext extends android.opengl.EGLObjectHandle {
  }

  public class EGLDisplay extends android.opengl.EGLObjectHandle {
  }

  public class EGLExt {
    ctor public EGLExt();
    method public static boolean eglPresentationTimeANDROID(android.opengl.EGLDisplay, android.opengl.EGLSurface, long);
    field public static final int EGL_CONTEXT_FLAGS_KHR = 12540; // 0x30fc
    field public static final int EGL_CONTEXT_MAJOR_VERSION_KHR = 12440; // 0x3098
    field public static final int EGL_CONTEXT_MINOR_VERSION_KHR = 12539; // 0x30fb
    field public static final int EGL_OPENGL_ES3_BIT_KHR = 64; // 0x40
  }

  public abstract class EGLObjectHandle {
    ctor protected deprecated EGLObjectHandle(int);
    ctor protected EGLObjectHandle(long);
    method public deprecated int getHandle();
    method public long getNativeHandle();
  }

  public class EGLSurface extends android.opengl.EGLObjectHandle {
  }

  public class ETC1 {
    ctor public ETC1();
    method public static void decodeBlock(java.nio.Buffer, java.nio.Buffer);
    method public static void decodeImage(java.nio.Buffer, java.nio.Buffer, int, int, int, int);
    method public static void encodeBlock(java.nio.Buffer, int, java.nio.Buffer);
    method public static void encodeImage(java.nio.Buffer, int, int, int, int, java.nio.Buffer);
    method public static void formatHeader(java.nio.Buffer, int, int);
    method public static int getEncodedDataSize(int, int);
    method public static int getHeight(java.nio.Buffer);
    method public static int getWidth(java.nio.Buffer);
    method public static boolean isValid(java.nio.Buffer);
    field public static final int DECODED_BLOCK_SIZE = 48; // 0x30
    field public static final int ENCODED_BLOCK_SIZE = 8; // 0x8
    field public static final int ETC1_RGB8_OES = 36196; // 0x8d64
    field public static final int ETC_PKM_HEADER_SIZE = 16; // 0x10
  }

  public class ETC1Util {
    ctor public ETC1Util();
    method public static android.opengl.ETC1Util.ETC1Texture compressTexture(java.nio.Buffer, int, int, int, int);
    method public static android.opengl.ETC1Util.ETC1Texture createTexture(java.io.InputStream) throws java.io.IOException;
    method public static boolean isETC1Supported();
    method public static void loadTexture(int, int, int, int, int, java.io.InputStream) throws java.io.IOException;
    method public static void loadTexture(int, int, int, int, int, android.opengl.ETC1Util.ETC1Texture);
    method public static void writeTexture(android.opengl.ETC1Util.ETC1Texture, java.io.OutputStream) throws java.io.IOException;
  }

  public static class ETC1Util.ETC1Texture {
    ctor public ETC1Util.ETC1Texture(int, int, java.nio.ByteBuffer);
    method public java.nio.ByteBuffer getData();
    method public int getHeight();
    method public int getWidth();
  }

  public class GLDebugHelper {
    ctor public GLDebugHelper();
    method public static javax.microedition.khronos.opengles.GL wrap(javax.microedition.khronos.opengles.GL, int, java.io.Writer);
    method public static javax.microedition.khronos.egl.EGL wrap(javax.microedition.khronos.egl.EGL, int, java.io.Writer);
    field public static final int CONFIG_CHECK_GL_ERROR = 1; // 0x1
    field public static final int CONFIG_CHECK_THREAD = 2; // 0x2
    field public static final int CONFIG_LOG_ARGUMENT_NAMES = 4; // 0x4
    field public static final int ERROR_WRONG_THREAD = 28672; // 0x7000
  }

  public class GLES10 {
    ctor public GLES10();
    method public static void glActiveTexture(int);
    method public static void glAlphaFunc(int, float);
    method public static void glAlphaFuncx(int, int);
    method public static void glBindTexture(int, int);
    method public static void glBlendFunc(int, int);
    method public static void glClear(int);
    method public static void glClearColor(float, float, float, float);
    method public static void glClearColorx(int, int, int, int);
    method public static void glClearDepthf(float);
    method public static void glClearDepthx(int);
    method public static void glClearStencil(int);
    method public static void glClientActiveTexture(int);
    method public static void glColor4f(float, float, float, float);
    method public static void glColor4x(int, int, int, int);
    method public static void glColorMask(boolean, boolean, boolean, boolean);
    method public static void glColorPointer(int, int, int, java.nio.Buffer);
    method public static void glCompressedTexImage2D(int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glCompressedTexSubImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glCopyTexImage2D(int, int, int, int, int, int, int, int);
    method public static void glCopyTexSubImage2D(int, int, int, int, int, int, int, int);
    method public static void glCullFace(int);
    method public static void glDeleteTextures(int, int[], int);
    method public static void glDeleteTextures(int, java.nio.IntBuffer);
    method public static void glDepthFunc(int);
    method public static void glDepthMask(boolean);
    method public static void glDepthRangef(float, float);
    method public static void glDepthRangex(int, int);
    method public static void glDisable(int);
    method public static void glDisableClientState(int);
    method public static void glDrawArrays(int, int, int);
    method public static void glDrawElements(int, int, int, java.nio.Buffer);
    method public static void glEnable(int);
    method public static void glEnableClientState(int);
    method public static void glFinish();
    method public static void glFlush();
    method public static void glFogf(int, float);
    method public static void glFogfv(int, float[], int);
    method public static void glFogfv(int, java.nio.FloatBuffer);
    method public static void glFogx(int, int);
    method public static void glFogxv(int, int[], int);
    method public static void glFogxv(int, java.nio.IntBuffer);
    method public static void glFrontFace(int);
    method public static void glFrustumf(float, float, float, float, float, float);
    method public static void glFrustumx(int, int, int, int, int, int);
    method public static void glGenTextures(int, int[], int);
    method public static void glGenTextures(int, java.nio.IntBuffer);
    method public static int glGetError();
    method public static void glGetIntegerv(int, int[], int);
    method public static void glGetIntegerv(int, java.nio.IntBuffer);
    method public static java.lang.String glGetString(int);
    method public static void glHint(int, int);
    method public static void glLightModelf(int, float);
    method public static void glLightModelfv(int, float[], int);
    method public static void glLightModelfv(int, java.nio.FloatBuffer);
    method public static void glLightModelx(int, int);
    method public static void glLightModelxv(int, int[], int);
    method public static void glLightModelxv(int, java.nio.IntBuffer);
    method public static void glLightf(int, int, float);
    method public static void glLightfv(int, int, float[], int);
    method public static void glLightfv(int, int, java.nio.FloatBuffer);
    method public static void glLightx(int, int, int);
    method public static void glLightxv(int, int, int[], int);
    method public static void glLightxv(int, int, java.nio.IntBuffer);
    method public static void glLineWidth(float);
    method public static void glLineWidthx(int);
    method public static void glLoadIdentity();
    method public static void glLoadMatrixf(float[], int);
    method public static void glLoadMatrixf(java.nio.FloatBuffer);
    method public static void glLoadMatrixx(int[], int);
    method public static void glLoadMatrixx(java.nio.IntBuffer);
    method public static void glLogicOp(int);
    method public static void glMaterialf(int, int, float);
    method public static void glMaterialfv(int, int, float[], int);
    method public static void glMaterialfv(int, int, java.nio.FloatBuffer);
    method public static void glMaterialx(int, int, int);
    method public static void glMaterialxv(int, int, int[], int);
    method public static void glMaterialxv(int, int, java.nio.IntBuffer);
    method public static void glMatrixMode(int);
    method public static void glMultMatrixf(float[], int);
    method public static void glMultMatrixf(java.nio.FloatBuffer);
    method public static void glMultMatrixx(int[], int);
    method public static void glMultMatrixx(java.nio.IntBuffer);
    method public static void glMultiTexCoord4f(int, float, float, float, float);
    method public static void glMultiTexCoord4x(int, int, int, int, int);
    method public static void glNormal3f(float, float, float);
    method public static void glNormal3x(int, int, int);
    method public static void glNormalPointer(int, int, java.nio.Buffer);
    method public static void glOrthof(float, float, float, float, float, float);
    method public static void glOrthox(int, int, int, int, int, int);
    method public static void glPixelStorei(int, int);
    method public static void glPointSize(float);
    method public static void glPointSizex(int);
    method public static void glPolygonOffset(float, float);
    method public static void glPolygonOffsetx(int, int);
    method public static void glPopMatrix();
    method public static void glPushMatrix();
    method public static void glReadPixels(int, int, int, int, int, int, java.nio.Buffer);
    method public static void glRotatef(float, float, float, float);
    method public static void glRotatex(int, int, int, int);
    method public static void glSampleCoverage(float, boolean);
    method public static void glSampleCoveragex(int, boolean);
    method public static void glScalef(float, float, float);
    method public static void glScalex(int, int, int);
    method public static void glScissor(int, int, int, int);
    method public static void glShadeModel(int);
    method public static void glStencilFunc(int, int, int);
    method public static void glStencilMask(int);
    method public static void glStencilOp(int, int, int);
    method public static void glTexCoordPointer(int, int, int, java.nio.Buffer);
    method public static void glTexEnvf(int, int, float);
    method public static void glTexEnvfv(int, int, float[], int);
    method public static void glTexEnvfv(int, int, java.nio.FloatBuffer);
    method public static void glTexEnvx(int, int, int);
    method public static void glTexEnvxv(int, int, int[], int);
    method public static void glTexEnvxv(int, int, java.nio.IntBuffer);
    method public static void glTexImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glTexParameterf(int, int, float);
    method public static void glTexParameterx(int, int, int);
    method public static void glTexSubImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glTranslatef(float, float, float);
    method public static void glTranslatex(int, int, int);
    method public static void glVertexPointer(int, int, int, java.nio.Buffer);
    method public static void glViewport(int, int, int, int);
    field public static final int GL_ADD = 260; // 0x104
    field public static final int GL_ALIASED_LINE_WIDTH_RANGE = 33902; // 0x846e
    field public static final int GL_ALIASED_POINT_SIZE_RANGE = 33901; // 0x846d
    field public static final int GL_ALPHA = 6406; // 0x1906
    field public static final int GL_ALPHA_BITS = 3413; // 0xd55
    field public static final int GL_ALPHA_TEST = 3008; // 0xbc0
    field public static final int GL_ALWAYS = 519; // 0x207
    field public static final int GL_AMBIENT = 4608; // 0x1200
    field public static final int GL_AMBIENT_AND_DIFFUSE = 5634; // 0x1602
    field public static final int GL_AND = 5377; // 0x1501
    field public static final int GL_AND_INVERTED = 5380; // 0x1504
    field public static final int GL_AND_REVERSE = 5378; // 0x1502
    field public static final int GL_BACK = 1029; // 0x405
    field public static final int GL_BLEND = 3042; // 0xbe2
    field public static final int GL_BLUE_BITS = 3412; // 0xd54
    field public static final int GL_BYTE = 5120; // 0x1400
    field public static final int GL_CCW = 2305; // 0x901
    field public static final int GL_CLAMP_TO_EDGE = 33071; // 0x812f
    field public static final int GL_CLEAR = 5376; // 0x1500
    field public static final int GL_COLOR_ARRAY = 32886; // 0x8076
    field public static final int GL_COLOR_BUFFER_BIT = 16384; // 0x4000
    field public static final int GL_COLOR_LOGIC_OP = 3058; // 0xbf2
    field public static final int GL_COLOR_MATERIAL = 2903; // 0xb57
    field public static final int GL_COMPRESSED_TEXTURE_FORMATS = 34467; // 0x86a3
    field public static final int GL_CONSTANT_ATTENUATION = 4615; // 0x1207
    field public static final int GL_COPY = 5379; // 0x1503
    field public static final int GL_COPY_INVERTED = 5388; // 0x150c
    field public static final int GL_CULL_FACE = 2884; // 0xb44
    field public static final int GL_CW = 2304; // 0x900
    field public static final int GL_DECAL = 8449; // 0x2101
    field public static final int GL_DECR = 7683; // 0x1e03
    field public static final int GL_DEPTH_BITS = 3414; // 0xd56
    field public static final int GL_DEPTH_BUFFER_BIT = 256; // 0x100
    field public static final int GL_DEPTH_TEST = 2929; // 0xb71
    field public static final int GL_DIFFUSE = 4609; // 0x1201
    field public static final int GL_DITHER = 3024; // 0xbd0
    field public static final int GL_DONT_CARE = 4352; // 0x1100
    field public static final int GL_DST_ALPHA = 772; // 0x304
    field public static final int GL_DST_COLOR = 774; // 0x306
    field public static final int GL_EMISSION = 5632; // 0x1600
    field public static final int GL_EQUAL = 514; // 0x202
    field public static final int GL_EQUIV = 5385; // 0x1509
    field public static final int GL_EXP = 2048; // 0x800
    field public static final int GL_EXP2 = 2049; // 0x801
    field public static final int GL_EXTENSIONS = 7939; // 0x1f03
    field public static final int GL_FALSE = 0; // 0x0
    field public static final int GL_FASTEST = 4353; // 0x1101
    field public static final int GL_FIXED = 5132; // 0x140c
    field public static final int GL_FLAT = 7424; // 0x1d00
    field public static final int GL_FLOAT = 5126; // 0x1406
    field public static final int GL_FOG = 2912; // 0xb60
    field public static final int GL_FOG_COLOR = 2918; // 0xb66
    field public static final int GL_FOG_DENSITY = 2914; // 0xb62
    field public static final int GL_FOG_END = 2916; // 0xb64
    field public static final int GL_FOG_HINT = 3156; // 0xc54
    field public static final int GL_FOG_MODE = 2917; // 0xb65
    field public static final int GL_FOG_START = 2915; // 0xb63
    field public static final int GL_FRONT = 1028; // 0x404
    field public static final int GL_FRONT_AND_BACK = 1032; // 0x408
    field public static final int GL_GEQUAL = 518; // 0x206
    field public static final int GL_GREATER = 516; // 0x204
    field public static final int GL_GREEN_BITS = 3411; // 0xd53
    field public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = 35739; // 0x8b9b
    field public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = 35738; // 0x8b9a
    field public static final int GL_INCR = 7682; // 0x1e02
    field public static final int GL_INVALID_ENUM = 1280; // 0x500
    field public static final int GL_INVALID_OPERATION = 1282; // 0x502
    field public static final int GL_INVALID_VALUE = 1281; // 0x501
    field public static final int GL_INVERT = 5386; // 0x150a
    field public static final int GL_KEEP = 7680; // 0x1e00
    field public static final int GL_LEQUAL = 515; // 0x203
    field public static final int GL_LESS = 513; // 0x201
    field public static final int GL_LIGHT0 = 16384; // 0x4000
    field public static final int GL_LIGHT1 = 16385; // 0x4001
    field public static final int GL_LIGHT2 = 16386; // 0x4002
    field public static final int GL_LIGHT3 = 16387; // 0x4003
    field public static final int GL_LIGHT4 = 16388; // 0x4004
    field public static final int GL_LIGHT5 = 16389; // 0x4005
    field public static final int GL_LIGHT6 = 16390; // 0x4006
    field public static final int GL_LIGHT7 = 16391; // 0x4007
    field public static final int GL_LIGHTING = 2896; // 0xb50
    field public static final int GL_LIGHT_MODEL_AMBIENT = 2899; // 0xb53
    field public static final int GL_LIGHT_MODEL_TWO_SIDE = 2898; // 0xb52
    field public static final int GL_LINEAR = 9729; // 0x2601
    field public static final int GL_LINEAR_ATTENUATION = 4616; // 0x1208
    field public static final int GL_LINEAR_MIPMAP_LINEAR = 9987; // 0x2703
    field public static final int GL_LINEAR_MIPMAP_NEAREST = 9985; // 0x2701
    field public static final int GL_LINES = 1; // 0x1
    field public static final int GL_LINE_LOOP = 2; // 0x2
    field public static final int GL_LINE_SMOOTH = 2848; // 0xb20
    field public static final int GL_LINE_SMOOTH_HINT = 3154; // 0xc52
    field public static final int GL_LINE_STRIP = 3; // 0x3
    field public static final int GL_LUMINANCE = 6409; // 0x1909
    field public static final int GL_LUMINANCE_ALPHA = 6410; // 0x190a
    field public static final int GL_MAX_ELEMENTS_INDICES = 33001; // 0x80e9
    field public static final int GL_MAX_ELEMENTS_VERTICES = 33000; // 0x80e8
    field public static final int GL_MAX_LIGHTS = 3377; // 0xd31
    field public static final int GL_MAX_MODELVIEW_STACK_DEPTH = 3382; // 0xd36
    field public static final int GL_MAX_PROJECTION_STACK_DEPTH = 3384; // 0xd38
    field public static final int GL_MAX_TEXTURE_SIZE = 3379; // 0xd33
    field public static final int GL_MAX_TEXTURE_STACK_DEPTH = 3385; // 0xd39
    field public static final int GL_MAX_TEXTURE_UNITS = 34018; // 0x84e2
    field public static final int GL_MAX_VIEWPORT_DIMS = 3386; // 0xd3a
    field public static final int GL_MODELVIEW = 5888; // 0x1700
    field public static final int GL_MODULATE = 8448; // 0x2100
    field public static final int GL_MULTISAMPLE = 32925; // 0x809d
    field public static final int GL_NAND = 5390; // 0x150e
    field public static final int GL_NEAREST = 9728; // 0x2600
    field public static final int GL_NEAREST_MIPMAP_LINEAR = 9986; // 0x2702
    field public static final int GL_NEAREST_MIPMAP_NEAREST = 9984; // 0x2700
    field public static final int GL_NEVER = 512; // 0x200
    field public static final int GL_NICEST = 4354; // 0x1102
    field public static final int GL_NOOP = 5381; // 0x1505
    field public static final int GL_NOR = 5384; // 0x1508
    field public static final int GL_NORMALIZE = 2977; // 0xba1
    field public static final int GL_NORMAL_ARRAY = 32885; // 0x8075
    field public static final int GL_NOTEQUAL = 517; // 0x205
    field public static final int GL_NO_ERROR = 0; // 0x0
    field public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 34466; // 0x86a2
    field public static final int GL_ONE = 1; // 0x1
    field public static final int GL_ONE_MINUS_DST_ALPHA = 773; // 0x305
    field public static final int GL_ONE_MINUS_DST_COLOR = 775; // 0x307
    field public static final int GL_ONE_MINUS_SRC_ALPHA = 771; // 0x303
    field public static final int GL_ONE_MINUS_SRC_COLOR = 769; // 0x301
    field public static final int GL_OR = 5383; // 0x1507
    field public static final int GL_OR_INVERTED = 5389; // 0x150d
    field public static final int GL_OR_REVERSE = 5387; // 0x150b
    field public static final int GL_OUT_OF_MEMORY = 1285; // 0x505
    field public static final int GL_PACK_ALIGNMENT = 3333; // 0xd05
    field public static final int GL_PALETTE4_R5_G6_B5_OES = 35730; // 0x8b92
    field public static final int GL_PALETTE4_RGB5_A1_OES = 35732; // 0x8b94
    field public static final int GL_PALETTE4_RGB8_OES = 35728; // 0x8b90
    field public static final int GL_PALETTE4_RGBA4_OES = 35731; // 0x8b93
    field public static final int GL_PALETTE4_RGBA8_OES = 35729; // 0x8b91
    field public static final int GL_PALETTE8_R5_G6_B5_OES = 35735; // 0x8b97
    field public static final int GL_PALETTE8_RGB5_A1_OES = 35737; // 0x8b99
    field public static final int GL_PALETTE8_RGB8_OES = 35733; // 0x8b95
    field public static final int GL_PALETTE8_RGBA4_OES = 35736; // 0x8b98
    field public static final int GL_PALETTE8_RGBA8_OES = 35734; // 0x8b96
    field public static final int GL_PERSPECTIVE_CORRECTION_HINT = 3152; // 0xc50
    field public static final int GL_POINTS = 0; // 0x0
    field public static final int GL_POINT_FADE_THRESHOLD_SIZE = 33064; // 0x8128
    field public static final int GL_POINT_SIZE = 2833; // 0xb11
    field public static final int GL_POINT_SMOOTH = 2832; // 0xb10
    field public static final int GL_POINT_SMOOTH_HINT = 3153; // 0xc51
    field public static final int GL_POLYGON_OFFSET_FILL = 32823; // 0x8037
    field public static final int GL_POLYGON_SMOOTH_HINT = 3155; // 0xc53
    field public static final int GL_POSITION = 4611; // 0x1203
    field public static final int GL_PROJECTION = 5889; // 0x1701
    field public static final int GL_QUADRATIC_ATTENUATION = 4617; // 0x1209
    field public static final int GL_RED_BITS = 3410; // 0xd52
    field public static final int GL_RENDERER = 7937; // 0x1f01
    field public static final int GL_REPEAT = 10497; // 0x2901
    field public static final int GL_REPLACE = 7681; // 0x1e01
    field public static final int GL_RESCALE_NORMAL = 32826; // 0x803a
    field public static final int GL_RGB = 6407; // 0x1907
    field public static final int GL_RGBA = 6408; // 0x1908
    field public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 32926; // 0x809e
    field public static final int GL_SAMPLE_ALPHA_TO_ONE = 32927; // 0x809f
    field public static final int GL_SAMPLE_COVERAGE = 32928; // 0x80a0
    field public static final int GL_SCISSOR_TEST = 3089; // 0xc11
    field public static final int GL_SET = 5391; // 0x150f
    field public static final int GL_SHININESS = 5633; // 0x1601
    field public static final int GL_SHORT = 5122; // 0x1402
    field public static final int GL_SMOOTH = 7425; // 0x1d01
    field public static final int GL_SMOOTH_LINE_WIDTH_RANGE = 2850; // 0xb22
    field public static final int GL_SMOOTH_POINT_SIZE_RANGE = 2834; // 0xb12
    field public static final int GL_SPECULAR = 4610; // 0x1202
    field public static final int GL_SPOT_CUTOFF = 4614; // 0x1206
    field public static final int GL_SPOT_DIRECTION = 4612; // 0x1204
    field public static final int GL_SPOT_EXPONENT = 4613; // 0x1205
    field public static final int GL_SRC_ALPHA = 770; // 0x302
    field public static final int GL_SRC_ALPHA_SATURATE = 776; // 0x308
    field public static final int GL_SRC_COLOR = 768; // 0x300
    field public static final int GL_STACK_OVERFLOW = 1283; // 0x503
    field public static final int GL_STACK_UNDERFLOW = 1284; // 0x504
    field public static final int GL_STENCIL_BITS = 3415; // 0xd57
    field public static final int GL_STENCIL_BUFFER_BIT = 1024; // 0x400
    field public static final int GL_STENCIL_TEST = 2960; // 0xb90
    field public static final int GL_SUBPIXEL_BITS = 3408; // 0xd50
    field public static final int GL_TEXTURE = 5890; // 0x1702
    field public static final int GL_TEXTURE0 = 33984; // 0x84c0
    field public static final int GL_TEXTURE1 = 33985; // 0x84c1
    field public static final int GL_TEXTURE10 = 33994; // 0x84ca
    field public static final int GL_TEXTURE11 = 33995; // 0x84cb
    field public static final int GL_TEXTURE12 = 33996; // 0x84cc
    field public static final int GL_TEXTURE13 = 33997; // 0x84cd
    field public static final int GL_TEXTURE14 = 33998; // 0x84ce
    field public static final int GL_TEXTURE15 = 33999; // 0x84cf
    field public static final int GL_TEXTURE16 = 34000; // 0x84d0
    field public static final int GL_TEXTURE17 = 34001; // 0x84d1
    field public static final int GL_TEXTURE18 = 34002; // 0x84d2
    field public static final int GL_TEXTURE19 = 34003; // 0x84d3
    field public static final int GL_TEXTURE2 = 33986; // 0x84c2
    field public static final int GL_TEXTURE20 = 34004; // 0x84d4
    field public static final int GL_TEXTURE21 = 34005; // 0x84d5
    field public static final int GL_TEXTURE22 = 34006; // 0x84d6
    field public static final int GL_TEXTURE23 = 34007; // 0x84d7
    field public static final int GL_TEXTURE24 = 34008; // 0x84d8
    field public static final int GL_TEXTURE25 = 34009; // 0x84d9
    field public static final int GL_TEXTURE26 = 34010; // 0x84da
    field public static final int GL_TEXTURE27 = 34011; // 0x84db
    field public static final int GL_TEXTURE28 = 34012; // 0x84dc
    field public static final int GL_TEXTURE29 = 34013; // 0x84dd
    field public static final int GL_TEXTURE3 = 33987; // 0x84c3
    field public static final int GL_TEXTURE30 = 34014; // 0x84de
    field public static final int GL_TEXTURE31 = 34015; // 0x84df
    field public static final int GL_TEXTURE4 = 33988; // 0x84c4
    field public static final int GL_TEXTURE5 = 33989; // 0x84c5
    field public static final int GL_TEXTURE6 = 33990; // 0x84c6
    field public static final int GL_TEXTURE7 = 33991; // 0x84c7
    field public static final int GL_TEXTURE8 = 33992; // 0x84c8
    field public static final int GL_TEXTURE9 = 33993; // 0x84c9
    field public static final int GL_TEXTURE_2D = 3553; // 0xde1
    field public static final int GL_TEXTURE_COORD_ARRAY = 32888; // 0x8078
    field public static final int GL_TEXTURE_ENV = 8960; // 0x2300
    field public static final int GL_TEXTURE_ENV_COLOR = 8705; // 0x2201
    field public static final int GL_TEXTURE_ENV_MODE = 8704; // 0x2200
    field public static final int GL_TEXTURE_MAG_FILTER = 10240; // 0x2800
    field public static final int GL_TEXTURE_MIN_FILTER = 10241; // 0x2801
    field public static final int GL_TEXTURE_WRAP_S = 10242; // 0x2802
    field public static final int GL_TEXTURE_WRAP_T = 10243; // 0x2803
    field public static final int GL_TRIANGLES = 4; // 0x4
    field public static final int GL_TRIANGLE_FAN = 6; // 0x6
    field public static final int GL_TRIANGLE_STRIP = 5; // 0x5
    field public static final int GL_TRUE = 1; // 0x1
    field public static final int GL_UNPACK_ALIGNMENT = 3317; // 0xcf5
    field public static final int GL_UNSIGNED_BYTE = 5121; // 0x1401
    field public static final int GL_UNSIGNED_SHORT = 5123; // 0x1403
    field public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 32819; // 0x8033
    field public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 32820; // 0x8034
    field public static final int GL_UNSIGNED_SHORT_5_6_5 = 33635; // 0x8363
    field public static final int GL_VENDOR = 7936; // 0x1f00
    field public static final int GL_VERSION = 7938; // 0x1f02
    field public static final int GL_VERTEX_ARRAY = 32884; // 0x8074
    field public static final int GL_XOR = 5382; // 0x1506
    field public static final int GL_ZERO = 0; // 0x0
  }

  public class GLES10Ext {
    ctor public GLES10Ext();
    method public static int glQueryMatrixxOES(int[], int, int[], int);
    method public static int glQueryMatrixxOES(java.nio.IntBuffer, java.nio.IntBuffer);
  }

  public class GLES11 extends android.opengl.GLES10 {
    ctor public GLES11();
    method public static void glBindBuffer(int, int);
    method public static void glBufferData(int, int, java.nio.Buffer, int);
    method public static void glBufferSubData(int, int, int, java.nio.Buffer);
    method public static void glClipPlanef(int, float[], int);
    method public static void glClipPlanef(int, java.nio.FloatBuffer);
    method public static void glClipPlanex(int, int[], int);
    method public static void glClipPlanex(int, java.nio.IntBuffer);
    method public static void glColor4ub(byte, byte, byte, byte);
    method public static void glColorPointer(int, int, int, int);
    method public static void glDeleteBuffers(int, int[], int);
    method public static void glDeleteBuffers(int, java.nio.IntBuffer);
    method public static void glDrawElements(int, int, int, int);
    method public static void glGenBuffers(int, int[], int);
    method public static void glGenBuffers(int, java.nio.IntBuffer);
    method public static void glGetBooleanv(int, boolean[], int);
    method public static void glGetBooleanv(int, java.nio.IntBuffer);
    method public static void glGetBufferParameteriv(int, int, int[], int);
    method public static void glGetBufferParameteriv(int, int, java.nio.IntBuffer);
    method public static void glGetClipPlanef(int, float[], int);
    method public static void glGetClipPlanef(int, java.nio.FloatBuffer);
    method public static void glGetClipPlanex(int, int[], int);
    method public static void glGetClipPlanex(int, java.nio.IntBuffer);
    method public static void glGetFixedv(int, int[], int);
    method public static void glGetFixedv(int, java.nio.IntBuffer);
    method public static void glGetFloatv(int, float[], int);
    method public static void glGetFloatv(int, java.nio.FloatBuffer);
    method public static void glGetLightfv(int, int, float[], int);
    method public static void glGetLightfv(int, int, java.nio.FloatBuffer);
    method public static void glGetLightxv(int, int, int[], int);
    method public static void glGetLightxv(int, int, java.nio.IntBuffer);
    method public static void glGetMaterialfv(int, int, float[], int);
    method public static void glGetMaterialfv(int, int, java.nio.FloatBuffer);
    method public static void glGetMaterialxv(int, int, int[], int);
    method public static void glGetMaterialxv(int, int, java.nio.IntBuffer);
    method public static void glGetTexEnvfv(int, int, float[], int);
    method public static void glGetTexEnvfv(int, int, java.nio.FloatBuffer);
    method public static void glGetTexEnviv(int, int, int[], int);
    method public static void glGetTexEnviv(int, int, java.nio.IntBuffer);
    method public static void glGetTexEnvxv(int, int, int[], int);
    method public static void glGetTexEnvxv(int, int, java.nio.IntBuffer);
    method public static void glGetTexParameterfv(int, int, float[], int);
    method public static void glGetTexParameterfv(int, int, java.nio.FloatBuffer);
    method public static void glGetTexParameteriv(int, int, int[], int);
    method public static void glGetTexParameteriv(int, int, java.nio.IntBuffer);
    method public static void glGetTexParameterxv(int, int, int[], int);
    method public static void glGetTexParameterxv(int, int, java.nio.IntBuffer);
    method public static boolean glIsBuffer(int);
    method public static boolean glIsEnabled(int);
    method public static boolean glIsTexture(int);
    method public static void glNormalPointer(int, int, int);
    method public static void glPointParameterf(int, float);
    method public static void glPointParameterfv(int, float[], int);
    method public static void glPointParameterfv(int, java.nio.FloatBuffer);
    method public static void glPointParameterx(int, int);
    method public static void glPointParameterxv(int, int[], int);
    method public static void glPointParameterxv(int, java.nio.IntBuffer);
    method public static void glPointSizePointerOES(int, int, java.nio.Buffer);
    method public static void glTexCoordPointer(int, int, int, int);
    method public static void glTexEnvi(int, int, int);
    method public static void glTexEnviv(int, int, int[], int);
    method public static void glTexEnviv(int, int, java.nio.IntBuffer);
    method public static void glTexParameterfv(int, int, float[], int);
    method public static void glTexParameterfv(int, int, java.nio.FloatBuffer);
    method public static void glTexParameteri(int, int, int);
    method public static void glTexParameteriv(int, int, int[], int);
    method public static void glTexParameteriv(int, int, java.nio.IntBuffer);
    method public static void glTexParameterxv(int, int, int[], int);
    method public static void glTexParameterxv(int, int, java.nio.IntBuffer);
    method public static void glVertexPointer(int, int, int, int);
    field public static final int GL_ACTIVE_TEXTURE = 34016; // 0x84e0
    field public static final int GL_ADD_SIGNED = 34164; // 0x8574
    field public static final int GL_ALPHA_SCALE = 3356; // 0xd1c
    field public static final int GL_ALPHA_TEST_FUNC = 3009; // 0xbc1
    field public static final int GL_ALPHA_TEST_REF = 3010; // 0xbc2
    field public static final int GL_ARRAY_BUFFER = 34962; // 0x8892
    field public static final int GL_ARRAY_BUFFER_BINDING = 34964; // 0x8894
    field public static final int GL_BLEND_DST = 3040; // 0xbe0
    field public static final int GL_BLEND_SRC = 3041; // 0xbe1
    field public static final int GL_BUFFER_ACCESS = 35003; // 0x88bb
    field public static final int GL_BUFFER_SIZE = 34660; // 0x8764
    field public static final int GL_BUFFER_USAGE = 34661; // 0x8765
    field public static final int GL_CLIENT_ACTIVE_TEXTURE = 34017; // 0x84e1
    field public static final int GL_CLIP_PLANE0 = 12288; // 0x3000
    field public static final int GL_CLIP_PLANE1 = 12289; // 0x3001
    field public static final int GL_CLIP_PLANE2 = 12290; // 0x3002
    field public static final int GL_CLIP_PLANE3 = 12291; // 0x3003
    field public static final int GL_CLIP_PLANE4 = 12292; // 0x3004
    field public static final int GL_CLIP_PLANE5 = 12293; // 0x3005
    field public static final int GL_COLOR_ARRAY_BUFFER_BINDING = 34968; // 0x8898
    field public static final int GL_COLOR_ARRAY_POINTER = 32912; // 0x8090
    field public static final int GL_COLOR_ARRAY_SIZE = 32897; // 0x8081
    field public static final int GL_COLOR_ARRAY_STRIDE = 32899; // 0x8083
    field public static final int GL_COLOR_ARRAY_TYPE = 32898; // 0x8082
    field public static final int GL_COLOR_CLEAR_VALUE = 3106; // 0xc22
    field public static final int GL_COLOR_WRITEMASK = 3107; // 0xc23
    field public static final int GL_COMBINE = 34160; // 0x8570
    field public static final int GL_COMBINE_ALPHA = 34162; // 0x8572
    field public static final int GL_COMBINE_RGB = 34161; // 0x8571
    field public static final int GL_CONSTANT = 34166; // 0x8576
    field public static final int GL_COORD_REPLACE_OES = 34914; // 0x8862
    field public static final int GL_CULL_FACE_MODE = 2885; // 0xb45
    field public static final int GL_CURRENT_COLOR = 2816; // 0xb00
    field public static final int GL_CURRENT_NORMAL = 2818; // 0xb02
    field public static final int GL_CURRENT_TEXTURE_COORDS = 2819; // 0xb03
    field public static final int GL_DEPTH_CLEAR_VALUE = 2931; // 0xb73
    field public static final int GL_DEPTH_FUNC = 2932; // 0xb74
    field public static final int GL_DEPTH_RANGE = 2928; // 0xb70
    field public static final int GL_DEPTH_WRITEMASK = 2930; // 0xb72
    field public static final int GL_DOT3_RGB = 34478; // 0x86ae
    field public static final int GL_DOT3_RGBA = 34479; // 0x86af
    field public static final int GL_DYNAMIC_DRAW = 35048; // 0x88e8
    field public static final int GL_ELEMENT_ARRAY_BUFFER = 34963; // 0x8893
    field public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING = 34965; // 0x8895
    field public static final int GL_FRONT_FACE = 2886; // 0xb46
    field public static final int GL_GENERATE_MIPMAP = 33169; // 0x8191
    field public static final int GL_GENERATE_MIPMAP_HINT = 33170; // 0x8192
    field public static final int GL_INTERPOLATE = 34165; // 0x8575
    field public static final int GL_LINE_WIDTH = 2849; // 0xb21
    field public static final int GL_LOGIC_OP_MODE = 3056; // 0xbf0
    field public static final int GL_MATRIX_MODE = 2976; // 0xba0
    field public static final int GL_MAX_CLIP_PLANES = 3378; // 0xd32
    field public static final int GL_MODELVIEW_MATRIX = 2982; // 0xba6
    field public static final int GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES = 35213; // 0x898d
    field public static final int GL_MODELVIEW_STACK_DEPTH = 2979; // 0xba3
    field public static final int GL_NORMAL_ARRAY_BUFFER_BINDING = 34967; // 0x8897
    field public static final int GL_NORMAL_ARRAY_POINTER = 32911; // 0x808f
    field public static final int GL_NORMAL_ARRAY_STRIDE = 32895; // 0x807f
    field public static final int GL_NORMAL_ARRAY_TYPE = 32894; // 0x807e
    field public static final int GL_OPERAND0_ALPHA = 34200; // 0x8598
    field public static final int GL_OPERAND0_RGB = 34192; // 0x8590
    field public static final int GL_OPERAND1_ALPHA = 34201; // 0x8599
    field public static final int GL_OPERAND1_RGB = 34193; // 0x8591
    field public static final int GL_OPERAND2_ALPHA = 34202; // 0x859a
    field public static final int GL_OPERAND2_RGB = 34194; // 0x8592
    field public static final int GL_POINT_DISTANCE_ATTENUATION = 33065; // 0x8129
    field public static final int GL_POINT_FADE_THRESHOLD_SIZE = 33064; // 0x8128
    field public static final int GL_POINT_SIZE = 2833; // 0xb11
    field public static final int GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES = 35743; // 0x8b9f
    field public static final int GL_POINT_SIZE_ARRAY_OES = 35740; // 0x8b9c
    field public static final int GL_POINT_SIZE_ARRAY_POINTER_OES = 35212; // 0x898c
    field public static final int GL_POINT_SIZE_ARRAY_STRIDE_OES = 35211; // 0x898b
    field public static final int GL_POINT_SIZE_ARRAY_TYPE_OES = 35210; // 0x898a
    field public static final int GL_POINT_SIZE_MAX = 33063; // 0x8127
    field public static final int GL_POINT_SIZE_MIN = 33062; // 0x8126
    field public static final int GL_POINT_SPRITE_OES = 34913; // 0x8861
    field public static final int GL_POLYGON_OFFSET_FACTOR = 32824; // 0x8038
    field public static final int GL_POLYGON_OFFSET_UNITS = 10752; // 0x2a00
    field public static final int GL_PREVIOUS = 34168; // 0x8578
    field public static final int GL_PRIMARY_COLOR = 34167; // 0x8577
    field public static final int GL_PROJECTION_MATRIX = 2983; // 0xba7
    field public static final int GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES = 35214; // 0x898e
    field public static final int GL_PROJECTION_STACK_DEPTH = 2980; // 0xba4
    field public static final int GL_RGB_SCALE = 34163; // 0x8573
    field public static final int GL_SAMPLES = 32937; // 0x80a9
    field public static final int GL_SAMPLE_BUFFERS = 32936; // 0x80a8
    field public static final int GL_SAMPLE_COVERAGE_INVERT = 32939; // 0x80ab
    field public static final int GL_SAMPLE_COVERAGE_VALUE = 32938; // 0x80aa
    field public static final int GL_SCISSOR_BOX = 3088; // 0xc10
    field public static final int GL_SHADE_MODEL = 2900; // 0xb54
    field public static final int GL_SRC0_ALPHA = 34184; // 0x8588
    field public static final int GL_SRC0_RGB = 34176; // 0x8580
    field public static final int GL_SRC1_ALPHA = 34185; // 0x8589
    field public static final int GL_SRC1_RGB = 34177; // 0x8581
    field public static final int GL_SRC2_ALPHA = 34186; // 0x858a
    field public static final int GL_SRC2_RGB = 34178; // 0x8582
    field public static final int GL_STATIC_DRAW = 35044; // 0x88e4
    field public static final int GL_STENCIL_CLEAR_VALUE = 2961; // 0xb91
    field public static final int GL_STENCIL_FAIL = 2964; // 0xb94
    field public static final int GL_STENCIL_FUNC = 2962; // 0xb92
    field public static final int GL_STENCIL_PASS_DEPTH_FAIL = 2965; // 0xb95
    field public static final int GL_STENCIL_PASS_DEPTH_PASS = 2966; // 0xb96
    field public static final int GL_STENCIL_REF = 2967; // 0xb97
    field public static final int GL_STENCIL_VALUE_MASK = 2963; // 0xb93
    field public static final int GL_STENCIL_WRITEMASK = 2968; // 0xb98
    field public static final int GL_SUBTRACT = 34023; // 0x84e7
    field public static final int GL_TEXTURE_BINDING_2D = 32873; // 0x8069
    field public static final int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 34970; // 0x889a
    field public static final int GL_TEXTURE_COORD_ARRAY_POINTER = 32914; // 0x8092
    field public static final int GL_TEXTURE_COORD_ARRAY_SIZE = 32904; // 0x8088
    field public static final int GL_TEXTURE_COORD_ARRAY_STRIDE = 32906; // 0x808a
    field public static final int GL_TEXTURE_COORD_ARRAY_TYPE = 32905; // 0x8089
    field public static final int GL_TEXTURE_MATRIX = 2984; // 0xba8
    field public static final int GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 35215; // 0x898f
    field public static final int GL_TEXTURE_STACK_DEPTH = 2981; // 0xba5
    field public static final int GL_VERTEX_ARRAY_BUFFER_BINDING = 34966; // 0x8896
    field public static final int GL_VERTEX_ARRAY_POINTER = 32910; // 0x808e
    field public static final int GL_VERTEX_ARRAY_SIZE = 32890; // 0x807a
    field public static final int GL_VERTEX_ARRAY_STRIDE = 32892; // 0x807c
    field public static final int GL_VERTEX_ARRAY_TYPE = 32891; // 0x807b
    field public static final int GL_VIEWPORT = 2978; // 0xba2
    field public static final int GL_WRITE_ONLY = 35001; // 0x88b9
  }

  public class GLES11Ext {
    ctor public GLES11Ext();
    method public static void glAlphaFuncxOES(int, int);
    method public static void glBindFramebufferOES(int, int);
    method public static void glBindRenderbufferOES(int, int);
    method public static void glBlendEquationOES(int);
    method public static void glBlendEquationSeparateOES(int, int);
    method public static void glBlendFuncSeparateOES(int, int, int, int);
    method public static int glCheckFramebufferStatusOES(int);
    method public static void glClearColorxOES(int, int, int, int);
    method public static void glClearDepthfOES(float);
    method public static void glClearDepthxOES(int);
    method public static void glClipPlanefOES(int, float[], int);
    method public static void glClipPlanefOES(int, java.nio.FloatBuffer);
    method public static void glClipPlanexOES(int, int[], int);
    method public static void glClipPlanexOES(int, java.nio.IntBuffer);
    method public static void glColor4xOES(int, int, int, int);
    method public static void glCurrentPaletteMatrixOES(int);
    method public static void glDeleteFramebuffersOES(int, int[], int);
    method public static void glDeleteFramebuffersOES(int, java.nio.IntBuffer);
    method public static void glDeleteRenderbuffersOES(int, int[], int);
    method public static void glDeleteRenderbuffersOES(int, java.nio.IntBuffer);
    method public static void glDepthRangefOES(float, float);
    method public static void glDepthRangexOES(int, int);
    method public static void glDrawTexfOES(float, float, float, float, float);
    method public static void glDrawTexfvOES(float[], int);
    method public static void glDrawTexfvOES(java.nio.FloatBuffer);
    method public static void glDrawTexiOES(int, int, int, int, int);
    method public static void glDrawTexivOES(int[], int);
    method public static void glDrawTexivOES(java.nio.IntBuffer);
    method public static void glDrawTexsOES(short, short, short, short, short);
    method public static void glDrawTexsvOES(short[], int);
    method public static void glDrawTexsvOES(java.nio.ShortBuffer);
    method public static void glDrawTexxOES(int, int, int, int, int);
    method public static void glDrawTexxvOES(int[], int);
    method public static void glDrawTexxvOES(java.nio.IntBuffer);
    method public static void glEGLImageTargetRenderbufferStorageOES(int, java.nio.Buffer);
    method public static void glEGLImageTargetTexture2DOES(int, java.nio.Buffer);
    method public static void glFogxOES(int, int);
    method public static void glFogxvOES(int, int[], int);
    method public static void glFogxvOES(int, java.nio.IntBuffer);
    method public static void glFramebufferRenderbufferOES(int, int, int, int);
    method public static void glFramebufferTexture2DOES(int, int, int, int, int);
    method public static void glFrustumfOES(float, float, float, float, float, float);
    method public static void glFrustumxOES(int, int, int, int, int, int);
    method public static void glGenFramebuffersOES(int, int[], int);
    method public static void glGenFramebuffersOES(int, java.nio.IntBuffer);
    method public static void glGenRenderbuffersOES(int, int[], int);
    method public static void glGenRenderbuffersOES(int, java.nio.IntBuffer);
    method public static void glGenerateMipmapOES(int);
    method public static void glGetClipPlanefOES(int, float[], int);
    method public static void glGetClipPlanefOES(int, java.nio.FloatBuffer);
    method public static void glGetClipPlanexOES(int, int[], int);
    method public static void glGetClipPlanexOES(int, java.nio.IntBuffer);
    method public static void glGetFixedvOES(int, int[], int);
    method public static void glGetFixedvOES(int, java.nio.IntBuffer);
    method public static void glGetFramebufferAttachmentParameterivOES(int, int, int, int[], int);
    method public static void glGetFramebufferAttachmentParameterivOES(int, int, int, java.nio.IntBuffer);
    method public static void glGetLightxvOES(int, int, int[], int);
    method public static void glGetLightxvOES(int, int, java.nio.IntBuffer);
    method public static void glGetMaterialxvOES(int, int, int[], int);
    method public static void glGetMaterialxvOES(int, int, java.nio.IntBuffer);
    method public static void glGetRenderbufferParameterivOES(int, int, int[], int);
    method public static void glGetRenderbufferParameterivOES(int, int, java.nio.IntBuffer);
    method public static void glGetTexEnvxvOES(int, int, int[], int);
    method public static void glGetTexEnvxvOES(int, int, java.nio.IntBuffer);
    method public static void glGetTexGenfvOES(int, int, float[], int);
    method public static void glGetTexGenfvOES(int, int, java.nio.FloatBuffer);
    method public static void glGetTexGenivOES(int, int, int[], int);
    method public static void glGetTexGenivOES(int, int, java.nio.IntBuffer);
    method public static void glGetTexGenxvOES(int, int, int[], int);
    method public static void glGetTexGenxvOES(int, int, java.nio.IntBuffer);
    method public static void glGetTexParameterxvOES(int, int, int[], int);
    method public static void glGetTexParameterxvOES(int, int, java.nio.IntBuffer);
    method public static boolean glIsFramebufferOES(int);
    method public static boolean glIsRenderbufferOES(int);
    method public static void glLightModelxOES(int, int);
    method public static void glLightModelxvOES(int, int[], int);
    method public static void glLightModelxvOES(int, java.nio.IntBuffer);
    method public static void glLightxOES(int, int, int);
    method public static void glLightxvOES(int, int, int[], int);
    method public static void glLightxvOES(int, int, java.nio.IntBuffer);
    method public static void glLineWidthxOES(int);
    method public static void glLoadMatrixxOES(int[], int);
    method public static void glLoadMatrixxOES(java.nio.IntBuffer);
    method public static void glLoadPaletteFromModelViewMatrixOES();
    method public static void glMaterialxOES(int, int, int);
    method public static void glMaterialxvOES(int, int, int[], int);
    method public static void glMaterialxvOES(int, int, java.nio.IntBuffer);
    method public static void glMatrixIndexPointerOES(int, int, int, java.nio.Buffer);
    method public static void glMultMatrixxOES(int[], int);
    method public static void glMultMatrixxOES(java.nio.IntBuffer);
    method public static void glMultiTexCoord4xOES(int, int, int, int, int);
    method public static void glNormal3xOES(int, int, int);
    method public static void glOrthofOES(float, float, float, float, float, float);
    method public static void glOrthoxOES(int, int, int, int, int, int);
    method public static void glPointParameterxOES(int, int);
    method public static void glPointParameterxvOES(int, int[], int);
    method public static void glPointParameterxvOES(int, java.nio.IntBuffer);
    method public static void glPointSizexOES(int);
    method public static void glPolygonOffsetxOES(int, int);
    method public static void glRenderbufferStorageOES(int, int, int, int);
    method public static void glRotatexOES(int, int, int, int);
    method public static void glSampleCoveragexOES(int, boolean);
    method public static void glScalexOES(int, int, int);
    method public static void glTexEnvxOES(int, int, int);
    method public static void glTexEnvxvOES(int, int, int[], int);
    method public static void glTexEnvxvOES(int, int, java.nio.IntBuffer);
    method public static void glTexGenfOES(int, int, float);
    method public static void glTexGenfvOES(int, int, float[], int);
    method public static void glTexGenfvOES(int, int, java.nio.FloatBuffer);
    method public static void glTexGeniOES(int, int, int);
    method public static void glTexGenivOES(int, int, int[], int);
    method public static void glTexGenivOES(int, int, java.nio.IntBuffer);
    method public static void glTexGenxOES(int, int, int);
    method public static void glTexGenxvOES(int, int, int[], int);
    method public static void glTexGenxvOES(int, int, java.nio.IntBuffer);
    method public static void glTexParameterxOES(int, int, int);
    method public static void glTexParameterxvOES(int, int, int[], int);
    method public static void glTexParameterxvOES(int, int, java.nio.IntBuffer);
    method public static void glTranslatexOES(int, int, int);
    method public static void glWeightPointerOES(int, int, int, java.nio.Buffer);
    field public static final int GL_3DC_XY_AMD = 34810; // 0x87fa
    field public static final int GL_3DC_X_AMD = 34809; // 0x87f9
    field public static final int GL_ATC_RGBA_EXPLICIT_ALPHA_AMD = 35987; // 0x8c93
    field public static final int GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD = 34798; // 0x87ee
    field public static final int GL_ATC_RGB_AMD = 35986; // 0x8c92
    field public static final int GL_BGRA = 32993; // 0x80e1
    field public static final int GL_BLEND_DST_ALPHA_OES = 32970; // 0x80ca
    field public static final int GL_BLEND_DST_RGB_OES = 32968; // 0x80c8
    field public static final int GL_BLEND_EQUATION_ALPHA_OES = 34877; // 0x883d
    field public static final int GL_BLEND_EQUATION_OES = 32777; // 0x8009
    field public static final int GL_BLEND_EQUATION_RGB_OES = 32777; // 0x8009
    field public static final int GL_BLEND_SRC_ALPHA_OES = 32971; // 0x80cb
    field public static final int GL_BLEND_SRC_RGB_OES = 32969; // 0x80c9
    field public static final int GL_BUFFER_ACCESS_OES = 35003; // 0x88bb
    field public static final int GL_BUFFER_MAPPED_OES = 35004; // 0x88bc
    field public static final int GL_BUFFER_MAP_POINTER_OES = 35005; // 0x88bd
    field public static final int GL_COLOR_ATTACHMENT0_OES = 36064; // 0x8ce0
    field public static final int GL_CURRENT_PALETTE_MATRIX_OES = 34883; // 0x8843
    field public static final int GL_DECR_WRAP_OES = 34056; // 0x8508
    field public static final int GL_DEPTH24_STENCIL8_OES = 35056; // 0x88f0
    field public static final int GL_DEPTH_ATTACHMENT_OES = 36096; // 0x8d00
    field public static final int GL_DEPTH_COMPONENT16_OES = 33189; // 0x81a5
    field public static final int GL_DEPTH_COMPONENT24_OES = 33190; // 0x81a6
    field public static final int GL_DEPTH_COMPONENT32_OES = 33191; // 0x81a7
    field public static final int GL_DEPTH_STENCIL_OES = 34041; // 0x84f9
    field public static final int GL_ETC1_RGB8_OES = 36196; // 0x8d64
    field public static final int GL_FIXED_OES = 5132; // 0x140c
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES = 36049; // 0x8cd1
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES = 36048; // 0x8cd0
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES = 36051; // 0x8cd3
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES = 36050; // 0x8cd2
    field public static final int GL_FRAMEBUFFER_BINDING_OES = 36006; // 0x8ca6
    field public static final int GL_FRAMEBUFFER_COMPLETE_OES = 36053; // 0x8cd5
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES = 36054; // 0x8cd6
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES = 36057; // 0x8cd9
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES = 36058; // 0x8cda
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES = 36055; // 0x8cd7
    field public static final int GL_FRAMEBUFFER_OES = 36160; // 0x8d40
    field public static final int GL_FRAMEBUFFER_UNSUPPORTED_OES = 36061; // 0x8cdd
    field public static final int GL_FUNC_ADD_OES = 32774; // 0x8006
    field public static final int GL_FUNC_REVERSE_SUBTRACT_OES = 32779; // 0x800b
    field public static final int GL_FUNC_SUBTRACT_OES = 32778; // 0x800a
    field public static final int GL_INCR_WRAP_OES = 34055; // 0x8507
    field public static final int GL_INVALID_FRAMEBUFFER_OPERATION_OES = 1286; // 0x506
    field public static final int GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES = 35742; // 0x8b9e
    field public static final int GL_MATRIX_INDEX_ARRAY_OES = 34884; // 0x8844
    field public static final int GL_MATRIX_INDEX_ARRAY_POINTER_OES = 34889; // 0x8849
    field public static final int GL_MATRIX_INDEX_ARRAY_SIZE_OES = 34886; // 0x8846
    field public static final int GL_MATRIX_INDEX_ARRAY_STRIDE_OES = 34888; // 0x8848
    field public static final int GL_MATRIX_INDEX_ARRAY_TYPE_OES = 34887; // 0x8847
    field public static final int GL_MATRIX_PALETTE_OES = 34880; // 0x8840
    field public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES = 34076; // 0x851c
    field public static final int GL_MAX_PALETTE_MATRICES_OES = 34882; // 0x8842
    field public static final int GL_MAX_RENDERBUFFER_SIZE_OES = 34024; // 0x84e8
    field public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 34047; // 0x84ff
    field public static final int GL_MAX_VERTEX_UNITS_OES = 34468; // 0x86a4
    field public static final int GL_MIRRORED_REPEAT_OES = 33648; // 0x8370
    field public static final int GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES = 35213; // 0x898d
    field public static final int GL_NONE_OES = 0; // 0x0
    field public static final int GL_NORMAL_MAP_OES = 34065; // 0x8511
    field public static final int GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES = 35214; // 0x898e
    field public static final int GL_REFLECTION_MAP_OES = 34066; // 0x8512
    field public static final int GL_RENDERBUFFER_ALPHA_SIZE_OES = 36179; // 0x8d53
    field public static final int GL_RENDERBUFFER_BINDING_OES = 36007; // 0x8ca7
    field public static final int GL_RENDERBUFFER_BLUE_SIZE_OES = 36178; // 0x8d52
    field public static final int GL_RENDERBUFFER_DEPTH_SIZE_OES = 36180; // 0x8d54
    field public static final int GL_RENDERBUFFER_GREEN_SIZE_OES = 36177; // 0x8d51
    field public static final int GL_RENDERBUFFER_HEIGHT_OES = 36163; // 0x8d43
    field public static final int GL_RENDERBUFFER_INTERNAL_FORMAT_OES = 36164; // 0x8d44
    field public static final int GL_RENDERBUFFER_OES = 36161; // 0x8d41
    field public static final int GL_RENDERBUFFER_RED_SIZE_OES = 36176; // 0x8d50
    field public static final int GL_RENDERBUFFER_STENCIL_SIZE_OES = 36181; // 0x8d55
    field public static final int GL_RENDERBUFFER_WIDTH_OES = 36162; // 0x8d42
    field public static final int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 36200; // 0x8d68
    field public static final int GL_RGB565_OES = 36194; // 0x8d62
    field public static final int GL_RGB5_A1_OES = 32855; // 0x8057
    field public static final int GL_RGB8_OES = 32849; // 0x8051
    field public static final int GL_RGBA4_OES = 32854; // 0x8056
    field public static final int GL_RGBA8_OES = 32856; // 0x8058
    field public static final int GL_SAMPLER_EXTERNAL_OES = 36198; // 0x8d66
    field public static final int GL_STENCIL_ATTACHMENT_OES = 36128; // 0x8d20
    field public static final int GL_STENCIL_INDEX1_OES = 36166; // 0x8d46
    field public static final int GL_STENCIL_INDEX4_OES = 36167; // 0x8d47
    field public static final int GL_STENCIL_INDEX8_OES = 36168; // 0x8d48
    field public static final int GL_TEXTURE_BINDING_CUBE_MAP_OES = 34068; // 0x8514
    field public static final int GL_TEXTURE_BINDING_EXTERNAL_OES = 36199; // 0x8d67
    field public static final int GL_TEXTURE_CROP_RECT_OES = 35741; // 0x8b9d
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES = 34070; // 0x8516
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES = 34072; // 0x8518
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES = 34074; // 0x851a
    field public static final int GL_TEXTURE_CUBE_MAP_OES = 34067; // 0x8513
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES = 34069; // 0x8515
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES = 34071; // 0x8517
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES = 34073; // 0x8519
    field public static final int GL_TEXTURE_EXTERNAL_OES = 36197; // 0x8d65
    field public static final int GL_TEXTURE_GEN_MODE_OES = 9472; // 0x2500
    field public static final int GL_TEXTURE_GEN_STR_OES = 36192; // 0x8d60
    field public static final int GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 35215; // 0x898f
    field public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 34046; // 0x84fe
    field public static final int GL_UNSIGNED_INT_24_8_OES = 34042; // 0x84fa
    field public static final int GL_WEIGHT_ARRAY_BUFFER_BINDING_OES = 34974; // 0x889e
    field public static final int GL_WEIGHT_ARRAY_OES = 34477; // 0x86ad
    field public static final int GL_WEIGHT_ARRAY_POINTER_OES = 34476; // 0x86ac
    field public static final int GL_WEIGHT_ARRAY_SIZE_OES = 34475; // 0x86ab
    field public static final int GL_WEIGHT_ARRAY_STRIDE_OES = 34474; // 0x86aa
    field public static final int GL_WEIGHT_ARRAY_TYPE_OES = 34473; // 0x86a9
    field public static final int GL_WRITE_ONLY_OES = 35001; // 0x88b9
  }

  public class GLES20 {
    ctor public GLES20();
    method public static void glActiveTexture(int);
    method public static void glAttachShader(int, int);
    method public static void glBindAttribLocation(int, int, java.lang.String);
    method public static void glBindBuffer(int, int);
    method public static void glBindFramebuffer(int, int);
    method public static void glBindRenderbuffer(int, int);
    method public static void glBindTexture(int, int);
    method public static void glBlendColor(float, float, float, float);
    method public static void glBlendEquation(int);
    method public static void glBlendEquationSeparate(int, int);
    method public static void glBlendFunc(int, int);
    method public static void glBlendFuncSeparate(int, int, int, int);
    method public static void glBufferData(int, int, java.nio.Buffer, int);
    method public static void glBufferSubData(int, int, int, java.nio.Buffer);
    method public static int glCheckFramebufferStatus(int);
    method public static void glClear(int);
    method public static void glClearColor(float, float, float, float);
    method public static void glClearDepthf(float);
    method public static void glClearStencil(int);
    method public static void glColorMask(boolean, boolean, boolean, boolean);
    method public static void glCompileShader(int);
    method public static void glCompressedTexImage2D(int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glCompressedTexSubImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glCopyTexImage2D(int, int, int, int, int, int, int, int);
    method public static void glCopyTexSubImage2D(int, int, int, int, int, int, int, int);
    method public static int glCreateProgram();
    method public static int glCreateShader(int);
    method public static void glCullFace(int);
    method public static void glDeleteBuffers(int, int[], int);
    method public static void glDeleteBuffers(int, java.nio.IntBuffer);
    method public static void glDeleteFramebuffers(int, int[], int);
    method public static void glDeleteFramebuffers(int, java.nio.IntBuffer);
    method public static void glDeleteProgram(int);
    method public static void glDeleteRenderbuffers(int, int[], int);
    method public static void glDeleteRenderbuffers(int, java.nio.IntBuffer);
    method public static void glDeleteShader(int);
    method public static void glDeleteTextures(int, int[], int);
    method public static void glDeleteTextures(int, java.nio.IntBuffer);
    method public static void glDepthFunc(int);
    method public static void glDepthMask(boolean);
    method public static void glDepthRangef(float, float);
    method public static void glDetachShader(int, int);
    method public static void glDisable(int);
    method public static void glDisableVertexAttribArray(int);
    method public static void glDrawArrays(int, int, int);
    method public static void glDrawElements(int, int, int, int);
    method public static void glDrawElements(int, int, int, java.nio.Buffer);
    method public static void glEnable(int);
    method public static void glEnableVertexAttribArray(int);
    method public static void glFinish();
    method public static void glFlush();
    method public static void glFramebufferRenderbuffer(int, int, int, int);
    method public static void glFramebufferTexture2D(int, int, int, int, int);
    method public static void glFrontFace(int);
    method public static void glGenBuffers(int, int[], int);
    method public static void glGenBuffers(int, java.nio.IntBuffer);
    method public static void glGenFramebuffers(int, int[], int);
    method public static void glGenFramebuffers(int, java.nio.IntBuffer);
    method public static void glGenRenderbuffers(int, int[], int);
    method public static void glGenRenderbuffers(int, java.nio.IntBuffer);
    method public static void glGenTextures(int, int[], int);
    method public static void glGenTextures(int, java.nio.IntBuffer);
    method public static void glGenerateMipmap(int);
    method public static void glGetActiveAttrib(int, int, int, int[], int, int[], int, int[], int, byte[], int);
    method public static java.lang.String glGetActiveAttrib(int, int, int[], int, int[], int);
    method public static java.lang.String glGetActiveAttrib(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static void glGetActiveUniform(int, int, int, int[], int, int[], int, int[], int, byte[], int);
    method public static java.lang.String glGetActiveUniform(int, int, int[], int, int[], int);
    method public static java.lang.String glGetActiveUniform(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static void glGetAttachedShaders(int, int, int[], int, int[], int);
    method public static void glGetAttachedShaders(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static int glGetAttribLocation(int, java.lang.String);
    method public static void glGetBooleanv(int, boolean[], int);
    method public static void glGetBooleanv(int, java.nio.IntBuffer);
    method public static void glGetBufferParameteriv(int, int, int[], int);
    method public static void glGetBufferParameteriv(int, int, java.nio.IntBuffer);
    method public static int glGetError();
    method public static void glGetFloatv(int, float[], int);
    method public static void glGetFloatv(int, java.nio.FloatBuffer);
    method public static void glGetFramebufferAttachmentParameteriv(int, int, int, int[], int);
    method public static void glGetFramebufferAttachmentParameteriv(int, int, int, java.nio.IntBuffer);
    method public static void glGetIntegerv(int, int[], int);
    method public static void glGetIntegerv(int, java.nio.IntBuffer);
    method public static java.lang.String glGetProgramInfoLog(int);
    method public static void glGetProgramiv(int, int, int[], int);
    method public static void glGetProgramiv(int, int, java.nio.IntBuffer);
    method public static void glGetRenderbufferParameteriv(int, int, int[], int);
    method public static void glGetRenderbufferParameteriv(int, int, java.nio.IntBuffer);
    method public static java.lang.String glGetShaderInfoLog(int);
    method public static void glGetShaderPrecisionFormat(int, int, int[], int, int[], int);
    method public static void glGetShaderPrecisionFormat(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static void glGetShaderSource(int, int, int[], int, byte[], int);
    method public static java.lang.String glGetShaderSource(int);
    method public static void glGetShaderiv(int, int, int[], int);
    method public static void glGetShaderiv(int, int, java.nio.IntBuffer);
    method public static java.lang.String glGetString(int);
    method public static void glGetTexParameterfv(int, int, float[], int);
    method public static void glGetTexParameterfv(int, int, java.nio.FloatBuffer);
    method public static void glGetTexParameteriv(int, int, int[], int);
    method public static void glGetTexParameteriv(int, int, java.nio.IntBuffer);
    method public static int glGetUniformLocation(int, java.lang.String);
    method public static void glGetUniformfv(int, int, float[], int);
    method public static void glGetUniformfv(int, int, java.nio.FloatBuffer);
    method public static void glGetUniformiv(int, int, int[], int);
    method public static void glGetUniformiv(int, int, java.nio.IntBuffer);
    method public static void glGetVertexAttribfv(int, int, float[], int);
    method public static void glGetVertexAttribfv(int, int, java.nio.FloatBuffer);
    method public static void glGetVertexAttribiv(int, int, int[], int);
    method public static void glGetVertexAttribiv(int, int, java.nio.IntBuffer);
    method public static void glHint(int, int);
    method public static boolean glIsBuffer(int);
    method public static boolean glIsEnabled(int);
    method public static boolean glIsFramebuffer(int);
    method public static boolean glIsProgram(int);
    method public static boolean glIsRenderbuffer(int);
    method public static boolean glIsShader(int);
    method public static boolean glIsTexture(int);
    method public static void glLineWidth(float);
    method public static void glLinkProgram(int);
    method public static void glPixelStorei(int, int);
    method public static void glPolygonOffset(float, float);
    method public static void glReadPixels(int, int, int, int, int, int, java.nio.Buffer);
    method public static void glReleaseShaderCompiler();
    method public static void glRenderbufferStorage(int, int, int, int);
    method public static void glSampleCoverage(float, boolean);
    method public static void glScissor(int, int, int, int);
    method public static void glShaderBinary(int, int[], int, int, java.nio.Buffer, int);
    method public static void glShaderBinary(int, java.nio.IntBuffer, int, java.nio.Buffer, int);
    method public static void glShaderSource(int, java.lang.String);
    method public static void glStencilFunc(int, int, int);
    method public static void glStencilFuncSeparate(int, int, int, int);
    method public static void glStencilMask(int);
    method public static void glStencilMaskSeparate(int, int);
    method public static void glStencilOp(int, int, int);
    method public static void glStencilOpSeparate(int, int, int, int);
    method public static void glTexImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glTexParameterf(int, int, float);
    method public static void glTexParameterfv(int, int, float[], int);
    method public static void glTexParameterfv(int, int, java.nio.FloatBuffer);
    method public static void glTexParameteri(int, int, int);
    method public static void glTexParameteriv(int, int, int[], int);
    method public static void glTexParameteriv(int, int, java.nio.IntBuffer);
    method public static void glTexSubImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glUniform1f(int, float);
    method public static void glUniform1fv(int, int, float[], int);
    method public static void glUniform1fv(int, int, java.nio.FloatBuffer);
    method public static void glUniform1i(int, int);
    method public static void glUniform1iv(int, int, int[], int);
    method public static void glUniform1iv(int, int, java.nio.IntBuffer);
    method public static void glUniform2f(int, float, float);
    method public static void glUniform2fv(int, int, float[], int);
    method public static void glUniform2fv(int, int, java.nio.FloatBuffer);
    method public static void glUniform2i(int, int, int);
    method public static void glUniform2iv(int, int, int[], int);
    method public static void glUniform2iv(int, int, java.nio.IntBuffer);
    method public static void glUniform3f(int, float, float, float);
    method public static void glUniform3fv(int, int, float[], int);
    method public static void glUniform3fv(int, int, java.nio.FloatBuffer);
    method public static void glUniform3i(int, int, int, int);
    method public static void glUniform3iv(int, int, int[], int);
    method public static void glUniform3iv(int, int, java.nio.IntBuffer);
    method public static void glUniform4f(int, float, float, float, float);
    method public static void glUniform4fv(int, int, float[], int);
    method public static void glUniform4fv(int, int, java.nio.FloatBuffer);
    method public static void glUniform4i(int, int, int, int, int);
    method public static void glUniform4iv(int, int, int[], int);
    method public static void glUniform4iv(int, int, java.nio.IntBuffer);
    method public static void glUniformMatrix2fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix2fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUniformMatrix3fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix3fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUniformMatrix4fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix4fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUseProgram(int);
    method public static void glValidateProgram(int);
    method public static void glVertexAttrib1f(int, float);
    method public static void glVertexAttrib1fv(int, float[], int);
    method public static void glVertexAttrib1fv(int, java.nio.FloatBuffer);
    method public static void glVertexAttrib2f(int, float, float);
    method public static void glVertexAttrib2fv(int, float[], int);
    method public static void glVertexAttrib2fv(int, java.nio.FloatBuffer);
    method public static void glVertexAttrib3f(int, float, float, float);
    method public static void glVertexAttrib3fv(int, float[], int);
    method public static void glVertexAttrib3fv(int, java.nio.FloatBuffer);
    method public static void glVertexAttrib4f(int, float, float, float, float);
    method public static void glVertexAttrib4fv(int, float[], int);
    method public static void glVertexAttrib4fv(int, java.nio.FloatBuffer);
    method public static void glVertexAttribPointer(int, int, int, boolean, int, int);
    method public static void glVertexAttribPointer(int, int, int, boolean, int, java.nio.Buffer);
    method public static void glViewport(int, int, int, int);
    field public static final int GL_ACTIVE_ATTRIBUTES = 35721; // 0x8b89
    field public static final int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722; // 0x8b8a
    field public static final int GL_ACTIVE_TEXTURE = 34016; // 0x84e0
    field public static final int GL_ACTIVE_UNIFORMS = 35718; // 0x8b86
    field public static final int GL_ACTIVE_UNIFORM_MAX_LENGTH = 35719; // 0x8b87
    field public static final int GL_ALIASED_LINE_WIDTH_RANGE = 33902; // 0x846e
    field public static final int GL_ALIASED_POINT_SIZE_RANGE = 33901; // 0x846d
    field public static final int GL_ALPHA = 6406; // 0x1906
    field public static final int GL_ALPHA_BITS = 3413; // 0xd55
    field public static final int GL_ALWAYS = 519; // 0x207
    field public static final int GL_ARRAY_BUFFER = 34962; // 0x8892
    field public static final int GL_ARRAY_BUFFER_BINDING = 34964; // 0x8894
    field public static final int GL_ATTACHED_SHADERS = 35717; // 0x8b85
    field public static final int GL_BACK = 1029; // 0x405
    field public static final int GL_BLEND = 3042; // 0xbe2
    field public static final int GL_BLEND_COLOR = 32773; // 0x8005
    field public static final int GL_BLEND_DST_ALPHA = 32970; // 0x80ca
    field public static final int GL_BLEND_DST_RGB = 32968; // 0x80c8
    field public static final int GL_BLEND_EQUATION = 32777; // 0x8009
    field public static final int GL_BLEND_EQUATION_ALPHA = 34877; // 0x883d
    field public static final int GL_BLEND_EQUATION_RGB = 32777; // 0x8009
    field public static final int GL_BLEND_SRC_ALPHA = 32971; // 0x80cb
    field public static final int GL_BLEND_SRC_RGB = 32969; // 0x80c9
    field public static final int GL_BLUE_BITS = 3412; // 0xd54
    field public static final int GL_BOOL = 35670; // 0x8b56
    field public static final int GL_BOOL_VEC2 = 35671; // 0x8b57
    field public static final int GL_BOOL_VEC3 = 35672; // 0x8b58
    field public static final int GL_BOOL_VEC4 = 35673; // 0x8b59
    field public static final int GL_BUFFER_SIZE = 34660; // 0x8764
    field public static final int GL_BUFFER_USAGE = 34661; // 0x8765
    field public static final int GL_BYTE = 5120; // 0x1400
    field public static final int GL_CCW = 2305; // 0x901
    field public static final int GL_CLAMP_TO_EDGE = 33071; // 0x812f
    field public static final int GL_COLOR_ATTACHMENT0 = 36064; // 0x8ce0
    field public static final int GL_COLOR_BUFFER_BIT = 16384; // 0x4000
    field public static final int GL_COLOR_CLEAR_VALUE = 3106; // 0xc22
    field public static final int GL_COLOR_WRITEMASK = 3107; // 0xc23
    field public static final int GL_COMPILE_STATUS = 35713; // 0x8b81
    field public static final int GL_COMPRESSED_TEXTURE_FORMATS = 34467; // 0x86a3
    field public static final int GL_CONSTANT_ALPHA = 32771; // 0x8003
    field public static final int GL_CONSTANT_COLOR = 32769; // 0x8001
    field public static final int GL_CULL_FACE = 2884; // 0xb44
    field public static final int GL_CULL_FACE_MODE = 2885; // 0xb45
    field public static final int GL_CURRENT_PROGRAM = 35725; // 0x8b8d
    field public static final int GL_CURRENT_VERTEX_ATTRIB = 34342; // 0x8626
    field public static final int GL_CW = 2304; // 0x900
    field public static final int GL_DECR = 7683; // 0x1e03
    field public static final int GL_DECR_WRAP = 34056; // 0x8508
    field public static final int GL_DELETE_STATUS = 35712; // 0x8b80
    field public static final int GL_DEPTH_ATTACHMENT = 36096; // 0x8d00
    field public static final int GL_DEPTH_BITS = 3414; // 0xd56
    field public static final int GL_DEPTH_BUFFER_BIT = 256; // 0x100
    field public static final int GL_DEPTH_CLEAR_VALUE = 2931; // 0xb73
    field public static final int GL_DEPTH_COMPONENT = 6402; // 0x1902
    field public static final int GL_DEPTH_COMPONENT16 = 33189; // 0x81a5
    field public static final int GL_DEPTH_FUNC = 2932; // 0xb74
    field public static final int GL_DEPTH_RANGE = 2928; // 0xb70
    field public static final int GL_DEPTH_TEST = 2929; // 0xb71
    field public static final int GL_DEPTH_WRITEMASK = 2930; // 0xb72
    field public static final int GL_DITHER = 3024; // 0xbd0
    field public static final int GL_DONT_CARE = 4352; // 0x1100
    field public static final int GL_DST_ALPHA = 772; // 0x304
    field public static final int GL_DST_COLOR = 774; // 0x306
    field public static final int GL_DYNAMIC_DRAW = 35048; // 0x88e8
    field public static final int GL_ELEMENT_ARRAY_BUFFER = 34963; // 0x8893
    field public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING = 34965; // 0x8895
    field public static final int GL_EQUAL = 514; // 0x202
    field public static final int GL_EXTENSIONS = 7939; // 0x1f03
    field public static final int GL_FALSE = 0; // 0x0
    field public static final int GL_FASTEST = 4353; // 0x1101
    field public static final int GL_FIXED = 5132; // 0x140c
    field public static final int GL_FLOAT = 5126; // 0x1406
    field public static final int GL_FLOAT_MAT2 = 35674; // 0x8b5a
    field public static final int GL_FLOAT_MAT3 = 35675; // 0x8b5b
    field public static final int GL_FLOAT_MAT4 = 35676; // 0x8b5c
    field public static final int GL_FLOAT_VEC2 = 35664; // 0x8b50
    field public static final int GL_FLOAT_VEC3 = 35665; // 0x8b51
    field public static final int GL_FLOAT_VEC4 = 35666; // 0x8b52
    field public static final int GL_FRAGMENT_SHADER = 35632; // 0x8b30
    field public static final int GL_FRAMEBUFFER = 36160; // 0x8d40
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049; // 0x8cd1
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048; // 0x8cd0
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051; // 0x8cd3
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050; // 0x8cd2
    field public static final int GL_FRAMEBUFFER_BINDING = 36006; // 0x8ca6
    field public static final int GL_FRAMEBUFFER_COMPLETE = 36053; // 0x8cd5
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054; // 0x8cd6
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057; // 0x8cd9
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055; // 0x8cd7
    field public static final int GL_FRAMEBUFFER_UNSUPPORTED = 36061; // 0x8cdd
    field public static final int GL_FRONT = 1028; // 0x404
    field public static final int GL_FRONT_AND_BACK = 1032; // 0x408
    field public static final int GL_FRONT_FACE = 2886; // 0xb46
    field public static final int GL_FUNC_ADD = 32774; // 0x8006
    field public static final int GL_FUNC_REVERSE_SUBTRACT = 32779; // 0x800b
    field public static final int GL_FUNC_SUBTRACT = 32778; // 0x800a
    field public static final int GL_GENERATE_MIPMAP_HINT = 33170; // 0x8192
    field public static final int GL_GEQUAL = 518; // 0x206
    field public static final int GL_GREATER = 516; // 0x204
    field public static final int GL_GREEN_BITS = 3411; // 0xd53
    field public static final int GL_HIGH_FLOAT = 36338; // 0x8df2
    field public static final int GL_HIGH_INT = 36341; // 0x8df5
    field public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT = 35739; // 0x8b9b
    field public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE = 35738; // 0x8b9a
    field public static final int GL_INCR = 7682; // 0x1e02
    field public static final int GL_INCR_WRAP = 34055; // 0x8507
    field public static final int GL_INFO_LOG_LENGTH = 35716; // 0x8b84
    field public static final int GL_INT = 5124; // 0x1404
    field public static final int GL_INT_VEC2 = 35667; // 0x8b53
    field public static final int GL_INT_VEC3 = 35668; // 0x8b54
    field public static final int GL_INT_VEC4 = 35669; // 0x8b55
    field public static final int GL_INVALID_ENUM = 1280; // 0x500
    field public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 1286; // 0x506
    field public static final int GL_INVALID_OPERATION = 1282; // 0x502
    field public static final int GL_INVALID_VALUE = 1281; // 0x501
    field public static final int GL_INVERT = 5386; // 0x150a
    field public static final int GL_KEEP = 7680; // 0x1e00
    field public static final int GL_LEQUAL = 515; // 0x203
    field public static final int GL_LESS = 513; // 0x201
    field public static final int GL_LINEAR = 9729; // 0x2601
    field public static final int GL_LINEAR_MIPMAP_LINEAR = 9987; // 0x2703
    field public static final int GL_LINEAR_MIPMAP_NEAREST = 9985; // 0x2701
    field public static final int GL_LINES = 1; // 0x1
    field public static final int GL_LINE_LOOP = 2; // 0x2
    field public static final int GL_LINE_STRIP = 3; // 0x3
    field public static final int GL_LINE_WIDTH = 2849; // 0xb21
    field public static final int GL_LINK_STATUS = 35714; // 0x8b82
    field public static final int GL_LOW_FLOAT = 36336; // 0x8df0
    field public static final int GL_LOW_INT = 36339; // 0x8df3
    field public static final int GL_LUMINANCE = 6409; // 0x1909
    field public static final int GL_LUMINANCE_ALPHA = 6410; // 0x190a
    field public static final int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661; // 0x8b4d
    field public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 34076; // 0x851c
    field public static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS = 36349; // 0x8dfd
    field public static final int GL_MAX_RENDERBUFFER_SIZE = 34024; // 0x84e8
    field public static final int GL_MAX_TEXTURE_IMAGE_UNITS = 34930; // 0x8872
    field public static final int GL_MAX_TEXTURE_SIZE = 3379; // 0xd33
    field public static final int GL_MAX_VARYING_VECTORS = 36348; // 0x8dfc
    field public static final int GL_MAX_VERTEX_ATTRIBS = 34921; // 0x8869
    field public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660; // 0x8b4c
    field public static final int GL_MAX_VERTEX_UNIFORM_VECTORS = 36347; // 0x8dfb
    field public static final int GL_MAX_VIEWPORT_DIMS = 3386; // 0xd3a
    field public static final int GL_MEDIUM_FLOAT = 36337; // 0x8df1
    field public static final int GL_MEDIUM_INT = 36340; // 0x8df4
    field public static final int GL_MIRRORED_REPEAT = 33648; // 0x8370
    field public static final int GL_NEAREST = 9728; // 0x2600
    field public static final int GL_NEAREST_MIPMAP_LINEAR = 9986; // 0x2702
    field public static final int GL_NEAREST_MIPMAP_NEAREST = 9984; // 0x2700
    field public static final int GL_NEVER = 512; // 0x200
    field public static final int GL_NICEST = 4354; // 0x1102
    field public static final int GL_NONE = 0; // 0x0
    field public static final int GL_NOTEQUAL = 517; // 0x205
    field public static final int GL_NO_ERROR = 0; // 0x0
    field public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 34466; // 0x86a2
    field public static final int GL_NUM_SHADER_BINARY_FORMATS = 36345; // 0x8df9
    field public static final int GL_ONE = 1; // 0x1
    field public static final int GL_ONE_MINUS_CONSTANT_ALPHA = 32772; // 0x8004
    field public static final int GL_ONE_MINUS_CONSTANT_COLOR = 32770; // 0x8002
    field public static final int GL_ONE_MINUS_DST_ALPHA = 773; // 0x305
    field public static final int GL_ONE_MINUS_DST_COLOR = 775; // 0x307
    field public static final int GL_ONE_MINUS_SRC_ALPHA = 771; // 0x303
    field public static final int GL_ONE_MINUS_SRC_COLOR = 769; // 0x301
    field public static final int GL_OUT_OF_MEMORY = 1285; // 0x505
    field public static final int GL_PACK_ALIGNMENT = 3333; // 0xd05
    field public static final int GL_POINTS = 0; // 0x0
    field public static final int GL_POLYGON_OFFSET_FACTOR = 32824; // 0x8038
    field public static final int GL_POLYGON_OFFSET_FILL = 32823; // 0x8037
    field public static final int GL_POLYGON_OFFSET_UNITS = 10752; // 0x2a00
    field public static final int GL_RED_BITS = 3410; // 0xd52
    field public static final int GL_RENDERBUFFER = 36161; // 0x8d41
    field public static final int GL_RENDERBUFFER_ALPHA_SIZE = 36179; // 0x8d53
    field public static final int GL_RENDERBUFFER_BINDING = 36007; // 0x8ca7
    field public static final int GL_RENDERBUFFER_BLUE_SIZE = 36178; // 0x8d52
    field public static final int GL_RENDERBUFFER_DEPTH_SIZE = 36180; // 0x8d54
    field public static final int GL_RENDERBUFFER_GREEN_SIZE = 36177; // 0x8d51
    field public static final int GL_RENDERBUFFER_HEIGHT = 36163; // 0x8d43
    field public static final int GL_RENDERBUFFER_INTERNAL_FORMAT = 36164; // 0x8d44
    field public static final int GL_RENDERBUFFER_RED_SIZE = 36176; // 0x8d50
    field public static final int GL_RENDERBUFFER_STENCIL_SIZE = 36181; // 0x8d55
    field public static final int GL_RENDERBUFFER_WIDTH = 36162; // 0x8d42
    field public static final int GL_RENDERER = 7937; // 0x1f01
    field public static final int GL_REPEAT = 10497; // 0x2901
    field public static final int GL_REPLACE = 7681; // 0x1e01
    field public static final int GL_RGB = 6407; // 0x1907
    field public static final int GL_RGB565 = 36194; // 0x8d62
    field public static final int GL_RGB5_A1 = 32855; // 0x8057
    field public static final int GL_RGBA = 6408; // 0x1908
    field public static final int GL_RGBA4 = 32854; // 0x8056
    field public static final int GL_SAMPLER_2D = 35678; // 0x8b5e
    field public static final int GL_SAMPLER_CUBE = 35680; // 0x8b60
    field public static final int GL_SAMPLES = 32937; // 0x80a9
    field public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 32926; // 0x809e
    field public static final int GL_SAMPLE_BUFFERS = 32936; // 0x80a8
    field public static final int GL_SAMPLE_COVERAGE = 32928; // 0x80a0
    field public static final int GL_SAMPLE_COVERAGE_INVERT = 32939; // 0x80ab
    field public static final int GL_SAMPLE_COVERAGE_VALUE = 32938; // 0x80aa
    field public static final int GL_SCISSOR_BOX = 3088; // 0xc10
    field public static final int GL_SCISSOR_TEST = 3089; // 0xc11
    field public static final int GL_SHADER_BINARY_FORMATS = 36344; // 0x8df8
    field public static final int GL_SHADER_COMPILER = 36346; // 0x8dfa
    field public static final int GL_SHADER_SOURCE_LENGTH = 35720; // 0x8b88
    field public static final int GL_SHADER_TYPE = 35663; // 0x8b4f
    field public static final int GL_SHADING_LANGUAGE_VERSION = 35724; // 0x8b8c
    field public static final int GL_SHORT = 5122; // 0x1402
    field public static final int GL_SRC_ALPHA = 770; // 0x302
    field public static final int GL_SRC_ALPHA_SATURATE = 776; // 0x308
    field public static final int GL_SRC_COLOR = 768; // 0x300
    field public static final int GL_STATIC_DRAW = 35044; // 0x88e4
    field public static final int GL_STENCIL_ATTACHMENT = 36128; // 0x8d20
    field public static final int GL_STENCIL_BACK_FAIL = 34817; // 0x8801
    field public static final int GL_STENCIL_BACK_FUNC = 34816; // 0x8800
    field public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL = 34818; // 0x8802
    field public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS = 34819; // 0x8803
    field public static final int GL_STENCIL_BACK_REF = 36003; // 0x8ca3
    field public static final int GL_STENCIL_BACK_VALUE_MASK = 36004; // 0x8ca4
    field public static final int GL_STENCIL_BACK_WRITEMASK = 36005; // 0x8ca5
    field public static final int GL_STENCIL_BITS = 3415; // 0xd57
    field public static final int GL_STENCIL_BUFFER_BIT = 1024; // 0x400
    field public static final int GL_STENCIL_CLEAR_VALUE = 2961; // 0xb91
    field public static final int GL_STENCIL_FAIL = 2964; // 0xb94
    field public static final int GL_STENCIL_FUNC = 2962; // 0xb92
    field public static final deprecated int GL_STENCIL_INDEX = 6401; // 0x1901
    field public static final int GL_STENCIL_INDEX8 = 36168; // 0x8d48
    field public static final int GL_STENCIL_PASS_DEPTH_FAIL = 2965; // 0xb95
    field public static final int GL_STENCIL_PASS_DEPTH_PASS = 2966; // 0xb96
    field public static final int GL_STENCIL_REF = 2967; // 0xb97
    field public static final int GL_STENCIL_TEST = 2960; // 0xb90
    field public static final int GL_STENCIL_VALUE_MASK = 2963; // 0xb93
    field public static final int GL_STENCIL_WRITEMASK = 2968; // 0xb98
    field public static final int GL_STREAM_DRAW = 35040; // 0x88e0
    field public static final int GL_SUBPIXEL_BITS = 3408; // 0xd50
    field public static final int GL_TEXTURE = 5890; // 0x1702
    field public static final int GL_TEXTURE0 = 33984; // 0x84c0
    field public static final int GL_TEXTURE1 = 33985; // 0x84c1
    field public static final int GL_TEXTURE10 = 33994; // 0x84ca
    field public static final int GL_TEXTURE11 = 33995; // 0x84cb
    field public static final int GL_TEXTURE12 = 33996; // 0x84cc
    field public static final int GL_TEXTURE13 = 33997; // 0x84cd
    field public static final int GL_TEXTURE14 = 33998; // 0x84ce
    field public static final int GL_TEXTURE15 = 33999; // 0x84cf
    field public static final int GL_TEXTURE16 = 34000; // 0x84d0
    field public static final int GL_TEXTURE17 = 34001; // 0x84d1
    field public static final int GL_TEXTURE18 = 34002; // 0x84d2
    field public static final int GL_TEXTURE19 = 34003; // 0x84d3
    field public static final int GL_TEXTURE2 = 33986; // 0x84c2
    field public static final int GL_TEXTURE20 = 34004; // 0x84d4
    field public static final int GL_TEXTURE21 = 34005; // 0x84d5
    field public static final int GL_TEXTURE22 = 34006; // 0x84d6
    field public static final int GL_TEXTURE23 = 34007; // 0x84d7
    field public static final int GL_TEXTURE24 = 34008; // 0x84d8
    field public static final int GL_TEXTURE25 = 34009; // 0x84d9
    field public static final int GL_TEXTURE26 = 34010; // 0x84da
    field public static final int GL_TEXTURE27 = 34011; // 0x84db
    field public static final int GL_TEXTURE28 = 34012; // 0x84dc
    field public static final int GL_TEXTURE29 = 34013; // 0x84dd
    field public static final int GL_TEXTURE3 = 33987; // 0x84c3
    field public static final int GL_TEXTURE30 = 34014; // 0x84de
    field public static final int GL_TEXTURE31 = 34015; // 0x84df
    field public static final int GL_TEXTURE4 = 33988; // 0x84c4
    field public static final int GL_TEXTURE5 = 33989; // 0x84c5
    field public static final int GL_TEXTURE6 = 33990; // 0x84c6
    field public static final int GL_TEXTURE7 = 33991; // 0x84c7
    field public static final int GL_TEXTURE8 = 33992; // 0x84c8
    field public static final int GL_TEXTURE9 = 33993; // 0x84c9
    field public static final int GL_TEXTURE_2D = 3553; // 0xde1
    field public static final int GL_TEXTURE_BINDING_2D = 32873; // 0x8069
    field public static final int GL_TEXTURE_BINDING_CUBE_MAP = 34068; // 0x8514
    field public static final int GL_TEXTURE_CUBE_MAP = 34067; // 0x8513
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070; // 0x8516
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072; // 0x8518
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074; // 0x851a
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 34069; // 0x8515
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071; // 0x8517
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073; // 0x8519
    field public static final int GL_TEXTURE_MAG_FILTER = 10240; // 0x2800
    field public static final int GL_TEXTURE_MIN_FILTER = 10241; // 0x2801
    field public static final int GL_TEXTURE_WRAP_S = 10242; // 0x2802
    field public static final int GL_TEXTURE_WRAP_T = 10243; // 0x2803
    field public static final int GL_TRIANGLES = 4; // 0x4
    field public static final int GL_TRIANGLE_FAN = 6; // 0x6
    field public static final int GL_TRIANGLE_STRIP = 5; // 0x5
    field public static final int GL_TRUE = 1; // 0x1
    field public static final int GL_UNPACK_ALIGNMENT = 3317; // 0xcf5
    field public static final int GL_UNSIGNED_BYTE = 5121; // 0x1401
    field public static final int GL_UNSIGNED_INT = 5125; // 0x1405
    field public static final int GL_UNSIGNED_SHORT = 5123; // 0x1403
    field public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 32819; // 0x8033
    field public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 32820; // 0x8034
    field public static final int GL_UNSIGNED_SHORT_5_6_5 = 33635; // 0x8363
    field public static final int GL_VALIDATE_STATUS = 35715; // 0x8b83
    field public static final int GL_VENDOR = 7936; // 0x1f00
    field public static final int GL_VERSION = 7938; // 0x1f02
    field public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975; // 0x889f
    field public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 34338; // 0x8622
    field public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922; // 0x886a
    field public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER = 34373; // 0x8645
    field public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE = 34339; // 0x8623
    field public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE = 34340; // 0x8624
    field public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE = 34341; // 0x8625
    field public static final int GL_VERTEX_SHADER = 35633; // 0x8b31
    field public static final int GL_VIEWPORT = 2978; // 0xba2
    field public static final int GL_ZERO = 0; // 0x0
  }

  public class GLES30 extends android.opengl.GLES20 {
    ctor public GLES30();
    method public static void glBeginQuery(int, int);
    method public static void glBeginTransformFeedback(int);
    method public static void glBindBufferBase(int, int, int);
    method public static void glBindBufferRange(int, int, int, int, int);
    method public static void glBindSampler(int, int);
    method public static void glBindTransformFeedback(int, int);
    method public static void glBindVertexArray(int);
    method public static void glBlitFramebuffer(int, int, int, int, int, int, int, int, int, int);
    method public static void glClearBufferfi(int, int, float, int);
    method public static void glClearBufferfv(int, int, float[], int);
    method public static void glClearBufferfv(int, int, java.nio.FloatBuffer);
    method public static void glClearBufferiv(int, int, int[], int);
    method public static void glClearBufferiv(int, int, java.nio.IntBuffer);
    method public static void glClearBufferuiv(int, int, int[], int);
    method public static void glClearBufferuiv(int, int, java.nio.IntBuffer);
    method public static int glClientWaitSync(long, int, long);
    method public static void glCompressedTexImage3D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glCompressedTexImage3D(int, int, int, int, int, int, int, int, int);
    method public static void glCompressedTexSubImage3D(int, int, int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glCompressedTexSubImage3D(int, int, int, int, int, int, int, int, int, int, int);
    method public static void glCopyBufferSubData(int, int, int, int, int);
    method public static void glCopyTexSubImage3D(int, int, int, int, int, int, int, int, int);
    method public static void glDeleteQueries(int, int[], int);
    method public static void glDeleteQueries(int, java.nio.IntBuffer);
    method public static void glDeleteSamplers(int, int[], int);
    method public static void glDeleteSamplers(int, java.nio.IntBuffer);
    method public static void glDeleteSync(long);
    method public static void glDeleteTransformFeedbacks(int, int[], int);
    method public static void glDeleteTransformFeedbacks(int, java.nio.IntBuffer);
    method public static void glDeleteVertexArrays(int, int[], int);
    method public static void glDeleteVertexArrays(int, java.nio.IntBuffer);
    method public static void glDrawArraysInstanced(int, int, int, int);
    method public static void glDrawBuffers(int, int[], int);
    method public static void glDrawBuffers(int, java.nio.IntBuffer);
    method public static void glDrawElementsInstanced(int, int, int, java.nio.Buffer, int);
    method public static void glDrawElementsInstanced(int, int, int, int, int);
    method public static void glDrawRangeElements(int, int, int, int, int, java.nio.Buffer);
    method public static void glDrawRangeElements(int, int, int, int, int, int);
    method public static void glEndQuery(int);
    method public static void glEndTransformFeedback();
    method public static long glFenceSync(int, int);
    method public static void glFlushMappedBufferRange(int, int, int);
    method public static void glFramebufferTextureLayer(int, int, int, int, int);
    method public static void glGenQueries(int, int[], int);
    method public static void glGenQueries(int, java.nio.IntBuffer);
    method public static void glGenSamplers(int, int[], int);
    method public static void glGenSamplers(int, java.nio.IntBuffer);
    method public static void glGenTransformFeedbacks(int, int[], int);
    method public static void glGenTransformFeedbacks(int, java.nio.IntBuffer);
    method public static void glGenVertexArrays(int, int[], int);
    method public static void glGenVertexArrays(int, java.nio.IntBuffer);
    method public static void glGetActiveUniformBlockName(int, int, int, int[], int, byte[], int);
    method public static void glGetActiveUniformBlockName(int, int, java.nio.Buffer, java.nio.Buffer);
    method public static java.lang.String glGetActiveUniformBlockName(int, int);
    method public static void glGetActiveUniformBlockiv(int, int, int, int[], int);
    method public static void glGetActiveUniformBlockiv(int, int, int, java.nio.IntBuffer);
    method public static void glGetActiveUniformsiv(int, int, int[], int, int, int[], int);
    method public static void glGetActiveUniformsiv(int, int, java.nio.IntBuffer, int, java.nio.IntBuffer);
    method public static void glGetBufferParameteri64v(int, int, long[], int);
    method public static void glGetBufferParameteri64v(int, int, java.nio.LongBuffer);
    method public static java.nio.Buffer glGetBufferPointerv(int, int);
    method public static int glGetFragDataLocation(int, java.lang.String);
    method public static void glGetInteger64i_v(int, int, long[], int);
    method public static void glGetInteger64i_v(int, int, java.nio.LongBuffer);
    method public static void glGetInteger64v(int, long[], int);
    method public static void glGetInteger64v(int, java.nio.LongBuffer);
    method public static void glGetIntegeri_v(int, int, int[], int);
    method public static void glGetIntegeri_v(int, int, java.nio.IntBuffer);
    method public static void glGetInternalformativ(int, int, int, int, int[], int);
    method public static void glGetInternalformativ(int, int, int, int, java.nio.IntBuffer);
    method public static void glGetProgramBinary(int, int, int[], int, int[], int, java.nio.Buffer);
    method public static void glGetProgramBinary(int, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.Buffer);
    method public static void glGetQueryObjectuiv(int, int, int[], int);
    method public static void glGetQueryObjectuiv(int, int, java.nio.IntBuffer);
    method public static void glGetQueryiv(int, int, int[], int);
    method public static void glGetQueryiv(int, int, java.nio.IntBuffer);
    method public static void glGetSamplerParameterfv(int, int, float[], int);
    method public static void glGetSamplerParameterfv(int, int, java.nio.FloatBuffer);
    method public static void glGetSamplerParameteriv(int, int, int[], int);
    method public static void glGetSamplerParameteriv(int, int, java.nio.IntBuffer);
    method public static java.lang.String glGetStringi(int, int);
    method public static void glGetSynciv(long, int, int, int[], int, int[], int);
    method public static void glGetSynciv(long, int, int, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static void glGetTransformFeedbackVarying(int, int, int, int[], int, int[], int, int[], int, byte[], int);
    method public static void glGetTransformFeedbackVarying(int, int, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, byte);
    method public static java.lang.String glGetTransformFeedbackVarying(int, int, int[], int, int[], int);
    method public static java.lang.String glGetTransformFeedbackVarying(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static int glGetUniformBlockIndex(int, java.lang.String);
    method public static void glGetUniformIndices(int, java.lang.String[], int[], int);
    method public static void glGetUniformIndices(int, java.lang.String[], java.nio.IntBuffer);
    method public static void glGetUniformuiv(int, int, int[], int);
    method public static void glGetUniformuiv(int, int, java.nio.IntBuffer);
    method public static void glGetVertexAttribIiv(int, int, int[], int);
    method public static void glGetVertexAttribIiv(int, int, java.nio.IntBuffer);
    method public static void glGetVertexAttribIuiv(int, int, int[], int);
    method public static void glGetVertexAttribIuiv(int, int, java.nio.IntBuffer);
    method public static void glInvalidateFramebuffer(int, int, int[], int);
    method public static void glInvalidateFramebuffer(int, int, java.nio.IntBuffer);
    method public static void glInvalidateSubFramebuffer(int, int, int[], int, int, int, int, int);
    method public static void glInvalidateSubFramebuffer(int, int, java.nio.IntBuffer, int, int, int, int);
    method public static boolean glIsQuery(int);
    method public static boolean glIsSampler(int);
    method public static boolean glIsSync(long);
    method public static boolean glIsTransformFeedback(int);
    method public static boolean glIsVertexArray(int);
    method public static java.nio.Buffer glMapBufferRange(int, int, int, int);
    method public static void glPauseTransformFeedback();
    method public static void glProgramBinary(int, int, java.nio.Buffer, int);
    method public static void glProgramParameteri(int, int, int);
    method public static void glReadBuffer(int);
    method public static void glRenderbufferStorageMultisample(int, int, int, int, int);
    method public static void glResumeTransformFeedback();
    method public static void glSamplerParameterf(int, int, float);
    method public static void glSamplerParameterfv(int, int, float[], int);
    method public static void glSamplerParameterfv(int, int, java.nio.FloatBuffer);
    method public static void glSamplerParameteri(int, int, int);
    method public static void glSamplerParameteriv(int, int, int[], int);
    method public static void glSamplerParameteriv(int, int, java.nio.IntBuffer);
    method public static void glTexImage3D(int, int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glTexImage3D(int, int, int, int, int, int, int, int, int, int);
    method public static void glTexStorage2D(int, int, int, int, int);
    method public static void glTexStorage3D(int, int, int, int, int, int);
    method public static void glTexSubImage3D(int, int, int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glTexSubImage3D(int, int, int, int, int, int, int, int, int, int, int);
    method public static void glTransformFeedbackVaryings(int, java.lang.String[], int);
    method public static void glUniform1ui(int, int);
    method public static void glUniform1uiv(int, int, int[], int);
    method public static void glUniform1uiv(int, int, java.nio.IntBuffer);
    method public static void glUniform2ui(int, int, int);
    method public static void glUniform2uiv(int, int, int[], int);
    method public static void glUniform2uiv(int, int, java.nio.IntBuffer);
    method public static void glUniform3ui(int, int, int, int);
    method public static void glUniform3uiv(int, int, int[], int);
    method public static void glUniform3uiv(int, int, java.nio.IntBuffer);
    method public static void glUniform4ui(int, int, int, int, int);
    method public static void glUniform4uiv(int, int, int[], int);
    method public static void glUniform4uiv(int, int, java.nio.IntBuffer);
    method public static void glUniformBlockBinding(int, int, int);
    method public static void glUniformMatrix2x3fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix2x3fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUniformMatrix2x4fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix2x4fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUniformMatrix3x2fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix3x2fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUniformMatrix3x4fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix3x4fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUniformMatrix4x2fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix4x2fv(int, int, boolean, java.nio.FloatBuffer);
    method public static void glUniformMatrix4x3fv(int, int, boolean, float[], int);
    method public static void glUniformMatrix4x3fv(int, int, boolean, java.nio.FloatBuffer);
    method public static boolean glUnmapBuffer(int);
    method public static void glVertexAttribDivisor(int, int);
    method public static void glVertexAttribI4i(int, int, int, int, int);
    method public static void glVertexAttribI4iv(int, int[], int);
    method public static void glVertexAttribI4iv(int, java.nio.IntBuffer);
    method public static void glVertexAttribI4ui(int, int, int, int, int);
    method public static void glVertexAttribI4uiv(int, int[], int);
    method public static void glVertexAttribI4uiv(int, java.nio.IntBuffer);
    method public static void glVertexAttribIPointer(int, int, int, int, java.nio.Buffer);
    method public static void glVertexAttribIPointer(int, int, int, int, int);
    method public static void glWaitSync(long, int, long);
    field public static final int GL_ACTIVE_UNIFORM_BLOCKS = 35382; // 0x8a36
    field public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 35381; // 0x8a35
    field public static final int GL_ALREADY_SIGNALED = 37146; // 0x911a
    field public static final int GL_ANY_SAMPLES_PASSED = 35887; // 0x8c2f
    field public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 36202; // 0x8d6a
    field public static final int GL_BLUE = 6405; // 0x1905
    field public static final int GL_BUFFER_ACCESS_FLAGS = 37151; // 0x911f
    field public static final int GL_BUFFER_MAPPED = 35004; // 0x88bc
    field public static final int GL_BUFFER_MAP_LENGTH = 37152; // 0x9120
    field public static final int GL_BUFFER_MAP_OFFSET = 37153; // 0x9121
    field public static final int GL_BUFFER_MAP_POINTER = 35005; // 0x88bd
    field public static final int GL_COLOR = 6144; // 0x1800
    field public static final int GL_COLOR_ATTACHMENT1 = 36065; // 0x8ce1
    field public static final int GL_COLOR_ATTACHMENT10 = 36074; // 0x8cea
    field public static final int GL_COLOR_ATTACHMENT11 = 36075; // 0x8ceb
    field public static final int GL_COLOR_ATTACHMENT12 = 36076; // 0x8cec
    field public static final int GL_COLOR_ATTACHMENT13 = 36077; // 0x8ced
    field public static final int GL_COLOR_ATTACHMENT14 = 36078; // 0x8cee
    field public static final int GL_COLOR_ATTACHMENT15 = 36079; // 0x8cef
    field public static final int GL_COLOR_ATTACHMENT2 = 36066; // 0x8ce2
    field public static final int GL_COLOR_ATTACHMENT3 = 36067; // 0x8ce3
    field public static final int GL_COLOR_ATTACHMENT4 = 36068; // 0x8ce4
    field public static final int GL_COLOR_ATTACHMENT5 = 36069; // 0x8ce5
    field public static final int GL_COLOR_ATTACHMENT6 = 36070; // 0x8ce6
    field public static final int GL_COLOR_ATTACHMENT7 = 36071; // 0x8ce7
    field public static final int GL_COLOR_ATTACHMENT8 = 36072; // 0x8ce8
    field public static final int GL_COLOR_ATTACHMENT9 = 36073; // 0x8ce9
    field public static final int GL_COMPARE_REF_TO_TEXTURE = 34894; // 0x884e
    field public static final int GL_COMPRESSED_R11_EAC = 37488; // 0x9270
    field public static final int GL_COMPRESSED_RG11_EAC = 37490; // 0x9272
    field public static final int GL_COMPRESSED_RGB8_ETC2 = 37492; // 0x9274
    field public static final int GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494; // 0x9276
    field public static final int GL_COMPRESSED_RGBA8_ETC2_EAC = 37496; // 0x9278
    field public static final int GL_COMPRESSED_SIGNED_R11_EAC = 37489; // 0x9271
    field public static final int GL_COMPRESSED_SIGNED_RG11_EAC = 37491; // 0x9273
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497; // 0x9279
    field public static final int GL_COMPRESSED_SRGB8_ETC2 = 37493; // 0x9275
    field public static final int GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495; // 0x9277
    field public static final int GL_CONDITION_SATISFIED = 37148; // 0x911c
    field public static final int GL_COPY_READ_BUFFER = 36662; // 0x8f36
    field public static final int GL_COPY_READ_BUFFER_BINDING = 36662; // 0x8f36
    field public static final int GL_COPY_WRITE_BUFFER = 36663; // 0x8f37
    field public static final int GL_COPY_WRITE_BUFFER_BINDING = 36663; // 0x8f37
    field public static final int GL_CURRENT_QUERY = 34917; // 0x8865
    field public static final int GL_DEPTH = 6145; // 0x1801
    field public static final int GL_DEPTH24_STENCIL8 = 35056; // 0x88f0
    field public static final int GL_DEPTH32F_STENCIL8 = 36013; // 0x8cad
    field public static final int GL_DEPTH_COMPONENT24 = 33190; // 0x81a6
    field public static final int GL_DEPTH_COMPONENT32F = 36012; // 0x8cac
    field public static final int GL_DEPTH_STENCIL = 34041; // 0x84f9
    field public static final int GL_DEPTH_STENCIL_ATTACHMENT = 33306; // 0x821a
    field public static final int GL_DRAW_BUFFER0 = 34853; // 0x8825
    field public static final int GL_DRAW_BUFFER1 = 34854; // 0x8826
    field public static final int GL_DRAW_BUFFER10 = 34863; // 0x882f
    field public static final int GL_DRAW_BUFFER11 = 34864; // 0x8830
    field public static final int GL_DRAW_BUFFER12 = 34865; // 0x8831
    field public static final int GL_DRAW_BUFFER13 = 34866; // 0x8832
    field public static final int GL_DRAW_BUFFER14 = 34867; // 0x8833
    field public static final int GL_DRAW_BUFFER15 = 34868; // 0x8834
    field public static final int GL_DRAW_BUFFER2 = 34855; // 0x8827
    field public static final int GL_DRAW_BUFFER3 = 34856; // 0x8828
    field public static final int GL_DRAW_BUFFER4 = 34857; // 0x8829
    field public static final int GL_DRAW_BUFFER5 = 34858; // 0x882a
    field public static final int GL_DRAW_BUFFER6 = 34859; // 0x882b
    field public static final int GL_DRAW_BUFFER7 = 34860; // 0x882c
    field public static final int GL_DRAW_BUFFER8 = 34861; // 0x882d
    field public static final int GL_DRAW_BUFFER9 = 34862; // 0x882e
    field public static final int GL_DRAW_FRAMEBUFFER = 36009; // 0x8ca9
    field public static final int GL_DRAW_FRAMEBUFFER_BINDING = 36006; // 0x8ca6
    field public static final int GL_DYNAMIC_COPY = 35050; // 0x88ea
    field public static final int GL_DYNAMIC_READ = 35049; // 0x88e9
    field public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 36269; // 0x8dad
    field public static final int GL_FLOAT_MAT2x3 = 35685; // 0x8b65
    field public static final int GL_FLOAT_MAT2x4 = 35686; // 0x8b66
    field public static final int GL_FLOAT_MAT3x2 = 35687; // 0x8b67
    field public static final int GL_FLOAT_MAT3x4 = 35688; // 0x8b68
    field public static final int GL_FLOAT_MAT4x2 = 35689; // 0x8b69
    field public static final int GL_FLOAT_MAT4x3 = 35690; // 0x8b6a
    field public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 35723; // 0x8b8b
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 33301; // 0x8215
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 33300; // 0x8214
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 33296; // 0x8210
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 33297; // 0x8211
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 33302; // 0x8216
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 33299; // 0x8213
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 33298; // 0x8212
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 33303; // 0x8217
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 36052; // 0x8cd4
    field public static final int GL_FRAMEBUFFER_DEFAULT = 33304; // 0x8218
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 36182; // 0x8d56
    field public static final int GL_FRAMEBUFFER_UNDEFINED = 33305; // 0x8219
    field public static final int GL_GREEN = 6404; // 0x1904
    field public static final int GL_HALF_FLOAT = 5131; // 0x140b
    field public static final int GL_INTERLEAVED_ATTRIBS = 35980; // 0x8c8c
    field public static final int GL_INT_2_10_10_10_REV = 36255; // 0x8d9f
    field public static final int GL_INT_SAMPLER_2D = 36298; // 0x8dca
    field public static final int GL_INT_SAMPLER_2D_ARRAY = 36303; // 0x8dcf
    field public static final int GL_INT_SAMPLER_3D = 36299; // 0x8dcb
    field public static final int GL_INT_SAMPLER_CUBE = 36300; // 0x8dcc
    field public static final int GL_INVALID_INDEX = -1; // 0xffffffff
    field public static final int GL_MAJOR_VERSION = 33307; // 0x821b
    field public static final int GL_MAP_FLUSH_EXPLICIT_BIT = 16; // 0x10
    field public static final int GL_MAP_INVALIDATE_BUFFER_BIT = 8; // 0x8
    field public static final int GL_MAP_INVALIDATE_RANGE_BIT = 4; // 0x4
    field public static final int GL_MAP_READ_BIT = 1; // 0x1
    field public static final int GL_MAP_UNSYNCHRONIZED_BIT = 32; // 0x20
    field public static final int GL_MAP_WRITE_BIT = 2; // 0x2
    field public static final int GL_MAX = 32776; // 0x8008
    field public static final int GL_MAX_3D_TEXTURE_SIZE = 32883; // 0x8073
    field public static final int GL_MAX_ARRAY_TEXTURE_LAYERS = 35071; // 0x88ff
    field public static final int GL_MAX_COLOR_ATTACHMENTS = 36063; // 0x8cdf
    field public static final int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 35379; // 0x8a33
    field public static final int GL_MAX_COMBINED_UNIFORM_BLOCKS = 35374; // 0x8a2e
    field public static final int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 35377; // 0x8a31
    field public static final int GL_MAX_DRAW_BUFFERS = 34852; // 0x8824
    field public static final int GL_MAX_ELEMENTS_INDICES = 33001; // 0x80e9
    field public static final int GL_MAX_ELEMENTS_VERTICES = 33000; // 0x80e8
    field public static final int GL_MAX_ELEMENT_INDEX = 36203; // 0x8d6b
    field public static final int GL_MAX_FRAGMENT_INPUT_COMPONENTS = 37157; // 0x9125
    field public static final int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 35373; // 0x8a2d
    field public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 35657; // 0x8b49
    field public static final int GL_MAX_PROGRAM_TEXEL_OFFSET = 35077; // 0x8905
    field public static final int GL_MAX_SAMPLES = 36183; // 0x8d57
    field public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 37137; // 0x9111
    field public static final int GL_MAX_TEXTURE_LOD_BIAS = 34045; // 0x84fd
    field public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 35978; // 0x8c8a
    field public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 35979; // 0x8c8b
    field public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 35968; // 0x8c80
    field public static final int GL_MAX_UNIFORM_BLOCK_SIZE = 35376; // 0x8a30
    field public static final int GL_MAX_UNIFORM_BUFFER_BINDINGS = 35375; // 0x8a2f
    field public static final int GL_MAX_VARYING_COMPONENTS = 35659; // 0x8b4b
    field public static final int GL_MAX_VERTEX_OUTPUT_COMPONENTS = 37154; // 0x9122
    field public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS = 35371; // 0x8a2b
    field public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 35658; // 0x8b4a
    field public static final int GL_MIN = 32775; // 0x8007
    field public static final int GL_MINOR_VERSION = 33308; // 0x821c
    field public static final int GL_MIN_PROGRAM_TEXEL_OFFSET = 35076; // 0x8904
    field public static final int GL_NUM_EXTENSIONS = 33309; // 0x821d
    field public static final int GL_NUM_PROGRAM_BINARY_FORMATS = 34814; // 0x87fe
    field public static final int GL_NUM_SAMPLE_COUNTS = 37760; // 0x9380
    field public static final int GL_OBJECT_TYPE = 37138; // 0x9112
    field public static final int GL_PACK_ROW_LENGTH = 3330; // 0xd02
    field public static final int GL_PACK_SKIP_PIXELS = 3332; // 0xd04
    field public static final int GL_PACK_SKIP_ROWS = 3331; // 0xd03
    field public static final int GL_PIXEL_PACK_BUFFER = 35051; // 0x88eb
    field public static final int GL_PIXEL_PACK_BUFFER_BINDING = 35053; // 0x88ed
    field public static final int GL_PIXEL_UNPACK_BUFFER = 35052; // 0x88ec
    field public static final int GL_PIXEL_UNPACK_BUFFER_BINDING = 35055; // 0x88ef
    field public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 36201; // 0x8d69
    field public static final int GL_PROGRAM_BINARY_FORMATS = 34815; // 0x87ff
    field public static final int GL_PROGRAM_BINARY_LENGTH = 34625; // 0x8741
    field public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 33367; // 0x8257
    field public static final int GL_QUERY_RESULT = 34918; // 0x8866
    field public static final int GL_QUERY_RESULT_AVAILABLE = 34919; // 0x8867
    field public static final int GL_R11F_G11F_B10F = 35898; // 0x8c3a
    field public static final int GL_R16F = 33325; // 0x822d
    field public static final int GL_R16I = 33331; // 0x8233
    field public static final int GL_R16UI = 33332; // 0x8234
    field public static final int GL_R32F = 33326; // 0x822e
    field public static final int GL_R32I = 33333; // 0x8235
    field public static final int GL_R32UI = 33334; // 0x8236
    field public static final int GL_R8 = 33321; // 0x8229
    field public static final int GL_R8I = 33329; // 0x8231
    field public static final int GL_R8UI = 33330; // 0x8232
    field public static final int GL_R8_SNORM = 36756; // 0x8f94
    field public static final int GL_RASTERIZER_DISCARD = 35977; // 0x8c89
    field public static final int GL_READ_BUFFER = 3074; // 0xc02
    field public static final int GL_READ_FRAMEBUFFER = 36008; // 0x8ca8
    field public static final int GL_READ_FRAMEBUFFER_BINDING = 36010; // 0x8caa
    field public static final int GL_RED = 6403; // 0x1903
    field public static final int GL_RED_INTEGER = 36244; // 0x8d94
    field public static final int GL_RENDERBUFFER_SAMPLES = 36011; // 0x8cab
    field public static final int GL_RG = 33319; // 0x8227
    field public static final int GL_RG16F = 33327; // 0x822f
    field public static final int GL_RG16I = 33337; // 0x8239
    field public static final int GL_RG16UI = 33338; // 0x823a
    field public static final int GL_RG32F = 33328; // 0x8230
    field public static final int GL_RG32I = 33339; // 0x823b
    field public static final int GL_RG32UI = 33340; // 0x823c
    field public static final int GL_RG8 = 33323; // 0x822b
    field public static final int GL_RG8I = 33335; // 0x8237
    field public static final int GL_RG8UI = 33336; // 0x8238
    field public static final int GL_RG8_SNORM = 36757; // 0x8f95
    field public static final int GL_RGB10_A2 = 32857; // 0x8059
    field public static final int GL_RGB10_A2UI = 36975; // 0x906f
    field public static final int GL_RGB16F = 34843; // 0x881b
    field public static final int GL_RGB16I = 36233; // 0x8d89
    field public static final int GL_RGB16UI = 36215; // 0x8d77
    field public static final int GL_RGB32F = 34837; // 0x8815
    field public static final int GL_RGB32I = 36227; // 0x8d83
    field public static final int GL_RGB32UI = 36209; // 0x8d71
    field public static final int GL_RGB8 = 32849; // 0x8051
    field public static final int GL_RGB8I = 36239; // 0x8d8f
    field public static final int GL_RGB8UI = 36221; // 0x8d7d
    field public static final int GL_RGB8_SNORM = 36758; // 0x8f96
    field public static final int GL_RGB9_E5 = 35901; // 0x8c3d
    field public static final int GL_RGBA16F = 34842; // 0x881a
    field public static final int GL_RGBA16I = 36232; // 0x8d88
    field public static final int GL_RGBA16UI = 36214; // 0x8d76
    field public static final int GL_RGBA32F = 34836; // 0x8814
    field public static final int GL_RGBA32I = 36226; // 0x8d82
    field public static final int GL_RGBA32UI = 36208; // 0x8d70
    field public static final int GL_RGBA8 = 32856; // 0x8058
    field public static final int GL_RGBA8I = 36238; // 0x8d8e
    field public static final int GL_RGBA8UI = 36220; // 0x8d7c
    field public static final int GL_RGBA8_SNORM = 36759; // 0x8f97
    field public static final int GL_RGBA_INTEGER = 36249; // 0x8d99
    field public static final int GL_RGB_INTEGER = 36248; // 0x8d98
    field public static final int GL_RG_INTEGER = 33320; // 0x8228
    field public static final int GL_SAMPLER_2D_ARRAY = 36289; // 0x8dc1
    field public static final int GL_SAMPLER_2D_ARRAY_SHADOW = 36292; // 0x8dc4
    field public static final int GL_SAMPLER_2D_SHADOW = 35682; // 0x8b62
    field public static final int GL_SAMPLER_3D = 35679; // 0x8b5f
    field public static final int GL_SAMPLER_BINDING = 35097; // 0x8919
    field public static final int GL_SAMPLER_CUBE_SHADOW = 36293; // 0x8dc5
    field public static final int GL_SEPARATE_ATTRIBS = 35981; // 0x8c8d
    field public static final int GL_SIGNALED = 37145; // 0x9119
    field public static final int GL_SIGNED_NORMALIZED = 36764; // 0x8f9c
    field public static final int GL_SRGB = 35904; // 0x8c40
    field public static final int GL_SRGB8 = 35905; // 0x8c41
    field public static final int GL_SRGB8_ALPHA8 = 35907; // 0x8c43
    field public static final int GL_STATIC_COPY = 35046; // 0x88e6
    field public static final int GL_STATIC_READ = 35045; // 0x88e5
    field public static final int GL_STENCIL = 6146; // 0x1802
    field public static final int GL_STREAM_COPY = 35042; // 0x88e2
    field public static final int GL_STREAM_READ = 35041; // 0x88e1
    field public static final int GL_SYNC_CONDITION = 37139; // 0x9113
    field public static final int GL_SYNC_FENCE = 37142; // 0x9116
    field public static final int GL_SYNC_FLAGS = 37141; // 0x9115
    field public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 1; // 0x1
    field public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 37143; // 0x9117
    field public static final int GL_SYNC_STATUS = 37140; // 0x9114
    field public static final int GL_TEXTURE_2D_ARRAY = 35866; // 0x8c1a
    field public static final int GL_TEXTURE_3D = 32879; // 0x806f
    field public static final int GL_TEXTURE_BASE_LEVEL = 33084; // 0x813c
    field public static final int GL_TEXTURE_BINDING_2D_ARRAY = 35869; // 0x8c1d
    field public static final int GL_TEXTURE_BINDING_3D = 32874; // 0x806a
    field public static final int GL_TEXTURE_COMPARE_FUNC = 34893; // 0x884d
    field public static final int GL_TEXTURE_COMPARE_MODE = 34892; // 0x884c
    field public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 37167; // 0x912f
    field public static final int GL_TEXTURE_IMMUTABLE_LEVELS = 33503; // 0x82df
    field public static final int GL_TEXTURE_MAX_LEVEL = 33085; // 0x813d
    field public static final int GL_TEXTURE_MAX_LOD = 33083; // 0x813b
    field public static final int GL_TEXTURE_MIN_LOD = 33082; // 0x813a
    field public static final int GL_TEXTURE_SWIZZLE_A = 36421; // 0x8e45
    field public static final int GL_TEXTURE_SWIZZLE_B = 36420; // 0x8e44
    field public static final int GL_TEXTURE_SWIZZLE_G = 36419; // 0x8e43
    field public static final int GL_TEXTURE_SWIZZLE_R = 36418; // 0x8e42
    field public static final int GL_TEXTURE_WRAP_R = 32882; // 0x8072
    field public static final int GL_TIMEOUT_EXPIRED = 37147; // 0x911b
    field public static final long GL_TIMEOUT_IGNORED = -1L; // 0xffffffffffffffffL
    field public static final int GL_TRANSFORM_FEEDBACK = 36386; // 0x8e22
    field public static final int GL_TRANSFORM_FEEDBACK_ACTIVE = 36388; // 0x8e24
    field public static final int GL_TRANSFORM_FEEDBACK_BINDING = 36389; // 0x8e25
    field public static final int GL_TRANSFORM_FEEDBACK_BUFFER = 35982; // 0x8c8e
    field public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 35983; // 0x8c8f
    field public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 35967; // 0x8c7f
    field public static final int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 35973; // 0x8c85
    field public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START = 35972; // 0x8c84
    field public static final int GL_TRANSFORM_FEEDBACK_PAUSED = 36387; // 0x8e23
    field public static final int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 35976; // 0x8c88
    field public static final int GL_TRANSFORM_FEEDBACK_VARYINGS = 35971; // 0x8c83
    field public static final int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 35958; // 0x8c76
    field public static final int GL_UNIFORM_ARRAY_STRIDE = 35388; // 0x8a3c
    field public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 35394; // 0x8a42
    field public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 35395; // 0x8a43
    field public static final int GL_UNIFORM_BLOCK_BINDING = 35391; // 0x8a3f
    field public static final int GL_UNIFORM_BLOCK_DATA_SIZE = 35392; // 0x8a40
    field public static final int GL_UNIFORM_BLOCK_INDEX = 35386; // 0x8a3a
    field public static final int GL_UNIFORM_BLOCK_NAME_LENGTH = 35393; // 0x8a41
    field public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 35398; // 0x8a46
    field public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 35396; // 0x8a44
    field public static final int GL_UNIFORM_BUFFER = 35345; // 0x8a11
    field public static final int GL_UNIFORM_BUFFER_BINDING = 35368; // 0x8a28
    field public static final int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 35380; // 0x8a34
    field public static final int GL_UNIFORM_BUFFER_SIZE = 35370; // 0x8a2a
    field public static final int GL_UNIFORM_BUFFER_START = 35369; // 0x8a29
    field public static final int GL_UNIFORM_IS_ROW_MAJOR = 35390; // 0x8a3e
    field public static final int GL_UNIFORM_MATRIX_STRIDE = 35389; // 0x8a3d
    field public static final int GL_UNIFORM_NAME_LENGTH = 35385; // 0x8a39
    field public static final int GL_UNIFORM_OFFSET = 35387; // 0x8a3b
    field public static final int GL_UNIFORM_SIZE = 35384; // 0x8a38
    field public static final int GL_UNIFORM_TYPE = 35383; // 0x8a37
    field public static final int GL_UNPACK_IMAGE_HEIGHT = 32878; // 0x806e
    field public static final int GL_UNPACK_ROW_LENGTH = 3314; // 0xcf2
    field public static final int GL_UNPACK_SKIP_IMAGES = 32877; // 0x806d
    field public static final int GL_UNPACK_SKIP_PIXELS = 3316; // 0xcf4
    field public static final int GL_UNPACK_SKIP_ROWS = 3315; // 0xcf3
    field public static final int GL_UNSIGNALED = 37144; // 0x9118
    field public static final int GL_UNSIGNED_INT_10F_11F_11F_REV = 35899; // 0x8c3b
    field public static final int GL_UNSIGNED_INT_24_8 = 34042; // 0x84fa
    field public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 33640; // 0x8368
    field public static final int GL_UNSIGNED_INT_5_9_9_9_REV = 35902; // 0x8c3e
    field public static final int GL_UNSIGNED_INT_SAMPLER_2D = 36306; // 0x8dd2
    field public static final int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 36311; // 0x8dd7
    field public static final int GL_UNSIGNED_INT_SAMPLER_3D = 36307; // 0x8dd3
    field public static final int GL_UNSIGNED_INT_SAMPLER_CUBE = 36308; // 0x8dd4
    field public static final int GL_UNSIGNED_INT_VEC2 = 36294; // 0x8dc6
    field public static final int GL_UNSIGNED_INT_VEC3 = 36295; // 0x8dc7
    field public static final int GL_UNSIGNED_INT_VEC4 = 36296; // 0x8dc8
    field public static final int GL_UNSIGNED_NORMALIZED = 35863; // 0x8c17
    field public static final int GL_VERTEX_ARRAY_BINDING = 34229; // 0x85b5
    field public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 35070; // 0x88fe
    field public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 35069; // 0x88fd
    field public static final int GL_WAIT_FAILED = 37149; // 0x911d
  }

  public class GLES31 extends android.opengl.GLES30 {
    method public static void glActiveShaderProgram(int, int);
    method public static void glBindImageTexture(int, int, int, boolean, int, int, int);
    method public static void glBindProgramPipeline(int);
    method public static void glBindVertexBuffer(int, int, long, int);
    method public static int glCreateShaderProgramv(int, java.lang.String[]);
    method public static void glDeleteProgramPipelines(int, int[], int);
    method public static void glDeleteProgramPipelines(int, java.nio.IntBuffer);
    method public static void glDispatchCompute(int, int, int);
    method public static void glDispatchComputeIndirect(long);
    method public static void glDrawArraysIndirect(int, long);
    method public static void glDrawElementsIndirect(int, int, long);
    method public static void glFramebufferParameteri(int, int, int);
    method public static void glGenProgramPipelines(int, int[], int);
    method public static void glGenProgramPipelines(int, java.nio.IntBuffer);
    method public static void glGetBooleani_v(int, int, boolean[], int);
    method public static void glGetBooleani_v(int, int, java.nio.IntBuffer);
    method public static void glGetFramebufferParameteriv(int, int, int[], int);
    method public static void glGetFramebufferParameteriv(int, int, java.nio.IntBuffer);
    method public static void glGetMultisamplefv(int, int, float[], int);
    method public static void glGetMultisamplefv(int, int, java.nio.FloatBuffer);
    method public static void glGetProgramInterfaceiv(int, int, int, int[], int);
    method public static void glGetProgramInterfaceiv(int, int, int, java.nio.IntBuffer);
    method public static java.lang.String glGetProgramPipelineInfoLog(int);
    method public static void glGetProgramPipelineiv(int, int, int[], int);
    method public static void glGetProgramPipelineiv(int, int, java.nio.IntBuffer);
    method public static int glGetProgramResourceIndex(int, int, java.lang.String);
    method public static int glGetProgramResourceLocation(int, int, java.lang.String);
    method public static java.lang.String glGetProgramResourceName(int, int, int);
    method public static void glGetProgramResourceiv(int, int, int, int, int[], int, int, int[], int, int[], int);
    method public static void glGetProgramResourceiv(int, int, int, int, java.nio.IntBuffer, int, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static void glGetTexLevelParameterfv(int, int, int, float[], int);
    method public static void glGetTexLevelParameterfv(int, int, int, java.nio.FloatBuffer);
    method public static void glGetTexLevelParameteriv(int, int, int, int[], int);
    method public static void glGetTexLevelParameteriv(int, int, int, java.nio.IntBuffer);
    method public static boolean glIsProgramPipeline(int);
    method public static void glMemoryBarrier(int);
    method public static void glMemoryBarrierByRegion(int);
    method public static void glProgramUniform1f(int, int, float);
    method public static void glProgramUniform1fv(int, int, int, float[], int);
    method public static void glProgramUniform1fv(int, int, int, java.nio.FloatBuffer);
    method public static void glProgramUniform1i(int, int, int);
    method public static void glProgramUniform1iv(int, int, int, int[], int);
    method public static void glProgramUniform1iv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniform1ui(int, int, int);
    method public static void glProgramUniform1uiv(int, int, int, int[], int);
    method public static void glProgramUniform1uiv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniform2f(int, int, float, float);
    method public static void glProgramUniform2fv(int, int, int, float[], int);
    method public static void glProgramUniform2fv(int, int, int, java.nio.FloatBuffer);
    method public static void glProgramUniform2i(int, int, int, int);
    method public static void glProgramUniform2iv(int, int, int, int[], int);
    method public static void glProgramUniform2iv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniform2ui(int, int, int, int);
    method public static void glProgramUniform2uiv(int, int, int, int[], int);
    method public static void glProgramUniform2uiv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniform3f(int, int, float, float, float);
    method public static void glProgramUniform3fv(int, int, int, float[], int);
    method public static void glProgramUniform3fv(int, int, int, java.nio.FloatBuffer);
    method public static void glProgramUniform3i(int, int, int, int, int);
    method public static void glProgramUniform3iv(int, int, int, int[], int);
    method public static void glProgramUniform3iv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniform3ui(int, int, int, int, int);
    method public static void glProgramUniform3uiv(int, int, int, int[], int);
    method public static void glProgramUniform3uiv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniform4f(int, int, float, float, float, float);
    method public static void glProgramUniform4fv(int, int, int, float[], int);
    method public static void glProgramUniform4fv(int, int, int, java.nio.FloatBuffer);
    method public static void glProgramUniform4i(int, int, int, int, int, int);
    method public static void glProgramUniform4iv(int, int, int, int[], int);
    method public static void glProgramUniform4iv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniform4ui(int, int, int, int, int, int);
    method public static void glProgramUniform4uiv(int, int, int, int[], int);
    method public static void glProgramUniform4uiv(int, int, int, java.nio.IntBuffer);
    method public static void glProgramUniformMatrix2fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix2fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix2x3fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix2x3fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix2x4fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix2x4fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix3fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix3fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix3x2fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix3x2fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix3x4fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix3x4fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix4fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix4fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix4x2fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix4x2fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glProgramUniformMatrix4x3fv(int, int, int, boolean, float[], int);
    method public static void glProgramUniformMatrix4x3fv(int, int, int, boolean, java.nio.FloatBuffer);
    method public static void glSampleMaski(int, int);
    method public static void glTexStorage2DMultisample(int, int, int, int, int, boolean);
    method public static void glUseProgramStages(int, int, int);
    method public static void glValidateProgramPipeline(int);
    method public static void glVertexAttribBinding(int, int);
    method public static void glVertexAttribFormat(int, int, int, boolean, int);
    method public static void glVertexAttribIFormat(int, int, int, int);
    method public static void glVertexBindingDivisor(int, int);
    field public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 37593; // 0x92d9
    field public static final int GL_ACTIVE_PROGRAM = 33369; // 0x8259
    field public static final int GL_ACTIVE_RESOURCES = 37621; // 0x92f5
    field public static final int GL_ACTIVE_VARIABLES = 37637; // 0x9305
    field public static final int GL_ALL_SHADER_BITS = -1; // 0xffffffff
    field public static final int GL_ARRAY_SIZE = 37627; // 0x92fb
    field public static final int GL_ARRAY_STRIDE = 37630; // 0x92fe
    field public static final int GL_ATOMIC_COUNTER_BARRIER_BIT = 4096; // 0x1000
    field public static final int GL_ATOMIC_COUNTER_BUFFER = 37568; // 0x92c0
    field public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = 37569; // 0x92c1
    field public static final int GL_ATOMIC_COUNTER_BUFFER_INDEX = 37633; // 0x9301
    field public static final int GL_ATOMIC_COUNTER_BUFFER_SIZE = 37571; // 0x92c3
    field public static final int GL_ATOMIC_COUNTER_BUFFER_START = 37570; // 0x92c2
    field public static final int GL_BLOCK_INDEX = 37629; // 0x92fd
    field public static final int GL_BUFFER_BINDING = 37634; // 0x9302
    field public static final int GL_BUFFER_DATA_SIZE = 37635; // 0x9303
    field public static final int GL_BUFFER_UPDATE_BARRIER_BIT = 512; // 0x200
    field public static final int GL_BUFFER_VARIABLE = 37605; // 0x92e5
    field public static final int GL_COMMAND_BARRIER_BIT = 64; // 0x40
    field public static final int GL_COMPUTE_SHADER = 37305; // 0x91b9
    field public static final int GL_COMPUTE_SHADER_BIT = 32; // 0x20
    field public static final int GL_COMPUTE_WORK_GROUP_SIZE = 33383; // 0x8267
    field public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = 37098; // 0x90ea
    field public static final int GL_DISPATCH_INDIRECT_BUFFER = 37102; // 0x90ee
    field public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 37103; // 0x90ef
    field public static final int GL_DRAW_INDIRECT_BUFFER = 36671; // 0x8f3f
    field public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = 36675; // 0x8f43
    field public static final int GL_FRAGMENT_SHADER_BIT = 2; // 0x2
    field public static final int GL_FRAMEBUFFER_BARRIER_BIT = 1024; // 0x400
    field public static final int GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 37652; // 0x9314
    field public static final int GL_FRAMEBUFFER_DEFAULT_HEIGHT = 37649; // 0x9311
    field public static final int GL_FRAMEBUFFER_DEFAULT_SAMPLES = 37651; // 0x9313
    field public static final int GL_FRAMEBUFFER_DEFAULT_WIDTH = 37648; // 0x9310
    field public static final int GL_IMAGE_2D = 36941; // 0x904d
    field public static final int GL_IMAGE_2D_ARRAY = 36947; // 0x9053
    field public static final int GL_IMAGE_3D = 36942; // 0x904e
    field public static final int GL_IMAGE_BINDING_ACCESS = 36670; // 0x8f3e
    field public static final int GL_IMAGE_BINDING_FORMAT = 36974; // 0x906e
    field public static final int GL_IMAGE_BINDING_LAYER = 36669; // 0x8f3d
    field public static final int GL_IMAGE_BINDING_LAYERED = 36668; // 0x8f3c
    field public static final int GL_IMAGE_BINDING_LEVEL = 36667; // 0x8f3b
    field public static final int GL_IMAGE_BINDING_NAME = 36666; // 0x8f3a
    field public static final int GL_IMAGE_CUBE = 36944; // 0x9050
    field public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 37065; // 0x90c9
    field public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 37064; // 0x90c8
    field public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 37063; // 0x90c7
    field public static final int GL_INT_IMAGE_2D = 36952; // 0x9058
    field public static final int GL_INT_IMAGE_2D_ARRAY = 36958; // 0x905e
    field public static final int GL_INT_IMAGE_3D = 36953; // 0x9059
    field public static final int GL_INT_IMAGE_CUBE = 36955; // 0x905b
    field public static final int GL_INT_SAMPLER_2D_MULTISAMPLE = 37129; // 0x9109
    field public static final int GL_IS_ROW_MAJOR = 37632; // 0x9300
    field public static final int GL_LOCATION = 37646; // 0x930e
    field public static final int GL_MATRIX_STRIDE = 37631; // 0x92ff
    field public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 37596; // 0x92dc
    field public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 37592; // 0x92d8
    field public static final int GL_MAX_COLOR_TEXTURE_SAMPLES = 37134; // 0x910e
    field public static final int GL_MAX_COMBINED_ATOMIC_COUNTERS = 37591; // 0x92d7
    field public static final int GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 37585; // 0x92d1
    field public static final int GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 33382; // 0x8266
    field public static final int GL_MAX_COMBINED_IMAGE_UNIFORMS = 37071; // 0x90cf
    field public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 36665; // 0x8f39
    field public static final int GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 37084; // 0x90dc
    field public static final int GL_MAX_COMPUTE_ATOMIC_COUNTERS = 33381; // 0x8265
    field public static final int GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 33380; // 0x8264
    field public static final int GL_MAX_COMPUTE_IMAGE_UNIFORMS = 37309; // 0x91bd
    field public static final int GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 37083; // 0x90db
    field public static final int GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 33378; // 0x8262
    field public static final int GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 37308; // 0x91bc
    field public static final int GL_MAX_COMPUTE_UNIFORM_BLOCKS = 37307; // 0x91bb
    field public static final int GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 33379; // 0x8263
    field public static final int GL_MAX_COMPUTE_WORK_GROUP_COUNT = 37310; // 0x91be
    field public static final int GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 37099; // 0x90eb
    field public static final int GL_MAX_COMPUTE_WORK_GROUP_SIZE = 37311; // 0x91bf
    field public static final int GL_MAX_DEPTH_TEXTURE_SAMPLES = 37135; // 0x910f
    field public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 37590; // 0x92d6
    field public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 37584; // 0x92d0
    field public static final int GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 37070; // 0x90ce
    field public static final int GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 37082; // 0x90da
    field public static final int GL_MAX_FRAMEBUFFER_HEIGHT = 37654; // 0x9316
    field public static final int GL_MAX_FRAMEBUFFER_SAMPLES = 37656; // 0x9318
    field public static final int GL_MAX_FRAMEBUFFER_WIDTH = 37653; // 0x9315
    field public static final int GL_MAX_IMAGE_UNITS = 36664; // 0x8f38
    field public static final int GL_MAX_INTEGER_SAMPLES = 37136; // 0x9110
    field public static final int GL_MAX_NAME_LENGTH = 37622; // 0x92f6
    field public static final int GL_MAX_NUM_ACTIVE_VARIABLES = 37623; // 0x92f7
    field public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 36447; // 0x8e5f
    field public static final int GL_MAX_SAMPLE_MASK_WORDS = 36441; // 0x8e59
    field public static final int GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 37086; // 0x90de
    field public static final int GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 37085; // 0x90dd
    field public static final int GL_MAX_UNIFORM_LOCATIONS = 33390; // 0x826e
    field public static final int GL_MAX_VERTEX_ATOMIC_COUNTERS = 37586; // 0x92d2
    field public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 37580; // 0x92cc
    field public static final int GL_MAX_VERTEX_ATTRIB_BINDINGS = 33498; // 0x82da
    field public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 33497; // 0x82d9
    field public static final int GL_MAX_VERTEX_ATTRIB_STRIDE = 33509; // 0x82e5
    field public static final int GL_MAX_VERTEX_IMAGE_UNIFORMS = 37066; // 0x90ca
    field public static final int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 37078; // 0x90d6
    field public static final int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 36446; // 0x8e5e
    field public static final int GL_NAME_LENGTH = 37625; // 0x92f9
    field public static final int GL_NUM_ACTIVE_VARIABLES = 37636; // 0x9304
    field public static final int GL_OFFSET = 37628; // 0x92fc
    field public static final int GL_PIXEL_BUFFER_BARRIER_BIT = 128; // 0x80
    field public static final int GL_PROGRAM_INPUT = 37603; // 0x92e3
    field public static final int GL_PROGRAM_OUTPUT = 37604; // 0x92e4
    field public static final int GL_PROGRAM_PIPELINE_BINDING = 33370; // 0x825a
    field public static final int GL_PROGRAM_SEPARABLE = 33368; // 0x8258
    field public static final int GL_READ_ONLY = 35000; // 0x88b8
    field public static final int GL_READ_WRITE = 35002; // 0x88ba
    field public static final int GL_REFERENCED_BY_COMPUTE_SHADER = 37643; // 0x930b
    field public static final int GL_REFERENCED_BY_FRAGMENT_SHADER = 37642; // 0x930a
    field public static final int GL_REFERENCED_BY_VERTEX_SHADER = 37638; // 0x9306
    field public static final int GL_SAMPLER_2D_MULTISAMPLE = 37128; // 0x9108
    field public static final int GL_SAMPLE_MASK = 36433; // 0x8e51
    field public static final int GL_SAMPLE_MASK_VALUE = 36434; // 0x8e52
    field public static final int GL_SAMPLE_POSITION = 36432; // 0x8e50
    field public static final int GL_SHADER_STORAGE_BARRIER_BIT = 8192; // 0x2000
    field public static final int GL_SHADER_STORAGE_BLOCK = 37606; // 0x92e6
    field public static final int GL_SHADER_STORAGE_BUFFER = 37074; // 0x90d2
    field public static final int GL_SHADER_STORAGE_BUFFER_BINDING = 37075; // 0x90d3
    field public static final int GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 37087; // 0x90df
    field public static final int GL_SHADER_STORAGE_BUFFER_SIZE = 37077; // 0x90d5
    field public static final int GL_SHADER_STORAGE_BUFFER_START = 37076; // 0x90d4
    field public static final int GL_STENCIL_INDEX = 6401; // 0x1901
    field public static final int GL_TEXTURE_2D_MULTISAMPLE = 37120; // 0x9100
    field public static final int GL_TEXTURE_ALPHA_SIZE = 32863; // 0x805f
    field public static final int GL_TEXTURE_ALPHA_TYPE = 35859; // 0x8c13
    field public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE = 37124; // 0x9104
    field public static final int GL_TEXTURE_BLUE_SIZE = 32862; // 0x805e
    field public static final int GL_TEXTURE_BLUE_TYPE = 35858; // 0x8c12
    field public static final int GL_TEXTURE_COMPRESSED = 34465; // 0x86a1
    field public static final int GL_TEXTURE_DEPTH = 32881; // 0x8071
    field public static final int GL_TEXTURE_DEPTH_SIZE = 34890; // 0x884a
    field public static final int GL_TEXTURE_DEPTH_TYPE = 35862; // 0x8c16
    field public static final int GL_TEXTURE_FETCH_BARRIER_BIT = 8; // 0x8
    field public static final int GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 37127; // 0x9107
    field public static final int GL_TEXTURE_GREEN_SIZE = 32861; // 0x805d
    field public static final int GL_TEXTURE_GREEN_TYPE = 35857; // 0x8c11
    field public static final int GL_TEXTURE_HEIGHT = 4097; // 0x1001
    field public static final int GL_TEXTURE_INTERNAL_FORMAT = 4099; // 0x1003
    field public static final int GL_TEXTURE_RED_SIZE = 32860; // 0x805c
    field public static final int GL_TEXTURE_RED_TYPE = 35856; // 0x8c10
    field public static final int GL_TEXTURE_SAMPLES = 37126; // 0x9106
    field public static final int GL_TEXTURE_SHARED_SIZE = 35903; // 0x8c3f
    field public static final int GL_TEXTURE_STENCIL_SIZE = 35057; // 0x88f1
    field public static final int GL_TEXTURE_UPDATE_BARRIER_BIT = 256; // 0x100
    field public static final int GL_TEXTURE_WIDTH = 4096; // 0x1000
    field public static final int GL_TOP_LEVEL_ARRAY_SIZE = 37644; // 0x930c
    field public static final int GL_TOP_LEVEL_ARRAY_STRIDE = 37645; // 0x930d
    field public static final int GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 2048; // 0x800
    field public static final int GL_TRANSFORM_FEEDBACK_VARYING = 37620; // 0x92f4
    field public static final int GL_TYPE = 37626; // 0x92fa
    field public static final int GL_UNIFORM = 37601; // 0x92e1
    field public static final int GL_UNIFORM_BARRIER_BIT = 4; // 0x4
    field public static final int GL_UNIFORM_BLOCK = 37602; // 0x92e2
    field public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = 37595; // 0x92db
    field public static final int GL_UNSIGNED_INT_IMAGE_2D = 36963; // 0x9063
    field public static final int GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 36969; // 0x9069
    field public static final int GL_UNSIGNED_INT_IMAGE_3D = 36964; // 0x9064
    field public static final int GL_UNSIGNED_INT_IMAGE_CUBE = 36966; // 0x9066
    field public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 37130; // 0x910a
    field public static final int GL_VERTEX_ATTRIB_BINDING = 33492; // 0x82d4
    field public static final int GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 33493; // 0x82d5
    field public static final int GL_VERTEX_BINDING_BUFFER = 36687; // 0x8f4f
    field public static final int GL_VERTEX_BINDING_DIVISOR = 33494; // 0x82d6
    field public static final int GL_VERTEX_BINDING_OFFSET = 33495; // 0x82d7
    field public static final int GL_VERTEX_BINDING_STRIDE = 33496; // 0x82d8
    field public static final int GL_VERTEX_SHADER_BIT = 1; // 0x1
    field public static final int GL_WRITE_ONLY = 35001; // 0x88b9
  }

  public class GLES31Ext {
    method public static void glBlendBarrierKHR();
    method public static void glBlendEquationSeparateiEXT(int, int, int);
    method public static void glBlendEquationiEXT(int, int);
    method public static void glBlendFuncSeparateiEXT(int, int, int, int, int);
    method public static void glBlendFunciEXT(int, int, int);
    method public static void glColorMaskiEXT(int, boolean, boolean, boolean, boolean);
    method public static void glCopyImageSubDataEXT(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
    method public static void glDebugMessageCallbackKHR(android.opengl.GLES31Ext.DebugProcKHR);
    method public static void glDebugMessageControlKHR(int, int, int, int, int[], int, boolean);
    method public static void glDebugMessageControlKHR(int, int, int, int, java.nio.IntBuffer, boolean);
    method public static void glDebugMessageInsertKHR(int, int, int, int, java.lang.String);
    method public static void glDisableiEXT(int, int);
    method public static void glEnableiEXT(int, int);
    method public static void glFramebufferTextureEXT(int, int, int, int);
    method public static android.opengl.GLES31Ext.DebugProcKHR glGetDebugMessageCallbackKHR();
    method public static int glGetDebugMessageLogKHR(int, int, int[], int, int[], int, int[], int, int[], int, int[], int, byte[], int);
    method public static int glGetDebugMessageLogKHR(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.ByteBuffer);
    method public static java.lang.String[] glGetDebugMessageLogKHR(int, int[], int, int[], int, int[], int, int[], int);
    method public static java.lang.String[] glGetDebugMessageLogKHR(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static java.lang.String glGetObjectLabelKHR(int, int);
    method public static java.lang.String glGetObjectPtrLabelKHR(long);
    method public static void glGetSamplerParameterIivEXT(int, int, int[], int);
    method public static void glGetSamplerParameterIivEXT(int, int, java.nio.IntBuffer);
    method public static void glGetSamplerParameterIuivEXT(int, int, int[], int);
    method public static void glGetSamplerParameterIuivEXT(int, int, java.nio.IntBuffer);
    method public static void glGetTexParameterIivEXT(int, int, int[], int);
    method public static void glGetTexParameterIivEXT(int, int, java.nio.IntBuffer);
    method public static void glGetTexParameterIuivEXT(int, int, int[], int);
    method public static void glGetTexParameterIuivEXT(int, int, java.nio.IntBuffer);
    method public static boolean glIsEnablediEXT(int, int);
    method public static void glMinSampleShadingOES(float);
    method public static void glObjectLabelKHR(int, int, int, java.lang.String);
    method public static void glObjectPtrLabelKHR(long, java.lang.String);
    method public static void glPatchParameteriEXT(int, int);
    method public static void glPopDebugGroupKHR();
    method public static void glPrimitiveBoundingBoxEXT(float, float, float, float, float, float, float, float);
    method public static void glPushDebugGroupKHR(int, int, int, java.lang.String);
    method public static void glSamplerParameterIivEXT(int, int, int[], int);
    method public static void glSamplerParameterIivEXT(int, int, java.nio.IntBuffer);
    method public static void glSamplerParameterIuivEXT(int, int, int[], int);
    method public static void glSamplerParameterIuivEXT(int, int, java.nio.IntBuffer);
    method public static void glTexBufferEXT(int, int, int);
    method public static void glTexBufferRangeEXT(int, int, int, int, int);
    method public static void glTexParameterIivEXT(int, int, int[], int);
    method public static void glTexParameterIivEXT(int, int, java.nio.IntBuffer);
    method public static void glTexParameterIuivEXT(int, int, int[], int);
    method public static void glTexParameterIuivEXT(int, int, java.nio.IntBuffer);
    method public static void glTexStorage3DMultisampleOES(int, int, int, int, int, int, boolean);
    field public static final int GL_BLEND_ADVANCED_COHERENT_KHR = 37509; // 0x9285
    field public static final int GL_BUFFER_KHR = 33504; // 0x82e0
    field public static final int GL_CLAMP_TO_BORDER_EXT = 33069; // 0x812d
    field public static final int GL_COLORBURN_KHR = 37530; // 0x929a
    field public static final int GL_COLORDODGE_KHR = 37529; // 0x9299
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 37819; // 0x93bb
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 37816; // 0x93b8
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 37817; // 0x93b9
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 37818; // 0x93ba
    field public static final int GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 37820; // 0x93bc
    field public static final int GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 37821; // 0x93bd
    field public static final int GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 37808; // 0x93b0
    field public static final int GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 37809; // 0x93b1
    field public static final int GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 37810; // 0x93b2
    field public static final int GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 37811; // 0x93b3
    field public static final int GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 37812; // 0x93b4
    field public static final int GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 37813; // 0x93b5
    field public static final int GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 37814; // 0x93b6
    field public static final int GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 37815; // 0x93b7
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 37851; // 0x93db
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 37848; // 0x93d8
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 37849; // 0x93d9
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 37850; // 0x93da
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 37852; // 0x93dc
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 37853; // 0x93dd
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 37840; // 0x93d0
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 37841; // 0x93d1
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 37842; // 0x93d2
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 37843; // 0x93d3
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 37844; // 0x93d4
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 37845; // 0x93d5
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 37846; // 0x93d6
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 37847; // 0x93d7
    field public static final int GL_CONTEXT_FLAG_DEBUG_BIT_KHR = 2; // 0x2
    field public static final int GL_DARKEN_KHR = 37527; // 0x9297
    field public static final int GL_DEBUG_CALLBACK_FUNCTION_KHR = 33348; // 0x8244
    field public static final int GL_DEBUG_CALLBACK_USER_PARAM_KHR = 33349; // 0x8245
    field public static final int GL_DEBUG_GROUP_STACK_DEPTH_KHR = 33389; // 0x826d
    field public static final int GL_DEBUG_LOGGED_MESSAGES_KHR = 37189; // 0x9145
    field public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR = 33347; // 0x8243
    field public static final int GL_DEBUG_OUTPUT_KHR = 37600; // 0x92e0
    field public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR = 33346; // 0x8242
    field public static final int GL_DEBUG_SEVERITY_HIGH_KHR = 37190; // 0x9146
    field public static final int GL_DEBUG_SEVERITY_LOW_KHR = 37192; // 0x9148
    field public static final int GL_DEBUG_SEVERITY_MEDIUM_KHR = 37191; // 0x9147
    field public static final int GL_DEBUG_SEVERITY_NOTIFICATION_KHR = 33387; // 0x826b
    field public static final int GL_DEBUG_SOURCE_API_KHR = 33350; // 0x8246
    field public static final int GL_DEBUG_SOURCE_APPLICATION_KHR = 33354; // 0x824a
    field public static final int GL_DEBUG_SOURCE_OTHER_KHR = 33355; // 0x824b
    field public static final int GL_DEBUG_SOURCE_SHADER_COMPILER_KHR = 33352; // 0x8248
    field public static final int GL_DEBUG_SOURCE_THIRD_PARTY_KHR = 33353; // 0x8249
    field public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR = 33351; // 0x8247
    field public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR = 33357; // 0x824d
    field public static final int GL_DEBUG_TYPE_ERROR_KHR = 33356; // 0x824c
    field public static final int GL_DEBUG_TYPE_MARKER_KHR = 33384; // 0x8268
    field public static final int GL_DEBUG_TYPE_OTHER_KHR = 33361; // 0x8251
    field public static final int GL_DEBUG_TYPE_PERFORMANCE_KHR = 33360; // 0x8250
    field public static final int GL_DEBUG_TYPE_POP_GROUP_KHR = 33386; // 0x826a
    field public static final int GL_DEBUG_TYPE_PORTABILITY_KHR = 33359; // 0x824f
    field public static final int GL_DEBUG_TYPE_PUSH_GROUP_KHR = 33385; // 0x8269
    field public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR = 33358; // 0x824e
    field public static final int GL_DECODE_EXT = 35401; // 0x8a49
    field public static final int GL_DIFFERENCE_KHR = 37534; // 0x929e
    field public static final int GL_EXCLUSION_KHR = 37536; // 0x92a0
    field public static final int GL_FIRST_VERTEX_CONVENTION_EXT = 36429; // 0x8e4d
    field public static final int GL_FRACTIONAL_EVEN_EXT = 36476; // 0x8e7c
    field public static final int GL_FRACTIONAL_ODD_EXT = 36475; // 0x8e7b
    field public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES = 36445; // 0x8e5d
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 36263; // 0x8da7
    field public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT = 37650; // 0x9312
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 36264; // 0x8da8
    field public static final int GL_GEOMETRY_LINKED_INPUT_TYPE_EXT = 35095; // 0x8917
    field public static final int GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT = 35096; // 0x8918
    field public static final int GL_GEOMETRY_LINKED_VERTICES_OUT_EXT = 35094; // 0x8916
    field public static final int GL_GEOMETRY_SHADER_BIT_EXT = 4; // 0x4
    field public static final int GL_GEOMETRY_SHADER_EXT = 36313; // 0x8dd9
    field public static final int GL_GEOMETRY_SHADER_INVOCATIONS_EXT = 34943; // 0x887f
    field public static final int GL_HARDLIGHT_KHR = 37531; // 0x929b
    field public static final int GL_HSL_COLOR_KHR = 37551; // 0x92af
    field public static final int GL_HSL_HUE_KHR = 37549; // 0x92ad
    field public static final int GL_HSL_LUMINOSITY_KHR = 37552; // 0x92b0
    field public static final int GL_HSL_SATURATION_KHR = 37550; // 0x92ae
    field public static final int GL_IMAGE_BUFFER_EXT = 36945; // 0x9051
    field public static final int GL_IMAGE_CUBE_MAP_ARRAY_EXT = 36948; // 0x9054
    field public static final int GL_INT_IMAGE_BUFFER_EXT = 36956; // 0x905c
    field public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 36959; // 0x905f
    field public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES = 37132; // 0x910c
    field public static final int GL_INT_SAMPLER_BUFFER_EXT = 36304; // 0x8dd0
    field public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT = 36878; // 0x900e
    field public static final int GL_ISOLINES_EXT = 36474; // 0x8e7a
    field public static final int GL_IS_PER_PATCH_EXT = 37607; // 0x92e7
    field public static final int GL_LAST_VERTEX_CONVENTION_EXT = 36430; // 0x8e4e
    field public static final int GL_LAYER_PROVOKING_VERTEX_EXT = 33374; // 0x825e
    field public static final int GL_LIGHTEN_KHR = 37528; // 0x9298
    field public static final int GL_LINES_ADJACENCY_EXT = 10; // 0xa
    field public static final int GL_LINE_STRIP_ADJACENCY_EXT = 11; // 0xb
    field public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT = 35378; // 0x8a32
    field public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT = 36382; // 0x8e1e
    field public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT = 36383; // 0x8e1f
    field public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR = 33388; // 0x826c
    field public static final int GL_MAX_DEBUG_LOGGED_MESSAGES_KHR = 37188; // 0x9144
    field public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_KHR = 37187; // 0x9143
    field public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES = 36444; // 0x8e5c
    field public static final int GL_MAX_FRAMEBUFFER_LAYERS_EXT = 37655; // 0x9317
    field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT = 37589; // 0x92d5
    field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT = 37583; // 0x92cf
    field public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT = 37069; // 0x90cd
    field public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT = 37155; // 0x9123
    field public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT = 37156; // 0x9124
    field public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 36320; // 0x8de0
    field public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT = 36442; // 0x8e5a
    field public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT = 37079; // 0x90d7
    field public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 35881; // 0x8c29
    field public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 36321; // 0x8de1
    field public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT = 35372; // 0x8a2c
    field public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 36319; // 0x8ddf
    field public static final int GL_MAX_LABEL_LENGTH_KHR = 33512; // 0x82e8
    field public static final int GL_MAX_PATCH_VERTICES_EXT = 36477; // 0x8e7d
    field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT = 37587; // 0x92d3
    field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT = 37581; // 0x92cd
    field public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT = 37067; // 0x90cb
    field public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT = 34924; // 0x886c
    field public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT = 36483; // 0x8e83
    field public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT = 37080; // 0x90d8
    field public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT = 36481; // 0x8e81
    field public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT = 36485; // 0x8e85
    field public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT = 36489; // 0x8e89
    field public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT = 36479; // 0x8e7f
    field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT = 37588; // 0x92d4
    field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT = 37582; // 0x92ce
    field public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT = 37068; // 0x90cc
    field public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT = 34925; // 0x886d
    field public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT = 36486; // 0x8e86
    field public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT = 37081; // 0x90d9
    field public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT = 36482; // 0x8e82
    field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT = 36490; // 0x8e8a
    field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT = 36480; // 0x8e80
    field public static final int GL_MAX_TESS_GEN_LEVEL_EXT = 36478; // 0x8e7e
    field public static final int GL_MAX_TESS_PATCH_COMPONENTS_EXT = 36484; // 0x8e84
    field public static final int GL_MAX_TEXTURE_BUFFER_SIZE_EXT = 35883; // 0x8c2b
    field public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES = 36443; // 0x8e5b
    field public static final int GL_MIN_SAMPLE_SHADING_VALUE_OES = 35895; // 0x8c37
    field public static final int GL_MULTIPLY_KHR = 37524; // 0x9294
    field public static final int GL_OVERLAY_KHR = 37526; // 0x9296
    field public static final int GL_PATCHES_EXT = 14; // 0xe
    field public static final int GL_PATCH_VERTICES_EXT = 36466; // 0x8e72
    field public static final int GL_PRIMITIVES_GENERATED_EXT = 35975; // 0x8c87
    field public static final int GL_PRIMITIVE_BOUNDING_BOX_EXT = 37566; // 0x92be
    field public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 33313; // 0x8221
    field public static final int GL_PROGRAM_KHR = 33506; // 0x82e2
    field public static final int GL_QUADS_EXT = 7; // 0x7
    field public static final int GL_QUERY_KHR = 33507; // 0x82e3
    field public static final int GL_REFERENCED_BY_GEOMETRY_SHADER_EXT = 37641; // 0x9309
    field public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT = 37639; // 0x9307
    field public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT = 37640; // 0x9308
    field public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES = 37131; // 0x910b
    field public static final int GL_SAMPLER_BUFFER_EXT = 36290; // 0x8dc2
    field public static final int GL_SAMPLER_CUBE_MAP_ARRAY_EXT = 36876; // 0x900c
    field public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT = 36877; // 0x900d
    field public static final int GL_SAMPLER_KHR = 33510; // 0x82e6
    field public static final int GL_SAMPLE_SHADING_OES = 35894; // 0x8c36
    field public static final int GL_SCREEN_KHR = 37525; // 0x9295
    field public static final int GL_SHADER_KHR = 33505; // 0x82e1
    field public static final int GL_SKIP_DECODE_EXT = 35402; // 0x8a4a
    field public static final int GL_SOFTLIGHT_KHR = 37532; // 0x929c
    field public static final int GL_STACK_OVERFLOW_KHR = 1283; // 0x503
    field public static final int GL_STACK_UNDERFLOW_KHR = 1284; // 0x504
    field public static final int GL_STENCIL_INDEX8_OES = 36168; // 0x8d48
    field public static final int GL_STENCIL_INDEX_OES = 6401; // 0x1901
    field public static final int GL_TESS_CONTROL_OUTPUT_VERTICES_EXT = 36469; // 0x8e75
    field public static final int GL_TESS_CONTROL_SHADER_BIT_EXT = 8; // 0x8
    field public static final int GL_TESS_CONTROL_SHADER_EXT = 36488; // 0x8e88
    field public static final int GL_TESS_EVALUATION_SHADER_BIT_EXT = 16; // 0x10
    field public static final int GL_TESS_EVALUATION_SHADER_EXT = 36487; // 0x8e87
    field public static final int GL_TESS_GEN_MODE_EXT = 36470; // 0x8e76
    field public static final int GL_TESS_GEN_POINT_MODE_EXT = 36473; // 0x8e79
    field public static final int GL_TESS_GEN_SPACING_EXT = 36471; // 0x8e77
    field public static final int GL_TESS_GEN_VERTEX_ORDER_EXT = 36472; // 0x8e78
    field public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES = 37122; // 0x9102
    field public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES = 37125; // 0x9105
    field public static final int GL_TEXTURE_BINDING_BUFFER_EXT = 35884; // 0x8c2c
    field public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT = 36874; // 0x900a
    field public static final int GL_TEXTURE_BORDER_COLOR_EXT = 4100; // 0x1004
    field public static final int GL_TEXTURE_BUFFER_BINDING_EXT = 35882; // 0x8c2a
    field public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 35885; // 0x8c2d
    field public static final int GL_TEXTURE_BUFFER_EXT = 35882; // 0x8c2a
    field public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT = 37279; // 0x919f
    field public static final int GL_TEXTURE_BUFFER_OFFSET_EXT = 37277; // 0x919d
    field public static final int GL_TEXTURE_BUFFER_SIZE_EXT = 37278; // 0x919e
    field public static final int GL_TEXTURE_CUBE_MAP_ARRAY_EXT = 36873; // 0x9009
    field public static final int GL_TEXTURE_SRGB_DECODE_EXT = 35400; // 0x8a48
    field public static final int GL_TRIANGLES_ADJACENCY_EXT = 12; // 0xc
    field public static final int GL_TRIANGLE_STRIP_ADJACENCY_EXT = 13; // 0xd
    field public static final int GL_UNDEFINED_VERTEX_EXT = 33376; // 0x8260
    field public static final int GL_UNSIGNED_INT_IMAGE_BUFFER_EXT = 36967; // 0x9067
    field public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 36970; // 0x906a
    field public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES = 37133; // 0x910d
    field public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = 36312; // 0x8dd8
    field public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT = 36879; // 0x900f
    field public static final int GL_VERTEX_ARRAY_KHR = 32884; // 0x8074
  }

  public static abstract interface GLES31Ext.DebugProcKHR {
    method public abstract void onMessage(int, int, int, int, java.lang.String);
  }

  public class GLException extends java.lang.RuntimeException {
    ctor public GLException(int);
    ctor public GLException(int, java.lang.String);
  }

  public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
    ctor public GLSurfaceView(android.content.Context);
    ctor public GLSurfaceView(android.content.Context, android.util.AttributeSet);
    method public int getDebugFlags();
    method public boolean getPreserveEGLContextOnPause();
    method public int getRenderMode();
    method public void onPause();
    method public void onResume();
    method public void queueEvent(java.lang.Runnable);
    method public void requestRender();
    method public void setDebugFlags(int);
    method public void setEGLConfigChooser(android.opengl.GLSurfaceView.EGLConfigChooser);
    method public void setEGLConfigChooser(boolean);
    method public void setEGLConfigChooser(int, int, int, int, int, int);
    method public void setEGLContextClientVersion(int);
    method public void setEGLContextFactory(android.opengl.GLSurfaceView.EGLContextFactory);
    method public void setEGLWindowSurfaceFactory(android.opengl.GLSurfaceView.EGLWindowSurfaceFactory);
    method public void setGLWrapper(android.opengl.GLSurfaceView.GLWrapper);
    method public void setPreserveEGLContextOnPause(boolean);
    method public void setRenderMode(int);
    method public void setRenderer(android.opengl.GLSurfaceView.Renderer);
    method public void surfaceChanged(android.view.SurfaceHolder, int, int, int);
    method public void surfaceCreated(android.view.SurfaceHolder);
    method public void surfaceDestroyed(android.view.SurfaceHolder);
    field public static final int DEBUG_CHECK_GL_ERROR = 1; // 0x1
    field public static final int DEBUG_LOG_GL_CALLS = 2; // 0x2
    field public static final int RENDERMODE_CONTINUOUSLY = 1; // 0x1
    field public static final int RENDERMODE_WHEN_DIRTY = 0; // 0x0
  }

  public static abstract interface GLSurfaceView.EGLConfigChooser {
    method public abstract javax.microedition.khronos.egl.EGLConfig chooseConfig(javax.microedition.khronos.egl.EGL10, javax.microedition.khronos.egl.EGLDisplay);
  }

  public static abstract interface GLSurfaceView.EGLContextFactory {
    method public abstract javax.microedition.khronos.egl.EGLContext createContext(javax.microedition.khronos.egl.EGL10, javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig);
    method public abstract void destroyContext(javax.microedition.khronos.egl.EGL10, javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLContext);
  }

  public static abstract interface GLSurfaceView.EGLWindowSurfaceFactory {
    method public abstract javax.microedition.khronos.egl.EGLSurface createWindowSurface(javax.microedition.khronos.egl.EGL10, javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig, java.lang.Object);
    method public abstract void destroySurface(javax.microedition.khronos.egl.EGL10, javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLSurface);
  }

  public static abstract interface GLSurfaceView.GLWrapper {
    method public abstract javax.microedition.khronos.opengles.GL wrap(javax.microedition.khronos.opengles.GL);
  }

  public static abstract interface GLSurfaceView.Renderer {
    method public abstract void onDrawFrame(javax.microedition.khronos.opengles.GL10);
    method public abstract void onSurfaceChanged(javax.microedition.khronos.opengles.GL10, int, int);
    method public abstract void onSurfaceCreated(javax.microedition.khronos.opengles.GL10, javax.microedition.khronos.egl.EGLConfig);
  }

  public class GLU {
    ctor public GLU();
    method public static java.lang.String gluErrorString(int);
    method public static void gluLookAt(javax.microedition.khronos.opengles.GL10, float, float, float, float, float, float, float, float, float);
    method public static void gluOrtho2D(javax.microedition.khronos.opengles.GL10, float, float, float, float);
    method public static void gluPerspective(javax.microedition.khronos.opengles.GL10, float, float, float, float);
    method public static int gluProject(float, float, float, float[], int, float[], int, int[], int, float[], int);
    method public static int gluUnProject(float, float, float, float[], int, float[], int, int[], int, float[], int);
  }

  public final class GLUtils {
    method public static java.lang.String getEGLErrorString(int);
    method public static int getInternalFormat(android.graphics.Bitmap);
    method public static int getType(android.graphics.Bitmap);
    method public static void texImage2D(int, int, int, android.graphics.Bitmap, int);
    method public static void texImage2D(int, int, int, android.graphics.Bitmap, int, int);
    method public static void texImage2D(int, int, android.graphics.Bitmap, int);
    method public static void texSubImage2D(int, int, int, int, android.graphics.Bitmap);
    method public static void texSubImage2D(int, int, int, int, android.graphics.Bitmap, int, int);
  }

  public class Matrix {
    ctor public deprecated Matrix();
    method public static void frustumM(float[], int, float, float, float, float, float, float);
    method public static boolean invertM(float[], int, float[], int);
    method public static float length(float, float, float);
    method public static void multiplyMM(float[], int, float[], int, float[], int);
    method public static void multiplyMV(float[], int, float[], int, float[], int);
    method public static void orthoM(float[], int, float, float, float, float, float, float);
    method public static void perspectiveM(float[], int, float, float, float, float);
    method public static void rotateM(float[], int, float[], int, float, float, float, float);
    method public static void rotateM(float[], int, float, float, float, float);
    method public static void scaleM(float[], int, float[], int, float, float, float);
    method public static void scaleM(float[], int, float, float, float);
    method public static void setIdentityM(float[], int);
    method public static void setLookAtM(float[], int, float, float, float, float, float, float, float, float, float);
    method public static void setRotateEulerM(float[], int, float, float, float);
    method public static void setRotateM(float[], int, float, float, float, float);
    method public static void translateM(float[], int, float[], int, float, float, float);
    method public static void translateM(float[], int, float, float, float);
    method public static void transposeM(float[], int, float[], int);
  }

  public class Visibility {
    ctor public Visibility();
    method public static void computeBoundingSphere(float[], int, int, float[], int);
    method public static int frustumCullSpheres(float[], int, float[], int, int, int[], int, int);
    method public static int visibilityTest(float[], int, float[], int, char[], int, int);
  }

}

package android.os {

  public abstract class AsyncTask {
    ctor public AsyncTask();
    method public final boolean cancel(boolean);
    method protected abstract Result doInBackground(Params...);
    method public final android.os.AsyncTask<Params, Progress, Result> execute(Params...);
    method public static void execute(java.lang.Runnable);
    method public final android.os.AsyncTask<Params, Progress, Result> executeOnExecutor(java.util.concurrent.Executor, Params...);
    method public final Result get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
    method public final Result get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public final android.os.AsyncTask.Status getStatus();
    method public final boolean isCancelled();
    method protected void onCancelled(Result);
    method protected void onCancelled();
    method protected void onPostExecute(Result);
    method protected void onPreExecute();
    method protected void onProgressUpdate(Progress...);
    method protected final void publishProgress(Progress...);
    field public static final java.util.concurrent.Executor SERIAL_EXECUTOR;
    field public static final java.util.concurrent.Executor THREAD_POOL_EXECUTOR;
  }

  public static final class AsyncTask.Status extends java.lang.Enum {
    method public static android.os.AsyncTask.Status valueOf(java.lang.String);
    method public static final android.os.AsyncTask.Status[] values();
    enum_constant public static final android.os.AsyncTask.Status FINISHED;
    enum_constant public static final android.os.AsyncTask.Status PENDING;
    enum_constant public static final android.os.AsyncTask.Status RUNNING;
  }

  public class BadParcelableException extends android.util.AndroidRuntimeException {
    ctor public BadParcelableException(java.lang.String);
    ctor public BadParcelableException(java.lang.Exception);
  }

  public class BaseBundle {
    method public void clear();
    method public boolean containsKey(java.lang.String);
    method public java.lang.Object get(java.lang.String);
    method public boolean getBoolean(java.lang.String);
    method public boolean getBoolean(java.lang.String, boolean);
    method public boolean[] getBooleanArray(java.lang.String);
    method public double getDouble(java.lang.String);
    method public double getDouble(java.lang.String, double);
    method public double[] getDoubleArray(java.lang.String);
    method public int getInt(java.lang.String);
    method public int getInt(java.lang.String, int);
    method public int[] getIntArray(java.lang.String);
    method public long getLong(java.lang.String);
    method public long getLong(java.lang.String, long);
    method public long[] getLongArray(java.lang.String);
    method public java.lang.String getString(java.lang.String);
    method public java.lang.String getString(java.lang.String, java.lang.String);
    method public java.lang.String[] getStringArray(java.lang.String);
    method public boolean isEmpty();
    method public java.util.Set<java.lang.String> keySet();
    method public void putAll(android.os.PersistableBundle);
    method public void putBoolean(java.lang.String, boolean);
    method public void putBooleanArray(java.lang.String, boolean[]);
    method public void putDouble(java.lang.String, double);
    method public void putDoubleArray(java.lang.String, double[]);
    method public void putInt(java.lang.String, int);
    method public void putIntArray(java.lang.String, int[]);
    method public void putLong(java.lang.String, long);
    method public void putLongArray(java.lang.String, long[]);
    method public void putString(java.lang.String, java.lang.String);
    method public void putStringArray(java.lang.String, java.lang.String[]);
    method public void remove(java.lang.String);
    method public int size();
  }

  public class BatteryManager {
    method public int getIntProperty(int);
    method public long getLongProperty(int);
    method public boolean isCharging();
    field public static final java.lang.String ACTION_CHARGING = "android.os.action.CHARGING";
    field public static final java.lang.String ACTION_DISCHARGING = "android.os.action.DISCHARGING";
    field public static final int BATTERY_HEALTH_COLD = 7; // 0x7
    field public static final int BATTERY_HEALTH_DEAD = 4; // 0x4
    field public static final int BATTERY_HEALTH_GOOD = 2; // 0x2
    field public static final int BATTERY_HEALTH_OVERHEAT = 3; // 0x3
    field public static final int BATTERY_HEALTH_OVER_VOLTAGE = 5; // 0x5
    field public static final int BATTERY_HEALTH_UNKNOWN = 1; // 0x1
    field public static final int BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6; // 0x6
    field public static final int BATTERY_PLUGGED_AC = 1; // 0x1
    field public static final int BATTERY_PLUGGED_USB = 2; // 0x2
    field public static final int BATTERY_PLUGGED_WIRELESS = 4; // 0x4
    field public static final int BATTERY_PROPERTY_CAPACITY = 4; // 0x4
    field public static final int BATTERY_PROPERTY_CHARGE_COUNTER = 1; // 0x1
    field public static final int BATTERY_PROPERTY_CURRENT_AVERAGE = 3; // 0x3
    field public static final int BATTERY_PROPERTY_CURRENT_NOW = 2; // 0x2
    field public static final int BATTERY_PROPERTY_ENERGY_COUNTER = 5; // 0x5
    field public static final int BATTERY_STATUS_CHARGING = 2; // 0x2
    field public static final int BATTERY_STATUS_DISCHARGING = 3; // 0x3
    field public static final int BATTERY_STATUS_FULL = 5; // 0x5
    field public static final int BATTERY_STATUS_NOT_CHARGING = 4; // 0x4
    field public static final int BATTERY_STATUS_UNKNOWN = 1; // 0x1
    field public static final java.lang.String EXTRA_HEALTH = "health";
    field public static final java.lang.String EXTRA_ICON_SMALL = "icon-small";
    field public static final java.lang.String EXTRA_LEVEL = "level";
    field public static final java.lang.String EXTRA_PLUGGED = "plugged";
    field public static final java.lang.String EXTRA_PRESENT = "present";
    field public static final java.lang.String EXTRA_SCALE = "scale";
    field public static final java.lang.String EXTRA_STATUS = "status";
    field public static final java.lang.String EXTRA_TECHNOLOGY = "technology";
    field public static final java.lang.String EXTRA_TEMPERATURE = "temperature";
    field public static final java.lang.String EXTRA_VOLTAGE = "voltage";
  }

  public class Binder implements android.os.IBinder {
    ctor public Binder();
    method public void attachInterface(android.os.IInterface, java.lang.String);
    method public static final long clearCallingIdentity();
    method public void dump(java.io.FileDescriptor, java.lang.String[]);
    method protected void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public void dumpAsync(java.io.FileDescriptor, java.lang.String[]);
    method public static final void flushPendingCommands();
    method public static final int getCallingPid();
    method public static final int getCallingUid();
    method public static final android.os.UserHandle getCallingUserHandle();
    method public java.lang.String getInterfaceDescriptor();
    method public boolean isBinderAlive();
    method public static final void joinThreadPool();
    method public void linkToDeath(android.os.IBinder.DeathRecipient, int);
    method protected boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException;
    method public boolean pingBinder();
    method public android.os.IInterface queryLocalInterface(java.lang.String);
    method public static final void restoreCallingIdentity(long);
    method public final boolean transact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException;
    method public boolean unlinkToDeath(android.os.IBinder.DeathRecipient, int);
  }

  public class Build {
    ctor public Build();
    method public static java.lang.String getRadioVersion();
    field public static final java.lang.String BOARD;
    field public static final java.lang.String BOOTLOADER;
    field public static final java.lang.String BRAND;
    field public static final deprecated java.lang.String CPU_ABI;
    field public static final deprecated java.lang.String CPU_ABI2;
    field public static final java.lang.String DEVICE;
    field public static final java.lang.String DISPLAY;
    field public static final java.lang.String FINGERPRINT;
    field public static final java.lang.String HARDWARE;
    field public static final java.lang.String HOST;
    field public static final java.lang.String ID;
    field public static final java.lang.String MANUFACTURER;
    field public static final java.lang.String MODEL;
    field public static final java.lang.String PRODUCT;
    field public static final deprecated java.lang.String RADIO;
    field public static final java.lang.String SERIAL;
    field public static final java.lang.String[] SUPPORTED_32_BIT_ABIS;
    field public static final java.lang.String[] SUPPORTED_64_BIT_ABIS;
    field public static final java.lang.String[] SUPPORTED_ABIS;
    field public static final java.lang.String TAGS;
    field public static final long TIME;
    field public static final java.lang.String TYPE;
    field public static final java.lang.String UNKNOWN = "unknown";
    field public static final java.lang.String USER;
  }

  public static class Build.VERSION {
    ctor public Build.VERSION();
    field public static final java.lang.String CODENAME;
    field public static final java.lang.String INCREMENTAL;
    field public static final java.lang.String RELEASE;
    field public static final deprecated java.lang.String SDK;
    field public static final int SDK_INT;
  }

  public static class Build.VERSION_CODES {
    ctor public Build.VERSION_CODES();
    field public static final int BASE = 1; // 0x1
    field public static final int BASE_1_1 = 2; // 0x2
    field public static final int CUPCAKE = 3; // 0x3
    field public static final int CUR_DEVELOPMENT = 10000; // 0x2710
    field public static final int DONUT = 4; // 0x4
    field public static final int ECLAIR = 5; // 0x5
    field public static final int ECLAIR_0_1 = 6; // 0x6
    field public static final int ECLAIR_MR1 = 7; // 0x7
    field public static final int FROYO = 8; // 0x8
    field public static final int GINGERBREAD = 9; // 0x9
    field public static final int GINGERBREAD_MR1 = 10; // 0xa
    field public static final int HONEYCOMB = 11; // 0xb
    field public static final int HONEYCOMB_MR1 = 12; // 0xc
    field public static final int HONEYCOMB_MR2 = 13; // 0xd
    field public static final int ICE_CREAM_SANDWICH = 14; // 0xe
    field public static final int ICE_CREAM_SANDWICH_MR1 = 15; // 0xf
    field public static final int JELLY_BEAN = 16; // 0x10
    field public static final int JELLY_BEAN_MR1 = 17; // 0x11
    field public static final int JELLY_BEAN_MR2 = 18; // 0x12
    field public static final int KITKAT = 19; // 0x13
    field public static final int KITKAT_WATCH = 20; // 0x14
    field public static final int LOLLIPOP = 21; // 0x15
    field public static final int LOLLIPOP_MR1 = 22; // 0x16
    field public static final int MNC = 10000; // 0x2710
  }

  public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
    ctor public Bundle();
    ctor public Bundle(java.lang.ClassLoader);
    ctor public Bundle(int);
    ctor public Bundle(android.os.Bundle);
    ctor public Bundle(android.os.PersistableBundle);
    method public java.lang.Object clone();
    method public int describeContents();
    method public android.os.IBinder getBinder(java.lang.String);
    method public android.os.Bundle getBundle(java.lang.String);
    method public byte getByte(java.lang.String);
    method public java.lang.Byte getByte(java.lang.String, byte);
    method public byte[] getByteArray(java.lang.String);
    method public char getChar(java.lang.String);
    method public char getChar(java.lang.String, char);
    method public char[] getCharArray(java.lang.String);
    method public java.lang.CharSequence getCharSequence(java.lang.String);
    method public java.lang.CharSequence getCharSequence(java.lang.String, java.lang.CharSequence);
    method public java.lang.CharSequence[] getCharSequenceArray(java.lang.String);
    method public java.util.ArrayList<java.lang.CharSequence> getCharSequenceArrayList(java.lang.String);
    method public java.lang.ClassLoader getClassLoader();
    method public float getFloat(java.lang.String);
    method public float getFloat(java.lang.String, float);
    method public float[] getFloatArray(java.lang.String);
    method public java.util.ArrayList<java.lang.Integer> getIntegerArrayList(java.lang.String);
    method public T getParcelable(java.lang.String);
    method public android.os.Parcelable[] getParcelableArray(java.lang.String);
    method public java.util.ArrayList<T> getParcelableArrayList(java.lang.String);
    method public java.io.Serializable getSerializable(java.lang.String);
    method public short getShort(java.lang.String);
    method public short getShort(java.lang.String, short);
    method public short[] getShortArray(java.lang.String);
    method public android.util.Size getSize(java.lang.String);
    method public android.util.SizeF getSizeF(java.lang.String);
    method public android.util.SparseArray<T> getSparseParcelableArray(java.lang.String);
    method public java.util.ArrayList<java.lang.String> getStringArrayList(java.lang.String);
    method public boolean hasFileDescriptors();
    method public void putAll(android.os.Bundle);
    method public void putBinder(java.lang.String, android.os.IBinder);
    method public void putBundle(java.lang.String, android.os.Bundle);
    method public void putByte(java.lang.String, byte);
    method public void putByteArray(java.lang.String, byte[]);
    method public void putChar(java.lang.String, char);
    method public void putCharArray(java.lang.String, char[]);
    method public void putCharSequence(java.lang.String, java.lang.CharSequence);
    method public void putCharSequenceArray(java.lang.String, java.lang.CharSequence[]);
    method public void putCharSequenceArrayList(java.lang.String, java.util.ArrayList<java.lang.CharSequence>);
    method public void putFloat(java.lang.String, float);
    method public void putFloatArray(java.lang.String, float[]);
    method public void putIntegerArrayList(java.lang.String, java.util.ArrayList<java.lang.Integer>);
    method public void putParcelable(java.lang.String, android.os.Parcelable);
    method public void putParcelableArray(java.lang.String, android.os.Parcelable[]);
    method public void putParcelableArrayList(java.lang.String, java.util.ArrayList<? extends android.os.Parcelable>);
    method public void putSerializable(java.lang.String, java.io.Serializable);
    method public void putShort(java.lang.String, short);
    method public void putShortArray(java.lang.String, short[]);
    method public void putSize(java.lang.String, android.util.Size);
    method public void putSizeF(java.lang.String, android.util.SizeF);
    method public void putSparseParcelableArray(java.lang.String, android.util.SparseArray<? extends android.os.Parcelable>);
    method public void putStringArrayList(java.lang.String, java.util.ArrayList<java.lang.String>);
    method public void readFromParcel(android.os.Parcel);
    method public void setClassLoader(java.lang.ClassLoader);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.Bundle> CREATOR;
    field public static final android.os.Bundle EMPTY;
  }

  public final class CancellationSignal {
    ctor public CancellationSignal();
    method public void cancel();
    method public boolean isCanceled();
    method public void setOnCancelListener(android.os.CancellationSignal.OnCancelListener);
    method public void throwIfCanceled();
  }

  public static abstract interface CancellationSignal.OnCancelListener {
    method public abstract void onCancel();
  }

  public class ConditionVariable {
    ctor public ConditionVariable();
    ctor public ConditionVariable(boolean);
    method public void block();
    method public boolean block(long);
    method public void close();
    method public void open();
  }

  public abstract class CountDownTimer {
    ctor public CountDownTimer(long, long);
    method public final synchronized void cancel();
    method public abstract void onFinish();
    method public abstract void onTick(long);
    method public final synchronized android.os.CountDownTimer start();
  }

  public class DeadObjectException extends android.os.RemoteException {
    ctor public DeadObjectException();
  }

  public final class Debug {
    method public static deprecated void changeDebugPort(int);
    method public static void dumpHprofData(java.lang.String) throws java.io.IOException;
    method public static boolean dumpService(java.lang.String, java.io.FileDescriptor, java.lang.String[]);
    method public static void enableEmulatorTraceOutput();
    method public static final int getBinderDeathObjectCount();
    method public static final int getBinderLocalObjectCount();
    method public static final int getBinderProxyObjectCount();
    method public static int getBinderReceivedTransactions();
    method public static int getBinderSentTransactions();
    method public static deprecated int getGlobalAllocCount();
    method public static deprecated int getGlobalAllocSize();
    method public static deprecated int getGlobalClassInitCount();
    method public static deprecated int getGlobalClassInitTime();
    method public static deprecated int getGlobalExternalAllocCount();
    method public static deprecated int getGlobalExternalAllocSize();
    method public static deprecated int getGlobalExternalFreedCount();
    method public static deprecated int getGlobalExternalFreedSize();
    method public static deprecated int getGlobalFreedCount();
    method public static deprecated int getGlobalFreedSize();
    method public static deprecated int getGlobalGcInvocationCount();
    method public static int getLoadedClassCount();
    method public static void getMemoryInfo(android.os.Debug.MemoryInfo);
    method public static long getNativeHeapAllocatedSize();
    method public static long getNativeHeapFreeSize();
    method public static long getNativeHeapSize();
    method public static long getPss();
    method public static deprecated int getThreadAllocCount();
    method public static deprecated int getThreadAllocSize();
    method public static deprecated int getThreadExternalAllocCount();
    method public static deprecated int getThreadExternalAllocSize();
    method public static deprecated int getThreadGcInvocationCount();
    method public static boolean isDebuggerConnected();
    method public static void printLoadedClasses(int);
    method public static deprecated void resetAllCounts();
    method public static deprecated void resetGlobalAllocCount();
    method public static deprecated void resetGlobalAllocSize();
    method public static deprecated void resetGlobalClassInitCount();
    method public static deprecated void resetGlobalClassInitTime();
    method public static deprecated void resetGlobalExternalAllocCount();
    method public static deprecated void resetGlobalExternalAllocSize();
    method public static deprecated void resetGlobalExternalFreedCount();
    method public static deprecated void resetGlobalExternalFreedSize();
    method public static deprecated void resetGlobalFreedCount();
    method public static deprecated void resetGlobalFreedSize();
    method public static deprecated void resetGlobalGcInvocationCount();
    method public static deprecated void resetThreadAllocCount();
    method public static deprecated void resetThreadAllocSize();
    method public static deprecated void resetThreadExternalAllocCount();
    method public static deprecated void resetThreadExternalAllocSize();
    method public static deprecated void resetThreadGcInvocationCount();
    method public static deprecated int setAllocationLimit(int);
    method public static deprecated int setGlobalAllocationLimit(int);
    method public static deprecated void startAllocCounting();
    method public static void startMethodTracing();
    method public static void startMethodTracing(java.lang.String);
    method public static void startMethodTracing(java.lang.String, int);
    method public static void startMethodTracing(java.lang.String, int, int);
    method public static void startMethodTracingSampling(java.lang.String, int, int);
    method public static void startNativeTracing();
    method public static deprecated void stopAllocCounting();
    method public static void stopMethodTracing();
    method public static void stopNativeTracing();
    method public static long threadCpuTimeNanos();
    method public static void waitForDebugger();
    method public static boolean waitingForDebugger();
    field public static final int SHOW_CLASSLOADER = 2; // 0x2
    field public static final int SHOW_FULL_DETAIL = 1; // 0x1
    field public static final int SHOW_INITIALIZED = 4; // 0x4
    field public static final deprecated int TRACE_COUNT_ALLOCS = 1; // 0x1
  }

  public static deprecated class Debug.InstructionCount {
    ctor public Debug.InstructionCount();
    method public boolean collect();
    method public int globalMethodInvocations();
    method public int globalTotal();
    method public boolean resetAndStart();
  }

  public static class Debug.MemoryInfo implements android.os.Parcelable {
    ctor public Debug.MemoryInfo();
    method public int describeContents();
    method public int getTotalPrivateClean();
    method public int getTotalPrivateDirty();
    method public int getTotalPss();
    method public int getTotalSharedClean();
    method public int getTotalSharedDirty();
    method public int getTotalSwappablePss();
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.Debug.MemoryInfo> CREATOR;
    field public int dalvikPrivateDirty;
    field public int dalvikPss;
    field public int dalvikSharedDirty;
    field public int nativePrivateDirty;
    field public int nativePss;
    field public int nativeSharedDirty;
    field public int otherPrivateDirty;
    field public int otherPss;
    field public int otherSharedDirty;
  }

  public class DropBoxManager {
    ctor protected DropBoxManager();
    method public void addData(java.lang.String, byte[], int);
    method public void addFile(java.lang.String, java.io.File, int) throws java.io.IOException;
    method public void addText(java.lang.String, java.lang.String);
    method public android.os.DropBoxManager.Entry getNextEntry(java.lang.String, long);
    method public boolean isTagEnabled(java.lang.String);
    field public static final java.lang.String ACTION_DROPBOX_ENTRY_ADDED = "android.intent.action.DROPBOX_ENTRY_ADDED";
    field public static final java.lang.String EXTRA_TAG = "tag";
    field public static final java.lang.String EXTRA_TIME = "time";
    field public static final int IS_EMPTY = 1; // 0x1
    field public static final int IS_GZIPPED = 4; // 0x4
    field public static final int IS_TEXT = 2; // 0x2
  }

  public static class DropBoxManager.Entry implements java.io.Closeable android.os.Parcelable {
    ctor public DropBoxManager.Entry(java.lang.String, long);
    ctor public DropBoxManager.Entry(java.lang.String, long, java.lang.String);
    ctor public DropBoxManager.Entry(java.lang.String, long, byte[], int);
    ctor public DropBoxManager.Entry(java.lang.String, long, android.os.ParcelFileDescriptor, int);
    ctor public DropBoxManager.Entry(java.lang.String, long, java.io.File, int) throws java.io.IOException;
    method public void close();
    method public int describeContents();
    method public int getFlags();
    method public java.io.InputStream getInputStream() throws java.io.IOException;
    method public java.lang.String getTag();
    method public java.lang.String getText(int);
    method public long getTimeMillis();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.DropBoxManager.Entry> CREATOR;
  }

  public class Environment {
    ctor public Environment();
    method public static java.io.File getDataDirectory();
    method public static java.io.File getDownloadCacheDirectory();
    method public static java.io.File getExternalStorageDirectory();
    method public static java.io.File getExternalStoragePublicDirectory(java.lang.String);
    method public static java.lang.String getExternalStorageState();
    method public static java.lang.String getExternalStorageState(java.io.File);
    method public static java.io.File getRootDirectory();
    method public static deprecated java.lang.String getStorageState(java.io.File);
    method public static boolean isExternalStorageEmulated();
    method public static boolean isExternalStorageEmulated(java.io.File);
    method public static boolean isExternalStorageRemovable();
    method public static boolean isExternalStorageRemovable(java.io.File);
    field public static java.lang.String DIRECTORY_ALARMS;
    field public static java.lang.String DIRECTORY_DCIM;
    field public static java.lang.String DIRECTORY_DOCUMENTS;
    field public static java.lang.String DIRECTORY_DOWNLOADS;
    field public static java.lang.String DIRECTORY_MOVIES;
    field public static java.lang.String DIRECTORY_MUSIC;
    field public static java.lang.String DIRECTORY_NOTIFICATIONS;
    field public static java.lang.String DIRECTORY_PICTURES;
    field public static java.lang.String DIRECTORY_PODCASTS;
    field public static java.lang.String DIRECTORY_RINGTONES;
    field public static final java.lang.String MEDIA_BAD_REMOVAL = "bad_removal";
    field public static final java.lang.String MEDIA_CHECKING = "checking";
    field public static final java.lang.String MEDIA_EJECTING = "ejecting";
    field public static final java.lang.String MEDIA_MOUNTED = "mounted";
    field public static final java.lang.String MEDIA_MOUNTED_READ_ONLY = "mounted_ro";
    field public static final java.lang.String MEDIA_NOFS = "nofs";
    field public static final java.lang.String MEDIA_REMOVED = "removed";
    field public static final java.lang.String MEDIA_SHARED = "shared";
    field public static final java.lang.String MEDIA_UNKNOWN = "unknown";
    field public static final java.lang.String MEDIA_UNMOUNTABLE = "unmountable";
    field public static final java.lang.String MEDIA_UNMOUNTED = "unmounted";
  }

  public abstract class FileObserver {
    ctor public FileObserver(java.lang.String);
    ctor public FileObserver(java.lang.String, int);
    method public abstract void onEvent(int, java.lang.String);
    method public void startWatching();
    method public void stopWatching();
    field public static final int ACCESS = 1; // 0x1
    field public static final int ALL_EVENTS = 4095; // 0xfff
    field public static final int ATTRIB = 4; // 0x4
    field public static final int CLOSE_NOWRITE = 16; // 0x10
    field public static final int CLOSE_WRITE = 8; // 0x8
    field public static final int CREATE = 256; // 0x100
    field public static final int DELETE = 512; // 0x200
    field public static final int DELETE_SELF = 1024; // 0x400
    field public static final int MODIFY = 2; // 0x2
    field public static final int MOVED_FROM = 64; // 0x40
    field public static final int MOVED_TO = 128; // 0x80
    field public static final int MOVE_SELF = 2048; // 0x800
    field public static final int OPEN = 32; // 0x20
  }

  public class Handler {
    ctor public Handler();
    ctor public Handler(android.os.Handler.Callback);
    ctor public Handler(android.os.Looper);
    ctor public Handler(android.os.Looper, android.os.Handler.Callback);
    method public void dispatchMessage(android.os.Message);
    method public final void dump(android.util.Printer, java.lang.String);
    method public final android.os.Looper getLooper();
    method public java.lang.String getMessageName(android.os.Message);
    method public void handleMessage(android.os.Message);
    method public final boolean hasMessages(int);
    method public final boolean hasMessages(int, java.lang.Object);
    method public final android.os.Message obtainMessage();
    method public final android.os.Message obtainMessage(int);
    method public final android.os.Message obtainMessage(int, java.lang.Object);
    method public final android.os.Message obtainMessage(int, int, int);
    method public final android.os.Message obtainMessage(int, int, int, java.lang.Object);
    method public final boolean post(java.lang.Runnable);
    method public final boolean postAtFrontOfQueue(java.lang.Runnable);
    method public final boolean postAtTime(java.lang.Runnable, long);
    method public final boolean postAtTime(java.lang.Runnable, java.lang.Object, long);
    method public final boolean postDelayed(java.lang.Runnable, long);
    method public final void removeCallbacks(java.lang.Runnable);
    method public final void removeCallbacks(java.lang.Runnable, java.lang.Object);
    method public final void removeCallbacksAndMessages(java.lang.Object);
    method public final void removeMessages(int);
    method public final void removeMessages(int, java.lang.Object);
    method public final boolean sendEmptyMessage(int);
    method public final boolean sendEmptyMessageAtTime(int, long);
    method public final boolean sendEmptyMessageDelayed(int, long);
    method public final boolean sendMessage(android.os.Message);
    method public final boolean sendMessageAtFrontOfQueue(android.os.Message);
    method public boolean sendMessageAtTime(android.os.Message, long);
    method public final boolean sendMessageDelayed(android.os.Message, long);
  }

  public static abstract interface Handler.Callback {
    method public abstract boolean handleMessage(android.os.Message);
  }

  public class HandlerThread extends java.lang.Thread {
    ctor public HandlerThread(java.lang.String);
    ctor public HandlerThread(java.lang.String, int);
    method public android.os.Looper getLooper();
    method public int getThreadId();
    method protected void onLooperPrepared();
    method public boolean quit();
    method public boolean quitSafely();
  }

  public abstract interface IBinder {
    method public abstract void dump(java.io.FileDescriptor, java.lang.String[]) throws android.os.RemoteException;
    method public abstract void dumpAsync(java.io.FileDescriptor, java.lang.String[]) throws android.os.RemoteException;
    method public abstract java.lang.String getInterfaceDescriptor() throws android.os.RemoteException;
    method public abstract boolean isBinderAlive();
    method public abstract void linkToDeath(android.os.IBinder.DeathRecipient, int) throws android.os.RemoteException;
    method public abstract boolean pingBinder();
    method public abstract android.os.IInterface queryLocalInterface(java.lang.String);
    method public abstract boolean transact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException;
    method public abstract boolean unlinkToDeath(android.os.IBinder.DeathRecipient, int);
    field public static final int DUMP_TRANSACTION = 1598311760; // 0x5f444d50
    field public static final int FIRST_CALL_TRANSACTION = 1; // 0x1
    field public static final int FLAG_ONEWAY = 1; // 0x1
    field public static final int INTERFACE_TRANSACTION = 1598968902; // 0x5f4e5446
    field public static final int LAST_CALL_TRANSACTION = 16777215; // 0xffffff
    field public static final int LIKE_TRANSACTION = 1598835019; // 0x5f4c494b
    field public static final int PING_TRANSACTION = 1599098439; // 0x5f504e47
    field public static final int TWEET_TRANSACTION = 1599362900; // 0x5f545754
  }

  public static abstract interface IBinder.DeathRecipient {
    method public abstract void binderDied();
  }

  public abstract interface IInterface {
    method public abstract android.os.IBinder asBinder();
  }

  public final class Looper {
    method public void dump(android.util.Printer, java.lang.String);
    method public static android.os.Looper getMainLooper();
    method public android.os.MessageQueue getQueue();
    method public java.lang.Thread getThread();
    method public boolean isCurrentThread();
    method public static void loop();
    method public static android.os.Looper myLooper();
    method public static android.os.MessageQueue myQueue();
    method public static void prepare();
    method public static void prepareMainLooper();
    method public void quit();
    method public void quitSafely();
    method public void setMessageLogging(android.util.Printer);
  }

  public class MemoryFile {
    ctor public MemoryFile(java.lang.String, int) throws java.io.IOException;
    method public synchronized boolean allowPurging(boolean) throws java.io.IOException;
    method public void close();
    method public java.io.InputStream getInputStream();
    method public java.io.OutputStream getOutputStream();
    method public boolean isPurgingAllowed();
    method public int length();
    method public int readBytes(byte[], int, int, int) throws java.io.IOException;
    method public void writeBytes(byte[], int, int, int) throws java.io.IOException;
  }

  public final class Message implements android.os.Parcelable {
    ctor public Message();
    method public void copyFrom(android.os.Message);
    method public int describeContents();
    method public java.lang.Runnable getCallback();
    method public android.os.Bundle getData();
    method public android.os.Handler getTarget();
    method public long getWhen();
    method public boolean isAsynchronous();
    method public static android.os.Message obtain();
    method public static android.os.Message obtain(android.os.Message);
    method public static android.os.Message obtain(android.os.Handler);
    method public static android.os.Message obtain(android.os.Handler, java.lang.Runnable);
    method public static android.os.Message obtain(android.os.Handler, int);
    method public static android.os.Message obtain(android.os.Handler, int, java.lang.Object);
    method public static android.os.Message obtain(android.os.Handler, int, int, int);
    method public static android.os.Message obtain(android.os.Handler, int, int, int, java.lang.Object);
    method public android.os.Bundle peekData();
    method public void recycle();
    method public void sendToTarget();
    method public void setAsynchronous(boolean);
    method public void setData(android.os.Bundle);
    method public void setTarget(android.os.Handler);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.Message> CREATOR;
    field public int arg1;
    field public int arg2;
    field public java.lang.Object obj;
    field public android.os.Messenger replyTo;
    field public int sendingUid;
    field public int what;
  }

  public final class MessageQueue {
    method public void addIdleHandler(android.os.MessageQueue.IdleHandler);
    method public boolean isIdle();
    method public void registerFileDescriptorCallback(java.io.FileDescriptor, int, android.os.MessageQueue.FileDescriptorCallback);
    method public void removeIdleHandler(android.os.MessageQueue.IdleHandler);
    method public void unregisterFileDescriptorCallback(java.io.FileDescriptor);
  }

  public static abstract class MessageQueue.FileDescriptorCallback {
    ctor public MessageQueue.FileDescriptorCallback();
    method public int onFileDescriptorEvents(java.io.FileDescriptor, int);
    field public static final int EVENT_ERROR = 4; // 0x4
    field public static final int EVENT_INPUT = 1; // 0x1
    field public static final int EVENT_OUTPUT = 2; // 0x2
  }

  public static abstract interface MessageQueue.IdleHandler {
    method public abstract boolean queueIdle();
  }

  public final class Messenger implements android.os.Parcelable {
    ctor public Messenger(android.os.Handler);
    ctor public Messenger(android.os.IBinder);
    method public int describeContents();
    method public android.os.IBinder getBinder();
    method public static android.os.Messenger readMessengerOrNullFromParcel(android.os.Parcel);
    method public void send(android.os.Message) throws android.os.RemoteException;
    method public static void writeMessengerOrNullToParcel(android.os.Messenger, android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.Messenger> CREATOR;
  }

  public class NetworkOnMainThreadException extends java.lang.RuntimeException {
    ctor public NetworkOnMainThreadException();
  }

  public class OperationCanceledException extends java.lang.RuntimeException {
    ctor public OperationCanceledException();
    ctor public OperationCanceledException(java.lang.String);
  }

  public final class Parcel {
    method public final void appendFrom(android.os.Parcel, int, int);
    method public final android.os.IBinder[] createBinderArray();
    method public final java.util.ArrayList<android.os.IBinder> createBinderArrayList();
    method public final boolean[] createBooleanArray();
    method public final byte[] createByteArray();
    method public final char[] createCharArray();
    method public final double[] createDoubleArray();
    method public final float[] createFloatArray();
    method public final int[] createIntArray();
    method public final long[] createLongArray();
    method public final java.lang.String[] createStringArray();
    method public final java.util.ArrayList<java.lang.String> createStringArrayList();
    method public final T[] createTypedArray(android.os.Parcelable.Creator<T>);
    method public final java.util.ArrayList<T> createTypedArrayList(android.os.Parcelable.Creator<T>);
    method public final int dataAvail();
    method public final int dataCapacity();
    method public final int dataPosition();
    method public final int dataSize();
    method public final void enforceInterface(java.lang.String);
    method public final boolean hasFileDescriptors();
    method public final byte[] marshall();
    method public static android.os.Parcel obtain();
    method public final java.lang.Object[] readArray(java.lang.ClassLoader);
    method public final java.util.ArrayList readArrayList(java.lang.ClassLoader);
    method public final void readBinderArray(android.os.IBinder[]);
    method public final void readBinderList(java.util.List<android.os.IBinder>);
    method public final void readBooleanArray(boolean[]);
    method public final android.os.Bundle readBundle();
    method public final android.os.Bundle readBundle(java.lang.ClassLoader);
    method public final byte readByte();
    method public final void readByteArray(byte[]);
    method public final void readCharArray(char[]);
    method public final double readDouble();
    method public final void readDoubleArray(double[]);
    method public final void readException();
    method public final void readException(int, java.lang.String);
    method public final android.os.ParcelFileDescriptor readFileDescriptor();
    method public final float readFloat();
    method public final void readFloatArray(float[]);
    method public final java.util.HashMap readHashMap(java.lang.ClassLoader);
    method public final int readInt();
    method public final void readIntArray(int[]);
    method public final void readList(java.util.List, java.lang.ClassLoader);
    method public final long readLong();
    method public final void readLongArray(long[]);
    method public final void readMap(java.util.Map, java.lang.ClassLoader);
    method public final T readParcelable(java.lang.ClassLoader);
    method public final android.os.Parcelable[] readParcelableArray(java.lang.ClassLoader);
    method public final android.os.PersistableBundle readPersistableBundle();
    method public final android.os.PersistableBundle readPersistableBundle(java.lang.ClassLoader);
    method public final java.io.Serializable readSerializable();
    method public final android.util.Size readSize();
    method public final android.util.SizeF readSizeF();
    method public final android.util.SparseArray readSparseArray(java.lang.ClassLoader);
    method public final android.util.SparseBooleanArray readSparseBooleanArray();
    method public final java.lang.String readString();
    method public final void readStringArray(java.lang.String[]);
    method public final void readStringList(java.util.List<java.lang.String>);
    method public final android.os.IBinder readStrongBinder();
    method public final void readTypedArray(T[], android.os.Parcelable.Creator<T>);
    method public final void readTypedList(java.util.List<T>, android.os.Parcelable.Creator<T>);
    method public final java.lang.Object readValue(java.lang.ClassLoader);
    method public final void recycle();
    method public final void setDataCapacity(int);
    method public final void setDataPosition(int);
    method public final void setDataSize(int);
    method public final void unmarshall(byte[], int, int);
    method public final void writeArray(java.lang.Object[]);
    method public final void writeBinderArray(android.os.IBinder[]);
    method public final void writeBinderList(java.util.List<android.os.IBinder>);
    method public final void writeBooleanArray(boolean[]);
    method public final void writeBundle(android.os.Bundle);
    method public final void writeByte(byte);
    method public final void writeByteArray(byte[]);
    method public final void writeByteArray(byte[], int, int);
    method public final void writeCharArray(char[]);
    method public final void writeDouble(double);
    method public final void writeDoubleArray(double[]);
    method public final void writeException(java.lang.Exception);
    method public final void writeFileDescriptor(java.io.FileDescriptor);
    method public final void writeFloat(float);
    method public final void writeFloatArray(float[]);
    method public final void writeInt(int);
    method public final void writeIntArray(int[]);
    method public final void writeInterfaceToken(java.lang.String);
    method public final void writeList(java.util.List);
    method public final void writeLong(long);
    method public final void writeLongArray(long[]);
    method public final void writeMap(java.util.Map);
    method public final void writeNoException();
    method public final void writeParcelable(android.os.Parcelable, int);
    method public final void writeParcelableArray(T[], int);
    method public final void writePersistableBundle(android.os.PersistableBundle);
    method public final void writeSerializable(java.io.Serializable);
    method public final void writeSize(android.util.Size);
    method public final void writeSizeF(android.util.SizeF);
    method public final void writeSparseArray(android.util.SparseArray<java.lang.Object>);
    method public final void writeSparseBooleanArray(android.util.SparseBooleanArray);
    method public final void writeString(java.lang.String);
    method public final void writeStringArray(java.lang.String[]);
    method public final void writeStringList(java.util.List<java.lang.String>);
    method public final void writeStrongBinder(android.os.IBinder);
    method public final void writeStrongInterface(android.os.IInterface);
    method public final void writeTypedArray(T[], int);
    method public final void writeTypedList(java.util.List<T>);
    method public final void writeValue(java.lang.Object);
    field public static final android.os.Parcelable.Creator<java.lang.String> STRING_CREATOR;
  }

  public class ParcelFileDescriptor implements java.io.Closeable android.os.Parcelable {
    ctor public ParcelFileDescriptor(android.os.ParcelFileDescriptor);
    method public static android.os.ParcelFileDescriptor adoptFd(int);
    method public boolean canDetectErrors();
    method public void checkError() throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public void closeWithError(java.lang.String) throws java.io.IOException;
    method public static android.os.ParcelFileDescriptor[] createPipe() throws java.io.IOException;
    method public static android.os.ParcelFileDescriptor[] createReliablePipe() throws java.io.IOException;
    method public static android.os.ParcelFileDescriptor[] createReliableSocketPair() throws java.io.IOException;
    method public static android.os.ParcelFileDescriptor[] createSocketPair() throws java.io.IOException;
    method public int describeContents();
    method public int detachFd();
    method public static android.os.ParcelFileDescriptor dup(java.io.FileDescriptor) throws java.io.IOException;
    method public android.os.ParcelFileDescriptor dup() throws java.io.IOException;
    method public static android.os.ParcelFileDescriptor fromDatagramSocket(java.net.DatagramSocket);
    method public static android.os.ParcelFileDescriptor fromFd(int) throws java.io.IOException;
    method public static android.os.ParcelFileDescriptor fromSocket(java.net.Socket);
    method public int getFd();
    method public java.io.FileDescriptor getFileDescriptor();
    method public long getStatSize();
    method public static android.os.ParcelFileDescriptor open(java.io.File, int) throws java.io.FileNotFoundException;
    method public static android.os.ParcelFileDescriptor open(java.io.File, int, android.os.Handler, android.os.ParcelFileDescriptor.OnCloseListener) throws java.io.IOException;
    method public static int parseMode(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.ParcelFileDescriptor> CREATOR;
    field public static final int MODE_APPEND = 33554432; // 0x2000000
    field public static final int MODE_CREATE = 134217728; // 0x8000000
    field public static final int MODE_READ_ONLY = 268435456; // 0x10000000
    field public static final int MODE_READ_WRITE = 805306368; // 0x30000000
    field public static final int MODE_TRUNCATE = 67108864; // 0x4000000
    field public static final deprecated int MODE_WORLD_READABLE = 1; // 0x1
    field public static final deprecated int MODE_WORLD_WRITEABLE = 2; // 0x2
    field public static final int MODE_WRITE_ONLY = 536870912; // 0x20000000
  }

  public static class ParcelFileDescriptor.AutoCloseInputStream extends java.io.FileInputStream {
    ctor public ParcelFileDescriptor.AutoCloseInputStream(android.os.ParcelFileDescriptor);
  }

  public static class ParcelFileDescriptor.AutoCloseOutputStream extends java.io.FileOutputStream {
    ctor public ParcelFileDescriptor.AutoCloseOutputStream(android.os.ParcelFileDescriptor);
  }

  public static class ParcelFileDescriptor.FileDescriptorDetachedException extends java.io.IOException {
    ctor public ParcelFileDescriptor.FileDescriptorDetachedException();
  }

  public static abstract interface ParcelFileDescriptor.OnCloseListener {
    method public abstract void onClose(java.io.IOException);
  }

  public class ParcelFormatException extends java.lang.RuntimeException {
    ctor public ParcelFormatException();
    ctor public ParcelFormatException(java.lang.String);
  }

  public final class ParcelUuid implements android.os.Parcelable {
    ctor public ParcelUuid(java.util.UUID);
    method public int describeContents();
    method public static android.os.ParcelUuid fromString(java.lang.String);
    method public java.util.UUID getUuid();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.ParcelUuid> CREATOR;
  }

  public abstract interface Parcelable {
    method public abstract int describeContents();
    method public abstract void writeToParcel(android.os.Parcel, int);
    field public static final int CONTENTS_FILE_DESCRIPTOR = 1; // 0x1
    field public static final int PARCELABLE_WRITE_RETURN_VALUE = 1; // 0x1
  }

  public static abstract interface Parcelable.ClassLoaderCreator implements android.os.Parcelable.Creator {
    method public abstract T createFromParcel(android.os.Parcel, java.lang.ClassLoader);
  }

  public static abstract interface Parcelable.Creator {
    method public abstract T createFromParcel(android.os.Parcel);
    method public abstract T[] newArray(int);
  }

  public class PatternMatcher implements android.os.Parcelable {
    ctor public PatternMatcher(java.lang.String, int);
    ctor public PatternMatcher(android.os.Parcel);
    method public int describeContents();
    method public final java.lang.String getPath();
    method public final int getType();
    method public boolean match(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.PatternMatcher> CREATOR;
    field public static final int PATTERN_LITERAL = 0; // 0x0
    field public static final int PATTERN_PREFIX = 1; // 0x1
    field public static final int PATTERN_SIMPLE_GLOB = 2; // 0x2
  }

  public final class PersistableBundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
    ctor public PersistableBundle();
    ctor public PersistableBundle(int);
    ctor public PersistableBundle(android.os.PersistableBundle);
    method public java.lang.Object clone();
    method public int describeContents();
    method public android.os.PersistableBundle getPersistableBundle(java.lang.String);
    method public void putPersistableBundle(java.lang.String, android.os.PersistableBundle);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.PersistableBundle> CREATOR;
    field public static final android.os.PersistableBundle EMPTY;
  }

  public final class PowerManager {
    method public boolean isDeviceIdleMode();
    method public boolean isInteractive();
    method public boolean isPowerSaveMode();
    method public deprecated boolean isScreenOn();
    method public boolean isWakeLockLevelSupported(int);
    method public android.os.PowerManager.WakeLock newWakeLock(int, java.lang.String);
    method public void reboot(java.lang.String);
    field public static final int ACQUIRE_CAUSES_WAKEUP = 268435456; // 0x10000000
    field public static final java.lang.String ACTION_DEVICE_IDLE_MODE_CHANGED = "android.os.action.DEVICE_IDLE_MODE_CHANGED";
    field public static final java.lang.String ACTION_POWER_SAVE_MODE_CHANGED = "android.os.action.POWER_SAVE_MODE_CHANGED";
    field public static final deprecated int FULL_WAKE_LOCK = 26; // 0x1a
    field public static final int ON_AFTER_RELEASE = 536870912; // 0x20000000
    field public static final int PARTIAL_WAKE_LOCK = 1; // 0x1
    field public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32; // 0x20
    field public static final int RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY = 1; // 0x1
    field public static final deprecated int SCREEN_BRIGHT_WAKE_LOCK = 10; // 0xa
    field public static final deprecated int SCREEN_DIM_WAKE_LOCK = 6; // 0x6
  }

  public final class PowerManager.WakeLock {
    method public void acquire();
    method public void acquire(long);
    method public boolean isHeld();
    method public void release();
    method public void release(int);
    method public void setReferenceCounted(boolean);
    method public void setWorkSource(android.os.WorkSource);
  }

  public class Process {
    ctor public Process();
    method public static final long getElapsedCpuTime();
    method public static final int getGidForName(java.lang.String);
    method public static final int getThreadPriority(int) throws java.lang.IllegalArgumentException;
    method public static final int getUidForName(java.lang.String);
    method public static final void killProcess(int);
    method public static final int myPid();
    method public static final int myTid();
    method public static final int myUid();
    method public static final android.os.UserHandle myUserHandle();
    method public static final void sendSignal(int, int);
    method public static final void setThreadPriority(int, int) throws java.lang.IllegalArgumentException, java.lang.SecurityException;
    method public static final void setThreadPriority(int) throws java.lang.IllegalArgumentException, java.lang.SecurityException;
    method public static final deprecated boolean supportsProcesses();
    field public static final int FIRST_APPLICATION_UID = 10000; // 0x2710
    field public static final int LAST_APPLICATION_UID = 19999; // 0x4e1f
    field public static final int PHONE_UID = 1001; // 0x3e9
    field public static final int SIGNAL_KILL = 9; // 0x9
    field public static final int SIGNAL_QUIT = 3; // 0x3
    field public static final int SIGNAL_USR1 = 10; // 0xa
    field public static final int SYSTEM_UID = 1000; // 0x3e8
    field public static final int THREAD_PRIORITY_AUDIO = -16; // 0xfffffff0
    field public static final int THREAD_PRIORITY_BACKGROUND = 10; // 0xa
    field public static final int THREAD_PRIORITY_DEFAULT = 0; // 0x0
    field public static final int THREAD_PRIORITY_DISPLAY = -4; // 0xfffffffc
    field public static final int THREAD_PRIORITY_FOREGROUND = -2; // 0xfffffffe
    field public static final int THREAD_PRIORITY_LESS_FAVORABLE = 1; // 0x1
    field public static final int THREAD_PRIORITY_LOWEST = 19; // 0x13
    field public static final int THREAD_PRIORITY_MORE_FAVORABLE = -1; // 0xffffffff
    field public static final int THREAD_PRIORITY_URGENT_AUDIO = -19; // 0xffffffed
    field public static final int THREAD_PRIORITY_URGENT_DISPLAY = -8; // 0xfffffff8
  }

  public class RecoverySystem {
    ctor public RecoverySystem();
    method public static void installPackage(android.content.Context, java.io.File) throws java.io.IOException;
    method public static void rebootWipeCache(android.content.Context) throws java.io.IOException;
    method public static void rebootWipeUserData(android.content.Context) throws java.io.IOException;
    method public static void verifyPackage(java.io.File, android.os.RecoverySystem.ProgressListener, java.io.File) throws java.security.GeneralSecurityException, java.io.IOException;
  }

  public static abstract interface RecoverySystem.ProgressListener {
    method public abstract void onProgress(int);
  }

  public class RemoteCallbackList {
    ctor public RemoteCallbackList();
    method public int beginBroadcast();
    method public void finishBroadcast();
    method public java.lang.Object getBroadcastCookie(int);
    method public E getBroadcastItem(int);
    method public int getRegisteredCallbackCount();
    method public void kill();
    method public void onCallbackDied(E);
    method public void onCallbackDied(E, java.lang.Object);
    method public boolean register(E);
    method public boolean register(E, java.lang.Object);
    method public boolean unregister(E);
  }

  public class RemoteException extends android.util.AndroidException {
    ctor public RemoteException();
    ctor public RemoteException(java.lang.String);
  }

  public class ResultReceiver implements android.os.Parcelable {
    ctor public ResultReceiver(android.os.Handler);
    method public int describeContents();
    method protected void onReceiveResult(int, android.os.Bundle);
    method public void send(int, android.os.Bundle);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.ResultReceiver> CREATOR;
  }

  public class StatFs {
    ctor public StatFs(java.lang.String);
    method public deprecated int getAvailableBlocks();
    method public long getAvailableBlocksLong();
    method public long getAvailableBytes();
    method public deprecated int getBlockCount();
    method public long getBlockCountLong();
    method public deprecated int getBlockSize();
    method public long getBlockSizeLong();
    method public deprecated int getFreeBlocks();
    method public long getFreeBlocksLong();
    method public long getFreeBytes();
    method public long getTotalBytes();
    method public void restat(java.lang.String);
  }

  public final class StrictMode {
    method public static android.os.StrictMode.ThreadPolicy allowThreadDiskReads();
    method public static android.os.StrictMode.ThreadPolicy allowThreadDiskWrites();
    method public static void enableDefaults();
    method public static android.os.StrictMode.ThreadPolicy getThreadPolicy();
    method public static android.os.StrictMode.VmPolicy getVmPolicy();
    method public static void noteSlowCall(java.lang.String);
    method public static void setThreadPolicy(android.os.StrictMode.ThreadPolicy);
    method public static void setVmPolicy(android.os.StrictMode.VmPolicy);
  }

  public static final class StrictMode.ThreadPolicy {
    field public static final android.os.StrictMode.ThreadPolicy LAX;
  }

  public static final class StrictMode.ThreadPolicy.Builder {
    ctor public StrictMode.ThreadPolicy.Builder();
    ctor public StrictMode.ThreadPolicy.Builder(android.os.StrictMode.ThreadPolicy);
    method public android.os.StrictMode.ThreadPolicy build();
    method public android.os.StrictMode.ThreadPolicy.Builder detectAll();
    method public android.os.StrictMode.ThreadPolicy.Builder detectCustomSlowCalls();
    method public android.os.StrictMode.ThreadPolicy.Builder detectDiskReads();
    method public android.os.StrictMode.ThreadPolicy.Builder detectDiskWrites();
    method public android.os.StrictMode.ThreadPolicy.Builder detectNetwork();
    method public android.os.StrictMode.ThreadPolicy.Builder detectResourceMismatches();
    method public android.os.StrictMode.ThreadPolicy.Builder penaltyDeath();
    method public android.os.StrictMode.ThreadPolicy.Builder penaltyDeathOnNetwork();
    method public android.os.StrictMode.ThreadPolicy.Builder penaltyDialog();
    method public android.os.StrictMode.ThreadPolicy.Builder penaltyDropBox();
    method public android.os.StrictMode.ThreadPolicy.Builder penaltyFlashScreen();
    method public android.os.StrictMode.ThreadPolicy.Builder penaltyLog();
    method public android.os.StrictMode.ThreadPolicy.Builder permitAll();
    method public android.os.StrictMode.ThreadPolicy.Builder permitCustomSlowCalls();
    method public android.os.StrictMode.ThreadPolicy.Builder permitDiskReads();
    method public android.os.StrictMode.ThreadPolicy.Builder permitDiskWrites();
    method public android.os.StrictMode.ThreadPolicy.Builder permitNetwork();
    method public android.os.StrictMode.ThreadPolicy.Builder permitResourceMismatches();
  }

  public static final class StrictMode.VmPolicy {
    field public static final android.os.StrictMode.VmPolicy LAX;
  }

  public static final class StrictMode.VmPolicy.Builder {
    ctor public StrictMode.VmPolicy.Builder();
    ctor public StrictMode.VmPolicy.Builder(android.os.StrictMode.VmPolicy);
    method public android.os.StrictMode.VmPolicy build();
    method public android.os.StrictMode.VmPolicy.Builder detectActivityLeaks();
    method public android.os.StrictMode.VmPolicy.Builder detectAll();
    method public android.os.StrictMode.VmPolicy.Builder detectCleartextNetwork();
    method public android.os.StrictMode.VmPolicy.Builder detectFileUriExposure();
    method public android.os.StrictMode.VmPolicy.Builder detectLeakedClosableObjects();
    method public android.os.StrictMode.VmPolicy.Builder detectLeakedRegistrationObjects();
    method public android.os.StrictMode.VmPolicy.Builder detectLeakedSqlLiteObjects();
    method public android.os.StrictMode.VmPolicy.Builder penaltyDeath();
    method public android.os.StrictMode.VmPolicy.Builder penaltyDeathOnCleartextNetwork();
    method public android.os.StrictMode.VmPolicy.Builder penaltyDropBox();
    method public android.os.StrictMode.VmPolicy.Builder penaltyLog();
    method public android.os.StrictMode.VmPolicy.Builder setClassInstanceLimit(java.lang.Class, int);
  }

  public final class SystemClock {
    method public static long currentThreadTimeMillis();
    method public static long elapsedRealtime();
    method public static long elapsedRealtimeNanos();
    method public static boolean setCurrentTimeMillis(long);
    method public static void sleep(long);
    method public static long uptimeMillis();
  }

  public abstract class TokenWatcher {
    ctor public TokenWatcher(android.os.Handler, java.lang.String);
    method public void acquire(android.os.IBinder, java.lang.String);
    method public abstract void acquired();
    method public void cleanup(android.os.IBinder, boolean);
    method public void dump();
    method public void dump(java.io.PrintWriter);
    method public boolean isAcquired();
    method public void release(android.os.IBinder);
    method public abstract void released();
  }

  public final class Trace {
    method public static void beginSection(java.lang.String);
    method public static void endSection();
  }

  public class TransactionTooLargeException extends android.os.RemoteException {
    ctor public TransactionTooLargeException();
  }

  public final class UserHandle implements android.os.Parcelable {
    ctor public UserHandle(android.os.Parcel);
    method public int describeContents();
    method public static android.os.UserHandle readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    method public static void writeToParcel(android.os.UserHandle, android.os.Parcel);
    field public static final android.os.Parcelable.Creator<android.os.UserHandle> CREATOR;
  }

  public class UserManager {
    method public android.os.Bundle getApplicationRestrictions(java.lang.String);
    method public long getSerialNumberForUser(android.os.UserHandle);
    method public int getUserCount();
    method public long getUserCreationTime(android.os.UserHandle);
    method public android.os.UserHandle getUserForSerialNumber(long);
    method public java.lang.String getUserName();
    method public java.util.List<android.os.UserHandle> getUserProfiles();
    method public android.os.Bundle getUserRestrictions();
    method public android.os.Bundle getUserRestrictions(android.os.UserHandle);
    method public boolean hasUserRestriction(java.lang.String);
    method public boolean isUserAGoat();
    method public boolean isUserRunning(android.os.UserHandle);
    method public boolean isUserRunningOrStopping(android.os.UserHandle);
    method public boolean setRestrictionsChallenge(java.lang.String);
    method public deprecated void setUserRestriction(java.lang.String, boolean);
    method public deprecated void setUserRestrictions(android.os.Bundle);
    method public deprecated void setUserRestrictions(android.os.Bundle, android.os.UserHandle);
    field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user";
    field public static final java.lang.String DISALLOW_ADJUST_VOLUME = "no_adjust_volume";
    field public static final java.lang.String DISALLOW_APPS_CONTROL = "no_control_apps";
    field public static final java.lang.String DISALLOW_CONFIG_BLUETOOTH = "no_config_bluetooth";
    field public static final java.lang.String DISALLOW_CONFIG_CELL_BROADCASTS = "no_config_cell_broadcasts";
    field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials";
    field public static final java.lang.String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";
    field public static final java.lang.String DISALLOW_CONFIG_TETHERING = "no_config_tethering";
    field public static final java.lang.String DISALLOW_CONFIG_VPN = "no_config_vpn";
    field public static final java.lang.String DISALLOW_CONFIG_WIFI = "no_config_wifi";
    field public static final java.lang.String DISALLOW_CREATE_WINDOWS = "no_create_windows";
    field public static final java.lang.String DISALLOW_CROSS_PROFILE_COPY_PASTE = "no_cross_profile_copy_paste";
    field public static final java.lang.String DISALLOW_DEBUGGING_FEATURES = "no_debugging_features";
    field public static final java.lang.String DISALLOW_FACTORY_RESET = "no_factory_reset";
    field public static final java.lang.String DISALLOW_INSTALL_APPS = "no_install_apps";
    field public static final java.lang.String DISALLOW_INSTALL_UNKNOWN_SOURCES = "no_install_unknown_sources";
    field public static final java.lang.String DISALLOW_MODIFY_ACCOUNTS = "no_modify_accounts";
    field public static final java.lang.String DISALLOW_MOUNT_PHYSICAL_MEDIA = "no_physical_media";
    field public static final java.lang.String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam";
    field public static final java.lang.String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls";
    field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user";
    field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot";
    field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location";
    field public static final java.lang.String DISALLOW_SMS = "no_sms";
    field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
    field public static final java.lang.String DISALLOW_UNMUTE_MICROPHONE = "no_unmute_microphone";
    field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
    field public static final java.lang.String ENSURE_VERIFY_APPS = "ensure_verify_apps";
    field public static final java.lang.String KEY_RESTRICTIONS_PENDING = "restrictions_pending";
  }

  public abstract class Vibrator {
    method public abstract void cancel();
    method public abstract boolean hasVibrator();
    method public void vibrate(long);
    method public void vibrate(long, android.media.AudioAttributes);
    method public void vibrate(long[], int);
    method public void vibrate(long[], int, android.media.AudioAttributes);
  }

  public class WorkSource implements android.os.Parcelable {
    ctor public WorkSource();
    ctor public WorkSource(android.os.WorkSource);
    method public boolean add(android.os.WorkSource);
    method public void clear();
    method public int describeContents();
    method public boolean diff(android.os.WorkSource);
    method public boolean remove(android.os.WorkSource);
    method public void set(android.os.WorkSource);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.WorkSource> CREATOR;
  }

}

package android.os.storage {

  public abstract class OnObbStateChangeListener {
    ctor public OnObbStateChangeListener();
    method public void onObbStateChange(java.lang.String, int);
    field public static final int ERROR_ALREADY_MOUNTED = 24; // 0x18
    field public static final int ERROR_COULD_NOT_MOUNT = 21; // 0x15
    field public static final int ERROR_COULD_NOT_UNMOUNT = 22; // 0x16
    field public static final int ERROR_INTERNAL = 20; // 0x14
    field public static final int ERROR_NOT_MOUNTED = 23; // 0x17
    field public static final int ERROR_PERMISSION_DENIED = 25; // 0x19
    field public static final int MOUNTED = 1; // 0x1
    field public static final int UNMOUNTED = 2; // 0x2
  }

  public class StorageManager {
    method public java.lang.String getMountedObbPath(java.lang.String);
    method public boolean isObbMounted(java.lang.String);
    method public boolean mountObb(java.lang.String, java.lang.String, android.os.storage.OnObbStateChangeListener);
    method public boolean unmountObb(java.lang.String, boolean, android.os.storage.OnObbStateChangeListener);
  }

}

package android.preference {

  public class CheckBoxPreference extends android.preference.TwoStatePreference {
    ctor public CheckBoxPreference(android.content.Context, android.util.AttributeSet, int);
    ctor public CheckBoxPreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public CheckBoxPreference(android.content.Context, android.util.AttributeSet);
    ctor public CheckBoxPreference(android.content.Context);
  }

  public abstract class DialogPreference extends android.preference.Preference implements android.content.DialogInterface.OnClickListener android.content.DialogInterface.OnDismissListener android.preference.PreferenceManager.OnActivityDestroyListener {
    ctor public DialogPreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public DialogPreference(android.content.Context, android.util.AttributeSet, int);
    ctor public DialogPreference(android.content.Context, android.util.AttributeSet);
    ctor public DialogPreference(android.content.Context);
    method public android.app.Dialog getDialog();
    method public android.graphics.drawable.Drawable getDialogIcon();
    method public int getDialogLayoutResource();
    method public java.lang.CharSequence getDialogMessage();
    method public java.lang.CharSequence getDialogTitle();
    method public java.lang.CharSequence getNegativeButtonText();
    method public java.lang.CharSequence getPositiveButtonText();
    method public void onActivityDestroy();
    method protected void onBindDialogView(android.view.View);
    method public void onClick(android.content.DialogInterface, int);
    method protected android.view.View onCreateDialogView();
    method protected void onDialogClosed(boolean);
    method public void onDismiss(android.content.DialogInterface);
    method protected void onPrepareDialogBuilder(android.app.AlertDialog.Builder);
    method public void setDialogIcon(android.graphics.drawable.Drawable);
    method public void setDialogIcon(int);
    method public void setDialogLayoutResource(int);
    method public void setDialogMessage(java.lang.CharSequence);
    method public void setDialogMessage(int);
    method public void setDialogTitle(java.lang.CharSequence);
    method public void setDialogTitle(int);
    method public void setNegativeButtonText(java.lang.CharSequence);
    method public void setNegativeButtonText(int);
    method public void setPositiveButtonText(java.lang.CharSequence);
    method public void setPositiveButtonText(int);
    method protected void showDialog(android.os.Bundle);
  }

  public class EditTextPreference extends android.preference.DialogPreference {
    ctor public EditTextPreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public EditTextPreference(android.content.Context, android.util.AttributeSet, int);
    ctor public EditTextPreference(android.content.Context, android.util.AttributeSet);
    ctor public EditTextPreference(android.content.Context);
    method public android.widget.EditText getEditText();
    method public java.lang.String getText();
    method protected void onAddEditTextToDialogView(android.view.View, android.widget.EditText);
    method public void setText(java.lang.String);
  }

  public class ListPreference extends android.preference.DialogPreference {
    ctor public ListPreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public ListPreference(android.content.Context, android.util.AttributeSet, int);
    ctor public ListPreference(android.content.Context, android.util.AttributeSet);
    ctor public ListPreference(android.content.Context);
    method public int findIndexOfValue(java.lang.String);
    method public java.lang.CharSequence[] getEntries();
    method public java.lang.CharSequence getEntry();
    method public java.lang.CharSequence[] getEntryValues();
    method public java.lang.String getValue();
    method public void setEntries(java.lang.CharSequence[]);
    method public void setEntries(int);
    method public void setEntryValues(java.lang.CharSequence[]);
    method public void setEntryValues(int);
    method public void setValue(java.lang.String);
    method public void setValueIndex(int);
  }

  public class MultiSelectListPreference extends android.preference.DialogPreference {
    ctor public MultiSelectListPreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public MultiSelectListPreference(android.content.Context, android.util.AttributeSet, int);
    ctor public MultiSelectListPreference(android.content.Context, android.util.AttributeSet);
    ctor public MultiSelectListPreference(android.content.Context);
    method public int findIndexOfValue(java.lang.String);
    method public java.lang.CharSequence[] getEntries();
    method public java.lang.CharSequence[] getEntryValues();
    method public java.util.Set<java.lang.String> getValues();
    method public void setEntries(java.lang.CharSequence[]);
    method public void setEntries(int);
    method public void setEntryValues(java.lang.CharSequence[]);
    method public void setEntryValues(int);
    method public void setValues(java.util.Set<java.lang.String>);
  }

  public class Preference implements java.lang.Comparable {
    ctor public Preference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public Preference(android.content.Context, android.util.AttributeSet, int);
    ctor public Preference(android.content.Context, android.util.AttributeSet);
    ctor public Preference(android.content.Context);
    method protected boolean callChangeListener(java.lang.Object);
    method public int compareTo(android.preference.Preference);
    method protected android.preference.Preference findPreferenceInHierarchy(java.lang.String);
    method public android.content.Context getContext();
    method public java.lang.String getDependency();
    method public android.content.SharedPreferences.Editor getEditor();
    method public android.os.Bundle getExtras();
    method public java.lang.String getFragment();
    method public android.graphics.drawable.Drawable getIcon();
    method public android.content.Intent getIntent();
    method public java.lang.String getKey();
    method public int getLayoutResource();
    method public android.preference.Preference.OnPreferenceChangeListener getOnPreferenceChangeListener();
    method public android.preference.Preference.OnPreferenceClickListener getOnPreferenceClickListener();
    method public int getOrder();
    method protected boolean getPersistedBoolean(boolean);
    method protected float getPersistedFloat(float);
    method protected int getPersistedInt(int);
    method protected long getPersistedLong(long);
    method protected java.lang.String getPersistedString(java.lang.String);
    method public android.preference.PreferenceManager getPreferenceManager();
    method public android.content.SharedPreferences getSharedPreferences();
    method public boolean getShouldDisableView();
    method public java.lang.CharSequence getSummary();
    method public java.lang.CharSequence getTitle();
    method public int getTitleRes();
    method public android.view.View getView(android.view.View, android.view.ViewGroup);
    method public int getWidgetLayoutResource();
    method public boolean hasKey();
    method public boolean isEnabled();
    method public boolean isPersistent();
    method public boolean isSelectable();
    method protected void notifyChanged();
    method public void notifyDependencyChange(boolean);
    method protected void notifyHierarchyChanged();
    method protected void onAttachedToActivity();
    method protected void onAttachedToHierarchy(android.preference.PreferenceManager);
    method protected void onBindView(android.view.View);
    method protected void onClick();
    method protected android.view.View onCreateView(android.view.ViewGroup);
    method public void onDependencyChanged(android.preference.Preference, boolean);
    method protected java.lang.Object onGetDefaultValue(android.content.res.TypedArray, int);
    method public void onParentChanged(android.preference.Preference, boolean);
    method protected void onPrepareForRemoval();
    method protected void onRestoreInstanceState(android.os.Parcelable);
    method protected android.os.Parcelable onSaveInstanceState();
    method protected void onSetInitialValue(boolean, java.lang.Object);
    method public android.os.Bundle peekExtras();
    method protected boolean persistBoolean(boolean);
    method protected boolean persistFloat(float);
    method protected boolean persistInt(int);
    method protected boolean persistLong(long);
    method protected boolean persistString(java.lang.String);
    method public void restoreHierarchyState(android.os.Bundle);
    method public void saveHierarchyState(android.os.Bundle);
    method public void setDefaultValue(java.lang.Object);
    method public void setDependency(java.lang.String);
    method public void setEnabled(boolean);
    method public void setFragment(java.lang.String);
    method public void setIcon(android.graphics.drawable.Drawable);
    method public void setIcon(int);
    method public void setIntent(android.content.Intent);
    method public void setKey(java.lang.String);
    method public void setLayoutResource(int);
    method public void setOnPreferenceChangeListener(android.preference.Preference.OnPreferenceChangeListener);
    method public void setOnPreferenceClickListener(android.preference.Preference.OnPreferenceClickListener);
    method public void setOrder(int);
    method public void setPersistent(boolean);
    method public void setSelectable(boolean);
    method public void setShouldDisableView(boolean);
    method public void setSummary(java.lang.CharSequence);
    method public void setSummary(int);
    method public void setTitle(java.lang.CharSequence);
    method public void setTitle(int);
    method public void setWidgetLayoutResource(int);
    method public boolean shouldCommit();
    method public boolean shouldDisableDependents();
    method protected boolean shouldPersist();
    field public static final int DEFAULT_ORDER = 2147483647; // 0x7fffffff
  }

  public static class Preference.BaseSavedState extends android.view.AbsSavedState {
    ctor public Preference.BaseSavedState(android.os.Parcel);
    ctor public Preference.BaseSavedState(android.os.Parcelable);
    field public static final android.os.Parcelable.Creator<android.preference.Preference.BaseSavedState> CREATOR;
  }

  public static abstract interface Preference.OnPreferenceChangeListener {
    method public abstract boolean onPreferenceChange(android.preference.Preference, java.lang.Object);
  }

  public static abstract interface Preference.OnPreferenceClickListener {
    method public abstract boolean onPreferenceClick(android.preference.Preference);
  }

  public abstract class PreferenceActivity extends android.app.ListActivity implements android.preference.PreferenceFragment.OnPreferenceStartFragmentCallback {
    ctor public PreferenceActivity();
    method public deprecated void addPreferencesFromIntent(android.content.Intent);
    method public deprecated void addPreferencesFromResource(int);
    method public deprecated android.preference.Preference findPreference(java.lang.CharSequence);
    method public void finishPreferencePanel(android.app.Fragment, int, android.content.Intent);
    method public deprecated android.preference.PreferenceManager getPreferenceManager();
    method public deprecated android.preference.PreferenceScreen getPreferenceScreen();
    method public boolean hasHeaders();
    method public void invalidateHeaders();
    method public boolean isMultiPane();
    method protected boolean isValidFragment(java.lang.String);
    method public void loadHeadersFromResource(int, java.util.List<android.preference.PreferenceActivity.Header>);
    method public void onBuildHeaders(java.util.List<android.preference.PreferenceActivity.Header>);
    method public android.content.Intent onBuildStartFragmentIntent(java.lang.String, android.os.Bundle, int, int);
    method public android.preference.PreferenceActivity.Header onGetInitialHeader();
    method public android.preference.PreferenceActivity.Header onGetNewHeader();
    method public void onHeaderClick(android.preference.PreferenceActivity.Header, int);
    method public boolean onIsHidingHeaders();
    method public boolean onIsMultiPane();
    method public boolean onPreferenceStartFragment(android.preference.PreferenceFragment, android.preference.Preference);
    method public deprecated boolean onPreferenceTreeClick(android.preference.PreferenceScreen, android.preference.Preference);
    method public void setListFooter(android.view.View);
    method public void setParentTitle(java.lang.CharSequence, java.lang.CharSequence, android.view.View.OnClickListener);
    method public deprecated void setPreferenceScreen(android.preference.PreferenceScreen);
    method public void showBreadCrumbs(java.lang.CharSequence, java.lang.CharSequence);
    method public void startPreferenceFragment(android.app.Fragment, boolean);
    method public void startPreferencePanel(java.lang.String, android.os.Bundle, int, java.lang.CharSequence, android.app.Fragment, int);
    method public void startWithFragment(java.lang.String, android.os.Bundle, android.app.Fragment, int);
    method public void startWithFragment(java.lang.String, android.os.Bundle, android.app.Fragment, int, int, int);
    method public void switchToHeader(java.lang.String, android.os.Bundle);
    method public void switchToHeader(android.preference.PreferenceActivity.Header);
    field public static final java.lang.String EXTRA_NO_HEADERS = ":android:no_headers";
    field public static final java.lang.String EXTRA_SHOW_FRAGMENT = ":android:show_fragment";
    field public static final java.lang.String EXTRA_SHOW_FRAGMENT_ARGUMENTS = ":android:show_fragment_args";
    field public static final java.lang.String EXTRA_SHOW_FRAGMENT_SHORT_TITLE = ":android:show_fragment_short_title";
    field public static final java.lang.String EXTRA_SHOW_FRAGMENT_TITLE = ":android:show_fragment_title";
    field public static final long HEADER_ID_UNDEFINED = -1L; // 0xffffffffffffffffL
  }

  public static final class PreferenceActivity.Header implements android.os.Parcelable {
    ctor public PreferenceActivity.Header();
    method public int describeContents();
    method public java.lang.CharSequence getBreadCrumbShortTitle(android.content.res.Resources);
    method public java.lang.CharSequence getBreadCrumbTitle(android.content.res.Resources);
    method public java.lang.CharSequence getSummary(android.content.res.Resources);
    method public java.lang.CharSequence getTitle(android.content.res.Resources);
    method public void readFromParcel(android.os.Parcel);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.preference.PreferenceActivity.Header> CREATOR;
    field public java.lang.CharSequence breadCrumbShortTitle;
    field public int breadCrumbShortTitleRes;
    field public java.lang.CharSequence breadCrumbTitle;
    field public int breadCrumbTitleRes;
    field public android.os.Bundle extras;
    field public java.lang.String fragment;
    field public android.os.Bundle fragmentArguments;
    field public int iconRes;
    field public long id;
    field public android.content.Intent intent;
    field public java.lang.CharSequence summary;
    field public int summaryRes;
    field public java.lang.CharSequence title;
    field public int titleRes;
  }

  public class PreferenceCategory extends android.preference.PreferenceGroup {
    ctor public PreferenceCategory(android.content.Context, android.util.AttributeSet, int, int);
    ctor public PreferenceCategory(android.content.Context, android.util.AttributeSet, int);
    ctor public PreferenceCategory(android.content.Context, android.util.AttributeSet);
    ctor public PreferenceCategory(android.content.Context);
  }

  public abstract class PreferenceFragment extends android.app.Fragment {
    ctor public PreferenceFragment();
    method public void addPreferencesFromIntent(android.content.Intent);
    method public void addPreferencesFromResource(int);
    method public android.preference.Preference findPreference(java.lang.CharSequence);
    method public android.preference.PreferenceManager getPreferenceManager();
    method public android.preference.PreferenceScreen getPreferenceScreen();
    method public boolean onPreferenceTreeClick(android.preference.PreferenceScreen, android.preference.Preference);
    method public void setPreferenceScreen(android.preference.PreferenceScreen);
  }

  public static abstract interface PreferenceFragment.OnPreferenceStartFragmentCallback {
    method public abstract boolean onPreferenceStartFragment(android.preference.PreferenceFragment, android.preference.Preference);
  }

  public abstract class PreferenceGroup extends android.preference.Preference {
    ctor public PreferenceGroup(android.content.Context, android.util.AttributeSet, int, int);
    ctor public PreferenceGroup(android.content.Context, android.util.AttributeSet, int);
    ctor public PreferenceGroup(android.content.Context, android.util.AttributeSet);
    method public void addItemFromInflater(android.preference.Preference);
    method public boolean addPreference(android.preference.Preference);
    method protected void dispatchRestoreInstanceState(android.os.Bundle);
    method protected void dispatchSaveInstanceState(android.os.Bundle);
    method public android.preference.Preference findPreference(java.lang.CharSequence);
    method public android.preference.Preference getPreference(int);
    method public int getPreferenceCount();
    method protected boolean isOnSameScreenAsChildren();
    method public boolean isOrderingAsAdded();
    method protected boolean onPrepareAddPreference(android.preference.Preference);
    method public void removeAll();
    method public boolean removePreference(android.preference.Preference);
    method public void setOrderingAsAdded(boolean);
  }

  public class PreferenceManager {
    method public android.preference.PreferenceScreen createPreferenceScreen(android.content.Context);
    method public android.preference.Preference findPreference(java.lang.CharSequence);
    method public static android.content.SharedPreferences getDefaultSharedPreferences(android.content.Context);
    method public android.content.SharedPreferences getSharedPreferences();
    method public int getSharedPreferencesMode();
    method public java.lang.String getSharedPreferencesName();
    method public static void setDefaultValues(android.content.Context, int, boolean);
    method public static void setDefaultValues(android.content.Context, java.lang.String, int, int, boolean);
    method public void setSharedPreferencesMode(int);
    method public void setSharedPreferencesName(java.lang.String);
    field public static final java.lang.String KEY_HAS_SET_DEFAULT_VALUES = "_has_set_default_values";
    field public static final java.lang.String METADATA_KEY_PREFERENCES = "android.preference";
  }

  public static abstract interface PreferenceManager.OnActivityDestroyListener {
    method public abstract void onActivityDestroy();
  }

  public static abstract interface PreferenceManager.OnActivityResultListener {
    method public abstract boolean onActivityResult(int, int, android.content.Intent);
  }

  public static abstract interface PreferenceManager.OnActivityStopListener {
    method public abstract void onActivityStop();
  }

  public final class PreferenceScreen extends android.preference.PreferenceGroup implements android.widget.AdapterView.OnItemClickListener android.content.DialogInterface.OnDismissListener {
    method public void bind(android.widget.ListView);
    method public android.app.Dialog getDialog();
    method public android.widget.ListAdapter getRootAdapter();
    method protected android.widget.ListAdapter onCreateRootAdapter();
    method public void onDismiss(android.content.DialogInterface);
    method public void onItemClick(android.widget.AdapterView, android.view.View, int, long);
  }

  public class RingtonePreference extends android.preference.Preference implements android.preference.PreferenceManager.OnActivityResultListener {
    ctor public RingtonePreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public RingtonePreference(android.content.Context, android.util.AttributeSet, int);
    ctor public RingtonePreference(android.content.Context, android.util.AttributeSet);
    ctor public RingtonePreference(android.content.Context);
    method public int getRingtoneType();
    method public boolean getShowDefault();
    method public boolean getShowSilent();
    method public boolean onActivityResult(int, int, android.content.Intent);
    method protected void onPrepareRingtonePickerIntent(android.content.Intent);
    method protected android.net.Uri onRestoreRingtone();
    method protected void onSaveRingtone(android.net.Uri);
    method public void setRingtoneType(int);
    method public void setShowDefault(boolean);
    method public void setShowSilent(boolean);
  }

  public class SwitchPreference extends android.preference.TwoStatePreference {
    ctor public SwitchPreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public SwitchPreference(android.content.Context, android.util.AttributeSet, int);
    ctor public SwitchPreference(android.content.Context, android.util.AttributeSet);
    ctor public SwitchPreference(android.content.Context);
    method public java.lang.CharSequence getSwitchTextOff();
    method public java.lang.CharSequence getSwitchTextOn();
    method public void setSwitchTextOff(java.lang.CharSequence);
    method public void setSwitchTextOff(int);
    method public void setSwitchTextOn(java.lang.CharSequence);
    method public void setSwitchTextOn(int);
  }

  public abstract class TwoStatePreference extends android.preference.Preference {
    ctor public TwoStatePreference(android.content.Context, android.util.AttributeSet, int, int);
    ctor public TwoStatePreference(android.content.Context, android.util.AttributeSet, int);
    ctor public TwoStatePreference(android.content.Context, android.util.AttributeSet);
    ctor public TwoStatePreference(android.content.Context);
    method public boolean getDisableDependentsState();
    method public java.lang.CharSequence getSummaryOff();
    method public java.lang.CharSequence getSummaryOn();
    method public boolean isChecked();
    method public void setChecked(boolean);
    method public void setDisableDependentsState(boolean);
    method public void setSummaryOff(java.lang.CharSequence);
    method public void setSummaryOff(int);
    method public void setSummaryOn(java.lang.CharSequence);
    method public void setSummaryOn(int);
  }

}

package android.print {

  public final class PageRange implements android.os.Parcelable {
    ctor public PageRange(int, int);
    method public int describeContents();
    method public int getEnd();
    method public int getStart();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.print.PageRange ALL_PAGES;
    field public static final android.os.Parcelable.Creator<android.print.PageRange> CREATOR;
  }

  public final class PrintAttributes implements android.os.Parcelable {
    method public int describeContents();
    method public int getColorMode();
    method public int getDuplexMode();
    method public android.print.PrintAttributes.MediaSize getMediaSize();
    method public android.print.PrintAttributes.Margins getMinMargins();
    method public android.print.PrintAttributes.Resolution getResolution();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int COLOR_MODE_COLOR = 2; // 0x2
    field public static final int COLOR_MODE_MONOCHROME = 1; // 0x1
    field public static final android.os.Parcelable.Creator<android.print.PrintAttributes> CREATOR;
    field public static final int DUPLEX_MODE_LONG_EDGE = 2; // 0x2
    field public static final int DUPLEX_MODE_NONE = 1; // 0x1
    field public static final int DUPLEX_MODE_SHORT_EDGE = 4; // 0x4
  }

  public static final class PrintAttributes.Builder {
    ctor public PrintAttributes.Builder();
    method public android.print.PrintAttributes build();
    method public android.print.PrintAttributes.Builder setColorMode(int);
    method public android.print.PrintAttributes.Builder setDuplexMode(int);
    method public android.print.PrintAttributes.Builder setMediaSize(android.print.PrintAttributes.MediaSize);
    method public android.print.PrintAttributes.Builder setMinMargins(android.print.PrintAttributes.Margins);
    method public android.print.PrintAttributes.Builder setResolution(android.print.PrintAttributes.Resolution);
  }

  public static final class PrintAttributes.Margins {
    ctor public PrintAttributes.Margins(int, int, int, int);
    method public int getBottomMils();
    method public int getLeftMils();
    method public int getRightMils();
    method public int getTopMils();
    field public static final android.print.PrintAttributes.Margins NO_MARGINS;
  }

  public static final class PrintAttributes.MediaSize {
    ctor public PrintAttributes.MediaSize(java.lang.String, java.lang.String, int, int);
    method public android.print.PrintAttributes.MediaSize asLandscape();
    method public android.print.PrintAttributes.MediaSize asPortrait();
    method public int getHeightMils();
    method public java.lang.String getId();
    method public java.lang.String getLabel(android.content.pm.PackageManager);
    method public int getWidthMils();
    method public boolean isPortrait();
    field public static final android.print.PrintAttributes.MediaSize ISO_A0;
    field public static final android.print.PrintAttributes.MediaSize ISO_A1;
    field public static final android.print.PrintAttributes.MediaSize ISO_A10;
    field public static final android.print.PrintAttributes.MediaSize ISO_A2;
    field public static final android.print.PrintAttributes.MediaSize ISO_A3;
    field public static final android.print.PrintAttributes.MediaSize ISO_A4;
    field public static final android.print.PrintAttributes.MediaSize ISO_A5;
    field public static final android.print.PrintAttributes.MediaSize ISO_A6;
    field public static final android.print.PrintAttributes.MediaSize ISO_A7;
    field public static final android.print.PrintAttributes.MediaSize ISO_A8;
    field public static final android.print.PrintAttributes.MediaSize ISO_A9;
    field public static final android.print.PrintAttributes.MediaSize ISO_B0;
    field public static final android.print.PrintAttributes.MediaSize ISO_B1;
    field public static final android.print.PrintAttributes.MediaSize ISO_B10;
    field public static final android.print.PrintAttributes.MediaSize ISO_B2;
    field public static final android.print.PrintAttributes.MediaSize ISO_B3;
    field public static final android.print.PrintAttributes.MediaSize ISO_B4;
    field public static final android.print.PrintAttributes.MediaSize ISO_B5;
    field public static final android.print.PrintAttributes.MediaSize ISO_B6;
    field public static final android.print.PrintAttributes.MediaSize ISO_B7;
    field public static final android.print.PrintAttributes.MediaSize ISO_B8;
    field public static final android.print.PrintAttributes.MediaSize ISO_B9;
    field public static final android.print.PrintAttributes.MediaSize ISO_C0;
    field public static final android.print.PrintAttributes.MediaSize ISO_C1;
    field public static final android.print.PrintAttributes.MediaSize ISO_C10;
    field public static final android.print.PrintAttributes.MediaSize ISO_C2;
    field public static final android.print.PrintAttributes.MediaSize ISO_C3;
    field public static final android.print.PrintAttributes.MediaSize ISO_C4;
    field public static final android.print.PrintAttributes.MediaSize ISO_C5;
    field public static final android.print.PrintAttributes.MediaSize ISO_C6;
    field public static final android.print.PrintAttributes.MediaSize ISO_C7;
    field public static final android.print.PrintAttributes.MediaSize ISO_C8;
    field public static final android.print.PrintAttributes.MediaSize ISO_C9;
    field public static final android.print.PrintAttributes.MediaSize JIS_B0;
    field public static final android.print.PrintAttributes.MediaSize JIS_B1;
    field public static final android.print.PrintAttributes.MediaSize JIS_B10;
    field public static final android.print.PrintAttributes.MediaSize JIS_B2;
    field public static final android.print.PrintAttributes.MediaSize JIS_B3;
    field public static final android.print.PrintAttributes.MediaSize JIS_B4;
    field public static final android.print.PrintAttributes.MediaSize JIS_B5;
    field public static final android.print.PrintAttributes.MediaSize JIS_B6;
    field public static final android.print.PrintAttributes.MediaSize JIS_B7;
    field public static final android.print.PrintAttributes.MediaSize JIS_B8;
    field public static final android.print.PrintAttributes.MediaSize JIS_B9;
    field public static final android.print.PrintAttributes.MediaSize JIS_EXEC;
    field public static final android.print.PrintAttributes.MediaSize JPN_CHOU2;
    field public static final android.print.PrintAttributes.MediaSize JPN_CHOU3;
    field public static final android.print.PrintAttributes.MediaSize JPN_CHOU4;
    field public static final android.print.PrintAttributes.MediaSize JPN_HAGAKI;
    field public static final android.print.PrintAttributes.MediaSize JPN_KAHU;
    field public static final android.print.PrintAttributes.MediaSize JPN_KAKU2;
    field public static final android.print.PrintAttributes.MediaSize JPN_OUFUKU;
    field public static final android.print.PrintAttributes.MediaSize JPN_YOU4;
    field public static final android.print.PrintAttributes.MediaSize NA_FOOLSCAP;
    field public static final android.print.PrintAttributes.MediaSize NA_GOVT_LETTER;
    field public static final android.print.PrintAttributes.MediaSize NA_INDEX_3X5;
    field public static final android.print.PrintAttributes.MediaSize NA_INDEX_4X6;
    field public static final android.print.PrintAttributes.MediaSize NA_INDEX_5X8;
    field public static final android.print.PrintAttributes.MediaSize NA_JUNIOR_LEGAL;
    field public static final android.print.PrintAttributes.MediaSize NA_LEDGER;
    field public static final android.print.PrintAttributes.MediaSize NA_LEGAL;
    field public static final android.print.PrintAttributes.MediaSize NA_LETTER;
    field public static final android.print.PrintAttributes.MediaSize NA_MONARCH;
    field public static final android.print.PrintAttributes.MediaSize NA_QUARTO;
    field public static final android.print.PrintAttributes.MediaSize NA_TABLOID;
    field public static final android.print.PrintAttributes.MediaSize OM_DAI_PA_KAI;
    field public static final android.print.PrintAttributes.MediaSize OM_JUURO_KU_KAI;
    field public static final android.print.PrintAttributes.MediaSize OM_PA_KAI;
    field public static final android.print.PrintAttributes.MediaSize PRC_1;
    field public static final android.print.PrintAttributes.MediaSize PRC_10;
    field public static final android.print.PrintAttributes.MediaSize PRC_16K;
    field public static final android.print.PrintAttributes.MediaSize PRC_2;
    field public static final android.print.PrintAttributes.MediaSize PRC_3;
    field public static final android.print.PrintAttributes.MediaSize PRC_4;
    field public static final android.print.PrintAttributes.MediaSize PRC_5;
    field public static final android.print.PrintAttributes.MediaSize PRC_6;
    field public static final android.print.PrintAttributes.MediaSize PRC_7;
    field public static final android.print.PrintAttributes.MediaSize PRC_8;
    field public static final android.print.PrintAttributes.MediaSize PRC_9;
    field public static final android.print.PrintAttributes.MediaSize ROC_16K;
    field public static final android.print.PrintAttributes.MediaSize ROC_8K;
    field public static final android.print.PrintAttributes.MediaSize UNKNOWN_LANDSCAPE;
    field public static final android.print.PrintAttributes.MediaSize UNKNOWN_PORTRAIT;
  }

  public static final class PrintAttributes.Resolution {
    ctor public PrintAttributes.Resolution(java.lang.String, java.lang.String, int, int);
    method public int getHorizontalDpi();
    method public java.lang.String getId();
    method public java.lang.String getLabel();
    method public int getVerticalDpi();
  }

  public abstract class PrintDocumentAdapter {
    ctor public PrintDocumentAdapter();
    method public void onFinish();
    method public abstract void onLayout(android.print.PrintAttributes, android.print.PrintAttributes, android.os.CancellationSignal, android.print.PrintDocumentAdapter.LayoutResultCallback, android.os.Bundle);
    method public void onStart();
    method public abstract void onWrite(android.print.PageRange[], android.os.ParcelFileDescriptor, android.os.CancellationSignal, android.print.PrintDocumentAdapter.WriteResultCallback);
    field public static final java.lang.String EXTRA_PRINT_PREVIEW = "EXTRA_PRINT_PREVIEW";
  }

  public static abstract class PrintDocumentAdapter.LayoutResultCallback {
    method public void onLayoutCancelled();
    method public void onLayoutFailed(java.lang.CharSequence);
    method public void onLayoutFinished(android.print.PrintDocumentInfo, boolean);
  }

  public static abstract class PrintDocumentAdapter.WriteResultCallback {
    method public void onWriteCancelled();
    method public void onWriteFailed(java.lang.CharSequence);
    method public void onWriteFinished(android.print.PageRange[]);
  }

  public final class PrintDocumentInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int getContentType();
    method public long getDataSize();
    method public java.lang.String getName();
    method public int getPageCount();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CONTENT_TYPE_DOCUMENT = 0; // 0x0
    field public static final int CONTENT_TYPE_PHOTO = 1; // 0x1
    field public static final int CONTENT_TYPE_UNKNOWN = -1; // 0xffffffff
    field public static final android.os.Parcelable.Creator<android.print.PrintDocumentInfo> CREATOR;
    field public static final int PAGE_COUNT_UNKNOWN = -1; // 0xffffffff
  }

  public static final class PrintDocumentInfo.Builder {
    ctor public PrintDocumentInfo.Builder(java.lang.String);
    method public android.print.PrintDocumentInfo build();
    method public android.print.PrintDocumentInfo.Builder setContentType(int);
    method public android.print.PrintDocumentInfo.Builder setPageCount(int);
  }

  public final class PrintJob {
    method public void cancel();
    method public android.print.PrintJobId getId();
    method public android.print.PrintJobInfo getInfo();
    method public boolean isBlocked();
    method public boolean isCancelled();
    method public boolean isCompleted();
    method public boolean isFailed();
    method public boolean isQueued();
    method public boolean isStarted();
    method public void restart();
  }

  public final class PrintJobId implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.print.PrintJobId> CREATOR;
  }

  public final class PrintJobInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.print.PrintAttributes getAttributes();
    method public int getCopies();
    method public long getCreationTime();
    method public android.print.PrintJobId getId();
    method public java.lang.String getLabel();
    method public android.print.PageRange[] getPages();
    method public android.print.PrinterId getPrinterId();
    method public int getState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.print.PrintJobInfo> CREATOR;
    field public static final int STATE_BLOCKED = 4; // 0x4
    field public static final int STATE_CANCELED = 7; // 0x7
    field public static final int STATE_COMPLETED = 5; // 0x5
    field public static final int STATE_CREATED = 1; // 0x1
    field public static final int STATE_FAILED = 6; // 0x6
    field public static final int STATE_QUEUED = 2; // 0x2
    field public static final int STATE_STARTED = 3; // 0x3
  }

  public static final class PrintJobInfo.Builder {
    ctor public PrintJobInfo.Builder(android.print.PrintJobInfo);
    method public android.print.PrintJobInfo build();
    method public void putAdvancedOption(java.lang.String, java.lang.String);
    method public void putAdvancedOption(java.lang.String, int);
    method public void setAttributes(android.print.PrintAttributes);
    method public void setCopies(int);
    method public void setPages(android.print.PageRange[]);
  }

  public final class PrintManager {
    method public java.util.List<android.print.PrintJob> getPrintJobs();
    method public android.print.PrintJob print(java.lang.String, android.print.PrintDocumentAdapter, android.print.PrintAttributes);
  }

  public final class PrinterCapabilitiesInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int getColorModes();
    method public android.print.PrintAttributes getDefaults();
    method public int getDuplexModes();
    method public java.util.List<android.print.PrintAttributes.MediaSize> getMediaSizes();
    method public android.print.PrintAttributes.Margins getMinMargins();
    method public java.util.List<android.print.PrintAttributes.Resolution> getResolutions();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.print.PrinterCapabilitiesInfo> CREATOR;
  }

  public static final class PrinterCapabilitiesInfo.Builder {
    ctor public PrinterCapabilitiesInfo.Builder(android.print.PrinterId);
    method public android.print.PrinterCapabilitiesInfo.Builder addMediaSize(android.print.PrintAttributes.MediaSize, boolean);
    method public android.print.PrinterCapabilitiesInfo.Builder addResolution(android.print.PrintAttributes.Resolution, boolean);
    method public android.print.PrinterCapabilitiesInfo build();
    method public android.print.PrinterCapabilitiesInfo.Builder setColorModes(int, int);
    method public android.print.PrinterCapabilitiesInfo.Builder setDuplexModes(int, int);
    method public android.print.PrinterCapabilitiesInfo.Builder setMinMargins(android.print.PrintAttributes.Margins);
  }

  public final class PrinterId implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String getLocalId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.print.PrinterId> CREATOR;
  }

  public final class PrinterInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.print.PrinterCapabilitiesInfo getCapabilities();
    method public java.lang.String getDescription();
    method public android.print.PrinterId getId();
    method public java.lang.String getName();
    method public int getStatus();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.print.PrinterInfo> CREATOR;
    field public static final int STATUS_BUSY = 2; // 0x2
    field public static final int STATUS_IDLE = 1; // 0x1
    field public static final int STATUS_UNAVAILABLE = 3; // 0x3
  }

  public static final class PrinterInfo.Builder {
    ctor public PrinterInfo.Builder(android.print.PrinterId, java.lang.String, int);
    ctor public PrinterInfo.Builder(android.print.PrinterInfo);
    method public android.print.PrinterInfo build();
    method public android.print.PrinterInfo.Builder setCapabilities(android.print.PrinterCapabilitiesInfo);
    method public android.print.PrinterInfo.Builder setDescription(java.lang.String);
    method public android.print.PrinterInfo.Builder setName(java.lang.String);
    method public android.print.PrinterInfo.Builder setStatus(int);
  }

}

package android.print.pdf {

  public class PrintedPdfDocument extends android.graphics.pdf.PdfDocument {
    ctor public PrintedPdfDocument(android.content.Context, android.print.PrintAttributes);
    method public android.graphics.Rect getPageContentRect();
    method public int getPageHeight();
    method public int getPageWidth();
    method public android.graphics.pdf.PdfDocument.Page startPage(int);
  }

}

package android.printservice {

  public final class PrintDocument {
    method public android.os.ParcelFileDescriptor getData();
    method public android.print.PrintDocumentInfo getInfo();
  }

  public final class PrintJob {
    method public boolean block(java.lang.String);
    method public boolean cancel();
    method public boolean complete();
    method public boolean fail(java.lang.String);
    method public int getAdvancedIntOption(java.lang.String);
    method public java.lang.String getAdvancedStringOption(java.lang.String);
    method public android.printservice.PrintDocument getDocument();
    method public android.print.PrintJobId getId();
    method public android.print.PrintJobInfo getInfo();
    method public java.lang.String getTag();
    method public boolean hasAdvancedOption(java.lang.String);
    method public boolean isBlocked();
    method public boolean isCancelled();
    method public boolean isCompleted();
    method public boolean isFailed();
    method public boolean isQueued();
    method public boolean isStarted();
    method public boolean setTag(java.lang.String);
    method public boolean start();
  }

  public abstract class PrintService extends android.app.Service {
    ctor public PrintService();
    method protected final void attachBaseContext(android.content.Context);
    method public final android.print.PrinterId generatePrinterId(java.lang.String);
    method public final java.util.List<android.printservice.PrintJob> getActivePrintJobs();
    method public final android.os.IBinder onBind(android.content.Intent);
    method protected void onConnected();
    method protected abstract android.printservice.PrinterDiscoverySession onCreatePrinterDiscoverySession();
    method protected void onDisconnected();
    method protected abstract void onPrintJobQueued(android.printservice.PrintJob);
    method protected abstract void onRequestCancelPrintJob(android.printservice.PrintJob);
    field public static final java.lang.String EXTRA_PRINTER_INFO = "android.intent.extra.print.EXTRA_PRINTER_INFO";
    field public static final java.lang.String EXTRA_PRINT_JOB_INFO = "android.intent.extra.print.PRINT_JOB_INFO";
    field public static final java.lang.String SERVICE_INTERFACE = "android.printservice.PrintService";
    field public static final java.lang.String SERVICE_META_DATA = "android.printservice";
  }

  public abstract class PrinterDiscoverySession {
    ctor public PrinterDiscoverySession();
    method public final void addPrinters(java.util.List<android.print.PrinterInfo>);
    method public final java.util.List<android.print.PrinterInfo> getPrinters();
    method public final java.util.List<android.print.PrinterId> getTrackedPrinters();
    method public final boolean isDestroyed();
    method public final boolean isPrinterDiscoveryStarted();
    method public abstract void onDestroy();
    method public abstract void onStartPrinterDiscovery(java.util.List<android.print.PrinterId>);
    method public abstract void onStartPrinterStateTracking(android.print.PrinterId);
    method public abstract void onStopPrinterDiscovery();
    method public abstract void onStopPrinterStateTracking(android.print.PrinterId);
    method public abstract void onValidatePrinters(java.util.List<android.print.PrinterId>);
    method public final void removePrinters(java.util.List<android.print.PrinterId>);
  }

}

package android.provider {

  public final class AlarmClock {
    ctor public AlarmClock();
    field public static final java.lang.String ACTION_SET_ALARM = "android.intent.action.SET_ALARM";
    field public static final java.lang.String ACTION_SET_TIMER = "android.intent.action.SET_TIMER";
    field public static final java.lang.String ACTION_SHOW_ALARMS = "android.intent.action.SHOW_ALARMS";
    field public static final java.lang.String ACTION_VOICE_CANCEL_ALARM = "android.intent.action.VOICE_CANCEL_ALARM";
    field public static final java.lang.String ACTION_VOICE_DELETE_ALARM = "android.intent.action.VOICE_DELETE_ALARM";
    field public static final java.lang.String ALARM_SEARCH_MODE_ALL = "all";
    field public static final java.lang.String ALARM_SEARCH_MODE_NEXT = "next";
    field public static final java.lang.String ALARM_SEARCH_MODE_NONE = "none";
    field public static final java.lang.String ALARM_SEARCH_MODE_TIME = "time";
    field public static final java.lang.String EXTRA_ALARM_SEARCH_MODE = "android.intent.extra.alarm.ALARM_SEARCH_MODE";
    field public static final java.lang.String EXTRA_DAYS = "android.intent.extra.alarm.DAYS";
    field public static final java.lang.String EXTRA_HOUR = "android.intent.extra.alarm.HOUR";
    field public static final java.lang.String EXTRA_IS_PM = "android.intent.extra.alarm.IS_PM";
    field public static final java.lang.String EXTRA_LENGTH = "android.intent.extra.alarm.LENGTH";
    field public static final java.lang.String EXTRA_MESSAGE = "android.intent.extra.alarm.MESSAGE";
    field public static final java.lang.String EXTRA_MINUTES = "android.intent.extra.alarm.MINUTES";
    field public static final java.lang.String EXTRA_RINGTONE = "android.intent.extra.alarm.RINGTONE";
    field public static final java.lang.String EXTRA_SKIP_UI = "android.intent.extra.alarm.SKIP_UI";
    field public static final java.lang.String EXTRA_VIBRATE = "android.intent.extra.alarm.VIBRATE";
    field public static final java.lang.String VALUE_RINGTONE_SILENT = "silent";
  }

  public abstract interface BaseColumns {
    field public static final java.lang.String _COUNT = "_count";
    field public static final java.lang.String _ID = "_id";
  }

  public class Browser {
    ctor public Browser();
    method public static final void addSearchUrl(android.content.ContentResolver, java.lang.String);
    method public static final boolean canClearHistory(android.content.ContentResolver);
    method public static final void clearHistory(android.content.ContentResolver);
    method public static final void clearSearches(android.content.ContentResolver);
    method public static final void deleteFromHistory(android.content.ContentResolver, java.lang.String);
    method public static final void deleteHistoryTimeFrame(android.content.ContentResolver, long, long);
    method public static final android.database.Cursor getAllBookmarks(android.content.ContentResolver) throws java.lang.IllegalStateException;
    method public static final android.database.Cursor getAllVisitedUrls(android.content.ContentResolver) throws java.lang.IllegalStateException;
    method public static final void requestAllIcons(android.content.ContentResolver, java.lang.String, android.webkit.WebIconDatabase.IconListener);
    method public static final void saveBookmark(android.content.Context, java.lang.String, java.lang.String);
    method public static final void sendString(android.content.Context, java.lang.String);
    method public static final void truncateHistory(android.content.ContentResolver);
    method public static final void updateVisitedHistory(android.content.ContentResolver, java.lang.String, boolean);
    field public static final android.net.Uri BOOKMARKS_URI;
    field public static final java.lang.String EXTRA_APPLICATION_ID = "com.android.browser.application_id";
    field public static final java.lang.String EXTRA_CREATE_NEW_TAB = "create_new_tab";
    field public static final java.lang.String EXTRA_HEADERS = "com.android.browser.headers";
    field public static final java.lang.String[] HISTORY_PROJECTION;
    field public static final int HISTORY_PROJECTION_BOOKMARK_INDEX = 4; // 0x4
    field public static final int HISTORY_PROJECTION_DATE_INDEX = 3; // 0x3
    field public static final int HISTORY_PROJECTION_FAVICON_INDEX = 6; // 0x6
    field public static final int HISTORY_PROJECTION_ID_INDEX = 0; // 0x0
    field public static final int HISTORY_PROJECTION_TITLE_INDEX = 5; // 0x5
    field public static final int HISTORY_PROJECTION_URL_INDEX = 1; // 0x1
    field public static final int HISTORY_PROJECTION_VISITS_INDEX = 2; // 0x2
    field public static final java.lang.String INITIAL_ZOOM_LEVEL = "browser.initialZoomLevel";
    field public static final java.lang.String[] SEARCHES_PROJECTION;
    field public static final int SEARCHES_PROJECTION_DATE_INDEX = 2; // 0x2
    field public static final int SEARCHES_PROJECTION_SEARCH_INDEX = 1; // 0x1
    field public static final android.net.Uri SEARCHES_URI;
    field public static final java.lang.String[] TRUNCATE_HISTORY_PROJECTION;
    field public static final int TRUNCATE_HISTORY_PROJECTION_ID_INDEX = 0; // 0x0
    field public static final int TRUNCATE_N_OLDEST = 5; // 0x5
  }

  public static class Browser.BookmarkColumns implements android.provider.BaseColumns {
    ctor public Browser.BookmarkColumns();
    field public static final java.lang.String BOOKMARK = "bookmark";
    field public static final java.lang.String CREATED = "created";
    field public static final java.lang.String DATE = "date";
    field public static final java.lang.String FAVICON = "favicon";
    field public static final java.lang.String TITLE = "title";
    field public static final java.lang.String URL = "url";
    field public static final java.lang.String VISITS = "visits";
  }

  public static class Browser.SearchColumns implements android.provider.BaseColumns {
    ctor public Browser.SearchColumns();
    field public static final java.lang.String DATE = "date";
    field public static final java.lang.String SEARCH = "search";
    field public static final deprecated java.lang.String URL = "url";
  }

  public final class CalendarContract {
    field public static final java.lang.String ACCOUNT_TYPE_LOCAL = "LOCAL";
    field public static final java.lang.String ACTION_EVENT_REMINDER = "android.intent.action.EVENT_REMINDER";
    field public static final java.lang.String ACTION_HANDLE_CUSTOM_EVENT = "android.provider.calendar.action.HANDLE_CUSTOM_EVENT";
    field public static final java.lang.String AUTHORITY = "com.android.calendar";
    field public static final java.lang.String CALLER_IS_SYNCADAPTER = "caller_is_syncadapter";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String EXTRA_CUSTOM_APP_URI = "customAppUri";
    field public static final java.lang.String EXTRA_EVENT_ALL_DAY = "allDay";
    field public static final java.lang.String EXTRA_EVENT_BEGIN_TIME = "beginTime";
    field public static final java.lang.String EXTRA_EVENT_END_TIME = "endTime";
  }

  public static final class CalendarContract.Attendees implements android.provider.BaseColumns android.provider.CalendarContract.AttendeesColumns android.provider.CalendarContract.EventsColumns {
    method public static final android.database.Cursor query(android.content.ContentResolver, long, java.lang.String[]);
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface CalendarContract.AttendeesColumns {
    field public static final java.lang.String ATTENDEE_EMAIL = "attendeeEmail";
    field public static final java.lang.String ATTENDEE_IDENTITY = "attendeeIdentity";
    field public static final java.lang.String ATTENDEE_ID_NAMESPACE = "attendeeIdNamespace";
    field public static final java.lang.String ATTENDEE_NAME = "attendeeName";
    field public static final java.lang.String ATTENDEE_RELATIONSHIP = "attendeeRelationship";
    field public static final java.lang.String ATTENDEE_STATUS = "attendeeStatus";
    field public static final int ATTENDEE_STATUS_ACCEPTED = 1; // 0x1
    field public static final int ATTENDEE_STATUS_DECLINED = 2; // 0x2
    field public static final int ATTENDEE_STATUS_INVITED = 3; // 0x3
    field public static final int ATTENDEE_STATUS_NONE = 0; // 0x0
    field public static final int ATTENDEE_STATUS_TENTATIVE = 4; // 0x4
    field public static final java.lang.String ATTENDEE_TYPE = "attendeeType";
    field public static final java.lang.String EVENT_ID = "event_id";
    field public static final int RELATIONSHIP_ATTENDEE = 1; // 0x1
    field public static final int RELATIONSHIP_NONE = 0; // 0x0
    field public static final int RELATIONSHIP_ORGANIZER = 2; // 0x2
    field public static final int RELATIONSHIP_PERFORMER = 3; // 0x3
    field public static final int RELATIONSHIP_SPEAKER = 4; // 0x4
    field public static final int TYPE_NONE = 0; // 0x0
    field public static final int TYPE_OPTIONAL = 2; // 0x2
    field public static final int TYPE_REQUIRED = 1; // 0x1
    field public static final int TYPE_RESOURCE = 3; // 0x3
  }

  public static final class CalendarContract.CalendarAlerts implements android.provider.BaseColumns android.provider.CalendarContract.CalendarAlertsColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.EventsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final android.net.Uri CONTENT_URI_BY_INSTANCE;
  }

  protected static abstract interface CalendarContract.CalendarAlertsColumns {
    field public static final java.lang.String ALARM_TIME = "alarmTime";
    field public static final java.lang.String BEGIN = "begin";
    field public static final java.lang.String CREATION_TIME = "creationTime";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "begin ASC,title ASC";
    field public static final java.lang.String END = "end";
    field public static final java.lang.String EVENT_ID = "event_id";
    field public static final java.lang.String MINUTES = "minutes";
    field public static final java.lang.String NOTIFY_TIME = "notifyTime";
    field public static final java.lang.String RECEIVED_TIME = "receivedTime";
    field public static final java.lang.String STATE = "state";
    field public static final int STATE_DISMISSED = 2; // 0x2
    field public static final int STATE_FIRED = 1; // 0x1
    field public static final int STATE_SCHEDULED = 0; // 0x0
  }

  public static final class CalendarContract.CalendarCache implements android.provider.CalendarContract.CalendarCacheColumns {
    field public static final java.lang.String KEY_TIMEZONE_INSTANCES = "timezoneInstances";
    field public static final java.lang.String KEY_TIMEZONE_INSTANCES_PREVIOUS = "timezoneInstancesPrevious";
    field public static final java.lang.String KEY_TIMEZONE_TYPE = "timezoneType";
    field public static final java.lang.String TIMEZONE_TYPE_AUTO = "auto";
    field public static final java.lang.String TIMEZONE_TYPE_HOME = "home";
    field public static final android.net.Uri URI;
  }

  protected static abstract interface CalendarContract.CalendarCacheColumns {
    field public static final java.lang.String KEY = "key";
    field public static final java.lang.String VALUE = "value";
  }

  protected static abstract interface CalendarContract.CalendarColumns {
    field public static final java.lang.String ALLOWED_ATTENDEE_TYPES = "allowedAttendeeTypes";
    field public static final java.lang.String ALLOWED_AVAILABILITY = "allowedAvailability";
    field public static final java.lang.String ALLOWED_REMINDERS = "allowedReminders";
    field public static final java.lang.String CALENDAR_ACCESS_LEVEL = "calendar_access_level";
    field public static final java.lang.String CALENDAR_COLOR = "calendar_color";
    field public static final java.lang.String CALENDAR_COLOR_KEY = "calendar_color_index";
    field public static final java.lang.String CALENDAR_DISPLAY_NAME = "calendar_displayName";
    field public static final java.lang.String CALENDAR_TIME_ZONE = "calendar_timezone";
    field public static final int CAL_ACCESS_CONTRIBUTOR = 500; // 0x1f4
    field public static final int CAL_ACCESS_EDITOR = 600; // 0x258
    field public static final int CAL_ACCESS_FREEBUSY = 100; // 0x64
    field public static final int CAL_ACCESS_NONE = 0; // 0x0
    field public static final int CAL_ACCESS_OVERRIDE = 400; // 0x190
    field public static final int CAL_ACCESS_OWNER = 700; // 0x2bc
    field public static final int CAL_ACCESS_READ = 200; // 0xc8
    field public static final int CAL_ACCESS_RESPOND = 300; // 0x12c
    field public static final int CAL_ACCESS_ROOT = 800; // 0x320
    field public static final java.lang.String CAN_MODIFY_TIME_ZONE = "canModifyTimeZone";
    field public static final java.lang.String CAN_ORGANIZER_RESPOND = "canOrganizerRespond";
    field public static final java.lang.String IS_PRIMARY = "isPrimary";
    field public static final java.lang.String MAX_REMINDERS = "maxReminders";
    field public static final java.lang.String OWNER_ACCOUNT = "ownerAccount";
    field public static final java.lang.String SYNC_EVENTS = "sync_events";
    field public static final java.lang.String VISIBLE = "visible";
  }

  public static final class CalendarContract.CalendarEntity implements android.provider.BaseColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.SyncColumns {
    method public static android.content.EntityIterator newEntityIterator(android.database.Cursor);
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface CalendarContract.CalendarSyncColumns {
    field public static final java.lang.String CAL_SYNC1 = "cal_sync1";
    field public static final java.lang.String CAL_SYNC10 = "cal_sync10";
    field public static final java.lang.String CAL_SYNC2 = "cal_sync2";
    field public static final java.lang.String CAL_SYNC3 = "cal_sync3";
    field public static final java.lang.String CAL_SYNC4 = "cal_sync4";
    field public static final java.lang.String CAL_SYNC5 = "cal_sync5";
    field public static final java.lang.String CAL_SYNC6 = "cal_sync6";
    field public static final java.lang.String CAL_SYNC7 = "cal_sync7";
    field public static final java.lang.String CAL_SYNC8 = "cal_sync8";
    field public static final java.lang.String CAL_SYNC9 = "cal_sync9";
  }

  public static final class CalendarContract.Calendars implements android.provider.BaseColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.SyncColumns {
    field public static final java.lang.String CALENDAR_LOCATION = "calendar_location";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "calendar_displayName";
    field public static final java.lang.String NAME = "name";
  }

  public static final class CalendarContract.Colors implements android.provider.CalendarContract.ColorsColumns {
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface CalendarContract.ColorsColumns implements android.provider.SyncStateContract.Columns {
    field public static final java.lang.String COLOR = "color";
    field public static final java.lang.String COLOR_KEY = "color_index";
    field public static final java.lang.String COLOR_TYPE = "color_type";
    field public static final int TYPE_CALENDAR = 0; // 0x0
    field public static final int TYPE_EVENT = 1; // 0x1
  }

  public static final class CalendarContract.EventDays implements android.provider.CalendarContract.EventDaysColumns {
    method public static final android.database.Cursor query(android.content.ContentResolver, int, int, java.lang.String[]);
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface CalendarContract.EventDaysColumns {
    field public static final java.lang.String ENDDAY = "endDay";
    field public static final java.lang.String STARTDAY = "startDay";
  }

  public static final class CalendarContract.Events implements android.provider.BaseColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.EventsColumns android.provider.CalendarContract.SyncColumns {
    field public static final android.net.Uri CONTENT_EXCEPTION_URI;
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface CalendarContract.EventsColumns {
    field public static final int ACCESS_CONFIDENTIAL = 1; // 0x1
    field public static final int ACCESS_DEFAULT = 0; // 0x0
    field public static final java.lang.String ACCESS_LEVEL = "accessLevel";
    field public static final int ACCESS_PRIVATE = 2; // 0x2
    field public static final int ACCESS_PUBLIC = 3; // 0x3
    field public static final java.lang.String ALL_DAY = "allDay";
    field public static final java.lang.String AVAILABILITY = "availability";
    field public static final int AVAILABILITY_BUSY = 0; // 0x0
    field public static final int AVAILABILITY_FREE = 1; // 0x1
    field public static final int AVAILABILITY_TENTATIVE = 2; // 0x2
    field public static final java.lang.String CALENDAR_ID = "calendar_id";
    field public static final java.lang.String CAN_INVITE_OTHERS = "canInviteOthers";
    field public static final java.lang.String CUSTOM_APP_PACKAGE = "customAppPackage";
    field public static final java.lang.String CUSTOM_APP_URI = "customAppUri";
    field public static final java.lang.String DESCRIPTION = "description";
    field public static final java.lang.String DISPLAY_COLOR = "displayColor";
    field public static final java.lang.String DTEND = "dtend";
    field public static final java.lang.String DTSTART = "dtstart";
    field public static final java.lang.String DURATION = "duration";
    field public static final java.lang.String EVENT_COLOR = "eventColor";
    field public static final java.lang.String EVENT_COLOR_KEY = "eventColor_index";
    field public static final java.lang.String EVENT_END_TIMEZONE = "eventEndTimezone";
    field public static final java.lang.String EVENT_LOCATION = "eventLocation";
    field public static final java.lang.String EVENT_TIMEZONE = "eventTimezone";
    field public static final java.lang.String EXDATE = "exdate";
    field public static final java.lang.String EXRULE = "exrule";
    field public static final java.lang.String GUESTS_CAN_INVITE_OTHERS = "guestsCanInviteOthers";
    field public static final java.lang.String GUESTS_CAN_MODIFY = "guestsCanModify";
    field public static final java.lang.String GUESTS_CAN_SEE_GUESTS = "guestsCanSeeGuests";
    field public static final java.lang.String HAS_ALARM = "hasAlarm";
    field public static final java.lang.String HAS_ATTENDEE_DATA = "hasAttendeeData";
    field public static final java.lang.String HAS_EXTENDED_PROPERTIES = "hasExtendedProperties";
    field public static final java.lang.String IS_ORGANIZER = "isOrganizer";
    field public static final java.lang.String LAST_DATE = "lastDate";
    field public static final java.lang.String LAST_SYNCED = "lastSynced";
    field public static final java.lang.String ORGANIZER = "organizer";
    field public static final java.lang.String ORIGINAL_ALL_DAY = "originalAllDay";
    field public static final java.lang.String ORIGINAL_ID = "original_id";
    field public static final java.lang.String ORIGINAL_INSTANCE_TIME = "originalInstanceTime";
    field public static final java.lang.String ORIGINAL_SYNC_ID = "original_sync_id";
    field public static final java.lang.String RDATE = "rdate";
    field public static final java.lang.String RRULE = "rrule";
    field public static final java.lang.String SELF_ATTENDEE_STATUS = "selfAttendeeStatus";
    field public static final java.lang.String STATUS = "eventStatus";
    field public static final int STATUS_CANCELED = 2; // 0x2
    field public static final int STATUS_CONFIRMED = 1; // 0x1
    field public static final int STATUS_TENTATIVE = 0; // 0x0
    field public static final java.lang.String SYNC_DATA1 = "sync_data1";
    field public static final java.lang.String SYNC_DATA10 = "sync_data10";
    field public static final java.lang.String SYNC_DATA2 = "sync_data2";
    field public static final java.lang.String SYNC_DATA3 = "sync_data3";
    field public static final java.lang.String SYNC_DATA4 = "sync_data4";
    field public static final java.lang.String SYNC_DATA5 = "sync_data5";
    field public static final java.lang.String SYNC_DATA6 = "sync_data6";
    field public static final java.lang.String SYNC_DATA7 = "sync_data7";
    field public static final java.lang.String SYNC_DATA8 = "sync_data8";
    field public static final java.lang.String SYNC_DATA9 = "sync_data9";
    field public static final java.lang.String TITLE = "title";
    field public static final java.lang.String UID_2445 = "uid2445";
  }

  public static final class CalendarContract.EventsEntity implements android.provider.BaseColumns android.provider.CalendarContract.EventsColumns android.provider.CalendarContract.SyncColumns {
    method public static android.content.EntityIterator newEntityIterator(android.database.Cursor, android.content.ContentResolver);
    method public static android.content.EntityIterator newEntityIterator(android.database.Cursor, android.content.ContentProviderClient);
    field public static final android.net.Uri CONTENT_URI;
  }

  public static final class CalendarContract.ExtendedProperties implements android.provider.BaseColumns android.provider.CalendarContract.EventsColumns android.provider.CalendarContract.ExtendedPropertiesColumns {
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface CalendarContract.ExtendedPropertiesColumns {
    field public static final java.lang.String EVENT_ID = "event_id";
    field public static final java.lang.String NAME = "name";
    field public static final java.lang.String VALUE = "value";
  }

  public static final class CalendarContract.Instances implements android.provider.BaseColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.EventsColumns {
    method public static final android.database.Cursor query(android.content.ContentResolver, java.lang.String[], long, long);
    method public static final android.database.Cursor query(android.content.ContentResolver, java.lang.String[], long, long, java.lang.String);
    field public static final java.lang.String BEGIN = "begin";
    field public static final android.net.Uri CONTENT_BY_DAY_URI;
    field public static final android.net.Uri CONTENT_SEARCH_BY_DAY_URI;
    field public static final android.net.Uri CONTENT_SEARCH_URI;
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String END = "end";
    field public static final java.lang.String END_DAY = "endDay";
    field public static final java.lang.String END_MINUTE = "endMinute";
    field public static final java.lang.String EVENT_ID = "event_id";
    field public static final java.lang.String START_DAY = "startDay";
    field public static final java.lang.String START_MINUTE = "startMinute";
  }

  public static final class CalendarContract.Reminders implements android.provider.BaseColumns android.provider.CalendarContract.EventsColumns android.provider.CalendarContract.RemindersColumns {
    method public static final android.database.Cursor query(android.content.ContentResolver, long, java.lang.String[]);
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface CalendarContract.RemindersColumns {
    field public static final java.lang.String EVENT_ID = "event_id";
    field public static final java.lang.String METHOD = "method";
    field public static final int METHOD_ALARM = 4; // 0x4
    field public static final int METHOD_ALERT = 1; // 0x1
    field public static final int METHOD_DEFAULT = 0; // 0x0
    field public static final int METHOD_EMAIL = 2; // 0x2
    field public static final int METHOD_SMS = 3; // 0x3
    field public static final java.lang.String MINUTES = "minutes";
    field public static final int MINUTES_DEFAULT = -1; // 0xffffffff
  }

  protected static abstract interface CalendarContract.SyncColumns implements android.provider.CalendarContract.CalendarSyncColumns {
    field public static final java.lang.String ACCOUNT_NAME = "account_name";
    field public static final java.lang.String ACCOUNT_TYPE = "account_type";
    field public static final java.lang.String CAN_PARTIALLY_UPDATE = "canPartiallyUpdate";
    field public static final java.lang.String DELETED = "deleted";
    field public static final java.lang.String DIRTY = "dirty";
    field public static final java.lang.String MUTATORS = "mutators";
    field public static final java.lang.String _SYNC_ID = "_sync_id";
  }

  public static final class CalendarContract.SyncState implements android.provider.SyncStateContract.Columns {
    field public static final android.net.Uri CONTENT_URI;
  }

  public class CallLog {
    ctor public CallLog();
    field public static final java.lang.String AUTHORITY = "call_log";
    field public static final android.net.Uri CONTENT_URI;
  }

  public static class CallLog.Calls implements android.provider.BaseColumns {
    ctor public CallLog.Calls();
    method public static java.lang.String getLastOutgoingCall(android.content.Context);
    field public static final java.lang.String CACHED_FORMATTED_NUMBER = "formatted_number";
    field public static final java.lang.String CACHED_LOOKUP_URI = "lookup_uri";
    field public static final java.lang.String CACHED_MATCHED_NUMBER = "matched_number";
    field public static final java.lang.String CACHED_NAME = "name";
    field public static final java.lang.String CACHED_NORMALIZED_NUMBER = "normalized_number";
    field public static final java.lang.String CACHED_NUMBER_LABEL = "numberlabel";
    field public static final java.lang.String CACHED_NUMBER_TYPE = "numbertype";
    field public static final java.lang.String CACHED_PHOTO_ID = "photo_id";
    field public static final java.lang.String CACHED_PHOTO_URI = "photo_uri";
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/calls";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/calls";
    field public static final android.net.Uri CONTENT_URI;
    field public static final android.net.Uri CONTENT_URI_WITH_VOICEMAIL;
    field public static final java.lang.String COUNTRY_ISO = "countryiso";
    field public static final java.lang.String DATA_USAGE = "data_usage";
    field public static final java.lang.String DATE = "date";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
    field public static final java.lang.String DURATION = "duration";
    field public static final java.lang.String EXTRA_CALL_TYPE_FILTER = "android.provider.extra.CALL_TYPE_FILTER";
    field public static final java.lang.String FEATURES = "features";
    field public static final int FEATURES_VIDEO = 1; // 0x1
    field public static final java.lang.String GEOCODED_LOCATION = "geocoded_location";
    field public static final int INCOMING_TYPE = 1; // 0x1
    field public static final java.lang.String IS_READ = "is_read";
    field public static final java.lang.String LIMIT_PARAM_KEY = "limit";
    field public static final int MISSED_TYPE = 3; // 0x3
    field public static final java.lang.String NEW = "new";
    field public static final java.lang.String NUMBER = "number";
    field public static final java.lang.String NUMBER_PRESENTATION = "presentation";
    field public static final java.lang.String OFFSET_PARAM_KEY = "offset";
    field public static final int OUTGOING_TYPE = 2; // 0x2
    field public static final java.lang.String PHONE_ACCOUNT_COMPONENT_NAME = "subscription_component_name";
    field public static final java.lang.String PHONE_ACCOUNT_ID = "subscription_id";
    field public static final int PRESENTATION_ALLOWED = 1; // 0x1
    field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
    field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
    field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
    field public static final java.lang.String TRANSCRIPTION = "transcription";
    field public static final java.lang.String TYPE = "type";
    field public static final int VOICEMAIL_TYPE = 4; // 0x4
    field public static final java.lang.String VOICEMAIL_URI = "voicemail_uri";
  }

  public deprecated class Contacts {
    field public static final deprecated java.lang.String AUTHORITY = "contacts";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated int KIND_EMAIL = 1; // 0x1
    field public static final deprecated int KIND_IM = 3; // 0x3
    field public static final deprecated int KIND_ORGANIZATION = 4; // 0x4
    field public static final deprecated int KIND_PHONE = 5; // 0x5
    field public static final deprecated int KIND_POSTAL = 2; // 0x2
  }

  public static final deprecated class Contacts.ContactMethods implements android.provider.BaseColumns android.provider.Contacts.ContactMethodsColumns android.provider.Contacts.PeopleColumns {
    method public deprecated void addPostalLocation(android.content.Context, long, double, double);
    method public static deprecated java.lang.Object decodeImProtocol(java.lang.String);
    method public static deprecated java.lang.String encodeCustomImProtocol(java.lang.String);
    method public static deprecated java.lang.String encodePredefinedImProtocol(int);
    method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, int, java.lang.CharSequence);
    field public static final deprecated java.lang.String CONTENT_EMAIL_ITEM_TYPE = "vnd.android.cursor.item/email";
    field public static final deprecated java.lang.String CONTENT_EMAIL_TYPE = "vnd.android.cursor.dir/email";
    field public static final deprecated android.net.Uri CONTENT_EMAIL_URI;
    field public static final deprecated java.lang.String CONTENT_IM_ITEM_TYPE = "vnd.android.cursor.item/jabber-im";
    field public static final deprecated java.lang.String CONTENT_POSTAL_ITEM_TYPE = "vnd.android.cursor.item/postal-address";
    field public static final deprecated java.lang.String CONTENT_POSTAL_TYPE = "vnd.android.cursor.dir/postal-address";
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact-methods";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "name ASC";
    field public static final deprecated java.lang.String PERSON_ID = "person";
    field public static final deprecated java.lang.String POSTAL_LOCATION_LATITUDE = "data";
    field public static final deprecated java.lang.String POSTAL_LOCATION_LONGITUDE = "aux_data";
    field public static final deprecated int PROTOCOL_AIM = 0; // 0x0
    field public static final deprecated int PROTOCOL_GOOGLE_TALK = 5; // 0x5
    field public static final deprecated int PROTOCOL_ICQ = 6; // 0x6
    field public static final deprecated int PROTOCOL_JABBER = 7; // 0x7
    field public static final deprecated int PROTOCOL_MSN = 1; // 0x1
    field public static final deprecated int PROTOCOL_QQ = 4; // 0x4
    field public static final deprecated int PROTOCOL_SKYPE = 3; // 0x3
    field public static final deprecated int PROTOCOL_YAHOO = 2; // 0x2
  }

  public static abstract deprecated interface Contacts.ContactMethodsColumns {
    field public static final deprecated java.lang.String AUX_DATA = "aux_data";
    field public static final deprecated java.lang.String DATA = "data";
    field public static final deprecated java.lang.String ISPRIMARY = "isprimary";
    field public static final deprecated java.lang.String KIND = "kind";
    field public static final deprecated java.lang.String LABEL = "label";
    field public static final deprecated java.lang.String TYPE = "type";
    field public static final deprecated int TYPE_CUSTOM = 0; // 0x0
    field public static final deprecated int TYPE_HOME = 1; // 0x1
    field public static final deprecated int TYPE_OTHER = 3; // 0x3
    field public static final deprecated int TYPE_WORK = 2; // 0x2
  }

  public static final deprecated class Contacts.Extensions implements android.provider.BaseColumns android.provider.Contacts.ExtensionsColumns {
    field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_extensions";
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact_extensions";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "person, name ASC";
    field public static final deprecated java.lang.String PERSON_ID = "person";
  }

  public static abstract deprecated interface Contacts.ExtensionsColumns {
    field public static final deprecated java.lang.String NAME = "name";
    field public static final deprecated java.lang.String VALUE = "value";
  }

  public static final deprecated class Contacts.GroupMembership implements android.provider.BaseColumns android.provider.Contacts.GroupsColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "groupmembership";
    field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contactsgroupmembership";
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroupmembership";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "group_id ASC";
    field public static final deprecated java.lang.String GROUP_ID = "group_id";
    field public static final deprecated java.lang.String GROUP_SYNC_ACCOUNT = "group_sync_account";
    field public static final deprecated java.lang.String GROUP_SYNC_ACCOUNT_TYPE = "group_sync_account_type";
    field public static final deprecated java.lang.String GROUP_SYNC_ID = "group_sync_id";
    field public static final deprecated java.lang.String PERSON_ID = "person";
    field public static final deprecated android.net.Uri RAW_CONTENT_URI;
  }

  public static final deprecated class Contacts.Groups implements android.provider.BaseColumns android.provider.Contacts.GroupsColumns {
    field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contactsgroup";
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroup";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "name ASC";
    field public static final deprecated android.net.Uri DELETED_CONTENT_URI;
    field public static final deprecated java.lang.String GROUP_ANDROID_STARRED = "Starred in Android";
    field public static final deprecated java.lang.String GROUP_MY_CONTACTS = "Contacts";
  }

  public static abstract deprecated interface Contacts.GroupsColumns {
    field public static final deprecated java.lang.String NAME = "name";
    field public static final deprecated java.lang.String NOTES = "notes";
    field public static final deprecated java.lang.String SHOULD_SYNC = "should_sync";
    field public static final deprecated java.lang.String SYSTEM_ID = "system_id";
  }

  public static final deprecated class Contacts.Intents {
    ctor public deprecated Contacts.Intents();
    field public static final deprecated java.lang.String ATTACH_IMAGE = "com.android.contacts.action.ATTACH_IMAGE";
    field public static final deprecated java.lang.String EXTRA_CREATE_DESCRIPTION = "com.android.contacts.action.CREATE_DESCRIPTION";
    field public static final deprecated java.lang.String EXTRA_FORCE_CREATE = "com.android.contacts.action.FORCE_CREATE";
    field public static final deprecated java.lang.String SEARCH_SUGGESTION_CLICKED = "android.provider.Contacts.SEARCH_SUGGESTION_CLICKED";
    field public static final deprecated java.lang.String SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED = "android.provider.Contacts.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED";
    field public static final deprecated java.lang.String SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED = "android.provider.Contacts.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED";
    field public static final deprecated java.lang.String SHOW_OR_CREATE_CONTACT = "com.android.contacts.action.SHOW_OR_CREATE_CONTACT";
  }

  public static final deprecated class Contacts.Intents.Insert {
    ctor public deprecated Contacts.Intents.Insert();
    field public static final deprecated java.lang.String ACTION = "android.intent.action.INSERT";
    field public static final deprecated java.lang.String COMPANY = "company";
    field public static final deprecated java.lang.String EMAIL = "email";
    field public static final deprecated java.lang.String EMAIL_ISPRIMARY = "email_isprimary";
    field public static final deprecated java.lang.String EMAIL_TYPE = "email_type";
    field public static final deprecated java.lang.String FULL_MODE = "full_mode";
    field public static final deprecated java.lang.String IM_HANDLE = "im_handle";
    field public static final deprecated java.lang.String IM_ISPRIMARY = "im_isprimary";
    field public static final deprecated java.lang.String IM_PROTOCOL = "im_protocol";
    field public static final deprecated java.lang.String JOB_TITLE = "job_title";
    field public static final deprecated java.lang.String NAME = "name";
    field public static final deprecated java.lang.String NOTES = "notes";
    field public static final deprecated java.lang.String PHONE = "phone";
    field public static final deprecated java.lang.String PHONETIC_NAME = "phonetic_name";
    field public static final deprecated java.lang.String PHONE_ISPRIMARY = "phone_isprimary";
    field public static final deprecated java.lang.String PHONE_TYPE = "phone_type";
    field public static final deprecated java.lang.String POSTAL = "postal";
    field public static final deprecated java.lang.String POSTAL_ISPRIMARY = "postal_isprimary";
    field public static final deprecated java.lang.String POSTAL_TYPE = "postal_type";
    field public static final deprecated java.lang.String SECONDARY_EMAIL = "secondary_email";
    field public static final deprecated java.lang.String SECONDARY_EMAIL_TYPE = "secondary_email_type";
    field public static final deprecated java.lang.String SECONDARY_PHONE = "secondary_phone";
    field public static final deprecated java.lang.String SECONDARY_PHONE_TYPE = "secondary_phone_type";
    field public static final deprecated java.lang.String TERTIARY_EMAIL = "tertiary_email";
    field public static final deprecated java.lang.String TERTIARY_EMAIL_TYPE = "tertiary_email_type";
    field public static final deprecated java.lang.String TERTIARY_PHONE = "tertiary_phone";
    field public static final deprecated java.lang.String TERTIARY_PHONE_TYPE = "tertiary_phone_type";
  }

  public static final deprecated class Contacts.Intents.UI {
    ctor public deprecated Contacts.Intents.UI();
    field public static final deprecated java.lang.String FILTER_CONTACTS_ACTION = "com.android.contacts.action.FILTER_CONTACTS";
    field public static final deprecated java.lang.String FILTER_TEXT_EXTRA_KEY = "com.android.contacts.extra.FILTER_TEXT";
    field public static final deprecated java.lang.String GROUP_NAME_EXTRA_KEY = "com.android.contacts.extra.GROUP";
    field public static final deprecated java.lang.String LIST_ALL_CONTACTS_ACTION = "com.android.contacts.action.LIST_ALL_CONTACTS";
    field public static final deprecated java.lang.String LIST_CONTACTS_WITH_PHONES_ACTION = "com.android.contacts.action.LIST_CONTACTS_WITH_PHONES";
    field public static final deprecated java.lang.String LIST_DEFAULT = "com.android.contacts.action.LIST_DEFAULT";
    field public static final deprecated java.lang.String LIST_FREQUENT_ACTION = "com.android.contacts.action.LIST_FREQUENT";
    field public static final deprecated java.lang.String LIST_GROUP_ACTION = "com.android.contacts.action.LIST_GROUP";
    field public static final deprecated java.lang.String LIST_STARRED_ACTION = "com.android.contacts.action.LIST_STARRED";
    field public static final deprecated java.lang.String LIST_STREQUENT_ACTION = "com.android.contacts.action.LIST_STREQUENT";
    field public static final deprecated java.lang.String TITLE_EXTRA_KEY = "com.android.contacts.extra.TITLE_EXTRA";
  }

  public static abstract deprecated interface Contacts.OrganizationColumns {
    field public static final deprecated java.lang.String COMPANY = "company";
    field public static final deprecated java.lang.String ISPRIMARY = "isprimary";
    field public static final deprecated java.lang.String LABEL = "label";
    field public static final deprecated java.lang.String PERSON_ID = "person";
    field public static final deprecated java.lang.String TITLE = "title";
    field public static final deprecated java.lang.String TYPE = "type";
    field public static final deprecated int TYPE_CUSTOM = 0; // 0x0
    field public static final deprecated int TYPE_OTHER = 2; // 0x2
    field public static final deprecated int TYPE_WORK = 1; // 0x1
  }

  public static final deprecated class Contacts.Organizations implements android.provider.BaseColumns android.provider.Contacts.OrganizationColumns {
    method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence);
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "organizations";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "company, title, isprimary ASC";
  }

  public static final deprecated class Contacts.People implements android.provider.BaseColumns android.provider.Contacts.PeopleColumns android.provider.Contacts.PhonesColumns android.provider.Contacts.PresenceColumns {
    method public static deprecated android.net.Uri addToGroup(android.content.ContentResolver, long, java.lang.String);
    method public static deprecated android.net.Uri addToGroup(android.content.ContentResolver, long, long);
    method public static deprecated android.net.Uri addToMyContactsGroup(android.content.ContentResolver, long);
    method public static deprecated android.net.Uri createPersonInMyContactsGroup(android.content.ContentResolver, android.content.ContentValues);
    method public static deprecated android.graphics.Bitmap loadContactPhoto(android.content.Context, android.net.Uri, int, android.graphics.BitmapFactory.Options);
    method public static deprecated void markAsContacted(android.content.ContentResolver, long);
    method public static deprecated java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri);
    method public static deprecated android.database.Cursor queryGroups(android.content.ContentResolver, long);
    method public static deprecated void setPhotoData(android.content.ContentResolver, android.net.Uri, byte[]);
    field public static final deprecated android.net.Uri CONTENT_FILTER_URI;
    field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/person";
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/person";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "name ASC";
    field public static final deprecated android.net.Uri DELETED_CONTENT_URI;
    field public static final deprecated java.lang.String PRIMARY_EMAIL_ID = "primary_email";
    field public static final deprecated java.lang.String PRIMARY_ORGANIZATION_ID = "primary_organization";
    field public static final deprecated java.lang.String PRIMARY_PHONE_ID = "primary_phone";
  }

  public static final deprecated class Contacts.People.ContactMethods implements android.provider.BaseColumns android.provider.Contacts.ContactMethodsColumns android.provider.Contacts.PeopleColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "contact_methods";
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "data ASC";
  }

  public static deprecated class Contacts.People.Extensions implements android.provider.BaseColumns android.provider.Contacts.ExtensionsColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "extensions";
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "name ASC";
    field public static final deprecated java.lang.String PERSON_ID = "person";
  }

  public static final deprecated class Contacts.People.Phones implements android.provider.BaseColumns android.provider.Contacts.PeopleColumns android.provider.Contacts.PhonesColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "phones";
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "number ASC";
  }

  public static abstract deprecated interface Contacts.PeopleColumns {
    field public static final deprecated java.lang.String CUSTOM_RINGTONE = "custom_ringtone";
    field public static final deprecated java.lang.String DISPLAY_NAME = "display_name";
    field public static final deprecated java.lang.String LAST_TIME_CONTACTED = "last_time_contacted";
    field public static final deprecated java.lang.String NAME = "name";
    field public static final deprecated java.lang.String NOTES = "notes";
    field public static final deprecated java.lang.String PHONETIC_NAME = "phonetic_name";
    field public static final deprecated java.lang.String PHOTO_VERSION = "photo_version";
    field public static final deprecated java.lang.String SEND_TO_VOICEMAIL = "send_to_voicemail";
    field public static final deprecated java.lang.String STARRED = "starred";
    field public static final deprecated java.lang.String TIMES_CONTACTED = "times_contacted";
  }

  public static final deprecated class Contacts.Phones implements android.provider.BaseColumns android.provider.Contacts.PeopleColumns android.provider.Contacts.PhonesColumns {
    method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence, java.lang.CharSequence[]);
    method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence);
    field public static final deprecated android.net.Uri CONTENT_FILTER_URL;
    field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone";
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "name ASC";
    field public static final deprecated java.lang.String PERSON_ID = "person";
  }

  public static abstract deprecated interface Contacts.PhonesColumns {
    field public static final deprecated java.lang.String ISPRIMARY = "isprimary";
    field public static final deprecated java.lang.String LABEL = "label";
    field public static final deprecated java.lang.String NUMBER = "number";
    field public static final deprecated java.lang.String NUMBER_KEY = "number_key";
    field public static final deprecated java.lang.String TYPE = "type";
    field public static final deprecated int TYPE_CUSTOM = 0; // 0x0
    field public static final deprecated int TYPE_FAX_HOME = 5; // 0x5
    field public static final deprecated int TYPE_FAX_WORK = 4; // 0x4
    field public static final deprecated int TYPE_HOME = 1; // 0x1
    field public static final deprecated int TYPE_MOBILE = 2; // 0x2
    field public static final deprecated int TYPE_OTHER = 7; // 0x7
    field public static final deprecated int TYPE_PAGER = 6; // 0x6
    field public static final deprecated int TYPE_WORK = 3; // 0x3
  }

  public static final deprecated class Contacts.Photos implements android.provider.BaseColumns android.provider.Contacts.PhotosColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "photo";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "person ASC";
  }

  public static abstract deprecated interface Contacts.PhotosColumns {
    field public static final deprecated java.lang.String DATA = "data";
    field public static final deprecated java.lang.String DOWNLOAD_REQUIRED = "download_required";
    field public static final deprecated java.lang.String EXISTS_ON_SERVER = "exists_on_server";
    field public static final deprecated java.lang.String LOCAL_VERSION = "local_version";
    field public static final deprecated java.lang.String PERSON_ID = "person";
    field public static final deprecated java.lang.String SYNC_ERROR = "sync_error";
  }

  public static abstract deprecated interface Contacts.PresenceColumns {
    field public static final int AVAILABLE = 5; // 0x5
    field public static final int AWAY = 2; // 0x2
    field public static final int DO_NOT_DISTURB = 4; // 0x4
    field public static final int IDLE = 3; // 0x3
    field public static final deprecated java.lang.String IM_ACCOUNT = "im_account";
    field public static final deprecated java.lang.String IM_HANDLE = "im_handle";
    field public static final deprecated java.lang.String IM_PROTOCOL = "im_protocol";
    field public static final int INVISIBLE = 1; // 0x1
    field public static final int OFFLINE = 0; // 0x0
    field public static final java.lang.String PRESENCE_CUSTOM_STATUS = "status";
    field public static final java.lang.String PRESENCE_STATUS = "mode";
    field public static final java.lang.String PRIORITY = "priority";
  }

  public static final deprecated class Contacts.Settings implements android.provider.BaseColumns android.provider.Contacts.SettingsColumns {
    method public static deprecated java.lang.String getSetting(android.content.ContentResolver, java.lang.String, java.lang.String);
    method public static deprecated void setSetting(android.content.ContentResolver, java.lang.String, java.lang.String, java.lang.String);
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "settings";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "key ASC";
    field public static final deprecated java.lang.String SYNC_EVERYTHING = "syncEverything";
  }

  public static abstract deprecated interface Contacts.SettingsColumns {
    field public static final deprecated java.lang.String KEY = "key";
    field public static final deprecated java.lang.String VALUE = "value";
    field public static final deprecated java.lang.String _SYNC_ACCOUNT = "_sync_account";
    field public static final deprecated java.lang.String _SYNC_ACCOUNT_TYPE = "_sync_account_type";
  }

  public final class ContactsContract {
    ctor public ContactsContract();
    method public static boolean isProfileId(long);
    field public static final java.lang.String AUTHORITY = "com.android.contacts";
    field public static final android.net.Uri AUTHORITY_URI;
    field public static final java.lang.String CALLER_IS_SYNCADAPTER = "caller_is_syncadapter";
    field public static final java.lang.String DEFERRED_SNIPPETING = "deferred_snippeting";
    field public static final java.lang.String DEFERRED_SNIPPETING_QUERY = "deferred_snippeting_query";
    field public static final java.lang.String DIRECTORY_PARAM_KEY = "directory";
    field public static final java.lang.String LIMIT_PARAM_KEY = "limit";
    field public static final java.lang.String PRIMARY_ACCOUNT_NAME = "name_for_primary_account";
    field public static final java.lang.String PRIMARY_ACCOUNT_TYPE = "type_for_primary_account";
    field public static final java.lang.String REMOVE_DUPLICATE_ENTRIES = "remove_duplicate_entries";
    field public static final java.lang.String STREQUENT_PHONE_ONLY = "strequent_phone_only";
  }

  public static final class ContactsContract.AggregationExceptions implements android.provider.BaseColumns {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/aggregation_exception";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/aggregation_exception";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String RAW_CONTACT_ID1 = "raw_contact_id1";
    field public static final java.lang.String RAW_CONTACT_ID2 = "raw_contact_id2";
    field public static final java.lang.String TYPE = "type";
    field public static final int TYPE_AUTOMATIC = 0; // 0x0
    field public static final int TYPE_KEEP_SEPARATE = 2; // 0x2
    field public static final int TYPE_KEEP_TOGETHER = 1; // 0x1
  }

  public static final class ContactsContract.Authorization {
    ctor public ContactsContract.Authorization();
    field public static final java.lang.String AUTHORIZATION_METHOD = "authorize";
    field public static final java.lang.String KEY_AUTHORIZED_URI = "authorized_uri";
    field public static final java.lang.String KEY_URI_TO_AUTHORIZE = "uri_to_authorize";
  }

  protected static abstract interface ContactsContract.BaseSyncColumns {
    field public static final java.lang.String SYNC1 = "sync1";
    field public static final java.lang.String SYNC2 = "sync2";
    field public static final java.lang.String SYNC3 = "sync3";
    field public static final java.lang.String SYNC4 = "sync4";
  }

  public static final class ContactsContract.CommonDataKinds {
  }

  public static abstract interface ContactsContract.CommonDataKinds.BaseTypes {
    field public static final int TYPE_CUSTOM = 0; // 0x0
  }

  public static final class ContactsContract.CommonDataKinds.Callable implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    ctor public ContactsContract.CommonDataKinds.Callable();
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
  }

  protected static abstract interface ContactsContract.CommonDataKinds.CommonColumns implements android.provider.ContactsContract.CommonDataKinds.BaseTypes {
    field public static final java.lang.String DATA = "data1";
    field public static final java.lang.String LABEL = "data3";
    field public static final java.lang.String TYPE = "data2";
  }

  public static final class ContactsContract.CommonDataKinds.Contactables implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    ctor public ContactsContract.CommonDataKinds.Contactables();
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
  }

  public static final class ContactsContract.CommonDataKinds.Email implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getTypeLabelResource(int);
    field public static final java.lang.String ADDRESS = "data1";
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/email_v2";
    field public static final android.net.Uri CONTENT_LOOKUP_URI;
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/email_v2";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DISPLAY_NAME = "data4";
    field public static final android.net.Uri ENTERPRISE_CONTENT_LOOKUP_URI;
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final int TYPE_HOME = 1; // 0x1
    field public static final int TYPE_MOBILE = 4; // 0x4
    field public static final int TYPE_OTHER = 3; // 0x3
    field public static final int TYPE_WORK = 2; // 0x2
  }

  public static final class ContactsContract.CommonDataKinds.Event implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static int getTypeResource(java.lang.Integer);
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_event";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String START_DATE = "data1";
    field public static final int TYPE_ANNIVERSARY = 1; // 0x1
    field public static final int TYPE_BIRTHDAY = 3; // 0x3
    field public static final int TYPE_OTHER = 2; // 0x2
  }

  public static final class ContactsContract.CommonDataKinds.GroupMembership implements android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/group_membership";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String GROUP_ROW_ID = "data1";
    field public static final java.lang.String GROUP_SOURCE_ID = "group_sourceid";
  }

  public static final class ContactsContract.CommonDataKinds.Identity implements android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/identity";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String IDENTITY = "data1";
    field public static final java.lang.String NAMESPACE = "data2";
  }

  public static final class ContactsContract.CommonDataKinds.Im implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getProtocolLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getProtocolLabelResource(int);
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getTypeLabelResource(int);
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/im";
    field public static final java.lang.String CUSTOM_PROTOCOL = "data6";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String PROTOCOL = "data5";
    field public static final int PROTOCOL_AIM = 0; // 0x0
    field public static final int PROTOCOL_CUSTOM = -1; // 0xffffffff
    field public static final int PROTOCOL_GOOGLE_TALK = 5; // 0x5
    field public static final int PROTOCOL_ICQ = 6; // 0x6
    field public static final int PROTOCOL_JABBER = 7; // 0x7
    field public static final int PROTOCOL_MSN = 1; // 0x1
    field public static final int PROTOCOL_NETMEETING = 8; // 0x8
    field public static final int PROTOCOL_QQ = 4; // 0x4
    field public static final int PROTOCOL_SKYPE = 3; // 0x3
    field public static final int PROTOCOL_YAHOO = 2; // 0x2
    field public static final int TYPE_HOME = 1; // 0x1
    field public static final int TYPE_OTHER = 3; // 0x3
    field public static final int TYPE_WORK = 2; // 0x2
  }

  public static final class ContactsContract.CommonDataKinds.Nickname implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/nickname";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String NAME = "data1";
    field public static final int TYPE_DEFAULT = 1; // 0x1
    field public static final int TYPE_INITIALS = 5; // 0x5
    field public static final int TYPE_MAIDEN_NAME = 3; // 0x3
    field public static final deprecated int TYPE_MAINDEN_NAME = 3; // 0x3
    field public static final int TYPE_OTHER_NAME = 2; // 0x2
    field public static final int TYPE_SHORT_NAME = 4; // 0x4
  }

  public static final class ContactsContract.CommonDataKinds.Note implements android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/note";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String NOTE = "data1";
  }

  public static final class ContactsContract.CommonDataKinds.Organization implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getTypeLabelResource(int);
    field public static final java.lang.String COMPANY = "data1";
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/organization";
    field public static final java.lang.String DEPARTMENT = "data5";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String JOB_DESCRIPTION = "data6";
    field public static final java.lang.String OFFICE_LOCATION = "data9";
    field public static final java.lang.String PHONETIC_NAME = "data8";
    field public static final java.lang.String SYMBOL = "data7";
    field public static final java.lang.String TITLE = "data4";
    field public static final int TYPE_OTHER = 2; // 0x2
    field public static final int TYPE_WORK = 1; // 0x1
  }

  public static final class ContactsContract.CommonDataKinds.Phone implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getTypeLabelResource(int);
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String NORMALIZED_NUMBER = "data4";
    field public static final java.lang.String NUMBER = "data1";
    field public static final java.lang.String SEARCH_DISPLAY_NAME_KEY = "search_display_name";
    field public static final java.lang.String SEARCH_PHONE_NUMBER_KEY = "search_phone_number";
    field public static final int TYPE_ASSISTANT = 19; // 0x13
    field public static final int TYPE_CALLBACK = 8; // 0x8
    field public static final int TYPE_CAR = 9; // 0x9
    field public static final int TYPE_COMPANY_MAIN = 10; // 0xa
    field public static final int TYPE_FAX_HOME = 5; // 0x5
    field public static final int TYPE_FAX_WORK = 4; // 0x4
    field public static final int TYPE_HOME = 1; // 0x1
    field public static final int TYPE_ISDN = 11; // 0xb
    field public static final int TYPE_MAIN = 12; // 0xc
    field public static final int TYPE_MMS = 20; // 0x14
    field public static final int TYPE_MOBILE = 2; // 0x2
    field public static final int TYPE_OTHER = 7; // 0x7
    field public static final int TYPE_OTHER_FAX = 13; // 0xd
    field public static final int TYPE_PAGER = 6; // 0x6
    field public static final int TYPE_RADIO = 14; // 0xe
    field public static final int TYPE_TELEX = 15; // 0xf
    field public static final int TYPE_TTY_TDD = 16; // 0x10
    field public static final int TYPE_WORK = 3; // 0x3
    field public static final int TYPE_WORK_MOBILE = 17; // 0x11
    field public static final int TYPE_WORK_PAGER = 18; // 0x12
  }

  public static final class ContactsContract.CommonDataKinds.Photo implements android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/photo";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String PHOTO = "data15";
    field public static final java.lang.String PHOTO_FILE_ID = "data14";
  }

  public static final class ContactsContract.CommonDataKinds.Relation implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getTypeLabelResource(int);
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/relation";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String NAME = "data1";
    field public static final int TYPE_ASSISTANT = 1; // 0x1
    field public static final int TYPE_BROTHER = 2; // 0x2
    field public static final int TYPE_CHILD = 3; // 0x3
    field public static final int TYPE_DOMESTIC_PARTNER = 4; // 0x4
    field public static final int TYPE_FATHER = 5; // 0x5
    field public static final int TYPE_FRIEND = 6; // 0x6
    field public static final int TYPE_MANAGER = 7; // 0x7
    field public static final int TYPE_MOTHER = 8; // 0x8
    field public static final int TYPE_PARENT = 9; // 0x9
    field public static final int TYPE_PARTNER = 10; // 0xa
    field public static final int TYPE_REFERRED_BY = 11; // 0xb
    field public static final int TYPE_RELATIVE = 12; // 0xc
    field public static final int TYPE_SISTER = 13; // 0xd
    field public static final int TYPE_SPOUSE = 14; // 0xe
  }

  public static final class ContactsContract.CommonDataKinds.SipAddress implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getTypeLabelResource(int);
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/sip_address";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String SIP_ADDRESS = "data1";
    field public static final int TYPE_HOME = 1; // 0x1
    field public static final int TYPE_OTHER = 3; // 0x3
    field public static final int TYPE_WORK = 2; // 0x2
  }

  public static final class ContactsContract.CommonDataKinds.StructuredName implements android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/name";
    field public static final java.lang.String DISPLAY_NAME = "data1";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String FAMILY_NAME = "data3";
    field public static final java.lang.String FULL_NAME_STYLE = "data10";
    field public static final java.lang.String GIVEN_NAME = "data2";
    field public static final java.lang.String MIDDLE_NAME = "data5";
    field public static final java.lang.String PHONETIC_FAMILY_NAME = "data9";
    field public static final java.lang.String PHONETIC_GIVEN_NAME = "data7";
    field public static final java.lang.String PHONETIC_MIDDLE_NAME = "data8";
    field public static final java.lang.String PREFIX = "data4";
    field public static final java.lang.String SUFFIX = "data6";
  }

  public static final class ContactsContract.CommonDataKinds.StructuredPostal implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
    method public static final int getTypeLabelResource(int);
    field public static final java.lang.String CITY = "data7";
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/postal-address_v2";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/postal-address_v2";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String COUNTRY = "data10";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String FORMATTED_ADDRESS = "data1";
    field public static final java.lang.String NEIGHBORHOOD = "data6";
    field public static final java.lang.String POBOX = "data5";
    field public static final java.lang.String POSTCODE = "data9";
    field public static final java.lang.String REGION = "data8";
    field public static final java.lang.String STREET = "data4";
    field public static final int TYPE_HOME = 1; // 0x1
    field public static final int TYPE_OTHER = 3; // 0x3
    field public static final int TYPE_WORK = 2; // 0x2
  }

  public static final class ContactsContract.CommonDataKinds.Website implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/website";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final int TYPE_BLOG = 2; // 0x2
    field public static final int TYPE_FTP = 6; // 0x6
    field public static final int TYPE_HOME = 4; // 0x4
    field public static final int TYPE_HOMEPAGE = 1; // 0x1
    field public static final int TYPE_OTHER = 7; // 0x7
    field public static final int TYPE_PROFILE = 3; // 0x3
    field public static final int TYPE_WORK = 5; // 0x5
    field public static final java.lang.String URL = "data1";
  }

  protected static abstract interface ContactsContract.ContactNameColumns {
    field public static final java.lang.String DISPLAY_NAME_ALTERNATIVE = "display_name_alt";
    field public static final java.lang.String DISPLAY_NAME_PRIMARY = "display_name";
    field public static final java.lang.String DISPLAY_NAME_SOURCE = "display_name_source";
    field public static final java.lang.String PHONETIC_NAME = "phonetic_name";
    field public static final java.lang.String PHONETIC_NAME_STYLE = "phonetic_name_style";
    field public static final java.lang.String SORT_KEY_ALTERNATIVE = "sort_key_alt";
    field public static final java.lang.String SORT_KEY_PRIMARY = "sort_key";
  }

  protected static abstract interface ContactsContract.ContactOptionsColumns {
    field public static final java.lang.String CUSTOM_RINGTONE = "custom_ringtone";
    field public static final java.lang.String LAST_TIME_CONTACTED = "last_time_contacted";
    field public static final java.lang.String PINNED = "pinned";
    field public static final java.lang.String SEND_TO_VOICEMAIL = "send_to_voicemail";
    field public static final java.lang.String STARRED = "starred";
    field public static final java.lang.String TIMES_CONTACTED = "times_contacted";
  }

  protected static abstract interface ContactsContract.ContactStatusColumns {
    field public static final java.lang.String CONTACT_CHAT_CAPABILITY = "contact_chat_capability";
    field public static final java.lang.String CONTACT_PRESENCE = "contact_presence";
    field public static final java.lang.String CONTACT_STATUS = "contact_status";
    field public static final java.lang.String CONTACT_STATUS_ICON = "contact_status_icon";
    field public static final java.lang.String CONTACT_STATUS_LABEL = "contact_status_label";
    field public static final java.lang.String CONTACT_STATUS_RES_PACKAGE = "contact_status_res_package";
    field public static final java.lang.String CONTACT_STATUS_TIMESTAMP = "contact_status_ts";
  }

  public static class ContactsContract.Contacts implements android.provider.BaseColumns android.provider.ContactsContract.ContactNameColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactStatusColumns android.provider.ContactsContract.ContactsColumns {
    method public static android.net.Uri getLookupUri(android.content.ContentResolver, android.net.Uri);
    method public static android.net.Uri getLookupUri(long, java.lang.String);
    method public static boolean isEnterpriseContactId(long);
    method public static android.net.Uri lookupContact(android.content.ContentResolver, android.net.Uri);
    method public static deprecated void markAsContacted(android.content.ContentResolver, long);
    method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri, boolean);
    method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri);
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final android.net.Uri CONTENT_FREQUENT_URI;
    field public static final android.net.Uri CONTENT_GROUP_URI;
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact";
    field public static final android.net.Uri CONTENT_LOOKUP_URI;
    field public static final android.net.Uri CONTENT_MULTI_VCARD_URI;
    field public static final android.net.Uri CONTENT_STREQUENT_FILTER_URI;
    field public static final android.net.Uri CONTENT_STREQUENT_URI;
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String CONTENT_VCARD_TYPE = "text/x-vcard";
    field public static final android.net.Uri CONTENT_VCARD_URI;
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String QUERY_PARAMETER_VCARD_NO_PHOTO = "no_photo";
  }

  public static final class ContactsContract.Contacts.AggregationSuggestions implements android.provider.BaseColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactStatusColumns android.provider.ContactsContract.ContactsColumns {
    field public static final java.lang.String CONTENT_DIRECTORY = "suggestions";
  }

  public static final class ContactsContract.Contacts.AggregationSuggestions.Builder {
    ctor public ContactsContract.Contacts.AggregationSuggestions.Builder();
    method public android.provider.ContactsContract.Contacts.AggregationSuggestions.Builder addNameParameter(java.lang.String);
    method public android.net.Uri build();
    method public android.provider.ContactsContract.Contacts.AggregationSuggestions.Builder setContactId(long);
    method public android.provider.ContactsContract.Contacts.AggregationSuggestions.Builder setLimit(int);
  }

  public static final class ContactsContract.Contacts.Data implements android.provider.BaseColumns android.provider.ContactsContract.DataColumns {
    field public static final java.lang.String CONTENT_DIRECTORY = "data";
  }

  public static final class ContactsContract.Contacts.Entity implements android.provider.BaseColumns android.provider.ContactsContract.BaseSyncColumns android.provider.ContactsContract.ContactNameColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactStatusColumns android.provider.ContactsContract.ContactsColumns android.provider.ContactsContract.DataColumns android.provider.ContactsContract.DataUsageStatColumns android.provider.ContactsContract.RawContactsColumns android.provider.ContactsContract.StatusColumns android.provider.ContactsContract.SyncColumns {
    field public static final java.lang.String CONTENT_DIRECTORY = "entities";
    field public static final java.lang.String DATA_ID = "data_id";
    field public static final java.lang.String RAW_CONTACT_ID = "raw_contact_id";
  }

  public static final class ContactsContract.Contacts.Photo implements android.provider.BaseColumns android.provider.ContactsContract.DataColumnsWithJoins {
    field public static final java.lang.String CONTENT_DIRECTORY = "photo";
    field public static final java.lang.String DISPLAY_PHOTO = "display_photo";
    field public static final java.lang.String PHOTO = "data15";
    field public static final java.lang.String PHOTO_FILE_ID = "data14";
  }

  public static final deprecated class ContactsContract.Contacts.StreamItems implements android.provider.ContactsContract.StreamItemsColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "stream_items";
  }

  protected static abstract interface ContactsContract.ContactsColumns {
    field public static final java.lang.String CONTACT_LAST_UPDATED_TIMESTAMP = "contact_last_updated_timestamp";
    field public static final java.lang.String DISPLAY_NAME = "display_name";
    field public static final java.lang.String HAS_PHONE_NUMBER = "has_phone_number";
    field public static final java.lang.String IN_DEFAULT_DIRECTORY = "in_default_directory";
    field public static final java.lang.String IN_VISIBLE_GROUP = "in_visible_group";
    field public static final java.lang.String IS_USER_PROFILE = "is_user_profile";
    field public static final java.lang.String LOOKUP_KEY = "lookup";
    field public static final java.lang.String NAME_RAW_CONTACT_ID = "name_raw_contact_id";
    field public static final java.lang.String PHOTO_FILE_ID = "photo_file_id";
    field public static final java.lang.String PHOTO_ID = "photo_id";
    field public static final java.lang.String PHOTO_THUMBNAIL_URI = "photo_thumb_uri";
    field public static final java.lang.String PHOTO_URI = "photo_uri";
  }

  public static final class ContactsContract.Data implements android.provider.ContactsContract.DataColumnsWithJoins {
    method public static android.net.Uri getContactLookupUri(android.content.ContentResolver, android.net.Uri);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/data";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    field public static final java.lang.String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
  }

  protected static abstract interface ContactsContract.DataColumns {
    field public static final java.lang.String DATA1 = "data1";
    field public static final java.lang.String DATA10 = "data10";
    field public static final java.lang.String DATA11 = "data11";
    field public static final java.lang.String DATA12 = "data12";
    field public static final java.lang.String DATA13 = "data13";
    field public static final java.lang.String DATA14 = "data14";
    field public static final java.lang.String DATA15 = "data15";
    field public static final java.lang.String DATA2 = "data2";
    field public static final java.lang.String DATA3 = "data3";
    field public static final java.lang.String DATA4 = "data4";
    field public static final java.lang.String DATA5 = "data5";
    field public static final java.lang.String DATA6 = "data6";
    field public static final java.lang.String DATA7 = "data7";
    field public static final java.lang.String DATA8 = "data8";
    field public static final java.lang.String DATA9 = "data9";
    field public static final java.lang.String DATA_VERSION = "data_version";
    field public static final java.lang.String IS_PRIMARY = "is_primary";
    field public static final java.lang.String IS_READ_ONLY = "is_read_only";
    field public static final java.lang.String IS_SUPER_PRIMARY = "is_super_primary";
    field public static final java.lang.String MIMETYPE = "mimetype";
    field public static final java.lang.String RAW_CONTACT_ID = "raw_contact_id";
    field public static final java.lang.String RES_PACKAGE = "res_package";
    field public static final java.lang.String SYNC1 = "data_sync1";
    field public static final java.lang.String SYNC2 = "data_sync2";
    field public static final java.lang.String SYNC3 = "data_sync3";
    field public static final java.lang.String SYNC4 = "data_sync4";
  }

  protected static abstract interface ContactsContract.DataColumnsWithJoins implements android.provider.BaseColumns android.provider.ContactsContract.ContactNameColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactStatusColumns android.provider.ContactsContract.ContactsColumns android.provider.ContactsContract.DataColumns android.provider.ContactsContract.DataUsageStatColumns android.provider.ContactsContract.RawContactsColumns android.provider.ContactsContract.StatusColumns {
  }

  public static final class ContactsContract.DataUsageFeedback {
    ctor public ContactsContract.DataUsageFeedback();
    field public static final android.net.Uri DELETE_USAGE_URI;
    field public static final android.net.Uri FEEDBACK_URI;
    field public static final java.lang.String USAGE_TYPE = "type";
    field public static final java.lang.String USAGE_TYPE_CALL = "call";
    field public static final java.lang.String USAGE_TYPE_LONG_TEXT = "long_text";
    field public static final java.lang.String USAGE_TYPE_SHORT_TEXT = "short_text";
  }

  protected static abstract interface ContactsContract.DataUsageStatColumns {
    field public static final java.lang.String LAST_TIME_USED = "last_time_used";
    field public static final java.lang.String TIMES_USED = "times_used";
  }

  public static final class ContactsContract.DeletedContacts implements android.provider.ContactsContract.DeletedContactsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final long DAYS_KEPT_MILLISECONDS = 2592000000L; // 0x9a7ec800L
  }

  protected static abstract interface ContactsContract.DeletedContactsColumns {
    field public static final java.lang.String CONTACT_DELETED_TIMESTAMP = "contact_deleted_timestamp";
    field public static final java.lang.String CONTACT_ID = "contact_id";
  }

  public static final class ContactsContract.Directory implements android.provider.BaseColumns {
    method public static void notifyDirectoryChange(android.content.ContentResolver);
    field public static final java.lang.String ACCOUNT_NAME = "accountName";
    field public static final java.lang.String ACCOUNT_TYPE = "accountType";
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_directory";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact_directories";
    field public static final android.net.Uri CONTENT_URI;
    field public static final long DEFAULT = 0L; // 0x0L
    field public static final java.lang.String DIRECTORY_AUTHORITY = "authority";
    field public static final java.lang.String DISPLAY_NAME = "displayName";
    field public static final java.lang.String EXPORT_SUPPORT = "exportSupport";
    field public static final int EXPORT_SUPPORT_ANY_ACCOUNT = 2; // 0x2
    field public static final int EXPORT_SUPPORT_NONE = 0; // 0x0
    field public static final int EXPORT_SUPPORT_SAME_ACCOUNT_ONLY = 1; // 0x1
    field public static final long LOCAL_INVISIBLE = 1L; // 0x1L
    field public static final java.lang.String PACKAGE_NAME = "packageName";
    field public static final java.lang.String PHOTO_SUPPORT = "photoSupport";
    field public static final int PHOTO_SUPPORT_FULL = 3; // 0x3
    field public static final int PHOTO_SUPPORT_FULL_SIZE_ONLY = 2; // 0x2
    field public static final int PHOTO_SUPPORT_NONE = 0; // 0x0
    field public static final int PHOTO_SUPPORT_THUMBNAIL_ONLY = 1; // 0x1
    field public static final java.lang.String SHORTCUT_SUPPORT = "shortcutSupport";
    field public static final int SHORTCUT_SUPPORT_DATA_ITEMS_ONLY = 1; // 0x1
    field public static final int SHORTCUT_SUPPORT_FULL = 2; // 0x2
    field public static final int SHORTCUT_SUPPORT_NONE = 0; // 0x0
    field public static final java.lang.String TYPE_RESOURCE_ID = "typeResourceId";
  }

  public static abstract interface ContactsContract.DisplayNameSources {
    field public static final int EMAIL = 10; // 0xa
    field public static final int NICKNAME = 35; // 0x23
    field public static final int ORGANIZATION = 30; // 0x1e
    field public static final int PHONE = 20; // 0x14
    field public static final int STRUCTURED_NAME = 40; // 0x28
    field public static final int STRUCTURED_PHONETIC_NAME = 37; // 0x25
    field public static final int UNDEFINED = 0; // 0x0
  }

  public static final class ContactsContract.DisplayPhoto {
    field public static final android.net.Uri CONTENT_MAX_DIMENSIONS_URI;
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DISPLAY_MAX_DIM = "display_max_dim";
    field public static final java.lang.String THUMBNAIL_MAX_DIM = "thumbnail_max_dim";
  }

  public static abstract interface ContactsContract.FullNameStyle {
    field public static final int CHINESE = 3; // 0x3
    field public static final int CJK = 2; // 0x2
    field public static final int JAPANESE = 4; // 0x4
    field public static final int KOREAN = 5; // 0x5
    field public static final int UNDEFINED = 0; // 0x0
    field public static final int WESTERN = 1; // 0x1
  }

  public static final class ContactsContract.Groups implements android.provider.BaseColumns android.provider.ContactsContract.GroupsColumns android.provider.ContactsContract.SyncColumns {
    method public static android.content.EntityIterator newEntityIterator(android.database.Cursor);
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/group";
    field public static final android.net.Uri CONTENT_SUMMARY_URI;
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/group";
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface ContactsContract.GroupsColumns {
    field public static final java.lang.String AUTO_ADD = "auto_add";
    field public static final java.lang.String DATA_SET = "data_set";
    field public static final java.lang.String DELETED = "deleted";
    field public static final java.lang.String FAVORITES = "favorites";
    field public static final java.lang.String GROUP_IS_READ_ONLY = "group_is_read_only";
    field public static final java.lang.String GROUP_VISIBLE = "group_visible";
    field public static final java.lang.String NOTES = "notes";
    field public static final java.lang.String RES_PACKAGE = "res_package";
    field public static final java.lang.String SHOULD_SYNC = "should_sync";
    field public static final java.lang.String SUMMARY_COUNT = "summ_count";
    field public static final java.lang.String SUMMARY_WITH_PHONES = "summ_phones";
    field public static final java.lang.String SYSTEM_ID = "system_id";
    field public static final java.lang.String TITLE = "title";
    field public static final java.lang.String TITLE_RES = "title_res";
  }

  public static final class ContactsContract.Intents {
    ctor public ContactsContract.Intents();
    field public static final java.lang.String ATTACH_IMAGE = "com.android.contacts.action.ATTACH_IMAGE";
    field public static final java.lang.String CONTACTS_DATABASE_CREATED = "android.provider.Contacts.DATABASE_CREATED";
    field public static final java.lang.String EXTRA_CREATE_DESCRIPTION = "com.android.contacts.action.CREATE_DESCRIPTION";
    field public static final java.lang.String EXTRA_FORCE_CREATE = "com.android.contacts.action.FORCE_CREATE";
    field public static final java.lang.String INVITE_CONTACT = "com.android.contacts.action.INVITE_CONTACT";
    field public static final java.lang.String SEARCH_SUGGESTION_CLICKED = "android.provider.Contacts.SEARCH_SUGGESTION_CLICKED";
    field public static final java.lang.String SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED = "android.provider.Contacts.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED";
    field public static final java.lang.String SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED = "android.provider.Contacts.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED";
    field public static final java.lang.String SHOW_OR_CREATE_CONTACT = "com.android.contacts.action.SHOW_OR_CREATE_CONTACT";
  }

  public static final class ContactsContract.Intents.Insert {
    ctor public ContactsContract.Intents.Insert();
    field public static final java.lang.String ACTION = "android.intent.action.INSERT";
    field public static final java.lang.String COMPANY = "company";
    field public static final java.lang.String DATA = "data";
    field public static final java.lang.String EMAIL = "email";
    field public static final java.lang.String EMAIL_ISPRIMARY = "email_isprimary";
    field public static final java.lang.String EMAIL_TYPE = "email_type";
    field public static final java.lang.String EXTRA_ACCOUNT = "android.provider.extra.ACCOUNT";
    field public static final java.lang.String EXTRA_DATA_SET = "android.provider.extra.DATA_SET";
    field public static final java.lang.String FULL_MODE = "full_mode";
    field public static final java.lang.String IM_HANDLE = "im_handle";
    field public static final java.lang.String IM_ISPRIMARY = "im_isprimary";
    field public static final java.lang.String IM_PROTOCOL = "im_protocol";
    field public static final java.lang.String JOB_TITLE = "job_title";
    field public static final java.lang.String NAME = "name";
    field public static final java.lang.String NOTES = "notes";
    field public static final java.lang.String PHONE = "phone";
    field public static final java.lang.String PHONETIC_NAME = "phonetic_name";
    field public static final java.lang.String PHONE_ISPRIMARY = "phone_isprimary";
    field public static final java.lang.String PHONE_TYPE = "phone_type";
    field public static final java.lang.String POSTAL = "postal";
    field public static final java.lang.String POSTAL_ISPRIMARY = "postal_isprimary";
    field public static final java.lang.String POSTAL_TYPE = "postal_type";
    field public static final java.lang.String SECONDARY_EMAIL = "secondary_email";
    field public static final java.lang.String SECONDARY_EMAIL_TYPE = "secondary_email_type";
    field public static final java.lang.String SECONDARY_PHONE = "secondary_phone";
    field public static final java.lang.String SECONDARY_PHONE_TYPE = "secondary_phone_type";
    field public static final java.lang.String TERTIARY_EMAIL = "tertiary_email";
    field public static final java.lang.String TERTIARY_EMAIL_TYPE = "tertiary_email_type";
    field public static final java.lang.String TERTIARY_PHONE = "tertiary_phone";
    field public static final java.lang.String TERTIARY_PHONE_TYPE = "tertiary_phone_type";
  }

  public static final class ContactsContract.PhoneLookup implements android.provider.BaseColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactsColumns android.provider.ContactsContract.PhoneLookupColumns {
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
    field public static final java.lang.String QUERY_PARAMETER_SIP_ADDRESS = "sip";
  }

  protected static abstract interface ContactsContract.PhoneLookupColumns {
    field public static final java.lang.String LABEL = "label";
    field public static final java.lang.String NORMALIZED_NUMBER = "normalized_number";
    field public static final java.lang.String NUMBER = "number";
    field public static final java.lang.String TYPE = "type";
  }

  public static abstract interface ContactsContract.PhoneticNameStyle {
    field public static final int JAPANESE = 4; // 0x4
    field public static final int KOREAN = 5; // 0x5
    field public static final int PINYIN = 3; // 0x3
    field public static final int UNDEFINED = 0; // 0x0
  }

  public static final class ContactsContract.PinnedPositions {
    ctor public ContactsContract.PinnedPositions();
    method public static void pin(android.content.ContentResolver, long, int);
    method public static void undemote(android.content.ContentResolver, long);
    field public static final int DEMOTED = -1; // 0xffffffff
    field public static final int UNPINNED = 0; // 0x0
  }

  public static final deprecated class ContactsContract.Presence extends android.provider.ContactsContract.StatusUpdates {
    ctor public ContactsContract.Presence();
  }

  protected static abstract interface ContactsContract.PresenceColumns {
    field public static final java.lang.String CUSTOM_PROTOCOL = "custom_protocol";
    field public static final java.lang.String DATA_ID = "presence_data_id";
    field public static final java.lang.String IM_ACCOUNT = "im_account";
    field public static final java.lang.String IM_HANDLE = "im_handle";
    field public static final java.lang.String PROTOCOL = "protocol";
  }

  public static final class ContactsContract.Profile implements android.provider.BaseColumns android.provider.ContactsContract.ContactNameColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactStatusColumns android.provider.ContactsContract.ContactsColumns {
    field public static final android.net.Uri CONTENT_RAW_CONTACTS_URI;
    field public static final android.net.Uri CONTENT_URI;
    field public static final android.net.Uri CONTENT_VCARD_URI;
    field public static final long MIN_ID = 9223372034707292160L; // 0x7fffffff80000000L
  }

  public static final class ContactsContract.ProfileSyncState implements android.provider.SyncStateContract.Columns {
    method public static byte[] get(android.content.ContentProviderClient, android.accounts.Account) throws android.os.RemoteException;
    method public static android.util.Pair<android.net.Uri, byte[]> getWithUri(android.content.ContentProviderClient, android.accounts.Account) throws android.os.RemoteException;
    method public static android.content.ContentProviderOperation newSetOperation(android.accounts.Account, byte[]);
    method public static void set(android.content.ContentProviderClient, android.accounts.Account, byte[]) throws android.os.RemoteException;
    field public static final java.lang.String CONTENT_DIRECTORY = "syncstate";
    field public static final android.net.Uri CONTENT_URI;
  }

  public static final class ContactsContract.ProviderStatus {
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/provider_status";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String STATUS = "status";
    field public static final int STATUS_CHANGING_LOCALE = 3; // 0x3
    field public static final int STATUS_NORMAL = 0; // 0x0
    field public static final int STATUS_NO_ACCOUNTS_NO_CONTACTS = 4; // 0x4
    field public static final int STATUS_UPGRADING = 1; // 0x1
  }

  public static final class ContactsContract.QuickContact {
    ctor public ContactsContract.QuickContact();
    method public static void showQuickContact(android.content.Context, android.view.View, android.net.Uri, int, java.lang.String[]);
    method public static void showQuickContact(android.content.Context, android.graphics.Rect, android.net.Uri, int, java.lang.String[]);
    method public static void showQuickContact(android.content.Context, android.view.View, android.net.Uri, java.lang.String[], java.lang.String);
    method public static void showQuickContact(android.content.Context, android.graphics.Rect, android.net.Uri, java.lang.String[], java.lang.String);
    field public static final java.lang.String ACTION_QUICK_CONTACT = "android.provider.action.QUICK_CONTACT";
    field public static final java.lang.String EXTRA_EXCLUDE_MIMES = "android.provider.extra.EXCLUDE_MIMES";
    field public static final java.lang.String EXTRA_MODE = "android.provider.extra.MODE";
    field public static final java.lang.String EXTRA_PRIORITIZED_MIMETYPE = "android.provider.extra.PRIORITIZED_MIMETYPE";
    field public static final int MODE_LARGE = 3; // 0x3
    field public static final int MODE_MEDIUM = 2; // 0x2
    field public static final int MODE_SMALL = 1; // 0x1
  }

  public static final class ContactsContract.RawContacts implements android.provider.BaseColumns android.provider.ContactsContract.ContactNameColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.RawContactsColumns android.provider.ContactsContract.SyncColumns {
    method public static android.net.Uri getContactLookupUri(android.content.ContentResolver, android.net.Uri);
    method public static android.content.EntityIterator newEntityIterator(android.database.Cursor);
    field public static final int AGGREGATION_MODE_DEFAULT = 0; // 0x0
    field public static final int AGGREGATION_MODE_DISABLED = 3; // 0x3
    field public static final deprecated int AGGREGATION_MODE_IMMEDIATE = 1; // 0x1
    field public static final int AGGREGATION_MODE_SUSPENDED = 2; // 0x2
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/raw_contact";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/raw_contact";
    field public static final android.net.Uri CONTENT_URI;
  }

  public static final class ContactsContract.RawContacts.Data implements android.provider.BaseColumns android.provider.ContactsContract.DataColumns {
    field public static final java.lang.String CONTENT_DIRECTORY = "data";
  }

  public static final class ContactsContract.RawContacts.DisplayPhoto {
    field public static final java.lang.String CONTENT_DIRECTORY = "display_photo";
  }

  public static final class ContactsContract.RawContacts.Entity implements android.provider.BaseColumns android.provider.ContactsContract.DataColumns {
    field public static final java.lang.String CONTENT_DIRECTORY = "entity";
    field public static final java.lang.String DATA_ID = "data_id";
  }

  public static final deprecated class ContactsContract.RawContacts.StreamItems implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemsColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "stream_items";
  }

  protected static abstract interface ContactsContract.RawContactsColumns {
    field public static final java.lang.String ACCOUNT_TYPE_AND_DATA_SET = "account_type_and_data_set";
    field public static final java.lang.String AGGREGATION_MODE = "aggregation_mode";
    field public static final java.lang.String CONTACT_ID = "contact_id";
    field public static final java.lang.String DATA_SET = "data_set";
    field public static final java.lang.String DELETED = "deleted";
    field public static final java.lang.String RAW_CONTACT_IS_READ_ONLY = "raw_contact_is_read_only";
    field public static final java.lang.String RAW_CONTACT_IS_USER_PROFILE = "raw_contact_is_user_profile";
  }

  public static final class ContactsContract.RawContactsEntity implements android.provider.BaseColumns android.provider.ContactsContract.DataColumns android.provider.ContactsContract.RawContactsColumns {
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/raw_contact_entity";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DATA_ID = "data_id";
    field public static final android.net.Uri PROFILE_CONTENT_URI;
  }

  public static class ContactsContract.SearchSnippets {
    ctor public ContactsContract.SearchSnippets();
    field public static final java.lang.String DEFERRED_SNIPPETING_KEY = "deferred_snippeting";
    field public static final java.lang.String SNIPPET = "snippet";
  }

  public static final class ContactsContract.Settings implements android.provider.ContactsContract.SettingsColumns {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/setting";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/setting";
    field public static final android.net.Uri CONTENT_URI;
  }

  protected static abstract interface ContactsContract.SettingsColumns {
    field public static final java.lang.String ACCOUNT_NAME = "account_name";
    field public static final java.lang.String ACCOUNT_TYPE = "account_type";
    field public static final java.lang.String ANY_UNSYNCED = "any_unsynced";
    field public static final java.lang.String DATA_SET = "data_set";
    field public static final java.lang.String SHOULD_SYNC = "should_sync";
    field public static final java.lang.String UNGROUPED_COUNT = "summ_count";
    field public static final java.lang.String UNGROUPED_VISIBLE = "ungrouped_visible";
    field public static final java.lang.String UNGROUPED_WITH_PHONES = "summ_phones";
  }

  protected static abstract interface ContactsContract.StatusColumns {
    field public static final int AVAILABLE = 5; // 0x5
    field public static final int AWAY = 2; // 0x2
    field public static final int CAPABILITY_HAS_CAMERA = 4; // 0x4
    field public static final int CAPABILITY_HAS_VIDEO = 2; // 0x2
    field public static final int CAPABILITY_HAS_VOICE = 1; // 0x1
    field public static final java.lang.String CHAT_CAPABILITY = "chat_capability";
    field public static final int DO_NOT_DISTURB = 4; // 0x4
    field public static final int IDLE = 3; // 0x3
    field public static final int INVISIBLE = 1; // 0x1
    field public static final int OFFLINE = 0; // 0x0
    field public static final java.lang.String PRESENCE = "mode";
    field public static final deprecated java.lang.String PRESENCE_CUSTOM_STATUS = "status";
    field public static final deprecated java.lang.String PRESENCE_STATUS = "mode";
    field public static final java.lang.String STATUS = "status";
    field public static final java.lang.String STATUS_ICON = "status_icon";
    field public static final java.lang.String STATUS_LABEL = "status_label";
    field public static final java.lang.String STATUS_RES_PACKAGE = "status_res_package";
    field public static final java.lang.String STATUS_TIMESTAMP = "status_ts";
  }

  public static class ContactsContract.StatusUpdates implements android.provider.ContactsContract.PresenceColumns android.provider.ContactsContract.StatusColumns {
    method public static final int getPresenceIconResourceId(int);
    method public static final int getPresencePrecedence(int);
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/status-update";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/status-update";
    field public static final android.net.Uri CONTENT_URI;
    field public static final android.net.Uri PROFILE_CONTENT_URI;
  }

  public static final deprecated class ContactsContract.StreamItemPhotos implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemPhotosColumns {
    field public static final deprecated java.lang.String PHOTO = "photo";
  }

  protected static abstract deprecated interface ContactsContract.StreamItemPhotosColumns {
    field public static final deprecated java.lang.String PHOTO_FILE_ID = "photo_file_id";
    field public static final deprecated java.lang.String PHOTO_URI = "photo_uri";
    field public static final deprecated java.lang.String SORT_INDEX = "sort_index";
    field public static final deprecated java.lang.String STREAM_ITEM_ID = "stream_item_id";
    field public static final deprecated java.lang.String SYNC1 = "stream_item_photo_sync1";
    field public static final deprecated java.lang.String SYNC2 = "stream_item_photo_sync2";
    field public static final deprecated java.lang.String SYNC3 = "stream_item_photo_sync3";
    field public static final deprecated java.lang.String SYNC4 = "stream_item_photo_sync4";
  }

  public static final deprecated class ContactsContract.StreamItems implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemsColumns {
    field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/stream_item";
    field public static final deprecated android.net.Uri CONTENT_LIMIT_URI;
    field public static final deprecated android.net.Uri CONTENT_PHOTO_URI;
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/stream_item";
    field public static final deprecated android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String MAX_ITEMS = "max_items";
  }

  public static final deprecated class ContactsContract.StreamItems.StreamItemPhotos implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemPhotosColumns {
    field public static final deprecated java.lang.String CONTENT_DIRECTORY = "photo";
    field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/stream_item_photo";
    field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/stream_item_photo";
  }

  protected static abstract deprecated interface ContactsContract.StreamItemsColumns {
    field public static final deprecated java.lang.String ACCOUNT_NAME = "account_name";
    field public static final deprecated java.lang.String ACCOUNT_TYPE = "account_type";
    field public static final deprecated java.lang.String COMMENTS = "comments";
    field public static final deprecated java.lang.String CONTACT_ID = "contact_id";
    field public static final deprecated java.lang.String CONTACT_LOOKUP_KEY = "contact_lookup";
    field public static final deprecated java.lang.String DATA_SET = "data_set";
    field public static final deprecated java.lang.String RAW_CONTACT_ID = "raw_contact_id";
    field public static final deprecated java.lang.String RAW_CONTACT_SOURCE_ID = "raw_contact_source_id";
    field public static final deprecated java.lang.String RES_ICON = "icon";
    field public static final deprecated java.lang.String RES_LABEL = "label";
    field public static final deprecated java.lang.String RES_PACKAGE = "res_package";
    field public static final deprecated java.lang.String SYNC1 = "stream_item_sync1";
    field public static final deprecated java.lang.String SYNC2 = "stream_item_sync2";
    field public static final deprecated java.lang.String SYNC3 = "stream_item_sync3";
    field public static final deprecated java.lang.String SYNC4 = "stream_item_sync4";
    field public static final deprecated java.lang.String TEXT = "text";
    field public static final deprecated java.lang.String TIMESTAMP = "timestamp";
  }

  protected static abstract interface ContactsContract.SyncColumns implements android.provider.ContactsContract.BaseSyncColumns {
    field public static final java.lang.String ACCOUNT_NAME = "account_name";
    field public static final java.lang.String ACCOUNT_TYPE = "account_type";
    field public static final java.lang.String DIRTY = "dirty";
    field public static final java.lang.String SOURCE_ID = "sourceid";
    field public static final java.lang.String VERSION = "version";
  }

  public static final class ContactsContract.SyncState implements android.provider.SyncStateContract.Columns {
    method public static byte[] get(android.content.ContentProviderClient, android.accounts.Account) throws android.os.RemoteException;
    method public static android.util.Pair<android.net.Uri, byte[]> getWithUri(android.content.ContentProviderClient, android.accounts.Account) throws android.os.RemoteException;
    method public static android.content.ContentProviderOperation newSetOperation(android.accounts.Account, byte[]);
    method public static void set(android.content.ContentProviderClient, android.accounts.Account, byte[]) throws android.os.RemoteException;
    field public static final java.lang.String CONTENT_DIRECTORY = "syncstate";
    field public static final android.net.Uri CONTENT_URI;
  }

  public final class DocumentsContract {
    method public static android.net.Uri buildChildDocumentsUri(java.lang.String, java.lang.String);
    method public static android.net.Uri buildChildDocumentsUriUsingTree(android.net.Uri, java.lang.String);
    method public static android.net.Uri buildDocumentUri(java.lang.String, java.lang.String);
    method public static android.net.Uri buildDocumentUriUsingTree(android.net.Uri, java.lang.String);
    method public static android.net.Uri buildRecentDocumentsUri(java.lang.String, java.lang.String);
    method public static android.net.Uri buildRootUri(java.lang.String, java.lang.String);
    method public static android.net.Uri buildRootsUri(java.lang.String);
    method public static android.net.Uri buildSearchDocumentsUri(java.lang.String, java.lang.String, java.lang.String);
    method public static android.net.Uri buildTreeDocumentUri(java.lang.String, java.lang.String);
    method public static android.net.Uri createDocument(android.content.ContentResolver, android.net.Uri, java.lang.String, java.lang.String);
    method public static boolean deleteDocument(android.content.ContentResolver, android.net.Uri);
    method public static java.lang.String getDocumentId(android.net.Uri);
    method public static android.graphics.Bitmap getDocumentThumbnail(android.content.ContentResolver, android.net.Uri, android.graphics.Point, android.os.CancellationSignal);
    method public static java.lang.String getRootId(android.net.Uri);
    method public static java.lang.String getSearchDocumentsQuery(android.net.Uri);
    method public static java.lang.String getTreeDocumentId(android.net.Uri);
    method public static boolean isDocumentUri(android.content.Context, android.net.Uri);
    method public static android.net.Uri renameDocument(android.content.ContentResolver, android.net.Uri, java.lang.String);
    field public static final java.lang.String EXTRA_ERROR = "error";
    field public static final java.lang.String EXTRA_INFO = "info";
    field public static final java.lang.String EXTRA_LOADING = "loading";
    field public static final java.lang.String PROVIDER_INTERFACE = "android.content.action.DOCUMENTS_PROVIDER";
  }

  public static final class DocumentsContract.Document {
    field public static final java.lang.String COLUMN_DISPLAY_NAME = "_display_name";
    field public static final java.lang.String COLUMN_DOCUMENT_ID = "document_id";
    field public static final java.lang.String COLUMN_FLAGS = "flags";
    field public static final java.lang.String COLUMN_ICON = "icon";
    field public static final java.lang.String COLUMN_LAST_MODIFIED = "last_modified";
    field public static final java.lang.String COLUMN_MIME_TYPE = "mime_type";
    field public static final java.lang.String COLUMN_SIZE = "_size";
    field public static final java.lang.String COLUMN_SUMMARY = "summary";
    field public static final int FLAG_DIR_PREFERS_GRID = 16; // 0x10
    field public static final int FLAG_DIR_PREFERS_LAST_MODIFIED = 32; // 0x20
    field public static final int FLAG_DIR_SUPPORTS_CREATE = 8; // 0x8
    field public static final int FLAG_SUPPORTS_DELETE = 4; // 0x4
    field public static final int FLAG_SUPPORTS_RENAME = 64; // 0x40
    field public static final int FLAG_SUPPORTS_THUMBNAIL = 1; // 0x1
    field public static final int FLAG_SUPPORTS_WRITE = 2; // 0x2
    field public static final java.lang.String MIME_TYPE_DIR = "vnd.android.document/directory";
  }

  public static final class DocumentsContract.Root {
    field public static final java.lang.String COLUMN_AVAILABLE_BYTES = "available_bytes";
    field public static final java.lang.String COLUMN_DOCUMENT_ID = "document_id";
    field public static final java.lang.String COLUMN_FLAGS = "flags";
    field public static final java.lang.String COLUMN_ICON = "icon";
    field public static final java.lang.String COLUMN_MIME_TYPES = "mime_types";
    field public static final java.lang.String COLUMN_ROOT_ID = "root_id";
    field public static final java.lang.String COLUMN_SUMMARY = "summary";
    field public static final java.lang.String COLUMN_TITLE = "title";
    field public static final int FLAG_LOCAL_ONLY = 2; // 0x2
    field public static final int FLAG_SUPPORTS_CREATE = 1; // 0x1
    field public static final int FLAG_SUPPORTS_IS_CHILD = 16; // 0x10
    field public static final int FLAG_SUPPORTS_RECENTS = 4; // 0x4
    field public static final int FLAG_SUPPORTS_SEARCH = 8; // 0x8
  }

  public abstract class DocumentsProvider extends android.content.ContentProvider {
    ctor public DocumentsProvider();
    method public java.lang.String createDocument(java.lang.String, java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
    method public final int delete(android.net.Uri, java.lang.String, java.lang.String[]);
    method public void deleteDocument(java.lang.String) throws java.io.FileNotFoundException;
    method public java.lang.String getDocumentType(java.lang.String) throws java.io.FileNotFoundException;
    method public final java.lang.String getType(android.net.Uri);
    method public final android.net.Uri insert(android.net.Uri, android.content.ContentValues);
    method public boolean isChildDocument(java.lang.String, java.lang.String);
    method public final android.content.res.AssetFileDescriptor openAssetFile(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public final android.content.res.AssetFileDescriptor openAssetFile(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public abstract android.os.ParcelFileDescriptor openDocument(java.lang.String, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public android.content.res.AssetFileDescriptor openDocumentThumbnail(java.lang.String, android.graphics.Point, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public final android.os.ParcelFileDescriptor openFile(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
    method public final android.os.ParcelFileDescriptor openFile(android.net.Uri, java.lang.String, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public final android.content.res.AssetFileDescriptor openTypedAssetFile(android.net.Uri, java.lang.String, android.os.Bundle) throws java.io.FileNotFoundException;
    method public final android.content.res.AssetFileDescriptor openTypedAssetFile(android.net.Uri, java.lang.String, android.os.Bundle, android.os.CancellationSignal) throws java.io.FileNotFoundException;
    method public final android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public abstract android.database.Cursor queryChildDocuments(java.lang.String, java.lang.String[], java.lang.String) throws java.io.FileNotFoundException;
    method public abstract android.database.Cursor queryDocument(java.lang.String, java.lang.String[]) throws java.io.FileNotFoundException;
    method public android.database.Cursor queryRecentDocuments(java.lang.String, java.lang.String[]) throws java.io.FileNotFoundException;
    method public abstract android.database.Cursor queryRoots(java.lang.String[]) throws java.io.FileNotFoundException;
    method public android.database.Cursor querySearchDocuments(java.lang.String, java.lang.String, java.lang.String[]) throws java.io.FileNotFoundException;
    method public java.lang.String renameDocument(java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
    method public final void revokeDocumentPermission(java.lang.String);
    method public final int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
  }

  public final deprecated class LiveFolders implements android.provider.BaseColumns {
    field public static final java.lang.String ACTION_CREATE_LIVE_FOLDER = "android.intent.action.CREATE_LIVE_FOLDER";
    field public static final java.lang.String DESCRIPTION = "description";
    field public static final int DISPLAY_MODE_GRID = 1; // 0x1
    field public static final int DISPLAY_MODE_LIST = 2; // 0x2
    field public static final java.lang.String EXTRA_LIVE_FOLDER_BASE_INTENT = "android.intent.extra.livefolder.BASE_INTENT";
    field public static final java.lang.String EXTRA_LIVE_FOLDER_DISPLAY_MODE = "android.intent.extra.livefolder.DISPLAY_MODE";
    field public static final java.lang.String EXTRA_LIVE_FOLDER_ICON = "android.intent.extra.livefolder.ICON";
    field public static final java.lang.String EXTRA_LIVE_FOLDER_NAME = "android.intent.extra.livefolder.NAME";
    field public static final java.lang.String ICON_BITMAP = "icon_bitmap";
    field public static final java.lang.String ICON_PACKAGE = "icon_package";
    field public static final java.lang.String ICON_RESOURCE = "icon_resource";
    field public static final java.lang.String INTENT = "intent";
    field public static final java.lang.String NAME = "name";
  }

  public final class MediaStore {
    ctor public MediaStore();
    method public static android.net.Uri getMediaScannerUri();
    method public static java.lang.String getVersion(android.content.Context);
    field public static final java.lang.String ACTION_IMAGE_CAPTURE = "android.media.action.IMAGE_CAPTURE";
    field public static final java.lang.String ACTION_IMAGE_CAPTURE_SECURE = "android.media.action.IMAGE_CAPTURE_SECURE";
    field public static final java.lang.String ACTION_STILL_IMAGE_CAMERA_COOLDOWN = "android.media.action.STILL_IMAGE_CAMERA_COOLDOWN";
    field public static final java.lang.String ACTION_STILL_IMAGE_CAMERA_PREWARM = "android.media.action.STILL_IMAGE_CAMERA_PREWARM";
    field public static final java.lang.String ACTION_VIDEO_CAPTURE = "android.media.action.VIDEO_CAPTURE";
    field public static final java.lang.String AUTHORITY = "media";
    field public static final java.lang.String EXTRA_DURATION_LIMIT = "android.intent.extra.durationLimit";
    field public static final java.lang.String EXTRA_FINISH_ON_COMPLETION = "android.intent.extra.finishOnCompletion";
    field public static final java.lang.String EXTRA_FULL_SCREEN = "android.intent.extra.fullScreen";
    field public static final java.lang.String EXTRA_MEDIA_ALBUM = "android.intent.extra.album";
    field public static final java.lang.String EXTRA_MEDIA_ARTIST = "android.intent.extra.artist";
    field public static final java.lang.String EXTRA_MEDIA_FOCUS = "android.intent.extra.focus";
    field public static final java.lang.String EXTRA_MEDIA_GENRE = "android.intent.extra.genre";
    field public static final java.lang.String EXTRA_MEDIA_PLAYLIST = "android.intent.extra.playlist";
    field public static final java.lang.String EXTRA_MEDIA_RADIO_CHANNEL = "android.intent.extra.radio_channel";
    field public static final java.lang.String EXTRA_MEDIA_TITLE = "android.intent.extra.title";
    field public static final java.lang.String EXTRA_OUTPUT = "output";
    field public static final java.lang.String EXTRA_SCREEN_ORIENTATION = "android.intent.extra.screenOrientation";
    field public static final java.lang.String EXTRA_SHOW_ACTION_ICONS = "android.intent.extra.showActionIcons";
    field public static final java.lang.String EXTRA_SIZE_LIMIT = "android.intent.extra.sizeLimit";
    field public static final java.lang.String EXTRA_VIDEO_QUALITY = "android.intent.extra.videoQuality";
    field public static final java.lang.String INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH = "android.media.action.MEDIA_PLAY_FROM_SEARCH";
    field public static final java.lang.String INTENT_ACTION_MEDIA_SEARCH = "android.intent.action.MEDIA_SEARCH";
    field public static final deprecated java.lang.String INTENT_ACTION_MUSIC_PLAYER = "android.intent.action.MUSIC_PLAYER";
    field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA = "android.media.action.STILL_IMAGE_CAMERA";
    field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE = "android.media.action.STILL_IMAGE_CAMERA_SECURE";
    field public static final java.lang.String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH = "android.media.action.TEXT_OPEN_FROM_SEARCH";
    field public static final java.lang.String INTENT_ACTION_VIDEO_CAMERA = "android.media.action.VIDEO_CAMERA";
    field public static final java.lang.String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH = "android.media.action.VIDEO_PLAY_FROM_SEARCH";
    field public static final java.lang.String MEDIA_IGNORE_FILENAME = ".nomedia";
    field public static final java.lang.String MEDIA_SCANNER_VOLUME = "volume";
    field public static final java.lang.String UNKNOWN_STRING = "<unknown>";
  }

  public static final class MediaStore.Audio {
    ctor public MediaStore.Audio();
    method public static java.lang.String keyFor(java.lang.String);
  }

  public static abstract interface MediaStore.Audio.AlbumColumns {
    field public static final java.lang.String ALBUM = "album";
    field public static final java.lang.String ALBUM_ART = "album_art";
    field public static final java.lang.String ALBUM_ID = "album_id";
    field public static final java.lang.String ALBUM_KEY = "album_key";
    field public static final java.lang.String ARTIST = "artist";
    field public static final java.lang.String FIRST_YEAR = "minyear";
    field public static final java.lang.String LAST_YEAR = "maxyear";
    field public static final java.lang.String NUMBER_OF_SONGS = "numsongs";
    field public static final java.lang.String NUMBER_OF_SONGS_FOR_ARTIST = "numsongs_by_artist";
  }

  public static final class MediaStore.Audio.Albums implements android.provider.BaseColumns android.provider.MediaStore.Audio.AlbumColumns {
    ctor public MediaStore.Audio.Albums();
    method public static android.net.Uri getContentUri(java.lang.String);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/albums";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "album_key";
    field public static final java.lang.String ENTRY_CONTENT_TYPE = "vnd.android.cursor.item/album";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
  }

  public static abstract interface MediaStore.Audio.ArtistColumns {
    field public static final java.lang.String ARTIST = "artist";
    field public static final java.lang.String ARTIST_KEY = "artist_key";
    field public static final java.lang.String NUMBER_OF_ALBUMS = "number_of_albums";
    field public static final java.lang.String NUMBER_OF_TRACKS = "number_of_tracks";
  }

  public static final class MediaStore.Audio.Artists implements android.provider.BaseColumns android.provider.MediaStore.Audio.ArtistColumns {
    ctor public MediaStore.Audio.Artists();
    method public static android.net.Uri getContentUri(java.lang.String);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/artists";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "artist_key";
    field public static final java.lang.String ENTRY_CONTENT_TYPE = "vnd.android.cursor.item/artist";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
  }

  public static final class MediaStore.Audio.Artists.Albums implements android.provider.MediaStore.Audio.AlbumColumns {
    ctor public MediaStore.Audio.Artists.Albums();
    method public static final android.net.Uri getContentUri(java.lang.String, long);
  }

  public static abstract interface MediaStore.Audio.AudioColumns implements android.provider.MediaStore.MediaColumns {
    field public static final java.lang.String ALBUM = "album";
    field public static final java.lang.String ALBUM_ID = "album_id";
    field public static final java.lang.String ALBUM_KEY = "album_key";
    field public static final java.lang.String ARTIST = "artist";
    field public static final java.lang.String ARTIST_ID = "artist_id";
    field public static final java.lang.String ARTIST_KEY = "artist_key";
    field public static final java.lang.String BOOKMARK = "bookmark";
    field public static final java.lang.String COMPOSER = "composer";
    field public static final java.lang.String DURATION = "duration";
    field public static final java.lang.String IS_ALARM = "is_alarm";
    field public static final java.lang.String IS_MUSIC = "is_music";
    field public static final java.lang.String IS_NOTIFICATION = "is_notification";
    field public static final java.lang.String IS_PODCAST = "is_podcast";
    field public static final java.lang.String IS_RINGTONE = "is_ringtone";
    field public static final java.lang.String TITLE_KEY = "title_key";
    field public static final java.lang.String TRACK = "track";
    field public static final java.lang.String YEAR = "year";
  }

  public static final class MediaStore.Audio.Genres implements android.provider.BaseColumns android.provider.MediaStore.Audio.GenresColumns {
    ctor public MediaStore.Audio.Genres();
    method public static android.net.Uri getContentUri(java.lang.String);
    method public static android.net.Uri getContentUriForAudioId(java.lang.String, int);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/genre";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "name";
    field public static final java.lang.String ENTRY_CONTENT_TYPE = "vnd.android.cursor.item/genre";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
  }

  public static final class MediaStore.Audio.Genres.Members implements android.provider.MediaStore.Audio.AudioColumns {
    ctor public MediaStore.Audio.Genres.Members();
    method public static final android.net.Uri getContentUri(java.lang.String, long);
    field public static final java.lang.String AUDIO_ID = "audio_id";
    field public static final java.lang.String CONTENT_DIRECTORY = "members";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "title_key";
    field public static final java.lang.String GENRE_ID = "genre_id";
  }

  public static abstract interface MediaStore.Audio.GenresColumns {
    field public static final java.lang.String NAME = "name";
  }

  public static final class MediaStore.Audio.Media implements android.provider.MediaStore.Audio.AudioColumns {
    ctor public MediaStore.Audio.Media();
    method public static android.net.Uri getContentUri(java.lang.String);
    method public static android.net.Uri getContentUriForPath(java.lang.String);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/audio";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "title_key";
    field public static final java.lang.String ENTRY_CONTENT_TYPE = "vnd.android.cursor.item/audio";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final java.lang.String EXTRA_MAX_BYTES = "android.provider.MediaStore.extra.MAX_BYTES";
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
    field public static final java.lang.String RECORD_SOUND_ACTION = "android.provider.MediaStore.RECORD_SOUND";
  }

  public static final class MediaStore.Audio.Playlists implements android.provider.BaseColumns android.provider.MediaStore.Audio.PlaylistsColumns {
    ctor public MediaStore.Audio.Playlists();
    method public static android.net.Uri getContentUri(java.lang.String);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/playlist";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "name";
    field public static final java.lang.String ENTRY_CONTENT_TYPE = "vnd.android.cursor.item/playlist";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
  }

  public static final class MediaStore.Audio.Playlists.Members implements android.provider.MediaStore.Audio.AudioColumns {
    ctor public MediaStore.Audio.Playlists.Members();
    method public static final android.net.Uri getContentUri(java.lang.String, long);
    method public static final boolean moveItem(android.content.ContentResolver, long, int, int);
    field public static final java.lang.String AUDIO_ID = "audio_id";
    field public static final java.lang.String CONTENT_DIRECTORY = "members";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "play_order";
    field public static final java.lang.String PLAYLIST_ID = "playlist_id";
    field public static final java.lang.String PLAY_ORDER = "play_order";
    field public static final java.lang.String _ID = "_id";
  }

  public static abstract interface MediaStore.Audio.PlaylistsColumns {
    field public static final java.lang.String DATA = "_data";
    field public static final java.lang.String DATE_ADDED = "date_added";
    field public static final java.lang.String DATE_MODIFIED = "date_modified";
    field public static final java.lang.String NAME = "name";
  }

  public static final class MediaStore.Audio.Radio {
    field public static final java.lang.String ENTRY_CONTENT_TYPE = "vnd.android.cursor.item/radio";
  }

  public static final class MediaStore.Files {
    ctor public MediaStore.Files();
    method public static android.net.Uri getContentUri(java.lang.String);
    method public static final android.net.Uri getContentUri(java.lang.String, long);
  }

  public static abstract interface MediaStore.Files.FileColumns implements android.provider.MediaStore.MediaColumns {
    field public static final java.lang.String MEDIA_TYPE = "media_type";
    field public static final int MEDIA_TYPE_AUDIO = 2; // 0x2
    field public static final int MEDIA_TYPE_IMAGE = 1; // 0x1
    field public static final int MEDIA_TYPE_NONE = 0; // 0x0
    field public static final int MEDIA_TYPE_PLAYLIST = 4; // 0x4
    field public static final int MEDIA_TYPE_VIDEO = 3; // 0x3
    field public static final java.lang.String MIME_TYPE = "mime_type";
    field public static final java.lang.String PARENT = "parent";
    field public static final java.lang.String TITLE = "title";
  }

  public static final class MediaStore.Images {
    ctor public MediaStore.Images();
  }

  public static abstract interface MediaStore.Images.ImageColumns implements android.provider.MediaStore.MediaColumns {
    field public static final java.lang.String BUCKET_DISPLAY_NAME = "bucket_display_name";
    field public static final java.lang.String BUCKET_ID = "bucket_id";
    field public static final java.lang.String DATE_TAKEN = "datetaken";
    field public static final java.lang.String DESCRIPTION = "description";
    field public static final java.lang.String IS_PRIVATE = "isprivate";
    field public static final java.lang.String LATITUDE = "latitude";
    field public static final java.lang.String LONGITUDE = "longitude";
    field public static final java.lang.String MINI_THUMB_MAGIC = "mini_thumb_magic";
    field public static final java.lang.String ORIENTATION = "orientation";
    field public static final java.lang.String PICASA_ID = "picasa_id";
  }

  public static final class MediaStore.Images.Media implements android.provider.MediaStore.Images.ImageColumns {
    ctor public MediaStore.Images.Media();
    method public static final android.graphics.Bitmap getBitmap(android.content.ContentResolver, android.net.Uri) throws java.io.FileNotFoundException, java.io.IOException;
    method public static android.net.Uri getContentUri(java.lang.String);
    method public static final java.lang.String insertImage(android.content.ContentResolver, java.lang.String, java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
    method public static final java.lang.String insertImage(android.content.ContentResolver, android.graphics.Bitmap, java.lang.String, java.lang.String);
    method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[]);
    method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String);
    method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/image";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "bucket_display_name";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
  }

  public static class MediaStore.Images.Thumbnails implements android.provider.BaseColumns {
    ctor public MediaStore.Images.Thumbnails();
    method public static void cancelThumbnailRequest(android.content.ContentResolver, long);
    method public static void cancelThumbnailRequest(android.content.ContentResolver, long, long);
    method public static android.net.Uri getContentUri(java.lang.String);
    method public static android.graphics.Bitmap getThumbnail(android.content.ContentResolver, long, int, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap getThumbnail(android.content.ContentResolver, long, long, int, android.graphics.BitmapFactory.Options);
    method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[]);
    method public static final android.database.Cursor queryMiniThumbnail(android.content.ContentResolver, long, int, java.lang.String[]);
    method public static final android.database.Cursor queryMiniThumbnails(android.content.ContentResolver, android.net.Uri, int, java.lang.String[]);
    field public static final java.lang.String DATA = "_data";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "image_id ASC";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final int FULL_SCREEN_KIND = 2; // 0x2
    field public static final java.lang.String HEIGHT = "height";
    field public static final java.lang.String IMAGE_ID = "image_id";
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
    field public static final java.lang.String KIND = "kind";
    field public static final int MICRO_KIND = 3; // 0x3
    field public static final int MINI_KIND = 1; // 0x1
    field public static final java.lang.String THUMB_DATA = "thumb_data";
    field public static final java.lang.String WIDTH = "width";
  }

  public static abstract interface MediaStore.MediaColumns implements android.provider.BaseColumns {
    field public static final java.lang.String DATA = "_data";
    field public static final java.lang.String DATE_ADDED = "date_added";
    field public static final java.lang.String DATE_MODIFIED = "date_modified";
    field public static final java.lang.String DISPLAY_NAME = "_display_name";
    field public static final java.lang.String HEIGHT = "height";
    field public static final java.lang.String MIME_TYPE = "mime_type";
    field public static final java.lang.String SIZE = "_size";
    field public static final java.lang.String TITLE = "title";
    field public static final java.lang.String WIDTH = "width";
  }

  public static final class MediaStore.Video {
    ctor public MediaStore.Video();
    method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[]);
    field public static final java.lang.String DEFAULT_SORT_ORDER = "_display_name";
  }

  public static final class MediaStore.Video.Media implements android.provider.MediaStore.Video.VideoColumns {
    ctor public MediaStore.Video.Media();
    method public static android.net.Uri getContentUri(java.lang.String);
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/video";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "title";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
  }

  public static class MediaStore.Video.Thumbnails implements android.provider.BaseColumns {
    ctor public MediaStore.Video.Thumbnails();
    method public static void cancelThumbnailRequest(android.content.ContentResolver, long);
    method public static void cancelThumbnailRequest(android.content.ContentResolver, long, long);
    method public static android.net.Uri getContentUri(java.lang.String);
    method public static android.graphics.Bitmap getThumbnail(android.content.ContentResolver, long, int, android.graphics.BitmapFactory.Options);
    method public static android.graphics.Bitmap getThumbnail(android.content.ContentResolver, long, long, int, android.graphics.BitmapFactory.Options);
    field public static final java.lang.String DATA = "_data";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "video_id ASC";
    field public static final android.net.Uri EXTERNAL_CONTENT_URI;
    field public static final int FULL_SCREEN_KIND = 2; // 0x2
    field public static final java.lang.String HEIGHT = "height";
    field public static final android.net.Uri INTERNAL_CONTENT_URI;
    field public static final java.lang.String KIND = "kind";
    field public static final int MICRO_KIND = 3; // 0x3
    field public static final int MINI_KIND = 1; // 0x1
    field public static final java.lang.String VIDEO_ID = "video_id";
    field public static final java.lang.String WIDTH = "width";
  }

  public static abstract interface MediaStore.Video.VideoColumns implements android.provider.MediaStore.MediaColumns {
    field public static final java.lang.String ALBUM = "album";
    field public static final java.lang.String ARTIST = "artist";
    field public static final java.lang.String BOOKMARK = "bookmark";
    field public static final java.lang.String BUCKET_DISPLAY_NAME = "bucket_display_name";
    field public static final java.lang.String BUCKET_ID = "bucket_id";
    field public static final java.lang.String CATEGORY = "category";
    field public static final java.lang.String DATE_TAKEN = "datetaken";
    field public static final java.lang.String DESCRIPTION = "description";
    field public static final java.lang.String DURATION = "duration";
    field public static final java.lang.String IS_PRIVATE = "isprivate";
    field public static final java.lang.String LANGUAGE = "language";
    field public static final java.lang.String LATITUDE = "latitude";
    field public static final java.lang.String LONGITUDE = "longitude";
    field public static final java.lang.String MINI_THUMB_MAGIC = "mini_thumb_magic";
    field public static final java.lang.String RESOLUTION = "resolution";
    field public static final java.lang.String TAGS = "tags";
  }

  public abstract interface OpenableColumns {
    field public static final java.lang.String DISPLAY_NAME = "_display_name";
    field public static final java.lang.String SIZE = "_size";
  }

  public class SearchRecentSuggestions {
    ctor public SearchRecentSuggestions(android.content.Context, java.lang.String, int);
    method public void clearHistory();
    method public void saveRecentQuery(java.lang.String, java.lang.String);
    method protected void truncateHistory(android.content.ContentResolver, int);
    field public static final java.lang.String[] QUERIES_PROJECTION_1LINE;
    field public static final java.lang.String[] QUERIES_PROJECTION_2LINE;
    field public static final int QUERIES_PROJECTION_DATE_INDEX = 1; // 0x1
    field public static final int QUERIES_PROJECTION_DISPLAY1_INDEX = 3; // 0x3
    field public static final int QUERIES_PROJECTION_DISPLAY2_INDEX = 4; // 0x4
    field public static final int QUERIES_PROJECTION_QUERY_INDEX = 2; // 0x2
  }

  public final class Settings {
    ctor public Settings();
    field public static final java.lang.String ACTION_ACCESSIBILITY_SETTINGS = "android.settings.ACCESSIBILITY_SETTINGS";
    field public static final java.lang.String ACTION_ADD_ACCOUNT = "android.settings.ADD_ACCOUNT_SETTINGS";
    field public static final java.lang.String ACTION_AIRPLANE_MODE_SETTINGS = "android.settings.AIRPLANE_MODE_SETTINGS";
    field public static final java.lang.String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS";
    field public static final java.lang.String ACTION_APPLICATION_DETAILS_SETTINGS = "android.settings.APPLICATION_DETAILS_SETTINGS";
    field public static final java.lang.String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = "android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
    field public static final java.lang.String ACTION_APPLICATION_SETTINGS = "android.settings.APPLICATION_SETTINGS";
    field public static final java.lang.String ACTION_BATTERY_SAVER_SETTINGS = "android.settings.BATTERY_SAVER_SETTINGS";
    field public static final java.lang.String ACTION_BLUETOOTH_SETTINGS = "android.settings.BLUETOOTH_SETTINGS";
    field public static final java.lang.String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS";
    field public static final java.lang.String ACTION_CAST_SETTINGS = "android.settings.CAST_SETTINGS";
    field public static final java.lang.String ACTION_DATA_ROAMING_SETTINGS = "android.settings.DATA_ROAMING_SETTINGS";
    field public static final java.lang.String ACTION_DATE_SETTINGS = "android.settings.DATE_SETTINGS";
    field public static final java.lang.String ACTION_DEVICE_INFO_SETTINGS = "android.settings.DEVICE_INFO_SETTINGS";
    field public static final java.lang.String ACTION_DISPLAY_SETTINGS = "android.settings.DISPLAY_SETTINGS";
    field public static final java.lang.String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS";
    field public static final java.lang.String ACTION_HOME_SETTINGS = "android.settings.HOME_SETTINGS";
    field public static final java.lang.String ACTION_INPUT_METHOD_SETTINGS = "android.settings.INPUT_METHOD_SETTINGS";
    field public static final java.lang.String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS";
    field public static final java.lang.String ACTION_INTERNAL_STORAGE_SETTINGS = "android.settings.INTERNAL_STORAGE_SETTINGS";
    field public static final java.lang.String ACTION_LOCALE_SETTINGS = "android.settings.LOCALE_SETTINGS";
    field public static final java.lang.String ACTION_LOCATION_SOURCE_SETTINGS = "android.settings.LOCATION_SOURCE_SETTINGS";
    field public static final java.lang.String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS";
    field public static final java.lang.String ACTION_MANAGE_APPLICATIONS_SETTINGS = "android.settings.MANAGE_APPLICATIONS_SETTINGS";
    field public static final java.lang.String ACTION_MEMORY_CARD_SETTINGS = "android.settings.MEMORY_CARD_SETTINGS";
    field public static final java.lang.String ACTION_NETWORK_OPERATOR_SETTINGS = "android.settings.NETWORK_OPERATOR_SETTINGS";
    field public static final java.lang.String ACTION_NFCSHARING_SETTINGS = "android.settings.NFCSHARING_SETTINGS";
    field public static final java.lang.String ACTION_NFC_PAYMENT_SETTINGS = "android.settings.NFC_PAYMENT_SETTINGS";
    field public static final java.lang.String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
    field public static final java.lang.String ACTION_NOTIFICATION_LISTENER_SETTINGS = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS";
    field public static final java.lang.String ACTION_PRINT_SETTINGS = "android.settings.ACTION_PRINT_SETTINGS";
    field public static final java.lang.String ACTION_PRIVACY_SETTINGS = "android.settings.PRIVACY_SETTINGS";
    field public static final java.lang.String ACTION_QUICK_LAUNCH_SETTINGS = "android.settings.QUICK_LAUNCH_SETTINGS";
    field public static final java.lang.String ACTION_SEARCH_SETTINGS = "android.search.action.SEARCH_SETTINGS";
    field public static final java.lang.String ACTION_SECURITY_SETTINGS = "android.settings.SECURITY_SETTINGS";
    field public static final java.lang.String ACTION_SETTINGS = "android.settings.SETTINGS";
    field public static final java.lang.String ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO";
    field public static final java.lang.String ACTION_SOUND_SETTINGS = "android.settings.SOUND_SETTINGS";
    field public static final java.lang.String ACTION_SYNC_SETTINGS = "android.settings.SYNC_SETTINGS";
    field public static final java.lang.String ACTION_USAGE_ACCESS_SETTINGS = "android.settings.USAGE_ACCESS_SETTINGS";
    field public static final java.lang.String ACTION_USER_DICTIONARY_SETTINGS = "android.settings.USER_DICTIONARY_SETTINGS";
    field public static final java.lang.String ACTION_VOICE_CONTROL_AIRPLANE_MODE = "android.settings.VOICE_CONTROL_AIRPLANE_MODE";
    field public static final java.lang.String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE = "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE";
    field public static final java.lang.String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE = "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE";
    field public static final java.lang.String ACTION_VOICE_INPUT_SETTINGS = "android.settings.VOICE_INPUT_SETTINGS";
    field public static final java.lang.String ACTION_WIFI_IP_SETTINGS = "android.settings.WIFI_IP_SETTINGS";
    field public static final java.lang.String ACTION_WIFI_SETTINGS = "android.settings.WIFI_SETTINGS";
    field public static final java.lang.String ACTION_WIRELESS_SETTINGS = "android.settings.WIRELESS_SETTINGS";
    field public static final java.lang.String AUTHORITY = "settings";
    field public static final java.lang.String EXTRA_ACCOUNT_TYPES = "account_types";
    field public static final java.lang.String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
    field public static final java.lang.String EXTRA_AUTHORITIES = "authorities";
    field public static final java.lang.String EXTRA_BATTERY_SAVER_MODE_ENABLED = "android.settings.extra.battery_saver_mode_enabled";
    field public static final java.lang.String EXTRA_DO_NOT_DISTURB_MODE_ENABLED = "android.settings.extra.do_not_disturb_mode_enabled";
    field public static final java.lang.String EXTRA_DO_NOT_DISTURB_MODE_MINUTES = "android.settings.extra.do_not_disturb_mode_minutes";
    field public static final java.lang.String EXTRA_INPUT_METHOD_ID = "input_method_id";
  }

  public static final class Settings.Global extends android.provider.Settings.NameValueTable {
    ctor public Settings.Global();
    method public static float getFloat(android.content.ContentResolver, java.lang.String, float);
    method public static float getFloat(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static int getInt(android.content.ContentResolver, java.lang.String, int);
    method public static int getInt(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static long getLong(android.content.ContentResolver, java.lang.String, long);
    method public static long getLong(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static java.lang.String getString(android.content.ContentResolver, java.lang.String);
    method public static android.net.Uri getUriFor(java.lang.String);
    method public static boolean putFloat(android.content.ContentResolver, java.lang.String, float);
    method public static boolean putInt(android.content.ContentResolver, java.lang.String, int);
    method public static boolean putLong(android.content.ContentResolver, java.lang.String, long);
    method public static boolean putString(android.content.ContentResolver, java.lang.String, java.lang.String);
    field public static final java.lang.String ADB_ENABLED = "adb_enabled";
    field public static final java.lang.String AIRPLANE_MODE_ON = "airplane_mode_on";
    field public static final java.lang.String AIRPLANE_MODE_RADIOS = "airplane_mode_radios";
    field public static final java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities";
    field public static final java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale";
    field public static final java.lang.String AUTO_TIME = "auto_time";
    field public static final java.lang.String AUTO_TIME_ZONE = "auto_time_zone";
    field public static final java.lang.String BLUETOOTH_ON = "bluetooth_on";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DATA_ROAMING = "data_roaming";
    field public static final java.lang.String DEBUG_APP = "debug_app";
    field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
    field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned";
    field public static final java.lang.String HTTP_PROXY = "http_proxy";
    field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
    field public static final java.lang.String MODE_RINGER = "mode_ringer";
    field public static final java.lang.String NETWORK_PREFERENCE = "network_preference";
    field public static final java.lang.String RADIO_BLUETOOTH = "bluetooth";
    field public static final java.lang.String RADIO_CELL = "cell";
    field public static final java.lang.String RADIO_NFC = "nfc";
    field public static final java.lang.String RADIO_WIFI = "wifi";
    field public static final java.lang.String SHOW_PROCESSES = "show_processes";
    field public static final java.lang.String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in";
    field public static final java.lang.String SYS_PROP_SETTING_VERSION = "sys.settings_global_version";
    field public static final java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale";
    field public static final java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
    field public static final java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
    field public static final java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger";
    field public static final java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
    field public static final java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms";
    field public static final java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on";
    field public static final java.lang.String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = "wifi_networks_available_repeat_delay";
    field public static final java.lang.String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
    field public static final java.lang.String WIFI_ON = "wifi_on";
    field public static final java.lang.String WIFI_SLEEP_POLICY = "wifi_sleep_policy";
    field public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; // 0x0
    field public static final int WIFI_SLEEP_POLICY_NEVER = 2; // 0x2
    field public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; // 0x1
    field public static final java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
    field public static final java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale";
  }

  public static class Settings.NameValueTable implements android.provider.BaseColumns {
    ctor public Settings.NameValueTable();
    method public static android.net.Uri getUriFor(android.net.Uri, java.lang.String);
    method protected static boolean putString(android.content.ContentResolver, android.net.Uri, java.lang.String, java.lang.String);
    field public static final java.lang.String NAME = "name";
    field public static final java.lang.String VALUE = "value";
  }

  public static final class Settings.Secure extends android.provider.Settings.NameValueTable {
    ctor public Settings.Secure();
    method public static float getFloat(android.content.ContentResolver, java.lang.String, float);
    method public static float getFloat(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static int getInt(android.content.ContentResolver, java.lang.String, int);
    method public static int getInt(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static long getLong(android.content.ContentResolver, java.lang.String, long);
    method public static long getLong(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static java.lang.String getString(android.content.ContentResolver, java.lang.String);
    method public static android.net.Uri getUriFor(java.lang.String);
    method public static final deprecated boolean isLocationProviderEnabled(android.content.ContentResolver, java.lang.String);
    method public static boolean putFloat(android.content.ContentResolver, java.lang.String, float);
    method public static boolean putInt(android.content.ContentResolver, java.lang.String, int);
    method public static boolean putLong(android.content.ContentResolver, java.lang.String, long);
    method public static boolean putString(android.content.ContentResolver, java.lang.String, java.lang.String);
    method public static final deprecated void setLocationProviderEnabled(android.content.ContentResolver, java.lang.String, boolean);
    field public static final java.lang.String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = "accessibility_display_inversion_enabled";
    field public static final java.lang.String ACCESSIBILITY_ENABLED = "accessibility_enabled";
    field public static final java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
    field public static final deprecated java.lang.String ADB_ENABLED = "adb_enabled";
    field public static final java.lang.String ALLOWED_GEOLOCATION_ORIGINS = "allowed_geolocation_origins";
    field public static final java.lang.String ALLOW_MOCK_LOCATION = "mock_location";
    field public static final java.lang.String ANDROID_ID = "android_id";
    field public static final deprecated java.lang.String BACKGROUND_DATA = "background_data";
    field public static final deprecated java.lang.String BLUETOOTH_ON = "bluetooth_on";
    field public static final android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DATA_ROAMING = "data_roaming";
    field public static final java.lang.String DEFAULT_INPUT_METHOD = "default_input_method";
    field public static final deprecated java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
    field public static final deprecated java.lang.String DEVICE_PROVISIONED = "device_provisioned";
    field public static final java.lang.String ENABLED_ACCESSIBILITY_SERVICES = "enabled_accessibility_services";
    field public static final java.lang.String ENABLED_INPUT_METHODS = "enabled_input_methods";
    field public static final deprecated java.lang.String HTTP_PROXY = "http_proxy";
    field public static final java.lang.String INPUT_METHOD_SELECTOR_VISIBILITY = "input_method_selector_visibility";
    field public static final java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
    field public static final java.lang.String LOCATION_MODE = "location_mode";
    field public static final int LOCATION_MODE_BATTERY_SAVING = 2; // 0x2
    field public static final int LOCATION_MODE_HIGH_ACCURACY = 3; // 0x3
    field public static final int LOCATION_MODE_OFF = 0; // 0x0
    field public static final int LOCATION_MODE_SENSORS_ONLY = 1; // 0x1
    field public static final deprecated java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
    field public static final deprecated java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
    field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
    field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
    field public static final deprecated java.lang.String LOGGING_ID = "logging_id";
    field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference";
    field public static final java.lang.String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
    field public static final java.lang.String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
    field public static final java.lang.String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
    field public static final java.lang.String SELECTED_INPUT_METHOD_SUBTYPE = "selected_input_method_subtype";
    field public static final java.lang.String SETTINGS_CLASSNAME = "settings_classname";
    field public static final java.lang.String SKIP_FIRST_USE_HINTS = "skip_first_use_hints";
    field public static final java.lang.String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
    field public static final java.lang.String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled";
    field public static final deprecated java.lang.String TTS_DEFAULT_COUNTRY = "tts_default_country";
    field public static final deprecated java.lang.String TTS_DEFAULT_LANG = "tts_default_lang";
    field public static final java.lang.String TTS_DEFAULT_PITCH = "tts_default_pitch";
    field public static final java.lang.String TTS_DEFAULT_RATE = "tts_default_rate";
    field public static final java.lang.String TTS_DEFAULT_SYNTH = "tts_default_synth";
    field public static final deprecated java.lang.String TTS_DEFAULT_VARIANT = "tts_default_variant";
    field public static final java.lang.String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
    field public static final deprecated java.lang.String TTS_USE_DEFAULTS = "tts_use_defaults";
    field public static final deprecated java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
    field public static final deprecated java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
    field public static final deprecated java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
    field public static final deprecated java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms";
    field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on";
    field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = "wifi_networks_available_repeat_delay";
    field public static final deprecated java.lang.String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
    field public static final deprecated java.lang.String WIFI_ON = "wifi_on";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = "wifi_watchdog_acceptable_packet_loss_percentage";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = "wifi_watchdog_background_check_delay_ms";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = "wifi_watchdog_background_check_enabled";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = "wifi_watchdog_background_check_timeout_ms";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = "wifi_watchdog_initial_ignored_ping_count";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
  }

  public static class Settings.SettingNotFoundException extends android.util.AndroidException {
    ctor public Settings.SettingNotFoundException(java.lang.String);
  }

  public static final class Settings.System extends android.provider.Settings.NameValueTable {
    ctor public Settings.System();
    method public static void getConfiguration(android.content.ContentResolver, android.content.res.Configuration);
    method public static float getFloat(android.content.ContentResolver, java.lang.String, float);
    method public static float getFloat(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static int getInt(android.content.ContentResolver, java.lang.String, int);
    method public static int getInt(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static long getLong(android.content.ContentResolver, java.lang.String, long);
    method public static long getLong(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
    method public static deprecated boolean getShowGTalkServiceStatus(android.content.ContentResolver);
    method public static java.lang.String getString(android.content.ContentResolver, java.lang.String);
    method public static android.net.Uri getUriFor(java.lang.String);
    method public static boolean putConfiguration(android.content.ContentResolver, android.content.res.Configuration);
    method public static boolean putFloat(android.content.ContentResolver, java.lang.String, float);
    method public static boolean putInt(android.content.ContentResolver, java.lang.String, int);
    method public static boolean putLong(android.content.ContentResolver, java.lang.String, long);
    method public static boolean putString(android.content.ContentResolver, java.lang.String, java.lang.String);
    method public static deprecated void setShowGTalkServiceStatus(android.content.ContentResolver, boolean);
    field public static final java.lang.String ACCELEROMETER_ROTATION = "accelerometer_rotation";
    field public static final deprecated java.lang.String ADB_ENABLED = "adb_enabled";
    field public static final deprecated java.lang.String AIRPLANE_MODE_ON = "airplane_mode_on";
    field public static final deprecated java.lang.String AIRPLANE_MODE_RADIOS = "airplane_mode_radios";
    field public static final java.lang.String ALARM_ALERT = "alarm_alert";
    field public static final deprecated java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities";
    field public static final deprecated java.lang.String ANDROID_ID = "android_id";
    field public static final deprecated java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale";
    field public static final deprecated java.lang.String AUTO_TIME = "auto_time";
    field public static final deprecated java.lang.String AUTO_TIME_ZONE = "auto_time_zone";
    field public static final java.lang.String BLUETOOTH_DISCOVERABILITY = "bluetooth_discoverability";
    field public static final java.lang.String BLUETOOTH_DISCOVERABILITY_TIMEOUT = "bluetooth_discoverability_timeout";
    field public static final deprecated java.lang.String BLUETOOTH_ON = "bluetooth_on";
    field public static final android.net.Uri CONTENT_URI;
    field public static final deprecated java.lang.String DATA_ROAMING = "data_roaming";
    field public static final java.lang.String DATE_FORMAT = "date_format";
    field public static final deprecated java.lang.String DEBUG_APP = "debug_app";
    field public static final android.net.Uri DEFAULT_ALARM_ALERT_URI;
    field public static final android.net.Uri DEFAULT_NOTIFICATION_URI;
    field public static final android.net.Uri DEFAULT_RINGTONE_URI;
    field public static final deprecated java.lang.String DEVICE_PROVISIONED = "device_provisioned";
    field public static final deprecated java.lang.String DIM_SCREEN = "dim_screen";
    field public static final java.lang.String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
    field public static final java.lang.String END_BUTTON_BEHAVIOR = "end_button_behavior";
    field public static final java.lang.String FONT_SCALE = "font_scale";
    field public static final java.lang.String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
    field public static final deprecated java.lang.String HTTP_PROXY = "http_proxy";
    field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
    field public static final deprecated java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
    field public static final deprecated java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
    field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
    field public static final deprecated java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
    field public static final deprecated java.lang.String LOGGING_ID = "logging_id";
    field public static final deprecated java.lang.String MODE_RINGER = "mode_ringer";
    field public static final java.lang.String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected";
    field public static final java.lang.String MUTE_STREAMS_AFFECTED = "mute_streams_affected";
    field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference";
    field public static final deprecated java.lang.String NEXT_ALARM_FORMATTED = "next_alarm_formatted";
    field public static final java.lang.String NOTIFICATION_SOUND = "notification_sound";
    field public static final deprecated java.lang.String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
    field public static final deprecated java.lang.String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
    field public static final deprecated java.lang.String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
    field public static final deprecated java.lang.String RADIO_BLUETOOTH = "bluetooth";
    field public static final deprecated java.lang.String RADIO_CELL = "cell";
    field public static final deprecated java.lang.String RADIO_NFC = "nfc";
    field public static final deprecated java.lang.String RADIO_WIFI = "wifi";
    field public static final java.lang.String RINGTONE = "ringtone";
    field public static final java.lang.String SCREEN_BRIGHTNESS = "screen_brightness";
    field public static final java.lang.String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
    field public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; // 0x1
    field public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; // 0x0
    field public static final java.lang.String SCREEN_OFF_TIMEOUT = "screen_off_timeout";
    field public static final deprecated java.lang.String SETTINGS_CLASSNAME = "settings_classname";
    field public static final java.lang.String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run";
    field public static final java.lang.String SHOW_GTALK_SERVICE_STATUS = "SHOW_GTALK_SERVICE_STATUS";
    field public static final deprecated java.lang.String SHOW_PROCESSES = "show_processes";
    field public static final deprecated java.lang.String SHOW_WEB_SUGGESTIONS = "show_web_suggestions";
    field public static final java.lang.String SOUND_EFFECTS_ENABLED = "sound_effects_enabled";
    field public static final deprecated java.lang.String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in";
    field public static final java.lang.String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
    field public static final java.lang.String TEXT_AUTO_CAPS = "auto_caps";
    field public static final java.lang.String TEXT_AUTO_PUNCTUATE = "auto_punctuate";
    field public static final java.lang.String TEXT_AUTO_REPLACE = "auto_replace";
    field public static final java.lang.String TEXT_SHOW_PASSWORD = "show_password";
    field public static final java.lang.String TIME_12_24 = "time_12_24";
    field public static final deprecated java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale";
    field public static final deprecated java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
    field public static final java.lang.String USER_ROTATION = "user_rotation";
    field public static final deprecated java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
    field public static final java.lang.String VIBRATE_ON = "vibrate_on";
    field public static final deprecated java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger";
    field public static final deprecated java.lang.String WALLPAPER_ACTIVITY = "wallpaper_activity";
    field public static final deprecated java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
    field public static final deprecated java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms";
    field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on";
    field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = "wifi_networks_available_repeat_delay";
    field public static final deprecated java.lang.String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
    field public static final deprecated java.lang.String WIFI_ON = "wifi_on";
    field public static final deprecated java.lang.String WIFI_SLEEP_POLICY = "wifi_sleep_policy";
    field public static final deprecated int WIFI_SLEEP_POLICY_DEFAULT = 0; // 0x0
    field public static final deprecated int WIFI_SLEEP_POLICY_NEVER = 2; // 0x2
    field public static final deprecated int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; // 0x1
    field public static final deprecated java.lang.String WIFI_STATIC_DNS1 = "wifi_static_dns1";
    field public static final deprecated java.lang.String WIFI_STATIC_DNS2 = "wifi_static_dns2";
    field public static final deprecated java.lang.String WIFI_STATIC_GATEWAY = "wifi_static_gateway";
    field public static final deprecated java.lang.String WIFI_STATIC_IP = "wifi_static_ip";
    field public static final deprecated java.lang.String WIFI_STATIC_NETMASK = "wifi_static_netmask";
    field public static final deprecated java.lang.String WIFI_USE_STATIC_IP = "wifi_use_static_ip";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = "wifi_watchdog_acceptable_packet_loss_percentage";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = "wifi_watchdog_background_check_delay_ms";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = "wifi_watchdog_background_check_enabled";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = "wifi_watchdog_background_check_timeout_ms";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = "wifi_watchdog_initial_ignored_ping_count";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
    field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
    field public static final deprecated java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale";
  }

  public class SyncStateContract {
    ctor public SyncStateContract();
  }

  public static abstract interface SyncStateContract.Columns implements android.provider.BaseColumns {
    field public static final java.lang.String ACCOUNT_NAME = "account_name";
    field public static final java.lang.String ACCOUNT_TYPE = "account_type";
    field public static final java.lang.String DATA = "data";
  }

  public static class SyncStateContract.Constants implements android.provider.SyncStateContract.Columns {
    ctor public SyncStateContract.Constants();
    field public static final java.lang.String CONTENT_DIRECTORY = "syncstate";
  }

  public static final class SyncStateContract.Helpers {
    ctor public SyncStateContract.Helpers();
    method public static byte[] get(android.content.ContentProviderClient, android.net.Uri, android.accounts.Account) throws android.os.RemoteException;
    method public static android.util.Pair<android.net.Uri, byte[]> getWithUri(android.content.ContentProviderClient, android.net.Uri, android.accounts.Account) throws android.os.RemoteException;
    method public static android.net.Uri insert(android.content.ContentProviderClient, android.net.Uri, android.accounts.Account, byte[]) throws android.os.RemoteException;
    method public static android.content.ContentProviderOperation newSetOperation(android.net.Uri, android.accounts.Account, byte[]);
    method public static android.content.ContentProviderOperation newUpdateOperation(android.net.Uri, byte[]);
    method public static void set(android.content.ContentProviderClient, android.net.Uri, android.accounts.Account, byte[]) throws android.os.RemoteException;
    method public static void update(android.content.ContentProviderClient, android.net.Uri, byte[]) throws android.os.RemoteException;
  }

  public final class Telephony {
  }

  public static abstract interface Telephony.BaseMmsColumns implements android.provider.BaseColumns {
    field public static final java.lang.String CONTENT_CLASS = "ct_cls";
    field public static final java.lang.String CONTENT_LOCATION = "ct_l";
    field public static final java.lang.String CONTENT_TYPE = "ct_t";
    field public static final java.lang.String CREATOR = "creator";
    field public static final java.lang.String DATE = "date";
    field public static final java.lang.String DATE_SENT = "date_sent";
    field public static final java.lang.String DELIVERY_REPORT = "d_rpt";
    field public static final java.lang.String DELIVERY_TIME = "d_tm";
    field public static final java.lang.String EXPIRY = "exp";
    field public static final java.lang.String LOCKED = "locked";
    field public static final java.lang.String MESSAGE_BOX = "msg_box";
    field public static final int MESSAGE_BOX_ALL = 0; // 0x0
    field public static final int MESSAGE_BOX_DRAFTS = 3; // 0x3
    field public static final int MESSAGE_BOX_FAILED = 5; // 0x5
    field public static final int MESSAGE_BOX_INBOX = 1; // 0x1
    field public static final int MESSAGE_BOX_OUTBOX = 4; // 0x4
    field public static final int MESSAGE_BOX_SENT = 2; // 0x2
    field public static final java.lang.String MESSAGE_CLASS = "m_cls";
    field public static final java.lang.String MESSAGE_ID = "m_id";
    field public static final java.lang.String MESSAGE_SIZE = "m_size";
    field public static final java.lang.String MESSAGE_TYPE = "m_type";
    field public static final java.lang.String MMS_VERSION = "v";
    field public static final java.lang.String PRIORITY = "pri";
    field public static final java.lang.String READ = "read";
    field public static final java.lang.String READ_REPORT = "rr";
    field public static final java.lang.String READ_STATUS = "read_status";
    field public static final java.lang.String REPORT_ALLOWED = "rpt_a";
    field public static final java.lang.String RESPONSE_STATUS = "resp_st";
    field public static final java.lang.String RESPONSE_TEXT = "resp_txt";
    field public static final java.lang.String RETRIEVE_STATUS = "retr_st";
    field public static final java.lang.String RETRIEVE_TEXT = "retr_txt";
    field public static final java.lang.String RETRIEVE_TEXT_CHARSET = "retr_txt_cs";
    field public static final java.lang.String SEEN = "seen";
    field public static final java.lang.String STATUS = "st";
    field public static final java.lang.String SUBJECT = "sub";
    field public static final java.lang.String SUBJECT_CHARSET = "sub_cs";
    field public static final java.lang.String SUBSCRIPTION_ID = "sub_id";
    field public static final java.lang.String TEXT_ONLY = "text_only";
    field public static final java.lang.String THREAD_ID = "thread_id";
    field public static final java.lang.String TRANSACTION_ID = "tr_id";
  }

  public static abstract interface Telephony.CanonicalAddressesColumns implements android.provider.BaseColumns {
    field public static final java.lang.String ADDRESS = "address";
  }

  public static final class Telephony.Carriers implements android.provider.BaseColumns {
    field public static final java.lang.String APN = "apn";
    field public static final java.lang.String AUTH_TYPE = "authtype";
    field public static final java.lang.String BEARER = "bearer";
    field public static final java.lang.String CARRIER_ENABLED = "carrier_enabled";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String CURRENT = "current";
    field public static final java.lang.String DEFAULT_SORT_ORDER = "name ASC";
    field public static final java.lang.String MCC = "mcc";
    field public static final java.lang.String MMSC = "mmsc";
    field public static final java.lang.String MMSPORT = "mmsport";
    field public static final java.lang.String MMSPROXY = "mmsproxy";
    field public static final java.lang.String MNC = "mnc";
    field public static final java.lang.String MVNO_MATCH_DATA = "mvno_match_data";
    field public static final java.lang.String MVNO_TYPE = "mvno_type";
    field public static final java.lang.String NAME = "name";
    field public static final java.lang.String NUMERIC = "numeric";
    field public static final java.lang.String PASSWORD = "password";
    field public static final java.lang.String PORT = "port";
    field public static final java.lang.String PROTOCOL = "protocol";
    field public static final java.lang.String PROXY = "proxy";
    field public static final java.lang.String ROAMING_PROTOCOL = "roaming_protocol";
    field public static final java.lang.String SERVER = "server";
    field public static final java.lang.String SUBSCRIPTION_ID = "sub_id";
    field public static final java.lang.String TYPE = "type";
    field public static final java.lang.String USER = "user";
  }

  public static final class Telephony.Mms implements android.provider.Telephony.BaseMmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
    field public static final android.net.Uri REPORT_REQUEST_URI;
    field public static final android.net.Uri REPORT_STATUS_URI;
  }

  public static final class Telephony.Mms.Addr implements android.provider.BaseColumns {
    field public static final java.lang.String ADDRESS = "address";
    field public static final java.lang.String CHARSET = "charset";
    field public static final java.lang.String CONTACT_ID = "contact_id";
    field public static final java.lang.String MSG_ID = "msg_id";
    field public static final java.lang.String TYPE = "type";
  }

  public static final class Telephony.Mms.Draft implements android.provider.Telephony.BaseMmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.Mms.Inbox implements android.provider.Telephony.BaseMmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.Mms.Intents {
    field public static final java.lang.String CONTENT_CHANGED_ACTION = "android.intent.action.CONTENT_CHANGED";
    field public static final java.lang.String DELETED_CONTENTS = "deleted_contents";
  }

  public static final class Telephony.Mms.Outbox implements android.provider.Telephony.BaseMmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.Mms.Part implements android.provider.BaseColumns {
    field public static final java.lang.String CHARSET = "chset";
    field public static final java.lang.String CONTENT_DISPOSITION = "cd";
    field public static final java.lang.String CONTENT_ID = "cid";
    field public static final java.lang.String CONTENT_LOCATION = "cl";
    field public static final java.lang.String CONTENT_TYPE = "ct";
    field public static final java.lang.String CT_START = "ctt_s";
    field public static final java.lang.String CT_TYPE = "ctt_t";
    field public static final java.lang.String FILENAME = "fn";
    field public static final java.lang.String MSG_ID = "mid";
    field public static final java.lang.String NAME = "name";
    field public static final java.lang.String SEQ = "seq";
    field public static final java.lang.String TEXT = "text";
    field public static final java.lang.String _DATA = "_data";
  }

  public static final class Telephony.Mms.Rate {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String SENT_TIME = "sent_time";
  }

  public static final class Telephony.Mms.Sent implements android.provider.Telephony.BaseMmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.MmsSms implements android.provider.BaseColumns {
    field public static final android.net.Uri CONTENT_CONVERSATIONS_URI;
    field public static final android.net.Uri CONTENT_DRAFT_URI;
    field public static final android.net.Uri CONTENT_FILTER_BYPHONE_URI;
    field public static final android.net.Uri CONTENT_LOCKED_URI;
    field public static final android.net.Uri CONTENT_UNDELIVERED_URI;
    field public static final android.net.Uri CONTENT_URI;
    field public static final int ERR_TYPE_GENERIC = 1; // 0x1
    field public static final int ERR_TYPE_GENERIC_PERMANENT = 10; // 0xa
    field public static final int ERR_TYPE_MMS_PROTO_PERMANENT = 12; // 0xc
    field public static final int ERR_TYPE_MMS_PROTO_TRANSIENT = 3; // 0x3
    field public static final int ERR_TYPE_SMS_PROTO_PERMANENT = 11; // 0xb
    field public static final int ERR_TYPE_SMS_PROTO_TRANSIENT = 2; // 0x2
    field public static final int ERR_TYPE_TRANSPORT_FAILURE = 4; // 0x4
    field public static final int MMS_PROTO = 1; // 0x1
    field public static final int NO_ERROR = 0; // 0x0
    field public static final android.net.Uri SEARCH_URI;
    field public static final int SMS_PROTO = 0; // 0x0
    field public static final java.lang.String TYPE_DISCRIMINATOR_COLUMN = "transport_type";
  }

  public static final class Telephony.MmsSms.PendingMessages implements android.provider.BaseColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DUE_TIME = "due_time";
    field public static final java.lang.String ERROR_CODE = "err_code";
    field public static final java.lang.String ERROR_TYPE = "err_type";
    field public static final java.lang.String LAST_TRY = "last_try";
    field public static final java.lang.String MSG_ID = "msg_id";
    field public static final java.lang.String MSG_TYPE = "msg_type";
    field public static final java.lang.String PROTO_TYPE = "proto_type";
    field public static final java.lang.String RETRY_INDEX = "retry_index";
    field public static final java.lang.String SUBSCRIPTION_ID = "pending_sub_id";
  }

  public static final class Telephony.Sms implements android.provider.BaseColumns android.provider.Telephony.TextBasedSmsColumns {
    method public static java.lang.String getDefaultSmsPackage(android.content.Context);
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.Sms.Conversations implements android.provider.BaseColumns android.provider.Telephony.TextBasedSmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
    field public static final java.lang.String MESSAGE_COUNT = "msg_count";
    field public static final java.lang.String SNIPPET = "snippet";
  }

  public static final class Telephony.Sms.Draft implements android.provider.BaseColumns android.provider.Telephony.TextBasedSmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.Sms.Inbox implements android.provider.BaseColumns android.provider.Telephony.TextBasedSmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.Sms.Intents {
    method public static android.telephony.SmsMessage[] getMessagesFromIntent(android.content.Intent);
    field public static final java.lang.String ACTION_CHANGE_DEFAULT = "android.provider.Telephony.ACTION_CHANGE_DEFAULT";
    field public static final java.lang.String DATA_SMS_RECEIVED_ACTION = "android.intent.action.DATA_SMS_RECEIVED";
    field public static final java.lang.String EXTRA_PACKAGE_NAME = "package";
    field public static final int RESULT_SMS_DUPLICATED = 5; // 0x5
    field public static final int RESULT_SMS_GENERIC_ERROR = 2; // 0x2
    field public static final int RESULT_SMS_HANDLED = 1; // 0x1
    field public static final int RESULT_SMS_OUT_OF_MEMORY = 3; // 0x3
    field public static final int RESULT_SMS_UNSUPPORTED = 4; // 0x4
    field public static final java.lang.String SIM_FULL_ACTION = "android.provider.Telephony.SIM_FULL";
    field public static final java.lang.String SMS_CB_RECEIVED_ACTION = "android.provider.Telephony.SMS_CB_RECEIVED";
    field public static final java.lang.String SMS_DELIVER_ACTION = "android.provider.Telephony.SMS_DELIVER";
    field public static final java.lang.String SMS_EMERGENCY_CB_RECEIVED_ACTION = "android.provider.Telephony.SMS_EMERGENCY_CB_RECEIVED";
    field public static final java.lang.String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED";
    field public static final java.lang.String SMS_REJECTED_ACTION = "android.provider.Telephony.SMS_REJECTED";
    field public static final java.lang.String SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION = "android.provider.Telephony.SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED";
    field public static final java.lang.String WAP_PUSH_DELIVER_ACTION = "android.provider.Telephony.WAP_PUSH_DELIVER";
    field public static final java.lang.String WAP_PUSH_RECEIVED_ACTION = "android.provider.Telephony.WAP_PUSH_RECEIVED";
  }

  public static final class Telephony.Sms.Outbox implements android.provider.BaseColumns android.provider.Telephony.TextBasedSmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static final class Telephony.Sms.Sent implements android.provider.BaseColumns android.provider.Telephony.TextBasedSmsColumns {
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
  }

  public static abstract interface Telephony.TextBasedSmsColumns {
    field public static final java.lang.String ADDRESS = "address";
    field public static final java.lang.String BODY = "body";
    field public static final java.lang.String CREATOR = "creator";
    field public static final java.lang.String DATE = "date";
    field public static final java.lang.String DATE_SENT = "date_sent";
    field public static final java.lang.String ERROR_CODE = "error_code";
    field public static final java.lang.String LOCKED = "locked";
    field public static final int MESSAGE_TYPE_ALL = 0; // 0x0
    field public static final int MESSAGE_TYPE_DRAFT = 3; // 0x3
    field public static final int MESSAGE_TYPE_FAILED = 5; // 0x5
    field public static final int MESSAGE_TYPE_INBOX = 1; // 0x1
    field public static final int MESSAGE_TYPE_OUTBOX = 4; // 0x4
    field public static final int MESSAGE_TYPE_QUEUED = 6; // 0x6
    field public static final int MESSAGE_TYPE_SENT = 2; // 0x2
    field public static final java.lang.String PERSON = "person";
    field public static final java.lang.String PROTOCOL = "protocol";
    field public static final java.lang.String READ = "read";
    field public static final java.lang.String REPLY_PATH_PRESENT = "reply_path_present";
    field public static final java.lang.String SEEN = "seen";
    field public static final java.lang.String SERVICE_CENTER = "service_center";
    field public static final java.lang.String STATUS = "status";
    field public static final int STATUS_COMPLETE = 0; // 0x0
    field public static final int STATUS_FAILED = 64; // 0x40
    field public static final int STATUS_NONE = -1; // 0xffffffff
    field public static final int STATUS_PENDING = 32; // 0x20
    field public static final java.lang.String SUBJECT = "subject";
    field public static final java.lang.String SUBSCRIPTION_ID = "sub_id";
    field public static final java.lang.String THREAD_ID = "thread_id";
    field public static final java.lang.String TYPE = "type";
  }

  public static final class Telephony.Threads implements android.provider.Telephony.ThreadsColumns {
    method public static long getOrCreateThreadId(android.content.Context, java.lang.String);
    method public static long getOrCreateThreadId(android.content.Context, java.util.Set<java.lang.String>);
    field public static final int BROADCAST_THREAD = 1; // 0x1
    field public static final int COMMON_THREAD = 0; // 0x0
    field public static final android.net.Uri CONTENT_URI;
    field public static final android.net.Uri OBSOLETE_THREADS_URI;
  }

  public static abstract interface Telephony.ThreadsColumns implements android.provider.BaseColumns {
    field public static final java.lang.String ARCHIVED = "archived";
    field public static final java.lang.String DATE = "date";
    field public static final java.lang.String ERROR = "error";
    field public static final java.lang.String HAS_ATTACHMENT = "has_attachment";
    field public static final java.lang.String MESSAGE_COUNT = "message_count";
    field public static final java.lang.String READ = "read";
    field public static final java.lang.String RECIPIENT_IDS = "recipient_ids";
    field public static final java.lang.String SNIPPET = "snippet";
    field public static final java.lang.String SNIPPET_CHARSET = "snippet_cs";
    field public static final java.lang.String TYPE = "type";
  }

  public class UserDictionary {
    ctor public UserDictionary();
    field public static final java.lang.String AUTHORITY = "user_dictionary";
    field public static final android.net.Uri CONTENT_URI;
  }

  public static class UserDictionary.Words implements android.provider.BaseColumns {
    ctor public UserDictionary.Words();
    method public static deprecated void addWord(android.content.Context, java.lang.String, int, int);
    method public static void addWord(android.content.Context, java.lang.String, int, java.lang.String, java.util.Locale);
    field public static final java.lang.String APP_ID = "appid";
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.google.userword";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.google.userword";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DEFAULT_SORT_ORDER = "frequency DESC";
    field public static final java.lang.String FREQUENCY = "frequency";
    field public static final java.lang.String LOCALE = "locale";
    field public static final deprecated int LOCALE_TYPE_ALL = 0; // 0x0
    field public static final deprecated int LOCALE_TYPE_CURRENT = 1; // 0x1
    field public static final java.lang.String SHORTCUT = "shortcut";
    field public static final java.lang.String WORD = "word";
    field public static final java.lang.String _ID = "_id";
  }

  public class VoicemailContract {
    field public static final java.lang.String ACTION_FETCH_VOICEMAIL = "android.intent.action.FETCH_VOICEMAIL";
    field public static final java.lang.String ACTION_NEW_VOICEMAIL = "android.intent.action.NEW_VOICEMAIL";
    field public static final java.lang.String AUTHORITY = "com.android.voicemail";
    field public static final java.lang.String EXTRA_SELF_CHANGE = "com.android.voicemail.extra.SELF_CHANGE";
    field public static final java.lang.String PARAM_KEY_SOURCE_PACKAGE = "source_package";
  }

  public static final class VoicemailContract.Status implements android.provider.BaseColumns {
    method public static android.net.Uri buildSourceUri(java.lang.String);
    field public static final java.lang.String CONFIGURATION_STATE = "configuration_state";
    field public static final int CONFIGURATION_STATE_CAN_BE_CONFIGURED = 2; // 0x2
    field public static final int CONFIGURATION_STATE_NOT_CONFIGURED = 1; // 0x1
    field public static final int CONFIGURATION_STATE_OK = 0; // 0x0
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DATA_CHANNEL_STATE = "data_channel_state";
    field public static final int DATA_CHANNEL_STATE_NO_CONNECTION = 1; // 0x1
    field public static final int DATA_CHANNEL_STATE_OK = 0; // 0x0
    field public static final java.lang.String DIR_TYPE = "vnd.android.cursor.dir/voicemail.source.status";
    field public static final java.lang.String ITEM_TYPE = "vnd.android.cursor.item/voicemail.source.status";
    field public static final java.lang.String NOTIFICATION_CHANNEL_STATE = "notification_channel_state";
    field public static final int NOTIFICATION_CHANNEL_STATE_MESSAGE_WAITING = 2; // 0x2
    field public static final int NOTIFICATION_CHANNEL_STATE_NO_CONNECTION = 1; // 0x1
    field public static final int NOTIFICATION_CHANNEL_STATE_OK = 0; // 0x0
    field public static final java.lang.String PHONE_ACCOUNT_COMPONENT_NAME = "phone_account_component_name";
    field public static final java.lang.String PHONE_ACCOUNT_ID = "phone_account_id";
    field public static final java.lang.String SETTINGS_URI = "settings_uri";
    field public static final java.lang.String SOURCE_PACKAGE = "source_package";
    field public static final java.lang.String VOICEMAIL_ACCESS_URI = "voicemail_access_uri";
  }

  public static final class VoicemailContract.Voicemails implements android.provider.BaseColumns android.provider.OpenableColumns {
    method public static android.net.Uri buildSourceUri(java.lang.String);
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String DATE = "date";
    field public static final java.lang.String DELETED = "deleted";
    field public static final java.lang.String DIRTY = "dirty";
    field public static final java.lang.String DIR_TYPE = "vnd.android.cursor.dir/voicemails";
    field public static final java.lang.String DURATION = "duration";
    field public static final java.lang.String HAS_CONTENT = "has_content";
    field public static final java.lang.String IS_READ = "is_read";
    field public static final java.lang.String ITEM_TYPE = "vnd.android.cursor.item/voicemail";
    field public static final java.lang.String MIME_TYPE = "mime_type";
    field public static final java.lang.String NUMBER = "number";
    field public static final java.lang.String PHONE_ACCOUNT_COMPONENT_NAME = "subscription_component_name";
    field public static final java.lang.String PHONE_ACCOUNT_ID = "subscription_id";
    field public static final java.lang.String SOURCE_DATA = "source_data";
    field public static final java.lang.String SOURCE_PACKAGE = "source_package";
    field public static final java.lang.String TRANSCRIPTION = "transcription";
  }

}

package android.renderscript {

  public class Allocation extends android.renderscript.BaseObj {
    method public void copy1DRangeFrom(int, int, java.lang.Object);
    method public void copy1DRangeFrom(int, int, int[]);
    method public void copy1DRangeFrom(int, int, short[]);
    method public void copy1DRangeFrom(int, int, byte[]);
    method public void copy1DRangeFrom(int, int, float[]);
    method public void copy1DRangeFrom(int, int, android.renderscript.Allocation, int);
    method public void copy1DRangeFromUnchecked(int, int, java.lang.Object);
    method public void copy1DRangeFromUnchecked(int, int, int[]);
    method public void copy1DRangeFromUnchecked(int, int, short[]);
    method public void copy1DRangeFromUnchecked(int, int, byte[]);
    method public void copy1DRangeFromUnchecked(int, int, float[]);
    method public void copy1DRangeTo(int, int, java.lang.Object);
    method public void copy1DRangeTo(int, int, int[]);
    method public void copy1DRangeTo(int, int, short[]);
    method public void copy1DRangeTo(int, int, byte[]);
    method public void copy1DRangeTo(int, int, float[]);
    method public void copy1DRangeToUnchecked(int, int, java.lang.Object);
    method public void copy1DRangeToUnchecked(int, int, int[]);
    method public void copy1DRangeToUnchecked(int, int, short[]);
    method public void copy1DRangeToUnchecked(int, int, byte[]);
    method public void copy1DRangeToUnchecked(int, int, float[]);
    method public void copy2DRangeFrom(int, int, int, int, java.lang.Object);
    method public void copy2DRangeFrom(int, int, int, int, byte[]);
    method public void copy2DRangeFrom(int, int, int, int, short[]);
    method public void copy2DRangeFrom(int, int, int, int, int[]);
    method public void copy2DRangeFrom(int, int, int, int, float[]);
    method public void copy2DRangeFrom(int, int, int, int, android.renderscript.Allocation, int, int);
    method public void copy2DRangeFrom(int, int, android.graphics.Bitmap);
    method public void copy2DRangeTo(int, int, int, int, java.lang.Object);
    method public void copy2DRangeTo(int, int, int, int, byte[]);
    method public void copy2DRangeTo(int, int, int, int, short[]);
    method public void copy2DRangeTo(int, int, int, int, int[]);
    method public void copy2DRangeTo(int, int, int, int, float[]);
    method public void copy3DRangeFrom(int, int, int, int, int, int, java.lang.Object);
    method public void copy3DRangeFrom(int, int, int, int, int, int, android.renderscript.Allocation, int, int, int);
    method public void copy3DRangeTo(int, int, int, int, int, int, java.lang.Object);
    method public void copyFrom(android.renderscript.BaseObj[]);
    method public void copyFrom(java.lang.Object);
    method public void copyFrom(int[]);
    method public void copyFrom(short[]);
    method public void copyFrom(byte[]);
    method public void copyFrom(float[]);
    method public void copyFrom(android.graphics.Bitmap);
    method public void copyFrom(android.renderscript.Allocation);
    method public void copyFromUnchecked(java.lang.Object);
    method public void copyFromUnchecked(int[]);
    method public void copyFromUnchecked(short[]);
    method public void copyFromUnchecked(byte[]);
    method public void copyFromUnchecked(float[]);
    method public void copyTo(android.graphics.Bitmap);
    method public void copyTo(java.lang.Object);
    method public void copyTo(byte[]);
    method public void copyTo(short[]);
    method public void copyTo(int[]);
    method public void copyTo(float[]);
    method public void copyToFieldPacker(int, int, int, int, android.renderscript.FieldPacker);
    method public static android.renderscript.Allocation createCubemapFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
    method public static android.renderscript.Allocation createCubemapFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap);
    method public static android.renderscript.Allocation createCubemapFromCubeFaces(android.renderscript.RenderScript, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
    method public static android.renderscript.Allocation createCubemapFromCubeFaces(android.renderscript.RenderScript, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap);
    method public static android.renderscript.Allocation createFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
    method public static android.renderscript.Allocation createFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap);
    method public static android.renderscript.Allocation createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, int, android.renderscript.Allocation.MipmapControl, int);
    method public static android.renderscript.Allocation createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, int);
    method public static android.renderscript.Allocation createFromString(android.renderscript.RenderScript, java.lang.String, int);
    method public static android.renderscript.Allocation createSized(android.renderscript.RenderScript, android.renderscript.Element, int, int);
    method public static android.renderscript.Allocation createSized(android.renderscript.RenderScript, android.renderscript.Element, int);
    method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type, android.renderscript.Allocation.MipmapControl, int);
    method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type, int);
    method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type);
    method public void generateMipmaps();
    method public int getBytesSize();
    method public android.renderscript.Element getElement();
    method public android.view.Surface getSurface();
    method public android.renderscript.Type getType();
    method public int getUsage();
    method public void ioReceive();
    method public void ioSend();
    method public deprecated synchronized void resize(int);
    method public void setAutoPadding(boolean);
    method public void setFromFieldPacker(int, android.renderscript.FieldPacker);
    method public void setFromFieldPacker(int, int, android.renderscript.FieldPacker);
    method public void setFromFieldPacker(int, int, int, int, android.renderscript.FieldPacker);
    method public void setOnBufferAvailableListener(android.renderscript.Allocation.OnBufferAvailableListener);
    method public void setSurface(android.view.Surface);
    method public void syncAll(int);
    field public static final int USAGE_GRAPHICS_CONSTANTS = 8; // 0x8
    field public static final int USAGE_GRAPHICS_RENDER_TARGET = 16; // 0x10
    field public static final int USAGE_GRAPHICS_TEXTURE = 2; // 0x2
    field public static final int USAGE_GRAPHICS_VERTEX = 4; // 0x4
    field public static final int USAGE_IO_INPUT = 32; // 0x20
    field public static final int USAGE_IO_OUTPUT = 64; // 0x40
    field public static final int USAGE_SCRIPT = 1; // 0x1
    field public static final int USAGE_SHARED = 128; // 0x80
  }

  public static final class Allocation.MipmapControl extends java.lang.Enum {
    method public static android.renderscript.Allocation.MipmapControl valueOf(java.lang.String);
    method public static final android.renderscript.Allocation.MipmapControl[] values();
    enum_constant public static final android.renderscript.Allocation.MipmapControl MIPMAP_FULL;
    enum_constant public static final android.renderscript.Allocation.MipmapControl MIPMAP_NONE;
    enum_constant public static final android.renderscript.Allocation.MipmapControl MIPMAP_ON_SYNC_TO_TEXTURE;
  }

  public static abstract interface Allocation.OnBufferAvailableListener {
    method public abstract void onBufferAvailable(android.renderscript.Allocation);
  }

  public class AllocationAdapter extends android.renderscript.Allocation {
    method public static android.renderscript.AllocationAdapter create1D(android.renderscript.RenderScript, android.renderscript.Allocation);
    method public static android.renderscript.AllocationAdapter create2D(android.renderscript.RenderScript, android.renderscript.Allocation);
    method public static android.renderscript.AllocationAdapter createTyped(android.renderscript.RenderScript, android.renderscript.Allocation, android.renderscript.Type);
    method public void setArray(int, int);
    method public void setFace(android.renderscript.Type.CubemapFace);
    method public void setLOD(int);
    method public void setX(int);
    method public void setY(int);
    method public void setZ(int);
  }

  public class BaseObj {
    method public void destroy();
    method public java.lang.String getName();
    method public void setName(java.lang.String);
  }

  public class Byte2 {
    ctor public Byte2();
    ctor public Byte2(byte, byte);
    field public byte x;
    field public byte y;
  }

  public class Byte3 {
    ctor public Byte3();
    ctor public Byte3(byte, byte, byte);
    field public byte x;
    field public byte y;
    field public byte z;
  }

  public class Byte4 {
    ctor public Byte4();
    ctor public Byte4(byte, byte, byte, byte);
    field public byte w;
    field public byte x;
    field public byte y;
    field public byte z;
  }

  public class Double2 {
    ctor public Double2();
    ctor public Double2(double, double);
    field public double x;
    field public double y;
  }

  public class Double3 {
    ctor public Double3();
    ctor public Double3(double, double, double);
    field public double x;
    field public double y;
    field public double z;
  }

  public class Double4 {
    ctor public Double4();
    ctor public Double4(double, double, double, double);
    field public double w;
    field public double x;
    field public double y;
    field public double z;
  }

  public class Element extends android.renderscript.BaseObj {
    method public static android.renderscript.Element ALLOCATION(android.renderscript.RenderScript);
    method public static android.renderscript.Element A_8(android.renderscript.RenderScript);
    method public static android.renderscript.Element BOOLEAN(android.renderscript.RenderScript);
    method public static android.renderscript.Element ELEMENT(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F16_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element FONT(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_4(android.renderscript.RenderScript);
    method public static deprecated android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_2X2(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_3X3(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_4X4(android.renderscript.RenderScript);
    method public static android.renderscript.Element MESH(android.renderscript.RenderScript);
    method public static android.renderscript.Element PROGRAM_FRAGMENT(android.renderscript.RenderScript);
    method public static android.renderscript.Element PROGRAM_RASTER(android.renderscript.RenderScript);
    method public static android.renderscript.Element PROGRAM_STORE(android.renderscript.RenderScript);
    method public static android.renderscript.Element PROGRAM_VERTEX(android.renderscript.RenderScript);
    method public static android.renderscript.Element RGBA_4444(android.renderscript.RenderScript);
    method public static android.renderscript.Element RGBA_5551(android.renderscript.RenderScript);
    method public static android.renderscript.Element RGBA_8888(android.renderscript.RenderScript);
    method public static android.renderscript.Element RGB_565(android.renderscript.RenderScript);
    method public static android.renderscript.Element RGB_888(android.renderscript.RenderScript);
    method public static android.renderscript.Element SAMPLER(android.renderscript.RenderScript);
    method public static android.renderscript.Element SCRIPT(android.renderscript.RenderScript);
    method public static android.renderscript.Element TYPE(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element YUV(android.renderscript.RenderScript);
    method public static android.renderscript.Element createPixel(android.renderscript.RenderScript, android.renderscript.Element.DataType, android.renderscript.Element.DataKind);
    method public static android.renderscript.Element createVector(android.renderscript.RenderScript, android.renderscript.Element.DataType, int);
    method public int getBytesSize();
    method public android.renderscript.Element.DataKind getDataKind();
    method public android.renderscript.Element.DataType getDataType();
    method public android.renderscript.Element getSubElement(int);
    method public int getSubElementArraySize(int);
    method public int getSubElementCount();
    method public java.lang.String getSubElementName(int);
    method public int getSubElementOffsetBytes(int);
    method public int getVectorSize();
    method public boolean isCompatible(android.renderscript.Element);
    method public boolean isComplex();
  }

  public static class Element.Builder {
    ctor public Element.Builder(android.renderscript.RenderScript);
    method public android.renderscript.Element.Builder add(android.renderscript.Element, java.lang.String, int);
    method public android.renderscript.Element.Builder add(android.renderscript.Element, java.lang.String);
    method public android.renderscript.Element create();
  }

  public static final class Element.DataKind extends java.lang.Enum {
    method public static android.renderscript.Element.DataKind valueOf(java.lang.String);
    method public static final android.renderscript.Element.DataKind[] values();
    enum_constant public static final android.renderscript.Element.DataKind PIXEL_A;
    enum_constant public static final android.renderscript.Element.DataKind PIXEL_DEPTH;
    enum_constant public static final android.renderscript.Element.DataKind PIXEL_L;
    enum_constant public static final android.renderscript.Element.DataKind PIXEL_LA;
    enum_constant public static final android.renderscript.Element.DataKind PIXEL_RGB;
    enum_constant public static final android.renderscript.Element.DataKind PIXEL_RGBA;
    enum_constant public static final android.renderscript.Element.DataKind PIXEL_YUV;
    enum_constant public static final android.renderscript.Element.DataKind USER;
  }

  public static final class Element.DataType extends java.lang.Enum {
    method public static android.renderscript.Element.DataType valueOf(java.lang.String);
    method public static final android.renderscript.Element.DataType[] values();
    enum_constant public static final android.renderscript.Element.DataType BOOLEAN;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_16;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_32;
    enum_constant public static final android.renderscript.Element.DataType FLOAT_64;
    enum_constant public static final android.renderscript.Element.DataType MATRIX_2X2;
    enum_constant public static final android.renderscript.Element.DataType MATRIX_3X3;
    enum_constant public static final android.renderscript.Element.DataType MATRIX_4X4;
    enum_constant public static final android.renderscript.Element.DataType NONE;
    enum_constant public static final android.renderscript.Element.DataType RS_ALLOCATION;
    enum_constant public static final android.renderscript.Element.DataType RS_ELEMENT;
    enum_constant public static final android.renderscript.Element.DataType RS_FONT;
    enum_constant public static final android.renderscript.Element.DataType RS_MESH;
    enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_FRAGMENT;
    enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_RASTER;
    enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_STORE;
    enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_VERTEX;
    enum_constant public static final android.renderscript.Element.DataType RS_SAMPLER;
    enum_constant public static final android.renderscript.Element.DataType RS_SCRIPT;
    enum_constant public static final android.renderscript.Element.DataType RS_TYPE;
    enum_constant public static final android.renderscript.Element.DataType SIGNED_16;
    enum_constant public static final android.renderscript.Element.DataType SIGNED_32;
    enum_constant public static final android.renderscript.Element.DataType SIGNED_64;
    enum_constant public static final android.renderscript.Element.DataType SIGNED_8;
    enum_constant public static final android.renderscript.Element.DataType UNSIGNED_16;
    enum_constant public static final android.renderscript.Element.DataType UNSIGNED_32;
    enum_constant public static final android.renderscript.Element.DataType UNSIGNED_4_4_4_4;
    enum_constant public static final android.renderscript.Element.DataType UNSIGNED_5_5_5_1;
    enum_constant public static final android.renderscript.Element.DataType UNSIGNED_5_6_5;
    enum_constant public static final android.renderscript.Element.DataType UNSIGNED_64;
    enum_constant public static final android.renderscript.Element.DataType UNSIGNED_8;
  }

  public class FieldPacker {
    ctor public FieldPacker(int);
    ctor public FieldPacker(byte[]);
    method public void addBoolean(boolean);
    method public void addF32(float);
    method public void addF32(android.renderscript.Float2);
    method public void addF32(android.renderscript.Float3);
    method public void addF32(android.renderscript.Float4);
    method public void addF64(double);
    method public void addF64(android.renderscript.Double2);
    method public void addF64(android.renderscript.Double3);
    method public void addF64(android.renderscript.Double4);
    method public void addI16(short);
    method public void addI16(android.renderscript.Short2);
    method public void addI16(android.renderscript.Short3);
    method public void addI16(android.renderscript.Short4);
    method public void addI32(int);
    method public void addI32(android.renderscript.Int2);
    method public void addI32(android.renderscript.Int3);
    method public void addI32(android.renderscript.Int4);
    method public void addI64(long);
    method public void addI64(android.renderscript.Long2);
    method public void addI64(android.renderscript.Long3);
    method public void addI64(android.renderscript.Long4);
    method public void addI8(byte);
    method public void addI8(android.renderscript.Byte2);
    method public void addI8(android.renderscript.Byte3);
    method public void addI8(android.renderscript.Byte4);
    method public void addMatrix(android.renderscript.Matrix4f);
    method public void addMatrix(android.renderscript.Matrix3f);
    method public void addMatrix(android.renderscript.Matrix2f);
    method public void addObj(android.renderscript.BaseObj);
    method public void addU16(int);
    method public void addU16(android.renderscript.Int2);
    method public void addU16(android.renderscript.Int3);
    method public void addU16(android.renderscript.Int4);
    method public void addU32(long);
    method public void addU32(android.renderscript.Long2);
    method public void addU32(android.renderscript.Long3);
    method public void addU32(android.renderscript.Long4);
    method public void addU64(long);
    method public void addU64(android.renderscript.Long2);
    method public void addU64(android.renderscript.Long3);
    method public void addU64(android.renderscript.Long4);
    method public void addU8(short);
    method public void addU8(android.renderscript.Short2);
    method public void addU8(android.renderscript.Short3);
    method public void addU8(android.renderscript.Short4);
    method public void align(int);
    method public final byte[] getData();
    method public void reset();
    method public void reset(int);
    method public void skip(int);
    method public boolean subBoolean();
    method public android.renderscript.Byte2 subByte2();
    method public android.renderscript.Byte3 subByte3();
    method public android.renderscript.Byte4 subByte4();
    method public android.renderscript.Double2 subDouble2();
    method public android.renderscript.Double3 subDouble3();
    method public android.renderscript.Double4 subDouble4();
    method public float subF32();
    method public double subF64();
    method public android.renderscript.Float2 subFloat2();
    method public android.renderscript.Float3 subFloat3();
    method public android.renderscript.Float4 subFloat4();
    method public short subI16();
    method public int subI32();
    method public long subI64();
    method public byte subI8();
    method public android.renderscript.Int2 subInt2();
    method public android.renderscript.Int3 subInt3();
    method public android.renderscript.Int4 subInt4();
    method public android.renderscript.Long2 subLong2();
    method public android.renderscript.Long3 subLong3();
    method public android.renderscript.Long4 subLong4();
    method public android.renderscript.Matrix2f subMatrix2f();
    method public android.renderscript.Matrix3f subMatrix3f();
    method public android.renderscript.Matrix4f subMatrix4f();
    method public android.renderscript.Short2 subShort2();
    method public android.renderscript.Short3 subShort3();
    method public android.renderscript.Short4 subShort4();
    method public void subalign(int);
  }

  public class Float2 {
    ctor public Float2();
    ctor public Float2(float, float);
    field public float x;
    field public float y;
  }

  public class Float3 {
    ctor public Float3();
    ctor public Float3(float, float, float);
    field public float x;
    field public float y;
    field public float z;
  }

  public class Float4 {
    ctor public Float4();
    ctor public Float4(float, float, float, float);
    field public float w;
    field public float x;
    field public float y;
    field public float z;
  }

  public class Int2 {
    ctor public Int2();
    ctor public Int2(int, int);
    field public int x;
    field public int y;
  }

  public class Int3 {
    ctor public Int3();
    ctor public Int3(int, int, int);
    field public int x;
    field public int y;
    field public int z;
  }

  public class Int4 {
    ctor public Int4();
    ctor public Int4(int, int, int, int);
    field public int w;
    field public int x;
    field public int y;
    field public int z;
  }

  public class Long2 {
    ctor public Long2();
    ctor public Long2(long, long);
    field public long x;
    field public long y;
  }

  public class Long3 {
    ctor public Long3();
    ctor public Long3(long, long, long);
    field public long x;
    field public long y;
    field public long z;
  }

  public class Long4 {
    ctor public Long4();
    ctor public Long4(long, long, long, long);
    field public long w;
    field public long x;
    field public long y;
    field public long z;
  }

  public class Matrix2f {
    ctor public Matrix2f();
    ctor public Matrix2f(float[]);
    method public float get(int, int);
    method public float[] getArray();
    method public void load(android.renderscript.Matrix2f);
    method public void loadIdentity();
    method public void loadMultiply(android.renderscript.Matrix2f, android.renderscript.Matrix2f);
    method public void loadRotate(float);
    method public void loadScale(float, float);
    method public void multiply(android.renderscript.Matrix2f);
    method public void rotate(float);
    method public void scale(float, float);
    method public void set(int, int, float);
    method public void transpose();
  }

  public class Matrix3f {
    ctor public Matrix3f();
    ctor public Matrix3f(float[]);
    method public float get(int, int);
    method public float[] getArray();
    method public void load(android.renderscript.Matrix3f);
    method public void loadIdentity();
    method public void loadMultiply(android.renderscript.Matrix3f, android.renderscript.Matrix3f);
    method public void loadRotate(float, float, float, float);
    method public void loadRotate(float);
    method public void loadScale(float, float);
    method public void loadScale(float, float, float);
    method public void loadTranslate(float, float);
    method public void multiply(android.renderscript.Matrix3f);
    method public void rotate(float, float, float, float);
    method public void rotate(float);
    method public void scale(float, float);
    method public void scale(float, float, float);
    method public void set(int, int, float);
    method public void translate(float, float);
    method public void transpose();
  }

  public class Matrix4f {
    ctor public Matrix4f();
    ctor public Matrix4f(float[]);
    method public float get(int, int);
    method public float[] getArray();
    method public boolean inverse();
    method public boolean inverseTranspose();
    method public void load(android.renderscript.Matrix4f);
    method public void loadFrustum(float, float, float, float, float, float);
    method public void loadIdentity();
    method public void loadMultiply(android.renderscript.Matrix4f, android.renderscript.Matrix4f);
    method public void loadOrtho(float, float, float, float, float, float);
    method public void loadOrthoWindow(int, int);
    method public void loadPerspective(float, float, float, float);
    method public void loadProjectionNormalized(int, int);
    method public void loadRotate(float, float, float, float);
    method public void loadScale(float, float, float);
    method public void loadTranslate(float, float, float);
    method public void multiply(android.renderscript.Matrix4f);
    method public void rotate(float, float, float, float);
    method public void scale(float, float, float);
    method public void set(int, int, float);
    method public void translate(float, float, float);
    method public void transpose();
  }

  public class RSDriverException extends android.renderscript.RSRuntimeException {
    ctor public RSDriverException(java.lang.String);
  }

  public class RSIllegalArgumentException extends android.renderscript.RSRuntimeException {
    ctor public RSIllegalArgumentException(java.lang.String);
  }

  public class RSInvalidStateException extends android.renderscript.RSRuntimeException {
    ctor public RSInvalidStateException(java.lang.String);
  }

  public class RSRuntimeException extends java.lang.RuntimeException {
    ctor public RSRuntimeException(java.lang.String);
  }

  public class RenderScript {
    method public void contextDump();
    method public static android.renderscript.RenderScript create(android.content.Context);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType, int);
    method public static android.renderscript.RenderScript createMultiContext(android.content.Context, android.renderscript.RenderScript.ContextType, int, int);
    method public void destroy();
    method public void finish();
    method public final android.content.Context getApplicationContext();
    method public android.renderscript.RenderScript.RSErrorHandler getErrorHandler();
    method public android.renderscript.RenderScript.RSMessageHandler getMessageHandler();
    method public static long getMinorID();
    method public static void releaseAllContexts();
    method public void sendMessage(int, int[]);
    method public void setErrorHandler(android.renderscript.RenderScript.RSErrorHandler);
    method public void setMessageHandler(android.renderscript.RenderScript.RSMessageHandler);
    method public void setPriority(android.renderscript.RenderScript.Priority);
    field public static final int CREATE_FLAG_LOW_LATENCY = 2; // 0x2
    field public static final int CREATE_FLAG_LOW_POWER = 4; // 0x4
    field public static final int CREATE_FLAG_NONE = 0; // 0x0
  }

  public static final class RenderScript.ContextType extends java.lang.Enum {
    method public static android.renderscript.RenderScript.ContextType valueOf(java.lang.String);
    method public static final android.renderscript.RenderScript.ContextType[] values();
    enum_constant public static final android.renderscript.RenderScript.ContextType DEBUG;
    enum_constant public static final android.renderscript.RenderScript.ContextType NORMAL;
    enum_constant public static final android.renderscript.RenderScript.ContextType PROFILE;
  }

  public static final class RenderScript.Priority extends java.lang.Enum {
    method public static android.renderscript.RenderScript.Priority valueOf(java.lang.String);
    method public static final android.renderscript.RenderScript.Priority[] values();
    enum_constant public static final android.renderscript.RenderScript.Priority LOW;
    enum_constant public static final android.renderscript.RenderScript.Priority NORMAL;
  }

  public static class RenderScript.RSErrorHandler implements java.lang.Runnable {
    ctor public RenderScript.RSErrorHandler();
    method public void run();
    field protected java.lang.String mErrorMessage;
    field protected int mErrorNum;
  }

  public static class RenderScript.RSMessageHandler implements java.lang.Runnable {
    ctor public RenderScript.RSMessageHandler();
    method public void run();
    field protected int[] mData;
    field protected int mID;
    field protected int mLength;
  }

  public class Sampler extends android.renderscript.BaseObj {
    method public static android.renderscript.Sampler CLAMP_LINEAR(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler CLAMP_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler CLAMP_NEAREST(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler MIRRORED_REPEAT_LINEAR(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler MIRRORED_REPEAT_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler MIRRORED_REPEAT_NEAREST(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler WRAP_LINEAR(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler WRAP_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
    method public static android.renderscript.Sampler WRAP_NEAREST(android.renderscript.RenderScript);
    method public float getAnisotropy();
    method public android.renderscript.Sampler.Value getMagnification();
    method public android.renderscript.Sampler.Value getMinification();
    method public android.renderscript.Sampler.Value getWrapS();
    method public android.renderscript.Sampler.Value getWrapT();
  }

  public static class Sampler.Builder {
    ctor public Sampler.Builder(android.renderscript.RenderScript);
    method public android.renderscript.Sampler create();
    method public void setAnisotropy(float);
    method public void setMagnification(android.renderscript.Sampler.Value);
    method public void setMinification(android.renderscript.Sampler.Value);
    method public void setWrapS(android.renderscript.Sampler.Value);
    method public void setWrapT(android.renderscript.Sampler.Value);
  }

  public static final class Sampler.Value extends java.lang.Enum {
    method public static android.renderscript.Sampler.Value valueOf(java.lang.String);
    method public static final android.renderscript.Sampler.Value[] values();
    enum_constant public static final android.renderscript.Sampler.Value CLAMP;
    enum_constant public static final android.renderscript.Sampler.Value LINEAR;
    enum_constant public static final android.renderscript.Sampler.Value LINEAR_MIP_LINEAR;
    enum_constant public static final android.renderscript.Sampler.Value LINEAR_MIP_NEAREST;
    enum_constant public static final android.renderscript.Sampler.Value MIRRORED_REPEAT;
    enum_constant public static final android.renderscript.Sampler.Value NEAREST;
    enum_constant public static final android.renderscript.Sampler.Value WRAP;
  }

  public class Script extends android.renderscript.BaseObj {
    method public void bindAllocation(android.renderscript.Allocation, int);
    method protected android.renderscript.Script.FieldID createFieldID(int, android.renderscript.Element);
    method protected android.renderscript.Script.InvokeID createInvokeID(int);
    method protected android.renderscript.Script.KernelID createKernelID(int, int, android.renderscript.Element, android.renderscript.Element);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method protected void forEach(int, android.renderscript.Allocation[], android.renderscript.Allocation, android.renderscript.FieldPacker);
    method protected void forEach(int, android.renderscript.Allocation[], android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
    method public boolean getVarB(int);
    method public double getVarD(int);
    method public float getVarF(int);
    method public int getVarI(int);
    method public long getVarJ(int);
    method public void getVarV(int, android.renderscript.FieldPacker);
    method protected void invoke(int);
    method protected void invoke(int, android.renderscript.FieldPacker);
    method public void setTimeZone(java.lang.String);
    method public void setVar(int, float);
    method public void setVar(int, double);
    method public void setVar(int, int);
    method public void setVar(int, long);
    method public void setVar(int, boolean);
    method public void setVar(int, android.renderscript.BaseObj);
    method public void setVar(int, android.renderscript.FieldPacker);
    method public void setVar(int, android.renderscript.FieldPacker, android.renderscript.Element, int[]);
  }

  public static class Script.Builder {
  }

  public static class Script.FieldBase {
    ctor protected Script.FieldBase();
    method public android.renderscript.Allocation getAllocation();
    method public android.renderscript.Element getElement();
    method public android.renderscript.Type getType();
    method protected void init(android.renderscript.RenderScript, int);
    method protected void init(android.renderscript.RenderScript, int, int);
    method public void updateAllocation();
    field protected android.renderscript.Allocation mAllocation;
    field protected android.renderscript.Element mElement;
  }

  public static final class Script.FieldID extends android.renderscript.BaseObj {
  }

  public static final class Script.InvokeID extends android.renderscript.BaseObj {
  }

  public static final class Script.KernelID extends android.renderscript.BaseObj {
  }

  public static final class Script.LaunchOptions {
    ctor public Script.LaunchOptions();
    method public int getXEnd();
    method public int getXStart();
    method public int getYEnd();
    method public int getYStart();
    method public int getZEnd();
    method public int getZStart();
    method public android.renderscript.Script.LaunchOptions setX(int, int);
    method public android.renderscript.Script.LaunchOptions setY(int, int);
    method public android.renderscript.Script.LaunchOptions setZ(int, int);
  }

  public class ScriptC extends android.renderscript.Script {
    ctor protected ScriptC(int, android.renderscript.RenderScript);
    ctor protected ScriptC(long, android.renderscript.RenderScript);
    ctor protected ScriptC(android.renderscript.RenderScript, android.content.res.Resources, int);
    ctor protected ScriptC(android.renderscript.RenderScript, java.lang.String, byte[], byte[]);
  }

  public final class ScriptGroup extends android.renderscript.BaseObj {
    method public void execute();
    method public void setInput(android.renderscript.Script.KernelID, android.renderscript.Allocation);
    method public void setOutput(android.renderscript.Script.KernelID, android.renderscript.Allocation);
  }

  public static final class ScriptGroup.Builder {
    ctor public ScriptGroup.Builder(android.renderscript.RenderScript);
    method public android.renderscript.ScriptGroup.Builder addConnection(android.renderscript.Type, android.renderscript.Script.KernelID, android.renderscript.Script.FieldID);
    method public android.renderscript.ScriptGroup.Builder addConnection(android.renderscript.Type, android.renderscript.Script.KernelID, android.renderscript.Script.KernelID);
    method public android.renderscript.ScriptGroup.Builder addKernel(android.renderscript.Script.KernelID);
    method public android.renderscript.ScriptGroup create();
  }

  public class ScriptGroup2 extends android.renderscript.BaseObj {
    ctor public ScriptGroup2(long, android.renderscript.RenderScript);
    method public java.lang.Object[] execute(java.lang.Object...);
  }

  public static final class ScriptGroup2.Binding {
    ctor public ScriptGroup2.Binding(android.renderscript.Script.FieldID, java.lang.Object);
    method public android.renderscript.Script.FieldID getField();
    method public java.lang.Object getValue();
  }

  public static final class ScriptGroup2.Builder {
    ctor public ScriptGroup2.Builder(android.renderscript.RenderScript);
    method public android.renderscript.ScriptGroup2.UnboundValue addInput();
    method public android.renderscript.ScriptGroup2.Closure addInvoke(android.renderscript.Script.InvokeID, java.lang.Object[], java.util.Map<android.renderscript.Script.FieldID, java.lang.Object>);
    method public android.renderscript.ScriptGroup2.Closure addInvoke(android.renderscript.Script.InvokeID, java.lang.Object...);
    method public android.renderscript.ScriptGroup2.Closure addKernel(android.renderscript.Script.KernelID, android.renderscript.Type, java.lang.Object[], java.util.Map<android.renderscript.Script.FieldID, java.lang.Object>);
    method public android.renderscript.ScriptGroup2.Closure addKernel(android.renderscript.Script.KernelID, android.renderscript.Type, java.lang.Object...);
    method public android.renderscript.ScriptGroup2 create(java.lang.String, android.renderscript.ScriptGroup2.Future...);
  }

  public static class ScriptGroup2.Closure extends android.renderscript.BaseObj {
    ctor public ScriptGroup2.Closure(long, android.renderscript.RenderScript);
    ctor public ScriptGroup2.Closure(android.renderscript.RenderScript, android.renderscript.Script.KernelID, android.renderscript.Type, java.lang.Object[], java.util.Map<android.renderscript.Script.FieldID, java.lang.Object>);
    ctor public ScriptGroup2.Closure(android.renderscript.RenderScript, android.renderscript.Script.InvokeID, java.lang.Object[], java.util.Map<android.renderscript.Script.FieldID, java.lang.Object>);
    method public android.renderscript.ScriptGroup2.Future getGlobal(android.renderscript.Script.FieldID);
    method public android.renderscript.ScriptGroup2.Future getReturn();
  }

  public static class ScriptGroup2.Future {
  }

  public static class ScriptGroup2.UnboundValue {
  }

  public abstract class ScriptIntrinsic extends android.renderscript.Script {
  }

  public final class ScriptIntrinsic3DLUT extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsic3DLUT create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.KernelID getKernelID();
    method public void setLUT(android.renderscript.Allocation);
  }

  public class ScriptIntrinsicBlend extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicBlend create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEachAdd(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachAdd(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachClear(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachClear(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachDst(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachDst(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachDstAtop(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachDstAtop(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachDstIn(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachDstIn(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachDstOut(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachDstOut(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachDstOver(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachDstOver(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachMultiply(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachMultiply(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachSrc(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachSrc(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachSrcAtop(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachSrcAtop(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachSrcIn(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachSrcIn(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachSrcOut(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachSrcOut(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachSrcOver(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachSrcOver(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachSubtract(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachSubtract(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEachXor(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEachXor(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.KernelID getKernelIDAdd();
    method public android.renderscript.Script.KernelID getKernelIDClear();
    method public android.renderscript.Script.KernelID getKernelIDDst();
    method public android.renderscript.Script.KernelID getKernelIDDstAtop();
    method public android.renderscript.Script.KernelID getKernelIDDstIn();
    method public android.renderscript.Script.KernelID getKernelIDDstOut();
    method public android.renderscript.Script.KernelID getKernelIDDstOver();
    method public android.renderscript.Script.KernelID getKernelIDMultiply();
    method public android.renderscript.Script.KernelID getKernelIDSrc();
    method public android.renderscript.Script.KernelID getKernelIDSrcAtop();
    method public android.renderscript.Script.KernelID getKernelIDSrcIn();
    method public android.renderscript.Script.KernelID getKernelIDSrcOut();
    method public android.renderscript.Script.KernelID getKernelIDSrcOver();
    method public android.renderscript.Script.KernelID getKernelIDSubtract();
    method public android.renderscript.Script.KernelID getKernelIDXor();
  }

  public final class ScriptIntrinsicBlur extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicBlur create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEach(android.renderscript.Allocation);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.FieldID getFieldID_Input();
    method public android.renderscript.Script.KernelID getKernelID();
    method public void setInput(android.renderscript.Allocation);
    method public void setRadius(float);
  }

  public final class ScriptIntrinsicColorMatrix extends android.renderscript.ScriptIntrinsic {
    method public static deprecated android.renderscript.ScriptIntrinsicColorMatrix create(android.renderscript.RenderScript, android.renderscript.Element);
    method public static android.renderscript.ScriptIntrinsicColorMatrix create(android.renderscript.RenderScript);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.KernelID getKernelID();
    method public void setAdd(android.renderscript.Float4);
    method public void setAdd(float, float, float, float);
    method public void setColorMatrix(android.renderscript.Matrix4f);
    method public void setColorMatrix(android.renderscript.Matrix3f);
    method public void setGreyscale();
    method public void setRGBtoYUV();
    method public void setYUVtoRGB();
  }

  public final class ScriptIntrinsicConvolve3x3 extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicConvolve3x3 create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEach(android.renderscript.Allocation);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.FieldID getFieldID_Input();
    method public android.renderscript.Script.KernelID getKernelID();
    method public void setCoefficients(float[]);
    method public void setInput(android.renderscript.Allocation);
  }

  public final class ScriptIntrinsicConvolve5x5 extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicConvolve5x5 create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEach(android.renderscript.Allocation);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.FieldID getFieldID_Input();
    method public android.renderscript.Script.KernelID getKernelID();
    method public void setCoefficients(float[]);
    method public void setInput(android.renderscript.Allocation);
  }

  public final class ScriptIntrinsicHistogram extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicHistogram create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEach(android.renderscript.Allocation);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public void forEach_Dot(android.renderscript.Allocation);
    method public void forEach_Dot(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.FieldID getFieldID_Input();
    method public android.renderscript.Script.KernelID getKernelID_Separate();
    method public void setDotCoefficients(float, float, float, float);
    method public void setOutput(android.renderscript.Allocation);
  }

  public final class ScriptIntrinsicLUT extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicLUT create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation);
    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.KernelID getKernelID();
    method public void setAlpha(int, int);
    method public void setBlue(int, int);
    method public void setGreen(int, int);
    method public void setRed(int, int);
  }

  public final class ScriptIntrinsicResize extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicResize create(android.renderscript.RenderScript);
    method public void forEach_bicubic(android.renderscript.Allocation);
    method public void forEach_bicubic(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    method public android.renderscript.Script.FieldID getFieldID_Input();
    method public android.renderscript.Script.KernelID getKernelID_bicubic();
    method public void setInput(android.renderscript.Allocation);
  }

  public final class ScriptIntrinsicYuvToRGB extends android.renderscript.ScriptIntrinsic {
    method public static android.renderscript.ScriptIntrinsicYuvToRGB create(android.renderscript.RenderScript, android.renderscript.Element);
    method public void forEach(android.renderscript.Allocation);
    method public android.renderscript.Script.FieldID getFieldID_Input();
    method public android.renderscript.Script.KernelID getKernelID();
    method public void setInput(android.renderscript.Allocation);
  }

  public class Short2 {
    ctor public Short2();
    ctor public Short2(short, short);
    field public short x;
    field public short y;
  }

  public class Short3 {
    ctor public Short3();
    ctor public Short3(short, short, short);
    field public short x;
    field public short y;
    field public short z;
  }

  public class Short4 {
    ctor public Short4();
    ctor public Short4(short, short, short, short);
    field public short w;
    field public short x;
    field public short y;
    field public short z;
  }

  public class Type extends android.renderscript.BaseObj {
    method public static android.renderscript.Type createX(android.renderscript.RenderScript, android.renderscript.Element, int);
    method public static android.renderscript.Type createXY(android.renderscript.RenderScript, android.renderscript.Element, int, int);
    method public static android.renderscript.Type createXYZ(android.renderscript.RenderScript, android.renderscript.Element, int, int, int);
    method public int getArray(int);
    method public int getArrayCount();
    method public int getCount();
    method public android.renderscript.Element getElement();
    method public int getX();
    method public int getY();
    method public int getYuv();
    method public int getZ();
    method public boolean hasFaces();
    method public boolean hasMipmaps();
  }

  public static class Type.Builder {
    ctor public Type.Builder(android.renderscript.RenderScript, android.renderscript.Element);
    method public android.renderscript.Type create();
    method public android.renderscript.Type.Builder setArray(int, int);
    method public android.renderscript.Type.Builder setFaces(boolean);
    method public android.renderscript.Type.Builder setMipmaps(boolean);
    method public android.renderscript.Type.Builder setX(int);
    method public android.renderscript.Type.Builder setY(int);
    method public android.renderscript.Type.Builder setYuvFormat(int);
    method public android.renderscript.Type.Builder setZ(int);
  }

  public static final class Type.CubemapFace extends java.lang.Enum {
    method public static android.renderscript.Type.CubemapFace valueOf(java.lang.String);
    method public static final android.renderscript.Type.CubemapFace[] values();
    enum_constant public static final android.renderscript.Type.CubemapFace NEGATIVE_X;
    enum_constant public static final android.renderscript.Type.CubemapFace NEGATIVE_Y;
    enum_constant public static final android.renderscript.Type.CubemapFace NEGATIVE_Z;
    enum_constant public static final android.renderscript.Type.CubemapFace POSITIVE_X;
    enum_constant public static final android.renderscript.Type.CubemapFace POSITIVE_Y;
    enum_constant public static final android.renderscript.Type.CubemapFace POSITIVE_Z;
    enum_constant public static final deprecated android.renderscript.Type.CubemapFace POSITVE_X;
    enum_constant public static final deprecated android.renderscript.Type.CubemapFace POSITVE_Y;
    enum_constant public static final deprecated android.renderscript.Type.CubemapFace POSITVE_Z;
  }

}

package android.sax {

  public class Element {
    method public android.sax.Element getChild(java.lang.String);
    method public android.sax.Element getChild(java.lang.String, java.lang.String);
    method public android.sax.Element requireChild(java.lang.String);
    method public android.sax.Element requireChild(java.lang.String, java.lang.String);
    method public void setElementListener(android.sax.ElementListener);
    method public void setEndElementListener(android.sax.EndElementListener);
    method public void setEndTextElementListener(android.sax.EndTextElementListener);
    method public void setStartElementListener(android.sax.StartElementListener);
    method public void setTextElementListener(android.sax.TextElementListener);
  }

  public abstract interface ElementListener implements android.sax.EndElementListener android.sax.StartElementListener {
  }

  public abstract interface EndElementListener {
    method public abstract void end();
  }

  public abstract interface EndTextElementListener {
    method public abstract void end(java.lang.String);
  }

  public class RootElement extends android.sax.Element {
    ctor public RootElement(java.lang.String, java.lang.String);
    ctor public RootElement(java.lang.String);
    method public org.xml.sax.ContentHandler getContentHandler();
  }

  public abstract interface StartElementListener {
    method public abstract void start(org.xml.sax.Attributes);
  }

  public abstract interface TextElementListener implements android.sax.EndTextElementListener android.sax.StartElementListener {
  }

}

package android.security {

  public class CryptoOperationException extends java.lang.RuntimeException {
    ctor public CryptoOperationException();
    ctor public CryptoOperationException(java.lang.String);
    ctor public CryptoOperationException(java.lang.String, java.lang.Throwable);
    ctor public CryptoOperationException(java.lang.Throwable);
  }

  public class EcIesParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    method public int getDemCipherKeySize();
    method public java.lang.String getDemCipherTransformation();
    method public java.lang.String getDemMacAlgorithm();
    method public int getDemMacKeySize();
    method public java.lang.String getKemKdfAlgorithm();
    method public int getKemPointFormat();
    field public static final android.security.EcIesParameterSpec DEFAULT;
  }

  public static class EcIesParameterSpec.Builder {
    ctor public EcIesParameterSpec.Builder();
    method public android.security.EcIesParameterSpec build();
    method public android.security.EcIesParameterSpec.Builder setDemCipherKeySize(int);
    method public android.security.EcIesParameterSpec.Builder setDemCipherTransformation(java.lang.String);
    method public android.security.EcIesParameterSpec.Builder setDemMacAlgorithm(java.lang.String);
    method public android.security.EcIesParameterSpec.Builder setDemMacKeySize(int);
    method public android.security.EcIesParameterSpec.Builder setKemKdfAlgorithm(java.lang.String);
    method public android.security.EcIesParameterSpec.Builder setKemPointFormat(int);
  }

  public static abstract class EcIesParameterSpec.PointFormat {
    field public static final int COMPRESSED = 1; // 0x1
    field public static final int UNCOMPRESSED = 0; // 0x0
    field public static final int UNSPECIFIED = -1; // 0xffffffff
  }

  public static abstract class EcIesParameterSpec.PointFormatEnum implements java.lang.annotation.Annotation {
  }

  public final class KeyChain {
    ctor public KeyChain();
    method public static void choosePrivateKeyAlias(android.app.Activity, android.security.KeyChainAliasCallback, java.lang.String[], java.security.Principal[], java.lang.String, int, java.lang.String);
    method public static void choosePrivateKeyAlias(android.app.Activity, android.security.KeyChainAliasCallback, java.lang.String[], java.security.Principal[], java.lang.String, int, java.lang.String, java.lang.String);
    method public static android.content.Intent createInstallIntent();
    method public static java.security.cert.X509Certificate[] getCertificateChain(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException;
    method public static java.security.PrivateKey getPrivateKey(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException;
    method public static boolean isBoundKeyAlgorithm(java.lang.String);
    method public static boolean isKeyAlgorithmSupported(java.lang.String);
    field public static final java.lang.String ACTION_STORAGE_CHANGED = "android.security.STORAGE_CHANGED";
    field public static final java.lang.String EXTRA_CERTIFICATE = "CERT";
    field public static final java.lang.String EXTRA_NAME = "name";
    field public static final java.lang.String EXTRA_PKCS12 = "PKCS12";
  }

  public abstract interface KeyChainAliasCallback {
    method public abstract void alias(java.lang.String);
  }

  public class KeyChainException extends java.lang.Exception {
    ctor public KeyChainException();
    ctor public KeyChainException(java.lang.String);
    ctor public KeyChainException(java.lang.String, java.lang.Throwable);
    ctor public KeyChainException(java.lang.Throwable);
  }

  public class KeyExpiredException extends android.security.CryptoOperationException {
    ctor public KeyExpiredException();
    ctor public KeyExpiredException(java.lang.String);
    ctor public KeyExpiredException(java.lang.String, java.lang.Throwable);
  }

  public class KeyGeneratorSpec implements java.security.spec.AlgorithmParameterSpec {
    method public java.lang.String[] getBlockModes();
    method public android.content.Context getContext();
    method public java.lang.String[] getEncryptionPaddings();
    method public int getKeySize();
    method public java.util.Date getKeyValidityForConsumptionEnd();
    method public java.util.Date getKeyValidityForOriginationEnd();
    method public java.util.Date getKeyValidityStart();
    method public java.lang.String getKeystoreAlias();
    method public int getPurposes();
    method public int getUserAuthenticationValidityDurationSeconds();
    method public int getUserAuthenticators();
    method public boolean isEncryptionRequired();
    method public boolean isInvalidatedOnNewFingerprintEnrolled();
    method public boolean isRandomizedEncryptionRequired();
  }

  public static class KeyGeneratorSpec.Builder {
    ctor public KeyGeneratorSpec.Builder(android.content.Context);
    method public android.security.KeyGeneratorSpec build();
    method public android.security.KeyGeneratorSpec.Builder setAlias(java.lang.String);
    method public android.security.KeyGeneratorSpec.Builder setBlockModes(java.lang.String...);
    method public android.security.KeyGeneratorSpec.Builder setEncryptionPaddings(java.lang.String...);
    method public android.security.KeyGeneratorSpec.Builder setEncryptionRequired(boolean);
    method public android.security.KeyGeneratorSpec.Builder setInvalidatedOnNewFingerprintEnrolled(boolean);
    method public android.security.KeyGeneratorSpec.Builder setKeySize(int);
    method public android.security.KeyGeneratorSpec.Builder setKeyValidityEnd(java.util.Date);
    method public android.security.KeyGeneratorSpec.Builder setKeyValidityForConsumptionEnd(java.util.Date);
    method public android.security.KeyGeneratorSpec.Builder setKeyValidityForOriginationEnd(java.util.Date);
    method public android.security.KeyGeneratorSpec.Builder setKeyValidityStart(java.util.Date);
    method public android.security.KeyGeneratorSpec.Builder setPurposes(int);
    method public android.security.KeyGeneratorSpec.Builder setRandomizedEncryptionRequired(boolean);
    method public android.security.KeyGeneratorSpec.Builder setUserAuthenticationValidityDurationSeconds(int);
    method public android.security.KeyGeneratorSpec.Builder setUserAuthenticators(int);
  }

  public class KeyNotYetValidException extends android.security.CryptoOperationException {
    ctor public KeyNotYetValidException();
    ctor public KeyNotYetValidException(java.lang.String);
    ctor public KeyNotYetValidException(java.lang.String, java.lang.Throwable);
  }

  public final class KeyPairGeneratorSpec implements java.security.spec.AlgorithmParameterSpec {
    method public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec();
    method public java.lang.String[] getBlockModes();
    method public android.content.Context getContext();
    method public java.lang.String[] getDigests();
    method public java.lang.String[] getEncryptionPaddings();
    method public java.util.Date getEndDate();
    method public int getKeySize();
    method public java.lang.String getKeyType();
    method public java.util.Date getKeyValidityForConsumptionEnd();
    method public java.util.Date getKeyValidityForOriginationEnd();
    method public java.util.Date getKeyValidityStart();
    method public java.lang.String getKeystoreAlias();
    method public int getPurposes();
    method public java.math.BigInteger getSerialNumber();
    method public java.lang.String[] getSignaturePaddings();
    method public java.util.Date getStartDate();
    method public javax.security.auth.x500.X500Principal getSubjectDN();
    method public int getUserAuthenticationValidityDurationSeconds();
    method public int getUserAuthenticators();
    method public boolean isEncryptionRequired();
    method public boolean isInvalidatedOnNewFingerprintEnrolled();
    method public boolean isRandomizedEncryptionRequired();
  }

  public static final class KeyPairGeneratorSpec.Builder {
    ctor public KeyPairGeneratorSpec.Builder(android.content.Context);
    method public android.security.KeyPairGeneratorSpec build();
    method public android.security.KeyPairGeneratorSpec.Builder setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec);
    method public android.security.KeyPairGeneratorSpec.Builder setAlias(java.lang.String);
    method public android.security.KeyPairGeneratorSpec.Builder setBlockModes(java.lang.String...);
    method public android.security.KeyPairGeneratorSpec.Builder setDigests(java.lang.String...);
    method public android.security.KeyPairGeneratorSpec.Builder setEncryptionPaddings(java.lang.String...);
    method public android.security.KeyPairGeneratorSpec.Builder setEncryptionRequired();
    method public android.security.KeyPairGeneratorSpec.Builder setEndDate(java.util.Date);
    method public android.security.KeyPairGeneratorSpec.Builder setInvalidatedOnNewFingerprintEnrolled(boolean);
    method public android.security.KeyPairGeneratorSpec.Builder setKeySize(int);
    method public android.security.KeyPairGeneratorSpec.Builder setKeyType(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public android.security.KeyPairGeneratorSpec.Builder setKeyValidityEnd(java.util.Date);
    method public android.security.KeyPairGeneratorSpec.Builder setKeyValidityForConsumptionEnd(java.util.Date);
    method public android.security.KeyPairGeneratorSpec.Builder setKeyValidityForOriginationEnd(java.util.Date);
    method public android.security.KeyPairGeneratorSpec.Builder setKeyValidityStart(java.util.Date);
    method public android.security.KeyPairGeneratorSpec.Builder setPurposes(int);
    method public android.security.KeyPairGeneratorSpec.Builder setRandomizedEncryptionRequired(boolean);
    method public android.security.KeyPairGeneratorSpec.Builder setSerialNumber(java.math.BigInteger);
    method public android.security.KeyPairGeneratorSpec.Builder setSignaturePaddings(java.lang.String...);
    method public android.security.KeyPairGeneratorSpec.Builder setStartDate(java.util.Date);
    method public android.security.KeyPairGeneratorSpec.Builder setSubject(javax.security.auth.x500.X500Principal);
    method public android.security.KeyPairGeneratorSpec.Builder setUserAuthenticationValidityDurationSeconds(int);
    method public android.security.KeyPairGeneratorSpec.Builder setUserAuthenticators(int);
  }

  public abstract class KeyStoreKeyProperties {
  }

  public static abstract class KeyStoreKeyProperties.Origin {
    field public static final int GENERATED = 1; // 0x1
    field public static final int IMPORTED = 2; // 0x2
  }

  public static abstract class KeyStoreKeyProperties.OriginEnum implements java.lang.annotation.Annotation {
  }

  public static abstract class KeyStoreKeyProperties.Purpose {
    field public static final int DECRYPT = 2; // 0x2
    field public static final int ENCRYPT = 1; // 0x1
    field public static final int SIGN = 4; // 0x4
    field public static final int VERIFY = 8; // 0x8
  }

  public static abstract class KeyStoreKeyProperties.PurposeEnum implements java.lang.annotation.Annotation {
  }

  public static abstract class KeyStoreKeyProperties.UserAuthenticator {
    field public static final int FINGERPRINT_READER = 2; // 0x2
    field public static final int LOCK_SCREEN = 1; // 0x1
  }

  public static abstract class KeyStoreKeyProperties.UserAuthenticatorEnum implements java.lang.annotation.Annotation {
  }

  public class KeyStoreKeySpec implements java.security.spec.KeySpec {
    method public java.lang.String[] getBlockModes();
    method public java.lang.String[] getDigests();
    method public java.lang.String[] getEncryptionPaddings();
    method public int getKeySize();
    method public java.util.Date getKeyValidityForConsumptionEnd();
    method public java.util.Date getKeyValidityForOriginationEnd();
    method public java.util.Date getKeyValidityStart();
    method public java.lang.String getKeystoreAlias();
    method public int getOrigin();
    method public int getPurposes();
    method public java.lang.String[] getSignaturePaddings();
    method public int getTeeEnforcedUserAuthenticators();
    method public int getUserAuthenticationValidityDurationSeconds();
    method public int getUserAuthenticators();
    method public boolean isInvalidatedOnNewFingerprintEnrolled();
    method public boolean isTeeBacked();
  }

  public final class KeyStoreParameter implements java.security.KeyStore.ProtectionParameter {
    method public java.lang.String[] getBlockModes();
    method public java.lang.String[] getDigests();
    method public java.lang.String[] getEncryptionPaddings();
    method public java.util.Date getKeyValidityForConsumptionEnd();
    method public java.util.Date getKeyValidityForOriginationEnd();
    method public java.util.Date getKeyValidityStart();
    method public int getPurposes();
    method public java.lang.String[] getSignaturePaddings();
    method public int getUserAuthenticationValidityDurationSeconds();
    method public int getUserAuthenticators();
    method public boolean isDigestsSpecified();
    method public boolean isEncryptionRequired();
    method public boolean isInvalidatedOnNewFingerprintEnrolled();
    method public boolean isRandomizedEncryptionRequired();
  }

  public static final class KeyStoreParameter.Builder {
    ctor public KeyStoreParameter.Builder(android.content.Context);
    method public android.security.KeyStoreParameter build();
    method public android.security.KeyStoreParameter.Builder setBlockModes(java.lang.String...);
    method public android.security.KeyStoreParameter.Builder setDigests(java.lang.String...);
    method public android.security.KeyStoreParameter.Builder setEncryptionPaddings(java.lang.String...);
    method public android.security.KeyStoreParameter.Builder setEncryptionRequired(boolean);
    method public android.security.KeyStoreParameter.Builder setInvalidatedOnNewFingerprintEnrolled(boolean);
    method public android.security.KeyStoreParameter.Builder setKeyValidityEnd(java.util.Date);
    method public android.security.KeyStoreParameter.Builder setKeyValidityForConsumptionEnd(java.util.Date);
    method public android.security.KeyStoreParameter.Builder setKeyValidityForOriginationEnd(java.util.Date);
    method public android.security.KeyStoreParameter.Builder setKeyValidityStart(java.util.Date);
    method public android.security.KeyStoreParameter.Builder setPurposes(int);
    method public android.security.KeyStoreParameter.Builder setRandomizedEncryptionRequired(boolean);
    method public android.security.KeyStoreParameter.Builder setSignaturePaddings(java.lang.String...);
    method public android.security.KeyStoreParameter.Builder setUserAuthenticationValidityDurationSeconds(int);
    method public android.security.KeyStoreParameter.Builder setUserAuthenticators(int);
  }

  public class NetworkSecurityPolicy {
    method public static android.security.NetworkSecurityPolicy getInstance();
    method public boolean isCleartextTrafficPermitted();
  }

  public class NewFingerprintEnrolledException extends android.security.CryptoOperationException {
    ctor public NewFingerprintEnrolledException();
    ctor public NewFingerprintEnrolledException(java.lang.String);
  }

  public class UserNotAuthenticatedException extends android.security.CryptoOperationException {
    ctor public UserNotAuthenticatedException();
    ctor public UserNotAuthenticatedException(java.lang.String);
    ctor public UserNotAuthenticatedException(java.lang.String, java.lang.Throwable);
  }

}

package android.service.carrier {

  public abstract class CarrierMessagingService extends android.app.Service {
    ctor public CarrierMessagingService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onDownloadMms(android.net.Uri, int, android.net.Uri, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Integer>);
    method public void onFilterSms(android.service.carrier.MessagePdu, java.lang.String, int, int, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Boolean>);
    method public void onSendDataSms(byte[], int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>);
    method public void onSendMms(android.net.Uri, int, android.net.Uri, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMmsResult>);
    method public void onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>);
    method public void onSendTextSms(java.lang.String, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>);
    field public static final int DOWNLOAD_STATUS_ERROR = 2; // 0x2
    field public static final int DOWNLOAD_STATUS_OK = 0; // 0x0
    field public static final int DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1
    field public static final int SEND_STATUS_ERROR = 2; // 0x2
    field public static final int SEND_STATUS_OK = 0; // 0x0
    field public static final int SEND_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.carrier.CarrierMessagingService";
  }

  public static abstract interface CarrierMessagingService.ResultCallback {
    method public abstract void onReceiveResult(T) throws android.os.RemoteException;
  }

  public static final class CarrierMessagingService.SendMmsResult {
    ctor public CarrierMessagingService.SendMmsResult(int, byte[]);
    method public byte[] getSendConfPdu();
    method public int getSendStatus();
  }

  public static final class CarrierMessagingService.SendMultipartSmsResult {
    ctor public CarrierMessagingService.SendMultipartSmsResult(int, int[]);
    method public int[] getMessageRefs();
    method public int getSendStatus();
  }

  public static final class CarrierMessagingService.SendSmsResult {
    ctor public CarrierMessagingService.SendSmsResult(int, int);
    method public int getMessageRef();
    method public int getSendStatus();
  }

  public final class MessagePdu implements android.os.Parcelable {
    ctor public MessagePdu(java.util.List<byte[]>);
    method public int describeContents();
    method public java.util.List<byte[]> getPdus();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.carrier.MessagePdu> CREATOR;
  }

}

package android.service.chooser {

  public final class ChooserTarget implements android.os.Parcelable {
    ctor public ChooserTarget(java.lang.CharSequence, android.graphics.Bitmap, float, android.app.PendingIntent);
    ctor public ChooserTarget(java.lang.CharSequence, android.graphics.Bitmap, float, android.content.IntentSender);
    ctor public ChooserTarget(java.lang.CharSequence, android.graphics.Bitmap, float, android.content.Intent);
    method public int describeContents();
    method public android.graphics.Bitmap getIcon();
    method public android.content.Intent getIntent();
    method public android.content.IntentSender getIntentSender();
    method public float getScore();
    method public java.lang.CharSequence getTitle();
    method public boolean sendIntent(android.content.Context, android.content.Intent);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.chooser.ChooserTarget> CREATOR;
  }

  public abstract class ChooserTargetService extends android.app.Service {
    ctor public ChooserTargetService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract java.util.List<android.service.chooser.ChooserTarget> onGetChooserTargets(android.content.ComponentName, android.content.IntentFilter);
    field public static final java.lang.String BIND_PERMISSION = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
    field public static final java.lang.String META_DATA_NAME = "android.service.chooser.chooser_target_service";
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.chooser.ChooserTargetService";
  }

}

package android.service.dreams {

  public class DreamService extends android.app.Service implements android.view.Window.Callback {
    ctor public DreamService();
    method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method public boolean dispatchKeyEvent(android.view.KeyEvent);
    method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent);
    method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public android.view.View findViewById(int);
    method public final void finish();
    method public android.view.Window getWindow();
    method public android.view.WindowManager getWindowManager();
    method public boolean isFullscreen();
    method public boolean isInteractive();
    method public boolean isScreenBright();
    method public void onActionModeFinished(android.view.ActionMode);
    method public void onActionModeStarted(android.view.ActionMode);
    method public void onAttachedToWindow();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public void onContentChanged();
    method public boolean onCreatePanelMenu(int, android.view.Menu);
    method public android.view.View onCreatePanelView(int);
    method public void onDetachedFromWindow();
    method public void onDreamingStarted();
    method public void onDreamingStopped();
    method public boolean onMenuItemSelected(int, android.view.MenuItem);
    method public boolean onMenuOpened(int, android.view.Menu);
    method public void onPanelClosed(int, android.view.Menu);
    method public boolean onPreparePanel(int, android.view.View, android.view.Menu);
    method public boolean onSearchRequested(android.view.SearchEvent);
    method public boolean onSearchRequested();
    method public void onWakeUp();
    method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams);
    method public void onWindowFocusChanged(boolean);
    method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
    method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
    method public void setContentView(int);
    method public void setContentView(android.view.View);
    method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public void setFullscreen(boolean);
    method public void setInteractive(boolean);
    method public void setScreenBright(boolean);
    method public final void wakeUp();
    field public static final java.lang.String DREAM_META_DATA = "android.service.dream";
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.dreams.DreamService";
  }

}

package android.service.media {

  public abstract class MediaBrowserService extends android.app.Service {
    ctor public MediaBrowserService();
    method public void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public void getMediaItem(java.lang.String, android.service.media.MediaBrowserService.Result<android.media.browse.MediaBrowser.MediaItem>) throws java.lang.UnsupportedOperationException;
    method public android.media.session.MediaSession.Token getSessionToken();
    method public void notifyChildrenChanged(java.lang.String);
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract android.service.media.MediaBrowserService.BrowserRoot onGetRoot(java.lang.String, int, android.os.Bundle);
    method public abstract void onLoadChildren(java.lang.String, android.service.media.MediaBrowserService.Result<java.util.List<android.media.browse.MediaBrowser.MediaItem>>);
    method public void setSessionToken(android.media.session.MediaSession.Token);
    field public static final java.lang.String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
  }

  public static final class MediaBrowserService.BrowserRoot {
    ctor public MediaBrowserService.BrowserRoot(java.lang.String, android.os.Bundle);
    method public android.os.Bundle getExtras();
    method public java.lang.String getRootId();
  }

  public class MediaBrowserService.Result {
    method public void detach();
    method public void sendResult(T);
  }

}

package android.service.notification {

  public abstract class NotificationListenerService extends android.app.Service {
    ctor public NotificationListenerService();
    method public final void cancelAllNotifications();
    method public final deprecated void cancelNotification(java.lang.String, java.lang.String, int);
    method public final void cancelNotification(java.lang.String);
    method public final void cancelNotifications(java.lang.String[]);
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.service.notification.StatusBarNotification[] getActiveNotifications(java.lang.String[]);
    method public final int getCurrentInterruptionFilter();
    method public final int getCurrentListenerHints();
    method public android.service.notification.NotificationListenerService.RankingMap getCurrentRanking();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onInterruptionFilterChanged(int);
    method public void onListenerConnected();
    method public void onListenerHintsChanged(int);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification);
    method public void onNotificationPosted(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
    method public void onNotificationRankingUpdate(android.service.notification.NotificationListenerService.RankingMap);
    method public void onNotificationRemoved(android.service.notification.StatusBarNotification);
    method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
    method public final void requestInterruptionFilter(int);
    method public final void requestListenerHints(int);
    field public static final int HINT_HOST_DISABLE_EFFECTS = 1; // 0x1
    field public static final int INTERRUPTION_FILTER_ALARMS = 4; // 0x4
    field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1
    field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3
    field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2
    field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService";
  }

  public static class NotificationListenerService.Ranking {
    ctor public NotificationListenerService.Ranking();
    method public java.lang.String getKey();
    method public int getRank();
    method public boolean isAmbient();
    method public boolean matchesInterruptionFilter();
  }

  public static class NotificationListenerService.RankingMap implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String[] getOrderedKeys();
    method public boolean getRanking(java.lang.String, android.service.notification.NotificationListenerService.Ranking);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.notification.NotificationListenerService.RankingMap> CREATOR;
  }

  public class StatusBarNotification implements android.os.Parcelable {
    ctor public StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long);
    ctor public StatusBarNotification(android.os.Parcel);
    method public android.service.notification.StatusBarNotification clone();
    method public int describeContents();
    method public java.lang.String getGroupKey();
    method public int getId();
    method public java.lang.String getKey();
    method public android.app.Notification getNotification();
    method public java.lang.String getPackageName();
    method public long getPostTime();
    method public java.lang.String getTag();
    method public android.os.UserHandle getUser();
    method public deprecated int getUserId();
    method public boolean isClearable();
    method public boolean isOngoing();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.notification.StatusBarNotification> CREATOR;
  }

}

package android.service.restrictions {

  public abstract class RestrictionsReceiver extends android.content.BroadcastReceiver {
    ctor public RestrictionsReceiver();
    method public void onReceive(android.content.Context, android.content.Intent);
    method public abstract void onRequestPermission(android.content.Context, java.lang.String, java.lang.String, java.lang.String, android.os.PersistableBundle);
  }

}

package android.service.textservice {

  public abstract class SpellCheckerService extends android.app.Service {
    ctor public SpellCheckerService();
    method public abstract android.service.textservice.SpellCheckerService.Session createSession();
    method public final android.os.IBinder onBind(android.content.Intent);
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.textservice.SpellCheckerService";
  }

  public static abstract class SpellCheckerService.Session {
    ctor public SpellCheckerService.Session();
    method public android.os.Bundle getBundle();
    method public java.lang.String getLocale();
    method public void onCancel();
    method public void onClose();
    method public abstract void onCreate();
    method public android.view.textservice.SentenceSuggestionsInfo[] onGetSentenceSuggestionsMultiple(android.view.textservice.TextInfo[], int);
    method public abstract android.view.textservice.SuggestionsInfo onGetSuggestions(android.view.textservice.TextInfo, int);
    method public android.view.textservice.SuggestionsInfo[] onGetSuggestionsMultiple(android.view.textservice.TextInfo[], int, boolean);
  }

}

package android.service.voice {

  public class AlwaysOnHotwordDetector {
    method public android.content.Intent createEnrollIntent();
    method public android.content.Intent createReEnrollIntent();
    method public android.content.Intent createUnEnrollIntent();
    method public int getSupportedRecognitionModes();
    method public boolean startRecognition(int);
    method public boolean stopRecognition();
    field public static final int RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS = 2; // 0x2
    field public static final int RECOGNITION_FLAG_CAPTURE_TRIGGER_AUDIO = 1; // 0x1
    field public static final int RECOGNITION_MODE_USER_IDENTIFICATION = 2; // 0x2
    field public static final int RECOGNITION_MODE_VOICE_TRIGGER = 1; // 0x1
    field public static final int STATE_HARDWARE_UNAVAILABLE = -2; // 0xfffffffe
    field public static final int STATE_KEYPHRASE_ENROLLED = 2; // 0x2
    field public static final int STATE_KEYPHRASE_UNENROLLED = 1; // 0x1
    field public static final int STATE_KEYPHRASE_UNSUPPORTED = -1; // 0xffffffff
  }

  public static abstract class AlwaysOnHotwordDetector.Callback {
    ctor public AlwaysOnHotwordDetector.Callback();
    method public abstract void onAvailabilityChanged(int);
    method public abstract void onDetected(android.service.voice.AlwaysOnHotwordDetector.EventPayload);
    method public abstract void onError();
    method public abstract void onRecognitionPaused();
    method public abstract void onRecognitionResumed();
  }

  public static class AlwaysOnHotwordDetector.EventPayload {
    method public android.media.AudioFormat getCaptureAudioFormat();
    method public byte[] getTriggerAudio();
  }

  public class VoiceInteractionService extends android.app.Service {
    ctor public VoiceInteractionService();
    method public final android.service.voice.AlwaysOnHotwordDetector createAlwaysOnHotwordDetector(java.lang.String, java.util.Locale, android.service.voice.AlwaysOnHotwordDetector.Callback);
    method public static boolean isActiveService(android.content.Context, android.content.ComponentName);
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onReady();
    method public void onShutdown();
    method public void showSession(android.os.Bundle, int);
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.voice.VoiceInteractionService";
    field public static final java.lang.String SERVICE_META_DATA = "android.voice_interaction";
    field public static final int START_SOURCE_ASSIST_GESTURE = 4; // 0x4
    field public static final int START_WITH_ASSIST = 1; // 0x1
    field public static final int START_WITH_SCREENSHOT = 2; // 0x2
  }

  public abstract class VoiceInteractionSession implements android.view.KeyEvent.Callback {
    ctor public VoiceInteractionSession(android.content.Context);
    ctor public VoiceInteractionSession(android.content.Context, android.os.Handler);
    method public void finish();
    method public android.content.Context getContext();
    method public android.view.LayoutInflater getLayoutInflater();
    method public android.app.Dialog getWindow();
    method public void hide();
    method public void hideWindow();
    method public void onAbortVoice(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle);
    method public void onBackPressed();
    method public abstract void onCancel(android.service.voice.VoiceInteractionSession.Request);
    method public void onCloseSystemDialogs();
    method public abstract void onCommand(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.String, android.os.Bundle);
    method public void onCompleteVoice(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle);
    method public void onComputeInsets(android.service.voice.VoiceInteractionSession.Insets);
    method public abstract void onConfirm(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle);
    method public void onCreate(android.os.Bundle, int);
    method public android.view.View onCreateContentView();
    method public void onDestroy();
    method public boolean[] onGetSupportedCommands(android.service.voice.VoiceInteractionSession.Caller, java.lang.String[]);
    method public void onHandleAssist(android.os.Bundle);
    method public void onHandleScreenshot(android.graphics.Bitmap);
    method public void onHide();
    method public boolean onKeyDown(int, android.view.KeyEvent);
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public abstract void onPickOption(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onShow(android.os.Bundle, int);
    method public void onTaskFinished(android.content.Intent, int);
    method public void onTaskStarted(android.content.Intent, int);
    method public void setContentView(android.view.View);
    method public void setKeepAwake(boolean);
    method public void setTheme(int);
    method public void show();
    method public void showWindow();
    method public void startVoiceActivity(android.content.Intent);
  }

  public static class VoiceInteractionSession.Caller {
  }

  public static final class VoiceInteractionSession.Insets {
    ctor public VoiceInteractionSession.Insets();
    field public static final int TOUCHABLE_INSETS_CONTENT = 1; // 0x1
    field public static final int TOUCHABLE_INSETS_FRAME = 0; // 0x0
    field public static final int TOUCHABLE_INSETS_REGION = 3; // 0x3
    field public final android.graphics.Rect contentInsets;
    field public int touchableInsets;
    field public final android.graphics.Region touchableRegion;
  }

  public static class VoiceInteractionSession.Request {
    method public void sendAbortVoiceResult(android.os.Bundle);
    method public void sendCancelResult();
    method public void sendCommandResult(boolean, android.os.Bundle);
    method public void sendCompleteVoiceResult(android.os.Bundle);
    method public void sendConfirmResult(boolean, android.os.Bundle);
    method public void sendPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }

  public abstract class VoiceInteractionSessionService extends android.app.Service {
    ctor public VoiceInteractionSessionService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract android.service.voice.VoiceInteractionSession onNewSession(android.os.Bundle);
  }

}

package android.service.wallpaper {

  public abstract class WallpaperService extends android.app.Service {
    ctor public WallpaperService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract android.service.wallpaper.WallpaperService.Engine onCreateEngine();
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.wallpaper.WallpaperService";
    field public static final java.lang.String SERVICE_META_DATA = "android.service.wallpaper";
  }

  public class WallpaperService.Engine {
    ctor public WallpaperService.Engine();
    method protected void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public int getDesiredMinimumHeight();
    method public int getDesiredMinimumWidth();
    method public android.view.SurfaceHolder getSurfaceHolder();
    method public boolean isPreview();
    method public boolean isVisible();
    method public void onApplyWindowInsets(android.view.WindowInsets);
    method public android.os.Bundle onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean);
    method public void onCreate(android.view.SurfaceHolder);
    method public void onDesiredSizeChanged(int, int);
    method public void onDestroy();
    method public void onOffsetsChanged(float, float, float, float, int, int);
    method public void onSurfaceChanged(android.view.SurfaceHolder, int, int, int);
    method public void onSurfaceCreated(android.view.SurfaceHolder);
    method public void onSurfaceDestroyed(android.view.SurfaceHolder);
    method public void onSurfaceRedrawNeeded(android.view.SurfaceHolder);
    method public void onTouchEvent(android.view.MotionEvent);
    method public void onVisibilityChanged(boolean);
    method public void setOffsetNotificationsEnabled(boolean);
    method public void setTouchEventsEnabled(boolean);
  }

}

package android.speech {

  public abstract interface RecognitionListener {
    method public abstract void onBeginningOfSpeech();
    method public abstract void onBufferReceived(byte[]);
    method public abstract void onEndOfSpeech();
    method public abstract void onError(int);
    method public abstract void onEvent(int, android.os.Bundle);
    method public abstract void onPartialResults(android.os.Bundle);
    method public abstract void onReadyForSpeech(android.os.Bundle);
    method public abstract void onResults(android.os.Bundle);
    method public abstract void onRmsChanged(float);
  }

  public abstract class RecognitionService extends android.app.Service {
    ctor public RecognitionService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method protected abstract void onCancel(android.speech.RecognitionService.Callback);
    method protected abstract void onStartListening(android.content.Intent, android.speech.RecognitionService.Callback);
    method protected abstract void onStopListening(android.speech.RecognitionService.Callback);
    field public static final java.lang.String SERVICE_INTERFACE = "android.speech.RecognitionService";
    field public static final java.lang.String SERVICE_META_DATA = "android.speech";
  }

  public class RecognitionService.Callback {
    method public void beginningOfSpeech() throws android.os.RemoteException;
    method public void bufferReceived(byte[]) throws android.os.RemoteException;
    method public void endOfSpeech() throws android.os.RemoteException;
    method public void error(int) throws android.os.RemoteException;
    method public void partialResults(android.os.Bundle) throws android.os.RemoteException;
    method public void readyForSpeech(android.os.Bundle) throws android.os.RemoteException;
    method public void results(android.os.Bundle) throws android.os.RemoteException;
    method public void rmsChanged(float) throws android.os.RemoteException;
  }

  public class RecognizerIntent {
    method public static final android.content.Intent getVoiceDetailsIntent(android.content.Context);
    field public static final java.lang.String ACTION_GET_LANGUAGE_DETAILS = "android.speech.action.GET_LANGUAGE_DETAILS";
    field public static final java.lang.String ACTION_RECOGNIZE_SPEECH = "android.speech.action.RECOGNIZE_SPEECH";
    field public static final java.lang.String ACTION_VOICE_SEARCH_HANDS_FREE = "android.speech.action.VOICE_SEARCH_HANDS_FREE";
    field public static final java.lang.String ACTION_WEB_SEARCH = "android.speech.action.WEB_SEARCH";
    field public static final java.lang.String DETAILS_META_DATA = "android.speech.DETAILS";
    field public static final java.lang.String EXTRA_CALLING_PACKAGE = "calling_package";
    field public static final java.lang.String EXTRA_CONFIDENCE_SCORES = "android.speech.extra.CONFIDENCE_SCORES";
    field public static final java.lang.String EXTRA_LANGUAGE = "android.speech.extra.LANGUAGE";
    field public static final java.lang.String EXTRA_LANGUAGE_MODEL = "android.speech.extra.LANGUAGE_MODEL";
    field public static final java.lang.String EXTRA_LANGUAGE_PREFERENCE = "android.speech.extra.LANGUAGE_PREFERENCE";
    field public static final java.lang.String EXTRA_MAX_RESULTS = "android.speech.extra.MAX_RESULTS";
    field public static final java.lang.String EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE = "android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE";
    field public static final java.lang.String EXTRA_ORIGIN = "android.speech.extra.ORIGIN";
    field public static final java.lang.String EXTRA_PARTIAL_RESULTS = "android.speech.extra.PARTIAL_RESULTS";
    field public static final java.lang.String EXTRA_PROMPT = "android.speech.extra.PROMPT";
    field public static final java.lang.String EXTRA_RESULTS = "android.speech.extra.RESULTS";
    field public static final java.lang.String EXTRA_RESULTS_PENDINGINTENT = "android.speech.extra.RESULTS_PENDINGINTENT";
    field public static final java.lang.String EXTRA_RESULTS_PENDINGINTENT_BUNDLE = "android.speech.extra.RESULTS_PENDINGINTENT_BUNDLE";
    field public static final java.lang.String EXTRA_SECURE = "android.speech.extras.EXTRA_SECURE";
    field public static final java.lang.String EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS = "android.speech.extras.SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS";
    field public static final java.lang.String EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS = "android.speech.extras.SPEECH_INPUT_MINIMUM_LENGTH_MILLIS";
    field public static final java.lang.String EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS = "android.speech.extras.SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS";
    field public static final java.lang.String EXTRA_SUPPORTED_LANGUAGES = "android.speech.extra.SUPPORTED_LANGUAGES";
    field public static final java.lang.String EXTRA_WEB_SEARCH_ONLY = "android.speech.extra.WEB_SEARCH_ONLY";
    field public static final java.lang.String LANGUAGE_MODEL_FREE_FORM = "free_form";
    field public static final java.lang.String LANGUAGE_MODEL_WEB_SEARCH = "web_search";
    field public static final int RESULT_AUDIO_ERROR = 5; // 0x5
    field public static final int RESULT_CLIENT_ERROR = 2; // 0x2
    field public static final int RESULT_NETWORK_ERROR = 4; // 0x4
    field public static final int RESULT_NO_MATCH = 1; // 0x1
    field public static final int RESULT_SERVER_ERROR = 3; // 0x3
  }

  public class RecognizerResultsIntent {
    field public static final java.lang.String ACTION_VOICE_SEARCH_RESULTS = "android.speech.action.VOICE_SEARCH_RESULTS";
    field public static final java.lang.String EXTRA_VOICE_SEARCH_RESULT_HTML = "android.speech.extras.VOICE_SEARCH_RESULT_HTML";
    field public static final java.lang.String EXTRA_VOICE_SEARCH_RESULT_HTML_BASE_URLS = "android.speech.extras.VOICE_SEARCH_RESULT_HTML_BASE_URLS";
    field public static final java.lang.String EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS = "android.speech.extras.EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS";
    field public static final java.lang.String EXTRA_VOICE_SEARCH_RESULT_STRINGS = "android.speech.extras.VOICE_SEARCH_RESULT_STRINGS";
    field public static final java.lang.String EXTRA_VOICE_SEARCH_RESULT_URLS = "android.speech.extras.VOICE_SEARCH_RESULT_URLS";
    field public static final java.lang.String URI_SCHEME_INLINE = "inline";
  }

  public class SpeechRecognizer {
    method public void cancel();
    method public static android.speech.SpeechRecognizer createSpeechRecognizer(android.content.Context);
    method public static android.speech.SpeechRecognizer createSpeechRecognizer(android.content.Context, android.content.ComponentName);
    method public void destroy();
    method public static boolean isRecognitionAvailable(android.content.Context);
    method public void setRecognitionListener(android.speech.RecognitionListener);
    method public void startListening(android.content.Intent);
    method public void stopListening();
    field public static final java.lang.String CONFIDENCE_SCORES = "confidence_scores";
    field public static final int ERROR_AUDIO = 3; // 0x3
    field public static final int ERROR_CLIENT = 5; // 0x5
    field public static final int ERROR_INSUFFICIENT_PERMISSIONS = 9; // 0x9
    field public static final int ERROR_NETWORK = 2; // 0x2
    field public static final int ERROR_NETWORK_TIMEOUT = 1; // 0x1
    field public static final int ERROR_NO_MATCH = 7; // 0x7
    field public static final int ERROR_RECOGNIZER_BUSY = 8; // 0x8
    field public static final int ERROR_SERVER = 4; // 0x4
    field public static final int ERROR_SPEECH_TIMEOUT = 6; // 0x6
    field public static final java.lang.String RESULTS_RECOGNITION = "results_recognition";
  }

}

package android.speech.tts {

  public abstract interface SynthesisCallback {
    method public abstract int audioAvailable(byte[], int, int);
    method public abstract int done();
    method public abstract void error();
    method public abstract void error(int);
    method public abstract int getMaxBufferSize();
    method public abstract boolean hasFinished();
    method public abstract boolean hasStarted();
    method public abstract int start(int, int, int);
  }

  public final class SynthesisRequest {
    ctor public SynthesisRequest(java.lang.String, android.os.Bundle);
    ctor public SynthesisRequest(java.lang.CharSequence, android.os.Bundle);
    method public int getCallerUid();
    method public java.lang.CharSequence getCharSequenceText();
    method public java.lang.String getCountry();
    method public java.lang.String getLanguage();
    method public android.os.Bundle getParams();
    method public int getPitch();
    method public int getSpeechRate();
    method public deprecated java.lang.String getText();
    method public java.lang.String getVariant();
    method public java.lang.String getVoiceName();
  }

  public class TextToSpeech {
    ctor public TextToSpeech(android.content.Context, android.speech.tts.TextToSpeech.OnInitListener);
    ctor public TextToSpeech(android.content.Context, android.speech.tts.TextToSpeech.OnInitListener, java.lang.String);
    method public int addEarcon(java.lang.String, java.lang.String, int);
    method public deprecated int addEarcon(java.lang.String, java.lang.String);
    method public int addEarcon(java.lang.String, java.io.File);
    method public int addSpeech(java.lang.String, java.lang.String, int);
    method public int addSpeech(java.lang.CharSequence, java.lang.String, int);
    method public int addSpeech(java.lang.String, java.lang.String);
    method public int addSpeech(java.lang.CharSequence, java.io.File);
    method public deprecated boolean areDefaultsEnforced();
    method public java.util.Set<java.util.Locale> getAvailableLanguages();
    method public java.lang.String getDefaultEngine();
    method public deprecated java.util.Locale getDefaultLanguage();
    method public android.speech.tts.Voice getDefaultVoice();
    method public java.util.List<android.speech.tts.TextToSpeech.EngineInfo> getEngines();
    method public deprecated java.util.Set<java.lang.String> getFeatures(java.util.Locale);
    method public deprecated java.util.Locale getLanguage();
    method public static int getMaxSpeechInputLength();
    method public android.speech.tts.Voice getVoice();
    method public java.util.Set<android.speech.tts.Voice> getVoices();
    method public int isLanguageAvailable(java.util.Locale);
    method public boolean isSpeaking();
    method public int playEarcon(java.lang.String, int, android.os.Bundle, java.lang.String);
    method public deprecated int playEarcon(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>);
    method public deprecated int playSilence(long, int, java.util.HashMap<java.lang.String, java.lang.String>);
    method public int playSilentUtterance(long, int, java.lang.String);
    method public int setAudioAttributes(android.media.AudioAttributes);
    method public deprecated int setEngineByPackageName(java.lang.String);
    method public int setLanguage(java.util.Locale);
    method public deprecated int setOnUtteranceCompletedListener(android.speech.tts.TextToSpeech.OnUtteranceCompletedListener);
    method public int setOnUtteranceProgressListener(android.speech.tts.UtteranceProgressListener);
    method public int setPitch(float);
    method public int setSpeechRate(float);
    method public int setVoice(android.speech.tts.Voice);
    method public void shutdown();
    method public int speak(java.lang.CharSequence, int, android.os.Bundle, java.lang.String);
    method public deprecated int speak(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>);
    method public int stop();
    method public int synthesizeToFile(java.lang.CharSequence, android.os.Bundle, java.io.File, java.lang.String);
    method public deprecated int synthesizeToFile(java.lang.String, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String);
    field public static final java.lang.String ACTION_TTS_QUEUE_PROCESSING_COMPLETED = "android.speech.tts.TTS_QUEUE_PROCESSING_COMPLETED";
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_INVALID_REQUEST = -8; // 0xfffffff8
    field public static final int ERROR_NETWORK = -6; // 0xfffffffa
    field public static final int ERROR_NETWORK_TIMEOUT = -7; // 0xfffffff9
    field public static final int ERROR_NOT_INSTALLED_YET = -9; // 0xfffffff7
    field public static final int ERROR_OUTPUT = -5; // 0xfffffffb
    field public static final int ERROR_SERVICE = -4; // 0xfffffffc
    field public static final int ERROR_SYNTHESIS = -3; // 0xfffffffd
    field public static final int LANG_AVAILABLE = 0; // 0x0
    field public static final int LANG_COUNTRY_AVAILABLE = 1; // 0x1
    field public static final int LANG_COUNTRY_VAR_AVAILABLE = 2; // 0x2
    field public static final int LANG_MISSING_DATA = -1; // 0xffffffff
    field public static final int LANG_NOT_SUPPORTED = -2; // 0xfffffffe
    field public static final int QUEUE_ADD = 1; // 0x1
    field public static final int QUEUE_FLUSH = 0; // 0x0
    field public static final int STOPPED = -2; // 0xfffffffe
    field public static final int SUCCESS = 0; // 0x0
  }

  public class TextToSpeech.Engine {
    ctor public TextToSpeech.Engine();
    field public static final java.lang.String ACTION_CHECK_TTS_DATA = "android.speech.tts.engine.CHECK_TTS_DATA";
    field public static final java.lang.String ACTION_GET_SAMPLE_TEXT = "android.speech.tts.engine.GET_SAMPLE_TEXT";
    field public static final java.lang.String ACTION_INSTALL_TTS_DATA = "android.speech.tts.engine.INSTALL_TTS_DATA";
    field public static final java.lang.String ACTION_TTS_DATA_INSTALLED = "android.speech.tts.engine.TTS_DATA_INSTALLED";
    field public static final deprecated int CHECK_VOICE_DATA_BAD_DATA = -1; // 0xffffffff
    field public static final int CHECK_VOICE_DATA_FAIL = 0; // 0x0
    field public static final deprecated int CHECK_VOICE_DATA_MISSING_DATA = -2; // 0xfffffffe
    field public static final deprecated int CHECK_VOICE_DATA_MISSING_VOLUME = -3; // 0xfffffffd
    field public static final int CHECK_VOICE_DATA_PASS = 1; // 0x1
    field public static final int DEFAULT_STREAM = 3; // 0x3
    field public static final java.lang.String EXTRA_AVAILABLE_VOICES = "availableVoices";
    field public static final deprecated java.lang.String EXTRA_CHECK_VOICE_DATA_FOR = "checkVoiceDataFor";
    field public static final java.lang.String EXTRA_SAMPLE_TEXT = "sampleText";
    field public static final deprecated java.lang.String EXTRA_TTS_DATA_INSTALLED = "dataInstalled";
    field public static final java.lang.String EXTRA_UNAVAILABLE_VOICES = "unavailableVoices";
    field public static final deprecated java.lang.String EXTRA_VOICE_DATA_FILES = "dataFiles";
    field public static final deprecated java.lang.String EXTRA_VOICE_DATA_FILES_INFO = "dataFilesInfo";
    field public static final deprecated java.lang.String EXTRA_VOICE_DATA_ROOT_DIRECTORY = "dataRoot";
    field public static final java.lang.String INTENT_ACTION_TTS_SERVICE = "android.intent.action.TTS_SERVICE";
    field public static final deprecated java.lang.String KEY_FEATURE_EMBEDDED_SYNTHESIS = "embeddedTts";
    field public static final java.lang.String KEY_FEATURE_NETWORK_RETRIES_COUNT = "networkRetriesCount";
    field public static final deprecated java.lang.String KEY_FEATURE_NETWORK_SYNTHESIS = "networkTts";
    field public static final java.lang.String KEY_FEATURE_NETWORK_TIMEOUT_MS = "networkTimeoutMs";
    field public static final java.lang.String KEY_FEATURE_NOT_INSTALLED = "notInstalled";
    field public static final java.lang.String KEY_PARAM_PAN = "pan";
    field public static final java.lang.String KEY_PARAM_SESSION_ID = "sessionId";
    field public static final java.lang.String KEY_PARAM_STREAM = "streamType";
    field public static final java.lang.String KEY_PARAM_UTTERANCE_ID = "utteranceId";
    field public static final java.lang.String KEY_PARAM_VOLUME = "volume";
    field public static final java.lang.String SERVICE_META_DATA = "android.speech.tts";
  }

  public static class TextToSpeech.EngineInfo {
    ctor public TextToSpeech.EngineInfo();
    field public int icon;
    field public java.lang.String label;
    field public java.lang.String name;
  }

  public static abstract interface TextToSpeech.OnInitListener {
    method public abstract void onInit(int);
  }

  public static abstract deprecated interface TextToSpeech.OnUtteranceCompletedListener {
    method public abstract void onUtteranceCompleted(java.lang.String);
  }

  public abstract class TextToSpeechService extends android.app.Service {
    ctor public TextToSpeechService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public java.lang.String onGetDefaultVoiceNameFor(java.lang.String, java.lang.String, java.lang.String);
    method protected java.util.Set<java.lang.String> onGetFeaturesForLanguage(java.lang.String, java.lang.String, java.lang.String);
    method protected abstract java.lang.String[] onGetLanguage();
    method public java.util.List<android.speech.tts.Voice> onGetVoices();
    method protected abstract int onIsLanguageAvailable(java.lang.String, java.lang.String, java.lang.String);
    method public int onIsValidVoiceName(java.lang.String);
    method protected abstract int onLoadLanguage(java.lang.String, java.lang.String, java.lang.String);
    method public int onLoadVoice(java.lang.String);
    method protected abstract void onStop();
    method protected abstract void onSynthesizeText(android.speech.tts.SynthesisRequest, android.speech.tts.SynthesisCallback);
  }

  public abstract class UtteranceProgressListener {
    ctor public UtteranceProgressListener();
    method public abstract void onDone(java.lang.String);
    method public abstract deprecated void onError(java.lang.String);
    method public void onError(java.lang.String, int);
    method public abstract void onStart(java.lang.String);
    method public void onStop(java.lang.String, boolean);
  }

  public class Voice implements android.os.Parcelable {
    ctor public Voice(java.lang.String, java.util.Locale, int, int, boolean, java.util.Set<java.lang.String>);
    method public int describeContents();
    method public java.util.Set<java.lang.String> getFeatures();
    method public int getLatency();
    method public java.util.Locale getLocale();
    method public java.lang.String getName();
    method public int getQuality();
    method public boolean isNetworkConnectionRequired();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.speech.tts.Voice> CREATOR;
    field public static final int LATENCY_HIGH = 400; // 0x190
    field public static final int LATENCY_LOW = 200; // 0xc8
    field public static final int LATENCY_NORMAL = 300; // 0x12c
    field public static final int LATENCY_VERY_HIGH = 500; // 0x1f4
    field public static final int LATENCY_VERY_LOW = 100; // 0x64
    field public static final int QUALITY_HIGH = 400; // 0x190
    field public static final int QUALITY_LOW = 200; // 0xc8
    field public static final int QUALITY_NORMAL = 300; // 0x12c
    field public static final int QUALITY_VERY_HIGH = 500; // 0x1f4
    field public static final int QUALITY_VERY_LOW = 100; // 0x64
  }

}

package android.system {

  public final class ErrnoException extends java.lang.Exception {
    ctor public ErrnoException(java.lang.String, int);
    ctor public ErrnoException(java.lang.String, int, java.lang.Throwable);
    field public final int errno;
  }

  public final class Os {
    method public static java.io.FileDescriptor accept(java.io.FileDescriptor, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
    method public static boolean access(java.lang.String, int) throws android.system.ErrnoException;
    method public static void bind(java.io.FileDescriptor, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
    method public static void chmod(java.lang.String, int) throws android.system.ErrnoException;
    method public static void chown(java.lang.String, int, int) throws android.system.ErrnoException;
    method public static void close(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static void connect(java.io.FileDescriptor, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
    method public static java.io.FileDescriptor dup(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static java.io.FileDescriptor dup2(java.io.FileDescriptor, int) throws android.system.ErrnoException;
    method public static java.lang.String[] environ();
    method public static void execv(java.lang.String, java.lang.String[]) throws android.system.ErrnoException;
    method public static void execve(java.lang.String, java.lang.String[], java.lang.String[]) throws android.system.ErrnoException;
    method public static void fchmod(java.io.FileDescriptor, int) throws android.system.ErrnoException;
    method public static void fchown(java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
    method public static void fdatasync(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static android.system.StructStat fstat(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static android.system.StructStatVfs fstatvfs(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static void fsync(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static void ftruncate(java.io.FileDescriptor, long) throws android.system.ErrnoException;
    method public static java.lang.String gai_strerror(int);
    method public static int getegid();
    method public static java.lang.String getenv(java.lang.String);
    method public static int geteuid();
    method public static int getgid();
    method public static java.net.SocketAddress getpeername(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static int getpid();
    method public static int getppid();
    method public static java.net.SocketAddress getsockname(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static int gettid();
    method public static int getuid();
    method public static java.lang.String if_indextoname(int);
    method public static java.net.InetAddress inet_pton(int, java.lang.String);
    method public static boolean isatty(java.io.FileDescriptor);
    method public static void kill(int, int) throws android.system.ErrnoException;
    method public static void lchown(java.lang.String, int, int) throws android.system.ErrnoException;
    method public static void link(java.lang.String, java.lang.String) throws android.system.ErrnoException;
    method public static void listen(java.io.FileDescriptor, int) throws android.system.ErrnoException;
    method public static long lseek(java.io.FileDescriptor, long, int) throws android.system.ErrnoException;
    method public static android.system.StructStat lstat(java.lang.String) throws android.system.ErrnoException;
    method public static void mincore(long, long, byte[]) throws android.system.ErrnoException;
    method public static void mkdir(java.lang.String, int) throws android.system.ErrnoException;
    method public static void mkfifo(java.lang.String, int) throws android.system.ErrnoException;
    method public static void mlock(long, long) throws android.system.ErrnoException;
    method public static long mmap(long, long, int, int, java.io.FileDescriptor, long) throws android.system.ErrnoException;
    method public static void msync(long, long, int) throws android.system.ErrnoException;
    method public static void munlock(long, long) throws android.system.ErrnoException;
    method public static void munmap(long, long) throws android.system.ErrnoException;
    method public static java.io.FileDescriptor open(java.lang.String, int, int) throws android.system.ErrnoException;
    method public static java.io.FileDescriptor[] pipe() throws android.system.ErrnoException;
    method public static int poll(android.system.StructPollfd[], int) throws android.system.ErrnoException;
    method public static void posix_fallocate(java.io.FileDescriptor, long, long) throws android.system.ErrnoException;
    method public static int prctl(int, long, long, long, long) throws android.system.ErrnoException;
    method public static int pread(java.io.FileDescriptor, java.nio.ByteBuffer, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int pread(java.io.FileDescriptor, byte[], int, int, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int pwrite(java.io.FileDescriptor, java.nio.ByteBuffer, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int pwrite(java.io.FileDescriptor, byte[], int, int, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int read(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int read(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static java.lang.String readlink(java.lang.String) throws android.system.ErrnoException;
    method public static int readv(java.io.FileDescriptor, java.lang.Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int recvfrom(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
    method public static int recvfrom(java.io.FileDescriptor, byte[], int, int, int, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
    method public static void remove(java.lang.String) throws android.system.ErrnoException;
    method public static void rename(java.lang.String, java.lang.String) throws android.system.ErrnoException;
    method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.util.MutableLong, long) throws android.system.ErrnoException;
    method public static int sendto(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
    method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
    method public static void setegid(int) throws android.system.ErrnoException;
    method public static void setenv(java.lang.String, java.lang.String, boolean) throws android.system.ErrnoException;
    method public static void seteuid(int) throws android.system.ErrnoException;
    method public static void setgid(int) throws android.system.ErrnoException;
    method public static int setsid() throws android.system.ErrnoException;
    method public static void setuid(int) throws android.system.ErrnoException;
    method public static void shutdown(java.io.FileDescriptor, int) throws android.system.ErrnoException;
    method public static java.io.FileDescriptor socket(int, int, int) throws android.system.ErrnoException;
    method public static void socketpair(int, int, int, java.io.FileDescriptor, java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static android.system.StructStat stat(java.lang.String) throws android.system.ErrnoException;
    method public static android.system.StructStatVfs statvfs(java.lang.String) throws android.system.ErrnoException;
    method public static java.lang.String strerror(int);
    method public static java.lang.String strsignal(int);
    method public static void symlink(java.lang.String, java.lang.String) throws android.system.ErrnoException;
    method public static long sysconf(int);
    method public static void tcdrain(java.io.FileDescriptor) throws android.system.ErrnoException;
    method public static void tcsendbreak(java.io.FileDescriptor, int) throws android.system.ErrnoException;
    method public static int umask(int);
    method public static android.system.StructUtsname uname();
    method public static void unsetenv(java.lang.String) throws android.system.ErrnoException;
    method public static int waitpid(int, android.util.MutableInt, int) throws android.system.ErrnoException;
    method public static int write(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int write(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
    method public static int writev(java.io.FileDescriptor, java.lang.Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
  }

  public final class OsConstants {
    method public static boolean S_ISBLK(int);
    method public static boolean S_ISCHR(int);
    method public static boolean S_ISDIR(int);
    method public static boolean S_ISFIFO(int);
    method public static boolean S_ISLNK(int);
    method public static boolean S_ISREG(int);
    method public static boolean S_ISSOCK(int);
    method public static boolean WCOREDUMP(int);
    method public static int WEXITSTATUS(int);
    method public static boolean WIFEXITED(int);
    method public static boolean WIFSIGNALED(int);
    method public static boolean WIFSTOPPED(int);
    method public static int WSTOPSIG(int);
    method public static int WTERMSIG(int);
    method public static java.lang.String errnoName(int);
    method public static java.lang.String gaiName(int);
    field public static final int AF_INET;
    field public static final int AF_INET6;
    field public static final int AF_UNIX;
    field public static final int AF_UNSPEC;
    field public static final int AI_ADDRCONFIG;
    field public static final int AI_ALL;
    field public static final int AI_CANONNAME;
    field public static final int AI_NUMERICHOST;
    field public static final int AI_NUMERICSERV;
    field public static final int AI_PASSIVE;
    field public static final int AI_V4MAPPED;
    field public static final int CAP_AUDIT_CONTROL;
    field public static final int CAP_AUDIT_WRITE;
    field public static final int CAP_BLOCK_SUSPEND;
    field public static final int CAP_CHOWN;
    field public static final int CAP_DAC_OVERRIDE;
    field public static final int CAP_DAC_READ_SEARCH;
    field public static final int CAP_FOWNER;
    field public static final int CAP_FSETID;
    field public static final int CAP_IPC_LOCK;
    field public static final int CAP_IPC_OWNER;
    field public static final int CAP_KILL;
    field public static final int CAP_LAST_CAP;
    field public static final int CAP_LEASE;
    field public static final int CAP_LINUX_IMMUTABLE;
    field public static final int CAP_MAC_ADMIN;
    field public static final int CAP_MAC_OVERRIDE;
    field public static final int CAP_MKNOD;
    field public static final int CAP_NET_ADMIN;
    field public static final int CAP_NET_BIND_SERVICE;
    field public static final int CAP_NET_BROADCAST;
    field public static final int CAP_NET_RAW;
    field public static final int CAP_SETFCAP;
    field public static final int CAP_SETGID;
    field public static final int CAP_SETPCAP;
    field public static final int CAP_SETUID;
    field public static final int CAP_SYSLOG;
    field public static final int CAP_SYS_ADMIN;
    field public static final int CAP_SYS_BOOT;
    field public static final int CAP_SYS_CHROOT;
    field public static final int CAP_SYS_MODULE;
    field public static final int CAP_SYS_NICE;
    field public static final int CAP_SYS_PACCT;
    field public static final int CAP_SYS_PTRACE;
    field public static final int CAP_SYS_RAWIO;
    field public static final int CAP_SYS_RESOURCE;
    field public static final int CAP_SYS_TIME;
    field public static final int CAP_SYS_TTY_CONFIG;
    field public static final int CAP_WAKE_ALARM;
    field public static final int E2BIG;
    field public static final int EACCES;
    field public static final int EADDRINUSE;
    field public static final int EADDRNOTAVAIL;
    field public static final int EAFNOSUPPORT;
    field public static final int EAGAIN;
    field public static final int EAI_AGAIN;
    field public static final int EAI_BADFLAGS;
    field public static final int EAI_FAIL;
    field public static final int EAI_FAMILY;
    field public static final int EAI_MEMORY;
    field public static final int EAI_NODATA;
    field public static final int EAI_NONAME;
    field public static final int EAI_OVERFLOW;
    field public static final int EAI_SERVICE;
    field public static final int EAI_SOCKTYPE;
    field public static final int EAI_SYSTEM;
    field public static final int EALREADY;
    field public static final int EBADF;
    field public static final int EBADMSG;
    field public static final int EBUSY;
    field public static final int ECANCELED;
    field public static final int ECHILD;
    field public static final int ECONNABORTED;
    field public static final int ECONNREFUSED;
    field public static final int ECONNRESET;
    field public static final int EDEADLK;
    field public static final int EDESTADDRREQ;
    field public static final int EDOM;
    field public static final int EDQUOT;
    field public static final int EEXIST;
    field public static final int EFAULT;
    field public static final int EFBIG;
    field public static final int EHOSTUNREACH;
    field public static final int EIDRM;
    field public static final int EILSEQ;
    field public static final int EINPROGRESS;
    field public static final int EINTR;
    field public static final int EINVAL;
    field public static final int EIO;
    field public static final int EISCONN;
    field public static final int EISDIR;
    field public static final int ELOOP;
    field public static final int EMFILE;
    field public static final int EMLINK;
    field public static final int EMSGSIZE;
    field public static final int EMULTIHOP;
    field public static final int ENAMETOOLONG;
    field public static final int ENETDOWN;
    field public static final int ENETRESET;
    field public static final int ENETUNREACH;
    field public static final int ENFILE;
    field public static final int ENOBUFS;
    field public static final int ENODATA;
    field public static final int ENODEV;
    field public static final int ENOENT;
    field public static final int ENOEXEC;
    field public static final int ENOLCK;
    field public static final int ENOLINK;
    field public static final int ENOMEM;
    field public static final int ENOMSG;
    field public static final int ENOPROTOOPT;
    field public static final int ENOSPC;
    field public static final int ENOSR;
    field public static final int ENOSTR;
    field public static final int ENOSYS;
    field public static final int ENOTCONN;
    field public static final int ENOTDIR;
    field public static final int ENOTEMPTY;
    field public static final int ENOTSOCK;
    field public static final int ENOTSUP;
    field public static final int ENOTTY;
    field public static final int ENXIO;
    field public static final int EOPNOTSUPP;
    field public static final int EOVERFLOW;
    field public static final int EPERM;
    field public static final int EPIPE;
    field public static final int EPROTO;
    field public static final int EPROTONOSUPPORT;
    field public static final int EPROTOTYPE;
    field public static final int ERANGE;
    field public static final int EROFS;
    field public static final int ESPIPE;
    field public static final int ESRCH;
    field public static final int ESTALE;
    field public static final int ETIME;
    field public static final int ETIMEDOUT;
    field public static final int ETXTBSY;
    field public static final int EXDEV;
    field public static final int EXIT_FAILURE;
    field public static final int EXIT_SUCCESS;
    field public static final int FD_CLOEXEC;
    field public static final int FIONREAD;
    field public static final int F_DUPFD;
    field public static final int F_GETFD;
    field public static final int F_GETFL;
    field public static final int F_GETLK;
    field public static final int F_GETLK64;
    field public static final int F_GETOWN;
    field public static final int F_OK;
    field public static final int F_RDLCK;
    field public static final int F_SETFD;
    field public static final int F_SETFL;
    field public static final int F_SETLK;
    field public static final int F_SETLK64;
    field public static final int F_SETLKW;
    field public static final int F_SETLKW64;
    field public static final int F_SETOWN;
    field public static final int F_UNLCK;
    field public static final int F_WRLCK;
    field public static final int IFA_F_DADFAILED;
    field public static final int IFA_F_DEPRECATED;
    field public static final int IFA_F_HOMEADDRESS;
    field public static final int IFA_F_NODAD;
    field public static final int IFA_F_OPTIMISTIC;
    field public static final int IFA_F_PERMANENT;
    field public static final int IFA_F_SECONDARY;
    field public static final int IFA_F_TEMPORARY;
    field public static final int IFA_F_TENTATIVE;
    field public static final int IFF_ALLMULTI;
    field public static final int IFF_AUTOMEDIA;
    field public static final int IFF_BROADCAST;
    field public static final int IFF_DEBUG;
    field public static final int IFF_DYNAMIC;
    field public static final int IFF_LOOPBACK;
    field public static final int IFF_MASTER;
    field public static final int IFF_MULTICAST;
    field public static final int IFF_NOARP;
    field public static final int IFF_NOTRAILERS;
    field public static final int IFF_POINTOPOINT;
    field public static final int IFF_PORTSEL;
    field public static final int IFF_PROMISC;
    field public static final int IFF_RUNNING;
    field public static final int IFF_SLAVE;
    field public static final int IFF_UP;
    field public static final int IPPROTO_ICMP;
    field public static final int IPPROTO_ICMPV6;
    field public static final int IPPROTO_IP;
    field public static final int IPPROTO_IPV6;
    field public static final int IPPROTO_RAW;
    field public static final int IPPROTO_TCP;
    field public static final int IPPROTO_UDP;
    field public static final int IPV6_CHECKSUM;
    field public static final int IPV6_MULTICAST_HOPS;
    field public static final int IPV6_MULTICAST_IF;
    field public static final int IPV6_MULTICAST_LOOP;
    field public static final int IPV6_RECVDSTOPTS;
    field public static final int IPV6_RECVHOPLIMIT;
    field public static final int IPV6_RECVHOPOPTS;
    field public static final int IPV6_RECVPKTINFO;
    field public static final int IPV6_RECVRTHDR;
    field public static final int IPV6_RECVTCLASS;
    field public static final int IPV6_TCLASS;
    field public static final int IPV6_UNICAST_HOPS;
    field public static final int IPV6_V6ONLY;
    field public static final int IP_MULTICAST_IF;
    field public static final int IP_MULTICAST_LOOP;
    field public static final int IP_MULTICAST_TTL;
    field public static final int IP_TOS;
    field public static final int IP_TTL;
    field public static final int MAP_FIXED;
    field public static final int MAP_PRIVATE;
    field public static final int MAP_SHARED;
    field public static final int MCAST_BLOCK_SOURCE;
    field public static final int MCAST_JOIN_GROUP;
    field public static final int MCAST_JOIN_SOURCE_GROUP;
    field public static final int MCAST_LEAVE_GROUP;
    field public static final int MCAST_LEAVE_SOURCE_GROUP;
    field public static final int MCAST_UNBLOCK_SOURCE;
    field public static final int MCL_CURRENT;
    field public static final int MCL_FUTURE;
    field public static final int MSG_CTRUNC;
    field public static final int MSG_DONTROUTE;
    field public static final int MSG_EOR;
    field public static final int MSG_OOB;
    field public static final int MSG_PEEK;
    field public static final int MSG_TRUNC;
    field public static final int MSG_WAITALL;
    field public static final int MS_ASYNC;
    field public static final int MS_INVALIDATE;
    field public static final int MS_SYNC;
    field public static final int NI_DGRAM;
    field public static final int NI_NAMEREQD;
    field public static final int NI_NOFQDN;
    field public static final int NI_NUMERICHOST;
    field public static final int NI_NUMERICSERV;
    field public static final int O_ACCMODE;
    field public static final int O_APPEND;
    field public static final int O_CREAT;
    field public static final int O_EXCL;
    field public static final int O_NOCTTY;
    field public static final int O_NOFOLLOW;
    field public static final int O_NONBLOCK;
    field public static final int O_RDONLY;
    field public static final int O_RDWR;
    field public static final int O_SYNC;
    field public static final int O_TRUNC;
    field public static final int O_WRONLY;
    field public static final int POLLERR;
    field public static final int POLLHUP;
    field public static final int POLLIN;
    field public static final int POLLNVAL;
    field public static final int POLLOUT;
    field public static final int POLLPRI;
    field public static final int POLLRDBAND;
    field public static final int POLLRDNORM;
    field public static final int POLLWRBAND;
    field public static final int POLLWRNORM;
    field public static final int PROT_EXEC;
    field public static final int PROT_NONE;
    field public static final int PROT_READ;
    field public static final int PROT_WRITE;
    field public static final int PR_GET_DUMPABLE;
    field public static final int PR_SET_DUMPABLE;
    field public static final int PR_SET_NO_NEW_PRIVS;
    field public static final int RT_SCOPE_HOST;
    field public static final int RT_SCOPE_LINK;
    field public static final int RT_SCOPE_NOWHERE;
    field public static final int RT_SCOPE_SITE;
    field public static final int RT_SCOPE_UNIVERSE;
    field public static final int R_OK;
    field public static final int SEEK_CUR;
    field public static final int SEEK_END;
    field public static final int SEEK_SET;
    field public static final int SHUT_RD;
    field public static final int SHUT_RDWR;
    field public static final int SHUT_WR;
    field public static final int SIGABRT;
    field public static final int SIGALRM;
    field public static final int SIGBUS;
    field public static final int SIGCHLD;
    field public static final int SIGCONT;
    field public static final int SIGFPE;
    field public static final int SIGHUP;
    field public static final int SIGILL;
    field public static final int SIGINT;
    field public static final int SIGIO;
    field public static final int SIGKILL;
    field public static final int SIGPIPE;
    field public static final int SIGPROF;
    field public static final int SIGPWR;
    field public static final int SIGQUIT;
    field public static final int SIGRTMAX;
    field public static final int SIGRTMIN;
    field public static final int SIGSEGV;
    field public static final int SIGSTKFLT;
    field public static final int SIGSTOP;
    field public static final int SIGSYS;
    field public static final int SIGTERM;
    field public static final int SIGTRAP;
    field public static final int SIGTSTP;
    field public static final int SIGTTIN;
    field public static final int SIGTTOU;
    field public static final int SIGURG;
    field public static final int SIGUSR1;
    field public static final int SIGUSR2;
    field public static final int SIGVTALRM;
    field public static final int SIGWINCH;
    field public static final int SIGXCPU;
    field public static final int SIGXFSZ;
    field public static final int SIOCGIFADDR;
    field public static final int SIOCGIFBRDADDR;
    field public static final int SIOCGIFDSTADDR;
    field public static final int SIOCGIFNETMASK;
    field public static final int SOCK_DGRAM;
    field public static final int SOCK_RAW;
    field public static final int SOCK_SEQPACKET;
    field public static final int SOCK_STREAM;
    field public static final int SOL_SOCKET;
    field public static final int SO_BINDTODEVICE;
    field public static final int SO_BROADCAST;
    field public static final int SO_DEBUG;
    field public static final int SO_DONTROUTE;
    field public static final int SO_ERROR;
    field public static final int SO_KEEPALIVE;
    field public static final int SO_LINGER;
    field public static final int SO_OOBINLINE;
    field public static final int SO_PASSCRED;
    field public static final int SO_PEERCRED;
    field public static final int SO_RCVBUF;
    field public static final int SO_RCVLOWAT;
    field public static final int SO_RCVTIMEO;
    field public static final int SO_REUSEADDR;
    field public static final int SO_SNDBUF;
    field public static final int SO_SNDLOWAT;
    field public static final int SO_SNDTIMEO;
    field public static final int SO_TYPE;
    field public static final int STDERR_FILENO;
    field public static final int STDIN_FILENO;
    field public static final int STDOUT_FILENO;
    field public static final int ST_MANDLOCK;
    field public static final int ST_NOATIME;
    field public static final int ST_NODEV;
    field public static final int ST_NODIRATIME;
    field public static final int ST_NOEXEC;
    field public static final int ST_NOSUID;
    field public static final int ST_RDONLY;
    field public static final int ST_RELATIME;
    field public static final int ST_SYNCHRONOUS;
    field public static final int S_IFBLK;
    field public static final int S_IFCHR;
    field public static final int S_IFDIR;
    field public static final int S_IFIFO;
    field public static final int S_IFLNK;
    field public static final int S_IFMT;
    field public static final int S_IFREG;
    field public static final int S_IFSOCK;
    field public static final int S_IRGRP;
    field public static final int S_IROTH;
    field public static final int S_IRUSR;
    field public static final int S_IRWXG;
    field public static final int S_IRWXO;
    field public static final int S_IRWXU;
    field public static final int S_ISGID;
    field public static final int S_ISUID;
    field public static final int S_ISVTX;
    field public static final int S_IWGRP;
    field public static final int S_IWOTH;
    field public static final int S_IWUSR;
    field public static final int S_IXGRP;
    field public static final int S_IXOTH;
    field public static final int S_IXUSR;
    field public static final int TCP_NODELAY;
    field public static final int WCONTINUED;
    field public static final int WEXITED;
    field public static final int WNOHANG;
    field public static final int WNOWAIT;
    field public static final int WSTOPPED;
    field public static final int WUNTRACED;
    field public static final int W_OK;
    field public static final int X_OK;
    field public static final int _SC_2_CHAR_TERM;
    field public static final int _SC_2_C_BIND;
    field public static final int _SC_2_C_DEV;
    field public static final int _SC_2_C_VERSION;
    field public static final int _SC_2_FORT_DEV;
    field public static final int _SC_2_FORT_RUN;
    field public static final int _SC_2_LOCALEDEF;
    field public static final int _SC_2_SW_DEV;
    field public static final int _SC_2_UPE;
    field public static final int _SC_2_VERSION;
    field public static final int _SC_AIO_LISTIO_MAX;
    field public static final int _SC_AIO_MAX;
    field public static final int _SC_AIO_PRIO_DELTA_MAX;
    field public static final int _SC_ARG_MAX;
    field public static final int _SC_ASYNCHRONOUS_IO;
    field public static final int _SC_ATEXIT_MAX;
    field public static final int _SC_AVPHYS_PAGES;
    field public static final int _SC_BC_BASE_MAX;
    field public static final int _SC_BC_DIM_MAX;
    field public static final int _SC_BC_SCALE_MAX;
    field public static final int _SC_BC_STRING_MAX;
    field public static final int _SC_CHILD_MAX;
    field public static final int _SC_CLK_TCK;
    field public static final int _SC_COLL_WEIGHTS_MAX;
    field public static final int _SC_DELAYTIMER_MAX;
    field public static final int _SC_EXPR_NEST_MAX;
    field public static final int _SC_FSYNC;
    field public static final int _SC_GETGR_R_SIZE_MAX;
    field public static final int _SC_GETPW_R_SIZE_MAX;
    field public static final int _SC_IOV_MAX;
    field public static final int _SC_JOB_CONTROL;
    field public static final int _SC_LINE_MAX;
    field public static final int _SC_LOGIN_NAME_MAX;
    field public static final int _SC_MAPPED_FILES;
    field public static final int _SC_MEMLOCK;
    field public static final int _SC_MEMLOCK_RANGE;
    field public static final int _SC_MEMORY_PROTECTION;
    field public static final int _SC_MESSAGE_PASSING;
    field public static final int _SC_MQ_OPEN_MAX;
    field public static final int _SC_MQ_PRIO_MAX;
    field public static final int _SC_NGROUPS_MAX;
    field public static final int _SC_NPROCESSORS_CONF;
    field public static final int _SC_NPROCESSORS_ONLN;
    field public static final int _SC_OPEN_MAX;
    field public static final int _SC_PAGESIZE;
    field public static final int _SC_PAGE_SIZE;
    field public static final int _SC_PASS_MAX;
    field public static final int _SC_PHYS_PAGES;
    field public static final int _SC_PRIORITIZED_IO;
    field public static final int _SC_PRIORITY_SCHEDULING;
    field public static final int _SC_REALTIME_SIGNALS;
    field public static final int _SC_RE_DUP_MAX;
    field public static final int _SC_RTSIG_MAX;
    field public static final int _SC_SAVED_IDS;
    field public static final int _SC_SEMAPHORES;
    field public static final int _SC_SEM_NSEMS_MAX;
    field public static final int _SC_SEM_VALUE_MAX;
    field public static final int _SC_SHARED_MEMORY_OBJECTS;
    field public static final int _SC_SIGQUEUE_MAX;
    field public static final int _SC_STREAM_MAX;
    field public static final int _SC_SYNCHRONIZED_IO;
    field public static final int _SC_THREADS;
    field public static final int _SC_THREAD_ATTR_STACKADDR;
    field public static final int _SC_THREAD_ATTR_STACKSIZE;
    field public static final int _SC_THREAD_DESTRUCTOR_ITERATIONS;
    field public static final int _SC_THREAD_KEYS_MAX;
    field public static final int _SC_THREAD_PRIORITY_SCHEDULING;
    field public static final int _SC_THREAD_PRIO_INHERIT;
    field public static final int _SC_THREAD_PRIO_PROTECT;
    field public static final int _SC_THREAD_SAFE_FUNCTIONS;
    field public static final int _SC_THREAD_STACK_MIN;
    field public static final int _SC_THREAD_THREADS_MAX;
    field public static final int _SC_TIMERS;
    field public static final int _SC_TIMER_MAX;
    field public static final int _SC_TTY_NAME_MAX;
    field public static final int _SC_TZNAME_MAX;
    field public static final int _SC_VERSION;
    field public static final int _SC_XBS5_ILP32_OFF32;
    field public static final int _SC_XBS5_ILP32_OFFBIG;
    field public static final int _SC_XBS5_LP64_OFF64;
    field public static final int _SC_XBS5_LPBIG_OFFBIG;
    field public static final int _SC_XOPEN_CRYPT;
    field public static final int _SC_XOPEN_ENH_I18N;
    field public static final int _SC_XOPEN_LEGACY;
    field public static final int _SC_XOPEN_REALTIME;
    field public static final int _SC_XOPEN_REALTIME_THREADS;
    field public static final int _SC_XOPEN_SHM;
    field public static final int _SC_XOPEN_UNIX;
    field public static final int _SC_XOPEN_VERSION;
    field public static final int _SC_XOPEN_XCU_VERSION;
  }

  public final class StructPollfd {
    ctor public StructPollfd();
    field public short events;
    field public java.io.FileDescriptor fd;
    field public short revents;
    field public java.lang.Object userData;
  }

  public final class StructStat {
    ctor public StructStat(long, long, int, long, int, int, long, long, long, long, long, long, long);
    field public final long st_atime;
    field public final long st_blksize;
    field public final long st_blocks;
    field public final long st_ctime;
    field public final long st_dev;
    field public final int st_gid;
    field public final long st_ino;
    field public final int st_mode;
    field public final long st_mtime;
    field public final long st_nlink;
    field public final long st_rdev;
    field public final long st_size;
    field public final int st_uid;
  }

  public final class StructStatVfs {
    ctor public StructStatVfs(long, long, long, long, long, long, long, long, long, long, long);
    field public final long f_bavail;
    field public final long f_bfree;
    field public final long f_blocks;
    field public final long f_bsize;
    field public final long f_favail;
    field public final long f_ffree;
    field public final long f_files;
    field public final long f_flag;
    field public final long f_frsize;
    field public final long f_fsid;
    field public final long f_namemax;
  }

  public final class StructUtsname {
    ctor public StructUtsname(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    field public final java.lang.String machine;
    field public final java.lang.String nodename;
    field public final java.lang.String release;
    field public final java.lang.String sysname;
    field public final java.lang.String version;
  }

}

package android.telecom {

  public class PhoneAccount implements android.os.Parcelable {
    method public static android.telecom.PhoneAccount.Builder builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
    method public android.graphics.drawable.Drawable createIconDrawable(android.content.Context);
    method public int describeContents();
    method public android.telecom.PhoneAccountHandle getAccountHandle();
    method public android.net.Uri getAddress();
    method public int getCapabilities();
    method public int getHighlightColor();
    method public android.graphics.Bitmap getIconBitmap();
    method public java.lang.String getIconPackageName();
    method public int getIconResId();
    method public int getIconTint();
    method public java.lang.CharSequence getLabel();
    method public java.lang.CharSequence getShortDescription();
    method public android.net.Uri getSubscriptionAddress();
    method public java.util.List<java.lang.String> getSupportedUriSchemes();
    method public boolean hasCapabilities(int);
    method public boolean supportsUriScheme(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10
    field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4
    field public static final int CAPABILITY_VIDEO_CALLING = 8; // 0x8
    field public static final android.os.Parcelable.Creator<android.telecom.PhoneAccount> CREATOR;
    field public static final int NO_HIGHLIGHT_COLOR = 0; // 0x0
    field public static final int NO_ICON_TINT = 0; // 0x0
    field public static final int NO_RESOURCE_ID = -1; // 0xffffffff
    field public static final java.lang.String SCHEME_SIP = "sip";
    field public static final java.lang.String SCHEME_TEL = "tel";
    field public static final java.lang.String SCHEME_VOICEMAIL = "voicemail";
  }

  public static class PhoneAccount.Builder {
    ctor public PhoneAccount.Builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
    ctor public PhoneAccount.Builder(android.telecom.PhoneAccount);
    method public android.telecom.PhoneAccount build();
    method public android.telecom.PhoneAccount.Builder setAddress(android.net.Uri);
    method public android.telecom.PhoneAccount.Builder setCapabilities(int);
    method public android.telecom.PhoneAccount.Builder setHighlightColor(int);
    method public android.telecom.PhoneAccount.Builder setIcon(android.content.Context, int);
    method public android.telecom.PhoneAccount.Builder setIcon(java.lang.String, int);
    method public android.telecom.PhoneAccount.Builder setIcon(android.content.Context, int, int);
    method public android.telecom.PhoneAccount.Builder setIcon(java.lang.String, int, int);
    method public android.telecom.PhoneAccount.Builder setIcon(android.graphics.Bitmap);
    method public android.telecom.PhoneAccount.Builder setShortDescription(java.lang.CharSequence);
    method public android.telecom.PhoneAccount.Builder setSubscriptionAddress(android.net.Uri);
    method public android.telecom.PhoneAccount.Builder setSupportedUriSchemes(java.util.List<java.lang.String>);
  }

  public class PhoneAccountHandle implements android.os.Parcelable {
    ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String);
    method public int describeContents();
    method public android.content.ComponentName getComponentName();
    method public java.lang.String getId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.PhoneAccountHandle> CREATOR;
  }

  public class TelecomManager {
    method public void cancelMissedCallsNotification();
    method public java.util.List<android.telecom.PhoneAccountHandle> getCallCapablePhoneAccounts();
    method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle);
    method public boolean handleMmi(java.lang.String);
    method public boolean isInCall();
    method public void showInCallScreen(boolean);
    field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
    field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
    field public static final java.lang.String ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS = "android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS";
    field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
    field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecom.extra.CALL_DISCONNECT_CAUSE";
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecom.extra.CALL_DISCONNECT_MESSAGE";
    field public static final java.lang.String EXTRA_OUTGOING_CALL_EXTRAS = "android.telecom.extra.OUTGOING_CALL_EXTRAS";
    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecom.extra.PHONE_ACCOUNT_HANDLE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
    field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
    field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
    field public static final int PRESENTATION_ALLOWED = 1; // 0x1
    field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
    field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
    field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
  }

  public class VideoProfile implements android.os.Parcelable {
    ctor public VideoProfile(int);
    ctor public VideoProfile(int, int);
    method public int describeContents();
    method public int getQuality();
    method public int getVideoState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.VideoProfile> CREATOR;
    field public static final int QUALITY_DEFAULT = 4; // 0x4
    field public static final int QUALITY_HIGH = 1; // 0x1
    field public static final int QUALITY_LOW = 3; // 0x3
    field public static final int QUALITY_MEDIUM = 2; // 0x2
  }

  public static class VideoProfile.VideoState {
    ctor public VideoProfile.VideoState();
    method public static boolean isAudioOnly(int);
    method public static boolean isBidirectional(int);
    method public static boolean isPaused(int);
    method public static boolean isReceptionEnabled(int);
    method public static boolean isTransmissionEnabled(int);
    field public static final int AUDIO_ONLY = 0; // 0x0
    field public static final int BIDIRECTIONAL = 3; // 0x3
    field public static final int PAUSED = 4; // 0x4
    field public static final int RX_ENABLED = 2; // 0x2
    field public static final int TX_ENABLED = 1; // 0x1
  }

}

package android.telephony {

  public final class CellIdentityCdma implements android.os.Parcelable {
    method public int describeContents();
    method public int getBasestationId();
    method public int getLatitude();
    method public int getLongitude();
    method public int getNetworkId();
    method public int getSystemId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityCdma> CREATOR;
  }

  public final class CellIdentityGsm implements android.os.Parcelable {
    method public int describeContents();
    method public int getCid();
    method public int getLac();
    method public int getMcc();
    method public int getMnc();
    method public deprecated int getPsc();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityGsm> CREATOR;
  }

  public final class CellIdentityLte implements android.os.Parcelable {
    method public int describeContents();
    method public int getCi();
    method public int getMcc();
    method public int getMnc();
    method public int getPci();
    method public int getTac();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityLte> CREATOR;
  }

  public final class CellIdentityWcdma implements android.os.Parcelable {
    method public int describeContents();
    method public int getCid();
    method public int getLac();
    method public int getMcc();
    method public int getMnc();
    method public int getPsc();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityWcdma> CREATOR;
  }

  public abstract class CellInfo implements android.os.Parcelable {
    method public int describeContents();
    method public long getTimeStamp();
    method public boolean isRegistered();
    method public abstract void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellInfo> CREATOR;
  }

  public final class CellInfoCdma extends android.telephony.CellInfo implements android.os.Parcelable {
    method public android.telephony.CellIdentityCdma getCellIdentity();
    method public android.telephony.CellSignalStrengthCdma getCellSignalStrength();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellInfoCdma> CREATOR;
  }

  public final class CellInfoGsm extends android.telephony.CellInfo implements android.os.Parcelable {
    method public android.telephony.CellIdentityGsm getCellIdentity();
    method public android.telephony.CellSignalStrengthGsm getCellSignalStrength();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellInfoGsm> CREATOR;
  }

  public final class CellInfoLte extends android.telephony.CellInfo implements android.os.Parcelable {
    method public android.telephony.CellIdentityLte getCellIdentity();
    method public android.telephony.CellSignalStrengthLte getCellSignalStrength();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellInfoLte> CREATOR;
  }

  public final class CellInfoWcdma extends android.telephony.CellInfo implements android.os.Parcelable {
    method public android.telephony.CellIdentityWcdma getCellIdentity();
    method public android.telephony.CellSignalStrengthWcdma getCellSignalStrength();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellInfoWcdma> CREATOR;
  }

  public abstract class CellLocation {
    ctor public CellLocation();
    method public static android.telephony.CellLocation getEmpty();
    method public static void requestLocationUpdate();
  }

  public abstract class CellSignalStrength {
    method public abstract boolean equals(java.lang.Object);
    method public abstract int getAsuLevel();
    method public abstract int getDbm();
    method public abstract int getLevel();
    method public abstract int hashCode();
  }

  public final class CellSignalStrengthCdma extends android.telephony.CellSignalStrength implements android.os.Parcelable {
    method public int describeContents();
    method public boolean equals(java.lang.Object);
    method public int getAsuLevel();
    method public int getCdmaDbm();
    method public int getCdmaEcio();
    method public int getCdmaLevel();
    method public int getDbm();
    method public int getEvdoDbm();
    method public int getEvdoEcio();
    method public int getEvdoLevel();
    method public int getEvdoSnr();
    method public int getLevel();
    method public int hashCode();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthCdma> CREATOR;
  }

  public final class CellSignalStrengthGsm extends android.telephony.CellSignalStrength implements android.os.Parcelable {
    method public int describeContents();
    method public boolean equals(java.lang.Object);
    method public int getAsuLevel();
    method public int getDbm();
    method public int getLevel();
    method public int hashCode();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthGsm> CREATOR;
  }

  public final class CellSignalStrengthLte extends android.telephony.CellSignalStrength implements android.os.Parcelable {
    method public int describeContents();
    method public boolean equals(java.lang.Object);
    method public int getAsuLevel();
    method public int getDbm();
    method public int getLevel();
    method public int getTimingAdvance();
    method public int hashCode();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthLte> CREATOR;
  }

  public final class CellSignalStrengthWcdma extends android.telephony.CellSignalStrength implements android.os.Parcelable {
    method public int describeContents();
    method public boolean equals(java.lang.Object);
    method public int getAsuLevel();
    method public int getDbm();
    method public int getLevel();
    method public int hashCode();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthWcdma> CREATOR;
  }

  public class IccOpenLogicalChannelResponse implements android.os.Parcelable {
    method public int describeContents();
    method public int getChannel();
    method public byte[] getSelectResponse();
    method public int getStatus();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.IccOpenLogicalChannelResponse> CREATOR;
    field public static final int INVALID_CHANNEL = -1; // 0xffffffff
    field public static final int STATUS_MISSING_RESOURCE = 2; // 0x2
    field public static final int STATUS_NO_ERROR = 1; // 0x1
    field public static final int STATUS_NO_SUCH_ELEMENT = 3; // 0x3
    field public static final int STATUS_UNKNOWN_ERROR = 4; // 0x4
  }

  public class NeighboringCellInfo implements android.os.Parcelable {
    ctor public deprecated NeighboringCellInfo();
    ctor public deprecated NeighboringCellInfo(int, int);
    ctor public NeighboringCellInfo(int, java.lang.String, int);
    ctor public NeighboringCellInfo(android.os.Parcel);
    method public int describeContents();
    method public int getCid();
    method public int getLac();
    method public int getNetworkType();
    method public int getPsc();
    method public int getRssi();
    method public deprecated void setCid(int);
    method public deprecated void setRssi(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.NeighboringCellInfo> CREATOR;
    field public static final int UNKNOWN_CID = -1; // 0xffffffff
    field public static final int UNKNOWN_RSSI = 99; // 0x63
  }

  public class PhoneNumberFormattingTextWatcher implements android.text.TextWatcher {
    ctor public PhoneNumberFormattingTextWatcher();
    ctor public PhoneNumberFormattingTextWatcher(java.lang.String);
    method public synchronized void afterTextChanged(android.text.Editable);
    method public void beforeTextChanged(java.lang.CharSequence, int, int, int);
    method public void onTextChanged(java.lang.CharSequence, int, int, int);
  }

  public class PhoneNumberUtils {
    ctor public PhoneNumberUtils();
    method public static void addPhoneTtsSpan(android.text.Spannable, int, int);
    method public static java.lang.String calledPartyBCDFragmentToString(byte[], int, int);
    method public static java.lang.String calledPartyBCDToString(byte[], int, int);
    method public static boolean compare(java.lang.String, java.lang.String);
    method public static boolean compare(android.content.Context, java.lang.String, java.lang.String);
    method public static java.lang.String convertKeypadLettersToDigits(java.lang.String);
    method public static java.lang.String extractNetworkPortion(java.lang.String);
    method public static java.lang.String extractPostDialPortion(java.lang.String);
    method public static deprecated void formatJapaneseNumber(android.text.Editable);
    method public static deprecated void formatNanpNumber(android.text.Editable);
    method public static deprecated java.lang.String formatNumber(java.lang.String);
    method public static deprecated void formatNumber(android.text.Editable, int);
    method public static java.lang.String formatNumber(java.lang.String, java.lang.String);
    method public static java.lang.String formatNumber(java.lang.String, java.lang.String, java.lang.String);
    method public static java.lang.String formatNumberToE164(java.lang.String, java.lang.String);
    method public static java.lang.String formatNumberToRFC3966(java.lang.String, java.lang.String);
    method public static deprecated int getFormatTypeForLocale(java.util.Locale);
    method public static java.lang.String getNumberFromIntent(android.content.Intent, android.content.Context);
    method public static android.text.style.TtsSpan getPhoneTtsSpan(java.lang.String);
    method public static java.lang.CharSequence getPhoneTtsSpannable(java.lang.CharSequence);
    method public static java.lang.String getStrippedReversed(java.lang.String);
    method public static final boolean is12Key(char);
    method public static final boolean isDialable(char);
    method public static boolean isEmergencyNumber(java.lang.String);
    method public static boolean isGlobalPhoneNumber(java.lang.String);
    method public static boolean isISODigit(char);
    method public static boolean isLocalEmergencyNumber(android.content.Context, java.lang.String);
    method public static final boolean isNonSeparator(char);
    method public static final boolean isReallyDialable(char);
    method public static final boolean isStartsPostDial(char);
    method public static boolean isVoiceMailNumber(java.lang.String);
    method public static boolean isWellFormedSmsAddress(java.lang.String);
    method public static byte[] networkPortionToCalledPartyBCD(java.lang.String);
    method public static byte[] networkPortionToCalledPartyBCDWithLength(java.lang.String);
    method public static java.lang.String normalizeNumber(java.lang.String);
    method public static byte[] numberToCalledPartyBCD(java.lang.String);
    method public static java.lang.String replaceUnicodeDigits(java.lang.String);
    method public static java.lang.String stringFromStringAndTOA(java.lang.String, int);
    method public static java.lang.String stripSeparators(java.lang.String);
    method public static java.lang.String toCallerIDMinMatch(java.lang.String);
    method public static int toaFromString(java.lang.String);
    field public static final int FORMAT_JAPAN = 2; // 0x2
    field public static final int FORMAT_NANP = 1; // 0x1
    field public static final int FORMAT_UNKNOWN = 0; // 0x0
    field public static final char PAUSE = 44; // 0x002c ','
    field public static final int TOA_International = 145; // 0x91
    field public static final int TOA_Unknown = 129; // 0x81
    field public static final char WAIT = 59; // 0x003b ';'
    field public static final char WILD = 78; // 0x004e 'N'
  }

  public class PhoneStateListener {
    ctor public PhoneStateListener();
    method public void onCallForwardingIndicatorChanged(boolean);
    method public void onCallStateChanged(int, java.lang.String);
    method public void onCellInfoChanged(java.util.List<android.telephony.CellInfo>);
    method public void onCellLocationChanged(android.telephony.CellLocation);
    method public void onDataActivity(int);
    method public void onDataConnectionStateChanged(int);
    method public void onDataConnectionStateChanged(int, int);
    method public void onMessageWaitingIndicatorChanged(boolean);
    method public void onServiceStateChanged(android.telephony.ServiceState);
    method public deprecated void onSignalStrengthChanged(int);
    method public void onSignalStrengthsChanged(android.telephony.SignalStrength);
    field public static final int LISTEN_CALL_FORWARDING_INDICATOR = 8; // 0x8
    field public static final int LISTEN_CALL_STATE = 32; // 0x20
    field public static final int LISTEN_CELL_INFO = 1024; // 0x400
    field public static final int LISTEN_CELL_LOCATION = 16; // 0x10
    field public static final int LISTEN_DATA_ACTIVITY = 128; // 0x80
    field public static final int LISTEN_DATA_CONNECTION_STATE = 64; // 0x40
    field public static final int LISTEN_MESSAGE_WAITING_INDICATOR = 4; // 0x4
    field public static final int LISTEN_NONE = 0; // 0x0
    field public static final int LISTEN_SERVICE_STATE = 1; // 0x1
    field public static final deprecated int LISTEN_SIGNAL_STRENGTH = 2; // 0x2
    field public static final int LISTEN_SIGNAL_STRENGTHS = 256; // 0x100
  }

  public class ServiceState implements android.os.Parcelable {
    ctor public ServiceState();
    ctor public ServiceState(android.telephony.ServiceState);
    ctor public ServiceState(android.os.Parcel);
    method protected void copyFrom(android.telephony.ServiceState);
    method public int describeContents();
    method public boolean getIsManualSelection();
    method public java.lang.String getOperatorAlphaLong();
    method public java.lang.String getOperatorAlphaShort();
    method public java.lang.String getOperatorNumeric();
    method public boolean getRoaming();
    method public int getState();
    method public void setIsManualSelection(boolean);
    method public void setOperatorName(java.lang.String, java.lang.String, java.lang.String);
    method public void setRoaming(boolean);
    method public void setState(int);
    method public void setStateOff();
    method public void setStateOutOfService();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ServiceState> CREATOR;
    field public static final int STATE_EMERGENCY_ONLY = 2; // 0x2
    field public static final int STATE_IN_SERVICE = 0; // 0x0
    field public static final int STATE_OUT_OF_SERVICE = 1; // 0x1
    field public static final int STATE_POWER_OFF = 3; // 0x3
  }

  public class SignalStrength implements android.os.Parcelable {
    method public int describeContents();
    method public int getCdmaDbm();
    method public int getCdmaEcio();
    method public int getEvdoDbm();
    method public int getEvdoEcio();
    method public int getEvdoSnr();
    method public int getGsmBitErrorRate();
    method public int getGsmSignalStrength();
    method public boolean isGsm();
    method public void writeToParcel(android.os.Parcel, int);
  }

  public final class SmsManager {
    method public java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
    method public void downloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent);
    method public android.os.Bundle getCarrierConfigValues();
    method public static android.telephony.SmsManager getDefault();
    method public static int getDefaultSmsSubscriptionId();
    method public static android.telephony.SmsManager getSmsManagerForSubscriptionId(int);
    method public int getSubscriptionId();
    method public void injectSmsPdu(byte[], java.lang.String, android.app.PendingIntent);
    method public void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
    method public void sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent);
    method public void sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
    method public void sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
    field public static final java.lang.String EXTRA_MMS_DATA = "android.telephony.extra.MMS_DATA";
    field public static final java.lang.String EXTRA_MMS_HTTP_STATUS = "android.telephony.extra.MMS_HTTP_STATUS";
    field public static final java.lang.String MMS_CONFIG_ALIAS_ENABLED = "aliasEnabled";
    field public static final java.lang.String MMS_CONFIG_ALIAS_MAX_CHARS = "aliasMaxChars";
    field public static final java.lang.String MMS_CONFIG_ALIAS_MIN_CHARS = "aliasMinChars";
    field public static final java.lang.String MMS_CONFIG_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
    field public static final java.lang.String MMS_CONFIG_APPEND_TRANSACTION_ID = "enabledTransID";
    field public static final java.lang.String MMS_CONFIG_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
    field public static final java.lang.String MMS_CONFIG_GROUP_MMS_ENABLED = "enableGroupMms";
    field public static final java.lang.String MMS_CONFIG_HTTP_PARAMS = "httpParams";
    field public static final java.lang.String MMS_CONFIG_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
    field public static final java.lang.String MMS_CONFIG_MAX_IMAGE_HEIGHT = "maxImageHeight";
    field public static final java.lang.String MMS_CONFIG_MAX_IMAGE_WIDTH = "maxImageWidth";
    field public static final java.lang.String MMS_CONFIG_MAX_MESSAGE_SIZE = "maxMessageSize";
    field public static final java.lang.String MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize";
    field public static final java.lang.String MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports";
    field public static final java.lang.String MMS_CONFIG_MMS_ENABLED = "enabledMMS";
    field public static final java.lang.String MMS_CONFIG_MMS_READ_REPORT_ENABLED = "enableMMSReadReports";
    field public static final java.lang.String MMS_CONFIG_MULTIPART_SMS_ENABLED = "enableMultipartSMS";
    field public static final java.lang.String MMS_CONFIG_NAI_SUFFIX = "naiSuffix";
    field public static final java.lang.String MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC";
    field public static final java.lang.String MMS_CONFIG_RECIPIENT_LIMIT = "recipientLimit";
    field public static final java.lang.String MMS_CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages";
    field public static final java.lang.String MMS_CONFIG_SHOW_CELL_BROADCAST_APP_LINKS = "config_cellBroadcastAppLinks";
    field public static final java.lang.String MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports";
    field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold";
    field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
    field public static final java.lang.String MMS_CONFIG_SUBJECT_MAX_LENGTH = "maxSubjectLength";
    field public static final java.lang.String MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition";
    field public static final java.lang.String MMS_CONFIG_UA_PROF_TAG_NAME = "uaProfTagName";
    field public static final java.lang.String MMS_CONFIG_UA_PROF_URL = "uaProfUrl";
    field public static final java.lang.String MMS_CONFIG_USER_AGENT = "userAgent";
    field public static final int MMS_ERROR_CONFIGURATION_ERROR = 7; // 0x7
    field public static final int MMS_ERROR_HTTP_FAILURE = 4; // 0x4
    field public static final int MMS_ERROR_INVALID_APN = 2; // 0x2
    field public static final int MMS_ERROR_IO_ERROR = 5; // 0x5
    field public static final int MMS_ERROR_NO_DATA_NETWORK = 8; // 0x8
    field public static final int MMS_ERROR_RETRY = 6; // 0x6
    field public static final int MMS_ERROR_UNABLE_CONNECT_MMS = 3; // 0x3
    field public static final int MMS_ERROR_UNSPECIFIED = 1; // 0x1
    field public static final int RESULT_ERROR_GENERIC_FAILURE = 1; // 0x1
    field public static final int RESULT_ERROR_NO_SERVICE = 4; // 0x4
    field public static final int RESULT_ERROR_NULL_PDU = 3; // 0x3
    field public static final int RESULT_ERROR_RADIO_OFF = 2; // 0x2
    field public static final int STATUS_ON_ICC_FREE = 0; // 0x0
    field public static final int STATUS_ON_ICC_READ = 1; // 0x1
    field public static final int STATUS_ON_ICC_SENT = 5; // 0x5
    field public static final int STATUS_ON_ICC_UNREAD = 3; // 0x3
    field public static final int STATUS_ON_ICC_UNSENT = 7; // 0x7
  }

  public class SmsMessage {
    method public static int[] calculateLength(java.lang.CharSequence, boolean);
    method public static int[] calculateLength(java.lang.String, boolean);
    method public static android.telephony.SmsMessage createFromPdu(byte[]);
    method public java.lang.String getDisplayMessageBody();
    method public java.lang.String getDisplayOriginatingAddress();
    method public java.lang.String getEmailBody();
    method public java.lang.String getEmailFrom();
    method public int getIndexOnIcc();
    method public deprecated int getIndexOnSim();
    method public java.lang.String getMessageBody();
    method public android.telephony.SmsMessage.MessageClass getMessageClass();
    method public java.lang.String getOriginatingAddress();
    method public byte[] getPdu();
    method public int getProtocolIdentifier();
    method public java.lang.String getPseudoSubject();
    method public java.lang.String getServiceCenterAddress();
    method public int getStatus();
    method public int getStatusOnIcc();
    method public deprecated int getStatusOnSim();
    method public static android.telephony.SmsMessage.SubmitPdu getSubmitPdu(java.lang.String, java.lang.String, java.lang.String, boolean);
    method public static android.telephony.SmsMessage.SubmitPdu getSubmitPdu(java.lang.String, java.lang.String, short, byte[], boolean);
    method public static int getTPLayerLengthForPDU(java.lang.String);
    method public long getTimestampMillis();
    method public byte[] getUserData();
    method public boolean isCphsMwiMessage();
    method public boolean isEmail();
    method public boolean isMWIClearMessage();
    method public boolean isMWISetMessage();
    method public boolean isMwiDontStore();
    method public boolean isReplace();
    method public boolean isReplyPathPresent();
    method public boolean isStatusReportMessage();
    field public static final int ENCODING_16BIT = 3; // 0x3
    field public static final int ENCODING_7BIT = 1; // 0x1
    field public static final int ENCODING_8BIT = 2; // 0x2
    field public static final int ENCODING_UNKNOWN = 0; // 0x0
    field public static final int MAX_USER_DATA_BYTES = 140; // 0x8c
    field public static final int MAX_USER_DATA_BYTES_WITH_HEADER = 134; // 0x86
    field public static final int MAX_USER_DATA_SEPTETS = 160; // 0xa0
    field public static final int MAX_USER_DATA_SEPTETS_WITH_HEADER = 153; // 0x99
  }

  public static final class SmsMessage.MessageClass extends java.lang.Enum {
    method public static android.telephony.SmsMessage.MessageClass valueOf(java.lang.String);
    method public static final android.telephony.SmsMessage.MessageClass[] values();
    enum_constant public static final android.telephony.SmsMessage.MessageClass CLASS_0;
    enum_constant public static final android.telephony.SmsMessage.MessageClass CLASS_1;
    enum_constant public static final android.telephony.SmsMessage.MessageClass CLASS_2;
    enum_constant public static final android.telephony.SmsMessage.MessageClass CLASS_3;
    enum_constant public static final android.telephony.SmsMessage.MessageClass UNKNOWN;
  }

  public static class SmsMessage.SubmitPdu {
    field public byte[] encodedMessage;
    field public byte[] encodedScAddress;
  }

  public class SubscriptionInfo implements android.os.Parcelable {
    method public android.graphics.Bitmap createIconBitmap(android.content.Context);
    method public int describeContents();
    method public java.lang.CharSequence getCarrierName();
    method public java.lang.String getCountryIso();
    method public int getDataRoaming();
    method public java.lang.CharSequence getDisplayName();
    method public java.lang.String getIccId();
    method public int getIconTint();
    method public int getMcc();
    method public int getMnc();
    method public java.lang.String getNumber();
    method public int getSimSlotIndex();
    method public int getSubscriptionId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.SubscriptionInfo> CREATOR;
  }

  public class SubscriptionManager {
    method public void addOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
    method public static android.telephony.SubscriptionManager from(android.content.Context);
    method public android.telephony.SubscriptionInfo getActiveSubscriptionInfo(int);
    method public int getActiveSubscriptionInfoCount();
    method public int getActiveSubscriptionInfoCountMax();
    method public android.telephony.SubscriptionInfo getActiveSubscriptionInfoForSimSlotIndex(int);
    method public java.util.List<android.telephony.SubscriptionInfo> getActiveSubscriptionInfoList();
    method public boolean isNetworkRoaming(int);
    method public void removeOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
    field public static final int DATA_ROAMING_DISABLE = 0; // 0x0
    field public static final int DATA_ROAMING_ENABLE = 1; // 0x1
  }

  public static class SubscriptionManager.OnSubscriptionsChangedListener {
    ctor public SubscriptionManager.OnSubscriptionsChangedListener();
    method public void onSubscriptionsChanged();
  }

  public class TelephonyManager {
    method public boolean canChangeDtmfToneLength();
    method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
    method public int getCallState();
    method public android.telephony.CellLocation getCellLocation();
    method public int getDataActivity();
    method public int getDataState();
    method public java.lang.String getDeviceId();
    method public java.lang.String getDeviceSoftwareVersion();
    method public java.lang.String getGroupIdLevel1();
    method public java.lang.String getLine1Number();
    method public java.lang.String getMmsUAProfUrl();
    method public java.lang.String getMmsUserAgent();
    method public java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
    method public java.lang.String getNetworkCountryIso();
    method public java.lang.String getNetworkOperator();
    method public java.lang.String getNetworkOperatorName();
    method public int getNetworkType();
    method public int getPhoneType();
    method public java.lang.String getSimCountryIso();
    method public java.lang.String getSimOperator();
    method public java.lang.String getSimOperatorName();
    method public java.lang.String getSimSerialNumber();
    method public int getSimState();
    method public java.lang.String getSubscriberId();
    method public java.lang.String getVoiceMailAlphaTag();
    method public java.lang.String getVoiceMailNumber();
    method public boolean hasCarrierPrivileges();
    method public boolean hasIccCard();
    method public boolean iccCloseLogicalChannel(int);
    method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
    method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
    method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
    method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
    method public boolean isHearingAidCompatibilitySupported();
    method public boolean isNetworkRoaming();
    method public boolean isSmsCapable();
    method public boolean isTtyModeSupported();
    method public boolean isVoiceCapable();
    method public boolean isWorldPhone();
    method public void listen(android.telephony.PhoneStateListener, int);
    method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
    method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
    method public boolean setOperatorBrandOverride(java.lang.String);
    method public boolean setPreferredNetworkTypeToGlobal();
    method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
    field public static final java.lang.String ACTION_EMERGENCY_ASSISTANCE = "android.telephony.action.EMERGENCY_ASSISTANCE";
    field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
    field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
    field public static final int CALL_STATE_IDLE = 0; // 0x0
    field public static final int CALL_STATE_OFFHOOK = 2; // 0x2
    field public static final int CALL_STATE_RINGING = 1; // 0x1
    field public static final int DATA_ACTIVITY_DORMANT = 4; // 0x4
    field public static final int DATA_ACTIVITY_IN = 1; // 0x1
    field public static final int DATA_ACTIVITY_INOUT = 3; // 0x3
    field public static final int DATA_ACTIVITY_NONE = 0; // 0x0
    field public static final int DATA_ACTIVITY_OUT = 2; // 0x2
    field public static final int DATA_CONNECTED = 2; // 0x2
    field public static final int DATA_CONNECTING = 1; // 0x1
    field public static final int DATA_DISCONNECTED = 0; // 0x0
    field public static final int DATA_SUSPENDED = 3; // 0x3
    field public static final java.lang.String EXTRA_INCOMING_NUMBER = "incoming_number";
    field public static final java.lang.String EXTRA_STATE = "state";
    field public static final java.lang.String EXTRA_STATE_IDLE;
    field public static final java.lang.String EXTRA_STATE_OFFHOOK;
    field public static final java.lang.String EXTRA_STATE_RINGING;
    field public static final int NETWORK_TYPE_1xRTT = 7; // 0x7
    field public static final int NETWORK_TYPE_CDMA = 4; // 0x4
    field public static final int NETWORK_TYPE_EDGE = 2; // 0x2
    field public static final int NETWORK_TYPE_EHRPD = 14; // 0xe
    field public static final int NETWORK_TYPE_EVDO_0 = 5; // 0x5
    field public static final int NETWORK_TYPE_EVDO_A = 6; // 0x6
    field public static final int NETWORK_TYPE_EVDO_B = 12; // 0xc
    field public static final int NETWORK_TYPE_GPRS = 1; // 0x1
    field public static final int NETWORK_TYPE_HSDPA = 8; // 0x8
    field public static final int NETWORK_TYPE_HSPA = 10; // 0xa
    field public static final int NETWORK_TYPE_HSPAP = 15; // 0xf
    field public static final int NETWORK_TYPE_HSUPA = 9; // 0x9
    field public static final int NETWORK_TYPE_IDEN = 11; // 0xb
    field public static final int NETWORK_TYPE_LTE = 13; // 0xd
    field public static final int NETWORK_TYPE_UMTS = 3; // 0x3
    field public static final int NETWORK_TYPE_UNKNOWN = 0; // 0x0
    field public static final int PHONE_TYPE_CDMA = 2; // 0x2
    field public static final int PHONE_TYPE_GSM = 1; // 0x1
    field public static final int PHONE_TYPE_NONE = 0; // 0x0
    field public static final int PHONE_TYPE_SIP = 3; // 0x3
    field public static final int SIM_STATE_ABSENT = 1; // 0x1
    field public static final int SIM_STATE_NETWORK_LOCKED = 4; // 0x4
    field public static final int SIM_STATE_PIN_REQUIRED = 2; // 0x2
    field public static final int SIM_STATE_PUK_REQUIRED = 3; // 0x3
    field public static final int SIM_STATE_READY = 5; // 0x5
    field public static final int SIM_STATE_UNKNOWN = 0; // 0x0
  }

}

package android.telephony.cdma {

  public class CdmaCellLocation extends android.telephony.CellLocation {
    ctor public CdmaCellLocation();
    ctor public CdmaCellLocation(android.os.Bundle);
    method public static double convertQuartSecToDecDegrees(int);
    method public void fillInNotifierBundle(android.os.Bundle);
    method public int getBaseStationId();
    method public int getBaseStationLatitude();
    method public int getBaseStationLongitude();
    method public int getNetworkId();
    method public int getSystemId();
    method public void setCellLocationData(int, int, int);
    method public void setCellLocationData(int, int, int, int, int);
    method public void setStateInvalid();
  }

}

package android.telephony.gsm {

  public class GsmCellLocation extends android.telephony.CellLocation {
    ctor public GsmCellLocation();
    ctor public GsmCellLocation(android.os.Bundle);
    method public void fillInNotifierBundle(android.os.Bundle);
    method public int getCid();
    method public int getLac();
    method public int getPsc();
    method public void setLacAndCid(int, int);
    method public void setStateInvalid();
  }

  public final deprecated class SmsManager {
    method public final deprecated java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
    method public static final deprecated android.telephony.gsm.SmsManager getDefault();
    method public final deprecated void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
    method public final deprecated void sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
    method public final deprecated void sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
    field public static final deprecated int RESULT_ERROR_GENERIC_FAILURE = 1; // 0x1
    field public static final deprecated int RESULT_ERROR_NO_SERVICE = 4; // 0x4
    field public static final deprecated int RESULT_ERROR_NULL_PDU = 3; // 0x3
    field public static final deprecated int RESULT_ERROR_RADIO_OFF = 2; // 0x2
    field public static final deprecated int STATUS_ON_SIM_FREE = 0; // 0x0
    field public static final deprecated int STATUS_ON_SIM_READ = 1; // 0x1
    field public static final deprecated int STATUS_ON_SIM_SENT = 5; // 0x5
    field public static final deprecated int STATUS_ON_SIM_UNREAD = 3; // 0x3
    field public static final deprecated int STATUS_ON_SIM_UNSENT = 7; // 0x7
  }

  public deprecated class SmsMessage {
    ctor public deprecated SmsMessage();
    method public static deprecated int[] calculateLength(java.lang.CharSequence, boolean);
    method public static deprecated int[] calculateLength(java.lang.String, boolean);
    method public static deprecated android.telephony.gsm.SmsMessage createFromPdu(byte[]);
    method public deprecated java.lang.String getDisplayMessageBody();
    method public deprecated java.lang.String getDisplayOriginatingAddress();
    method public deprecated java.lang.String getEmailBody();
    method public deprecated java.lang.String getEmailFrom();
    method public deprecated int getIndexOnSim();
    method public deprecated java.lang.String getMessageBody();
    method public deprecated android.telephony.gsm.SmsMessage.MessageClass getMessageClass();
    method public deprecated java.lang.String getOriginatingAddress();
    method public deprecated byte[] getPdu();
    method public deprecated int getProtocolIdentifier();
    method public deprecated java.lang.String getPseudoSubject();
    method public deprecated java.lang.String getServiceCenterAddress();
    method public deprecated int getStatus();
    method public deprecated int getStatusOnSim();
    method public static deprecated android.telephony.gsm.SmsMessage.SubmitPdu getSubmitPdu(java.lang.String, java.lang.String, java.lang.String, boolean);
    method public static deprecated android.telephony.gsm.SmsMessage.SubmitPdu getSubmitPdu(java.lang.String, java.lang.String, short, byte[], boolean);
    method public static deprecated int getTPLayerLengthForPDU(java.lang.String);
    method public deprecated long getTimestampMillis();
    method public deprecated byte[] getUserData();
    method public deprecated boolean isCphsMwiMessage();
    method public deprecated boolean isEmail();
    method public deprecated boolean isMWIClearMessage();
    method public deprecated boolean isMWISetMessage();
    method public deprecated boolean isMwiDontStore();
    method public deprecated boolean isReplace();
    method public deprecated boolean isReplyPathPresent();
    method public deprecated boolean isStatusReportMessage();
    field public static final deprecated int ENCODING_16BIT = 3; // 0x3
    field public static final deprecated int ENCODING_7BIT = 1; // 0x1
    field public static final deprecated int ENCODING_8BIT = 2; // 0x2
    field public static final deprecated int ENCODING_UNKNOWN = 0; // 0x0
    field public static final deprecated int MAX_USER_DATA_BYTES = 140; // 0x8c
    field public static final deprecated int MAX_USER_DATA_SEPTETS = 160; // 0xa0
    field public static final deprecated int MAX_USER_DATA_SEPTETS_WITH_HEADER = 153; // 0x99
  }

  public static final deprecated class SmsMessage.MessageClass extends java.lang.Enum {
    method public static android.telephony.gsm.SmsMessage.MessageClass valueOf(java.lang.String);
    method public static final android.telephony.gsm.SmsMessage.MessageClass[] values();
    enum_constant public static final android.telephony.gsm.SmsMessage.MessageClass CLASS_0;
    enum_constant public static final android.telephony.gsm.SmsMessage.MessageClass CLASS_1;
    enum_constant public static final android.telephony.gsm.SmsMessage.MessageClass CLASS_2;
    enum_constant public static final android.telephony.gsm.SmsMessage.MessageClass CLASS_3;
    enum_constant public static final android.telephony.gsm.SmsMessage.MessageClass UNKNOWN;
  }

  public static deprecated class SmsMessage.SubmitPdu {
    ctor public deprecated SmsMessage.SubmitPdu();
    field public deprecated byte[] encodedMessage;
    field public deprecated byte[] encodedScAddress;
  }

}

package android.test {

  public abstract deprecated class ActivityInstrumentationTestCase extends android.test.ActivityTestCase {
    ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class<T>);
    ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class<T>, boolean);
    method public T getActivity();
    method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception;
  }

  public abstract class ActivityInstrumentationTestCase2 extends android.test.ActivityTestCase {
    ctor public deprecated ActivityInstrumentationTestCase2(java.lang.String, java.lang.Class<T>);
    ctor public ActivityInstrumentationTestCase2(java.lang.Class<T>);
    method public T getActivity();
    method public void setActivityInitialTouchMode(boolean);
    method public void setActivityIntent(android.content.Intent);
  }

  public abstract class ActivityTestCase extends android.test.InstrumentationTestCase {
    ctor public ActivityTestCase();
    method protected android.app.Activity getActivity();
    method protected void scrubClass(java.lang.Class<?>) throws java.lang.IllegalAccessException;
    method protected void setActivity(android.app.Activity);
  }

  public abstract class ActivityUnitTestCase extends android.test.ActivityTestCase {
    ctor public ActivityUnitTestCase(java.lang.Class<T>);
    method public T getActivity();
    method public int getFinishedActivityRequest();
    method public int getRequestedOrientation();
    method public android.content.Intent getStartedActivityIntent();
    method public int getStartedActivityRequest();
    method public boolean isFinishCalled();
    method public void setActivityContext(android.content.Context);
    method public void setApplication(android.app.Application);
    method protected T startActivity(android.content.Intent, android.os.Bundle, java.lang.Object);
  }

  public class AndroidTestCase extends junit.framework.TestCase {
    ctor public AndroidTestCase();
    method public void assertActivityRequiresPermission(java.lang.String, java.lang.String, java.lang.String);
    method public void assertReadingContentUriRequiresPermission(android.net.Uri, java.lang.String);
    method public void assertWritingContentUriRequiresPermission(android.net.Uri, java.lang.String);
    method public android.content.Context getContext();
    method protected void scrubClass(java.lang.Class<?>) throws java.lang.IllegalAccessException;
    method public void setContext(android.content.Context);
    method public void testAndroidTestCaseSetupProperly();
    field protected android.content.Context mContext;
  }

  public class AndroidTestRunner extends junit.runner.BaseTestRunner {
    ctor public AndroidTestRunner();
    method public void addTestListener(junit.framework.TestListener);
    method public void clearTestListeners();
    method protected junit.framework.TestResult createTestResult();
    method public java.util.List<junit.framework.TestCase> getTestCases();
    method public java.lang.String getTestClassName();
    method public junit.framework.TestResult getTestResult();
    method protected void runFailed(java.lang.String);
    method public void runTest();
    method public void runTest(junit.framework.TestResult);
    method public void setContext(android.content.Context);
    method public deprecated void setInstrumentaiton(android.app.Instrumentation);
    method public void setInstrumentation(android.app.Instrumentation);
    method public void setTest(junit.framework.Test);
    method public void setTestClassName(java.lang.String, java.lang.String);
    method public void testEnded(java.lang.String);
    method public void testFailed(int, junit.framework.Test, java.lang.Throwable);
    method public void testStarted(java.lang.String);
  }

  public abstract class ApplicationTestCase extends android.test.AndroidTestCase {
    ctor public ApplicationTestCase(java.lang.Class<T>);
    method protected final void createApplication();
    method public T getApplication();
    method public android.content.Context getSystemContext();
    method protected final void terminateApplication();
    method public final void testApplicationTestCaseSetUpProperly() throws java.lang.Exception;
  }

  public deprecated class AssertionFailedError extends java.lang.Error {
    ctor public AssertionFailedError();
    ctor public AssertionFailedError(java.lang.String);
  }

  public deprecated class ComparisonFailure extends android.test.AssertionFailedError {
    ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String);
  }

  public abstract class FlakyTest implements java.lang.annotation.Annotation {
  }

  public class InstrumentationTestCase extends junit.framework.TestCase {
    ctor public InstrumentationTestCase();
    method public android.app.Instrumentation getInstrumentation();
    method public deprecated void injectInsrumentation(android.app.Instrumentation);
    method public void injectInstrumentation(android.app.Instrumentation);
    method public final T launchActivity(java.lang.String, java.lang.Class<T>, android.os.Bundle);
    method public final T launchActivityWithIntent(java.lang.String, java.lang.Class<T>, android.content.Intent);
    method public void runTestOnUiThread(java.lang.Runnable) throws java.lang.Throwable;
    method public void sendKeys(java.lang.String);
    method public void sendKeys(int...);
    method public void sendRepeatedKeys(int...);
  }

  public class InstrumentationTestRunner extends android.app.Instrumentation implements android.test.TestSuiteProvider {
    ctor public InstrumentationTestRunner();
    method public junit.framework.TestSuite getAllTests();
    method protected android.test.AndroidTestRunner getAndroidTestRunner();
    method public android.os.Bundle getArguments();
    method public java.lang.ClassLoader getLoader();
    method public junit.framework.TestSuite getTestSuite();
    field public static final java.lang.String REPORT_KEY_NAME_CLASS = "class";
    field public static final java.lang.String REPORT_KEY_NAME_TEST = "test";
    field public static final java.lang.String REPORT_KEY_NUM_CURRENT = "current";
    field public static final java.lang.String REPORT_KEY_NUM_TOTAL = "numtests";
    field public static final java.lang.String REPORT_KEY_STACK = "stack";
    field public static final java.lang.String REPORT_VALUE_ID = "InstrumentationTestRunner";
    field public static final int REPORT_VALUE_RESULT_ERROR = -1; // 0xffffffff
    field public static final int REPORT_VALUE_RESULT_FAILURE = -2; // 0xfffffffe
    field public static final int REPORT_VALUE_RESULT_OK = 0; // 0x0
    field public static final int REPORT_VALUE_RESULT_START = 1; // 0x1
  }

  public class InstrumentationTestSuite extends junit.framework.TestSuite {
    ctor public InstrumentationTestSuite(android.app.Instrumentation);
    ctor public InstrumentationTestSuite(java.lang.String, android.app.Instrumentation);
    ctor public InstrumentationTestSuite(java.lang.Class, android.app.Instrumentation);
    method public void addTestSuite(java.lang.Class);
  }

  public class IsolatedContext extends android.content.ContextWrapper {
    ctor public IsolatedContext(android.content.ContentResolver, android.content.Context);
    method public java.util.List<android.content.Intent> getAndClearBroadcastIntents();
  }

  public class LoaderTestCase extends android.test.AndroidTestCase {
    ctor public LoaderTestCase();
    method public T getLoaderResultSynchronously(android.content.Loader<T>);
  }

  public final class MoreAsserts {
    method public static void assertAssignableFrom(java.lang.Class<?>, java.lang.Object);
    method public static void assertAssignableFrom(java.lang.Class<?>, java.lang.Class<?>);
    method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String, java.lang.String);
    method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String);
    method public static void assertContentsInAnyOrder(java.lang.String, java.lang.Iterable<?>, java.lang.Object...);
    method public static void assertContentsInAnyOrder(java.lang.Iterable<?>, java.lang.Object...);
    method public static void assertContentsInOrder(java.lang.String, java.lang.Iterable<?>, java.lang.Object...);
    method public static void assertContentsInOrder(java.lang.Iterable<?>, java.lang.Object...);
    method public static void assertEmpty(java.lang.String, java.lang.Iterable<?>);
    method public static void assertEmpty(java.lang.Iterable<?>);
    method public static void assertEmpty(java.lang.String, java.util.Map<?, ?>);
    method public static void assertEmpty(java.util.Map<?, ?>);
    method public static void assertEquals(java.lang.String, byte[], byte[]);
    method public static void assertEquals(byte[], byte[]);
    method public static void assertEquals(java.lang.String, int[], int[]);
    method public static void assertEquals(int[], int[]);
    method public static void assertEquals(java.lang.String, double[], double[]);
    method public static void assertEquals(double[], double[]);
    method public static void assertEquals(java.lang.String, java.lang.Object[], java.lang.Object[]);
    method public static void assertEquals(java.lang.Object[], java.lang.Object[]);
    method public static void assertEquals(java.lang.String, java.util.Set<? extends java.lang.Object>, java.util.Set<? extends java.lang.Object>);
    method public static void assertEquals(java.util.Set<? extends java.lang.Object>, java.util.Set<? extends java.lang.Object>);
    method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String, java.lang.String);
    method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String);
    method public static void assertNotContainsRegex(java.lang.String, java.lang.String, java.lang.String);
    method public static void assertNotContainsRegex(java.lang.String, java.lang.String);
    method public static void assertNotEmpty(java.lang.String, java.lang.Iterable<?>);
    method public static void assertNotEmpty(java.lang.Iterable<?>);
    method public static void assertNotEmpty(java.lang.String, java.util.Map<?, ?>);
    method public static void assertNotEmpty(java.util.Map<?, ?>);
    method public static void assertNotEqual(java.lang.String, java.lang.Object, java.lang.Object);
    method public static void assertNotEqual(java.lang.Object, java.lang.Object);
    method public static void assertNotMatchesRegex(java.lang.String, java.lang.String, java.lang.String);
    method public static void assertNotMatchesRegex(java.lang.String, java.lang.String);
    method public static void checkEqualsAndHashCodeMethods(java.lang.String, java.lang.Object, java.lang.Object, boolean);
    method public static void checkEqualsAndHashCodeMethods(java.lang.Object, java.lang.Object, boolean);
  }

  public abstract interface PerformanceTestCase {
    method public abstract boolean isPerformanceOnly();
    method public abstract int startPerformance(android.test.PerformanceTestCase.Intermediates);
  }

  public static abstract interface PerformanceTestCase.Intermediates {
    method public abstract void addIntermediate(java.lang.String);
    method public abstract void addIntermediate(java.lang.String, long);
    method public abstract void finishTiming(boolean);
    method public abstract void setInternalIterations(int);
    method public abstract void startTiming(boolean);
  }

  public abstract deprecated class ProviderTestCase extends android.test.InstrumentationTestCase {
    ctor public ProviderTestCase(java.lang.Class<T>, java.lang.String);
    method public android.test.mock.MockContentResolver getMockContentResolver();
    method public android.test.IsolatedContext getMockContext();
    method public T getProvider();
    method public static android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.Class<T>, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
  }

  public abstract class ProviderTestCase2 extends android.test.AndroidTestCase {
    ctor public ProviderTestCase2(java.lang.Class<T>, java.lang.String);
    method public android.test.mock.MockContentResolver getMockContentResolver();
    method public android.test.IsolatedContext getMockContext();
    method public T getProvider();
    method public static android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.String, java.lang.Class<T>, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
  }

  public class RenamingDelegatingContext extends android.content.ContextWrapper {
    ctor public RenamingDelegatingContext(android.content.Context, java.lang.String);
    ctor public RenamingDelegatingContext(android.content.Context, android.content.Context, java.lang.String);
    method public java.lang.String getDatabasePrefix();
    method public void makeExistingFilesAndDbsAccessible();
    method public static T providerWithRenamedContext(java.lang.Class<T>, android.content.Context, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
    method public static T providerWithRenamedContext(java.lang.Class<T>, android.content.Context, java.lang.String, boolean) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
  }

  public abstract class ServiceTestCase extends android.test.AndroidTestCase {
    ctor public ServiceTestCase(java.lang.Class<T>);
    method protected android.os.IBinder bindService(android.content.Intent);
    method public android.app.Application getApplication();
    method public T getService();
    method public android.content.Context getSystemContext();
    method public void setApplication(android.app.Application);
    method protected void setupService();
    method protected void shutdownService();
    method protected void startService(android.content.Intent);
    method public void testServiceTestCaseSetUpProperly() throws java.lang.Exception;
  }

  public abstract class SingleLaunchActivityTestCase extends android.test.InstrumentationTestCase {
    ctor public SingleLaunchActivityTestCase(java.lang.String, java.lang.Class<T>);
    method public T getActivity();
    method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception;
  }

  public class SyncBaseInstrumentation extends android.test.InstrumentationTestCase {
    ctor public SyncBaseInstrumentation();
    method protected void cancelSyncsandDisableAutoSync();
    method protected void syncProvider(android.net.Uri, java.lang.String, java.lang.String) throws java.lang.Exception;
  }

  public abstract interface TestSuiteProvider {
    method public abstract junit.framework.TestSuite getTestSuite();
  }

  public class TouchUtils {
    ctor public TouchUtils();
    method public static void clickView(android.test.InstrumentationTestCase, android.view.View);
    method public static deprecated void drag(android.test.ActivityInstrumentationTestCase, float, float, float, float, int);
    method public static void drag(android.test.InstrumentationTestCase, float, float, float, float, int);
    method public static deprecated void dragQuarterScreenDown(android.test.ActivityInstrumentationTestCase);
    method public static void dragQuarterScreenDown(android.test.InstrumentationTestCase, android.app.Activity);
    method public static deprecated void dragQuarterScreenUp(android.test.ActivityInstrumentationTestCase);
    method public static void dragQuarterScreenUp(android.test.InstrumentationTestCase, android.app.Activity);
    method public static deprecated int dragViewBy(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int);
    method public static deprecated int dragViewBy(android.test.InstrumentationTestCase, android.view.View, int, int, int);
    method public static deprecated int dragViewTo(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int);
    method public static int dragViewTo(android.test.InstrumentationTestCase, android.view.View, int, int, int);
    method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View);
    method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View);
    method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View, int);
    method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View, int);
    method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View);
    method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View, int);
    method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View);
    method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View, int);
    method public static deprecated int dragViewToX(android.test.ActivityInstrumentationTestCase, android.view.View, int, int);
    method public static int dragViewToX(android.test.InstrumentationTestCase, android.view.View, int, int);
    method public static deprecated int dragViewToY(android.test.ActivityInstrumentationTestCase, android.view.View, int, int);
    method public static int dragViewToY(android.test.InstrumentationTestCase, android.view.View, int, int);
    method public static deprecated void longClickView(android.test.ActivityInstrumentationTestCase, android.view.View);
    method public static void longClickView(android.test.InstrumentationTestCase, android.view.View);
    method public static deprecated void scrollToBottom(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup);
    method public static void scrollToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup);
    method public static deprecated void scrollToTop(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup);
    method public static void scrollToTop(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup);
    method public static void tapView(android.test.InstrumentationTestCase, android.view.View);
    method public static void touchAndCancelView(android.test.InstrumentationTestCase, android.view.View);
  }

  public abstract class UiThreadTest implements java.lang.annotation.Annotation {
  }

  public class ViewAsserts {
    method public static void assertBaselineAligned(android.view.View, android.view.View);
    method public static void assertBottomAligned(android.view.View, android.view.View);
    method public static void assertBottomAligned(android.view.View, android.view.View, int);
    method public static void assertGroupContains(android.view.ViewGroup, android.view.View);
    method public static void assertGroupIntegrity(android.view.ViewGroup);
    method public static void assertGroupNotContains(android.view.ViewGroup, android.view.View);
    method public static void assertHasScreenCoordinates(android.view.View, android.view.View, int, int);
    method public static void assertHorizontalCenterAligned(android.view.View, android.view.View);
    method public static void assertLeftAligned(android.view.View, android.view.View);
    method public static void assertLeftAligned(android.view.View, android.view.View, int);
    method public static void assertOffScreenAbove(android.view.View, android.view.View);
    method public static void assertOffScreenBelow(android.view.View, android.view.View);
    method public static void assertOnScreen(android.view.View, android.view.View);
    method public static void assertRightAligned(android.view.View, android.view.View);
    method public static void assertRightAligned(android.view.View, android.view.View, int);
    method public static void assertTopAligned(android.view.View, android.view.View);
    method public static void assertTopAligned(android.view.View, android.view.View, int);
    method public static void assertVerticalCenterAligned(android.view.View, android.view.View);
  }

}

package android.test.mock {

  public class MockApplication extends android.app.Application {
    ctor public MockApplication();
  }

  public class MockContentProvider extends android.content.ContentProvider {
    ctor protected MockContentProvider();
    ctor public MockContentProvider(android.content.Context);
    ctor public MockContentProvider(android.content.Context, java.lang.String, java.lang.String, android.content.pm.PathPermission[]);
    method public int delete(android.net.Uri, java.lang.String, java.lang.String[]);
    method public java.lang.String getType(android.net.Uri);
    method public android.net.Uri insert(android.net.Uri, android.content.ContentValues);
    method public boolean onCreate();
    method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
  }

  public class MockContentResolver extends android.content.ContentResolver {
    ctor public MockContentResolver();
    ctor public MockContentResolver(android.content.Context);
    method public void addProvider(java.lang.String, android.content.ContentProvider);
  }

  public class MockContext extends android.content.Context {
    ctor public MockContext();
    method public boolean bindService(android.content.Intent, android.content.ServiceConnection, int);
    method public int checkCallingOrSelfPermission(java.lang.String);
    method public int checkCallingOrSelfUriPermission(android.net.Uri, int);
    method public int checkCallingPermission(java.lang.String);
    method public int checkCallingUriPermission(android.net.Uri, int);
    method public int checkPermission(java.lang.String, int, int);
    method public int checkSelfPermission(java.lang.String);
    method public int checkUriPermission(android.net.Uri, int, int, int);
    method public int checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int);
    method public void clearWallpaper();
    method public android.content.Context createConfigurationContext(android.content.res.Configuration);
    method public android.content.Context createDisplayContext(android.view.Display);
    method public android.content.Context createPackageContext(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public java.lang.String[] databaseList();
    method public boolean deleteDatabase(java.lang.String);
    method public boolean deleteFile(java.lang.String);
    method public void enforceCallingOrSelfPermission(java.lang.String, java.lang.String);
    method public void enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String);
    method public void enforceCallingPermission(java.lang.String, java.lang.String);
    method public void enforceCallingUriPermission(android.net.Uri, int, java.lang.String);
    method public void enforcePermission(java.lang.String, int, int, java.lang.String);
    method public void enforceUriPermission(android.net.Uri, int, int, int, java.lang.String);
    method public void enforceUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int, java.lang.String);
    method public java.lang.String[] fileList();
    method public android.content.Context getApplicationContext();
    method public android.content.pm.ApplicationInfo getApplicationInfo();
    method public android.content.res.AssetManager getAssets();
    method public java.io.File getCacheDir();
    method public java.lang.ClassLoader getClassLoader();
    method public java.io.File getCodeCacheDir();
    method public android.content.ContentResolver getContentResolver();
    method public java.io.File getDatabasePath(java.lang.String);
    method public java.io.File getDir(java.lang.String, int);
    method public java.io.File getExternalCacheDir();
    method public java.io.File[] getExternalCacheDirs();
    method public java.io.File getExternalFilesDir(java.lang.String);
    method public java.io.File[] getExternalFilesDirs(java.lang.String);
    method public java.io.File[] getExternalMediaDirs();
    method public java.io.File getFileStreamPath(java.lang.String);
    method public java.io.File getFilesDir();
    method public android.os.Looper getMainLooper();
    method public java.io.File getNoBackupFilesDir();
    method public java.io.File getObbDir();
    method public java.io.File[] getObbDirs();
    method public java.lang.String getPackageCodePath();
    method public android.content.pm.PackageManager getPackageManager();
    method public java.lang.String getPackageName();
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
    method public android.graphics.drawable.Drawable getWallpaper();
    method public int getWallpaperDesiredMinimumHeight();
    method public int getWallpaperDesiredMinimumWidth();
    method public void grantUriPermission(java.lang.String, android.net.Uri, int);
    method public java.io.FileInputStream openFileInput(java.lang.String) throws java.io.FileNotFoundException;
    method public java.io.FileOutputStream openFileOutput(java.lang.String, int) throws java.io.FileNotFoundException;
    method public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory);
    method public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler);
    method public android.graphics.drawable.Drawable peekWallpaper();
    method public android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter);
    method public android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler);
    method public void removeStickyBroadcast(android.content.Intent);
    method public void removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public void revokeUriPermission(android.net.Uri, int);
    method public void sendBroadcast(android.content.Intent);
    method public void sendBroadcast(android.content.Intent, java.lang.String);
    method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String);
    method public void sendOrderedBroadcast(android.content.Intent, java.lang.String);
    method public void sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public void sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public void sendStickyBroadcast(android.content.Intent);
    method public void sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
    method public void sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public void sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
    method public void setTheme(int);
    method public void setWallpaper(android.graphics.Bitmap) throws java.io.IOException;
    method public void setWallpaper(java.io.InputStream) throws java.io.IOException;
    method public void startActivities(android.content.Intent[]);
    method public void startActivities(android.content.Intent[], android.os.Bundle);
    method public void startActivity(android.content.Intent);
    method public void startActivity(android.content.Intent, android.os.Bundle);
    method public boolean startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle);
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public android.content.ComponentName startService(android.content.Intent);
    method public boolean stopService(android.content.Intent);
    method public void unbindService(android.content.ServiceConnection);
    method public void unregisterReceiver(android.content.BroadcastReceiver);
  }

  public class MockCursor implements android.database.Cursor {
    ctor public MockCursor();
    method public void close();
    method public void copyStringToBuffer(int, android.database.CharArrayBuffer);
    method public deprecated void deactivate();
    method public byte[] getBlob(int);
    method public int getColumnCount();
    method public int getColumnIndex(java.lang.String);
    method public int getColumnIndexOrThrow(java.lang.String);
    method public java.lang.String getColumnName(int);
    method public java.lang.String[] getColumnNames();
    method public int getCount();
    method public double getDouble(int);
    method public android.os.Bundle getExtras();
    method public float getFloat(int);
    method public int getInt(int);
    method public long getLong(int);
    method public android.net.Uri getNotificationUri();
    method public int getPosition();
    method public short getShort(int);
    method public java.lang.String getString(int);
    method public int getType(int);
    method public boolean getWantsAllOnMoveCalls();
    method public boolean isAfterLast();
    method public boolean isBeforeFirst();
    method public boolean isClosed();
    method public boolean isFirst();
    method public boolean isLast();
    method public boolean isNull(int);
    method public boolean move(int);
    method public boolean moveToFirst();
    method public boolean moveToLast();
    method public boolean moveToNext();
    method public boolean moveToPosition(int);
    method public boolean moveToPrevious();
    method public void registerContentObserver(android.database.ContentObserver);
    method public void registerDataSetObserver(android.database.DataSetObserver);
    method public deprecated boolean requery();
    method public android.os.Bundle respond(android.os.Bundle);
    method public void setExtras(android.os.Bundle);
    method public void setNotificationUri(android.content.ContentResolver, android.net.Uri);
    method public void unregisterContentObserver(android.database.ContentObserver);
    method public void unregisterDataSetObserver(android.database.DataSetObserver);
  }

  public class MockDialogInterface implements android.content.DialogInterface {
    ctor public MockDialogInterface();
    method public void cancel();
    method public void dismiss();
  }

  public class MockPackageManager extends android.content.pm.PackageManager {
    ctor public MockPackageManager();
    method public void addPackageToPreferred(java.lang.String);
    method public boolean addPermission(android.content.pm.PermissionInfo);
    method public boolean addPermissionAsync(android.content.pm.PermissionInfo);
    method public void addPreferredActivity(android.content.IntentFilter, int, android.content.ComponentName[], android.content.ComponentName);
    method public java.lang.String[] canonicalToCurrentPackageNames(java.lang.String[]);
    method public int checkPermission(java.lang.String, java.lang.String);
    method public int checkSignatures(java.lang.String, java.lang.String);
    method public int checkSignatures(int, int);
    method public void clearPackagePreferredActivities(java.lang.String);
    method public java.lang.String[] currentToCanonicalPackageNames(java.lang.String[]);
    method public void extendVerificationTimeout(int, int, long);
    method public android.graphics.drawable.Drawable getActivityBanner(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.graphics.drawable.Drawable getActivityBanner(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.graphics.drawable.Drawable getActivityIcon(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.graphics.drawable.Drawable getActivityIcon(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.ActivityInfo getActivityInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.graphics.drawable.Drawable getActivityLogo(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.graphics.drawable.Drawable getActivityLogo(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
    method public java.util.List<android.content.IntentFilter> getAllIntentFilters(java.lang.String);
    method public java.util.List<android.content.pm.PermissionGroupInfo> getAllPermissionGroups(int);
    method public android.graphics.drawable.Drawable getApplicationBanner(android.content.pm.ApplicationInfo);
    method public android.graphics.drawable.Drawable getApplicationBanner(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public int getApplicationEnabledSetting(java.lang.String);
    method public android.graphics.drawable.Drawable getApplicationIcon(android.content.pm.ApplicationInfo);
    method public android.graphics.drawable.Drawable getApplicationIcon(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
    method public android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
    method public android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public int getComponentEnabledSetting(android.content.ComponentName);
    method public android.graphics.drawable.Drawable getDefaultActivityIcon();
    method public java.lang.String getDefaultBrowserPackageName(int);
    method public android.graphics.drawable.Drawable getDrawable(java.lang.String, int, android.content.pm.ApplicationInfo);
    method public java.util.List<android.content.pm.ApplicationInfo> getInstalledApplications(int);
    method public java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int);
    method public java.lang.String getInstallerPackageName(java.lang.String);
    method public android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.Intent getLaunchIntentForPackage(java.lang.String);
    method public android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String);
    method public java.lang.String getNameForUid(int);
    method public int[] getPackageGids(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.PackageInfo getPackageInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.PackageInstaller getPackageInstaller();
    method public java.lang.String[] getPackagesForUid(int);
    method public java.util.List<android.content.pm.PackageInfo> getPackagesHoldingPermissions(java.lang.String[], int);
    method public android.content.pm.PermissionGroupInfo getPermissionGroupInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.PermissionInfo getPermissionInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public int getPreferredActivities(java.util.List<android.content.IntentFilter>, java.util.List<android.content.ComponentName>, java.lang.String);
    method public java.util.List<android.content.pm.PackageInfo> getPreferredPackages(int);
    method public android.content.pm.ProviderInfo getProviderInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.ActivityInfo getReceiverInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.res.Resources getResourcesForActivity(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo);
    method public android.content.res.Resources getResourcesForApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.FeatureInfo[] getSystemAvailableFeatures();
    method public java.lang.String[] getSystemSharedLibraryNames();
    method public java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo);
    method public android.graphics.drawable.Drawable getUserBadgedDrawableForDensity(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
    method public android.graphics.drawable.Drawable getUserBadgedIcon(android.graphics.drawable.Drawable, android.os.UserHandle);
    method public java.lang.CharSequence getUserBadgedLabel(java.lang.CharSequence, android.os.UserHandle);
    method public android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo);
    method public boolean hasSystemFeature(java.lang.String);
    method public boolean isSafeMode();
    method public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int);
    method public java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String, int, int);
    method public java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String, int);
    method public java.util.List<android.content.pm.ResolveInfo> queryIntentActivities(android.content.Intent, int);
    method public java.util.List<android.content.pm.ResolveInfo> queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, int);
    method public java.util.List<android.content.pm.ResolveInfo> queryIntentContentProviders(android.content.Intent, int);
    method public java.util.List<android.content.pm.ResolveInfo> queryIntentServices(android.content.Intent, int);
    method public java.util.List<android.content.pm.PermissionInfo> queryPermissionsByGroup(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public void removePackageFromPreferred(java.lang.String);
    method public void removePermission(java.lang.String);
    method public android.content.pm.ResolveInfo resolveActivity(android.content.Intent, int);
    method public android.content.pm.ProviderInfo resolveContentProvider(java.lang.String, int);
    method public android.content.pm.ResolveInfo resolveService(android.content.Intent, int);
    method public void setApplicationEnabledSetting(java.lang.String, int, int);
    method public void setComponentEnabledSetting(android.content.ComponentName, int, int);
    method public boolean setDefaultBrowserPackageName(java.lang.String, int);
    method public void setInstallerPackageName(java.lang.String, java.lang.String);
    method public void verifyPendingInstall(int, int);
  }

  public class MockResources extends android.content.res.Resources {
    ctor public MockResources();
  }

}

package android.test.suitebuilder {

  public class TestMethod {
    ctor public TestMethod(java.lang.reflect.Method, java.lang.Class<? extends junit.framework.TestCase>);
    ctor public TestMethod(java.lang.String, java.lang.Class<? extends junit.framework.TestCase>);
    ctor public TestMethod(junit.framework.TestCase);
    method public junit.framework.TestCase createTest() throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException;
    method public T getAnnotation(java.lang.Class<T>);
    method public java.lang.Class<? extends junit.framework.TestCase> getEnclosingClass();
    method public java.lang.String getEnclosingClassname();
    method public java.lang.String getName();
  }

  public class TestSuiteBuilder {
    ctor public TestSuiteBuilder(java.lang.Class);
    ctor public TestSuiteBuilder(java.lang.String, java.lang.ClassLoader);
    method public android.test.suitebuilder.TestSuiteBuilder addRequirements(java.util.List<com.android.internal.util.Predicate<android.test.suitebuilder.TestMethod>>);
    method public final android.test.suitebuilder.TestSuiteBuilder addRequirements(com.android.internal.util.Predicate<android.test.suitebuilder.TestMethod>...);
    method public final junit.framework.TestSuite build();
    method public android.test.suitebuilder.TestSuiteBuilder excludePackages(java.lang.String...);
    method protected java.lang.String getSuiteName();
    method public final android.test.suitebuilder.TestSuiteBuilder includeAllPackagesUnderHere();
    method public android.test.suitebuilder.TestSuiteBuilder includePackages(java.lang.String...);
    method public android.test.suitebuilder.TestSuiteBuilder named(java.lang.String);
  }

  public static class TestSuiteBuilder.FailedToCreateTests extends junit.framework.TestCase {
    ctor public TestSuiteBuilder.FailedToCreateTests(java.lang.Exception);
    method public void testSuiteConstructionFailed();
  }

}

package android.test.suitebuilder.annotation {

  public abstract class LargeTest implements java.lang.annotation.Annotation {
  }

  public abstract class MediumTest implements java.lang.annotation.Annotation {
  }

  public abstract class SmallTest implements java.lang.annotation.Annotation {
  }

  public abstract class Smoke implements java.lang.annotation.Annotation {
  }

  public abstract class Suppress implements java.lang.annotation.Annotation {
  }

}

package android.text {

  public class AlteredCharSequence implements java.lang.CharSequence android.text.GetChars {
    method public char charAt(int);
    method public void getChars(int, int, char[], int);
    method public int length();
    method public static android.text.AlteredCharSequence make(java.lang.CharSequence, char[], int, int);
    method public java.lang.CharSequence subSequence(int, int);
  }

  public class AndroidCharacter {
    ctor public AndroidCharacter();
    method public static void getDirectionalities(char[], byte[], int);
    method public static int getEastAsianWidth(char);
    method public static void getEastAsianWidths(char[], int, int, byte[]);
    method public static char getMirror(char);
    method public static boolean mirror(char[], int, int);
    field public static final int EAST_ASIAN_WIDTH_AMBIGUOUS = 1; // 0x1
    field public static final int EAST_ASIAN_WIDTH_FULL_WIDTH = 3; // 0x3
    field public static final int EAST_ASIAN_WIDTH_HALF_WIDTH = 2; // 0x2
    field public static final int EAST_ASIAN_WIDTH_NARROW = 4; // 0x4
    field public static final int EAST_ASIAN_WIDTH_NEUTRAL = 0; // 0x0
    field public static final int EAST_ASIAN_WIDTH_WIDE = 5; // 0x5
  }

  public class Annotation implements android.text.ParcelableSpan {
    ctor public Annotation(java.lang.String, java.lang.String);
    ctor public Annotation(android.os.Parcel);
    method public int describeContents();
    method public java.lang.String getKey();
    method public int getSpanTypeId();
    method public java.lang.String getValue();
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class AutoText {
    method public static java.lang.String get(java.lang.CharSequence, int, int, android.view.View);
    method public static int getSize(android.view.View);
  }

  public final class BidiFormatter {
    method public static android.text.BidiFormatter getInstance();
    method public static android.text.BidiFormatter getInstance(boolean);
    method public static android.text.BidiFormatter getInstance(java.util.Locale);
    method public boolean getStereoReset();
    method public boolean isRtl(java.lang.String);
    method public boolean isRtlContext();
    method public java.lang.String unicodeWrap(java.lang.String, android.text.TextDirectionHeuristic, boolean);
    method public java.lang.String unicodeWrap(java.lang.String, android.text.TextDirectionHeuristic);
    method public java.lang.String unicodeWrap(java.lang.String, boolean);
    method public java.lang.String unicodeWrap(java.lang.String);
  }

  public static final class BidiFormatter.Builder {
    ctor public BidiFormatter.Builder();
    ctor public BidiFormatter.Builder(boolean);
    ctor public BidiFormatter.Builder(java.util.Locale);
    method public android.text.BidiFormatter build();
    method public android.text.BidiFormatter.Builder setTextDirectionHeuristic(android.text.TextDirectionHeuristic);
    method public android.text.BidiFormatter.Builder stereoReset(boolean);
  }

  public class BoringLayout extends android.text.Layout implements android.text.TextUtils.EllipsizeCallback {
    ctor public BoringLayout(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
    ctor public BoringLayout(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
    method public void ellipsized(int, int);
    method public int getBottomPadding();
    method public int getEllipsisCount(int);
    method public int getEllipsisStart(int);
    method public boolean getLineContainsTab(int);
    method public int getLineCount();
    method public int getLineDescent(int);
    method public final android.text.Layout.Directions getLineDirections(int);
    method public int getLineStart(int);
    method public int getLineTop(int);
    method public int getParagraphDirection(int);
    method public int getTopPadding();
    method public static android.text.BoringLayout.Metrics isBoring(java.lang.CharSequence, android.text.TextPaint);
    method public static android.text.BoringLayout.Metrics isBoring(java.lang.CharSequence, android.text.TextPaint, android.text.BoringLayout.Metrics);
    method public static android.text.BoringLayout make(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
    method public static android.text.BoringLayout make(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
    method public android.text.BoringLayout replaceOrMake(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
    method public android.text.BoringLayout replaceOrMake(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
  }

  public static class BoringLayout.Metrics extends android.graphics.Paint.FontMetricsInt {
    ctor public BoringLayout.Metrics();
    field public int width;
  }

  public abstract deprecated class ClipboardManager {
    ctor public ClipboardManager();
    method public abstract java.lang.CharSequence getText();
    method public abstract boolean hasText();
    method public abstract void setText(java.lang.CharSequence);
  }

  public class DynamicLayout extends android.text.Layout {
    ctor public DynamicLayout(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, boolean);
    ctor public DynamicLayout(java.lang.CharSequence, java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, boolean);
    ctor public DynamicLayout(java.lang.CharSequence, java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, boolean, android.text.TextUtils.TruncateAt, int);
    method public int getBottomPadding();
    method public int getEllipsisCount(int);
    method public int getEllipsisStart(int);
    method public boolean getLineContainsTab(int);
    method public int getLineCount();
    method public int getLineDescent(int);
    method public final android.text.Layout.Directions getLineDirections(int);
    method public int getLineStart(int);
    method public int getLineTop(int);
    method public int getParagraphDirection(int);
    method public int getTopPadding();
  }

  public abstract interface Editable implements java.lang.Appendable java.lang.CharSequence android.text.GetChars android.text.Spannable {
    method public abstract android.text.Editable append(java.lang.CharSequence);
    method public abstract android.text.Editable append(java.lang.CharSequence, int, int);
    method public abstract android.text.Editable append(char);
    method public abstract void clear();
    method public abstract void clearSpans();
    method public abstract android.text.Editable delete(int, int);
    method public abstract android.text.InputFilter[] getFilters();
    method public abstract android.text.Editable insert(int, java.lang.CharSequence, int, int);
    method public abstract android.text.Editable insert(int, java.lang.CharSequence);
    method public abstract android.text.Editable replace(int, int, java.lang.CharSequence, int, int);
    method public abstract android.text.Editable replace(int, int, java.lang.CharSequence);
    method public abstract void setFilters(android.text.InputFilter[]);
  }

  public static class Editable.Factory {
    ctor public Editable.Factory();
    method public static android.text.Editable.Factory getInstance();
    method public android.text.Editable newEditable(java.lang.CharSequence);
  }

  public abstract interface GetChars implements java.lang.CharSequence {
    method public abstract void getChars(int, int, char[], int);
  }

  public class Html {
    method public static java.lang.String escapeHtml(java.lang.CharSequence);
    method public static android.text.Spanned fromHtml(java.lang.String);
    method public static android.text.Spanned fromHtml(java.lang.String, android.text.Html.ImageGetter, android.text.Html.TagHandler);
    method public static java.lang.String toHtml(android.text.Spanned);
  }

  public static abstract interface Html.ImageGetter {
    method public abstract android.graphics.drawable.Drawable getDrawable(java.lang.String);
  }

  public static abstract interface Html.TagHandler {
    method public abstract void handleTag(boolean, java.lang.String, android.text.Editable, org.xml.sax.XMLReader);
  }

  public abstract interface InputFilter {
    method public abstract java.lang.CharSequence filter(java.lang.CharSequence, int, int, android.text.Spanned, int, int);
  }

  public static class InputFilter.AllCaps implements android.text.InputFilter {
    ctor public InputFilter.AllCaps();
    method public java.lang.CharSequence filter(java.lang.CharSequence, int, int, android.text.Spanned, int, int);
  }

  public static class InputFilter.LengthFilter implements android.text.InputFilter {
    ctor public InputFilter.LengthFilter(int);
    method public java.lang.CharSequence filter(java.lang.CharSequence, int, int, android.text.Spanned, int, int);
    method public int getMax();
  }

  public abstract interface InputType {
    field public static final int TYPE_CLASS_DATETIME = 4; // 0x4
    field public static final int TYPE_CLASS_NUMBER = 2; // 0x2
    field public static final int TYPE_CLASS_PHONE = 3; // 0x3
    field public static final int TYPE_CLASS_TEXT = 1; // 0x1
    field public static final int TYPE_DATETIME_VARIATION_DATE = 16; // 0x10
    field public static final int TYPE_DATETIME_VARIATION_NORMAL = 0; // 0x0
    field public static final int TYPE_DATETIME_VARIATION_TIME = 32; // 0x20
    field public static final int TYPE_MASK_CLASS = 15; // 0xf
    field public static final int TYPE_MASK_FLAGS = 16773120; // 0xfff000
    field public static final int TYPE_MASK_VARIATION = 4080; // 0xff0
    field public static final int TYPE_NULL = 0; // 0x0
    field public static final int TYPE_NUMBER_FLAG_DECIMAL = 8192; // 0x2000
    field public static final int TYPE_NUMBER_FLAG_SIGNED = 4096; // 0x1000
    field public static final int TYPE_NUMBER_VARIATION_NORMAL = 0; // 0x0
    field public static final int TYPE_NUMBER_VARIATION_PASSWORD = 16; // 0x10
    field public static final int TYPE_TEXT_FLAG_AUTO_COMPLETE = 65536; // 0x10000
    field public static final int TYPE_TEXT_FLAG_AUTO_CORRECT = 32768; // 0x8000
    field public static final int TYPE_TEXT_FLAG_CAP_CHARACTERS = 4096; // 0x1000
    field public static final int TYPE_TEXT_FLAG_CAP_SENTENCES = 16384; // 0x4000
    field public static final int TYPE_TEXT_FLAG_CAP_WORDS = 8192; // 0x2000
    field public static final int TYPE_TEXT_FLAG_IME_MULTI_LINE = 262144; // 0x40000
    field public static final int TYPE_TEXT_FLAG_MULTI_LINE = 131072; // 0x20000
    field public static final int TYPE_TEXT_FLAG_NO_SUGGESTIONS = 524288; // 0x80000
    field public static final int TYPE_TEXT_VARIATION_EMAIL_ADDRESS = 32; // 0x20
    field public static final int TYPE_TEXT_VARIATION_EMAIL_SUBJECT = 48; // 0x30
    field public static final int TYPE_TEXT_VARIATION_FILTER = 176; // 0xb0
    field public static final int TYPE_TEXT_VARIATION_LONG_MESSAGE = 80; // 0x50
    field public static final int TYPE_TEXT_VARIATION_NORMAL = 0; // 0x0
    field public static final int TYPE_TEXT_VARIATION_PASSWORD = 128; // 0x80
    field public static final int TYPE_TEXT_VARIATION_PERSON_NAME = 96; // 0x60
    field public static final int TYPE_TEXT_VARIATION_PHONETIC = 192; // 0xc0
    field public static final int TYPE_TEXT_VARIATION_POSTAL_ADDRESS = 112; // 0x70
    field public static final int TYPE_TEXT_VARIATION_SHORT_MESSAGE = 64; // 0x40
    field public static final int TYPE_TEXT_VARIATION_URI = 16; // 0x10
    field public static final int TYPE_TEXT_VARIATION_VISIBLE_PASSWORD = 144; // 0x90
    field public static final int TYPE_TEXT_VARIATION_WEB_EDIT_TEXT = 160; // 0xa0
    field public static final int TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS = 208; // 0xd0
    field public static final int TYPE_TEXT_VARIATION_WEB_PASSWORD = 224; // 0xe0
  }

  public abstract class Layout {
    ctor protected Layout(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float);
    method public void draw(android.graphics.Canvas);
    method public void draw(android.graphics.Canvas, android.graphics.Path, android.graphics.Paint, int);
    method public final android.text.Layout.Alignment getAlignment();
    method public abstract int getBottomPadding();
    method public void getCursorPath(int, android.graphics.Path, java.lang.CharSequence);
    method public static float getDesiredWidth(java.lang.CharSequence, android.text.TextPaint);
    method public static float getDesiredWidth(java.lang.CharSequence, int, int, android.text.TextPaint);
    method public abstract int getEllipsisCount(int);
    method public abstract int getEllipsisStart(int);
    method public int getEllipsizedWidth();
    method public int getHeight();
    method public final int getLineAscent(int);
    method public final int getLineBaseline(int);
    method public final int getLineBottom(int);
    method public int getLineBounds(int, android.graphics.Rect);
    method public abstract boolean getLineContainsTab(int);
    method public abstract int getLineCount();
    method public abstract int getLineDescent(int);
    method public abstract android.text.Layout.Directions getLineDirections(int);
    method public final int getLineEnd(int);
    method public int getLineForOffset(int);
    method public int getLineForVertical(int);
    method public float getLineLeft(int);
    method public float getLineMax(int);
    method public float getLineRight(int);
    method public abstract int getLineStart(int);
    method public abstract int getLineTop(int);
    method public int getLineVisibleEnd(int);
    method public float getLineWidth(int);
    method public int getOffsetForHorizontal(int, float);
    method public int getOffsetToLeftOf(int);
    method public int getOffsetToRightOf(int);
    method public final android.text.TextPaint getPaint();
    method public final android.text.Layout.Alignment getParagraphAlignment(int);
    method public abstract int getParagraphDirection(int);
    method public final int getParagraphLeft(int);
    method public final int getParagraphRight(int);
    method public float getPrimaryHorizontal(int);
    method public float getSecondaryHorizontal(int);
    method public void getSelectionPath(int, int, android.graphics.Path);
    method public final float getSpacingAdd();
    method public final float getSpacingMultiplier();
    method public final java.lang.CharSequence getText();
    method public abstract int getTopPadding();
    method public final int getWidth();
    method public final void increaseWidthTo(int);
    method public boolean isRtlCharAt(int);
    method protected final boolean isSpanned();
    field public static final int BREAK_STRATEGY_BALANCED = 2; // 0x2
    field public static final int BREAK_STRATEGY_HIGH_QUALITY = 1; // 0x1
    field public static final int BREAK_STRATEGY_SIMPLE = 0; // 0x0
    field public static final int DIR_LEFT_TO_RIGHT = 1; // 0x1
    field public static final int DIR_RIGHT_TO_LEFT = -1; // 0xffffffff
  }

  public static final class Layout.Alignment extends java.lang.Enum {
    method public static android.text.Layout.Alignment valueOf(java.lang.String);
    method public static final android.text.Layout.Alignment[] values();
    enum_constant public static final android.text.Layout.Alignment ALIGN_CENTER;
    enum_constant public static final android.text.Layout.Alignment ALIGN_NORMAL;
    enum_constant public static final android.text.Layout.Alignment ALIGN_OPPOSITE;
  }

  public static class Layout.Directions {
  }

  public abstract class LoginFilter implements android.text.InputFilter {
    method public java.lang.CharSequence filter(java.lang.CharSequence, int, int, android.text.Spanned, int, int);
    method public abstract boolean isAllowed(char);
    method public void onInvalidCharacter(char);
    method public void onStart();
    method public void onStop();
  }

  public static class LoginFilter.PasswordFilterGMail extends android.text.LoginFilter {
    ctor public LoginFilter.PasswordFilterGMail();
    ctor public LoginFilter.PasswordFilterGMail(boolean);
    method public boolean isAllowed(char);
  }

  public static class LoginFilter.UsernameFilterGMail extends android.text.LoginFilter {
    ctor public LoginFilter.UsernameFilterGMail();
    ctor public LoginFilter.UsernameFilterGMail(boolean);
    method public boolean isAllowed(char);
  }

  public static class LoginFilter.UsernameFilterGeneric extends android.text.LoginFilter {
    ctor public LoginFilter.UsernameFilterGeneric();
    ctor public LoginFilter.UsernameFilterGeneric(boolean);
    method public boolean isAllowed(char);
  }

  public abstract interface NoCopySpan {
  }

  public static class NoCopySpan.Concrete implements android.text.NoCopySpan {
    ctor public NoCopySpan.Concrete();
  }

  public abstract interface ParcelableSpan implements android.os.Parcelable {
    method public abstract int getSpanTypeId();
  }

  public class Selection {
    method public static boolean extendDown(android.text.Spannable, android.text.Layout);
    method public static boolean extendLeft(android.text.Spannable, android.text.Layout);
    method public static boolean extendRight(android.text.Spannable, android.text.Layout);
    method public static final void extendSelection(android.text.Spannable, int);
    method public static boolean extendToLeftEdge(android.text.Spannable, android.text.Layout);
    method public static boolean extendToRightEdge(android.text.Spannable, android.text.Layout);
    method public static boolean extendUp(android.text.Spannable, android.text.Layout);
    method public static final int getSelectionEnd(java.lang.CharSequence);
    method public static final int getSelectionStart(java.lang.CharSequence);
    method public static boolean moveDown(android.text.Spannable, android.text.Layout);
    method public static boolean moveLeft(android.text.Spannable, android.text.Layout);
    method public static boolean moveRight(android.text.Spannable, android.text.Layout);
    method public static boolean moveToLeftEdge(android.text.Spannable, android.text.Layout);
    method public static boolean moveToRightEdge(android.text.Spannable, android.text.Layout);
    method public static boolean moveUp(android.text.Spannable, android.text.Layout);
    method public static final void removeSelection(android.text.Spannable);
    method public static final void selectAll(android.text.Spannable);
    method public static void setSelection(android.text.Spannable, int, int);
    method public static final void setSelection(android.text.Spannable, int);
    field public static final java.lang.Object SELECTION_END;
    field public static final java.lang.Object SELECTION_START;
  }

  public abstract interface SpanWatcher implements android.text.NoCopySpan {
    method public abstract void onSpanAdded(android.text.Spannable, java.lang.Object, int, int);
    method public abstract void onSpanChanged(android.text.Spannable, java.lang.Object, int, int, int, int);
    method public abstract void onSpanRemoved(android.text.Spannable, java.lang.Object, int, int);
  }

  public abstract interface Spannable implements android.text.Spanned {
    method public abstract void removeSpan(java.lang.Object);
    method public abstract void setSpan(java.lang.Object, int, int, int);
  }

  public static class Spannable.Factory {
    ctor public Spannable.Factory();
    method public static android.text.Spannable.Factory getInstance();
    method public android.text.Spannable newSpannable(java.lang.CharSequence);
  }

  public class SpannableString extends android.text.SpannableStringInternal implements java.lang.CharSequence android.text.GetChars android.text.Spannable {
    ctor public SpannableString(java.lang.CharSequence);
    method public void removeSpan(java.lang.Object);
    method public void setSpan(java.lang.Object, int, int, int);
    method public final java.lang.CharSequence subSequence(int, int);
    method public static android.text.SpannableString valueOf(java.lang.CharSequence);
  }

  public class SpannableStringBuilder implements java.lang.Appendable java.lang.CharSequence android.text.Editable android.text.GetChars android.text.Spannable {
    ctor public SpannableStringBuilder();
    ctor public SpannableStringBuilder(java.lang.CharSequence);
    ctor public SpannableStringBuilder(java.lang.CharSequence, int, int);
    method public android.text.SpannableStringBuilder append(java.lang.CharSequence);
    method public android.text.SpannableStringBuilder append(java.lang.CharSequence, java.lang.Object, int);
    method public android.text.SpannableStringBuilder append(java.lang.CharSequence, int, int);
    method public android.text.SpannableStringBuilder append(char);
    method public char charAt(int);
    method public void clear();
    method public void clearSpans();
    method public android.text.SpannableStringBuilder delete(int, int);
    method public void getChars(int, int, char[], int);
    method public android.text.InputFilter[] getFilters();
    method public int getSpanEnd(java.lang.Object);
    method public int getSpanFlags(java.lang.Object);
    method public int getSpanStart(java.lang.Object);
    method public T[] getSpans(int, int, java.lang.Class<T>);
    method public deprecated int getTextRunCursor(int, int, int, int, int, android.graphics.Paint);
    method public int getTextWatcherDepth();
    method public android.text.SpannableStringBuilder insert(int, java.lang.CharSequence, int, int);
    method public android.text.SpannableStringBuilder insert(int, java.lang.CharSequence);
    method public int length();
    method public int nextSpanTransition(int, int, java.lang.Class);
    method public void removeSpan(java.lang.Object);
    method public android.text.SpannableStringBuilder replace(int, int, java.lang.CharSequence);
    method public android.text.SpannableStringBuilder replace(int, int, java.lang.CharSequence, int, int);
    method public void setFilters(android.text.InputFilter[]);
    method public void setSpan(java.lang.Object, int, int, int);
    method public java.lang.CharSequence subSequence(int, int);
    method public static android.text.SpannableStringBuilder valueOf(java.lang.CharSequence);
  }

   abstract class SpannableStringInternal {
    method public final char charAt(int);
    method public final void getChars(int, int, char[], int);
    method public int getSpanEnd(java.lang.Object);
    method public int getSpanFlags(java.lang.Object);
    method public int getSpanStart(java.lang.Object);
    method public T[] getSpans(int, int, java.lang.Class<T>);
    method public final int length();
    method public int nextSpanTransition(int, int, java.lang.Class);
    method public final java.lang.String toString();
  }

  public abstract interface Spanned implements java.lang.CharSequence {
    method public abstract int getSpanEnd(java.lang.Object);
    method public abstract int getSpanFlags(java.lang.Object);
    method public abstract int getSpanStart(java.lang.Object);
    method public abstract T[] getSpans(int, int, java.lang.Class<T>);
    method public abstract int nextSpanTransition(int, int, java.lang.Class);
    field public static final int SPAN_COMPOSING = 256; // 0x100
    field public static final int SPAN_EXCLUSIVE_EXCLUSIVE = 33; // 0x21
    field public static final int SPAN_EXCLUSIVE_INCLUSIVE = 34; // 0x22
    field public static final int SPAN_INCLUSIVE_EXCLUSIVE = 17; // 0x11
    field public static final int SPAN_INCLUSIVE_INCLUSIVE = 18; // 0x12
    field public static final int SPAN_INTERMEDIATE = 512; // 0x200
    field public static final int SPAN_MARK_MARK = 17; // 0x11
    field public static final int SPAN_MARK_POINT = 18; // 0x12
    field public static final int SPAN_PARAGRAPH = 51; // 0x33
    field public static final int SPAN_POINT_MARK = 33; // 0x21
    field public static final int SPAN_POINT_MARK_MASK = 51; // 0x33
    field public static final int SPAN_POINT_POINT = 34; // 0x22
    field public static final int SPAN_PRIORITY = 16711680; // 0xff0000
    field public static final int SPAN_PRIORITY_SHIFT = 16; // 0x10
    field public static final int SPAN_USER = -16777216; // 0xff000000
    field public static final int SPAN_USER_SHIFT = 24; // 0x18
  }

  public final class SpannedString extends android.text.SpannableStringInternal implements java.lang.CharSequence android.text.GetChars android.text.Spanned {
    ctor public SpannedString(java.lang.CharSequence);
    method public java.lang.CharSequence subSequence(int, int);
    method public static android.text.SpannedString valueOf(java.lang.CharSequence);
  }

  public class StaticLayout extends android.text.Layout {
    ctor public StaticLayout(java.lang.CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, boolean);
    ctor public StaticLayout(java.lang.CharSequence, int, int, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, boolean);
    ctor public StaticLayout(java.lang.CharSequence, int, int, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, boolean, android.text.TextUtils.TruncateAt, int);
    method public int getBottomPadding();
    method public int getEllipsisCount(int);
    method public int getEllipsisStart(int);
    method public boolean getLineContainsTab(int);
    method public int getLineCount();
    method public int getLineDescent(int);
    method public final android.text.Layout.Directions getLineDirections(int);
    method public int getLineStart(int);
    method public int getLineTop(int);
    method public int getParagraphDirection(int);
    method public int getTopPadding();
  }

  public abstract interface TextDirectionHeuristic {
    method public abstract boolean isRtl(char[], int, int);
    method public abstract boolean isRtl(java.lang.CharSequence, int, int);
  }

  public class TextDirectionHeuristics {
    ctor public TextDirectionHeuristics();
    field public static final android.text.TextDirectionHeuristic ANYRTL_LTR;
    field public static final android.text.TextDirectionHeuristic FIRSTSTRONG_LTR;
    field public static final android.text.TextDirectionHeuristic FIRSTSTRONG_RTL;
    field public static final android.text.TextDirectionHeuristic LOCALE;
    field public static final android.text.TextDirectionHeuristic LTR;
    field public static final android.text.TextDirectionHeuristic RTL;
  }

  public class TextPaint extends android.graphics.Paint {
    ctor public TextPaint();
    ctor public TextPaint(int);
    ctor public TextPaint(android.graphics.Paint);
    method public void set(android.text.TextPaint);
    field public int baselineShift;
    field public int bgColor;
    field public float density;
    field public int[] drawableState;
    field public int linkColor;
  }

  public class TextUtils {
    method public static java.lang.CharSequence commaEllipsize(java.lang.CharSequence, android.text.TextPaint, float, java.lang.String, java.lang.String);
    method public static java.lang.CharSequence concat(java.lang.CharSequence...);
    method public static void copySpansFrom(android.text.Spanned, int, int, java.lang.Class, android.text.Spannable, int);
    method public static void dumpSpans(java.lang.CharSequence, android.util.Printer, java.lang.String);
    method public static java.lang.CharSequence ellipsize(java.lang.CharSequence, android.text.TextPaint, float, android.text.TextUtils.TruncateAt);
    method public static java.lang.CharSequence ellipsize(java.lang.CharSequence, android.text.TextPaint, float, android.text.TextUtils.TruncateAt, boolean, android.text.TextUtils.EllipsizeCallback);
    method public static boolean equals(java.lang.CharSequence, java.lang.CharSequence);
    method public static java.lang.CharSequence expandTemplate(java.lang.CharSequence, java.lang.CharSequence...);
    method public static int getCapsMode(java.lang.CharSequence, int, int);
    method public static void getChars(java.lang.CharSequence, int, int, char[], int);
    method public static int getLayoutDirectionFromLocale(java.util.Locale);
    method public static int getOffsetAfter(java.lang.CharSequence, int);
    method public static int getOffsetBefore(java.lang.CharSequence, int);
    method public static java.lang.CharSequence getReverse(java.lang.CharSequence, int, int);
    method public static int getTrimmedLength(java.lang.CharSequence);
    method public static java.lang.String htmlEncode(java.lang.String);
    method public static int indexOf(java.lang.CharSequence, char);
    method public static int indexOf(java.lang.CharSequence, char, int);
    method public static int indexOf(java.lang.CharSequence, char, int, int);
    method public static int indexOf(java.lang.CharSequence, java.lang.CharSequence);
    method public static int indexOf(java.lang.CharSequence, java.lang.CharSequence, int);
    method public static int indexOf(java.lang.CharSequence, java.lang.CharSequence, int, int);
    method public static boolean isDigitsOnly(java.lang.CharSequence);
    method public static boolean isEmpty(java.lang.CharSequence);
    method public static boolean isGraphic(java.lang.CharSequence);
    method public static boolean isGraphic(char);
    method public static java.lang.String join(java.lang.CharSequence, java.lang.Object[]);
    method public static java.lang.String join(java.lang.CharSequence, java.lang.Iterable);
    method public static int lastIndexOf(java.lang.CharSequence, char);
    method public static int lastIndexOf(java.lang.CharSequence, char, int);
    method public static int lastIndexOf(java.lang.CharSequence, char, int, int);
    method public static boolean regionMatches(java.lang.CharSequence, int, java.lang.CharSequence, int, int);
    method public static java.lang.CharSequence replace(java.lang.CharSequence, java.lang.String[], java.lang.CharSequence[]);
    method public static java.lang.String[] split(java.lang.String, java.lang.String);
    method public static java.lang.String[] split(java.lang.String, java.util.regex.Pattern);
    method public static java.lang.CharSequence stringOrSpannedString(java.lang.CharSequence);
    method public static java.lang.String substring(java.lang.CharSequence, int, int);
    method public static void writeToParcel(java.lang.CharSequence, android.os.Parcel, int);
    field public static final int CAP_MODE_CHARACTERS = 4096; // 0x1000
    field public static final int CAP_MODE_SENTENCES = 16384; // 0x4000
    field public static final int CAP_MODE_WORDS = 8192; // 0x2000
    field public static final android.os.Parcelable.Creator<java.lang.CharSequence> CHAR_SEQUENCE_CREATOR;
  }

  public static abstract interface TextUtils.EllipsizeCallback {
    method public abstract void ellipsized(int, int);
  }

  public static class TextUtils.SimpleStringSplitter implements java.util.Iterator android.text.TextUtils.StringSplitter {
    ctor public TextUtils.SimpleStringSplitter(char);
    method public boolean hasNext();
    method public java.util.Iterator<java.lang.String> iterator();
    method public java.lang.String next();
    method public void remove();
    method public void setString(java.lang.String);
  }

  public static abstract interface TextUtils.StringSplitter implements java.lang.Iterable {
    method public abstract void setString(java.lang.String);
  }

  public static final class TextUtils.TruncateAt extends java.lang.Enum {
    method public static android.text.TextUtils.TruncateAt valueOf(java.lang.String);
    method public static final android.text.TextUtils.TruncateAt[] values();
    enum_constant public static final android.text.TextUtils.TruncateAt END;
    enum_constant public static final android.text.TextUtils.TruncateAt MARQUEE;
    enum_constant public static final android.text.TextUtils.TruncateAt MIDDLE;
    enum_constant public static final android.text.TextUtils.TruncateAt START;
  }

  public abstract interface TextWatcher implements android.text.NoCopySpan {
    method public abstract void afterTextChanged(android.text.Editable);
    method public abstract void beforeTextChanged(java.lang.CharSequence, int, int, int);
    method public abstract void onTextChanged(java.lang.CharSequence, int, int, int);
  }

}

package android.text.format {

  public class DateFormat {
    ctor public DateFormat();
    method public static java.lang.CharSequence format(java.lang.CharSequence, long);
    method public static java.lang.CharSequence format(java.lang.CharSequence, java.util.Date);
    method public static java.lang.CharSequence format(java.lang.CharSequence, java.util.Calendar);
    method public static java.lang.String getBestDateTimePattern(java.util.Locale, java.lang.String);
    method public static java.text.DateFormat getDateFormat(android.content.Context);
    method public static char[] getDateFormatOrder(android.content.Context);
    method public static java.text.DateFormat getLongDateFormat(android.content.Context);
    method public static java.text.DateFormat getMediumDateFormat(android.content.Context);
    method public static java.text.DateFormat getTimeFormat(android.content.Context);
    method public static boolean is24HourFormat(android.content.Context);
  }

  public class DateUtils {
    ctor public DateUtils();
    method public static java.lang.String formatDateRange(android.content.Context, long, long, int);
    method public static java.util.Formatter formatDateRange(android.content.Context, java.util.Formatter, long, long, int);
    method public static java.util.Formatter formatDateRange(android.content.Context, java.util.Formatter, long, long, int, java.lang.String);
    method public static java.lang.String formatDateTime(android.content.Context, long, int);
    method public static java.lang.String formatElapsedTime(long);
    method public static java.lang.String formatElapsedTime(java.lang.StringBuilder, long);
    method public static final java.lang.CharSequence formatSameDayTime(long, long, int, int);
    method public static deprecated java.lang.String getAMPMString(int);
    method public static deprecated java.lang.String getDayOfWeekString(int, int);
    method public static deprecated java.lang.String getMonthString(int, int);
    method public static java.lang.CharSequence getRelativeDateTimeString(android.content.Context, long, long, long, int);
    method public static java.lang.CharSequence getRelativeTimeSpanString(long);
    method public static java.lang.CharSequence getRelativeTimeSpanString(long, long, long);
    method public static java.lang.CharSequence getRelativeTimeSpanString(long, long, long, int);
    method public static java.lang.CharSequence getRelativeTimeSpanString(android.content.Context, long, boolean);
    method public static java.lang.CharSequence getRelativeTimeSpanString(android.content.Context, long);
    method public static boolean isToday(long);
    field public static final deprecated java.lang.String ABBREV_MONTH_FORMAT = "%b";
    field public static final java.lang.String ABBREV_WEEKDAY_FORMAT = "%a";
    field public static final long DAY_IN_MILLIS = 86400000L; // 0x5265c00L
    field public static final deprecated int FORMAT_12HOUR = 64; // 0x40
    field public static final deprecated int FORMAT_24HOUR = 128; // 0x80
    field public static final int FORMAT_ABBREV_ALL = 524288; // 0x80000
    field public static final int FORMAT_ABBREV_MONTH = 65536; // 0x10000
    field public static final int FORMAT_ABBREV_RELATIVE = 262144; // 0x40000
    field public static final int FORMAT_ABBREV_TIME = 16384; // 0x4000
    field public static final int FORMAT_ABBREV_WEEKDAY = 32768; // 0x8000
    field public static final deprecated int FORMAT_CAP_AMPM = 256; // 0x100
    field public static final deprecated int FORMAT_CAP_MIDNIGHT = 4096; // 0x1000
    field public static final deprecated int FORMAT_CAP_NOON = 1024; // 0x400
    field public static final deprecated int FORMAT_CAP_NOON_MIDNIGHT = 5120; // 0x1400
    field public static final int FORMAT_NO_MIDNIGHT = 2048; // 0x800
    field public static final int FORMAT_NO_MONTH_DAY = 32; // 0x20
    field public static final int FORMAT_NO_NOON = 512; // 0x200
    field public static final deprecated int FORMAT_NO_NOON_MIDNIGHT = 2560; // 0xa00
    field public static final int FORMAT_NO_YEAR = 8; // 0x8
    field public static final int FORMAT_NUMERIC_DATE = 131072; // 0x20000
    field public static final int FORMAT_SHOW_DATE = 16; // 0x10
    field public static final int FORMAT_SHOW_TIME = 1; // 0x1
    field public static final int FORMAT_SHOW_WEEKDAY = 2; // 0x2
    field public static final int FORMAT_SHOW_YEAR = 4; // 0x4
    field public static final deprecated int FORMAT_UTC = 8192; // 0x2000
    field public static final long HOUR_IN_MILLIS = 3600000L; // 0x36ee80L
    field public static final deprecated java.lang.String HOUR_MINUTE_24 = "%H:%M";
    field public static final deprecated int LENGTH_LONG = 10; // 0xa
    field public static final deprecated int LENGTH_MEDIUM = 20; // 0x14
    field public static final deprecated int LENGTH_SHORT = 30; // 0x1e
    field public static final deprecated int LENGTH_SHORTER = 40; // 0x28
    field public static final deprecated int LENGTH_SHORTEST = 50; // 0x32
    field public static final long MINUTE_IN_MILLIS = 60000L; // 0xea60L
    field public static final java.lang.String MONTH_DAY_FORMAT = "%-d";
    field public static final java.lang.String MONTH_FORMAT = "%B";
    field public static final java.lang.String NUMERIC_MONTH_FORMAT = "%m";
    field public static final long SECOND_IN_MILLIS = 1000L; // 0x3e8L
    field public static final java.lang.String WEEKDAY_FORMAT = "%A";
    field public static final long WEEK_IN_MILLIS = 604800000L; // 0x240c8400L
    field public static final java.lang.String YEAR_FORMAT = "%Y";
    field public static final java.lang.String YEAR_FORMAT_TWO_DIGITS = "%g";
    field public static final long YEAR_IN_MILLIS = 31449600000L; // 0x7528ad000L
    field public static final deprecated int[] sameMonthTable;
    field public static final deprecated int[] sameYearTable;
  }

  public final class Formatter {
    ctor public Formatter();
    method public static java.lang.String formatFileSize(android.content.Context, long);
    method public static deprecated java.lang.String formatIpAddress(int);
    method public static java.lang.String formatShortFileSize(android.content.Context, long);
  }

  public deprecated class Time {
    ctor public Time(java.lang.String);
    ctor public Time();
    ctor public Time(android.text.format.Time);
    method public boolean after(android.text.format.Time);
    method public boolean before(android.text.format.Time);
    method public void clear(java.lang.String);
    method public static int compare(android.text.format.Time, android.text.format.Time);
    method public java.lang.String format(java.lang.String);
    method public java.lang.String format2445();
    method public java.lang.String format3339(boolean);
    method public int getActualMaximum(int);
    method public static java.lang.String getCurrentTimezone();
    method public static int getJulianDay(long, long);
    method public static int getJulianMondayFromWeeksSinceEpoch(int);
    method public int getWeekNumber();
    method public static int getWeeksSinceEpochFromJulianDay(int, int);
    method public static boolean isEpoch(android.text.format.Time);
    method public long normalize(boolean);
    method public boolean parse(java.lang.String);
    method public boolean parse3339(java.lang.String);
    method public void set(long);
    method public void set(android.text.format.Time);
    method public void set(int, int, int, int, int, int);
    method public void set(int, int, int);
    method public long setJulianDay(int);
    method public void setToNow();
    method public void switchTimezone(java.lang.String);
    method public long toMillis(boolean);
    field public static final int EPOCH_JULIAN_DAY = 2440588; // 0x253d8c
    field public static final int FRIDAY = 5; // 0x5
    field public static final int HOUR = 3; // 0x3
    field public static final int MINUTE = 2; // 0x2
    field public static final int MONDAY = 1; // 0x1
    field public static final int MONDAY_BEFORE_JULIAN_EPOCH = 2440585; // 0x253d89
    field public static final int MONTH = 5; // 0x5
    field public static final int MONTH_DAY = 4; // 0x4
    field public static final int SATURDAY = 6; // 0x6
    field public static final int SECOND = 1; // 0x1
    field public static final int SUNDAY = 0; // 0x0
    field public static final int THURSDAY = 4; // 0x4
    field public static final java.lang.String TIMEZONE_UTC = "UTC";
    field public static final int TUESDAY = 2; // 0x2
    field public static final int WEDNESDAY = 3; // 0x3
    field public static final int WEEK_DAY = 7; // 0x7
    field public static final int WEEK_NUM = 9; // 0x9
    field public static final int YEAR = 6; // 0x6
    field public static final int YEAR_DAY = 8; // 0x8
    field public boolean allDay;
    field public long gmtoff;
    field public int hour;
    field public int isDst;
    field public int minute;
    field public int month;
    field public int monthDay;
    field public int second;
    field public java.lang.String timezone;
    field public int weekDay;
    field public int year;
    field public int yearDay;
  }

}

package android.text.method {

  public class ArrowKeyMovementMethod extends android.text.method.BaseMovementMethod implements android.text.method.MovementMethod {
    ctor public ArrowKeyMovementMethod();
    method public static android.text.method.MovementMethod getInstance();
  }

  public abstract class BaseKeyListener extends android.text.method.MetaKeyKeyListener implements android.text.method.KeyListener {
    ctor public BaseKeyListener();
    method public boolean backspace(android.view.View, android.text.Editable, int, android.view.KeyEvent);
    method public boolean forwardDelete(android.view.View, android.text.Editable, int, android.view.KeyEvent);
    method public boolean onKeyOther(android.view.View, android.text.Editable, android.view.KeyEvent);
  }

  public class BaseMovementMethod implements android.text.method.MovementMethod {
    ctor public BaseMovementMethod();
    method protected boolean bottom(android.widget.TextView, android.text.Spannable);
    method public boolean canSelectArbitrarily();
    method protected boolean down(android.widget.TextView, android.text.Spannable);
    method protected boolean end(android.widget.TextView, android.text.Spannable);
    method protected int getMovementMetaState(android.text.Spannable, android.view.KeyEvent);
    method protected boolean handleMovementKey(android.widget.TextView, android.text.Spannable, int, int, android.view.KeyEvent);
    method protected boolean home(android.widget.TextView, android.text.Spannable);
    method public void initialize(android.widget.TextView, android.text.Spannable);
    method protected boolean left(android.widget.TextView, android.text.Spannable);
    method protected boolean lineEnd(android.widget.TextView, android.text.Spannable);
    method protected boolean lineStart(android.widget.TextView, android.text.Spannable);
    method public boolean onGenericMotionEvent(android.widget.TextView, android.text.Spannable, android.view.MotionEvent);
    method public boolean onKeyDown(android.widget.TextView, android.text.Spannable, int, android.view.KeyEvent);
    method public boolean onKeyOther(android.widget.TextView, android.text.Spannable, android.view.KeyEvent);
    method public boolean onKeyUp(android.widget.TextView, android.text.Spannable, int, android.view.KeyEvent);
    method public void onTakeFocus(android.widget.TextView, android.text.Spannable, int);
    method public boolean onTouchEvent(android.widget.TextView, android.text.Spannable, android.view.MotionEvent);
    method public boolean onTrackballEvent(android.widget.TextView, android.text.Spannable, android.view.MotionEvent);
    method protected boolean pageDown(android.widget.TextView, android.text.Spannable);
    method protected boolean pageUp(android.widget.TextView, android.text.Spannable);
    method protected boolean right(android.widget.TextView, android.text.Spannable);
    method protected boolean top(android.widget.TextView, android.text.Spannable);
    method protected boolean up(android.widget.TextView, android.text.Spannable);
  }

  public class CharacterPickerDialog extends android.app.Dialog implements android.widget.AdapterView.OnItemClickListener android.view.View.OnClickListener {
    ctor public CharacterPickerDialog(android.content.Context, android.view.View, android.text.Editable, java.lang.String, boolean);
    method public void onClick(android.view.View);
    method public void onItemClick(android.widget.AdapterView, android.view.View, int, long);
  }

  public class DateKeyListener extends android.text.method.NumberKeyListener {
    ctor public DateKeyListener();
    method protected char[] getAcceptedChars();
    method public int getInputType();
    method public static android.text.method.DateKeyListener getInstance();
    field public static final char[] CHARACTERS;
  }

  public class DateTimeKeyListener extends android.text.method.NumberKeyListener {
    ctor public DateTimeKeyListener();
    method protected char[] getAcceptedChars();
    method public int getInputType();
    method public static android.text.method.DateTimeKeyListener getInstance();
    field public static final char[] CHARACTERS;
  }

  public class DialerKeyListener extends android.text.method.NumberKeyListener {
    ctor public DialerKeyListener();
    method protected char[] getAcceptedChars();
    method public int getInputType();
    method public static android.text.method.DialerKeyListener getInstance();
    field public static final char[] CHARACTERS;
  }

  public class DigitsKeyListener extends android.text.method.NumberKeyListener {
    ctor public DigitsKeyListener();
    ctor public DigitsKeyListener(boolean, boolean);
    method protected char[] getAcceptedChars();
    method public int getInputType();
    method public static android.text.method.DigitsKeyListener getInstance();
    method public static android.text.method.DigitsKeyListener getInstance(boolean, boolean);
    method public static android.text.method.DigitsKeyListener getInstance(java.lang.String);
  }

  public class HideReturnsTransformationMethod extends android.text.method.ReplacementTransformationMethod {
    ctor public HideReturnsTransformationMethod();
    method public static android.text.method.HideReturnsTransformationMethod getInstance();
    method protected char[] getOriginal();
    method protected char[] getReplacement();
  }

  public abstract interface KeyListener {
    method public abstract void clearMetaKeyState(android.view.View, android.text.Editable, int);
    method public abstract int getInputType();
    method public abstract boolean onKeyDown(android.view.View, android.text.Editable, int, android.view.KeyEvent);
    method public abstract boolean onKeyOther(android.view.View, android.text.Editable, android.view.KeyEvent);
    method public abstract boolean onKeyUp(android.view.View, android.text.Editable, int, android.view.KeyEvent);
  }

  public class LinkMovementMethod extends android.text.method.ScrollingMovementMethod {
    ctor public LinkMovementMethod();
    method public static android.text.method.MovementMethod getInstance();
  }

  public abstract class MetaKeyKeyListener {
    ctor public MetaKeyKeyListener();
    method public static void adjustMetaAfterKeypress(android.text.Spannable);
    method public static long adjustMetaAfterKeypress(long);
    method public void clearMetaKeyState(android.view.View, android.text.Editable, int);
    method public static void clearMetaKeyState(android.text.Editable, int);
    method public long clearMetaKeyState(long, int);
    method public static final int getMetaState(java.lang.CharSequence);
    method public static final int getMetaState(java.lang.CharSequence, android.view.KeyEvent);
    method public static final int getMetaState(java.lang.CharSequence, int);
    method public static final int getMetaState(java.lang.CharSequence, int, android.view.KeyEvent);
    method public static final int getMetaState(long);
    method public static final int getMetaState(long, int);
    method public static long handleKeyDown(long, int, android.view.KeyEvent);
    method public static long handleKeyUp(long, int, android.view.KeyEvent);
    method public static boolean isMetaTracker(java.lang.CharSequence, java.lang.Object);
    method public static boolean isSelectingMetaTracker(java.lang.CharSequence, java.lang.Object);
    method public boolean onKeyDown(android.view.View, android.text.Editable, int, android.view.KeyEvent);
    method public boolean onKeyUp(android.view.View, android.text.Editable, int, android.view.KeyEvent);
    method protected static void resetLockedMeta(android.text.Spannable);
    method public static long resetLockedMeta(long);
    method public static void resetMetaState(android.text.Spannable);
    field public static final int META_ALT_LOCKED = 512; // 0x200
    field public static final int META_ALT_ON = 2; // 0x2
    field public static final int META_CAP_LOCKED = 256; // 0x100
    field public static final int META_SHIFT_ON = 1; // 0x1
    field public static final int META_SYM_LOCKED = 1024; // 0x400
    field public static final int META_SYM_ON = 4; // 0x4
  }

  public abstract interface MovementMethod {
    method public abstract boolean canSelectArbitrarily();
    method public abstract void initialize(android.widget.TextView, android.text.Spannable);
    method public abstract boolean onGenericMotionEvent(android.widget.TextView, android.text.Spannable, android.view.MotionEvent);
    method public abstract boolean onKeyDown(android.widget.TextView, android.text.Spannable, int, android.view.KeyEvent);
    method public abstract boolean onKeyOther(android.widget.TextView, android.text.Spannable, android.view.KeyEvent);
    method public abstract boolean onKeyUp(android.widget.TextView, android.text.Spannable, int, android.view.KeyEvent);
    method public abstract void onTakeFocus(android.widget.TextView, android.text.Spannable, int);
    method public abstract boolean onTouchEvent(android.widget.TextView, android.text.Spannable, android.view.MotionEvent);
    method public abstract boolean onTrackballEvent(android.widget.TextView, android.text.Spannable, android.view.MotionEvent);
  }

  public class MultiTapKeyListener extends android.text.method.BaseKeyListener implements android.text.SpanWatcher {
    ctor public MultiTapKeyListener(android.text.method.TextKeyListener.Capitalize, boolean);
    method public int getInputType();
    method public static android.text.method.MultiTapKeyListener getInstance(boolean, android.text.method.TextKeyListener.Capitalize);
    method public void onSpanAdded(android.text.Spannable, java.lang.Object, int, int);
    method public void onSpanChanged(android.text.Spannable, java.lang.Object, int, int, int, int);
    method public void onSpanRemoved(android.text.Spannable, java.lang.Object, int, int);
  }

  public abstract class NumberKeyListener extends android.text.method.BaseKeyListener implements android.text.InputFilter {
    ctor public NumberKeyListener();
    method public java.lang.CharSequence filter(java.lang.CharSequence, int, int, android.text.Spanned, int, int);
    method protected abstract char[] getAcceptedChars();
    method protected int lookup(android.view.KeyEvent, android.text.Spannable);
    method protected static boolean ok(char[], char);
  }

  public class PasswordTransformationMethod implements android.text.TextWatcher android.text.method.TransformationMethod {
    ctor public PasswordTransformationMethod();
    method public void afterTextChanged(android.text.Editable);
    method public void beforeTextChanged(java.lang.CharSequence, int, int, int);
    method public static android.text.method.PasswordTransformationMethod getInstance();
    method public java.lang.CharSequence getTransformation(java.lang.CharSequence, android.view.View);
    method public void onFocusChanged(android.view.View, java.lang.CharSequence, boolean, int, android.graphics.Rect);
    method public void onTextChanged(java.lang.CharSequence, int, int, int);
  }

  public class QwertyKeyListener extends android.text.method.BaseKeyListener {
    ctor public QwertyKeyListener(android.text.method.TextKeyListener.Capitalize, boolean);
    method public int getInputType();
    method public static android.text.method.QwertyKeyListener getInstance(boolean, android.text.method.TextKeyListener.Capitalize);
    method public static android.text.method.QwertyKeyListener getInstanceForFullKeyboard();
    method public static void markAsReplaced(android.text.Spannable, int, int, java.lang.String);
  }

  public abstract class ReplacementTransformationMethod implements android.text.method.TransformationMethod {
    ctor public ReplacementTransformationMethod();
    method protected abstract char[] getOriginal();
    method protected abstract char[] getReplacement();
    method public java.lang.CharSequence getTransformation(java.lang.CharSequence, android.view.View);
    method public void onFocusChanged(android.view.View, java.lang.CharSequence, boolean, int, android.graphics.Rect);
  }

  public class ScrollingMovementMethod extends android.text.method.BaseMovementMethod implements android.text.method.MovementMethod {
    ctor public ScrollingMovementMethod();
    method public static android.text.method.MovementMethod getInstance();
  }

  public class SingleLineTransformationMethod extends android.text.method.ReplacementTransformationMethod {
    ctor public SingleLineTransformationMethod();
    method public static android.text.method.SingleLineTransformationMethod getInstance();
    method protected char[] getOriginal();
    method protected char[] getReplacement();
  }

  public class TextKeyListener extends android.text.method.BaseKeyListener implements android.text.SpanWatcher {
    ctor public TextKeyListener(android.text.method.TextKeyListener.Capitalize, boolean);
    method public static void clear(android.text.Editable);
    method public int getInputType();
    method public static android.text.method.TextKeyListener getInstance(boolean, android.text.method.TextKeyListener.Capitalize);
    method public static android.text.method.TextKeyListener getInstance();
    method public void onSpanAdded(android.text.Spannable, java.lang.Object, int, int);
    method public void onSpanChanged(android.text.Spannable, java.lang.Object, int, int, int, int);
    method public void onSpanRemoved(android.text.Spannable, java.lang.Object, int, int);
    method public void release();
    method public static boolean shouldCap(android.text.method.TextKeyListener.Capitalize, java.lang.CharSequence, int);
  }

  public static final class TextKeyListener.Capitalize extends java.lang.Enum {
    method public static android.text.method.TextKeyListener.Capitalize valueOf(java.lang.String);
    method public static final android.text.method.TextKeyListener.Capitalize[] values();
    enum_constant public static final android.text.method.TextKeyListener.Capitalize CHARACTERS;
    enum_constant public static final android.text.method.TextKeyListener.Capitalize NONE;
    enum_constant public static final android.text.method.TextKeyListener.Capitalize SENTENCES;
    enum_constant public static final android.text.method.TextKeyListener.Capitalize WORDS;
  }

  public class TimeKeyListener extends android.text.method.NumberKeyListener {
    ctor public TimeKeyListener();
    method protected char[] getAcceptedChars();
    method public int getInputType();
    method public static android.text.method.TimeKeyListener getInstance();
    field public static final char[] CHARACTERS;
  }

  public class Touch {
    method public static int getInitialScrollX(android.widget.TextView, android.text.Spannable);
    method public static int getInitialScrollY(android.widget.TextView, android.text.Spannable);
    method public static boolean onTouchEvent(android.widget.TextView, android.text.Spannable, android.view.MotionEvent);
    method public static void scrollTo(android.widget.TextView, android.text.Layout, int, int);
  }

  public abstract interface TransformationMethod {
    method public abstract java.lang.CharSequence getTransformation(java.lang.CharSequence, android.view.View);
    method public abstract void onFocusChanged(android.view.View, java.lang.CharSequence, boolean, int, android.graphics.Rect);
  }

}

package android.text.style {

  public class AbsoluteSizeSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public AbsoluteSizeSpan(int);
    ctor public AbsoluteSizeSpan(int, boolean);
    ctor public AbsoluteSizeSpan(android.os.Parcel);
    method public int describeContents();
    method public boolean getDip();
    method public int getSize();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public abstract interface AlignmentSpan implements android.text.style.ParagraphStyle {
    method public abstract android.text.Layout.Alignment getAlignment();
  }

  public static class AlignmentSpan.Standard implements android.text.style.AlignmentSpan android.text.ParcelableSpan {
    ctor public AlignmentSpan.Standard(android.text.Layout.Alignment);
    ctor public AlignmentSpan.Standard(android.os.Parcel);
    method public int describeContents();
    method public android.text.Layout.Alignment getAlignment();
    method public int getSpanTypeId();
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class BackgroundColorSpan extends android.text.style.CharacterStyle implements android.text.ParcelableSpan android.text.style.UpdateAppearance {
    ctor public BackgroundColorSpan(int);
    ctor public BackgroundColorSpan(android.os.Parcel);
    method public int describeContents();
    method public int getBackgroundColor();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class BulletSpan implements android.text.style.LeadingMarginSpan android.text.ParcelableSpan {
    ctor public BulletSpan();
    ctor public BulletSpan(int);
    ctor public BulletSpan(int, int);
    ctor public BulletSpan(android.os.Parcel);
    method public int describeContents();
    method public void drawLeadingMargin(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, boolean, android.text.Layout);
    method public int getLeadingMargin(boolean);
    method public int getSpanTypeId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int STANDARD_GAP_WIDTH = 2; // 0x2
  }

  public abstract class CharacterStyle {
    ctor public CharacterStyle();
    method public android.text.style.CharacterStyle getUnderlying();
    method public abstract void updateDrawState(android.text.TextPaint);
    method public static android.text.style.CharacterStyle wrap(android.text.style.CharacterStyle);
  }

  public abstract class ClickableSpan extends android.text.style.CharacterStyle implements android.text.style.UpdateAppearance {
    ctor public ClickableSpan();
    method public abstract void onClick(android.view.View);
    method public void updateDrawState(android.text.TextPaint);
  }

  public class DrawableMarginSpan implements android.text.style.LeadingMarginSpan android.text.style.LineHeightSpan {
    ctor public DrawableMarginSpan(android.graphics.drawable.Drawable);
    ctor public DrawableMarginSpan(android.graphics.drawable.Drawable, int);
    method public void chooseHeight(java.lang.CharSequence, int, int, int, int, android.graphics.Paint.FontMetricsInt);
    method public void drawLeadingMargin(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, boolean, android.text.Layout);
    method public int getLeadingMargin(boolean);
  }

  public abstract class DynamicDrawableSpan extends android.text.style.ReplacementSpan {
    ctor public DynamicDrawableSpan();
    ctor protected DynamicDrawableSpan(int);
    method public void draw(android.graphics.Canvas, java.lang.CharSequence, int, int, float, int, int, int, android.graphics.Paint);
    method public abstract android.graphics.drawable.Drawable getDrawable();
    method public int getSize(android.graphics.Paint, java.lang.CharSequence, int, int, android.graphics.Paint.FontMetricsInt);
    method public int getVerticalAlignment();
    field public static final int ALIGN_BASELINE = 1; // 0x1
    field public static final int ALIGN_BOTTOM = 0; // 0x0
    field protected final int mVerticalAlignment;
  }

  public class EasyEditSpan implements android.text.ParcelableSpan {
    ctor public EasyEditSpan();
    ctor public EasyEditSpan(android.app.PendingIntent);
    ctor public EasyEditSpan(android.os.Parcel);
    method public int describeContents();
    method public int getSpanTypeId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String EXTRA_TEXT_CHANGED_TYPE = "android.text.style.EXTRA_TEXT_CHANGED_TYPE";
    field public static final int TEXT_DELETED = 1; // 0x1
    field public static final int TEXT_MODIFIED = 2; // 0x2
  }

  public class ForegroundColorSpan extends android.text.style.CharacterStyle implements android.text.ParcelableSpan android.text.style.UpdateAppearance {
    ctor public ForegroundColorSpan(int);
    ctor public ForegroundColorSpan(android.os.Parcel);
    method public int describeContents();
    method public int getForegroundColor();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class IconMarginSpan implements android.text.style.LeadingMarginSpan android.text.style.LineHeightSpan {
    ctor public IconMarginSpan(android.graphics.Bitmap);
    ctor public IconMarginSpan(android.graphics.Bitmap, int);
    method public void chooseHeight(java.lang.CharSequence, int, int, int, int, android.graphics.Paint.FontMetricsInt);
    method public void drawLeadingMargin(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, boolean, android.text.Layout);
    method public int getLeadingMargin(boolean);
  }

  public class ImageSpan extends android.text.style.DynamicDrawableSpan {
    ctor public deprecated ImageSpan(android.graphics.Bitmap);
    ctor public deprecated ImageSpan(android.graphics.Bitmap, int);
    ctor public ImageSpan(android.content.Context, android.graphics.Bitmap);
    ctor public ImageSpan(android.content.Context, android.graphics.Bitmap, int);
    ctor public ImageSpan(android.graphics.drawable.Drawable);
    ctor public ImageSpan(android.graphics.drawable.Drawable, int);
    ctor public ImageSpan(android.graphics.drawable.Drawable, java.lang.String);
    ctor public ImageSpan(android.graphics.drawable.Drawable, java.lang.String, int);
    ctor public ImageSpan(android.content.Context, android.net.Uri);
    ctor public ImageSpan(android.content.Context, android.net.Uri, int);
    ctor public ImageSpan(android.content.Context, int);
    ctor public ImageSpan(android.content.Context, int, int);
    method public android.graphics.drawable.Drawable getDrawable();
    method public java.lang.String getSource();
  }

  public abstract interface LeadingMarginSpan implements android.text.style.ParagraphStyle {
    method public abstract void drawLeadingMargin(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, boolean, android.text.Layout);
    method public abstract int getLeadingMargin(boolean);
  }

  public static abstract interface LeadingMarginSpan.LeadingMarginSpan2 implements android.text.style.LeadingMarginSpan android.text.style.WrapTogetherSpan {
    method public abstract int getLeadingMarginLineCount();
  }

  public static class LeadingMarginSpan.Standard implements android.text.style.LeadingMarginSpan android.text.ParcelableSpan {
    ctor public LeadingMarginSpan.Standard(int, int);
    ctor public LeadingMarginSpan.Standard(int);
    ctor public LeadingMarginSpan.Standard(android.os.Parcel);
    method public int describeContents();
    method public void drawLeadingMargin(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, boolean, android.text.Layout);
    method public int getLeadingMargin(boolean);
    method public int getSpanTypeId();
    method public void writeToParcel(android.os.Parcel, int);
  }

  public abstract interface LineBackgroundSpan implements android.text.style.ParagraphStyle {
    method public abstract void drawBackground(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, int);
  }

  public abstract interface LineHeightSpan implements android.text.style.ParagraphStyle android.text.style.WrapTogetherSpan {
    method public abstract void chooseHeight(java.lang.CharSequence, int, int, int, int, android.graphics.Paint.FontMetricsInt);
  }

  public static abstract interface LineHeightSpan.WithDensity implements android.text.style.LineHeightSpan {
    method public abstract void chooseHeight(java.lang.CharSequence, int, int, int, int, android.graphics.Paint.FontMetricsInt, android.text.TextPaint);
  }

  public class LocaleSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public LocaleSpan(java.util.Locale);
    ctor public LocaleSpan(android.os.Parcel);
    method public int describeContents();
    method public java.util.Locale getLocale();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class MaskFilterSpan extends android.text.style.CharacterStyle implements android.text.style.UpdateAppearance {
    ctor public MaskFilterSpan(android.graphics.MaskFilter);
    method public android.graphics.MaskFilter getMaskFilter();
    method public void updateDrawState(android.text.TextPaint);
  }

  public abstract class MetricAffectingSpan extends android.text.style.CharacterStyle implements android.text.style.UpdateLayout {
    ctor public MetricAffectingSpan();
    method public abstract void updateMeasureState(android.text.TextPaint);
  }

  public abstract interface ParagraphStyle {
  }

  public class QuoteSpan implements android.text.style.LeadingMarginSpan android.text.ParcelableSpan {
    ctor public QuoteSpan();
    ctor public QuoteSpan(int);
    ctor public QuoteSpan(android.os.Parcel);
    method public int describeContents();
    method public void drawLeadingMargin(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, boolean, android.text.Layout);
    method public int getColor();
    method public int getLeadingMargin(boolean);
    method public int getSpanTypeId();
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class RasterizerSpan extends android.text.style.CharacterStyle implements android.text.style.UpdateAppearance {
    ctor public RasterizerSpan(android.graphics.Rasterizer);
    method public android.graphics.Rasterizer getRasterizer();
    method public void updateDrawState(android.text.TextPaint);
  }

  public class RelativeSizeSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public RelativeSizeSpan(float);
    ctor public RelativeSizeSpan(android.os.Parcel);
    method public int describeContents();
    method public float getSizeChange();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public abstract class ReplacementSpan extends android.text.style.MetricAffectingSpan {
    ctor public ReplacementSpan();
    method public abstract void draw(android.graphics.Canvas, java.lang.CharSequence, int, int, float, int, int, int, android.graphics.Paint);
    method public abstract int getSize(android.graphics.Paint, java.lang.CharSequence, int, int, android.graphics.Paint.FontMetricsInt);
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
  }

  public class ScaleXSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public ScaleXSpan(float);
    ctor public ScaleXSpan(android.os.Parcel);
    method public int describeContents();
    method public float getScaleX();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class StrikethroughSpan extends android.text.style.CharacterStyle implements android.text.ParcelableSpan android.text.style.UpdateAppearance {
    ctor public StrikethroughSpan();
    ctor public StrikethroughSpan(android.os.Parcel);
    method public int describeContents();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class StyleSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public StyleSpan(int);
    ctor public StyleSpan(android.os.Parcel);
    method public int describeContents();
    method public int getSpanTypeId();
    method public int getStyle();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class SubscriptSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public SubscriptSpan();
    ctor public SubscriptSpan(android.os.Parcel);
    method public int describeContents();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class SuggestionSpan extends android.text.style.CharacterStyle implements android.text.ParcelableSpan {
    ctor public SuggestionSpan(android.content.Context, java.lang.String[], int);
    ctor public SuggestionSpan(java.util.Locale, java.lang.String[], int);
    ctor public SuggestionSpan(android.content.Context, java.util.Locale, java.lang.String[], int, java.lang.Class<?>);
    ctor public SuggestionSpan(android.os.Parcel);
    method public int describeContents();
    method public int getFlags();
    method public java.lang.String getLocale();
    method public int getSpanTypeId();
    method public java.lang.String[] getSuggestions();
    method public void setFlags(int);
    method public void updateDrawState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String ACTION_SUGGESTION_PICKED = "android.text.style.SUGGESTION_PICKED";
    field public static final android.os.Parcelable.Creator<android.text.style.SuggestionSpan> CREATOR;
    field public static final int FLAG_AUTO_CORRECTION = 4; // 0x4
    field public static final int FLAG_EASY_CORRECT = 1; // 0x1
    field public static final int FLAG_MISSPELLED = 2; // 0x2
    field public static final int SUGGESTIONS_MAX_SIZE = 5; // 0x5
    field public static final java.lang.String SUGGESTION_SPAN_PICKED_AFTER = "after";
    field public static final java.lang.String SUGGESTION_SPAN_PICKED_BEFORE = "before";
    field public static final java.lang.String SUGGESTION_SPAN_PICKED_HASHCODE = "hashcode";
  }

  public class SuperscriptSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public SuperscriptSpan();
    ctor public SuperscriptSpan(android.os.Parcel);
    method public int describeContents();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public abstract interface TabStopSpan implements android.text.style.ParagraphStyle {
    method public abstract int getTabStop();
  }

  public static class TabStopSpan.Standard implements android.text.style.TabStopSpan {
    ctor public TabStopSpan.Standard(int);
    method public int getTabStop();
  }

  public class TextAppearanceSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public TextAppearanceSpan(android.content.Context, int);
    ctor public TextAppearanceSpan(android.content.Context, int, int);
    ctor public TextAppearanceSpan(java.lang.String, int, int, android.content.res.ColorStateList, android.content.res.ColorStateList);
    ctor public TextAppearanceSpan(android.os.Parcel);
    method public int describeContents();
    method public java.lang.String getFamily();
    method public android.content.res.ColorStateList getLinkTextColor();
    method public int getSpanTypeId();
    method public android.content.res.ColorStateList getTextColor();
    method public int getTextSize();
    method public int getTextStyle();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class TtsSpan implements android.text.ParcelableSpan {
    ctor public TtsSpan(java.lang.String, android.os.PersistableBundle);
    ctor public TtsSpan(android.os.Parcel);
    method public int describeContents();
    method public android.os.PersistableBundle getArgs();
    method public int getSpanTypeId();
    method public java.lang.String getType();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String ANIMACY_ANIMATE = "android.animate";
    field public static final java.lang.String ANIMACY_INANIMATE = "android.inanimate";
    field public static final java.lang.String ARG_ANIMACY = "android.arg.animacy";
    field public static final java.lang.String ARG_CASE = "android.arg.case";
    field public static final java.lang.String ARG_COUNTRY_CODE = "android.arg.country_code";
    field public static final java.lang.String ARG_CURRENCY = "android.arg.money";
    field public static final java.lang.String ARG_DAY = "android.arg.day";
    field public static final java.lang.String ARG_DENOMINATOR = "android.arg.denominator";
    field public static final java.lang.String ARG_DIGITS = "android.arg.digits";
    field public static final java.lang.String ARG_DOMAIN = "android.arg.domain";
    field public static final java.lang.String ARG_EXTENSION = "android.arg.extension";
    field public static final java.lang.String ARG_FRACTIONAL_PART = "android.arg.fractional_part";
    field public static final java.lang.String ARG_FRAGMENT_ID = "android.arg.fragment_id";
    field public static final java.lang.String ARG_GENDER = "android.arg.gender";
    field public static final java.lang.String ARG_HOURS = "android.arg.hours";
    field public static final java.lang.String ARG_INTEGER_PART = "android.arg.integer_part";
    field public static final java.lang.String ARG_MINUTES = "android.arg.minutes";
    field public static final java.lang.String ARG_MONTH = "android.arg.month";
    field public static final java.lang.String ARG_MULTIPLICITY = "android.arg.multiplicity";
    field public static final java.lang.String ARG_NUMBER = "android.arg.number";
    field public static final java.lang.String ARG_NUMBER_PARTS = "android.arg.number_parts";
    field public static final java.lang.String ARG_NUMERATOR = "android.arg.numerator";
    field public static final java.lang.String ARG_PASSWORD = "android.arg.password";
    field public static final java.lang.String ARG_PATH = "android.arg.path";
    field public static final java.lang.String ARG_PORT = "android.arg.port";
    field public static final java.lang.String ARG_PROTOCOL = "android.arg.protocol";
    field public static final java.lang.String ARG_QUANTITY = "android.arg.quantity";
    field public static final java.lang.String ARG_QUERY_STRING = "android.arg.query_string";
    field public static final java.lang.String ARG_TEXT = "android.arg.text";
    field public static final java.lang.String ARG_UNIT = "android.arg.unit";
    field public static final java.lang.String ARG_USERNAME = "android.arg.username";
    field public static final java.lang.String ARG_VERBATIM = "android.arg.verbatim";
    field public static final java.lang.String ARG_WEEKDAY = "android.arg.weekday";
    field public static final java.lang.String ARG_YEAR = "android.arg.year";
    field public static final java.lang.String CASE_ABLATIVE = "android.ablative";
    field public static final java.lang.String CASE_ACCUSATIVE = "android.accusative";
    field public static final java.lang.String CASE_DATIVE = "android.dative";
    field public static final java.lang.String CASE_GENITIVE = "android.genitive";
    field public static final java.lang.String CASE_INSTRUMENTAL = "android.instrumental";
    field public static final java.lang.String CASE_LOCATIVE = "android.locative";
    field public static final java.lang.String CASE_NOMINATIVE = "android.nominative";
    field public static final java.lang.String CASE_VOCATIVE = "android.vocative";
    field public static final java.lang.String GENDER_FEMALE = "android.female";
    field public static final java.lang.String GENDER_MALE = "android.male";
    field public static final java.lang.String GENDER_NEUTRAL = "android.neutral";
    field public static final int MONTH_APRIL = 3; // 0x3
    field public static final int MONTH_AUGUST = 7; // 0x7
    field public static final int MONTH_DECEMBER = 11; // 0xb
    field public static final int MONTH_FEBRUARY = 1; // 0x1
    field public static final int MONTH_JANUARY = 0; // 0x0
    field public static final int MONTH_JULY = 6; // 0x6
    field public static final int MONTH_JUNE = 5; // 0x5
    field public static final int MONTH_MARCH = 2; // 0x2
    field public static final int MONTH_MAY = 4; // 0x4
    field public static final int MONTH_NOVEMBER = 10; // 0xa
    field public static final int MONTH_OCTOBER = 9; // 0x9
    field public static final int MONTH_SEPTEMBER = 8; // 0x8
    field public static final java.lang.String MULTIPLICITY_DUAL = "android.dual";
    field public static final java.lang.String MULTIPLICITY_PLURAL = "android.plural";
    field public static final java.lang.String MULTIPLICITY_SINGLE = "android.single";
    field public static final java.lang.String TYPE_CARDINAL = "android.type.cardinal";
    field public static final java.lang.String TYPE_DATE = "android.type.date";
    field public static final java.lang.String TYPE_DECIMAL = "android.type.decimal";
    field public static final java.lang.String TYPE_DIGITS = "android.type.digits";
    field public static final java.lang.String TYPE_ELECTRONIC = "android.type.electronic";
    field public static final java.lang.String TYPE_FRACTION = "android.type.fraction";
    field public static final java.lang.String TYPE_MEASURE = "android.type.measure";
    field public static final java.lang.String TYPE_MONEY = "android.type.money";
    field public static final java.lang.String TYPE_ORDINAL = "android.type.ordinal";
    field public static final java.lang.String TYPE_TELEPHONE = "android.type.telephone";
    field public static final java.lang.String TYPE_TEXT = "android.type.text";
    field public static final java.lang.String TYPE_TIME = "android.type.time";
    field public static final java.lang.String TYPE_VERBATIM = "android.type.verbatim";
    field public static final int WEEKDAY_FRIDAY = 6; // 0x6
    field public static final int WEEKDAY_MONDAY = 2; // 0x2
    field public static final int WEEKDAY_SATURDAY = 7; // 0x7
    field public static final int WEEKDAY_SUNDAY = 1; // 0x1
    field public static final int WEEKDAY_THURSDAY = 5; // 0x5
    field public static final int WEEKDAY_TUESDAY = 3; // 0x3
    field public static final int WEEKDAY_WEDNESDAY = 4; // 0x4
  }

  public static class TtsSpan.Builder {
    ctor public TtsSpan.Builder(java.lang.String);
    method public android.text.style.TtsSpan build();
    method public C setIntArgument(java.lang.String, int);
    method public C setLongArgument(java.lang.String, long);
    method public C setStringArgument(java.lang.String, java.lang.String);
  }

  public static class TtsSpan.CardinalBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.CardinalBuilder();
    ctor public TtsSpan.CardinalBuilder(long);
    ctor public TtsSpan.CardinalBuilder(java.lang.String);
    method public android.text.style.TtsSpan.CardinalBuilder setNumber(long);
    method public android.text.style.TtsSpan.CardinalBuilder setNumber(java.lang.String);
  }

  public static class TtsSpan.DateBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.DateBuilder();
    ctor public TtsSpan.DateBuilder(java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer);
    method public android.text.style.TtsSpan.DateBuilder setDay(int);
    method public android.text.style.TtsSpan.DateBuilder setMonth(int);
    method public android.text.style.TtsSpan.DateBuilder setWeekday(int);
    method public android.text.style.TtsSpan.DateBuilder setYear(int);
  }

  public static class TtsSpan.DecimalBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.DecimalBuilder();
    ctor public TtsSpan.DecimalBuilder(double, int, int);
    ctor public TtsSpan.DecimalBuilder(java.lang.String, java.lang.String);
    method public android.text.style.TtsSpan.DecimalBuilder setArgumentsFromDouble(double, int, int);
    method public android.text.style.TtsSpan.DecimalBuilder setFractionalPart(java.lang.String);
    method public android.text.style.TtsSpan.DecimalBuilder setIntegerPart(long);
    method public android.text.style.TtsSpan.DecimalBuilder setIntegerPart(java.lang.String);
  }

  public static class TtsSpan.DigitsBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.DigitsBuilder();
    ctor public TtsSpan.DigitsBuilder(java.lang.String);
    method public android.text.style.TtsSpan.DigitsBuilder setDigits(java.lang.String);
  }

  public static class TtsSpan.ElectronicBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.ElectronicBuilder();
    method public android.text.style.TtsSpan.ElectronicBuilder setDomain(java.lang.String);
    method public android.text.style.TtsSpan.ElectronicBuilder setEmailArguments(java.lang.String, java.lang.String);
    method public android.text.style.TtsSpan.ElectronicBuilder setFragmentId(java.lang.String);
    method public android.text.style.TtsSpan.ElectronicBuilder setPassword(java.lang.String);
    method public android.text.style.TtsSpan.ElectronicBuilder setPath(java.lang.String);
    method public android.text.style.TtsSpan.ElectronicBuilder setPort(int);
    method public android.text.style.TtsSpan.ElectronicBuilder setProtocol(java.lang.String);
    method public android.text.style.TtsSpan.ElectronicBuilder setQueryString(java.lang.String);
    method public android.text.style.TtsSpan.ElectronicBuilder setUsername(java.lang.String);
  }

  public static class TtsSpan.FractionBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.FractionBuilder();
    ctor public TtsSpan.FractionBuilder(long, long, long);
    method public android.text.style.TtsSpan.FractionBuilder setDenominator(long);
    method public android.text.style.TtsSpan.FractionBuilder setDenominator(java.lang.String);
    method public android.text.style.TtsSpan.FractionBuilder setIntegerPart(long);
    method public android.text.style.TtsSpan.FractionBuilder setIntegerPart(java.lang.String);
    method public android.text.style.TtsSpan.FractionBuilder setNumerator(long);
    method public android.text.style.TtsSpan.FractionBuilder setNumerator(java.lang.String);
  }

  public static class TtsSpan.MeasureBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.MeasureBuilder();
    method public android.text.style.TtsSpan.MeasureBuilder setDenominator(long);
    method public android.text.style.TtsSpan.MeasureBuilder setDenominator(java.lang.String);
    method public android.text.style.TtsSpan.MeasureBuilder setFractionalPart(java.lang.String);
    method public android.text.style.TtsSpan.MeasureBuilder setIntegerPart(long);
    method public android.text.style.TtsSpan.MeasureBuilder setIntegerPart(java.lang.String);
    method public android.text.style.TtsSpan.MeasureBuilder setNumber(long);
    method public android.text.style.TtsSpan.MeasureBuilder setNumber(java.lang.String);
    method public android.text.style.TtsSpan.MeasureBuilder setNumerator(long);
    method public android.text.style.TtsSpan.MeasureBuilder setNumerator(java.lang.String);
    method public android.text.style.TtsSpan.MeasureBuilder setUnit(java.lang.String);
  }

  public static class TtsSpan.MoneyBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.MoneyBuilder();
    method public android.text.style.TtsSpan.MoneyBuilder setCurrency(java.lang.String);
    method public android.text.style.TtsSpan.MoneyBuilder setFractionalPart(java.lang.String);
    method public android.text.style.TtsSpan.MoneyBuilder setIntegerPart(long);
    method public android.text.style.TtsSpan.MoneyBuilder setIntegerPart(java.lang.String);
    method public android.text.style.TtsSpan.MoneyBuilder setQuantity(java.lang.String);
  }

  public static class TtsSpan.OrdinalBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.OrdinalBuilder();
    ctor public TtsSpan.OrdinalBuilder(long);
    ctor public TtsSpan.OrdinalBuilder(java.lang.String);
    method public android.text.style.TtsSpan.OrdinalBuilder setNumber(long);
    method public android.text.style.TtsSpan.OrdinalBuilder setNumber(java.lang.String);
  }

  public static class TtsSpan.SemioticClassBuilder extends android.text.style.TtsSpan.Builder {
    ctor public TtsSpan.SemioticClassBuilder(java.lang.String);
    method public C setAnimacy(java.lang.String);
    method public C setCase(java.lang.String);
    method public C setGender(java.lang.String);
    method public C setMultiplicity(java.lang.String);
  }

  public static class TtsSpan.TelephoneBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.TelephoneBuilder();
    ctor public TtsSpan.TelephoneBuilder(java.lang.String);
    method public android.text.style.TtsSpan.TelephoneBuilder setCountryCode(java.lang.String);
    method public android.text.style.TtsSpan.TelephoneBuilder setExtension(java.lang.String);
    method public android.text.style.TtsSpan.TelephoneBuilder setNumberParts(java.lang.String);
  }

  public static class TtsSpan.TextBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.TextBuilder();
    ctor public TtsSpan.TextBuilder(java.lang.String);
    method public android.text.style.TtsSpan.TextBuilder setText(java.lang.String);
  }

  public static class TtsSpan.TimeBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.TimeBuilder();
    ctor public TtsSpan.TimeBuilder(int, int);
    method public android.text.style.TtsSpan.TimeBuilder setHours(int);
    method public android.text.style.TtsSpan.TimeBuilder setMinutes(int);
  }

  public static class TtsSpan.VerbatimBuilder extends android.text.style.TtsSpan.SemioticClassBuilder {
    ctor public TtsSpan.VerbatimBuilder();
    ctor public TtsSpan.VerbatimBuilder(java.lang.String);
    method public android.text.style.TtsSpan.VerbatimBuilder setVerbatim(java.lang.String);
  }

  public class TypefaceSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
    ctor public TypefaceSpan(java.lang.String);
    ctor public TypefaceSpan(android.os.Parcel);
    method public int describeContents();
    method public java.lang.String getFamily();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void updateMeasureState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class URLSpan extends android.text.style.ClickableSpan implements android.text.ParcelableSpan {
    ctor public URLSpan(java.lang.String);
    ctor public URLSpan(android.os.Parcel);
    method public int describeContents();
    method public int getSpanTypeId();
    method public java.lang.String getURL();
    method public void onClick(android.view.View);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public class UnderlineSpan extends android.text.style.CharacterStyle implements android.text.ParcelableSpan android.text.style.UpdateAppearance {
    ctor public UnderlineSpan();
    ctor public UnderlineSpan(android.os.Parcel);
    method public int describeContents();
    method public int getSpanTypeId();
    method public void updateDrawState(android.text.TextPaint);
    method public void writeToParcel(android.os.Parcel, int);
  }

  public abstract interface UpdateAppearance {
  }

  public abstract interface UpdateLayout implements android.text.style.UpdateAppearance {
  }

  public abstract interface WrapTogetherSpan implements android.text.style.ParagraphStyle {
  }

}

package android.text.util {

  public class Linkify {
    ctor public Linkify();
    method public static final boolean addLinks(android.text.Spannable, int);
    method public static final boolean addLinks(android.widget.TextView, int);
    method public static final void addLinks(android.widget.TextView, java.util.regex.Pattern, java.lang.String);
    method public static final void addLinks(android.widget.TextView, java.util.regex.Pattern, java.lang.String, android.text.util.Linkify.MatchFilter, android.text.util.Linkify.TransformFilter);
    method public static final boolean addLinks(android.text.Spannable, java.util.regex.Pattern, java.lang.String);
    method public static final boolean addLinks(android.text.Spannable, java.util.regex.Pattern, java.lang.String, android.text.util.Linkify.MatchFilter, android.text.util.Linkify.TransformFilter);
    field public static final int ALL = 15; // 0xf
    field public static final int EMAIL_ADDRESSES = 2; // 0x2
    field public static final int MAP_ADDRESSES = 8; // 0x8
    field public static final int PHONE_NUMBERS = 4; // 0x4
    field public static final int WEB_URLS = 1; // 0x1
    field public static final android.text.util.Linkify.MatchFilter sPhoneNumberMatchFilter;
    field public static final android.text.util.Linkify.TransformFilter sPhoneNumberTransformFilter;
    field public static final android.text.util.Linkify.MatchFilter sUrlMatchFilter;
  }

  public static abstract interface Linkify.MatchFilter {
    method public abstract boolean acceptMatch(java.lang.CharSequence, int, int);
  }

  public static abstract interface Linkify.TransformFilter {
    method public abstract java.lang.String transformUrl(java.util.regex.Matcher, java.lang.String);
  }

  public class Rfc822Token {
    ctor public Rfc822Token(java.lang.String, java.lang.String, java.lang.String);
    method public java.lang.String getAddress();
    method public java.lang.String getComment();
    method public java.lang.String getName();
    method public static java.lang.String quoteComment(java.lang.String);
    method public static java.lang.String quoteName(java.lang.String);
    method public static java.lang.String quoteNameIfNecessary(java.lang.String);
    method public void setAddress(java.lang.String);
    method public void setComment(java.lang.String);
    method public void setName(java.lang.String);
  }

  public class Rfc822Tokenizer implements android.widget.MultiAutoCompleteTextView.Tokenizer {
    ctor public Rfc822Tokenizer();
    method public int findTokenEnd(java.lang.CharSequence, int);
    method public int findTokenStart(java.lang.CharSequence, int);
    method public java.lang.CharSequence terminateToken(java.lang.CharSequence);
    method public static void tokenize(java.lang.CharSequence, java.util.Collection<android.text.util.Rfc822Token>);
    method public static android.text.util.Rfc822Token[] tokenize(java.lang.CharSequence);
  }

}

package android.transition {

  public class ArcMotion extends android.transition.PathMotion {
    ctor public ArcMotion();
    ctor public ArcMotion(android.content.Context, android.util.AttributeSet);
    method public float getMaximumAngle();
    method public float getMinimumHorizontalAngle();
    method public float getMinimumVerticalAngle();
    method public android.graphics.Path getPath(float, float, float, float);
    method public void setMaximumAngle(float);
    method public void setMinimumHorizontalAngle(float);
    method public void setMinimumVerticalAngle(float);
  }

  public class AutoTransition extends android.transition.TransitionSet {
    ctor public AutoTransition();
    ctor public AutoTransition(android.content.Context, android.util.AttributeSet);
  }

  public class ChangeBounds extends android.transition.Transition {
    ctor public ChangeBounds();
    ctor public ChangeBounds(android.content.Context, android.util.AttributeSet);
    method public void captureEndValues(android.transition.TransitionValues);
    method public void captureStartValues(android.transition.TransitionValues);
    method public boolean getResizeClip();
    method public deprecated void setReparent(boolean);
    method public void setResizeClip(boolean);
  }

  public class ChangeClipBounds extends android.transition.Transition {
    ctor public ChangeClipBounds();
    ctor public ChangeClipBounds(android.content.Context, android.util.AttributeSet);
    method public void captureEndValues(android.transition.TransitionValues);
    method public void captureStartValues(android.transition.TransitionValues);
  }

  public class ChangeImageTransform extends android.transition.Transition {
    ctor public ChangeImageTransform();
    ctor public ChangeImageTransform(android.content.Context, android.util.AttributeSet);
    method public void captureEndValues(android.transition.TransitionValues);
    method public void captureStartValues(android.transition.TransitionValues);
  }

  public class ChangeScroll extends android.transition.Transition {
    ctor public ChangeScroll();
    ctor public ChangeScroll(android.content.Context, android.util.AttributeSet);
    method public void captureEndValues(android.transition.TransitionValues);
    method public void captureStartValues(android.transition.TransitionValues);
  }

  public class ChangeTransform extends android.transition.Transition {
    ctor public ChangeTransform();
    ctor public ChangeTransform(android.content.Context, android.util.AttributeSet);
    method public void captureEndValues(android.transition.TransitionValues);
    method public void captureStartValues(android.transition.TransitionValues);
    method public boolean getReparent();
    method public boolean getReparentWithOverlay();
    method public void setReparent(boolean);
    method public void setReparentWithOverlay(boolean);
  }

  public class CircularPropagation extends android.transition.VisibilityPropagation {
    ctor public CircularPropagation();
    method public long getStartDelay(android.view.ViewGroup, android.transition.Transition, android.transition.TransitionValues, android.transition.TransitionValues);
    method public void setPropagationSpeed(float);
  }

  public class Explode extends android.transition.Visibility {
    ctor public Explode();
    ctor public Explode(android.content.Context, android.util.AttributeSet);
  }

  public class Fade extends android.transition.Visibility {
    ctor public Fade();
    ctor public Fade(int);
    ctor public Fade(android.content.Context, android.util.AttributeSet);
    field public static final int IN = 1; // 0x1
    field public static final int OUT = 2; // 0x2
  }

  public abstract class PathMotion {
    ctor public PathMotion();
    ctor public PathMotion(android.content.Context, android.util.AttributeSet);
    method public abstract android.graphics.Path getPath(float, float, float, float);
  }

  public class PatternPathMotion extends android.transition.PathMotion {
    ctor public PatternPathMotion();
    ctor public PatternPathMotion(android.content.Context, android.util.AttributeSet);
    ctor public PatternPathMotion(android.graphics.Path);
    method public android.graphics.Path getPath(float, float, float, float);
    method public android.graphics.Path getPatternPath();
    method public void setPatternPath(android.graphics.Path);
  }

  public final class Scene {
    ctor public Scene(android.view.ViewGroup);
    ctor public Scene(android.view.ViewGroup, android.view.View);
    ctor public deprecated Scene(android.view.ViewGroup, android.view.ViewGroup);
    method public void enter();
    method public void exit();
    method public static android.transition.Scene getSceneForLayout(android.view.ViewGroup, int, android.content.Context);
    method public android.view.ViewGroup getSceneRoot();
    method public void setEnterAction(java.lang.Runnable);
    method public void setExitAction(java.lang.Runnable);
  }

  public class SidePropagation extends android.transition.VisibilityPropagation {
    ctor public SidePropagation();
    method public long getStartDelay(android.view.ViewGroup, android.transition.Transition, android.transition.TransitionValues, android.transition.TransitionValues);
    method public void setPropagationSpeed(float);
    method public void setSide(int);
  }

  public class Slide extends android.transition.Visibility {
    ctor public Slide();
    ctor public Slide(int);
    ctor public Slide(android.content.Context, android.util.AttributeSet);
    method public int getSlideEdge();
    method public void setSlideEdge(int);
  }

  public abstract class Transition implements java.lang.Cloneable {
    ctor public Transition();
    ctor public Transition(android.content.Context, android.util.AttributeSet);
    method public android.transition.Transition addListener(android.transition.Transition.TransitionListener);
    method public android.transition.Transition addTarget(int);
    method public android.transition.Transition addTarget(java.lang.String);
    method public android.transition.Transition addTarget(java.lang.Class);
    method public android.transition.Transition addTarget(android.view.View);
    method protected boolean areValuesChanged(android.transition.TransitionValues, android.transition.TransitionValues);
    method public boolean canRemoveViews();
    method public abstract void captureEndValues(android.transition.TransitionValues);
    method public abstract void captureStartValues(android.transition.TransitionValues);
    method public android.transition.Transition clone();
    method public android.animation.Animator createAnimator(android.view.ViewGroup, android.transition.TransitionValues, android.transition.TransitionValues);
    method public android.transition.Transition excludeChildren(int, boolean);
    method public android.transition.Transition excludeChildren(android.view.View, boolean);
    method public android.transition.Transition excludeChildren(java.lang.Class, boolean);
    method public android.transition.Transition excludeTarget(int, boolean);
    method public android.transition.Transition excludeTarget(java.lang.String, boolean);
    method public android.transition.Transition excludeTarget(android.view.View, boolean);
    method public android.transition.Transition excludeTarget(java.lang.Class, boolean);
    method public long getDuration();
    method public android.graphics.Rect getEpicenter();
    method public android.transition.Transition.EpicenterCallback getEpicenterCallback();
    method public android.animation.TimeInterpolator getInterpolator();
    method public java.lang.String getName();
    method public android.transition.PathMotion getPathMotion();
    method public android.transition.TransitionPropagation getPropagation();
    method public long getStartDelay();
    method public java.util.List<java.lang.Integer> getTargetIds();
    method public java.util.List<java.lang.String> getTargetNames();
    method public java.util.List<java.lang.Class> getTargetTypes();
    method public java.util.List<android.view.View> getTargets();
    method public java.lang.String[] getTransitionProperties();
    method public android.transition.TransitionValues getTransitionValues(android.view.View, boolean);
    method public android.transition.Transition removeListener(android.transition.Transition.TransitionListener);
    method public android.transition.Transition removeTarget(int);
    method public android.transition.Transition removeTarget(java.lang.String);
    method public android.transition.Transition removeTarget(android.view.View);
    method public android.transition.Transition removeTarget(java.lang.Class);
    method public android.transition.Transition setDuration(long);
    method public void setEpicenterCallback(android.transition.Transition.EpicenterCallback);
    method public android.transition.Transition setInterpolator(android.animation.TimeInterpolator);
    method public void setMatchOrder(int...);
    method public void setPathMotion(android.transition.PathMotion);
    method public void setPropagation(android.transition.TransitionPropagation);
    method public android.transition.Transition setStartDelay(long);
    field public static final int MATCH_ID = 3; // 0x3
    field public static final int MATCH_INSTANCE = 1; // 0x1
    field public static final int MATCH_ITEM_ID = 4; // 0x4
    field public static final int MATCH_NAME = 2; // 0x2
  }

  public static abstract class Transition.EpicenterCallback {
    ctor public Transition.EpicenterCallback();
    method public abstract android.graphics.Rect onGetEpicenter(android.transition.Transition);
  }

  public static abstract interface Transition.TransitionListener {
    method public abstract void onTransitionCancel(android.transition.Transition);
    method public abstract void onTransitionEnd(android.transition.Transition);
    method public abstract void onTransitionPause(android.transition.Transition);
    method public abstract void onTransitionResume(android.transition.Transition);
    method public abstract void onTransitionStart(android.transition.Transition);
  }

  public class TransitionInflater {
    method public static android.transition.TransitionInflater from(android.content.Context);
    method public android.transition.Transition inflateTransition(int);
    method public android.transition.TransitionManager inflateTransitionManager(int, android.view.ViewGroup);
  }

  public class TransitionManager {
    ctor public TransitionManager();
    method public static void beginDelayedTransition(android.view.ViewGroup);
    method public static void beginDelayedTransition(android.view.ViewGroup, android.transition.Transition);
    method public static void endTransitions(android.view.ViewGroup);
    method public static void go(android.transition.Scene);
    method public static void go(android.transition.Scene, android.transition.Transition);
    method public void setTransition(android.transition.Scene, android.transition.Transition);
    method public void setTransition(android.transition.Scene, android.transition.Scene, android.transition.Transition);
    method public void transitionTo(android.transition.Scene);
  }

  public abstract class TransitionPropagation {
    ctor public TransitionPropagation();
    method public abstract void captureValues(android.transition.TransitionValues);
    method public abstract java.lang.String[] getPropagationProperties();
    method public abstract long getStartDelay(android.view.ViewGroup, android.transition.Transition, android.transition.TransitionValues, android.transition.TransitionValues);
  }

  public class TransitionSet extends android.transition.Transition {
    ctor public TransitionSet();
    ctor public TransitionSet(android.content.Context, android.util.AttributeSet);
    method public android.transition.TransitionSet addTransition(android.transition.Transition);
    method public void captureEndValues(android.transition.TransitionValues);
    method public void captureStartValues(android.transition.TransitionValues);
    method public int getOrdering();
    method public android.transition.Transition getTransitionAt(int);
    method public int getTransitionCount();
    method public android.transition.TransitionSet removeTransition(android.transition.Transition);
    method public android.transition.TransitionSet setOrdering(int);
    field public static final int ORDERING_SEQUENTIAL = 1; // 0x1
    field public static final int ORDERING_TOGETHER = 0; // 0x0
  }

  public class TransitionValues {
    ctor public TransitionValues();
    field public final java.util.Map<java.lang.String, java.lang.Object> values;
    field public android.view.View view;
  }

  public abstract class Visibility extends android.transition.Transition {
    ctor public Visibility();
    ctor public Visibility(android.content.Context, android.util.AttributeSet);
    method public void captureEndValues(android.transition.TransitionValues);
    method public void captureStartValues(android.transition.TransitionValues);
    method public int getMode();
    method public boolean isVisible(android.transition.TransitionValues);
    method public android.animation.Animator onAppear(android.view.ViewGroup, android.transition.TransitionValues, int, android.transition.TransitionValues, int);
    method public android.animation.Animator onAppear(android.view.ViewGroup, android.view.View, android.transition.TransitionValues, android.transition.TransitionValues);
    method public android.animation.Animator onDisappear(android.view.ViewGroup, android.transition.TransitionValues, int, android.transition.TransitionValues, int);
    method public android.animation.Animator onDisappear(android.view.ViewGroup, android.view.View, android.transition.TransitionValues, android.transition.TransitionValues);
    method public void setMode(int);
    field public static final int MODE_IN = 1; // 0x1
    field public static final int MODE_OUT = 2; // 0x2
  }

  public abstract class VisibilityPropagation extends android.transition.TransitionPropagation {
    ctor public VisibilityPropagation();
    method public void captureValues(android.transition.TransitionValues);
    method public java.lang.String[] getPropagationProperties();
    method public int getViewVisibility(android.transition.TransitionValues);
    method public int getViewX(android.transition.TransitionValues);
    method public int getViewY(android.transition.TransitionValues);
  }

}

package android.util {

  public class AndroidException extends java.lang.Exception {
    ctor public AndroidException();
    ctor public AndroidException(java.lang.String);
    ctor public AndroidException(java.lang.String, java.lang.Throwable);
    ctor public AndroidException(java.lang.Exception);
  }

  public class AndroidRuntimeException extends java.lang.RuntimeException {
    ctor public AndroidRuntimeException();
    ctor public AndroidRuntimeException(java.lang.String);
    ctor public AndroidRuntimeException(java.lang.String, java.lang.Throwable);
    ctor public AndroidRuntimeException(java.lang.Exception);
  }

  public final class ArrayMap implements java.util.Map {
    ctor public ArrayMap();
    ctor public ArrayMap(int);
    ctor public ArrayMap(android.util.ArrayMap);
    method public void clear();
    method public boolean containsAll(java.util.Collection<?>);
    method public boolean containsKey(java.lang.Object);
    method public boolean containsValue(java.lang.Object);
    method public void ensureCapacity(int);
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public V get(java.lang.Object);
    method public int indexOfKey(java.lang.Object);
    method public boolean isEmpty();
    method public K keyAt(int);
    method public java.util.Set<K> keySet();
    method public V put(K, V);
    method public void putAll(android.util.ArrayMap<? extends K, ? extends V>);
    method public void putAll(java.util.Map<? extends K, ? extends V>);
    method public V remove(java.lang.Object);
    method public boolean removeAll(java.util.Collection<?>);
    method public V removeAt(int);
    method public boolean retainAll(java.util.Collection<?>);
    method public V setValueAt(int, V);
    method public int size();
    method public V valueAt(int);
    method public java.util.Collection<V> values();
  }

  public class AtomicFile {
    ctor public AtomicFile(java.io.File);
    method public void delete();
    method public void failWrite(java.io.FileOutputStream);
    method public void finishWrite(java.io.FileOutputStream);
    method public java.io.File getBaseFile();
    method public java.io.FileInputStream openRead() throws java.io.FileNotFoundException;
    method public byte[] readFully() throws java.io.IOException;
    method public java.io.FileOutputStream startWrite() throws java.io.IOException;
  }

  public abstract interface AttributeSet {
    method public abstract boolean getAttributeBooleanValue(java.lang.String, java.lang.String, boolean);
    method public abstract boolean getAttributeBooleanValue(int, boolean);
    method public abstract int getAttributeCount();
    method public abstract float getAttributeFloatValue(java.lang.String, java.lang.String, float);
    method public abstract float getAttributeFloatValue(int, float);
    method public abstract int getAttributeIntValue(java.lang.String, java.lang.String, int);
    method public abstract int getAttributeIntValue(int, int);
    method public abstract int getAttributeListValue(java.lang.String, java.lang.String, java.lang.String[], int);
    method public abstract int getAttributeListValue(int, java.lang.String[], int);
    method public abstract java.lang.String getAttributeName(int);
    method public abstract int getAttributeNameResource(int);
    method public abstract int getAttributeResourceValue(java.lang.String, java.lang.String, int);
    method public abstract int getAttributeResourceValue(int, int);
    method public abstract int getAttributeUnsignedIntValue(java.lang.String, java.lang.String, int);
    method public abstract int getAttributeUnsignedIntValue(int, int);
    method public abstract java.lang.String getAttributeValue(int);
    method public abstract java.lang.String getAttributeValue(java.lang.String, java.lang.String);
    method public abstract java.lang.String getClassAttribute();
    method public abstract java.lang.String getIdAttribute();
    method public abstract int getIdAttributeResourceValue(int);
    method public abstract java.lang.String getPositionDescription();
    method public abstract int getStyleAttribute();
  }

  public class Base64 {
    method public static byte[] decode(java.lang.String, int);
    method public static byte[] decode(byte[], int);
    method public static byte[] decode(byte[], int, int, int);
    method public static byte[] encode(byte[], int);
    method public static byte[] encode(byte[], int, int, int);
    method public static java.lang.String encodeToString(byte[], int);
    method public static java.lang.String encodeToString(byte[], int, int, int);
    field public static final int CRLF = 4; // 0x4
    field public static final int DEFAULT = 0; // 0x0
    field public static final int NO_CLOSE = 16; // 0x10
    field public static final int NO_PADDING = 1; // 0x1
    field public static final int NO_WRAP = 2; // 0x2
    field public static final int URL_SAFE = 8; // 0x8
  }

  public class Base64DataException extends java.io.IOException {
    ctor public Base64DataException(java.lang.String);
  }

  public class Base64InputStream extends java.io.FilterInputStream {
    ctor public Base64InputStream(java.io.InputStream, int);
  }

  public class Base64OutputStream extends java.io.FilterOutputStream {
    ctor public Base64OutputStream(java.io.OutputStream, int);
  }

  public final deprecated class Config {
    field public static final deprecated boolean DEBUG = false;
    field public static final deprecated boolean LOGD = true;
    field public static final deprecated boolean LOGV = false;
    field public static final deprecated boolean PROFILE = false;
    field public static final deprecated boolean RELEASE = true;
  }

  public class DebugUtils {
    method public static boolean isObjectSelected(java.lang.Object);
  }

  public class DisplayMetrics {
    ctor public DisplayMetrics();
    method public boolean equals(android.util.DisplayMetrics);
    method public void setTo(android.util.DisplayMetrics);
    method public void setToDefaults();
    field public static final int DENSITY_280 = 280; // 0x118
    field public static final int DENSITY_400 = 400; // 0x190
    field public static final int DENSITY_560 = 560; // 0x230
    field public static final int DENSITY_DEFAULT = 160; // 0xa0
    field public static final int DENSITY_HIGH = 240; // 0xf0
    field public static final int DENSITY_LOW = 120; // 0x78
    field public static final int DENSITY_MEDIUM = 160; // 0xa0
    field public static final int DENSITY_TV = 213; // 0xd5
    field public static final int DENSITY_XHIGH = 320; // 0x140
    field public static final int DENSITY_XXHIGH = 480; // 0x1e0
    field public static final int DENSITY_XXXHIGH = 640; // 0x280
    field public float density;
    field public int densityDpi;
    field public int heightPixels;
    field public float scaledDensity;
    field public int widthPixels;
    field public float xdpi;
    field public float ydpi;
  }

  public class EventLog {
    method public static int getTagCode(java.lang.String);
    method public static java.lang.String getTagName(int);
    method public static void readEvents(int[], java.util.Collection<android.util.EventLog.Event>) throws java.io.IOException;
    method public static int writeEvent(int, int);
    method public static int writeEvent(int, long);
    method public static int writeEvent(int, java.lang.String);
    method public static int writeEvent(int, java.lang.Object...);
  }

  public static final class EventLog.Event {
    method public synchronized java.lang.Object getData();
    method public int getProcessId();
    method public int getTag();
    method public int getThreadId();
    method public long getTimeNanos();
  }

  public deprecated class EventLogTags {
    ctor public EventLogTags() throws java.io.IOException;
    ctor public EventLogTags(java.io.BufferedReader) throws java.io.IOException;
    method public android.util.EventLogTags.Description get(java.lang.String);
    method public android.util.EventLogTags.Description get(int);
  }

  public static class EventLogTags.Description {
    field public final java.lang.String mName;
    field public final int mTag;
  }

  public deprecated class FloatMath {
    method public static float ceil(float);
    method public static float cos(float);
    method public static float exp(float);
    method public static float floor(float);
    method public static float hypot(float, float);
    method public static float pow(float, float);
    method public static float sin(float);
    method public static float sqrt(float);
  }

  public final class JsonReader implements java.io.Closeable {
    ctor public JsonReader(java.io.Reader);
    method public void beginArray() throws java.io.IOException;
    method public void beginObject() throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public void endArray() throws java.io.IOException;
    method public void endObject() throws java.io.IOException;
    method public boolean hasNext() throws java.io.IOException;
    method public boolean isLenient();
    method public boolean nextBoolean() throws java.io.IOException;
    method public double nextDouble() throws java.io.IOException;
    method public int nextInt() throws java.io.IOException;
    method public long nextLong() throws java.io.IOException;
    method public java.lang.String nextName() throws java.io.IOException;
    method public void nextNull() throws java.io.IOException;
    method public java.lang.String nextString() throws java.io.IOException;
    method public android.util.JsonToken peek() throws java.io.IOException;
    method public void setLenient(boolean);
    method public void skipValue() throws java.io.IOException;
  }

  public final class JsonToken extends java.lang.Enum {
    method public static android.util.JsonToken valueOf(java.lang.String);
    method public static final android.util.JsonToken[] values();
    enum_constant public static final android.util.JsonToken BEGIN_ARRAY;
    enum_constant public static final android.util.JsonToken BEGIN_OBJECT;
    enum_constant public static final android.util.JsonToken BOOLEAN;
    enum_constant public static final android.util.JsonToken END_ARRAY;
    enum_constant public static final android.util.JsonToken END_DOCUMENT;
    enum_constant public static final android.util.JsonToken END_OBJECT;
    enum_constant public static final android.util.JsonToken NAME;
    enum_constant public static final android.util.JsonToken NULL;
    enum_constant public static final android.util.JsonToken NUMBER;
    enum_constant public static final android.util.JsonToken STRING;
  }

  public final class JsonWriter implements java.io.Closeable {
    ctor public JsonWriter(java.io.Writer);
    method public android.util.JsonWriter beginArray() throws java.io.IOException;
    method public android.util.JsonWriter beginObject() throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public android.util.JsonWriter endArray() throws java.io.IOException;
    method public android.util.JsonWriter endObject() throws java.io.IOException;
    method public void flush() throws java.io.IOException;
    method public boolean isLenient();
    method public android.util.JsonWriter name(java.lang.String) throws java.io.IOException;
    method public android.util.JsonWriter nullValue() throws java.io.IOException;
    method public void setIndent(java.lang.String);
    method public void setLenient(boolean);
    method public android.util.JsonWriter value(java.lang.String) throws java.io.IOException;
    method public android.util.JsonWriter value(boolean) throws java.io.IOException;
    method public android.util.JsonWriter value(double) throws java.io.IOException;
    method public android.util.JsonWriter value(long) throws java.io.IOException;
    method public android.util.JsonWriter value(java.lang.Number) throws java.io.IOException;
  }

  public final class LayoutDirection {
    field public static final int INHERIT = 2; // 0x2
    field public static final int LOCALE = 3; // 0x3
    field public static final int LTR = 0; // 0x0
    field public static final int RTL = 1; // 0x1
  }

  public final class Log {
    method public static int d(java.lang.String, java.lang.String);
    method public static int d(java.lang.String, java.lang.String, java.lang.Throwable);
    method public static int e(java.lang.String, java.lang.String);
    method public static int e(java.lang.String, java.lang.String, java.lang.Throwable);
    method public static java.lang.String getStackTraceString(java.lang.Throwable);
    method public static int i(java.lang.String, java.lang.String);
    method public static int i(java.lang.String, java.lang.String, java.lang.Throwable);
    method public static boolean isLoggable(java.lang.String, int);
    method public static int println(int, java.lang.String, java.lang.String);
    method public static int v(java.lang.String, java.lang.String);
    method public static int v(java.lang.String, java.lang.String, java.lang.Throwable);
    method public static int w(java.lang.String, java.lang.String);
    method public static int w(java.lang.String, java.lang.String, java.lang.Throwable);
    method public static int w(java.lang.String, java.lang.Throwable);
    method public static int wtf(java.lang.String, java.lang.String);
    method public static int wtf(java.lang.String, java.lang.Throwable);
    method public static int wtf(java.lang.String, java.lang.String, java.lang.Throwable);
    field public static final int ASSERT = 7; // 0x7
    field public static final int DEBUG = 3; // 0x3
    field public static final int ERROR = 6; // 0x6
    field public static final int INFO = 4; // 0x4
    field public static final int VERBOSE = 2; // 0x2
    field public static final int WARN = 5; // 0x5
  }

  public class LogPrinter implements android.util.Printer {
    ctor public LogPrinter(int, java.lang.String);
    method public void println(java.lang.String);
  }

  public class LongSparseArray implements java.lang.Cloneable {
    ctor public LongSparseArray();
    ctor public LongSparseArray(int);
    method public void append(long, E);
    method public void clear();
    method public android.util.LongSparseArray<E> clone();
    method public void delete(long);
    method public E get(long);
    method public E get(long, E);
    method public int indexOfKey(long);
    method public int indexOfValue(E);
    method public long keyAt(int);
    method public void put(long, E);
    method public void remove(long);
    method public void removeAt(int);
    method public void setValueAt(int, E);
    method public int size();
    method public E valueAt(int);
  }

  public class LruCache {
    ctor public LruCache(int);
    method protected V create(K);
    method public final synchronized int createCount();
    method protected void entryRemoved(boolean, K, V, V);
    method public final void evictAll();
    method public final synchronized int evictionCount();
    method public final V get(K);
    method public final synchronized int hitCount();
    method public final synchronized int maxSize();
    method public final synchronized int missCount();
    method public final V put(K, V);
    method public final synchronized int putCount();
    method public final V remove(K);
    method public void resize(int);
    method public final synchronized int size();
    method protected int sizeOf(K, V);
    method public final synchronized java.util.Map<K, V> snapshot();
    method public final synchronized java.lang.String toString();
    method public void trimToSize(int);
  }

  public final class MalformedJsonException extends java.io.IOException {
    ctor public MalformedJsonException(java.lang.String);
  }

  public class MonthDisplayHelper {
    ctor public MonthDisplayHelper(int, int, int);
    ctor public MonthDisplayHelper(int, int);
    method public int getColumnOf(int);
    method public int getDayAt(int, int);
    method public int[] getDigitsForRow(int);
    method public int getFirstDayOfMonth();
    method public int getMonth();
    method public int getNumberOfDaysInMonth();
    method public int getOffset();
    method public int getRowOf(int);
    method public int getWeekStartDay();
    method public int getYear();
    method public boolean isWithinCurrentMonth(int, int);
    method public void nextMonth();
    method public void previousMonth();
  }

  public final class MutableBoolean {
    ctor public MutableBoolean(boolean);
    field public boolean value;
  }

  public final class MutableByte {
    ctor public MutableByte(byte);
    field public byte value;
  }

  public final class MutableChar {
    ctor public MutableChar(char);
    field public char value;
  }

  public final class MutableDouble {
    ctor public MutableDouble(double);
    field public double value;
  }

  public final class MutableFloat {
    ctor public MutableFloat(float);
    field public float value;
  }

  public final class MutableInt {
    ctor public MutableInt(int);
    field public int value;
  }

  public final class MutableLong {
    ctor public MutableLong(long);
    field public long value;
  }

  public final class MutableShort {
    ctor public MutableShort(short);
    field public short value;
  }

  public class NoSuchPropertyException extends java.lang.RuntimeException {
    ctor public NoSuchPropertyException(java.lang.String);
  }

  public class Pair {
    ctor public Pair(F, S);
    method public static android.util.Pair<A, B> create(A, B);
    field public final F first;
    field public final S second;
  }

  public class Patterns {
    method public static final java.lang.String concatGroups(java.util.regex.Matcher);
    method public static final java.lang.String digitsAndPlusOnly(java.util.regex.Matcher);
    field public static final java.util.regex.Pattern DOMAIN_NAME;
    field public static final java.util.regex.Pattern EMAIL_ADDRESS;
    field public static final java.lang.String GOOD_IRI_CHAR = "a-zA-Z0-9\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef";
    field public static final java.util.regex.Pattern IP_ADDRESS;
    field public static final java.util.regex.Pattern PHONE;
    field public static final deprecated java.util.regex.Pattern TOP_LEVEL_DOMAIN;
    field public static final deprecated java.lang.String TOP_LEVEL_DOMAIN_STR = "((aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(biz|b[abdefghijmnorstvwyz])|(cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(edu|e[cegrstu])|f[ijkmor]|(gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(info|int|i[delmnoqrst])|(jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(name|net|n[acefgilopruz])|(org|om)|(pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw])";
    field public static final deprecated java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(?:\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw]))";
    field public static final java.util.regex.Pattern WEB_URL;
  }

  public class PrintStreamPrinter implements android.util.Printer {
    ctor public PrintStreamPrinter(java.io.PrintStream);
    method public void println(java.lang.String);
  }

  public class PrintWriterPrinter implements android.util.Printer {
    ctor public PrintWriterPrinter(java.io.PrintWriter);
    method public void println(java.lang.String);
  }

  public abstract interface Printer {
    method public abstract void println(java.lang.String);
  }

  public abstract class Property {
    ctor public Property(java.lang.Class<V>, java.lang.String);
    method public abstract V get(T);
    method public java.lang.String getName();
    method public java.lang.Class<V> getType();
    method public boolean isReadOnly();
    method public static android.util.Property<T, V> of(java.lang.Class<T>, java.lang.Class<V>, java.lang.String);
    method public void set(T, V);
  }

  public final class Range {
    ctor public Range(T, T);
    method public T clamp(T);
    method public boolean contains(T);
    method public boolean contains(android.util.Range<T>);
    method public static android.util.Range<T> create(T, T);
    method public android.util.Range<T> extend(android.util.Range<T>);
    method public android.util.Range<T> extend(T, T);
    method public android.util.Range<T> extend(T);
    method public T getLower();
    method public T getUpper();
    method public android.util.Range<T> intersect(android.util.Range<T>);
    method public android.util.Range<T> intersect(T, T);
  }

  public final class Rational extends java.lang.Number implements java.lang.Comparable {
    ctor public Rational(int, int);
    method public int compareTo(android.util.Rational);
    method public double doubleValue();
    method public float floatValue();
    method public int getDenominator();
    method public int getNumerator();
    method public int intValue();
    method public boolean isFinite();
    method public boolean isInfinite();
    method public boolean isNaN();
    method public boolean isZero();
    method public long longValue();
    method public static android.util.Rational parseRational(java.lang.String) throws java.lang.NumberFormatException;
    field public static final android.util.Rational NEGATIVE_INFINITY;
    field public static final android.util.Rational NaN;
    field public static final android.util.Rational POSITIVE_INFINITY;
    field public static final android.util.Rational ZERO;
  }

  public final class Size {
    ctor public Size(int, int);
    method public int getHeight();
    method public int getWidth();
    method public static android.util.Size parseSize(java.lang.String) throws java.lang.NumberFormatException;
  }

  public final class SizeF {
    ctor public SizeF(float, float);
    method public float getHeight();
    method public float getWidth();
    method public static android.util.SizeF parseSizeF(java.lang.String) throws java.lang.NumberFormatException;
  }

  public class SparseArray implements java.lang.Cloneable {
    ctor public SparseArray();
    ctor public SparseArray(int);
    method public void append(int, E);
    method public void clear();
    method public android.util.SparseArray<E> clone();
    method public void delete(int);
    method public E get(int);
    method public E get(int, E);
    method public int indexOfKey(int);
    method public int indexOfValue(E);
    method public int keyAt(int);
    method public void put(int, E);
    method public void remove(int);
    method public void removeAt(int);
    method public void removeAtRange(int, int);
    method public void setValueAt(int, E);
    method public int size();
    method public E valueAt(int);
  }

  public class SparseBooleanArray implements java.lang.Cloneable {
    ctor public SparseBooleanArray();
    ctor public SparseBooleanArray(int);
    method public void append(int, boolean);
    method public void clear();
    method public android.util.SparseBooleanArray clone();
    method public void delete(int);
    method public boolean get(int);
    method public boolean get(int, boolean);
    method public int indexOfKey(int);
    method public int indexOfValue(boolean);
    method public int keyAt(int);
    method public void put(int, boolean);
    method public int size();
    method public boolean valueAt(int);
  }

  public class SparseIntArray implements java.lang.Cloneable {
    ctor public SparseIntArray();
    ctor public SparseIntArray(int);
    method public void append(int, int);
    method public void clear();
    method public android.util.SparseIntArray clone();
    method public void delete(int);
    method public int get(int);
    method public int get(int, int);
    method public int indexOfKey(int);
    method public int indexOfValue(int);
    method public int keyAt(int);
    method public void put(int, int);
    method public void removeAt(int);
    method public int size();
    method public int valueAt(int);
  }

  public class SparseLongArray implements java.lang.Cloneable {
    ctor public SparseLongArray();
    ctor public SparseLongArray(int);
    method public void append(int, long);
    method public void clear();
    method public android.util.SparseLongArray clone();
    method public void delete(int);
    method public long get(int);
    method public long get(int, long);
    method public int indexOfKey(int);
    method public int indexOfValue(long);
    method public int keyAt(int);
    method public void put(int, long);
    method public void removeAt(int);
    method public int size();
    method public long valueAt(int);
  }

  public class StateSet {
    method public static java.lang.String dump(int[]);
    method public static boolean isWildCard(int[]);
    method public static boolean stateSetMatches(int[], int[]);
    method public static boolean stateSetMatches(int[], int);
    method public static int[] trimStateSet(int[], int);
    field public static final int[] NOTHING;
    field public static final int[] WILD_CARD;
  }

  public class StringBuilderPrinter implements android.util.Printer {
    ctor public StringBuilderPrinter(java.lang.StringBuilder);
    method public void println(java.lang.String);
  }

  public class TimeFormatException extends java.lang.RuntimeException {
  }

  public class TimeUtils {
    method public static java.util.TimeZone getTimeZone(int, boolean, long, java.lang.String);
    method public static java.lang.String getTimeZoneDatabaseVersion();
  }

  public class TimingLogger {
    ctor public TimingLogger(java.lang.String, java.lang.String);
    method public void addSplit(java.lang.String);
    method public void dumpToLog();
    method public void reset(java.lang.String, java.lang.String);
    method public void reset();
  }

  public class TypedValue {
    ctor public TypedValue();
    method public static float applyDimension(int, float, android.util.DisplayMetrics);
    method public final java.lang.CharSequence coerceToString();
    method public static final java.lang.String coerceToString(int, int);
    method public static float complexToDimension(int, android.util.DisplayMetrics);
    method public static int complexToDimensionPixelOffset(int, android.util.DisplayMetrics);
    method public static int complexToDimensionPixelSize(int, android.util.DisplayMetrics);
    method public static float complexToFloat(int);
    method public static float complexToFraction(int, float, float);
    method public int getComplexUnit();
    method public float getDimension(android.util.DisplayMetrics);
    method public final float getFloat();
    method public float getFraction(float, float);
    method public void setTo(android.util.TypedValue);
    field public static final int COMPLEX_MANTISSA_MASK = 16777215; // 0xffffff
    field public static final int COMPLEX_MANTISSA_SHIFT = 8; // 0x8
    field public static final int COMPLEX_RADIX_0p23 = 3; // 0x3
    field public static final int COMPLEX_RADIX_16p7 = 1; // 0x1
    field public static final int COMPLEX_RADIX_23p0 = 0; // 0x0
    field public static final int COMPLEX_RADIX_8p15 = 2; // 0x2
    field public static final int COMPLEX_RADIX_MASK = 3; // 0x3
    field public static final int COMPLEX_RADIX_SHIFT = 4; // 0x4
    field public static final int COMPLEX_UNIT_DIP = 1; // 0x1
    field public static final int COMPLEX_UNIT_FRACTION = 0; // 0x0
    field public static final int COMPLEX_UNIT_FRACTION_PARENT = 1; // 0x1
    field public static final int COMPLEX_UNIT_IN = 4; // 0x4
    field public static final int COMPLEX_UNIT_MASK = 15; // 0xf
    field public static final int COMPLEX_UNIT_MM = 5; // 0x5
    field public static final int COMPLEX_UNIT_PT = 3; // 0x3
    field public static final int COMPLEX_UNIT_PX = 0; // 0x0
    field public static final int COMPLEX_UNIT_SHIFT = 0; // 0x0
    field public static final int COMPLEX_UNIT_SP = 2; // 0x2
    field public static final int DATA_NULL_EMPTY = 1; // 0x1
    field public static final int DATA_NULL_UNDEFINED = 0; // 0x0
    field public static final int DENSITY_DEFAULT = 0; // 0x0
    field public static final int DENSITY_NONE = 65535; // 0xffff
    field public static final int TYPE_ATTRIBUTE = 2; // 0x2
    field public static final int TYPE_DIMENSION = 5; // 0x5
    field public static final int TYPE_FIRST_COLOR_INT = 28; // 0x1c
    field public static final int TYPE_FIRST_INT = 16; // 0x10
    field public static final int TYPE_FLOAT = 4; // 0x4
    field public static final int TYPE_FRACTION = 6; // 0x6
    field public static final int TYPE_INT_BOOLEAN = 18; // 0x12
    field public static final int TYPE_INT_COLOR_ARGB4 = 30; // 0x1e
    field public static final int TYPE_INT_COLOR_ARGB8 = 28; // 0x1c
    field public static final int TYPE_INT_COLOR_RGB4 = 31; // 0x1f
    field public static final int TYPE_INT_COLOR_RGB8 = 29; // 0x1d
    field public static final int TYPE_INT_DEC = 16; // 0x10
    field public static final int TYPE_INT_HEX = 17; // 0x11
    field public static final int TYPE_LAST_COLOR_INT = 31; // 0x1f
    field public static final int TYPE_LAST_INT = 31; // 0x1f
    field public static final int TYPE_NULL = 0; // 0x0
    field public static final int TYPE_REFERENCE = 1; // 0x1
    field public static final int TYPE_STRING = 3; // 0x3
    field public int assetCookie;
    field public int changingConfigurations;
    field public int data;
    field public int density;
    field public int resourceId;
    field public java.lang.CharSequence string;
    field public int type;
  }

  public class Xml {
    method public static android.util.AttributeSet asAttributeSet(org.xmlpull.v1.XmlPullParser);
    method public static android.util.Xml.Encoding findEncodingByName(java.lang.String) throws java.io.UnsupportedEncodingException;
    method public static org.xmlpull.v1.XmlPullParser newPullParser();
    method public static org.xmlpull.v1.XmlSerializer newSerializer();
    method public static void parse(java.lang.String, org.xml.sax.ContentHandler) throws org.xml.sax.SAXException;
    method public static void parse(java.io.Reader, org.xml.sax.ContentHandler) throws java.io.IOException, org.xml.sax.SAXException;
    method public static void parse(java.io.InputStream, android.util.Xml.Encoding, org.xml.sax.ContentHandler) throws java.io.IOException, org.xml.sax.SAXException;
    field public static java.lang.String FEATURE_RELAXED;
  }

  public static final class Xml.Encoding extends java.lang.Enum {
    method public static android.util.Xml.Encoding valueOf(java.lang.String);
    method public static final android.util.Xml.Encoding[] values();
    enum_constant public static final android.util.Xml.Encoding ISO_8859_1;
    enum_constant public static final android.util.Xml.Encoding US_ASCII;
    enum_constant public static final android.util.Xml.Encoding UTF_16;
    enum_constant public static final android.util.Xml.Encoding UTF_8;
  }

}

package android.view {

  public abstract class AbsSavedState implements android.os.Parcelable {
    ctor protected AbsSavedState(android.os.Parcelable);
    ctor protected AbsSavedState(android.os.Parcel);
    method public int describeContents();
    method public final android.os.Parcelable getSuperState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.AbsSavedState> CREATOR;
    field public static final android.view.AbsSavedState EMPTY_STATE;
  }

  public abstract class ActionMode {
    ctor public ActionMode();
    method public abstract void finish();
    method public abstract android.view.View getCustomView();
    method public abstract android.view.Menu getMenu();
    method public abstract android.view.MenuInflater getMenuInflater();
    method public abstract java.lang.CharSequence getSubtitle();
    method public java.lang.Object getTag();
    method public abstract java.lang.CharSequence getTitle();
    method public boolean getTitleOptionalHint();
    method public int getType();
    method public abstract void invalidate();
    method public void invalidateContentRect();
    method public boolean isTitleOptional();
    method public abstract void setCustomView(android.view.View);
    method public abstract void setSubtitle(java.lang.CharSequence);
    method public abstract void setSubtitle(int);
    method public void setTag(java.lang.Object);
    method public abstract void setTitle(java.lang.CharSequence);
    method public abstract void setTitle(int);
    method public void setTitleOptionalHint(boolean);
    method public void setType(int);
    field public static final int TYPE_FLOATING = 1; // 0x1
    field public static final int TYPE_PRIMARY = 0; // 0x0
  }

  public static abstract interface ActionMode.Callback {
    method public abstract boolean onActionItemClicked(android.view.ActionMode, android.view.MenuItem);
    method public abstract boolean onCreateActionMode(android.view.ActionMode, android.view.Menu);
    method public abstract void onDestroyActionMode(android.view.ActionMode);
    method public abstract boolean onPrepareActionMode(android.view.ActionMode, android.view.Menu);
  }

  public static abstract class ActionMode.Callback2 implements android.view.ActionMode.Callback {
    ctor public ActionMode.Callback2();
    method public void onGetContentRect(android.view.ActionMode, android.view.View, android.graphics.Rect);
  }

  public abstract class ActionProvider {
    ctor public ActionProvider(android.content.Context);
    method public boolean hasSubMenu();
    method public boolean isVisible();
    method public abstract deprecated android.view.View onCreateActionView();
    method public android.view.View onCreateActionView(android.view.MenuItem);
    method public boolean onPerformDefaultAction();
    method public void onPrepareSubMenu(android.view.SubMenu);
    method public boolean overridesItemVisibility();
    method public void refreshVisibility();
    method public void setVisibilityListener(android.view.ActionProvider.VisibilityListener);
  }

  public static abstract interface ActionProvider.VisibilityListener {
    method public abstract void onActionProviderVisibilityChanged(boolean);
  }

  public final class Choreographer {
    method public static android.view.Choreographer getInstance();
    method public void postFrameCallback(android.view.Choreographer.FrameCallback);
    method public void postFrameCallbackDelayed(android.view.Choreographer.FrameCallback, long);
    method public void removeFrameCallback(android.view.Choreographer.FrameCallback);
  }

  public static abstract interface Choreographer.FrameCallback {
    method public abstract void doFrame(long);
  }

  public abstract interface CollapsibleActionView {
    method public abstract void onActionViewCollapsed();
    method public abstract void onActionViewExpanded();
  }

  public abstract interface ContextMenu implements android.view.Menu {
    method public abstract void clearHeader();
    method public abstract android.view.ContextMenu setHeaderIcon(int);
    method public abstract android.view.ContextMenu setHeaderIcon(android.graphics.drawable.Drawable);
    method public abstract android.view.ContextMenu setHeaderTitle(int);
    method public abstract android.view.ContextMenu setHeaderTitle(java.lang.CharSequence);
    method public abstract android.view.ContextMenu setHeaderView(android.view.View);
  }

  public static abstract interface ContextMenu.ContextMenuInfo {
  }

  public class ContextThemeWrapper extends android.content.ContextWrapper {
    ctor public ContextThemeWrapper();
    ctor public ContextThemeWrapper(android.content.Context, int);
    ctor public ContextThemeWrapper(android.content.Context, android.content.res.Resources.Theme);
    method public void applyOverrideConfiguration(android.content.res.Configuration);
    method protected void onApplyThemeResource(android.content.res.Resources.Theme, int, boolean);
  }

  public final class Display {
    method public long getAppVsyncOffsetNanos();
    method public void getCurrentSizeRange(android.graphics.Point, android.graphics.Point);
    method public int getDisplayId();
    method public int getFlags();
    method public deprecated int getHeight();
    method public void getMetrics(android.util.DisplayMetrics);
    method public java.lang.String getName();
    method public deprecated int getOrientation();
    method public deprecated int getPixelFormat();
    method public long getPresentationDeadlineNanos();
    method public void getRealMetrics(android.util.DisplayMetrics);
    method public void getRealSize(android.graphics.Point);
    method public void getRectSize(android.graphics.Rect);
    method public float getRefreshRate();
    method public int getRotation();
    method public void getSize(android.graphics.Point);
    method public int getState();
    method public float[] getSupportedRefreshRates();
    method public deprecated int getWidth();
    method public boolean isValid();
    field public static final int DEFAULT_DISPLAY = 0; // 0x0
    field public static final int FLAG_PRESENTATION = 8; // 0x8
    field public static final int FLAG_PRIVATE = 4; // 0x4
    field public static final int FLAG_SECURE = 2; // 0x2
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
    field public static final int STATE_DOZE = 3; // 0x3
    field public static final int STATE_DOZE_SUSPEND = 4; // 0x4
    field public static final int STATE_OFF = 1; // 0x1
    field public static final int STATE_ON = 2; // 0x2
    field public static final int STATE_UNKNOWN = 0; // 0x0
  }

  public class DragEvent implements android.os.Parcelable {
    method public int describeContents();
    method public int getAction();
    method public android.content.ClipData getClipData();
    method public android.content.ClipDescription getClipDescription();
    method public java.lang.Object getLocalState();
    method public boolean getResult();
    method public float getX();
    method public float getY();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ACTION_DRAG_ENDED = 4; // 0x4
    field public static final int ACTION_DRAG_ENTERED = 5; // 0x5
    field public static final int ACTION_DRAG_EXITED = 6; // 0x6
    field public static final int ACTION_DRAG_LOCATION = 2; // 0x2
    field public static final int ACTION_DRAG_STARTED = 1; // 0x1
    field public static final int ACTION_DROP = 3; // 0x3
    field public static final android.os.Parcelable.Creator<android.view.DragEvent> CREATOR;
  }

  public class FocusFinder {
    method public android.view.View findNearestTouchable(android.view.ViewGroup, int, int, int, int[]);
    method public final android.view.View findNextFocus(android.view.ViewGroup, android.view.View, int);
    method public android.view.View findNextFocusFromRect(android.view.ViewGroup, android.graphics.Rect, int);
    method public static android.view.FocusFinder getInstance();
  }

  public abstract class FrameStats {
    ctor public FrameStats();
    method public final long getEndTimeNano();
    method public final int getFrameCount();
    method public final long getFramePresentedTimeNano(int);
    method public final long getRefreshPeriodNano();
    method public final long getStartTimeNano();
    field public static final long UNDEFINED_TIME_NANO = -1L; // 0xffffffffffffffffL
  }

  public class GestureDetector {
    ctor public deprecated GestureDetector(android.view.GestureDetector.OnGestureListener, android.os.Handler);
    ctor public deprecated GestureDetector(android.view.GestureDetector.OnGestureListener);
    ctor public GestureDetector(android.content.Context, android.view.GestureDetector.OnGestureListener);
    ctor public GestureDetector(android.content.Context, android.view.GestureDetector.OnGestureListener, android.os.Handler);
    ctor public GestureDetector(android.content.Context, android.view.GestureDetector.OnGestureListener, android.os.Handler, boolean);
    method public boolean isLongpressEnabled();
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public void setIsLongpressEnabled(boolean);
    method public void setOnDoubleTapListener(android.view.GestureDetector.OnDoubleTapListener);
  }

  public static abstract interface GestureDetector.OnDoubleTapListener {
    method public abstract boolean onDoubleTap(android.view.MotionEvent);
    method public abstract boolean onDoubleTapEvent(android.view.MotionEvent);
    method public abstract boolean onSingleTapConfirmed(android.view.MotionEvent);
  }

  public static abstract interface GestureDetector.OnGestureListener {
    method public abstract boolean onDown(android.view.MotionEvent);
    method public abstract boolean onFling(android.view.MotionEvent, android.view.MotionEvent, float, float);
    method public abstract void onLongPress(android.view.MotionEvent);
    method public abstract boolean onScroll(android.view.MotionEvent, android.view.MotionEvent, float, float);
    method public abstract void onShowPress(android.view.MotionEvent);
    method public abstract boolean onSingleTapUp(android.view.MotionEvent);
  }

  public static class GestureDetector.SimpleOnGestureListener implements android.view.GestureDetector.OnDoubleTapListener android.view.GestureDetector.OnGestureListener {
    ctor public GestureDetector.SimpleOnGestureListener();
    method public boolean onDoubleTap(android.view.MotionEvent);
    method public boolean onDoubleTapEvent(android.view.MotionEvent);
    method public boolean onDown(android.view.MotionEvent);
    method public boolean onFling(android.view.MotionEvent, android.view.MotionEvent, float, float);
    method public void onLongPress(android.view.MotionEvent);
    method public boolean onScroll(android.view.MotionEvent, android.view.MotionEvent, float, float);
    method public void onShowPress(android.view.MotionEvent);
    method public boolean onSingleTapConfirmed(android.view.MotionEvent);
    method public boolean onSingleTapUp(android.view.MotionEvent);
  }

  public class Gravity {
    ctor public Gravity();
    method public static void apply(int, int, int, android.graphics.Rect, android.graphics.Rect);
    method public static void apply(int, int, int, android.graphics.Rect, android.graphics.Rect, int);
    method public static void apply(int, int, int, android.graphics.Rect, int, int, android.graphics.Rect);
    method public static void apply(int, int, int, android.graphics.Rect, int, int, android.graphics.Rect, int);
    method public static void applyDisplay(int, android.graphics.Rect, android.graphics.Rect);
    method public static void applyDisplay(int, android.graphics.Rect, android.graphics.Rect, int);
    method public static int getAbsoluteGravity(int, int);
    method public static boolean isHorizontal(int);
    method public static boolean isVertical(int);
    field public static final int AXIS_CLIP = 8; // 0x8
    field public static final int AXIS_PULL_AFTER = 4; // 0x4
    field public static final int AXIS_PULL_BEFORE = 2; // 0x2
    field public static final int AXIS_SPECIFIED = 1; // 0x1
    field public static final int AXIS_X_SHIFT = 0; // 0x0
    field public static final int AXIS_Y_SHIFT = 4; // 0x4
    field public static final int BOTTOM = 80; // 0x50
    field public static final int CENTER = 17; // 0x11
    field public static final int CENTER_HORIZONTAL = 1; // 0x1
    field public static final int CENTER_VERTICAL = 16; // 0x10
    field public static final int CLIP_HORIZONTAL = 8; // 0x8
    field public static final int CLIP_VERTICAL = 128; // 0x80
    field public static final int DISPLAY_CLIP_HORIZONTAL = 16777216; // 0x1000000
    field public static final int DISPLAY_CLIP_VERTICAL = 268435456; // 0x10000000
    field public static final int END = 8388613; // 0x800005
    field public static final int FILL = 119; // 0x77
    field public static final int FILL_HORIZONTAL = 7; // 0x7
    field public static final int FILL_VERTICAL = 112; // 0x70
    field public static final int HORIZONTAL_GRAVITY_MASK = 7; // 0x7
    field public static final int LEFT = 3; // 0x3
    field public static final int NO_GRAVITY = 0; // 0x0
    field public static final int RELATIVE_HORIZONTAL_GRAVITY_MASK = 8388615; // 0x800007
    field public static final int RELATIVE_LAYOUT_DIRECTION = 8388608; // 0x800000
    field public static final int RIGHT = 5; // 0x5
    field public static final int START = 8388611; // 0x800003
    field public static final int TOP = 48; // 0x30
    field public static final int VERTICAL_GRAVITY_MASK = 112; // 0x70
  }

  public class HapticFeedbackConstants {
    field public static final int CLOCK_TICK = 4; // 0x4
    field public static final int FLAG_IGNORE_GLOBAL_SETTING = 2; // 0x2
    field public static final int FLAG_IGNORE_VIEW_SETTING = 1; // 0x1
    field public static final int KEYBOARD_TAP = 3; // 0x3
    field public static final int LONG_PRESS = 0; // 0x0
    field public static final int VIRTUAL_KEY = 1; // 0x1
  }

  public class InflateException extends java.lang.RuntimeException {
    ctor public InflateException();
    ctor public InflateException(java.lang.String, java.lang.Throwable);
    ctor public InflateException(java.lang.String);
    ctor public InflateException(java.lang.Throwable);
  }

  public final class InputDevice implements android.os.Parcelable {
    method public int describeContents();
    method public int getControllerNumber();
    method public java.lang.String getDescriptor();
    method public static android.view.InputDevice getDevice(int);
    method public static int[] getDeviceIds();
    method public int getId();
    method public android.view.KeyCharacterMap getKeyCharacterMap();
    method public int getKeyboardType();
    method public android.view.InputDevice.MotionRange getMotionRange(int);
    method public android.view.InputDevice.MotionRange getMotionRange(int, int);
    method public java.util.List<android.view.InputDevice.MotionRange> getMotionRanges();
    method public java.lang.String getName();
    method public int getProductId();
    method public int getSources();
    method public int getVendorId();
    method public android.os.Vibrator getVibrator();
    method public boolean[] hasKeys(int...);
    method public boolean hasMic();
    method public boolean isVirtual();
    method public boolean supportsSource(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.InputDevice> CREATOR;
    field public static final int KEYBOARD_TYPE_ALPHABETIC = 2; // 0x2
    field public static final int KEYBOARD_TYPE_NONE = 0; // 0x0
    field public static final int KEYBOARD_TYPE_NON_ALPHABETIC = 1; // 0x1
    field public static final deprecated int MOTION_RANGE_ORIENTATION = 8; // 0x8
    field public static final deprecated int MOTION_RANGE_PRESSURE = 2; // 0x2
    field public static final deprecated int MOTION_RANGE_SIZE = 3; // 0x3
    field public static final deprecated int MOTION_RANGE_TOOL_MAJOR = 6; // 0x6
    field public static final deprecated int MOTION_RANGE_TOOL_MINOR = 7; // 0x7
    field public static final deprecated int MOTION_RANGE_TOUCH_MAJOR = 4; // 0x4
    field public static final deprecated int MOTION_RANGE_TOUCH_MINOR = 5; // 0x5
    field public static final deprecated int MOTION_RANGE_X = 0; // 0x0
    field public static final deprecated int MOTION_RANGE_Y = 1; // 0x1
    field public static final int SOURCE_ANY = -256; // 0xffffff00
    field public static final int SOURCE_CLASS_BUTTON = 1; // 0x1
    field public static final int SOURCE_CLASS_JOYSTICK = 16; // 0x10
    field public static final int SOURCE_CLASS_MASK = 255; // 0xff
    field public static final int SOURCE_CLASS_NONE = 0; // 0x0
    field public static final int SOURCE_CLASS_POINTER = 2; // 0x2
    field public static final int SOURCE_CLASS_POSITION = 8; // 0x8
    field public static final int SOURCE_CLASS_TRACKBALL = 4; // 0x4
    field public static final int SOURCE_DPAD = 513; // 0x201
    field public static final int SOURCE_GAMEPAD = 1025; // 0x401
    field public static final int SOURCE_HDMI = 33554433; // 0x2000001
    field public static final int SOURCE_JOYSTICK = 16777232; // 0x1000010
    field public static final int SOURCE_KEYBOARD = 257; // 0x101
    field public static final int SOURCE_MOUSE = 8194; // 0x2002
    field public static final int SOURCE_STYLUS = 16386; // 0x4002
    field public static final int SOURCE_TOUCHPAD = 1048584; // 0x100008
    field public static final int SOURCE_TOUCHSCREEN = 4098; // 0x1002
    field public static final int SOURCE_TOUCH_NAVIGATION = 2097152; // 0x200000
    field public static final int SOURCE_TRACKBALL = 65540; // 0x10004
    field public static final int SOURCE_UNKNOWN = 0; // 0x0
  }

  public static final class InputDevice.MotionRange {
    method public int getAxis();
    method public float getFlat();
    method public float getFuzz();
    method public float getMax();
    method public float getMin();
    method public float getRange();
    method public float getResolution();
    method public int getSource();
    method public boolean isFromSource(int);
  }

  public abstract class InputEvent implements android.os.Parcelable {
    method public int describeContents();
    method public final android.view.InputDevice getDevice();
    method public abstract int getDeviceId();
    method public abstract long getEventTime();
    method public abstract int getSource();
    method public boolean isFromSource(int);
    field public static final android.os.Parcelable.Creator<android.view.InputEvent> CREATOR;
  }

  public final class InputQueue {
  }

  public static abstract interface InputQueue.Callback {
    method public abstract void onInputQueueCreated(android.view.InputQueue);
    method public abstract void onInputQueueDestroyed(android.view.InputQueue);
  }

  public class KeyCharacterMap implements android.os.Parcelable {
    method public int describeContents();
    method public static boolean deviceHasKey(int);
    method public static boolean[] deviceHasKeys(int[]);
    method public int get(int, int);
    method public static int getDeadChar(int, int);
    method public char getDisplayLabel(int);
    method public android.view.KeyEvent[] getEvents(char[]);
    method public deprecated boolean getKeyData(int, android.view.KeyCharacterMap.KeyData);
    method public int getKeyboardType();
    method public char getMatch(int, char[]);
    method public char getMatch(int, char[], int);
    method public int getModifierBehavior();
    method public char getNumber(int);
    method public boolean isPrintingKey(int);
    method public static android.view.KeyCharacterMap load(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ALPHA = 3; // 0x3
    field public static final deprecated int BUILT_IN_KEYBOARD = 0; // 0x0
    field public static final int COMBINING_ACCENT = -2147483648; // 0x80000000
    field public static final int COMBINING_ACCENT_MASK = 2147483647; // 0x7fffffff
    field public static final android.os.Parcelable.Creator<android.view.KeyCharacterMap> CREATOR;
    field public static final int FULL = 4; // 0x4
    field public static final char HEX_INPUT = 61184; // 0xef00 '\uef00'
    field public static final int MODIFIER_BEHAVIOR_CHORDED = 0; // 0x0
    field public static final int MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED = 1; // 0x1
    field public static final int NUMERIC = 1; // 0x1
    field public static final char PICKER_DIALOG_INPUT = 61185; // 0xef01 '\uef01'
    field public static final int PREDICTIVE = 2; // 0x2
    field public static final int SPECIAL_FUNCTION = 5; // 0x5
    field public static final int VIRTUAL_KEYBOARD = -1; // 0xffffffff
  }

  public static deprecated class KeyCharacterMap.KeyData {
    ctor public KeyCharacterMap.KeyData();
    field public static final int META_LENGTH = 4; // 0x4
    field public char displayLabel;
    field public char[] meta;
    field public char number;
  }

  public static class KeyCharacterMap.UnavailableException extends android.util.AndroidRuntimeException {
    ctor public KeyCharacterMap.UnavailableException(java.lang.String);
  }

  public class KeyEvent extends android.view.InputEvent implements android.os.Parcelable {
    ctor public KeyEvent(int, int);
    ctor public KeyEvent(long, long, int, int, int);
    ctor public KeyEvent(long, long, int, int, int, int);
    ctor public KeyEvent(long, long, int, int, int, int, int, int);
    ctor public KeyEvent(long, long, int, int, int, int, int, int, int);
    ctor public KeyEvent(long, long, int, int, int, int, int, int, int, int);
    ctor public KeyEvent(long, java.lang.String, int, int);
    ctor public KeyEvent(android.view.KeyEvent);
    ctor public deprecated KeyEvent(android.view.KeyEvent, long, int);
    method public static android.view.KeyEvent changeAction(android.view.KeyEvent, int);
    method public static android.view.KeyEvent changeFlags(android.view.KeyEvent, int);
    method public static android.view.KeyEvent changeTimeRepeat(android.view.KeyEvent, long, int);
    method public static android.view.KeyEvent changeTimeRepeat(android.view.KeyEvent, long, int, int);
    method public final deprecated boolean dispatch(android.view.KeyEvent.Callback);
    method public final boolean dispatch(android.view.KeyEvent.Callback, android.view.KeyEvent.DispatcherState, java.lang.Object);
    method public final int getAction();
    method public final java.lang.String getCharacters();
    method public static int getDeadChar(int, int);
    method public final int getDeviceId();
    method public char getDisplayLabel();
    method public final long getDownTime();
    method public final long getEventTime();
    method public final int getFlags();
    method public final android.view.KeyCharacterMap getKeyCharacterMap();
    method public final int getKeyCode();
    method public deprecated boolean getKeyData(android.view.KeyCharacterMap.KeyData);
    method public char getMatch(char[]);
    method public char getMatch(char[], int);
    method public static int getMaxKeyCode();
    method public final int getMetaState();
    method public static int getModifierMetaStateMask();
    method public final int getModifiers();
    method public char getNumber();
    method public final int getRepeatCount();
    method public final int getScanCode();
    method public final int getSource();
    method public int getUnicodeChar();
    method public int getUnicodeChar(int);
    method public final boolean hasModifiers(int);
    method public final boolean hasNoModifiers();
    method public final boolean isAltPressed();
    method public final boolean isCanceled();
    method public final boolean isCapsLockOn();
    method public final boolean isCtrlPressed();
    method public final boolean isFunctionPressed();
    method public static final boolean isGamepadButton(int);
    method public final boolean isLongPress();
    method public final boolean isMetaPressed();
    method public static boolean isModifierKey(int);
    method public final boolean isNumLockOn();
    method public boolean isPrintingKey();
    method public final boolean isScrollLockOn();
    method public final boolean isShiftPressed();
    method public final boolean isSymPressed();
    method public final boolean isSystem();
    method public final boolean isTracking();
    method public static int keyCodeFromString(java.lang.String);
    method public static java.lang.String keyCodeToString(int);
    method public static boolean metaStateHasModifiers(int, int);
    method public static boolean metaStateHasNoModifiers(int);
    method public static int normalizeMetaState(int);
    method public final void setSource(int);
    method public final void startTracking();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ACTION_DOWN = 0; // 0x0
    field public static final int ACTION_MULTIPLE = 2; // 0x2
    field public static final int ACTION_UP = 1; // 0x1
    field public static final android.os.Parcelable.Creator<android.view.KeyEvent> CREATOR;
    field public static final int FLAG_CANCELED = 32; // 0x20
    field public static final int FLAG_CANCELED_LONG_PRESS = 256; // 0x100
    field public static final int FLAG_EDITOR_ACTION = 16; // 0x10
    field public static final int FLAG_FALLBACK = 1024; // 0x400
    field public static final int FLAG_FROM_SYSTEM = 8; // 0x8
    field public static final int FLAG_KEEP_TOUCH_MODE = 4; // 0x4
    field public static final int FLAG_LONG_PRESS = 128; // 0x80
    field public static final int FLAG_SOFT_KEYBOARD = 2; // 0x2
    field public static final int FLAG_TRACKING = 512; // 0x200
    field public static final int FLAG_VIRTUAL_HARD_KEY = 64; // 0x40
    field public static final deprecated int FLAG_WOKE_HERE = 1; // 0x1
    field public static final int KEYCODE_0 = 7; // 0x7
    field public static final int KEYCODE_1 = 8; // 0x8
    field public static final int KEYCODE_11 = 227; // 0xe3
    field public static final int KEYCODE_12 = 228; // 0xe4
    field public static final int KEYCODE_2 = 9; // 0x9
    field public static final int KEYCODE_3 = 10; // 0xa
    field public static final int KEYCODE_3D_MODE = 206; // 0xce
    field public static final int KEYCODE_4 = 11; // 0xb
    field public static final int KEYCODE_5 = 12; // 0xc
    field public static final int KEYCODE_6 = 13; // 0xd
    field public static final int KEYCODE_7 = 14; // 0xe
    field public static final int KEYCODE_8 = 15; // 0xf
    field public static final int KEYCODE_9 = 16; // 0x10
    field public static final int KEYCODE_A = 29; // 0x1d
    field public static final int KEYCODE_ALT_LEFT = 57; // 0x39
    field public static final int KEYCODE_ALT_RIGHT = 58; // 0x3a
    field public static final int KEYCODE_APOSTROPHE = 75; // 0x4b
    field public static final int KEYCODE_APP_SWITCH = 187; // 0xbb
    field public static final int KEYCODE_ASSIST = 219; // 0xdb
    field public static final int KEYCODE_AT = 77; // 0x4d
    field public static final int KEYCODE_AVR_INPUT = 182; // 0xb6
    field public static final int KEYCODE_AVR_POWER = 181; // 0xb5
    field public static final int KEYCODE_B = 30; // 0x1e
    field public static final int KEYCODE_BACK = 4; // 0x4
    field public static final int KEYCODE_BACKSLASH = 73; // 0x49
    field public static final int KEYCODE_BOOKMARK = 174; // 0xae
    field public static final int KEYCODE_BREAK = 121; // 0x79
    field public static final int KEYCODE_BRIGHTNESS_DOWN = 220; // 0xdc
    field public static final int KEYCODE_BRIGHTNESS_UP = 221; // 0xdd
    field public static final int KEYCODE_BUTTON_1 = 188; // 0xbc
    field public static final int KEYCODE_BUTTON_10 = 197; // 0xc5
    field public static final int KEYCODE_BUTTON_11 = 198; // 0xc6
    field public static final int KEYCODE_BUTTON_12 = 199; // 0xc7
    field public static final int KEYCODE_BUTTON_13 = 200; // 0xc8
    field public static final int KEYCODE_BUTTON_14 = 201; // 0xc9
    field public static final int KEYCODE_BUTTON_15 = 202; // 0xca
    field public static final int KEYCODE_BUTTON_16 = 203; // 0xcb
    field public static final int KEYCODE_BUTTON_2 = 189; // 0xbd
    field public static final int KEYCODE_BUTTON_3 = 190; // 0xbe
    field public static final int KEYCODE_BUTTON_4 = 191; // 0xbf
    field public static final int KEYCODE_BUTTON_5 = 192; // 0xc0
    field public static final int KEYCODE_BUTTON_6 = 193; // 0xc1
    field public static final int KEYCODE_BUTTON_7 = 194; // 0xc2
    field public static final int KEYCODE_BUTTON_8 = 195; // 0xc3
    field public static final int KEYCODE_BUTTON_9 = 196; // 0xc4
    field public static final int KEYCODE_BUTTON_A = 96; // 0x60
    field public static final int KEYCODE_BUTTON_B = 97; // 0x61
    field public static final int KEYCODE_BUTTON_C = 98; // 0x62
    field public static final int KEYCODE_BUTTON_L1 = 102; // 0x66
    field public static final int KEYCODE_BUTTON_L2 = 104; // 0x68
    field public static final int KEYCODE_BUTTON_MODE = 110; // 0x6e
    field public static final int KEYCODE_BUTTON_R1 = 103; // 0x67
    field public static final int KEYCODE_BUTTON_R2 = 105; // 0x69
    field public static final int KEYCODE_BUTTON_SELECT = 109; // 0x6d
    field public static final int KEYCODE_BUTTON_START = 108; // 0x6c
    field public static final int KEYCODE_BUTTON_THUMBL = 106; // 0x6a
    field public static final int KEYCODE_BUTTON_THUMBR = 107; // 0x6b
    field public static final int KEYCODE_BUTTON_X = 99; // 0x63
    field public static final int KEYCODE_BUTTON_Y = 100; // 0x64
    field public static final int KEYCODE_BUTTON_Z = 101; // 0x65
    field public static final int KEYCODE_C = 31; // 0x1f
    field public static final int KEYCODE_CALCULATOR = 210; // 0xd2
    field public static final int KEYCODE_CALENDAR = 208; // 0xd0
    field public static final int KEYCODE_CALL = 5; // 0x5
    field public static final int KEYCODE_CAMERA = 27; // 0x1b
    field public static final int KEYCODE_CAPS_LOCK = 115; // 0x73
    field public static final int KEYCODE_CAPTIONS = 175; // 0xaf
    field public static final int KEYCODE_CHANNEL_DOWN = 167; // 0xa7
    field public static final int KEYCODE_CHANNEL_UP = 166; // 0xa6
    field public static final int KEYCODE_CLEAR = 28; // 0x1c
    field public static final int KEYCODE_COMMA = 55; // 0x37
    field public static final int KEYCODE_CONTACTS = 207; // 0xcf
    field public static final int KEYCODE_CTRL_LEFT = 113; // 0x71
    field public static final int KEYCODE_CTRL_RIGHT = 114; // 0x72
    field public static final int KEYCODE_D = 32; // 0x20
    field public static final int KEYCODE_DEL = 67; // 0x43
    field public static final int KEYCODE_DPAD_CENTER = 23; // 0x17
    field public static final int KEYCODE_DPAD_DOWN = 20; // 0x14
    field public static final int KEYCODE_DPAD_LEFT = 21; // 0x15
    field public static final int KEYCODE_DPAD_RIGHT = 22; // 0x16
    field public static final int KEYCODE_DPAD_UP = 19; // 0x13
    field public static final int KEYCODE_DVR = 173; // 0xad
    field public static final int KEYCODE_E = 33; // 0x21
    field public static final int KEYCODE_EISU = 212; // 0xd4
    field public static final int KEYCODE_ENDCALL = 6; // 0x6
    field public static final int KEYCODE_ENTER = 66; // 0x42
    field public static final int KEYCODE_ENVELOPE = 65; // 0x41
    field public static final int KEYCODE_EQUALS = 70; // 0x46
    field public static final int KEYCODE_ESCAPE = 111; // 0x6f
    field public static final int KEYCODE_EXPLORER = 64; // 0x40
    field public static final int KEYCODE_F = 34; // 0x22
    field public static final int KEYCODE_F1 = 131; // 0x83
    field public static final int KEYCODE_F10 = 140; // 0x8c
    field public static final int KEYCODE_F11 = 141; // 0x8d
    field public static final int KEYCODE_F12 = 142; // 0x8e
    field public static final int KEYCODE_F2 = 132; // 0x84
    field public static final int KEYCODE_F3 = 133; // 0x85
    field public static final int KEYCODE_F4 = 134; // 0x86
    field public static final int KEYCODE_F5 = 135; // 0x87
    field public static final int KEYCODE_F6 = 136; // 0x88
    field public static final int KEYCODE_F7 = 137; // 0x89
    field public static final int KEYCODE_F8 = 138; // 0x8a
    field public static final int KEYCODE_F9 = 139; // 0x8b
    field public static final int KEYCODE_FOCUS = 80; // 0x50
    field public static final int KEYCODE_FORWARD = 125; // 0x7d
    field public static final int KEYCODE_FORWARD_DEL = 112; // 0x70
    field public static final int KEYCODE_FUNCTION = 119; // 0x77
    field public static final int KEYCODE_G = 35; // 0x23
    field public static final int KEYCODE_GRAVE = 68; // 0x44
    field public static final int KEYCODE_GUIDE = 172; // 0xac
    field public static final int KEYCODE_H = 36; // 0x24
    field public static final int KEYCODE_HEADSETHOOK = 79; // 0x4f
    field public static final int KEYCODE_HELP = 259; // 0x103
    field public static final int KEYCODE_HENKAN = 214; // 0xd6
    field public static final int KEYCODE_HOME = 3; // 0x3
    field public static final int KEYCODE_I = 37; // 0x25
    field public static final int KEYCODE_INFO = 165; // 0xa5
    field public static final int KEYCODE_INSERT = 124; // 0x7c
    field public static final int KEYCODE_J = 38; // 0x26
    field public static final int KEYCODE_K = 39; // 0x27
    field public static final int KEYCODE_KANA = 218; // 0xda
    field public static final int KEYCODE_KATAKANA_HIRAGANA = 215; // 0xd7
    field public static final int KEYCODE_L = 40; // 0x28
    field public static final int KEYCODE_LANGUAGE_SWITCH = 204; // 0xcc
    field public static final int KEYCODE_LAST_CHANNEL = 229; // 0xe5
    field public static final int KEYCODE_LEFT_BRACKET = 71; // 0x47
    field public static final int KEYCODE_M = 41; // 0x29
    field public static final int KEYCODE_MANNER_MODE = 205; // 0xcd
    field public static final int KEYCODE_MEDIA_AUDIO_TRACK = 222; // 0xde
    field public static final int KEYCODE_MEDIA_CLOSE = 128; // 0x80
    field public static final int KEYCODE_MEDIA_EJECT = 129; // 0x81
    field public static final int KEYCODE_MEDIA_FAST_FORWARD = 90; // 0x5a
    field public static final int KEYCODE_MEDIA_NEXT = 87; // 0x57
    field public static final int KEYCODE_MEDIA_PAUSE = 127; // 0x7f
    field public static final int KEYCODE_MEDIA_PLAY = 126; // 0x7e
    field public static final int KEYCODE_MEDIA_PLAY_PAUSE = 85; // 0x55
    field public static final int KEYCODE_MEDIA_PREVIOUS = 88; // 0x58
    field public static final int KEYCODE_MEDIA_RECORD = 130; // 0x82
    field public static final int KEYCODE_MEDIA_REWIND = 89; // 0x59
    field public static final int KEYCODE_MEDIA_STOP = 86; // 0x56
    field public static final int KEYCODE_MEDIA_TOP_MENU = 226; // 0xe2
    field public static final int KEYCODE_MENU = 82; // 0x52
    field public static final int KEYCODE_META_LEFT = 117; // 0x75
    field public static final int KEYCODE_META_RIGHT = 118; // 0x76
    field public static final int KEYCODE_MINUS = 69; // 0x45
    field public static final int KEYCODE_MOVE_END = 123; // 0x7b
    field public static final int KEYCODE_MOVE_HOME = 122; // 0x7a
    field public static final int KEYCODE_MUHENKAN = 213; // 0xd5
    field public static final int KEYCODE_MUSIC = 209; // 0xd1
    field public static final int KEYCODE_MUTE = 91; // 0x5b
    field public static final int KEYCODE_N = 42; // 0x2a
    field public static final int KEYCODE_NOTIFICATION = 83; // 0x53
    field public static final int KEYCODE_NUM = 78; // 0x4e
    field public static final int KEYCODE_NUMPAD_0 = 144; // 0x90
    field public static final int KEYCODE_NUMPAD_1 = 145; // 0x91
    field public static final int KEYCODE_NUMPAD_2 = 146; // 0x92
    field public static final int KEYCODE_NUMPAD_3 = 147; // 0x93
    field public static final int KEYCODE_NUMPAD_4 = 148; // 0x94
    field public static final int KEYCODE_NUMPAD_5 = 149; // 0x95
    field public static final int KEYCODE_NUMPAD_6 = 150; // 0x96
    field public static final int KEYCODE_NUMPAD_7 = 151; // 0x97
    field public static final int KEYCODE_NUMPAD_8 = 152; // 0x98
    field public static final int KEYCODE_NUMPAD_9 = 153; // 0x99
    field public static final int KEYCODE_NUMPAD_ADD = 157; // 0x9d
    field public static final int KEYCODE_NUMPAD_COMMA = 159; // 0x9f
    field public static final int KEYCODE_NUMPAD_DIVIDE = 154; // 0x9a
    field public static final int KEYCODE_NUMPAD_DOT = 158; // 0x9e
    field public static final int KEYCODE_NUMPAD_ENTER = 160; // 0xa0
    field public static final int KEYCODE_NUMPAD_EQUALS = 161; // 0xa1
    field public static final int KEYCODE_NUMPAD_LEFT_PAREN = 162; // 0xa2
    field public static final int KEYCODE_NUMPAD_MULTIPLY = 155; // 0x9b
    field public static final int KEYCODE_NUMPAD_RIGHT_PAREN = 163; // 0xa3
    field public static final int KEYCODE_NUMPAD_SUBTRACT = 156; // 0x9c
    field public static final int KEYCODE_NUM_LOCK = 143; // 0x8f
    field public static final int KEYCODE_O = 43; // 0x2b
    field public static final int KEYCODE_P = 44; // 0x2c
    field public static final int KEYCODE_PAGE_DOWN = 93; // 0x5d
    field public static final int KEYCODE_PAGE_UP = 92; // 0x5c
    field public static final int KEYCODE_PAIRING = 225; // 0xe1
    field public static final int KEYCODE_PERIOD = 56; // 0x38
    field public static final int KEYCODE_PICTSYMBOLS = 94; // 0x5e
    field public static final int KEYCODE_PLUS = 81; // 0x51
    field public static final int KEYCODE_POUND = 18; // 0x12
    field public static final int KEYCODE_POWER = 26; // 0x1a
    field public static final int KEYCODE_PROG_BLUE = 186; // 0xba
    field public static final int KEYCODE_PROG_GREEN = 184; // 0xb8
    field public static final int KEYCODE_PROG_RED = 183; // 0xb7
    field public static final int KEYCODE_PROG_YELLOW = 185; // 0xb9
    field public static final int KEYCODE_Q = 45; // 0x2d
    field public static final int KEYCODE_R = 46; // 0x2e
    field public static final int KEYCODE_RIGHT_BRACKET = 72; // 0x48
    field public static final int KEYCODE_RO = 217; // 0xd9
    field public static final int KEYCODE_S = 47; // 0x2f
    field public static final int KEYCODE_SCROLL_LOCK = 116; // 0x74
    field public static final int KEYCODE_SEARCH = 84; // 0x54
    field public static final int KEYCODE_SEMICOLON = 74; // 0x4a
    field public static final int KEYCODE_SETTINGS = 176; // 0xb0
    field public static final int KEYCODE_SHIFT_LEFT = 59; // 0x3b
    field public static final int KEYCODE_SHIFT_RIGHT = 60; // 0x3c
    field public static final int KEYCODE_SLASH = 76; // 0x4c
    field public static final int KEYCODE_SLEEP = 223; // 0xdf
    field public static final int KEYCODE_SOFT_LEFT = 1; // 0x1
    field public static final int KEYCODE_SOFT_RIGHT = 2; // 0x2
    field public static final int KEYCODE_SPACE = 62; // 0x3e
    field public static final int KEYCODE_STAR = 17; // 0x11
    field public static final int KEYCODE_STB_INPUT = 180; // 0xb4
    field public static final int KEYCODE_STB_POWER = 179; // 0xb3
    field public static final int KEYCODE_SWITCH_CHARSET = 95; // 0x5f
    field public static final int KEYCODE_SYM = 63; // 0x3f
    field public static final int KEYCODE_SYSRQ = 120; // 0x78
    field public static final int KEYCODE_T = 48; // 0x30
    field public static final int KEYCODE_TAB = 61; // 0x3d
    field public static final int KEYCODE_TV = 170; // 0xaa
    field public static final int KEYCODE_TV_ANTENNA_CABLE = 242; // 0xf2
    field public static final int KEYCODE_TV_AUDIO_DESCRIPTION = 252; // 0xfc
    field public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254; // 0xfe
    field public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253; // 0xfd
    field public static final int KEYCODE_TV_CONTENTS_MENU = 256; // 0x100
    field public static final int KEYCODE_TV_DATA_SERVICE = 230; // 0xe6
    field public static final int KEYCODE_TV_INPUT = 178; // 0xb2
    field public static final int KEYCODE_TV_INPUT_COMPONENT_1 = 249; // 0xf9
    field public static final int KEYCODE_TV_INPUT_COMPONENT_2 = 250; // 0xfa
    field public static final int KEYCODE_TV_INPUT_COMPOSITE_1 = 247; // 0xf7
    field public static final int KEYCODE_TV_INPUT_COMPOSITE_2 = 248; // 0xf8
    field public static final int KEYCODE_TV_INPUT_HDMI_1 = 243; // 0xf3
    field public static final int KEYCODE_TV_INPUT_HDMI_2 = 244; // 0xf4
    field public static final int KEYCODE_TV_INPUT_HDMI_3 = 245; // 0xf5
    field public static final int KEYCODE_TV_INPUT_HDMI_4 = 246; // 0xf6
    field public static final int KEYCODE_TV_INPUT_VGA_1 = 251; // 0xfb
    field public static final int KEYCODE_TV_MEDIA_CONTEXT_MENU = 257; // 0x101
    field public static final int KEYCODE_TV_NETWORK = 241; // 0xf1
    field public static final int KEYCODE_TV_NUMBER_ENTRY = 234; // 0xea
    field public static final int KEYCODE_TV_POWER = 177; // 0xb1
    field public static final int KEYCODE_TV_RADIO_SERVICE = 232; // 0xe8
    field public static final int KEYCODE_TV_SATELLITE = 237; // 0xed
    field public static final int KEYCODE_TV_SATELLITE_BS = 238; // 0xee
    field public static final int KEYCODE_TV_SATELLITE_CS = 239; // 0xef
    field public static final int KEYCODE_TV_SATELLITE_SERVICE = 240; // 0xf0
    field public static final int KEYCODE_TV_TELETEXT = 233; // 0xe9
    field public static final int KEYCODE_TV_TERRESTRIAL_ANALOG = 235; // 0xeb
    field public static final int KEYCODE_TV_TERRESTRIAL_DIGITAL = 236; // 0xec
    field public static final int KEYCODE_TV_TIMER_PROGRAMMING = 258; // 0x102
    field public static final int KEYCODE_TV_ZOOM_MODE = 255; // 0xff
    field public static final int KEYCODE_U = 49; // 0x31
    field public static final int KEYCODE_UNKNOWN = 0; // 0x0
    field public static final int KEYCODE_V = 50; // 0x32
    field public static final int KEYCODE_VOICE_ASSIST = 231; // 0xe7
    field public static final int KEYCODE_VOLUME_DOWN = 25; // 0x19
    field public static final int KEYCODE_VOLUME_MUTE = 164; // 0xa4
    field public static final int KEYCODE_VOLUME_UP = 24; // 0x18
    field public static final int KEYCODE_W = 51; // 0x33
    field public static final int KEYCODE_WAKEUP = 224; // 0xe0
    field public static final int KEYCODE_WINDOW = 171; // 0xab
    field public static final int KEYCODE_X = 52; // 0x34
    field public static final int KEYCODE_Y = 53; // 0x35
    field public static final int KEYCODE_YEN = 216; // 0xd8
    field public static final int KEYCODE_Z = 54; // 0x36
    field public static final int KEYCODE_ZENKAKU_HANKAKU = 211; // 0xd3
    field public static final int KEYCODE_ZOOM_IN = 168; // 0xa8
    field public static final int KEYCODE_ZOOM_OUT = 169; // 0xa9
    field public static final deprecated int MAX_KEYCODE = 84; // 0x54
    field public static final int META_ALT_LEFT_ON = 16; // 0x10
    field public static final int META_ALT_MASK = 50; // 0x32
    field public static final int META_ALT_ON = 2; // 0x2
    field public static final int META_ALT_RIGHT_ON = 32; // 0x20
    field public static final int META_CAPS_LOCK_ON = 1048576; // 0x100000
    field public static final int META_CTRL_LEFT_ON = 8192; // 0x2000
    field public static final int META_CTRL_MASK = 28672; // 0x7000
    field public static final int META_CTRL_ON = 4096; // 0x1000
    field public static final int META_CTRL_RIGHT_ON = 16384; // 0x4000
    field public static final int META_FUNCTION_ON = 8; // 0x8
    field public static final int META_META_LEFT_ON = 131072; // 0x20000
    field public static final int META_META_MASK = 458752; // 0x70000
    field public static final int META_META_ON = 65536; // 0x10000
    field public static final int META_META_RIGHT_ON = 262144; // 0x40000
    field public static final int META_NUM_LOCK_ON = 2097152; // 0x200000
    field public static final int META_SCROLL_LOCK_ON = 4194304; // 0x400000
    field public static final int META_SHIFT_LEFT_ON = 64; // 0x40
    field public static final int META_SHIFT_MASK = 193; // 0xc1
    field public static final int META_SHIFT_ON = 1; // 0x1
    field public static final int META_SHIFT_RIGHT_ON = 128; // 0x80
    field public static final int META_SYM_ON = 4; // 0x4
  }

  public static abstract interface KeyEvent.Callback {
    method public abstract boolean onKeyDown(int, android.view.KeyEvent);
    method public abstract boolean onKeyLongPress(int, android.view.KeyEvent);
    method public abstract boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public abstract boolean onKeyUp(int, android.view.KeyEvent);
  }

  public static class KeyEvent.DispatcherState {
    ctor public KeyEvent.DispatcherState();
    method public void handleUpEvent(android.view.KeyEvent);
    method public boolean isTracking(android.view.KeyEvent);
    method public void performedLongPress(android.view.KeyEvent);
    method public void reset();
    method public void reset(java.lang.Object);
    method public void startTracking(android.view.KeyEvent, java.lang.Object);
  }

  public abstract class LayoutInflater {
    ctor protected LayoutInflater(android.content.Context);
    ctor protected LayoutInflater(android.view.LayoutInflater, android.content.Context);
    method public abstract android.view.LayoutInflater cloneInContext(android.content.Context);
    method public final android.view.View createView(java.lang.String, java.lang.String, android.util.AttributeSet) throws java.lang.ClassNotFoundException, android.view.InflateException;
    method public static android.view.LayoutInflater from(android.content.Context);
    method public android.content.Context getContext();
    method public final android.view.LayoutInflater.Factory getFactory();
    method public final android.view.LayoutInflater.Factory2 getFactory2();
    method public android.view.LayoutInflater.Filter getFilter();
    method public android.view.View inflate(int, android.view.ViewGroup);
    method public android.view.View inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup);
    method public android.view.View inflate(int, android.view.ViewGroup, boolean);
    method public android.view.View inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean);
    method protected android.view.View onCreateView(java.lang.String, android.util.AttributeSet) throws java.lang.ClassNotFoundException;
    method protected android.view.View onCreateView(android.view.View, java.lang.String, android.util.AttributeSet) throws java.lang.ClassNotFoundException;
    method public void setFactory(android.view.LayoutInflater.Factory);
    method public void setFactory2(android.view.LayoutInflater.Factory2);
    method public void setFilter(android.view.LayoutInflater.Filter);
  }

  public static abstract interface LayoutInflater.Factory {
    method public abstract android.view.View onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet);
  }

  public static abstract interface LayoutInflater.Factory2 implements android.view.LayoutInflater.Factory {
    method public abstract android.view.View onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet);
  }

  public static abstract interface LayoutInflater.Filter {
    method public abstract boolean onLoadClass(java.lang.Class);
  }

  public abstract interface Menu {
    method public abstract android.view.MenuItem add(java.lang.CharSequence);
    method public abstract android.view.MenuItem add(int);
    method public abstract android.view.MenuItem add(int, int, int, java.lang.CharSequence);
    method public abstract android.view.MenuItem add(int, int, int, int);
    method public abstract int addIntentOptions(int, int, int, android.content.ComponentName, android.content.Intent[], android.content.Intent, int, android.view.MenuItem[]);
    method public abstract android.view.SubMenu addSubMenu(java.lang.CharSequence);
    method public abstract android.view.SubMenu addSubMenu(int);
    method public abstract android.view.SubMenu addSubMenu(int, int, int, java.lang.CharSequence);
    method public abstract android.view.SubMenu addSubMenu(int, int, int, int);
    method public abstract void clear();
    method public abstract void close();
    method public abstract android.view.MenuItem findItem(int);
    method public abstract android.view.MenuItem getItem(int);
    method public abstract boolean hasVisibleItems();
    method public abstract boolean isShortcutKey(int, android.view.KeyEvent);
    method public abstract boolean performIdentifierAction(int, int);
    method public abstract boolean performShortcut(int, android.view.KeyEvent, int);
    method public abstract void removeGroup(int);
    method public abstract void removeItem(int);
    method public abstract void setGroupCheckable(int, boolean, boolean);
    method public abstract void setGroupEnabled(int, boolean);
    method public abstract void setGroupVisible(int, boolean);
    method public abstract void setQwertyMode(boolean);
    method public abstract int size();
    field public static final int CATEGORY_ALTERNATIVE = 262144; // 0x40000
    field public static final int CATEGORY_CONTAINER = 65536; // 0x10000
    field public static final int CATEGORY_SECONDARY = 196608; // 0x30000
    field public static final int CATEGORY_SYSTEM = 131072; // 0x20000
    field public static final int FIRST = 1; // 0x1
    field public static final int FLAG_ALWAYS_PERFORM_CLOSE = 2; // 0x2
    field public static final int FLAG_APPEND_TO_GROUP = 1; // 0x1
    field public static final int FLAG_PERFORM_NO_CLOSE = 1; // 0x1
    field public static final int NONE = 0; // 0x0
  }

  public class MenuInflater {
    ctor public MenuInflater(android.content.Context);
    method public void inflate(int, android.view.Menu);
  }

  public abstract interface MenuItem {
    method public abstract boolean collapseActionView();
    method public abstract boolean expandActionView();
    method public abstract android.view.ActionProvider getActionProvider();
    method public abstract android.view.View getActionView();
    method public abstract char getAlphabeticShortcut();
    method public abstract int getGroupId();
    method public abstract android.graphics.drawable.Drawable getIcon();
    method public abstract android.content.Intent getIntent();
    method public abstract int getItemId();
    method public abstract android.view.ContextMenu.ContextMenuInfo getMenuInfo();
    method public abstract char getNumericShortcut();
    method public abstract int getOrder();
    method public abstract android.view.SubMenu getSubMenu();
    method public abstract java.lang.CharSequence getTitle();
    method public abstract java.lang.CharSequence getTitleCondensed();
    method public abstract boolean hasSubMenu();
    method public abstract boolean isActionViewExpanded();
    method public abstract boolean isCheckable();
    method public abstract boolean isChecked();
    method public abstract boolean isEnabled();
    method public abstract boolean isVisible();
    method public abstract android.view.MenuItem setActionProvider(android.view.ActionProvider);
    method public abstract android.view.MenuItem setActionView(android.view.View);
    method public abstract android.view.MenuItem setActionView(int);
    method public abstract android.view.MenuItem setAlphabeticShortcut(char);
    method public abstract android.view.MenuItem setCheckable(boolean);
    method public abstract android.view.MenuItem setChecked(boolean);
    method public abstract android.view.MenuItem setEnabled(boolean);
    method public abstract android.view.MenuItem setIcon(android.graphics.drawable.Drawable);
    method public abstract android.view.MenuItem setIcon(int);
    method public abstract android.view.MenuItem setIconTintList(android.content.res.ColorStateList);
    method public abstract android.view.MenuItem setIconTintMode(android.graphics.PorterDuff.Mode);
    method public abstract android.view.MenuItem setIntent(android.content.Intent);
    method public abstract android.view.MenuItem setNumericShortcut(char);
    method public abstract android.view.MenuItem setOnActionExpandListener(android.view.MenuItem.OnActionExpandListener);
    method public abstract android.view.MenuItem setOnMenuItemClickListener(android.view.MenuItem.OnMenuItemClickListener);
    method public abstract android.view.MenuItem setShortcut(char, char);
    method public abstract void setShowAsAction(int);
    method public abstract android.view.MenuItem setShowAsActionFlags(int);
    method public abstract android.view.MenuItem setTitle(java.lang.CharSequence);
    method public abstract android.view.MenuItem setTitle(int);
    method public abstract android.view.MenuItem setTitleCondensed(java.lang.CharSequence);
    method public abstract android.view.MenuItem setVisible(boolean);
    field public static final int SHOW_AS_ACTION_ALWAYS = 2; // 0x2
    field public static final int SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW = 8; // 0x8
    field public static final int SHOW_AS_ACTION_IF_ROOM = 1; // 0x1
    field public static final int SHOW_AS_ACTION_NEVER = 0; // 0x0
    field public static final int SHOW_AS_ACTION_WITH_TEXT = 4; // 0x4
  }

  public static abstract interface MenuItem.OnActionExpandListener {
    method public abstract boolean onMenuItemActionCollapse(android.view.MenuItem);
    method public abstract boolean onMenuItemActionExpand(android.view.MenuItem);
  }

  public static abstract interface MenuItem.OnMenuItemClickListener {
    method public abstract boolean onMenuItemClick(android.view.MenuItem);
  }

  public final class MotionEvent extends android.view.InputEvent implements android.os.Parcelable {
    method public static java.lang.String actionToString(int);
    method public final void addBatch(long, float, float, float, float, int);
    method public final void addBatch(long, android.view.MotionEvent.PointerCoords[], int);
    method public static int axisFromString(java.lang.String);
    method public static java.lang.String axisToString(int);
    method public final int findPointerIndex(int);
    method public final int getAction();
    method public final int getActionIndex();
    method public final int getActionMasked();
    method public final float getAxisValue(int);
    method public final float getAxisValue(int, int);
    method public final int getButtonState();
    method public final int getDeviceId();
    method public final long getDownTime();
    method public final int getEdgeFlags();
    method public final long getEventTime();
    method public final int getFlags();
    method public final float getHistoricalAxisValue(int, int);
    method public final float getHistoricalAxisValue(int, int, int);
    method public final long getHistoricalEventTime(int);
    method public final float getHistoricalOrientation(int);
    method public final float getHistoricalOrientation(int, int);
    method public final void getHistoricalPointerCoords(int, int, android.view.MotionEvent.PointerCoords);
    method public final float getHistoricalPressure(int);
    method public final float getHistoricalPressure(int, int);
    method public final float getHistoricalSize(int);
    method public final float getHistoricalSize(int, int);
    method public final float getHistoricalToolMajor(int);
    method public final float getHistoricalToolMajor(int, int);
    method public final float getHistoricalToolMinor(int);
    method public final float getHistoricalToolMinor(int, int);
    method public final float getHistoricalTouchMajor(int);
    method public final float getHistoricalTouchMajor(int, int);
    method public final float getHistoricalTouchMinor(int);
    method public final float getHistoricalTouchMinor(int, int);
    method public final float getHistoricalX(int);
    method public final float getHistoricalX(int, int);
    method public final float getHistoricalY(int);
    method public final float getHistoricalY(int, int);
    method public final int getHistorySize();
    method public final int getMetaState();
    method public final float getOrientation();
    method public final float getOrientation(int);
    method public final void getPointerCoords(int, android.view.MotionEvent.PointerCoords);
    method public final int getPointerCount();
    method public final int getPointerId(int);
    method public final void getPointerProperties(int, android.view.MotionEvent.PointerProperties);
    method public final float getPressure();
    method public final float getPressure(int);
    method public final float getRawX();
    method public final float getRawY();
    method public final float getSize();
    method public final float getSize(int);
    method public final int getSource();
    method public final float getToolMajor();
    method public final float getToolMajor(int);
    method public final float getToolMinor();
    method public final float getToolMinor(int);
    method public final int getToolType(int);
    method public final float getTouchMajor();
    method public final float getTouchMajor(int);
    method public final float getTouchMinor();
    method public final float getTouchMinor(int);
    method public final float getX();
    method public final float getX(int);
    method public final float getXPrecision();
    method public final float getY();
    method public final float getY(int);
    method public final float getYPrecision();
    method public final boolean isButtonPressed(int);
    method public static android.view.MotionEvent obtain(long, long, int, int, android.view.MotionEvent.PointerProperties[], android.view.MotionEvent.PointerCoords[], int, int, float, float, int, int, int, int);
    method public static deprecated android.view.MotionEvent obtain(long, long, int, int, int[], android.view.MotionEvent.PointerCoords[], int, float, float, int, int, int, int);
    method public static android.view.MotionEvent obtain(long, long, int, float, float, float, float, int, float, float, int, int);
    method public static deprecated android.view.MotionEvent obtain(long, long, int, int, float, float, float, float, int, float, float, int, int);
    method public static android.view.MotionEvent obtain(long, long, int, float, float, int);
    method public static android.view.MotionEvent obtain(android.view.MotionEvent);
    method public static android.view.MotionEvent obtainNoHistory(android.view.MotionEvent);
    method public final void offsetLocation(float, float);
    method public final void recycle();
    method public final void setAction(int);
    method public final void setEdgeFlags(int);
    method public final void setLocation(float, float);
    method public final void setSource(int);
    method public final void transform(android.graphics.Matrix);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ACTION_CANCEL = 3; // 0x3
    field public static final int ACTION_DOWN = 0; // 0x0
    field public static final int ACTION_HOVER_ENTER = 9; // 0x9
    field public static final int ACTION_HOVER_EXIT = 10; // 0xa
    field public static final int ACTION_HOVER_MOVE = 7; // 0x7
    field public static final int ACTION_MASK = 255; // 0xff
    field public static final int ACTION_MOVE = 2; // 0x2
    field public static final int ACTION_OUTSIDE = 4; // 0x4
    field public static final deprecated int ACTION_POINTER_1_DOWN = 5; // 0x5
    field public static final deprecated int ACTION_POINTER_1_UP = 6; // 0x6
    field public static final deprecated int ACTION_POINTER_2_DOWN = 261; // 0x105
    field public static final deprecated int ACTION_POINTER_2_UP = 262; // 0x106
    field public static final deprecated int ACTION_POINTER_3_DOWN = 517; // 0x205
    field public static final deprecated int ACTION_POINTER_3_UP = 518; // 0x206
    field public static final int ACTION_POINTER_DOWN = 5; // 0x5
    field public static final deprecated int ACTION_POINTER_ID_MASK = 65280; // 0xff00
    field public static final deprecated int ACTION_POINTER_ID_SHIFT = 8; // 0x8
    field public static final int ACTION_POINTER_INDEX_MASK = 65280; // 0xff00
    field public static final int ACTION_POINTER_INDEX_SHIFT = 8; // 0x8
    field public static final int ACTION_POINTER_UP = 6; // 0x6
    field public static final int ACTION_SCROLL = 8; // 0x8
    field public static final int ACTION_UP = 1; // 0x1
    field public static final int AXIS_BRAKE = 23; // 0x17
    field public static final int AXIS_DISTANCE = 24; // 0x18
    field public static final int AXIS_GAS = 22; // 0x16
    field public static final int AXIS_GENERIC_1 = 32; // 0x20
    field public static final int AXIS_GENERIC_10 = 41; // 0x29
    field public static final int AXIS_GENERIC_11 = 42; // 0x2a
    field public static final int AXIS_GENERIC_12 = 43; // 0x2b
    field public static final int AXIS_GENERIC_13 = 44; // 0x2c
    field public static final int AXIS_GENERIC_14 = 45; // 0x2d
    field public static final int AXIS_GENERIC_15 = 46; // 0x2e
    field public static final int AXIS_GENERIC_16 = 47; // 0x2f
    field public static final int AXIS_GENERIC_2 = 33; // 0x21
    field public static final int AXIS_GENERIC_3 = 34; // 0x22
    field public static final int AXIS_GENERIC_4 = 35; // 0x23
    field public static final int AXIS_GENERIC_5 = 36; // 0x24
    field public static final int AXIS_GENERIC_6 = 37; // 0x25
    field public static final int AXIS_GENERIC_7 = 38; // 0x26
    field public static final int AXIS_GENERIC_8 = 39; // 0x27
    field public static final int AXIS_GENERIC_9 = 40; // 0x28
    field public static final int AXIS_HAT_X = 15; // 0xf
    field public static final int AXIS_HAT_Y = 16; // 0x10
    field public static final int AXIS_HSCROLL = 10; // 0xa
    field public static final int AXIS_LTRIGGER = 17; // 0x11
    field public static final int AXIS_ORIENTATION = 8; // 0x8
    field public static final int AXIS_PRESSURE = 2; // 0x2
    field public static final int AXIS_RTRIGGER = 18; // 0x12
    field public static final int AXIS_RUDDER = 20; // 0x14
    field public static final int AXIS_RX = 12; // 0xc
    field public static final int AXIS_RY = 13; // 0xd
    field public static final int AXIS_RZ = 14; // 0xe
    field public static final int AXIS_SIZE = 3; // 0x3
    field public static final int AXIS_THROTTLE = 19; // 0x13
    field public static final int AXIS_TILT = 25; // 0x19
    field public static final int AXIS_TOOL_MAJOR = 6; // 0x6
    field public static final int AXIS_TOOL_MINOR = 7; // 0x7
    field public static final int AXIS_TOUCH_MAJOR = 4; // 0x4
    field public static final int AXIS_TOUCH_MINOR = 5; // 0x5
    field public static final int AXIS_VSCROLL = 9; // 0x9
    field public static final int AXIS_WHEEL = 21; // 0x15
    field public static final int AXIS_X = 0; // 0x0
    field public static final int AXIS_Y = 1; // 0x1
    field public static final int AXIS_Z = 11; // 0xb
    field public static final int BUTTON_BACK = 8; // 0x8
    field public static final int BUTTON_FORWARD = 16; // 0x10
    field public static final int BUTTON_PRIMARY = 1; // 0x1
    field public static final int BUTTON_SECONDARY = 2; // 0x2
    field public static final int BUTTON_TERTIARY = 4; // 0x4
    field public static final android.os.Parcelable.Creator<android.view.MotionEvent> CREATOR;
    field public static final int EDGE_BOTTOM = 2; // 0x2
    field public static final int EDGE_LEFT = 4; // 0x4
    field public static final int EDGE_RIGHT = 8; // 0x8
    field public static final int EDGE_TOP = 1; // 0x1
    field public static final int FLAG_WINDOW_IS_OBSCURED = 1; // 0x1
    field public static final int INVALID_POINTER_ID = -1; // 0xffffffff
    field public static final int TOOL_TYPE_ERASER = 4; // 0x4
    field public static final int TOOL_TYPE_FINGER = 1; // 0x1
    field public static final int TOOL_TYPE_MOUSE = 3; // 0x3
    field public static final int TOOL_TYPE_STYLUS = 2; // 0x2
    field public static final int TOOL_TYPE_UNKNOWN = 0; // 0x0
  }

  public static final class MotionEvent.PointerCoords {
    ctor public MotionEvent.PointerCoords();
    ctor public MotionEvent.PointerCoords(android.view.MotionEvent.PointerCoords);
    method public void clear();
    method public void copyFrom(android.view.MotionEvent.PointerCoords);
    method public float getAxisValue(int);
    method public void setAxisValue(int, float);
    field public float orientation;
    field public float pressure;
    field public float size;
    field public float toolMajor;
    field public float toolMinor;
    field public float touchMajor;
    field public float touchMinor;
    field public float x;
    field public float y;
  }

  public static final class MotionEvent.PointerProperties {
    ctor public MotionEvent.PointerProperties();
    ctor public MotionEvent.PointerProperties(android.view.MotionEvent.PointerProperties);
    method public void clear();
    method public void copyFrom(android.view.MotionEvent.PointerProperties);
    field public int id;
    field public int toolType;
  }

  public abstract class OrientationEventListener {
    ctor public OrientationEventListener(android.content.Context);
    ctor public OrientationEventListener(android.content.Context, int);
    method public boolean canDetectOrientation();
    method public void disable();
    method public void enable();
    method public abstract void onOrientationChanged(int);
    field public static final int ORIENTATION_UNKNOWN = -1; // 0xffffffff
  }

  public abstract deprecated class OrientationListener implements android.hardware.SensorListener {
    ctor public OrientationListener(android.content.Context);
    ctor public OrientationListener(android.content.Context, int);
    method public void disable();
    method public void enable();
    method public void onAccuracyChanged(int, int);
    method public abstract void onOrientationChanged(int);
    method public void onSensorChanged(int, float[]);
    field public static final int ORIENTATION_UNKNOWN = -1; // 0xffffffff
  }

  public class ScaleGestureDetector {
    ctor public ScaleGestureDetector(android.content.Context, android.view.ScaleGestureDetector.OnScaleGestureListener);
    ctor public ScaleGestureDetector(android.content.Context, android.view.ScaleGestureDetector.OnScaleGestureListener, android.os.Handler);
    method public float getCurrentSpan();
    method public float getCurrentSpanX();
    method public float getCurrentSpanY();
    method public long getEventTime();
    method public float getFocusX();
    method public float getFocusY();
    method public float getPreviousSpan();
    method public float getPreviousSpanX();
    method public float getPreviousSpanY();
    method public float getScaleFactor();
    method public long getTimeDelta();
    method public boolean isInProgress();
    method public boolean isQuickScaleEnabled();
    method public boolean isSecondaryButtonScaleEnabled();
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public void setQuickScaleEnabled(boolean);
    method public void setSecondaryButtonScaleEnabled(boolean);
  }

  public static abstract interface ScaleGestureDetector.OnScaleGestureListener {
    method public abstract boolean onScale(android.view.ScaleGestureDetector);
    method public abstract boolean onScaleBegin(android.view.ScaleGestureDetector);
    method public abstract void onScaleEnd(android.view.ScaleGestureDetector);
  }

  public static class ScaleGestureDetector.SimpleOnScaleGestureListener implements android.view.ScaleGestureDetector.OnScaleGestureListener {
    ctor public ScaleGestureDetector.SimpleOnScaleGestureListener();
    method public boolean onScale(android.view.ScaleGestureDetector);
    method public boolean onScaleBegin(android.view.ScaleGestureDetector);
    method public void onScaleEnd(android.view.ScaleGestureDetector);
  }

  public class SearchEvent {
    method public android.view.InputDevice getInputDevice();
  }

  public class SoundEffectConstants {
    method public static int getContantForFocusDirection(int);
    field public static final int CLICK = 0; // 0x0
    field public static final int NAVIGATION_DOWN = 4; // 0x4
    field public static final int NAVIGATION_LEFT = 1; // 0x1
    field public static final int NAVIGATION_RIGHT = 3; // 0x3
    field public static final int NAVIGATION_UP = 2; // 0x2
  }

  public abstract interface SubMenu implements android.view.Menu {
    method public abstract void clearHeader();
    method public abstract android.view.MenuItem getItem();
    method public abstract android.view.SubMenu setHeaderIcon(int);
    method public abstract android.view.SubMenu setHeaderIcon(android.graphics.drawable.Drawable);
    method public abstract android.view.SubMenu setHeaderTitle(int);
    method public abstract android.view.SubMenu setHeaderTitle(java.lang.CharSequence);
    method public abstract android.view.SubMenu setHeaderView(android.view.View);
    method public abstract android.view.SubMenu setIcon(int);
    method public abstract android.view.SubMenu setIcon(android.graphics.drawable.Drawable);
  }

  public class Surface implements android.os.Parcelable {
    ctor public Surface(android.graphics.SurfaceTexture);
    method public int describeContents();
    method public boolean isValid();
    method public android.graphics.Canvas lockCanvas(android.graphics.Rect) throws java.lang.IllegalArgumentException, android.view.Surface.OutOfResourcesException;
    method public android.graphics.Canvas lockHardwareCanvas();
    method public void readFromParcel(android.os.Parcel);
    method public void release();
    method public deprecated void unlockCanvas(android.graphics.Canvas);
    method public void unlockCanvasAndPost(android.graphics.Canvas);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.Surface> CREATOR;
    field public static final int ROTATION_0 = 0; // 0x0
    field public static final int ROTATION_180 = 2; // 0x2
    field public static final int ROTATION_270 = 3; // 0x3
    field public static final int ROTATION_90 = 1; // 0x1
  }

  public static class Surface.OutOfResourcesException extends java.lang.RuntimeException {
    ctor public Surface.OutOfResourcesException();
    ctor public Surface.OutOfResourcesException(java.lang.String);
  }

  public abstract interface SurfaceHolder {
    method public abstract void addCallback(android.view.SurfaceHolder.Callback);
    method public abstract android.view.Surface getSurface();
    method public abstract android.graphics.Rect getSurfaceFrame();
    method public abstract boolean isCreating();
    method public abstract android.graphics.Canvas lockCanvas();
    method public abstract android.graphics.Canvas lockCanvas(android.graphics.Rect);
    method public abstract void removeCallback(android.view.SurfaceHolder.Callback);
    method public abstract void setFixedSize(int, int);
    method public abstract void setFormat(int);
    method public abstract void setKeepScreenOn(boolean);
    method public abstract void setSizeFromLayout();
    method public abstract deprecated void setType(int);
    method public abstract void unlockCanvasAndPost(android.graphics.Canvas);
    field public static final deprecated int SURFACE_TYPE_GPU = 2; // 0x2
    field public static final deprecated int SURFACE_TYPE_HARDWARE = 1; // 0x1
    field public static final deprecated int SURFACE_TYPE_NORMAL = 0; // 0x0
    field public static final deprecated int SURFACE_TYPE_PUSH_BUFFERS = 3; // 0x3
  }

  public static class SurfaceHolder.BadSurfaceTypeException extends java.lang.RuntimeException {
    ctor public SurfaceHolder.BadSurfaceTypeException();
    ctor public SurfaceHolder.BadSurfaceTypeException(java.lang.String);
  }

  public static abstract interface SurfaceHolder.Callback {
    method public abstract void surfaceChanged(android.view.SurfaceHolder, int, int, int);
    method public abstract void surfaceCreated(android.view.SurfaceHolder);
    method public abstract void surfaceDestroyed(android.view.SurfaceHolder);
  }

  public static abstract interface SurfaceHolder.Callback2 implements android.view.SurfaceHolder.Callback {
    method public abstract void surfaceRedrawNeeded(android.view.SurfaceHolder);
  }

  public class SurfaceView extends android.view.View {
    ctor public SurfaceView(android.content.Context);
    ctor public SurfaceView(android.content.Context, android.util.AttributeSet);
    ctor public SurfaceView(android.content.Context, android.util.AttributeSet, int);
    ctor public SurfaceView(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean gatherTransparentRegion(android.graphics.Region);
    method public android.view.SurfaceHolder getHolder();
    method public void setSecure(boolean);
    method public void setZOrderMediaOverlay(boolean);
    method public void setZOrderOnTop(boolean);
  }

  public class TextureView extends android.view.View {
    ctor public TextureView(android.content.Context);
    ctor public TextureView(android.content.Context, android.util.AttributeSet);
    ctor public TextureView(android.content.Context, android.util.AttributeSet, int);
    ctor public TextureView(android.content.Context, android.util.AttributeSet, int, int);
    method public final void draw(android.graphics.Canvas);
    method public android.graphics.Bitmap getBitmap();
    method public android.graphics.Bitmap getBitmap(int, int);
    method public android.graphics.Bitmap getBitmap(android.graphics.Bitmap);
    method public android.graphics.SurfaceTexture getSurfaceTexture();
    method public android.view.TextureView.SurfaceTextureListener getSurfaceTextureListener();
    method public android.graphics.Matrix getTransform(android.graphics.Matrix);
    method public boolean isAvailable();
    method public android.graphics.Canvas lockCanvas();
    method public android.graphics.Canvas lockCanvas(android.graphics.Rect);
    method protected final void onDraw(android.graphics.Canvas);
    method public void setOpaque(boolean);
    method public void setSurfaceTexture(android.graphics.SurfaceTexture);
    method public void setSurfaceTextureListener(android.view.TextureView.SurfaceTextureListener);
    method public void setTransform(android.graphics.Matrix);
    method public void unlockCanvasAndPost(android.graphics.Canvas);
  }

  public static abstract interface TextureView.SurfaceTextureListener {
    method public abstract void onSurfaceTextureAvailable(android.graphics.SurfaceTexture, int, int);
    method public abstract boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture);
    method public abstract void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture, int, int);
    method public abstract void onSurfaceTextureUpdated(android.graphics.SurfaceTexture);
  }

  public class TouchDelegate {
    ctor public TouchDelegate(android.graphics.Rect, android.view.View);
    method public boolean onTouchEvent(android.view.MotionEvent);
    field public static final int ABOVE = 1; // 0x1
    field public static final int BELOW = 2; // 0x2
    field public static final int TO_LEFT = 4; // 0x4
    field public static final int TO_RIGHT = 8; // 0x8
  }

  public final class VelocityTracker {
    method public void addMovement(android.view.MotionEvent);
    method public void clear();
    method public void computeCurrentVelocity(int);
    method public void computeCurrentVelocity(int, float);
    method public float getXVelocity();
    method public float getXVelocity(int);
    method public float getYVelocity();
    method public float getYVelocity(int);
    method public static android.view.VelocityTracker obtain();
    method public void recycle();
  }

  public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
    ctor public View(android.content.Context);
    ctor public View(android.content.Context, android.util.AttributeSet);
    ctor public View(android.content.Context, android.util.AttributeSet, int);
    ctor public View(android.content.Context, android.util.AttributeSet, int, int);
    method public void addChildrenForAccessibility(java.util.ArrayList<android.view.View>);
    method public void addFocusables(java.util.ArrayList<android.view.View>, int);
    method public void addFocusables(java.util.ArrayList<android.view.View>, int, int);
    method public void addOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
    method public void addOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
    method public void addTouchables(java.util.ArrayList<android.view.View>);
    method public android.view.ViewPropertyAnimator animate();
    method public void announceForAccessibility(java.lang.CharSequence);
    method protected boolean awakenScrollBars();
    method protected boolean awakenScrollBars(int);
    method protected boolean awakenScrollBars(int, boolean);
    method public void bringToFront();
    method public void buildDrawingCache();
    method public void buildDrawingCache(boolean);
    method public void buildLayer();
    method public boolean callOnClick();
    method public boolean canResolveLayoutDirection();
    method public boolean canResolveTextAlignment();
    method public boolean canResolveTextDirection();
    method public boolean canScrollHorizontally(int);
    method public boolean canScrollVertically(int);
    method public void cancelLongPress();
    method public final void cancelPendingInputEvents();
    method public boolean checkInputConnectionProxy(android.view.View);
    method public void clearAnimation();
    method public void clearFocus();
    method public static int combineMeasuredStates(int, int);
    method protected int computeHorizontalScrollExtent();
    method protected int computeHorizontalScrollOffset();
    method protected int computeHorizontalScrollRange();
    method public void computeScroll();
    method public android.view.WindowInsets computeSystemWindowInsets(android.view.WindowInsets, android.graphics.Rect);
    method protected int computeVerticalScrollExtent();
    method protected int computeVerticalScrollOffset();
    method protected int computeVerticalScrollRange();
    method public android.view.accessibility.AccessibilityNodeInfo createAccessibilityNodeInfo();
    method public void createContextMenu(android.view.ContextMenu);
    method public void destroyDrawingCache();
    method public android.view.WindowInsets dispatchApplyWindowInsets(android.view.WindowInsets);
    method public void dispatchConfigurationChanged(android.content.res.Configuration);
    method public void dispatchDisplayHint(int);
    method public boolean dispatchDragEvent(android.view.DragEvent);
    method protected void dispatchDraw(android.graphics.Canvas);
    method public void dispatchDrawableHotspotChanged(float, float);
    method protected boolean dispatchGenericFocusedEvent(android.view.MotionEvent);
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method protected boolean dispatchGenericPointerEvent(android.view.MotionEvent);
    method protected boolean dispatchHoverEvent(android.view.MotionEvent);
    method public boolean dispatchKeyEvent(android.view.KeyEvent);
    method public boolean dispatchKeyEventPreIme(android.view.KeyEvent);
    method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent);
    method public boolean dispatchNestedFling(float, float, boolean);
    method public boolean dispatchNestedPreFling(float, float);
    method public boolean dispatchNestedPrePerformAccessibilityAction(int, android.os.Bundle);
    method public boolean dispatchNestedPreScroll(int, int, int[], int[]);
    method public boolean dispatchNestedScroll(int, int, int, int, int[]);
    method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public void dispatchProvideAssistStructure(android.view.ViewAssistStructure);
    method protected void dispatchRestoreInstanceState(android.util.SparseArray<android.os.Parcelable>);
    method protected void dispatchSaveInstanceState(android.util.SparseArray<android.os.Parcelable>);
    method protected void dispatchSetActivated(boolean);
    method protected void dispatchSetPressed(boolean);
    method protected void dispatchSetSelected(boolean);
    method public void dispatchSystemUiVisibilityChanged(int);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public boolean dispatchUnhandledMove(android.view.View, int);
    method protected void dispatchVisibilityChanged(android.view.View, int);
    method public void dispatchWindowFocusChanged(boolean);
    method public void dispatchWindowSystemUiVisiblityChanged(int);
    method public void dispatchWindowVisibilityChanged(int);
    method public void draw(android.graphics.Canvas);
    method public void drawableHotspotChanged(float, float);
    method protected void drawableStateChanged();
    method public android.view.View findFocus();
    method public final android.view.View findViewById(int);
    method public final android.view.View findViewWithTag(java.lang.Object);
    method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int);
    method protected deprecated boolean fitSystemWindows(android.graphics.Rect);
    method public android.view.View focusSearch(int);
    method public void forceLayout();
    method public static int generateViewId();
    method public java.lang.CharSequence getAccessibilityClassName();
    method public int getAccessibilityLiveRegion();
    method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider();
    method public int getAccessibilityTraversalAfter();
    method public int getAccessibilityTraversalBefore();
    method public float getAlpha();
    method public android.view.animation.Animation getAnimation();
    method public android.os.IBinder getApplicationWindowToken();
    method public android.graphics.drawable.Drawable getBackground();
    method public int getBackgroundColor();
    method public android.content.res.ColorStateList getBackgroundTintList();
    method public android.graphics.PorterDuff.Mode getBackgroundTintMode();
    method public int getBaseline();
    method public final int getBottom();
    method protected float getBottomFadingEdgeStrength();
    method protected int getBottomPaddingOffset();
    method public float getCameraDistance();
    method public android.graphics.Rect getClipBounds();
    method public final boolean getClipToOutline();
    method public java.lang.CharSequence getContentDescription();
    method public final android.content.Context getContext();
    method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo();
    method public static int getDefaultSize(int, int);
    method public android.view.Display getDisplay();
    method public final int[] getDrawableState();
    method public android.graphics.Bitmap getDrawingCache();
    method public android.graphics.Bitmap getDrawingCache(boolean);
    method public int getDrawingCacheBackgroundColor();
    method public int getDrawingCacheQuality();
    method public void getDrawingRect(android.graphics.Rect);
    method public long getDrawingTime();
    method public float getElevation();
    method public boolean getFilterTouchesWhenObscured();
    method public boolean getFitsSystemWindows();
    method public java.util.ArrayList<android.view.View> getFocusables(int);
    method public void getFocusedRect(android.graphics.Rect);
    method public android.graphics.drawable.Drawable getForeground();
    method public int getForegroundGravity();
    method public android.content.res.ColorStateList getForegroundTintList();
    method public android.graphics.PorterDuff.Mode getForegroundTintMode();
    method public boolean getGlobalVisibleRect(android.graphics.Rect, android.graphics.Point);
    method public final boolean getGlobalVisibleRect(android.graphics.Rect);
    method public android.os.Handler getHandler();
    method public final int getHeight();
    method public void getHitRect(android.graphics.Rect);
    method public int getHorizontalFadingEdgeLength();
    method protected int getHorizontalScrollbarHeight();
    method public int getId();
    method public int getImportantForAccessibility();
    method public boolean getKeepScreenOn();
    method public android.view.KeyEvent.DispatcherState getKeyDispatcherState();
    method public int getLabelFor();
    method public int getLayerType();
    method public int getLayoutDirection();
    method public android.view.ViewGroup.LayoutParams getLayoutParams();
    method public final int getLeft();
    method protected float getLeftFadingEdgeStrength();
    method protected int getLeftPaddingOffset();
    method public final boolean getLocalVisibleRect(android.graphics.Rect);
    method public void getLocationInWindow(int[]);
    method public void getLocationOnScreen(int[]);
    method public android.graphics.Matrix getMatrix();
    method public final int getMeasuredHeight();
    method public final int getMeasuredHeightAndState();
    method public final int getMeasuredState();
    method public final int getMeasuredWidth();
    method public final int getMeasuredWidthAndState();
    method public int getMinimumHeight();
    method public int getMinimumWidth();
    method public int getNextFocusDownId();
    method public int getNextFocusForwardId();
    method public int getNextFocusLeftId();
    method public int getNextFocusRightId();
    method public int getNextFocusUpId();
    method public android.view.View.OnFocusChangeListener getOnFocusChangeListener();
    method public android.view.ViewOutlineProvider getOutlineProvider();
    method public int getOverScrollMode();
    method public android.view.ViewOverlay getOverlay();
    method public int getPaddingBottom();
    method public int getPaddingEnd();
    method public int getPaddingLeft();
    method public int getPaddingRight();
    method public int getPaddingStart();
    method public int getPaddingTop();
    method public final android.view.ViewParent getParent();
    method public android.view.ViewParent getParentForAccessibility();
    method public float getPivotX();
    method public float getPivotY();
    method public android.content.res.Resources getResources();
    method public final int getRight();
    method protected float getRightFadingEdgeStrength();
    method protected int getRightPaddingOffset();
    method public android.view.View getRootView();
    method public android.view.WindowInsets getRootWindowInsets();
    method public float getRotation();
    method public float getRotationX();
    method public float getRotationY();
    method public float getScaleX();
    method public float getScaleY();
    method public int getScrollBarDefaultDelayBeforeFade();
    method public int getScrollBarFadeDuration();
    method public int getScrollBarSize();
    method public int getScrollBarStyle();
    method public final int getScrollX();
    method public final int getScrollY();
    method public int getSolidColor();
    method public android.animation.StateListAnimator getStateListAnimator();
    method protected int getSuggestedMinimumHeight();
    method protected int getSuggestedMinimumWidth();
    method public int getSystemUiVisibility();
    method public java.lang.Object getTag();
    method public java.lang.Object getTag(int);
    method public int getTextAlignment();
    method public int getTextDirection();
    method public final int getTop();
    method protected float getTopFadingEdgeStrength();
    method protected int getTopPaddingOffset();
    method public android.view.TouchDelegate getTouchDelegate();
    method public java.util.ArrayList<android.view.View> getTouchables();
    method public java.lang.String getTransitionName();
    method public float getTranslationX();
    method public float getTranslationY();
    method public float getTranslationZ();
    method public int getVerticalFadingEdgeLength();
    method public int getVerticalScrollbarPosition();
    method public int getVerticalScrollbarWidth();
    method public android.view.ViewTreeObserver getViewTreeObserver();
    method public int getVisibility();
    method public final int getWidth();
    method protected int getWindowAttachCount();
    method public android.view.WindowId getWindowId();
    method public int getWindowSystemUiVisibility();
    method public android.os.IBinder getWindowToken();
    method public int getWindowVisibility();
    method public void getWindowVisibleDisplayFrame(android.graphics.Rect);
    method public float getX();
    method public float getY();
    method public float getZ();
    method public boolean hasFocus();
    method public boolean hasFocusable();
    method public boolean hasNestedScrollingParent();
    method public boolean hasOnClickListeners();
    method public boolean hasOverlappingRendering();
    method public boolean hasTransientState();
    method public boolean hasWindowFocus();
    method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
    method public void invalidate(android.graphics.Rect);
    method public void invalidate(int, int, int, int);
    method public void invalidate();
    method public void invalidateDrawable(android.graphics.drawable.Drawable);
    method public void invalidateOutline();
    method public boolean isAccessibilityFocused();
    method public boolean isActivated();
    method public boolean isAttachedToWindow();
    method public boolean isClickable();
    method public boolean isDirty();
    method public boolean isDrawingCacheEnabled();
    method public boolean isDuplicateParentStateEnabled();
    method public boolean isEnabled();
    method public final boolean isFocusable();
    method public final boolean isFocusableInTouchMode();
    method public boolean isFocused();
    method public boolean isHapticFeedbackEnabled();
    method public boolean isHardwareAccelerated();
    method public boolean isHorizontalFadingEdgeEnabled();
    method public boolean isHorizontalScrollBarEnabled();
    method public boolean isHovered();
    method public boolean isImportantForAccessibility();
    method public boolean isInEditMode();
    method public boolean isInLayout();
    method public boolean isInTouchMode();
    method public boolean isLaidOut();
    method public boolean isLayoutDirectionResolved();
    method public boolean isLayoutRequested();
    method public boolean isLongClickable();
    method public boolean isNestedScrollingEnabled();
    method public boolean isOpaque();
    method protected boolean isPaddingOffsetRequired();
    method public boolean isPaddingRelative();
    method public boolean isPressed();
    method public boolean isSaveEnabled();
    method public boolean isSaveFromParentEnabled();
    method public boolean isScrollContainer();
    method public boolean isScrollbarFadingEnabled();
    method public boolean isSelected();
    method public boolean isShown();
    method public boolean isSoundEffectsEnabled();
    method public boolean isTextAlignmentResolved();
    method public boolean isTextDirectionResolved();
    method public boolean isVerticalFadingEdgeEnabled();
    method public boolean isVerticalScrollBarEnabled();
    method public void jumpDrawablesToCurrentState();
    method public void layout(int, int, int, int);
    method public final void measure(int, int);
    method protected static int[] mergeDrawableStates(int[], int[]);
    method public void offsetLeftAndRight(int);
    method public void offsetTopAndBottom(int);
    method protected void onAnimationEnd();
    method protected void onAnimationStart();
    method public android.view.WindowInsets onApplyWindowInsets(android.view.WindowInsets);
    method protected void onAttachedToWindow();
    method public void onCancelPendingInputEvents();
    method public boolean onCheckIsTextEditor();
    method protected void onConfigurationChanged(android.content.res.Configuration);
    method protected void onCreateContextMenu(android.view.ContextMenu);
    method protected int[] onCreateDrawableState(int);
    method public android.view.inputmethod.InputConnection onCreateInputConnection(android.view.inputmethod.EditorInfo);
    method protected void onDetachedFromWindow();
    method protected void onDisplayHint(int);
    method public boolean onDragEvent(android.view.DragEvent);
    method protected void onDraw(android.graphics.Canvas);
    method public void onDrawForeground(android.graphics.Canvas);
    method protected final void onDrawScrollBars(android.graphics.Canvas);
    method public boolean onFilterTouchEventForSecurity(android.view.MotionEvent);
    method protected void onFinishInflate();
    method public void onFinishTemporaryDetach();
    method protected void onFocusChanged(boolean, int, android.graphics.Rect);
    method public boolean onGenericMotionEvent(android.view.MotionEvent);
    method public void onHoverChanged(boolean);
    method public boolean onHoverEvent(android.view.MotionEvent);
    method public void onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public void onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo);
    method public boolean onKeyDown(int, android.view.KeyEvent);
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyPreIme(int, android.view.KeyEvent);
    method public boolean onKeyShortcut(int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method protected void onLayout(boolean, int, int, int, int);
    method protected void onMeasure(int, int);
    method protected void onOverScrolled(int, int, boolean, boolean);
    method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public void onProvideAssistStructure(android.view.ViewAssistStructure);
    method public void onProvideVirtualAssistStructure(android.view.ViewAssistStructure);
    method protected void onRestoreInstanceState(android.os.Parcelable);
    method public void onRtlPropertiesChanged(int);
    method protected android.os.Parcelable onSaveInstanceState();
    method public void onScreenStateChanged(int);
    method protected void onScrollChanged(int, int, int, int);
    method protected boolean onSetAlpha(int);
    method protected void onSizeChanged(int, int, int, int);
    method public void onStartTemporaryDetach();
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public boolean onTrackballEvent(android.view.MotionEvent);
    method protected void onVisibilityChanged(android.view.View, int);
    method public void onWindowFocusChanged(boolean);
    method public void onWindowSystemUiVisibilityChanged(int);
    method protected void onWindowVisibilityChanged(int);
    method protected boolean overScrollBy(int, int, int, int, int, int, int, int, boolean);
    method public boolean performAccessibilityAction(int, android.os.Bundle);
    method public boolean performClick();
    method public boolean performHapticFeedback(int);
    method public boolean performHapticFeedback(int, int);
    method public boolean performLongClick();
    method public void playSoundEffect(int);
    method public boolean post(java.lang.Runnable);
    method public boolean postDelayed(java.lang.Runnable, long);
    method public void postInvalidate();
    method public void postInvalidate(int, int, int, int);
    method public void postInvalidateDelayed(long);
    method public void postInvalidateDelayed(long, int, int, int, int);
    method public void postInvalidateOnAnimation();
    method public void postInvalidateOnAnimation(int, int, int, int);
    method public void postOnAnimation(java.lang.Runnable);
    method public void postOnAnimationDelayed(java.lang.Runnable, long);
    method public void refreshDrawableState();
    method public boolean removeCallbacks(java.lang.Runnable);
    method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
    method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
    method public void requestApplyInsets();
    method public deprecated void requestFitSystemWindows();
    method public final boolean requestFocus();
    method public final boolean requestFocus(int);
    method public boolean requestFocus(int, android.graphics.Rect);
    method public final boolean requestFocusFromTouch();
    method public void requestLayout();
    method public boolean requestRectangleOnScreen(android.graphics.Rect);
    method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
    method public final void requestUnbufferedDispatch(android.view.MotionEvent);
    method public static int resolveSize(int, int);
    method public static int resolveSizeAndState(int, int, int);
    method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
    method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
    method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
    method public void scrollBy(int, int);
    method public void scrollTo(int, int);
    method public void sendAccessibilityEvent(int);
    method public void sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent);
    method public void setAccessibilityDelegate(android.view.View.AccessibilityDelegate);
    method public void setAccessibilityLiveRegion(int);
    method public void setAccessibilityTraversalAfter(int);
    method public void setAccessibilityTraversalBefore(int);
    method public void setActivated(boolean);
    method public void setAlpha(float);
    method public void setAnimation(android.view.animation.Animation);
    method public void setBackground(android.graphics.drawable.Drawable);
    method public void setBackgroundColor(int);
    method public deprecated void setBackgroundDrawable(android.graphics.drawable.Drawable);
    method public void setBackgroundResource(int);
    method public void setBackgroundTintList(android.content.res.ColorStateList);
    method public void setBackgroundTintMode(android.graphics.PorterDuff.Mode);
    method public final void setBottom(int);
    method public void setCameraDistance(float);
    method public void setClickable(boolean);
    method public void setClipBounds(android.graphics.Rect);
    method public void setClipToOutline(boolean);
    method public void setContentDescription(java.lang.CharSequence);
    method public void setDrawingCacheBackgroundColor(int);
    method public void setDrawingCacheEnabled(boolean);
    method public void setDrawingCacheQuality(int);
    method public void setDuplicateParentStateEnabled(boolean);
    method public void setElevation(float);
    method public void setEnabled(boolean);
    method public void setFadingEdgeLength(int);
    method public void setFilterTouchesWhenObscured(boolean);
    method public void setFitsSystemWindows(boolean);
    method public void setFocusable(boolean);
    method public void setFocusableInTouchMode(boolean);
    method public void setForeground(android.graphics.drawable.Drawable);
    method public void setForegroundGravity(int);
    method public void setForegroundTintList(android.content.res.ColorStateList);
    method public void setForegroundTintMode(android.graphics.PorterDuff.Mode);
    method public void setHapticFeedbackEnabled(boolean);
    method public void setHasTransientState(boolean);
    method public void setHorizontalFadingEdgeEnabled(boolean);
    method public void setHorizontalScrollBarEnabled(boolean);
    method public void setHovered(boolean);
    method public void setId(int);
    method public void setImportantForAccessibility(int);
    method public void setKeepScreenOn(boolean);
    method public void setLabelFor(int);
    method public void setLayerPaint(android.graphics.Paint);
    method public void setLayerType(int, android.graphics.Paint);
    method public void setLayoutDirection(int);
    method public void setLayoutParams(android.view.ViewGroup.LayoutParams);
    method public final void setLeft(int);
    method public void setLongClickable(boolean);
    method protected final void setMeasuredDimension(int, int);
    method public void setMinimumHeight(int);
    method public void setMinimumWidth(int);
    method public void setNestedScrollingEnabled(boolean);
    method public void setNextFocusDownId(int);
    method public void setNextFocusForwardId(int);
    method public void setNextFocusLeftId(int);
    method public void setNextFocusRightId(int);
    method public void setNextFocusUpId(int);
    method public void setOnApplyWindowInsetsListener(android.view.View.OnApplyWindowInsetsListener);
    method public void setOnClickListener(android.view.View.OnClickListener);
    method public void setOnCreateContextMenuListener(android.view.View.OnCreateContextMenuListener);
    method public void setOnDragListener(android.view.View.OnDragListener);
    method public void setOnFocusChangeListener(android.view.View.OnFocusChangeListener);
    method public void setOnGenericMotionListener(android.view.View.OnGenericMotionListener);
    method public void setOnHoverListener(android.view.View.OnHoverListener);
    method public void setOnKeyListener(android.view.View.OnKeyListener);
    method public void setOnLongClickListener(android.view.View.OnLongClickListener);
    method public void setOnScrollChangeListener(android.view.View.OnScrollChangeListener);
    method public void setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener);
    method public void setOnTouchListener(android.view.View.OnTouchListener);
    method public void setOutlineProvider(android.view.ViewOutlineProvider);
    method public void setOverScrollMode(int);
    method public void setPadding(int, int, int, int);
    method public void setPaddingRelative(int, int, int, int);
    method public void setPivotX(float);
    method public void setPivotY(float);
    method public void setPressed(boolean);
    method public final void setRight(int);
    method public void setRotation(float);
    method public void setRotationX(float);
    method public void setRotationY(float);
    method public void setSaveEnabled(boolean);
    method public void setSaveFromParentEnabled(boolean);
    method public void setScaleX(float);
    method public void setScaleY(float);
    method public void setScrollBarDefaultDelayBeforeFade(int);
    method public void setScrollBarFadeDuration(int);
    method public void setScrollBarSize(int);
    method public void setScrollBarStyle(int);
    method public void setScrollContainer(boolean);
    method public void setScrollX(int);
    method public void setScrollY(int);
    method public void setScrollbarFadingEnabled(boolean);
    method public void setSelected(boolean);
    method public void setSoundEffectsEnabled(boolean);
    method public void setStateListAnimator(android.animation.StateListAnimator);
    method public void setSystemUiVisibility(int);
    method public void setTag(java.lang.Object);
    method public void setTag(int, java.lang.Object);
    method public void setTextAlignment(int);
    method public void setTextDirection(int);
    method public final void setTop(int);
    method public void setTouchDelegate(android.view.TouchDelegate);
    method public final void setTransitionName(java.lang.String);
    method public void setTranslationX(float);
    method public void setTranslationY(float);
    method public void setTranslationZ(float);
    method public void setVerticalFadingEdgeEnabled(boolean);
    method public void setVerticalScrollBarEnabled(boolean);
    method public void setVerticalScrollbarPosition(int);
    method public void setVisibility(int);
    method public void setWillNotCacheDrawing(boolean);
    method public void setWillNotDraw(boolean);
    method public void setX(float);
    method public void setY(float);
    method public void setZ(float);
    method public boolean showContextMenu();
    method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback);
    method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback, int);
    method public void startAnimation(android.view.animation.Animation);
    method public final boolean startDrag(android.content.ClipData, android.view.View.DragShadowBuilder, java.lang.Object, int);
    method public boolean startNestedScroll(int);
    method public void stopNestedScroll();
    method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
    method public void unscheduleDrawable(android.graphics.drawable.Drawable);
    method protected boolean verifyDrawable(android.graphics.drawable.Drawable);
    method public boolean willNotCacheDrawing();
    method public boolean willNotDraw();
    field public static final int ACCESSIBILITY_LIVE_REGION_ASSERTIVE = 2; // 0x2
    field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0
    field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1
    field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA;
    field public static final int DRAWING_CACHE_QUALITY_AUTO = 0; // 0x0
    field public static final int DRAWING_CACHE_QUALITY_HIGH = 1048576; // 0x100000
    field public static final int DRAWING_CACHE_QUALITY_LOW = 524288; // 0x80000
    field protected static final int[] EMPTY_STATE_SET;
    field protected static final int[] ENABLED_FOCUSED_SELECTED_STATE_SET;
    field protected static final int[] ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] ENABLED_FOCUSED_STATE_SET;
    field protected static final int[] ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] ENABLED_SELECTED_STATE_SET;
    field protected static final int[] ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] ENABLED_STATE_SET;
    field protected static final int[] ENABLED_WINDOW_FOCUSED_STATE_SET;
    field public static final int FIND_VIEWS_WITH_CONTENT_DESCRIPTION = 2; // 0x2
    field public static final int FIND_VIEWS_WITH_TEXT = 1; // 0x1
    field public static final int FOCUSABLES_ALL = 0; // 0x0
    field public static final int FOCUSABLES_TOUCH_MODE = 1; // 0x1
    field protected static final int[] FOCUSED_SELECTED_STATE_SET;
    field protected static final int[] FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] FOCUSED_STATE_SET;
    field protected static final int[] FOCUSED_WINDOW_FOCUSED_STATE_SET;
    field public static final int FOCUS_BACKWARD = 1; // 0x1
    field public static final int FOCUS_DOWN = 130; // 0x82
    field public static final int FOCUS_FORWARD = 2; // 0x2
    field public static final int FOCUS_LEFT = 17; // 0x11
    field public static final int FOCUS_RIGHT = 66; // 0x42
    field public static final int FOCUS_UP = 33; // 0x21
    field public static final int GONE = 8; // 0x8
    field public static final int HAPTIC_FEEDBACK_ENABLED = 268435456; // 0x10000000
    field public static final int IMPORTANT_FOR_ACCESSIBILITY_AUTO = 0; // 0x0
    field public static final int IMPORTANT_FOR_ACCESSIBILITY_NO = 2; // 0x2
    field public static final int IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS = 4; // 0x4
    field public static final int IMPORTANT_FOR_ACCESSIBILITY_YES = 1; // 0x1
    field public static final int INVISIBLE = 4; // 0x4
    field public static final int KEEP_SCREEN_ON = 67108864; // 0x4000000
    field public static final int LAYER_TYPE_HARDWARE = 2; // 0x2
    field public static final int LAYER_TYPE_NONE = 0; // 0x0
    field public static final int LAYER_TYPE_SOFTWARE = 1; // 0x1
    field public static final int LAYOUT_DIRECTION_INHERIT = 2; // 0x2
    field public static final int LAYOUT_DIRECTION_LOCALE = 3; // 0x3
    field public static final int LAYOUT_DIRECTION_LTR = 0; // 0x0
    field public static final int LAYOUT_DIRECTION_RTL = 1; // 0x1
    field public static final int MEASURED_HEIGHT_STATE_SHIFT = 16; // 0x10
    field public static final int MEASURED_SIZE_MASK = 16777215; // 0xffffff
    field public static final int MEASURED_STATE_MASK = -16777216; // 0xff000000
    field public static final int MEASURED_STATE_TOO_SMALL = 16777216; // 0x1000000
    field public static final int NO_ID = -1; // 0xffffffff
    field public static final int OVER_SCROLL_ALWAYS = 0; // 0x0
    field public static final int OVER_SCROLL_IF_CONTENT_SCROLLS = 1; // 0x1
    field public static final int OVER_SCROLL_NEVER = 2; // 0x2
    field protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET;
    field protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_ENABLED_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_ENABLED_SELECTED_STATE_SET;
    field protected static final int[] PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_ENABLED_STATE_SET;
    field protected static final int[] PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_FOCUSED_SELECTED_STATE_SET;
    field protected static final int[] PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_SELECTED_STATE_SET;
    field protected static final int[] PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET;
    field protected static final int[] PRESSED_STATE_SET;
    field protected static final int[] PRESSED_WINDOW_FOCUSED_STATE_SET;
    field public static final android.util.Property<android.view.View, java.lang.Float> ROTATION;
    field public static final android.util.Property<android.view.View, java.lang.Float> ROTATION_X;
    field public static final android.util.Property<android.view.View, java.lang.Float> ROTATION_Y;
    field public static final android.util.Property<android.view.View, java.lang.Float> SCALE_X;
    field public static final android.util.Property<android.view.View, java.lang.Float> SCALE_Y;
    field public static final int SCREEN_STATE_OFF = 0; // 0x0
    field public static final int SCREEN_STATE_ON = 1; // 0x1
    field public static final int SCROLLBARS_INSIDE_INSET = 16777216; // 0x1000000
    field public static final int SCROLLBARS_INSIDE_OVERLAY = 0; // 0x0
    field public static final int SCROLLBARS_OUTSIDE_INSET = 50331648; // 0x3000000
    field public static final int SCROLLBARS_OUTSIDE_OVERLAY = 33554432; // 0x2000000
    field public static final int SCROLLBAR_POSITION_DEFAULT = 0; // 0x0
    field public static final int SCROLLBAR_POSITION_LEFT = 1; // 0x1
    field public static final int SCROLLBAR_POSITION_RIGHT = 2; // 0x2
    field public static final int SCROLL_AXIS_HORIZONTAL = 1; // 0x1
    field public static final int SCROLL_AXIS_NONE = 0; // 0x0
    field public static final int SCROLL_AXIS_VERTICAL = 2; // 0x2
    field protected static final int[] SELECTED_STATE_SET;
    field protected static final int[] SELECTED_WINDOW_FOCUSED_STATE_SET;
    field public static final int SOUND_EFFECTS_ENABLED = 134217728; // 0x8000000
    field public static final deprecated int STATUS_BAR_HIDDEN = 1; // 0x1
    field public static final deprecated int STATUS_BAR_VISIBLE = 0; // 0x0
    field public static final int SYSTEM_UI_FLAG_FULLSCREEN = 4; // 0x4
    field public static final int SYSTEM_UI_FLAG_HIDE_NAVIGATION = 2; // 0x2
    field public static final int SYSTEM_UI_FLAG_IMMERSIVE = 2048; // 0x800
    field public static final int SYSTEM_UI_FLAG_IMMERSIVE_STICKY = 4096; // 0x1000
    field public static final int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN = 1024; // 0x400
    field public static final int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = 512; // 0x200
    field public static final int SYSTEM_UI_FLAG_LAYOUT_STABLE = 256; // 0x100
    field public static final int SYSTEM_UI_FLAG_LIGHT_STATUS_BAR = 8192; // 0x2000
    field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1
    field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0
    field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600
    field public static final int TEXT_ALIGNMENT_CENTER = 4; // 0x4
    field public static final int TEXT_ALIGNMENT_GRAVITY = 1; // 0x1
    field public static final int TEXT_ALIGNMENT_INHERIT = 0; // 0x0
    field public static final int TEXT_ALIGNMENT_TEXT_END = 3; // 0x3
    field public static final int TEXT_ALIGNMENT_TEXT_START = 2; // 0x2
    field public static final int TEXT_ALIGNMENT_VIEW_END = 6; // 0x6
    field public static final int TEXT_ALIGNMENT_VIEW_START = 5; // 0x5
    field public static final int TEXT_DIRECTION_ANY_RTL = 2; // 0x2
    field public static final int TEXT_DIRECTION_FIRST_STRONG = 1; // 0x1
    field public static final int TEXT_DIRECTION_INHERIT = 0; // 0x0
    field public static final int TEXT_DIRECTION_LOCALE = 5; // 0x5
    field public static final int TEXT_DIRECTION_LTR = 3; // 0x3
    field public static final int TEXT_DIRECTION_RTL = 4; // 0x4
    field public static final android.util.Property<android.view.View, java.lang.Float> TRANSLATION_X;
    field public static final android.util.Property<android.view.View, java.lang.Float> TRANSLATION_Y;
    field public static final android.util.Property<android.view.View, java.lang.Float> TRANSLATION_Z;
    field protected static final java.lang.String VIEW_LOG_TAG = "View";
    field public static final int VISIBLE = 0; // 0x0
    field protected static final int[] WINDOW_FOCUSED_STATE_SET;
    field public static final android.util.Property<android.view.View, java.lang.Float> X;
    field public static final android.util.Property<android.view.View, java.lang.Float> Y;
    field public static final android.util.Property<android.view.View, java.lang.Float> Z;
  }

  public static class View.AccessibilityDelegate {
    ctor public View.AccessibilityDelegate();
    method public boolean dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
    method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(android.view.View);
    method public void onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
    method public void onInitializeAccessibilityNodeInfo(android.view.View, android.view.accessibility.AccessibilityNodeInfo);
    method public void onPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
    method public boolean onRequestSendAccessibilityEvent(android.view.ViewGroup, android.view.View, android.view.accessibility.AccessibilityEvent);
    method public boolean performAccessibilityAction(android.view.View, int, android.os.Bundle);
    method public void sendAccessibilityEvent(android.view.View, int);
    method public void sendAccessibilityEventUnchecked(android.view.View, android.view.accessibility.AccessibilityEvent);
  }

  public static class View.BaseSavedState extends android.view.AbsSavedState {
    ctor public View.BaseSavedState(android.os.Parcel);
    ctor public View.BaseSavedState(android.os.Parcelable);
    field public static final android.os.Parcelable.Creator<android.view.View.BaseSavedState> CREATOR;
  }

  public static class View.DragShadowBuilder {
    ctor public View.DragShadowBuilder(android.view.View);
    ctor public View.DragShadowBuilder();
    method public final android.view.View getView();
    method public void onDrawShadow(android.graphics.Canvas);
    method public void onProvideShadowMetrics(android.graphics.Point, android.graphics.Point);
  }

  public static class View.MeasureSpec {
    ctor public View.MeasureSpec();
    method public static int getMode(int);
    method public static int getSize(int);
    method public static int makeMeasureSpec(int, int);
    method public static java.lang.String toString(int);
    field public static final int AT_MOST = -2147483648; // 0x80000000
    field public static final int EXACTLY = 1073741824; // 0x40000000
    field public static final int UNSPECIFIED = 0; // 0x0
  }

  public static abstract interface View.OnApplyWindowInsetsListener {
    method public abstract android.view.WindowInsets onApplyWindowInsets(android.view.View, android.view.WindowInsets);
  }

  public static abstract interface View.OnAttachStateChangeListener {
    method public abstract void onViewAttachedToWindow(android.view.View);
    method public abstract void onViewDetachedFromWindow(android.view.View);
  }

  public static abstract interface View.OnClickListener {
    method public abstract void onClick(android.view.View);
  }

  public static abstract interface View.OnCreateContextMenuListener {
    method public abstract void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
  }

  public static abstract interface View.OnDragListener {
    method public abstract boolean onDrag(android.view.View, android.view.DragEvent);
  }

  public static abstract interface View.OnFocusChangeListener {
    method public abstract void onFocusChange(android.view.View, boolean);
  }

  public static abstract interface View.OnGenericMotionListener {
    method public abstract boolean onGenericMotion(android.view.View, android.view.MotionEvent);
  }

  public static abstract interface View.OnHoverListener {
    method public abstract boolean onHover(android.view.View, android.view.MotionEvent);
  }

  public static abstract interface View.OnKeyListener {
    method public abstract boolean onKey(android.view.View, int, android.view.KeyEvent);
  }

  public static abstract interface View.OnLayoutChangeListener {
    method public abstract void onLayoutChange(android.view.View, int, int, int, int, int, int, int, int);
  }

  public static abstract interface View.OnLongClickListener {
    method public abstract boolean onLongClick(android.view.View);
  }

  public static abstract interface View.OnScrollChangeListener {
    method public abstract void onScrollChange(android.view.View, int, int, int, int);
  }

  public static abstract interface View.OnSystemUiVisibilityChangeListener {
    method public abstract void onSystemUiVisibilityChange(int);
  }

  public static abstract interface View.OnTouchListener {
    method public abstract boolean onTouch(android.view.View, android.view.MotionEvent);
  }

  public final class ViewAnimationUtils {
    method public static android.animation.Animator createCircularReveal(android.view.View, int, int, float, float);
  }

  public abstract class ViewAssistStructure {
    ctor public ViewAssistStructure();
    method public abstract void asyncCommit();
    method public abstract android.view.ViewAssistStructure asyncNewChild(int);
    method public abstract void clearExtras();
    method public abstract android.os.Bundle editExtras();
    method public abstract int getChildCount();
    method public abstract java.lang.CharSequence getHint();
    method public abstract java.lang.CharSequence getText();
    method public abstract int getTextSelectionEnd();
    method public abstract int getTextSelectionStart();
    method public abstract android.view.ViewAssistStructure newChild(int);
    method public abstract void setAccessibilityFocused(boolean);
    method public abstract void setActivated(boolean);
    method public abstract void setCheckable(boolean);
    method public abstract void setChecked(boolean);
    method public abstract void setChildCount(int);
    method public abstract void setClassName(java.lang.String);
    method public abstract void setClickable(boolean);
    method public abstract void setContentDescription(java.lang.CharSequence);
    method public abstract void setDimens(int, int, int, int, int, int);
    method public abstract void setEnabled(boolean);
    method public abstract void setFocusable(boolean);
    method public abstract void setFocused(boolean);
    method public abstract void setHint(java.lang.CharSequence);
    method public abstract void setId(int, java.lang.String, java.lang.String, java.lang.String);
    method public abstract void setLongClickable(boolean);
    method public abstract void setSelected(boolean);
    method public abstract void setText(java.lang.CharSequence);
    method public abstract void setText(java.lang.CharSequence, int, int);
    method public abstract void setTextPaint(android.text.TextPaint);
    method public abstract void setVisibility(int);
  }

  public class ViewConfiguration {
    ctor public deprecated ViewConfiguration();
    method public static android.view.ViewConfiguration get(android.content.Context);
    method public static int getDoubleTapTimeout();
    method public static deprecated int getEdgeSlop();
    method public static deprecated int getFadingEdgeLength();
    method public static deprecated long getGlobalActionKeyTimeout();
    method public static int getJumpTapTimeout();
    method public static int getKeyRepeatDelay();
    method public static int getKeyRepeatTimeout();
    method public static int getLongPressTimeout();
    method public static deprecated int getMaximumDrawingCacheSize();
    method public static deprecated int getMaximumFlingVelocity();
    method public static deprecated int getMinimumFlingVelocity();
    method public static int getPressedStateDuration();
    method public int getScaledDoubleTapSlop();
    method public int getScaledEdgeSlop();
    method public int getScaledFadingEdgeLength();
    method public int getScaledMaximumDrawingCacheSize();
    method public int getScaledMaximumFlingVelocity();
    method public int getScaledMinimumFlingVelocity();
    method public int getScaledOverflingDistance();
    method public int getScaledOverscrollDistance();
    method public int getScaledPagingTouchSlop();
    method public int getScaledScrollBarSize();
    method public int getScaledTouchSlop();
    method public int getScaledWindowTouchSlop();
    method public static int getScrollBarFadeDuration();
    method public static deprecated int getScrollBarSize();
    method public static int getScrollDefaultDelay();
    method public static float getScrollFriction();
    method public static int getTapTimeout();
    method public static deprecated int getTouchSlop();
    method public static deprecated int getWindowTouchSlop();
    method public static long getZoomControlsTimeout();
    method public boolean hasPermanentMenuKey();
  }

  public class ViewDebug {
    ctor public ViewDebug();
    method public static void dumpCapturedView(java.lang.String, java.lang.Object);
    method public static deprecated void startHierarchyTracing(java.lang.String, android.view.View);
    method public static deprecated void startRecyclerTracing(java.lang.String, android.view.View);
    method public static deprecated void stopHierarchyTracing();
    method public static deprecated void stopRecyclerTracing();
    method public static deprecated void trace(android.view.View, android.view.ViewDebug.RecyclerTraceType, int...);
    method public static deprecated void trace(android.view.View, android.view.ViewDebug.HierarchyTraceType);
    field public static final deprecated boolean TRACE_HIERARCHY = false;
    field public static final deprecated boolean TRACE_RECYCLER = false;
  }

  public static abstract class ViewDebug.CapturedViewProperty implements java.lang.annotation.Annotation {
  }

  public static abstract class ViewDebug.ExportedProperty implements java.lang.annotation.Annotation {
  }

  public static abstract class ViewDebug.FlagToString implements java.lang.annotation.Annotation {
  }

  public static final deprecated class ViewDebug.HierarchyTraceType extends java.lang.Enum {
    method public static android.view.ViewDebug.HierarchyTraceType valueOf(java.lang.String);
    method public static final android.view.ViewDebug.HierarchyTraceType[] values();
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType BUILD_CACHE;
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType DRAW;
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType INVALIDATE;
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType INVALIDATE_CHILD;
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType INVALIDATE_CHILD_IN_PARENT;
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType ON_LAYOUT;
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType ON_MEASURE;
    enum_constant public static final android.view.ViewDebug.HierarchyTraceType REQUEST_LAYOUT;
  }

  public static abstract class ViewDebug.IntToString implements java.lang.annotation.Annotation {
  }

  public static final deprecated class ViewDebug.RecyclerTraceType extends java.lang.Enum {
    method public static android.view.ViewDebug.RecyclerTraceType valueOf(java.lang.String);
    method public static final android.view.ViewDebug.RecyclerTraceType[] values();
    enum_constant public static final android.view.ViewDebug.RecyclerTraceType BIND_VIEW;
    enum_constant public static final android.view.ViewDebug.RecyclerTraceType MOVE_FROM_ACTIVE_TO_SCRAP_HEAP;
    enum_constant public static final android.view.ViewDebug.RecyclerTraceType MOVE_TO_SCRAP_HEAP;
    enum_constant public static final android.view.ViewDebug.RecyclerTraceType NEW_VIEW;
    enum_constant public static final android.view.ViewDebug.RecyclerTraceType RECYCLE_FROM_ACTIVE_HEAP;
    enum_constant public static final android.view.ViewDebug.RecyclerTraceType RECYCLE_FROM_SCRAP_HEAP;
  }

  public abstract class ViewGroup extends android.view.View implements android.view.ViewManager android.view.ViewParent {
    ctor public ViewGroup(android.content.Context);
    ctor public ViewGroup(android.content.Context, android.util.AttributeSet);
    ctor public ViewGroup(android.content.Context, android.util.AttributeSet, int);
    ctor public ViewGroup(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean addStatesFromChildren();
    method public void addView(android.view.View);
    method public void addView(android.view.View, int);
    method public void addView(android.view.View, int, int);
    method public void addView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public void addView(android.view.View, int, android.view.ViewGroup.LayoutParams);
    method protected boolean addViewInLayout(android.view.View, int, android.view.ViewGroup.LayoutParams);
    method protected boolean addViewInLayout(android.view.View, int, android.view.ViewGroup.LayoutParams, boolean);
    method protected void attachLayoutAnimationParameters(android.view.View, android.view.ViewGroup.LayoutParams, int, int);
    method protected void attachViewToParent(android.view.View, int, android.view.ViewGroup.LayoutParams);
    method public void bringChildToFront(android.view.View);
    method protected boolean canAnimate();
    method protected boolean checkLayoutParams(android.view.ViewGroup.LayoutParams);
    method public void childDrawableStateChanged(android.view.View);
    method public void childHasTransientStateChanged(android.view.View, boolean);
    method protected void cleanupLayoutState(android.view.View);
    method public void clearChildFocus(android.view.View);
    method public void clearDisappearingChildren();
    method protected void debug(int);
    method protected void detachAllViewsFromParent();
    method protected void detachViewFromParent(android.view.View);
    method protected void detachViewFromParent(int);
    method protected void detachViewsFromParent(int, int);
    method protected void dispatchFreezeSelfOnly(android.util.SparseArray<android.os.Parcelable>);
    method public void dispatchSetActivated(boolean);
    method public void dispatchSetSelected(boolean);
    method protected void dispatchThawSelfOnly(android.util.SparseArray<android.os.Parcelable>);
    method protected boolean drawChild(android.graphics.Canvas, android.view.View, long);
    method public void endViewTransition(android.view.View);
    method public android.view.View focusSearch(android.view.View, int);
    method public void focusableViewAvailable(android.view.View);
    method public boolean gatherTransparentRegion(android.graphics.Region);
    method protected android.view.ViewGroup.LayoutParams generateDefaultLayoutParams();
    method public android.view.ViewGroup.LayoutParams generateLayoutParams(android.util.AttributeSet);
    method protected android.view.ViewGroup.LayoutParams generateLayoutParams(android.view.ViewGroup.LayoutParams);
    method public android.view.View getChildAt(int);
    method public int getChildCount();
    method protected int getChildDrawingOrder(int, int);
    method public static int getChildMeasureSpec(int, int, int);
    method protected boolean getChildStaticTransformation(android.view.View, android.view.animation.Transformation);
    method public boolean getChildVisibleRect(android.view.View, android.graphics.Rect, android.graphics.Point);
    method public boolean getClipChildren();
    method public boolean getClipToPadding();
    method public int getDescendantFocusability();
    method public android.view.View getFocusedChild();
    method public android.view.animation.LayoutAnimationController getLayoutAnimation();
    method public android.view.animation.Animation.AnimationListener getLayoutAnimationListener();
    method public int getLayoutMode();
    method public android.animation.LayoutTransition getLayoutTransition();
    method public int getNestedScrollAxes();
    method public int getPersistentDrawingCache();
    method public boolean getTouchscreenBlocksFocus();
    method public int indexOfChild(android.view.View);
    method public final void invalidateChild(android.view.View, android.graphics.Rect);
    method public android.view.ViewParent invalidateChildInParent(int[], android.graphics.Rect);
    method public deprecated boolean isAlwaysDrawnWithCacheEnabled();
    method public deprecated boolean isAnimationCacheEnabled();
    method protected boolean isChildrenDrawingOrderEnabled();
    method protected deprecated boolean isChildrenDrawnWithCacheEnabled();
    method public boolean isMotionEventSplittingEnabled();
    method public boolean isTransitionGroup();
    method public final void layout(int, int, int, int);
    method protected void measureChild(android.view.View, int, int);
    method protected void measureChildWithMargins(android.view.View, int, int, int, int);
    method protected void measureChildren(int, int);
    method public void notifySubtreeAccessibilityStateChanged(android.view.View, android.view.View, int);
    method public final void offsetDescendantRectToMyCoords(android.view.View, android.graphics.Rect);
    method public final void offsetRectIntoDescendantCoords(android.view.View, android.graphics.Rect);
    method public boolean onInterceptHoverEvent(android.view.MotionEvent);
    method public boolean onInterceptTouchEvent(android.view.MotionEvent);
    method protected abstract void onLayout(boolean, int, int, int, int);
    method public boolean onNestedFling(android.view.View, float, float, boolean);
    method public boolean onNestedPreFling(android.view.View, float, float);
    method public boolean onNestedPrePerformAccessibilityAction(android.view.View, int, android.os.Bundle);
    method public void onNestedPreScroll(android.view.View, int, int, int[]);
    method public void onNestedScroll(android.view.View, int, int, int, int);
    method public void onNestedScrollAccepted(android.view.View, android.view.View, int);
    method protected boolean onRequestFocusInDescendants(int, android.graphics.Rect);
    method public boolean onRequestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
    method public boolean onStartNestedScroll(android.view.View, android.view.View, int);
    method public void onStopNestedScroll(android.view.View);
    method public void recomputeViewAttributes(android.view.View);
    method public void removeAllViews();
    method public void removeAllViewsInLayout();
    method protected void removeDetachedView(android.view.View, boolean);
    method public void removeView(android.view.View);
    method public void removeViewAt(int);
    method public void removeViewInLayout(android.view.View);
    method public void removeViews(int, int);
    method public void removeViewsInLayout(int, int);
    method public void requestChildFocus(android.view.View, android.view.View);
    method public boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean);
    method public void requestDisallowInterceptTouchEvent(boolean);
    method public boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
    method public void requestTransparentRegion(android.view.View);
    method public void scheduleLayoutAnimation();
    method public void setAddStatesFromChildren(boolean);
    method public deprecated void setAlwaysDrawnWithCacheEnabled(boolean);
    method public deprecated void setAnimationCacheEnabled(boolean);
    method protected void setChildrenDrawingCacheEnabled(boolean);
    method protected void setChildrenDrawingOrderEnabled(boolean);
    method protected deprecated void setChildrenDrawnWithCacheEnabled(boolean);
    method public void setClipChildren(boolean);
    method public void setClipToPadding(boolean);
    method public void setDescendantFocusability(int);
    method public void setLayoutAnimation(android.view.animation.LayoutAnimationController);
    method public void setLayoutAnimationListener(android.view.animation.Animation.AnimationListener);
    method public void setLayoutMode(int);
    method public void setLayoutTransition(android.animation.LayoutTransition);
    method public void setMotionEventSplittingEnabled(boolean);
    method public void setOnHierarchyChangeListener(android.view.ViewGroup.OnHierarchyChangeListener);
    method public void setPersistentDrawingCache(int);
    method protected void setStaticTransformationsEnabled(boolean);
    method public void setTouchscreenBlocksFocus(boolean);
    method public void setTransitionGroup(boolean);
    method public boolean shouldDelayChildPressedState();
    method public boolean showContextMenuForChild(android.view.View);
    method public android.view.ActionMode startActionModeForChild(android.view.View, android.view.ActionMode.Callback);
    method public android.view.ActionMode startActionModeForChild(android.view.View, android.view.ActionMode.Callback, int);
    method public void startLayoutAnimation();
    method public void startViewTransition(android.view.View);
    method public void updateViewLayout(android.view.View, android.view.ViewGroup.LayoutParams);
    field protected static final int CLIP_TO_PADDING_MASK = 34; // 0x22
    field public static final int FOCUS_AFTER_DESCENDANTS = 262144; // 0x40000
    field public static final int FOCUS_BEFORE_DESCENDANTS = 131072; // 0x20000
    field public static final int FOCUS_BLOCK_DESCENDANTS = 393216; // 0x60000
    field public static final int LAYOUT_MODE_CLIP_BOUNDS = 0; // 0x0
    field public static final int LAYOUT_MODE_OPTICAL_BOUNDS = 1; // 0x1
    field public static final int PERSISTENT_ALL_CACHES = 3; // 0x3
    field public static final int PERSISTENT_ANIMATION_CACHE = 1; // 0x1
    field public static final int PERSISTENT_NO_CACHE = 0; // 0x0
    field public static final int PERSISTENT_SCROLLING_CACHE = 2; // 0x2
  }

  public static class ViewGroup.LayoutParams {
    ctor public ViewGroup.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public ViewGroup.LayoutParams(int, int);
    ctor public ViewGroup.LayoutParams(android.view.ViewGroup.LayoutParams);
    method public void resolveLayoutDirection(int);
    method protected void setBaseAttributes(android.content.res.TypedArray, int, int);
    field public static final deprecated int FILL_PARENT = -1; // 0xffffffff
    field public static final int MATCH_PARENT = -1; // 0xffffffff
    field public static final int WRAP_CONTENT = -2; // 0xfffffffe
    field public int height;
    field public android.view.animation.LayoutAnimationController.AnimationParameters layoutAnimationParameters;
    field public int width;
  }

  public static class ViewGroup.MarginLayoutParams extends android.view.ViewGroup.LayoutParams {
    ctor public ViewGroup.MarginLayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public ViewGroup.MarginLayoutParams(int, int);
    ctor public ViewGroup.MarginLayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public ViewGroup.MarginLayoutParams(android.view.ViewGroup.LayoutParams);
    method public int getLayoutDirection();
    method public int getMarginEnd();
    method public int getMarginStart();
    method public boolean isMarginRelative();
    method public void setLayoutDirection(int);
    method public void setMarginEnd(int);
    method public void setMarginStart(int);
    method public void setMargins(int, int, int, int);
    field public int bottomMargin;
    field public int leftMargin;
    field public int rightMargin;
    field public int topMargin;
  }

  public static abstract interface ViewGroup.OnHierarchyChangeListener {
    method public abstract void onChildViewAdded(android.view.View, android.view.View);
    method public abstract void onChildViewRemoved(android.view.View, android.view.View);
  }

  public class ViewGroupOverlay extends android.view.ViewOverlay {
    method public void add(android.view.View);
    method public void remove(android.view.View);
  }

  public abstract interface ViewManager {
    method public abstract void addView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public abstract void removeView(android.view.View);
    method public abstract void updateViewLayout(android.view.View, android.view.ViewGroup.LayoutParams);
  }

  public abstract class ViewOutlineProvider {
    ctor public ViewOutlineProvider();
    method public abstract void getOutline(android.view.View, android.graphics.Outline);
    field public static final android.view.ViewOutlineProvider BACKGROUND;
    field public static final android.view.ViewOutlineProvider BOUNDS;
    field public static final android.view.ViewOutlineProvider PADDED_BOUNDS;
  }

  public class ViewOverlay {
    method public void add(android.graphics.drawable.Drawable);
    method public void clear();
    method public void remove(android.graphics.drawable.Drawable);
  }

  public abstract interface ViewParent {
    method public abstract void bringChildToFront(android.view.View);
    method public abstract boolean canResolveLayoutDirection();
    method public abstract boolean canResolveTextAlignment();
    method public abstract boolean canResolveTextDirection();
    method public abstract void childDrawableStateChanged(android.view.View);
    method public abstract void childHasTransientStateChanged(android.view.View, boolean);
    method public abstract void clearChildFocus(android.view.View);
    method public abstract void createContextMenu(android.view.ContextMenu);
    method public abstract android.view.View focusSearch(android.view.View, int);
    method public abstract void focusableViewAvailable(android.view.View);
    method public abstract boolean getChildVisibleRect(android.view.View, android.graphics.Rect, android.graphics.Point);
    method public abstract int getLayoutDirection();
    method public abstract android.view.ViewParent getParent();
    method public abstract android.view.ViewParent getParentForAccessibility();
    method public abstract int getTextAlignment();
    method public abstract int getTextDirection();
    method public abstract void invalidateChild(android.view.View, android.graphics.Rect);
    method public abstract android.view.ViewParent invalidateChildInParent(int[], android.graphics.Rect);
    method public abstract boolean isLayoutDirectionResolved();
    method public abstract boolean isLayoutRequested();
    method public abstract boolean isTextAlignmentResolved();
    method public abstract boolean isTextDirectionResolved();
    method public abstract void notifySubtreeAccessibilityStateChanged(android.view.View, android.view.View, int);
    method public abstract boolean onNestedFling(android.view.View, float, float, boolean);
    method public abstract boolean onNestedPreFling(android.view.View, float, float);
    method public abstract boolean onNestedPrePerformAccessibilityAction(android.view.View, int, android.os.Bundle);
    method public abstract void onNestedPreScroll(android.view.View, int, int, int[]);
    method public abstract void onNestedScroll(android.view.View, int, int, int, int);
    method public abstract void onNestedScrollAccepted(android.view.View, android.view.View, int);
    method public abstract boolean onStartNestedScroll(android.view.View, android.view.View, int);
    method public abstract void onStopNestedScroll(android.view.View);
    method public abstract void recomputeViewAttributes(android.view.View);
    method public abstract void requestChildFocus(android.view.View, android.view.View);
    method public abstract boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean);
    method public abstract void requestDisallowInterceptTouchEvent(boolean);
    method public abstract void requestFitSystemWindows();
    method public abstract void requestLayout();
    method public abstract boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
    method public abstract void requestTransparentRegion(android.view.View);
    method public abstract boolean showContextMenuForChild(android.view.View);
    method public abstract android.view.ActionMode startActionModeForChild(android.view.View, android.view.ActionMode.Callback);
    method public abstract android.view.ActionMode startActionModeForChild(android.view.View, android.view.ActionMode.Callback, int);
  }

  public class ViewPropertyAnimator {
    method public android.view.ViewPropertyAnimator alpha(float);
    method public android.view.ViewPropertyAnimator alphaBy(float);
    method public void cancel();
    method public long getDuration();
    method public android.animation.TimeInterpolator getInterpolator();
    method public long getStartDelay();
    method public android.view.ViewPropertyAnimator rotation(float);
    method public android.view.ViewPropertyAnimator rotationBy(float);
    method public android.view.ViewPropertyAnimator rotationX(float);
    method public android.view.ViewPropertyAnimator rotationXBy(float);
    method public android.view.ViewPropertyAnimator rotationY(float);
    method public android.view.ViewPropertyAnimator rotationYBy(float);
    method public android.view.ViewPropertyAnimator scaleX(float);
    method public android.view.ViewPropertyAnimator scaleXBy(float);
    method public android.view.ViewPropertyAnimator scaleY(float);
    method public android.view.ViewPropertyAnimator scaleYBy(float);
    method public android.view.ViewPropertyAnimator setDuration(long);
    method public android.view.ViewPropertyAnimator setInterpolator(android.animation.TimeInterpolator);
    method public android.view.ViewPropertyAnimator setListener(android.animation.Animator.AnimatorListener);
    method public android.view.ViewPropertyAnimator setStartDelay(long);
    method public android.view.ViewPropertyAnimator setUpdateListener(android.animation.ValueAnimator.AnimatorUpdateListener);
    method public void start();
    method public android.view.ViewPropertyAnimator translationX(float);
    method public android.view.ViewPropertyAnimator translationXBy(float);
    method public android.view.ViewPropertyAnimator translationY(float);
    method public android.view.ViewPropertyAnimator translationYBy(float);
    method public android.view.ViewPropertyAnimator translationZ(float);
    method public android.view.ViewPropertyAnimator translationZBy(float);
    method public android.view.ViewPropertyAnimator withEndAction(java.lang.Runnable);
    method public android.view.ViewPropertyAnimator withLayer();
    method public android.view.ViewPropertyAnimator withStartAction(java.lang.Runnable);
    method public android.view.ViewPropertyAnimator x(float);
    method public android.view.ViewPropertyAnimator xBy(float);
    method public android.view.ViewPropertyAnimator y(float);
    method public android.view.ViewPropertyAnimator yBy(float);
    method public android.view.ViewPropertyAnimator z(float);
    method public android.view.ViewPropertyAnimator zBy(float);
  }

  public final class ViewStub extends android.view.View {
    ctor public ViewStub(android.content.Context);
    ctor public ViewStub(android.content.Context, int);
    ctor public ViewStub(android.content.Context, android.util.AttributeSet);
    ctor public ViewStub(android.content.Context, android.util.AttributeSet, int);
    ctor public ViewStub(android.content.Context, android.util.AttributeSet, int, int);
    method public int getInflatedId();
    method public android.view.LayoutInflater getLayoutInflater();
    method public int getLayoutResource();
    method public android.view.View inflate();
    method public void setInflatedId(int);
    method public void setLayoutInflater(android.view.LayoutInflater);
    method public void setLayoutResource(int);
    method public void setOnInflateListener(android.view.ViewStub.OnInflateListener);
  }

  public static abstract interface ViewStub.OnInflateListener {
    method public abstract void onInflate(android.view.ViewStub, android.view.View);
  }

  public final class ViewTreeObserver {
    method public void addOnDrawListener(android.view.ViewTreeObserver.OnDrawListener);
    method public void addOnGlobalFocusChangeListener(android.view.ViewTreeObserver.OnGlobalFocusChangeListener);
    method public void addOnGlobalLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
    method public void addOnPreDrawListener(android.view.ViewTreeObserver.OnPreDrawListener);
    method public void addOnScrollChangedListener(android.view.ViewTreeObserver.OnScrollChangedListener);
    method public void addOnTouchModeChangeListener(android.view.ViewTreeObserver.OnTouchModeChangeListener);
    method public void addOnWindowAttachListener(android.view.ViewTreeObserver.OnWindowAttachListener);
    method public void addOnWindowFocusChangeListener(android.view.ViewTreeObserver.OnWindowFocusChangeListener);
    method public final void dispatchOnDraw();
    method public final void dispatchOnGlobalLayout();
    method public final boolean dispatchOnPreDraw();
    method public boolean isAlive();
    method public deprecated void removeGlobalOnLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
    method public void removeOnDrawListener(android.view.ViewTreeObserver.OnDrawListener);
    method public void removeOnGlobalFocusChangeListener(android.view.ViewTreeObserver.OnGlobalFocusChangeListener);
    method public void removeOnGlobalLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
    method public void removeOnPreDrawListener(android.view.ViewTreeObserver.OnPreDrawListener);
    method public void removeOnScrollChangedListener(android.view.ViewTreeObserver.OnScrollChangedListener);
    method public void removeOnTouchModeChangeListener(android.view.ViewTreeObserver.OnTouchModeChangeListener);
    method public void removeOnWindowAttachListener(android.view.ViewTreeObserver.OnWindowAttachListener);
    method public void removeOnWindowFocusChangeListener(android.view.ViewTreeObserver.OnWindowFocusChangeListener);
  }

  public static abstract interface ViewTreeObserver.OnDrawListener {
    method public abstract void onDraw();
  }

  public static abstract interface ViewTreeObserver.OnGlobalFocusChangeListener {
    method public abstract void onGlobalFocusChanged(android.view.View, android.view.View);
  }

  public static abstract interface ViewTreeObserver.OnGlobalLayoutListener {
    method public abstract void onGlobalLayout();
  }

  public static abstract interface ViewTreeObserver.OnPreDrawListener {
    method public abstract boolean onPreDraw();
  }

  public static abstract interface ViewTreeObserver.OnScrollChangedListener {
    method public abstract void onScrollChanged();
  }

  public static abstract interface ViewTreeObserver.OnTouchModeChangeListener {
    method public abstract void onTouchModeChanged(boolean);
  }

  public static abstract interface ViewTreeObserver.OnWindowAttachListener {
    method public abstract void onWindowAttached();
    method public abstract void onWindowDetached();
  }

  public static abstract interface ViewTreeObserver.OnWindowFocusChangeListener {
    method public abstract void onWindowFocusChanged(boolean);
  }

  public abstract class Window {
    ctor public Window(android.content.Context);
    method public abstract void addContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method public void addFlags(int);
    method public void clearFlags(int);
    method public abstract void closeAllPanels();
    method public abstract void closePanel(int);
    method public android.view.View findViewById(int);
    method public boolean getAllowEnterTransitionOverlap();
    method public boolean getAllowReturnTransitionOverlap();
    method public final android.view.WindowManager.LayoutParams getAttributes();
    method public final android.view.Window.Callback getCallback();
    method public final android.view.Window getContainer();
    method public android.transition.Scene getContentScene();
    method public final android.content.Context getContext();
    method public abstract android.view.View getCurrentFocus();
    method public abstract android.view.View getDecorView();
    method public static int getDefaultFeatures(android.content.Context);
    method public android.transition.Transition getEnterTransition();
    method public android.transition.Transition getExitTransition();
    method protected final int getFeatures();
    method protected final int getForcedWindowFlags();
    method public abstract android.view.LayoutInflater getLayoutInflater();
    method protected final int getLocalFeatures();
    method public android.media.session.MediaController getMediaController();
    method public abstract int getNavigationBarColor();
    method public android.transition.Transition getReenterTransition();
    method public android.transition.Transition getReturnTransition();
    method public android.transition.Transition getSharedElementEnterTransition();
    method public android.transition.Transition getSharedElementExitTransition();
    method public android.transition.Transition getSharedElementReenterTransition();
    method public android.transition.Transition getSharedElementReturnTransition();
    method public boolean getSharedElementsUseOverlay();
    method public abstract int getStatusBarColor();
    method public long getTransitionBackgroundFadeDuration();
    method public android.transition.TransitionManager getTransitionManager();
    method public abstract int getVolumeControlStream();
    method public android.view.WindowManager getWindowManager();
    method public final android.content.res.TypedArray getWindowStyle();
    method public final boolean hasChildren();
    method public boolean hasFeature(int);
    method protected final boolean hasSoftInputMode();
    method public void injectInputEvent(android.view.InputEvent);
    method public abstract void invalidatePanelMenu(int);
    method public final boolean isActive();
    method public abstract boolean isFloating();
    method public abstract boolean isShortcutKey(int, android.view.KeyEvent);
    method public final void makeActive();
    method protected abstract void onActive();
    method public abstract void onConfigurationChanged(android.content.res.Configuration);
    method public abstract void openPanel(int, android.view.KeyEvent);
    method public abstract android.view.View peekDecorView();
    method public abstract boolean performContextMenuIdentifierAction(int, int);
    method public abstract boolean performPanelIdentifierAction(int, int, int);
    method public abstract boolean performPanelShortcut(int, int, android.view.KeyEvent, int);
    method public boolean requestFeature(int);
    method public abstract void restoreHierarchyState(android.os.Bundle);
    method public abstract android.os.Bundle saveHierarchyState();
    method public void setAllowEnterTransitionOverlap(boolean);
    method public void setAllowReturnTransitionOverlap(boolean);
    method public void setAttributes(android.view.WindowManager.LayoutParams);
    method public abstract void setBackgroundDrawable(android.graphics.drawable.Drawable);
    method public void setBackgroundDrawableResource(int);
    method public void setCallback(android.view.Window.Callback);
    method public abstract void setChildDrawable(int, android.graphics.drawable.Drawable);
    method public abstract void setChildInt(int, int);
    method public void setClipToOutline(boolean);
    method public void setContainer(android.view.Window);
    method public abstract void setContentView(int);
    method public abstract void setContentView(android.view.View);
    method public abstract void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
    method protected void setDefaultWindowFormat(int);
    method public void setDimAmount(float);
    method public void setElevation(float);
    method public void setEnterTransition(android.transition.Transition);
    method public void setExitTransition(android.transition.Transition);
    method public abstract void setFeatureDrawable(int, android.graphics.drawable.Drawable);
    method public abstract void setFeatureDrawableAlpha(int, int);
    method public abstract void setFeatureDrawableResource(int, int);
    method public abstract void setFeatureDrawableUri(int, android.net.Uri);
    method public abstract void setFeatureInt(int, int);
    method public void setFlags(int, int);
    method public void setFormat(int);
    method public void setGravity(int);
    method public void setIcon(int);
    method public void setLayout(int, int);
    method public void setLocalFocus(boolean, boolean);
    method public void setLogo(int);
    method public void setMediaController(android.media.session.MediaController);
    method public abstract void setNavigationBarColor(int);
    method public void setReenterTransition(android.transition.Transition);
    method public void setReturnTransition(android.transition.Transition);
    method public void setSharedElementEnterTransition(android.transition.Transition);
    method public void setSharedElementExitTransition(android.transition.Transition);
    method public void setSharedElementReenterTransition(android.transition.Transition);
    method public void setSharedElementReturnTransition(android.transition.Transition);
    method public void setSharedElementsUseOverlay(boolean);
    method public void setSoftInputMode(int);
    method public abstract void setStatusBarColor(int);
    method public abstract void setTitle(java.lang.CharSequence);
    method public abstract deprecated void setTitleColor(int);
    method public void setTransitionBackgroundFadeDuration(long);
    method public void setTransitionManager(android.transition.TransitionManager);
    method public void setType(int);
    method public void setUiOptions(int);
    method public void setUiOptions(int, int);
    method public abstract void setVolumeControlStream(int);
    method public void setWindowAnimations(int);
    method public void setWindowManager(android.view.WindowManager, android.os.IBinder, java.lang.String);
    method public void setWindowManager(android.view.WindowManager, android.os.IBinder, java.lang.String, boolean);
    method public abstract boolean superDispatchGenericMotionEvent(android.view.MotionEvent);
    method public abstract boolean superDispatchKeyEvent(android.view.KeyEvent);
    method public abstract boolean superDispatchKeyShortcutEvent(android.view.KeyEvent);
    method public abstract boolean superDispatchTouchEvent(android.view.MotionEvent);
    method public abstract boolean superDispatchTrackballEvent(android.view.MotionEvent);
    method public abstract void takeInputQueue(android.view.InputQueue.Callback);
    method public abstract void takeKeyEvents(boolean);
    method public abstract void takeSurface(android.view.SurfaceHolder.Callback2);
    method public abstract void togglePanel(int, android.view.KeyEvent);
    field protected static final deprecated int DEFAULT_FEATURES = 65; // 0x41
    field public static final int FEATURE_ACTION_BAR = 8; // 0x8
    field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9
    field public static final int FEATURE_ACTION_MODE_OVERLAY = 10; // 0xa
    field public static final int FEATURE_ACTIVITY_TRANSITIONS = 13; // 0xd
    field public static final int FEATURE_CONTENT_TRANSITIONS = 12; // 0xc
    field public static final int FEATURE_CONTEXT_MENU = 6; // 0x6
    field public static final int FEATURE_CUSTOM_TITLE = 7; // 0x7
    field public static final int FEATURE_INDETERMINATE_PROGRESS = 5; // 0x5
    field public static final int FEATURE_LEFT_ICON = 3; // 0x3
    field public static final int FEATURE_NO_TITLE = 1; // 0x1
    field public static final int FEATURE_OPTIONS_PANEL = 0; // 0x0
    field public static final int FEATURE_PROGRESS = 2; // 0x2
    field public static final int FEATURE_RIGHT_ICON = 4; // 0x4
    field public static final int FEATURE_SWIPE_TO_DISMISS = 11; // 0xb
    field public static final int ID_ANDROID_CONTENT = 16908290; // 0x1020002
    field public static final java.lang.String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME = "android:navigation:background";
    field public static final int PROGRESS_END = 10000; // 0x2710
    field public static final int PROGRESS_INDETERMINATE_OFF = -4; // 0xfffffffc
    field public static final int PROGRESS_INDETERMINATE_ON = -3; // 0xfffffffd
    field public static final int PROGRESS_SECONDARY_END = 30000; // 0x7530
    field public static final int PROGRESS_SECONDARY_START = 20000; // 0x4e20
    field public static final int PROGRESS_START = 0; // 0x0
    field public static final int PROGRESS_VISIBILITY_OFF = -2; // 0xfffffffe
    field public static final int PROGRESS_VISIBILITY_ON = -1; // 0xffffffff
    field public static final java.lang.String STATUS_BAR_BACKGROUND_TRANSITION_NAME = "android:status:background";
  }

  public static abstract interface Window.Callback {
    method public abstract boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method public abstract boolean dispatchKeyEvent(android.view.KeyEvent);
    method public abstract boolean dispatchKeyShortcutEvent(android.view.KeyEvent);
    method public abstract boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public abstract boolean dispatchTouchEvent(android.view.MotionEvent);
    method public abstract boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public abstract void onActionModeFinished(android.view.ActionMode);
    method public abstract void onActionModeStarted(android.view.ActionMode);
    method public abstract void onAttachedToWindow();
    method public abstract void onContentChanged();
    method public abstract boolean onCreatePanelMenu(int, android.view.Menu);
    method public abstract android.view.View onCreatePanelView(int);
    method public abstract void onDetachedFromWindow();
    method public abstract boolean onMenuItemSelected(int, android.view.MenuItem);
    method public abstract boolean onMenuOpened(int, android.view.Menu);
    method public abstract void onPanelClosed(int, android.view.Menu);
    method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu);
    method public abstract boolean onSearchRequested();
    method public abstract boolean onSearchRequested(android.view.SearchEvent);
    method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams);
    method public abstract void onWindowFocusChanged(boolean);
    method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
    method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
  }

  public final class WindowAnimationFrameStats extends android.view.FrameStats implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.WindowAnimationFrameStats> CREATOR;
  }

  public final class WindowContentFrameStats extends android.view.FrameStats implements android.os.Parcelable {
    method public int describeContents();
    method public long getFramePostedTimeNano(int);
    method public long getFrameReadyTimeNano(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.WindowContentFrameStats> CREATOR;
  }

  public class WindowId implements android.os.Parcelable {
    method public int describeContents();
    method public boolean isFocused();
    method public void registerFocusObserver(android.view.WindowId.FocusObserver);
    method public void unregisterFocusObserver(android.view.WindowId.FocusObserver);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.WindowId> CREATOR;
  }

  public static abstract class WindowId.FocusObserver {
    ctor public WindowId.FocusObserver();
    method public abstract void onFocusGained(android.view.WindowId);
    method public abstract void onFocusLost(android.view.WindowId);
  }

  public final class WindowInsets {
    ctor public WindowInsets(android.view.WindowInsets);
    method public android.view.WindowInsets consumeStableInsets();
    method public android.view.WindowInsets consumeSystemWindowInsets();
    method public int getStableInsetBottom();
    method public int getStableInsetLeft();
    method public int getStableInsetRight();
    method public int getStableInsetTop();
    method public int getSystemWindowInsetBottom();
    method public int getSystemWindowInsetLeft();
    method public int getSystemWindowInsetRight();
    method public int getSystemWindowInsetTop();
    method public boolean hasInsets();
    method public boolean hasStableInsets();
    method public boolean hasSystemWindowInsets();
    method public boolean isConsumed();
    method public boolean isRound();
    method public android.view.WindowInsets replaceSystemWindowInsets(int, int, int, int);
    method public android.view.WindowInsets replaceSystemWindowInsets(android.graphics.Rect);
  }

  public abstract interface WindowManager implements android.view.ViewManager {
    method public abstract android.view.Display getDefaultDisplay();
    method public abstract void removeViewImmediate(android.view.View);
  }

  public static class WindowManager.BadTokenException extends java.lang.RuntimeException {
    ctor public WindowManager.BadTokenException();
    ctor public WindowManager.BadTokenException(java.lang.String);
  }

  public static class WindowManager.InvalidDisplayException extends java.lang.RuntimeException {
    ctor public WindowManager.InvalidDisplayException();
    ctor public WindowManager.InvalidDisplayException(java.lang.String);
  }

  public static class WindowManager.LayoutParams extends android.view.ViewGroup.LayoutParams implements android.os.Parcelable {
    ctor public WindowManager.LayoutParams();
    ctor public WindowManager.LayoutParams(int);
    ctor public WindowManager.LayoutParams(int, int);
    ctor public WindowManager.LayoutParams(int, int, int);
    ctor public WindowManager.LayoutParams(int, int, int, int, int);
    ctor public WindowManager.LayoutParams(int, int, int, int, int, int, int);
    ctor public WindowManager.LayoutParams(android.os.Parcel);
    method public final int copyFrom(android.view.WindowManager.LayoutParams);
    method public java.lang.String debug(java.lang.String);
    method public int describeContents();
    method public final java.lang.CharSequence getTitle();
    method public static boolean mayUseInputMethod(int);
    method public final void setTitle(java.lang.CharSequence);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ALPHA_CHANGED = 128; // 0x80
    field public static final int ANIMATION_CHANGED = 16; // 0x10
    field public static final float BRIGHTNESS_OVERRIDE_FULL = 1.0f;
    field public static final float BRIGHTNESS_OVERRIDE_NONE = -1.0f;
    field public static final float BRIGHTNESS_OVERRIDE_OFF = 0.0f;
    field public static final android.os.Parcelable.Creator<android.view.WindowManager.LayoutParams> CREATOR;
    field public static final int DIM_AMOUNT_CHANGED = 32; // 0x20
    field public static final int FIRST_APPLICATION_WINDOW = 1; // 0x1
    field public static final int FIRST_SUB_WINDOW = 1000; // 0x3e8
    field public static final int FIRST_SYSTEM_WINDOW = 2000; // 0x7d0
    field public static final int FLAGS_CHANGED = 4; // 0x4
    field public static final int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 1; // 0x1
    field public static final int FLAG_ALT_FOCUSABLE_IM = 131072; // 0x20000
    field public static final deprecated int FLAG_BLUR_BEHIND = 4; // 0x4
    field public static final int FLAG_DIM_BEHIND = 2; // 0x2
    field public static final int FLAG_DISMISS_KEYGUARD = 4194304; // 0x400000
    field public static final deprecated int FLAG_DITHER = 4096; // 0x1000
    field public static final int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS = -2147483648; // 0x80000000
    field public static final int FLAG_FORCE_NOT_FULLSCREEN = 2048; // 0x800
    field public static final int FLAG_FULLSCREEN = 1024; // 0x400
    field public static final int FLAG_HARDWARE_ACCELERATED = 16777216; // 0x1000000
    field public static final int FLAG_IGNORE_CHEEK_PRESSES = 32768; // 0x8000
    field public static final int FLAG_KEEP_SCREEN_ON = 128; // 0x80
    field public static final int FLAG_LAYOUT_ATTACHED_IN_DECOR = 1073741824; // 0x40000000
    field public static final int FLAG_LAYOUT_INSET_DECOR = 65536; // 0x10000
    field public static final int FLAG_LAYOUT_IN_OVERSCAN = 33554432; // 0x2000000
    field public static final int FLAG_LAYOUT_IN_SCREEN = 256; // 0x100
    field public static final int FLAG_LAYOUT_NO_LIMITS = 512; // 0x200
    field public static final int FLAG_LOCAL_FOCUS_MODE = 268435456; // 0x10000000
    field public static final int FLAG_NOT_FOCUSABLE = 8; // 0x8
    field public static final int FLAG_NOT_TOUCHABLE = 16; // 0x10
    field public static final int FLAG_NOT_TOUCH_MODAL = 32; // 0x20
    field public static final int FLAG_SCALED = 16384; // 0x4000
    field public static final int FLAG_SECURE = 8192; // 0x2000
    field public static final int FLAG_SHOW_WALLPAPER = 1048576; // 0x100000
    field public static final int FLAG_SHOW_WHEN_LOCKED = 524288; // 0x80000
    field public static final int FLAG_SPLIT_TOUCH = 8388608; // 0x800000
    field public static final deprecated int FLAG_TOUCHABLE_WHEN_WAKING = 64; // 0x40
    field public static final int FLAG_TRANSLUCENT_NAVIGATION = 134217728; // 0x8000000
    field public static final int FLAG_TRANSLUCENT_STATUS = 67108864; // 0x4000000
    field public static final int FLAG_TURN_SCREEN_ON = 2097152; // 0x200000
    field public static final int FLAG_WATCH_OUTSIDE_TOUCH = 262144; // 0x40000
    field public static final int FORMAT_CHANGED = 8; // 0x8
    field public static final int LAST_APPLICATION_WINDOW = 99; // 0x63
    field public static final int LAST_SUB_WINDOW = 1999; // 0x7cf
    field public static final int LAST_SYSTEM_WINDOW = 2999; // 0xbb7
    field public static final int LAYOUT_CHANGED = 1; // 0x1
    field public static final int MEMORY_TYPE_CHANGED = 256; // 0x100
    field public static final deprecated int MEMORY_TYPE_GPU = 2; // 0x2
    field public static final deprecated int MEMORY_TYPE_HARDWARE = 1; // 0x1
    field public static final deprecated int MEMORY_TYPE_NORMAL = 0; // 0x0
    field public static final deprecated int MEMORY_TYPE_PUSH_BUFFERS = 3; // 0x3
    field public static final int ROTATION_ANIMATION_CHANGED = 4096; // 0x1000
    field public static final int ROTATION_ANIMATION_CROSSFADE = 1; // 0x1
    field public static final int ROTATION_ANIMATION_JUMPCUT = 2; // 0x2
    field public static final int ROTATION_ANIMATION_ROTATE = 0; // 0x0
    field public static final int SCREEN_BRIGHTNESS_CHANGED = 2048; // 0x800
    field public static final int SCREEN_ORIENTATION_CHANGED = 1024; // 0x400
    field public static final int SOFT_INPUT_ADJUST_NOTHING = 48; // 0x30
    field public static final int SOFT_INPUT_ADJUST_PAN = 32; // 0x20
    field public static final int SOFT_INPUT_ADJUST_RESIZE = 16; // 0x10
    field public static final int SOFT_INPUT_ADJUST_UNSPECIFIED = 0; // 0x0
    field public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION = 256; // 0x100
    field public static final int SOFT_INPUT_MASK_ADJUST = 240; // 0xf0
    field public static final int SOFT_INPUT_MASK_STATE = 15; // 0xf
    field public static final int SOFT_INPUT_MODE_CHANGED = 512; // 0x200
    field public static final int SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3; // 0x3
    field public static final int SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5; // 0x5
    field public static final int SOFT_INPUT_STATE_HIDDEN = 2; // 0x2
    field public static final int SOFT_INPUT_STATE_UNCHANGED = 1; // 0x1
    field public static final int SOFT_INPUT_STATE_UNSPECIFIED = 0; // 0x0
    field public static final int SOFT_INPUT_STATE_VISIBLE = 4; // 0x4
    field public static final int TITLE_CHANGED = 64; // 0x40
    field public static final int TYPE_ACCESSIBILITY_OVERLAY = 2032; // 0x7f0
    field public static final int TYPE_APPLICATION = 2; // 0x2
    field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
    field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
    field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
    field public static final int TYPE_APPLICATION_STARTING = 3; // 0x3
    field public static final int TYPE_APPLICATION_SUB_PANEL = 1002; // 0x3ea
    field public static final int TYPE_BASE_APPLICATION = 1; // 0x1
    field public static final int TYPE_CHANGED = 2; // 0x2
    field public static final int TYPE_INPUT_METHOD = 2011; // 0x7db
    field public static final int TYPE_INPUT_METHOD_DIALOG = 2012; // 0x7dc
    field public static final int TYPE_KEYGUARD_DIALOG = 2009; // 0x7d9
    field public static final int TYPE_PHONE = 2002; // 0x7d2
    field public static final int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
    field public static final int TYPE_PRIVATE_PRESENTATION = 2030; // 0x7ee
    field public static final int TYPE_SEARCH_BAR = 2001; // 0x7d1
    field public static final int TYPE_STATUS_BAR = 2000; // 0x7d0
    field public static final int TYPE_STATUS_BAR_PANEL = 2014; // 0x7de
    field public static final int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
    field public static final int TYPE_SYSTEM_DIALOG = 2008; // 0x7d8
    field public static final int TYPE_SYSTEM_ERROR = 2010; // 0x7da
    field public static final int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
    field public static final int TYPE_TOAST = 2005; // 0x7d5
    field public static final int TYPE_WALLPAPER = 2013; // 0x7dd
    field public float alpha;
    field public float buttonBrightness;
    field public float dimAmount;
    field public int flags;
    field public int format;
    field public int gravity;
    field public float horizontalMargin;
    field public float horizontalWeight;
    field public deprecated int memoryType;
    field public java.lang.String packageName;
    field public float preferredRefreshRate;
    field public int rotationAnimation;
    field public float screenBrightness;
    field public int screenOrientation;
    field public int softInputMode;
    field public int systemUiVisibility;
    field public android.os.IBinder token;
    field public int type;
    field public float verticalMargin;
    field public float verticalWeight;
    field public int windowAnimations;
    field public int x;
    field public int y;
  }

}

package android.view.accessibility {

  public final class AccessibilityEvent extends android.view.accessibility.AccessibilityRecord implements android.os.Parcelable {
    method public void appendRecord(android.view.accessibility.AccessibilityRecord);
    method public int describeContents();
    method public static java.lang.String eventTypeToString(int);
    method public int getAction();
    method public int getContentChangeTypes();
    method public long getEventTime();
    method public int getEventType();
    method public int getMovementGranularity();
    method public java.lang.CharSequence getPackageName();
    method public android.view.accessibility.AccessibilityRecord getRecord(int);
    method public int getRecordCount();
    method public void initFromParcel(android.os.Parcel);
    method public static android.view.accessibility.AccessibilityEvent obtain(int);
    method public static android.view.accessibility.AccessibilityEvent obtain(android.view.accessibility.AccessibilityEvent);
    method public static android.view.accessibility.AccessibilityEvent obtain();
    method public void setAction(int);
    method public void setContentChangeTypes(int);
    method public void setEventTime(long);
    method public void setEventType(int);
    method public void setMovementGranularity(int);
    method public void setPackageName(java.lang.CharSequence);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION = 4; // 0x4
    field public static final int CONTENT_CHANGE_TYPE_SUBTREE = 1; // 0x1
    field public static final int CONTENT_CHANGE_TYPE_TEXT = 2; // 0x2
    field public static final int CONTENT_CHANGE_TYPE_UNDEFINED = 0; // 0x0
    field public static final android.os.Parcelable.Creator<android.view.accessibility.AccessibilityEvent> CREATOR;
    field public static final int INVALID_POSITION = -1; // 0xffffffff
    field public static final deprecated int MAX_TEXT_LENGTH = 500; // 0x1f4
    field public static final int TYPES_ALL_MASK = -1; // 0xffffffff
    field public static final int TYPE_ANNOUNCEMENT = 16384; // 0x4000
    field public static final int TYPE_GESTURE_DETECTION_END = 524288; // 0x80000
    field public static final int TYPE_GESTURE_DETECTION_START = 262144; // 0x40000
    field public static final int TYPE_NOTIFICATION_STATE_CHANGED = 64; // 0x40
    field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END = 1024; // 0x400
    field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START = 512; // 0x200
    field public static final int TYPE_TOUCH_INTERACTION_END = 2097152; // 0x200000
    field public static final int TYPE_TOUCH_INTERACTION_START = 1048576; // 0x100000
    field public static final int TYPE_VIEW_ACCESSIBILITY_FOCUSED = 32768; // 0x8000
    field public static final int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED = 65536; // 0x10000
    field public static final int TYPE_VIEW_CLICKED = 1; // 0x1
    field public static final int TYPE_VIEW_FOCUSED = 8; // 0x8
    field public static final int TYPE_VIEW_HOVER_ENTER = 128; // 0x80
    field public static final int TYPE_VIEW_HOVER_EXIT = 256; // 0x100
    field public static final int TYPE_VIEW_LONG_CLICKED = 2; // 0x2
    field public static final int TYPE_VIEW_SCROLLED = 4096; // 0x1000
    field public static final int TYPE_VIEW_SELECTED = 4; // 0x4
    field public static final int TYPE_VIEW_TEXT_CHANGED = 16; // 0x10
    field public static final int TYPE_VIEW_TEXT_SELECTION_CHANGED = 8192; // 0x2000
    field public static final int TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY = 131072; // 0x20000
    field public static final int TYPE_WINDOWS_CHANGED = 4194304; // 0x400000
    field public static final int TYPE_WINDOW_CONTENT_CHANGED = 2048; // 0x800
    field public static final int TYPE_WINDOW_STATE_CHANGED = 32; // 0x20
  }

  public abstract interface AccessibilityEventSource {
    method public abstract void sendAccessibilityEvent(int);
    method public abstract void sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent);
  }

  public final class AccessibilityManager {
    method public boolean addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
    method public boolean addTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
    method public deprecated java.util.List<android.content.pm.ServiceInfo> getAccessibilityServiceList();
    method public java.util.List<android.accessibilityservice.AccessibilityServiceInfo> getEnabledAccessibilityServiceList(int);
    method public java.util.List<android.accessibilityservice.AccessibilityServiceInfo> getInstalledAccessibilityServiceList();
    method public void interrupt();
    method public boolean isEnabled();
    method public boolean isTouchExplorationEnabled();
    method public boolean removeAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
    method public boolean removeTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
    method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
  }

  public static abstract interface AccessibilityManager.AccessibilityStateChangeListener {
    method public abstract void onAccessibilityStateChanged(boolean);
  }

  public static abstract interface AccessibilityManager.TouchExplorationStateChangeListener {
    method public abstract void onTouchExplorationStateChanged(boolean);
  }

  public class AccessibilityNodeInfo implements android.os.Parcelable {
    method public void addAction(android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction);
    method public deprecated void addAction(int);
    method public void addChild(android.view.View);
    method public void addChild(android.view.View, int);
    method public boolean canOpenPopup();
    method public int describeContents();
    method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(java.lang.String);
    method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByViewId(java.lang.String);
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method public android.view.accessibility.AccessibilityNodeInfo focusSearch(int);
    method public java.util.List<android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction> getActionList();
    method public deprecated int getActions();
    method public void getBoundsInParent(android.graphics.Rect);
    method public void getBoundsInScreen(android.graphics.Rect);
    method public android.view.accessibility.AccessibilityNodeInfo getChild(int);
    method public int getChildCount();
    method public java.lang.CharSequence getClassName();
    method public android.view.accessibility.AccessibilityNodeInfo.CollectionInfo getCollectionInfo();
    method public android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo getCollectionItemInfo();
    method public java.lang.CharSequence getContentDescription();
    method public java.lang.CharSequence getError();
    method public android.os.Bundle getExtras();
    method public int getInputType();
    method public android.view.accessibility.AccessibilityNodeInfo getLabelFor();
    method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy();
    method public int getLiveRegion();
    method public int getMaxTextLength();
    method public int getMovementGranularities();
    method public java.lang.CharSequence getPackageName();
    method public android.view.accessibility.AccessibilityNodeInfo getParent();
    method public android.view.accessibility.AccessibilityNodeInfo.RangeInfo getRangeInfo();
    method public java.lang.CharSequence getText();
    method public int getTextSelectionEnd();
    method public int getTextSelectionStart();
    method public android.view.accessibility.AccessibilityNodeInfo getTraversalAfter();
    method public android.view.accessibility.AccessibilityNodeInfo getTraversalBefore();
    method public java.lang.String getViewIdResourceName();
    method public android.view.accessibility.AccessibilityWindowInfo getWindow();
    method public int getWindowId();
    method public boolean isAccessibilityFocused();
    method public boolean isCheckable();
    method public boolean isChecked();
    method public boolean isClickable();
    method public boolean isContentInvalid();
    method public boolean isDismissable();
    method public boolean isEditable();
    method public boolean isEnabled();
    method public boolean isFocusable();
    method public boolean isFocused();
    method public boolean isLongClickable();
    method public boolean isMultiLine();
    method public boolean isPassword();
    method public boolean isScrollable();
    method public boolean isSelected();
    method public boolean isVisibleToUser();
    method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View);
    method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int);
    method public static android.view.accessibility.AccessibilityNodeInfo obtain();
    method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.accessibility.AccessibilityNodeInfo);
    method public boolean performAction(int);
    method public boolean performAction(int, android.os.Bundle);
    method public void recycle();
    method public boolean refresh();
    method public deprecated void removeAction(int);
    method public boolean removeAction(android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction);
    method public boolean removeChild(android.view.View);
    method public boolean removeChild(android.view.View, int);
    method public void setAccessibilityFocused(boolean);
    method public void setBoundsInParent(android.graphics.Rect);
    method public void setBoundsInScreen(android.graphics.Rect);
    method public void setCanOpenPopup(boolean);
    method public void setCheckable(boolean);
    method public void setChecked(boolean);
    method public void setClassName(java.lang.CharSequence);
    method public void setClickable(boolean);
    method public void setCollectionInfo(android.view.accessibility.AccessibilityNodeInfo.CollectionInfo);
    method public void setCollectionItemInfo(android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo);
    method public void setContentDescription(java.lang.CharSequence);
    method public void setContentInvalid(boolean);
    method public void setDismissable(boolean);
    method public void setEditable(boolean);
    method public void setEnabled(boolean);
    method public void setError(java.lang.CharSequence);
    method public void setFocusable(boolean);
    method public void setFocused(boolean);
    method public void setInputType(int);
    method public void setLabelFor(android.view.View);
    method public void setLabelFor(android.view.View, int);
    method public void setLabeledBy(android.view.View);
    method public void setLabeledBy(android.view.View, int);
    method public void setLiveRegion(int);
    method public void setLongClickable(boolean);
    method public void setMaxTextLength(int);
    method public void setMovementGranularities(int);
    method public void setMultiLine(boolean);
    method public void setPackageName(java.lang.CharSequence);
    method public void setParent(android.view.View);
    method public void setParent(android.view.View, int);
    method public void setPassword(boolean);
    method public void setRangeInfo(android.view.accessibility.AccessibilityNodeInfo.RangeInfo);
    method public void setScrollable(boolean);
    method public void setSelected(boolean);
    method public void setSource(android.view.View);
    method public void setSource(android.view.View, int);
    method public void setText(java.lang.CharSequence);
    method public void setTextSelection(int, int);
    method public void setTraversalAfter(android.view.View);
    method public void setTraversalAfter(android.view.View, int);
    method public void setTraversalBefore(android.view.View);
    method public void setTraversalBefore(android.view.View, int);
    method public void setViewIdResourceName(java.lang.String);
    method public void setVisibleToUser(boolean);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ACTION_ACCESSIBILITY_FOCUS = 64; // 0x40
    field public static final java.lang.String ACTION_ARGUMENT_COLUMN_INT = "android.view.accessibility.action.ARGUMENT_COLUMN_INT";
    field public static final java.lang.String ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN = "ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN";
    field public static final java.lang.String ACTION_ARGUMENT_HTML_ELEMENT_STRING = "ACTION_ARGUMENT_HTML_ELEMENT_STRING";
    field public static final java.lang.String ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT = "ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT";
    field public static final java.lang.String ACTION_ARGUMENT_ROW_INT = "android.view.accessibility.action.ARGUMENT_ROW_INT";
    field public static final java.lang.String ACTION_ARGUMENT_SELECTION_END_INT = "ACTION_ARGUMENT_SELECTION_END_INT";
    field public static final java.lang.String ACTION_ARGUMENT_SELECTION_START_INT = "ACTION_ARGUMENT_SELECTION_START_INT";
    field public static final java.lang.String ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE = "ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE";
    field public static final int ACTION_CLEAR_ACCESSIBILITY_FOCUS = 128; // 0x80
    field public static final int ACTION_CLEAR_FOCUS = 2; // 0x2
    field public static final int ACTION_CLEAR_SELECTION = 8; // 0x8
    field public static final int ACTION_CLICK = 16; // 0x10
    field public static final int ACTION_COLLAPSE = 524288; // 0x80000
    field public static final int ACTION_COPY = 16384; // 0x4000
    field public static final int ACTION_CUT = 65536; // 0x10000
    field public static final int ACTION_DISMISS = 1048576; // 0x100000
    field public static final int ACTION_EXPAND = 262144; // 0x40000
    field public static final int ACTION_FOCUS = 1; // 0x1
    field public static final int ACTION_LONG_CLICK = 32; // 0x20
    field public static final int ACTION_NEXT_AT_MOVEMENT_GRANULARITY = 256; // 0x100
    field public static final int ACTION_NEXT_HTML_ELEMENT = 1024; // 0x400
    field public static final int ACTION_PASTE = 32768; // 0x8000
    field public static final int ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY = 512; // 0x200
    field public static final int ACTION_PREVIOUS_HTML_ELEMENT = 2048; // 0x800
    field public static final int ACTION_SCROLL_BACKWARD = 8192; // 0x2000
    field public static final int ACTION_SCROLL_FORWARD = 4096; // 0x1000
    field public static final int ACTION_SELECT = 4; // 0x4
    field public static final int ACTION_SET_SELECTION = 131072; // 0x20000
    field public static final int ACTION_SET_TEXT = 2097152; // 0x200000
    field public static final android.os.Parcelable.Creator<android.view.accessibility.AccessibilityNodeInfo> CREATOR;
    field public static final int FOCUS_ACCESSIBILITY = 2; // 0x2
    field public static final int FOCUS_INPUT = 1; // 0x1
    field public static final int MOVEMENT_GRANULARITY_CHARACTER = 1; // 0x1
    field public static final int MOVEMENT_GRANULARITY_LINE = 4; // 0x4
    field public static final int MOVEMENT_GRANULARITY_PAGE = 16; // 0x10
    field public static final int MOVEMENT_GRANULARITY_PARAGRAPH = 8; // 0x8
    field public static final int MOVEMENT_GRANULARITY_WORD = 2; // 0x2
  }

  public static final class AccessibilityNodeInfo.AccessibilityAction {
    ctor public AccessibilityNodeInfo.AccessibilityAction(int, java.lang.CharSequence);
    method public int getId();
    method public java.lang.CharSequence getLabel();
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_ACCESSIBILITY_FOCUS;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_CLEAR_ACCESSIBILITY_FOCUS;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_CLEAR_FOCUS;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_CLEAR_SELECTION;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_CLICK;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_COLLAPSE;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_COPY;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_CUT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_DISMISS;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_EXPAND;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_FOCUS;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_LONG_CLICK;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_NEXT_AT_MOVEMENT_GRANULARITY;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_NEXT_HTML_ELEMENT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_PASTE;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_PREVIOUS_HTML_ELEMENT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_BACKWARD;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_FORWARD;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_TO_POSITION;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SELECT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SET_SELECTION;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SET_TEXT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SHOW_ON_SCREEN;
  }

  public static final class AccessibilityNodeInfo.CollectionInfo {
    method public int getColumnCount();
    method public int getRowCount();
    method public int getSelectionMode();
    method public boolean isHierarchical();
    method public static android.view.accessibility.AccessibilityNodeInfo.CollectionInfo obtain(int, int, boolean);
    method public static android.view.accessibility.AccessibilityNodeInfo.CollectionInfo obtain(int, int, boolean, int);
    field public static final int SELECTION_MODE_MULTIPLE = 2; // 0x2
    field public static final int SELECTION_MODE_NONE = 0; // 0x0
    field public static final int SELECTION_MODE_SINGLE = 1; // 0x1
  }

  public static final class AccessibilityNodeInfo.CollectionItemInfo {
    method public int getColumnIndex();
    method public int getColumnSpan();
    method public int getRowIndex();
    method public int getRowSpan();
    method public boolean isHeading();
    method public boolean isSelected();
    method public static android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo obtain(int, int, int, int, boolean);
    method public static android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo obtain(int, int, int, int, boolean, boolean);
  }

  public static final class AccessibilityNodeInfo.RangeInfo {
    method public float getCurrent();
    method public float getMax();
    method public float getMin();
    method public int getType();
    method public static android.view.accessibility.AccessibilityNodeInfo.RangeInfo obtain(int, float, float, float);
    field public static final int RANGE_TYPE_FLOAT = 1; // 0x1
    field public static final int RANGE_TYPE_INT = 0; // 0x0
    field public static final int RANGE_TYPE_PERCENT = 2; // 0x2
  }

  public abstract class AccessibilityNodeProvider {
    ctor public AccessibilityNodeProvider();
    method public android.view.accessibility.AccessibilityNodeInfo createAccessibilityNodeInfo(int);
    method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(java.lang.String, int);
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method public boolean performAction(int, int, android.os.Bundle);
    field public static final int HOST_VIEW_ID = -1; // 0xffffffff
  }

  public class AccessibilityRecord {
    method public int getAddedCount();
    method public java.lang.CharSequence getBeforeText();
    method public java.lang.CharSequence getClassName();
    method public java.lang.CharSequence getContentDescription();
    method public int getCurrentItemIndex();
    method public int getFromIndex();
    method public int getItemCount();
    method public int getMaxScrollX();
    method public int getMaxScrollY();
    method public android.os.Parcelable getParcelableData();
    method public int getRemovedCount();
    method public int getScrollX();
    method public int getScrollY();
    method public android.view.accessibility.AccessibilityNodeInfo getSource();
    method public java.util.List<java.lang.CharSequence> getText();
    method public int getToIndex();
    method public int getWindowId();
    method public boolean isChecked();
    method public boolean isEnabled();
    method public boolean isFullScreen();
    method public boolean isPassword();
    method public boolean isScrollable();
    method public static android.view.accessibility.AccessibilityRecord obtain(android.view.accessibility.AccessibilityRecord);
    method public static android.view.accessibility.AccessibilityRecord obtain();
    method public void recycle();
    method public void setAddedCount(int);
    method public void setBeforeText(java.lang.CharSequence);
    method public void setChecked(boolean);
    method public void setClassName(java.lang.CharSequence);
    method public void setContentDescription(java.lang.CharSequence);
    method public void setCurrentItemIndex(int);
    method public void setEnabled(boolean);
    method public void setFromIndex(int);
    method public void setFullScreen(boolean);
    method public void setItemCount(int);
    method public void setMaxScrollX(int);
    method public void setMaxScrollY(int);
    method public void setParcelableData(android.os.Parcelable);
    method public void setPassword(boolean);
    method public void setRemovedCount(int);
    method public void setScrollX(int);
    method public void setScrollY(int);
    method public void setScrollable(boolean);
    method public void setSource(android.view.View);
    method public void setSource(android.view.View, int);
    method public void setToIndex(int);
  }

  public final class AccessibilityWindowInfo implements android.os.Parcelable {
    method public int describeContents();
    method public void getBoundsInScreen(android.graphics.Rect);
    method public android.view.accessibility.AccessibilityWindowInfo getChild(int);
    method public int getChildCount();
    method public int getId();
    method public int getLayer();
    method public android.view.accessibility.AccessibilityWindowInfo getParent();
    method public android.view.accessibility.AccessibilityNodeInfo getRoot();
    method public int getType();
    method public boolean isAccessibilityFocused();
    method public boolean isActive();
    method public boolean isFocused();
    method public static android.view.accessibility.AccessibilityWindowInfo obtain();
    method public static android.view.accessibility.AccessibilityWindowInfo obtain(android.view.accessibility.AccessibilityWindowInfo);
    method public void recycle();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.accessibility.AccessibilityWindowInfo> CREATOR;
    field public static final int TYPE_ACCESSIBILITY_OVERLAY = 4; // 0x4
    field public static final int TYPE_APPLICATION = 1; // 0x1
    field public static final int TYPE_INPUT_METHOD = 2; // 0x2
    field public static final int TYPE_SYSTEM = 3; // 0x3
  }

  public class CaptioningManager {
    method public void addCaptioningChangeListener(android.view.accessibility.CaptioningManager.CaptioningChangeListener);
    method public final float getFontScale();
    method public final java.util.Locale getLocale();
    method public android.view.accessibility.CaptioningManager.CaptionStyle getUserStyle();
    method public final boolean isEnabled();
    method public void removeCaptioningChangeListener(android.view.accessibility.CaptioningManager.CaptioningChangeListener);
  }

  public static final class CaptioningManager.CaptionStyle {
    method public android.graphics.Typeface getTypeface();
    method public boolean hasBackgroundColor();
    method public boolean hasEdgeColor();
    method public boolean hasEdgeType();
    method public boolean hasForegroundColor();
    method public boolean hasWindowColor();
    field public static final int EDGE_TYPE_DEPRESSED = 4; // 0x4
    field public static final int EDGE_TYPE_DROP_SHADOW = 2; // 0x2
    field public static final int EDGE_TYPE_NONE = 0; // 0x0
    field public static final int EDGE_TYPE_OUTLINE = 1; // 0x1
    field public static final int EDGE_TYPE_RAISED = 3; // 0x3
    field public static final int EDGE_TYPE_UNSPECIFIED = -1; // 0xffffffff
    field public final int backgroundColor;
    field public final int edgeColor;
    field public final int edgeType;
    field public final int foregroundColor;
    field public final int windowColor;
  }

  public static abstract class CaptioningManager.CaptioningChangeListener {
    ctor public CaptioningManager.CaptioningChangeListener();
    method public void onEnabledChanged(boolean);
    method public void onFontScaleChanged(float);
    method public void onLocaleChanged(java.util.Locale);
    method public void onUserStyleChanged(android.view.accessibility.CaptioningManager.CaptionStyle);
  }

}

package android.view.animation {

  public class AccelerateDecelerateInterpolator extends android.view.animation.BaseInterpolator {
    ctor public AccelerateDecelerateInterpolator();
    ctor public AccelerateDecelerateInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class AccelerateInterpolator extends android.view.animation.BaseInterpolator {
    ctor public AccelerateInterpolator();
    ctor public AccelerateInterpolator(float);
    ctor public AccelerateInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class AlphaAnimation extends android.view.animation.Animation {
    ctor public AlphaAnimation(android.content.Context, android.util.AttributeSet);
    ctor public AlphaAnimation(float, float);
  }

  public abstract class Animation implements java.lang.Cloneable {
    ctor public Animation();
    ctor public Animation(android.content.Context, android.util.AttributeSet);
    method protected void applyTransformation(float, android.view.animation.Transformation);
    method public void cancel();
    method public long computeDurationHint();
    method protected void ensureInterpolator();
    method public int getBackgroundColor();
    method public boolean getDetachWallpaper();
    method public long getDuration();
    method public boolean getFillAfter();
    method public boolean getFillBefore();
    method public android.view.animation.Interpolator getInterpolator();
    method public int getRepeatCount();
    method public int getRepeatMode();
    method protected float getScaleFactor();
    method public long getStartOffset();
    method public long getStartTime();
    method public boolean getTransformation(long, android.view.animation.Transformation);
    method public boolean getTransformation(long, android.view.animation.Transformation, float);
    method public int getZAdjustment();
    method public boolean hasEnded();
    method public boolean hasStarted();
    method public void initialize(int, int, int, int);
    method public boolean isFillEnabled();
    method public boolean isInitialized();
    method public void reset();
    method protected float resolveSize(int, float, int, int);
    method public void restrictDuration(long);
    method public void scaleCurrentDuration(float);
    method public void setAnimationListener(android.view.animation.Animation.AnimationListener);
    method public void setBackgroundColor(int);
    method public void setDetachWallpaper(boolean);
    method public void setDuration(long);
    method public void setFillAfter(boolean);
    method public void setFillBefore(boolean);
    method public void setFillEnabled(boolean);
    method public void setInterpolator(android.content.Context, int);
    method public void setInterpolator(android.view.animation.Interpolator);
    method public void setRepeatCount(int);
    method public void setRepeatMode(int);
    method public void setStartOffset(long);
    method public void setStartTime(long);
    method public void setZAdjustment(int);
    method public void start();
    method public void startNow();
    method public boolean willChangeBounds();
    method public boolean willChangeTransformationMatrix();
    field public static final int ABSOLUTE = 0; // 0x0
    field public static final int INFINITE = -1; // 0xffffffff
    field public static final int RELATIVE_TO_PARENT = 2; // 0x2
    field public static final int RELATIVE_TO_SELF = 1; // 0x1
    field public static final int RESTART = 1; // 0x1
    field public static final int REVERSE = 2; // 0x2
    field public static final int START_ON_FIRST_FRAME = -1; // 0xffffffff
    field public static final int ZORDER_BOTTOM = -1; // 0xffffffff
    field public static final int ZORDER_NORMAL = 0; // 0x0
    field public static final int ZORDER_TOP = 1; // 0x1
  }

  public static abstract interface Animation.AnimationListener {
    method public abstract void onAnimationEnd(android.view.animation.Animation);
    method public abstract void onAnimationRepeat(android.view.animation.Animation);
    method public abstract void onAnimationStart(android.view.animation.Animation);
  }

  protected static class Animation.Description {
    ctor protected Animation.Description();
    field public int type;
    field public float value;
  }

  public class AnimationSet extends android.view.animation.Animation {
    ctor public AnimationSet(android.content.Context, android.util.AttributeSet);
    ctor public AnimationSet(boolean);
    method public void addAnimation(android.view.animation.Animation);
    method public java.util.List<android.view.animation.Animation> getAnimations();
  }

  public class AnimationUtils {
    ctor public AnimationUtils();
    method public static long currentAnimationTimeMillis();
    method public static android.view.animation.Animation loadAnimation(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
    method public static android.view.animation.Interpolator loadInterpolator(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
    method public static android.view.animation.LayoutAnimationController loadLayoutAnimation(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
    method public static android.view.animation.Animation makeInAnimation(android.content.Context, boolean);
    method public static android.view.animation.Animation makeInChildBottomAnimation(android.content.Context);
    method public static android.view.animation.Animation makeOutAnimation(android.content.Context, boolean);
  }

  public class AnticipateInterpolator extends android.view.animation.BaseInterpolator {
    ctor public AnticipateInterpolator();
    ctor public AnticipateInterpolator(float);
    ctor public AnticipateInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class AnticipateOvershootInterpolator extends android.view.animation.BaseInterpolator {
    ctor public AnticipateOvershootInterpolator();
    ctor public AnticipateOvershootInterpolator(float);
    ctor public AnticipateOvershootInterpolator(float, float);
    ctor public AnticipateOvershootInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public abstract class BaseInterpolator implements android.view.animation.Interpolator {
    ctor public BaseInterpolator();
  }

  public class BounceInterpolator extends android.view.animation.BaseInterpolator {
    ctor public BounceInterpolator();
    ctor public BounceInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class CycleInterpolator extends android.view.animation.BaseInterpolator {
    ctor public CycleInterpolator(float);
    ctor public CycleInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class DecelerateInterpolator extends android.view.animation.BaseInterpolator {
    ctor public DecelerateInterpolator();
    ctor public DecelerateInterpolator(float);
    ctor public DecelerateInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class GridLayoutAnimationController extends android.view.animation.LayoutAnimationController {
    ctor public GridLayoutAnimationController(android.content.Context, android.util.AttributeSet);
    ctor public GridLayoutAnimationController(android.view.animation.Animation);
    ctor public GridLayoutAnimationController(android.view.animation.Animation, float, float);
    method public float getColumnDelay();
    method public int getDirection();
    method public int getDirectionPriority();
    method public float getRowDelay();
    method public void setColumnDelay(float);
    method public void setDirection(int);
    method public void setDirectionPriority(int);
    method public void setRowDelay(float);
    field public static final int DIRECTION_BOTTOM_TO_TOP = 2; // 0x2
    field public static final int DIRECTION_HORIZONTAL_MASK = 1; // 0x1
    field public static final int DIRECTION_LEFT_TO_RIGHT = 0; // 0x0
    field public static final int DIRECTION_RIGHT_TO_LEFT = 1; // 0x1
    field public static final int DIRECTION_TOP_TO_BOTTOM = 0; // 0x0
    field public static final int DIRECTION_VERTICAL_MASK = 2; // 0x2
    field public static final int PRIORITY_COLUMN = 1; // 0x1
    field public static final int PRIORITY_NONE = 0; // 0x0
    field public static final int PRIORITY_ROW = 2; // 0x2
  }

  public static class GridLayoutAnimationController.AnimationParameters extends android.view.animation.LayoutAnimationController.AnimationParameters {
    ctor public GridLayoutAnimationController.AnimationParameters();
    field public int column;
    field public int columnsCount;
    field public int row;
    field public int rowsCount;
  }

  public abstract interface Interpolator implements android.animation.TimeInterpolator {
  }

  public class LayoutAnimationController {
    ctor public LayoutAnimationController(android.content.Context, android.util.AttributeSet);
    ctor public LayoutAnimationController(android.view.animation.Animation);
    ctor public LayoutAnimationController(android.view.animation.Animation, float);
    method public android.view.animation.Animation getAnimation();
    method public final android.view.animation.Animation getAnimationForView(android.view.View);
    method public float getDelay();
    method protected long getDelayForView(android.view.View);
    method public android.view.animation.Interpolator getInterpolator();
    method public int getOrder();
    method protected int getTransformedIndex(android.view.animation.LayoutAnimationController.AnimationParameters);
    method public boolean isDone();
    method public void setAnimation(android.content.Context, int);
    method public void setAnimation(android.view.animation.Animation);
    method public void setDelay(float);
    method public void setInterpolator(android.content.Context, int);
    method public void setInterpolator(android.view.animation.Interpolator);
    method public void setOrder(int);
    method public void start();
    method public boolean willOverlap();
    field public static final int ORDER_NORMAL = 0; // 0x0
    field public static final int ORDER_RANDOM = 2; // 0x2
    field public static final int ORDER_REVERSE = 1; // 0x1
    field protected android.view.animation.Animation mAnimation;
    field protected android.view.animation.Interpolator mInterpolator;
    field protected java.util.Random mRandomizer;
  }

  public static class LayoutAnimationController.AnimationParameters {
    ctor public LayoutAnimationController.AnimationParameters();
    field public int count;
    field public int index;
  }

  public class LinearInterpolator extends android.view.animation.BaseInterpolator {
    ctor public LinearInterpolator();
    ctor public LinearInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class OvershootInterpolator extends android.view.animation.BaseInterpolator {
    ctor public OvershootInterpolator();
    ctor public OvershootInterpolator(float);
    ctor public OvershootInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class PathInterpolator extends android.view.animation.BaseInterpolator {
    ctor public PathInterpolator(android.graphics.Path);
    ctor public PathInterpolator(float, float);
    ctor public PathInterpolator(float, float, float, float);
    ctor public PathInterpolator(android.content.Context, android.util.AttributeSet);
    method public float getInterpolation(float);
  }

  public class RotateAnimation extends android.view.animation.Animation {
    ctor public RotateAnimation(android.content.Context, android.util.AttributeSet);
    ctor public RotateAnimation(float, float);
    ctor public RotateAnimation(float, float, float, float);
    ctor public RotateAnimation(float, float, int, float, int, float);
  }

  public class ScaleAnimation extends android.view.animation.Animation {
    ctor public ScaleAnimation(android.content.Context, android.util.AttributeSet);
    ctor public ScaleAnimation(float, float, float, float);
    ctor public ScaleAnimation(float, float, float, float, float, float);
    ctor public ScaleAnimation(float, float, float, float, int, float, int, float);
  }

  public class Transformation {
    ctor public Transformation();
    method public void clear();
    method public void compose(android.view.animation.Transformation);
    method public float getAlpha();
    method public android.graphics.Matrix getMatrix();
    method public int getTransformationType();
    method public void set(android.view.animation.Transformation);
    method public void setAlpha(float);
    method public void setTransformationType(int);
    method public java.lang.String toShortString();
    field public static final int TYPE_ALPHA = 1; // 0x1
    field public static final int TYPE_BOTH = 3; // 0x3
    field public static final int TYPE_IDENTITY = 0; // 0x0
    field public static final int TYPE_MATRIX = 2; // 0x2
    field protected float mAlpha;
    field protected android.graphics.Matrix mMatrix;
    field protected int mTransformationType;
  }

  public class TranslateAnimation extends android.view.animation.Animation {
    ctor public TranslateAnimation(android.content.Context, android.util.AttributeSet);
    ctor public TranslateAnimation(float, float, float, float);
    ctor public TranslateAnimation(int, float, int, float, int, float, int, float);
  }

}

package android.view.inputmethod {

  public class BaseInputConnection implements android.view.inputmethod.InputConnection {
    ctor public BaseInputConnection(android.view.View, boolean);
    method public boolean beginBatchEdit();
    method public boolean clearMetaKeyStates(int);
    method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
    method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
    method public boolean commitText(java.lang.CharSequence, int);
    method public boolean deleteSurroundingText(int, int);
    method public boolean endBatchEdit();
    method public boolean finishComposingText();
    method public static int getComposingSpanEnd(android.text.Spannable);
    method public static int getComposingSpanStart(android.text.Spannable);
    method public int getCursorCapsMode(int);
    method public android.text.Editable getEditable();
    method public android.view.inputmethod.ExtractedText getExtractedText(android.view.inputmethod.ExtractedTextRequest, int);
    method public java.lang.CharSequence getSelectedText(int);
    method public java.lang.CharSequence getTextAfterCursor(int, int);
    method public java.lang.CharSequence getTextBeforeCursor(int, int);
    method public boolean performContextMenuAction(int);
    method public boolean performEditorAction(int);
    method public boolean performPrivateCommand(java.lang.String, android.os.Bundle);
    method public static final void removeComposingSpans(android.text.Spannable);
    method public boolean reportFullscreenMode(boolean);
    method public boolean requestCursorUpdates(int);
    method public boolean sendKeyEvent(android.view.KeyEvent);
    method public boolean setComposingRegion(int, int);
    method public static void setComposingSpans(android.text.Spannable);
    method public boolean setComposingText(java.lang.CharSequence, int);
    method public boolean setSelection(int, int);
  }

  public final class CompletionInfo implements android.os.Parcelable {
    ctor public CompletionInfo(long, int, java.lang.CharSequence);
    ctor public CompletionInfo(long, int, java.lang.CharSequence, java.lang.CharSequence);
    method public int describeContents();
    method public long getId();
    method public java.lang.CharSequence getLabel();
    method public int getPosition();
    method public java.lang.CharSequence getText();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.CompletionInfo> CREATOR;
  }

  public final class CorrectionInfo implements android.os.Parcelable {
    ctor public CorrectionInfo(int, java.lang.CharSequence, java.lang.CharSequence);
    method public int describeContents();
    method public java.lang.CharSequence getNewText();
    method public int getOffset();
    method public java.lang.CharSequence getOldText();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.CorrectionInfo> CREATOR;
  }

  public final class CursorAnchorInfo implements android.os.Parcelable {
    ctor public CursorAnchorInfo(android.os.Parcel);
    method public int describeContents();
    method public android.graphics.RectF getCharacterBounds(int);
    method public int getCharacterBoundsFlags(int);
    method public java.lang.CharSequence getComposingText();
    method public int getComposingTextStart();
    method public float getInsertionMarkerBaseline();
    method public float getInsertionMarkerBottom();
    method public int getInsertionMarkerFlags();
    method public float getInsertionMarkerHorizontal();
    method public float getInsertionMarkerTop();
    method public android.graphics.Matrix getMatrix();
    method public int getSelectionEnd();
    method public int getSelectionStart();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.CursorAnchorInfo> CREATOR;
    field public static final int FLAG_HAS_INVISIBLE_REGION = 2; // 0x2
    field public static final int FLAG_HAS_VISIBLE_REGION = 1; // 0x1
    field public static final int FLAG_IS_RTL = 4; // 0x4
  }

  public static final class CursorAnchorInfo.Builder {
    ctor public CursorAnchorInfo.Builder();
    method public android.view.inputmethod.CursorAnchorInfo.Builder addCharacterBounds(int, float, float, float, float, int);
    method public android.view.inputmethod.CursorAnchorInfo build();
    method public void reset();
    method public android.view.inputmethod.CursorAnchorInfo.Builder setComposingText(int, java.lang.CharSequence);
    method public android.view.inputmethod.CursorAnchorInfo.Builder setInsertionMarkerLocation(float, float, float, float, int);
    method public android.view.inputmethod.CursorAnchorInfo.Builder setMatrix(android.graphics.Matrix);
    method public android.view.inputmethod.CursorAnchorInfo.Builder setSelectionRange(int, int);
  }

  public class EditorInfo implements android.text.InputType android.os.Parcelable {
    ctor public EditorInfo();
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public final void makeCompatible(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.EditorInfo> CREATOR;
    field public static final int IME_ACTION_DONE = 6; // 0x6
    field public static final int IME_ACTION_GO = 2; // 0x2
    field public static final int IME_ACTION_NEXT = 5; // 0x5
    field public static final int IME_ACTION_NONE = 1; // 0x1
    field public static final int IME_ACTION_PREVIOUS = 7; // 0x7
    field public static final int IME_ACTION_SEARCH = 3; // 0x3
    field public static final int IME_ACTION_SEND = 4; // 0x4
    field public static final int IME_ACTION_UNSPECIFIED = 0; // 0x0
    field public static final int IME_FLAG_FORCE_ASCII = -2147483648; // 0x80000000
    field public static final int IME_FLAG_NAVIGATE_NEXT = 134217728; // 0x8000000
    field public static final int IME_FLAG_NAVIGATE_PREVIOUS = 67108864; // 0x4000000
    field public static final int IME_FLAG_NO_ACCESSORY_ACTION = 536870912; // 0x20000000
    field public static final int IME_FLAG_NO_ENTER_ACTION = 1073741824; // 0x40000000
    field public static final int IME_FLAG_NO_EXTRACT_UI = 268435456; // 0x10000000
    field public static final int IME_FLAG_NO_FULLSCREEN = 33554432; // 0x2000000
    field public static final int IME_MASK_ACTION = 255; // 0xff
    field public static final int IME_NULL = 0; // 0x0
    field public int actionId;
    field public java.lang.CharSequence actionLabel;
    field public android.os.Bundle extras;
    field public int fieldId;
    field public java.lang.String fieldName;
    field public java.lang.CharSequence hintText;
    field public int imeOptions;
    field public int initialCapsMode;
    field public int initialSelEnd;
    field public int initialSelStart;
    field public int inputType;
    field public java.lang.CharSequence label;
    field public java.lang.String packageName;
    field public java.lang.String privateImeOptions;
  }

  public class ExtractedText implements android.os.Parcelable {
    ctor public ExtractedText();
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.ExtractedText> CREATOR;
    field public static final int FLAG_SELECTING = 2; // 0x2
    field public static final int FLAG_SINGLE_LINE = 1; // 0x1
    field public int flags;
    field public int partialEndOffset;
    field public int partialStartOffset;
    field public int selectionEnd;
    field public int selectionStart;
    field public int startOffset;
    field public java.lang.CharSequence text;
  }

  public class ExtractedTextRequest implements android.os.Parcelable {
    ctor public ExtractedTextRequest();
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.ExtractedTextRequest> CREATOR;
    field public int flags;
    field public int hintMaxChars;
    field public int hintMaxLines;
    field public int token;
  }

  public final class InputBinding implements android.os.Parcelable {
    ctor public InputBinding(android.view.inputmethod.InputConnection, android.os.IBinder, int, int);
    ctor public InputBinding(android.view.inputmethod.InputConnection, android.view.inputmethod.InputBinding);
    method public int describeContents();
    method public android.view.inputmethod.InputConnection getConnection();
    method public android.os.IBinder getConnectionToken();
    method public int getPid();
    method public int getUid();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputBinding> CREATOR;
  }

  public abstract interface InputConnection {
    method public abstract boolean beginBatchEdit();
    method public abstract boolean clearMetaKeyStates(int);
    method public abstract boolean commitCompletion(android.view.inputmethod.CompletionInfo);
    method public abstract boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
    method public abstract boolean commitText(java.lang.CharSequence, int);
    method public abstract boolean deleteSurroundingText(int, int);
    method public abstract boolean endBatchEdit();
    method public abstract boolean finishComposingText();
    method public abstract int getCursorCapsMode(int);
    method public abstract android.view.inputmethod.ExtractedText getExtractedText(android.view.inputmethod.ExtractedTextRequest, int);
    method public abstract java.lang.CharSequence getSelectedText(int);
    method public abstract java.lang.CharSequence getTextAfterCursor(int, int);
    method public abstract java.lang.CharSequence getTextBeforeCursor(int, int);
    method public abstract boolean performContextMenuAction(int);
    method public abstract boolean performEditorAction(int);
    method public abstract boolean performPrivateCommand(java.lang.String, android.os.Bundle);
    method public abstract boolean reportFullscreenMode(boolean);
    method public abstract boolean requestCursorUpdates(int);
    method public abstract boolean sendKeyEvent(android.view.KeyEvent);
    method public abstract boolean setComposingRegion(int, int);
    method public abstract boolean setComposingText(java.lang.CharSequence, int);
    method public abstract boolean setSelection(int, int);
    field public static final int CURSOR_UPDATE_IMMEDIATE = 1; // 0x1
    field public static final int CURSOR_UPDATE_MONITOR = 2; // 0x2
    field public static final int GET_EXTRACTED_TEXT_MONITOR = 1; // 0x1
    field public static final int GET_TEXT_WITH_STYLES = 1; // 0x1
  }

  public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
    ctor public InputConnectionWrapper(android.view.inputmethod.InputConnection, boolean);
    method public boolean beginBatchEdit();
    method public boolean clearMetaKeyStates(int);
    method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
    method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
    method public boolean commitText(java.lang.CharSequence, int);
    method public boolean deleteSurroundingText(int, int);
    method public boolean endBatchEdit();
    method public boolean finishComposingText();
    method public int getCursorCapsMode(int);
    method public android.view.inputmethod.ExtractedText getExtractedText(android.view.inputmethod.ExtractedTextRequest, int);
    method public java.lang.CharSequence getSelectedText(int);
    method public java.lang.CharSequence getTextAfterCursor(int, int);
    method public java.lang.CharSequence getTextBeforeCursor(int, int);
    method public boolean performContextMenuAction(int);
    method public boolean performEditorAction(int);
    method public boolean performPrivateCommand(java.lang.String, android.os.Bundle);
    method public boolean reportFullscreenMode(boolean);
    method public boolean requestCursorUpdates(int);
    method public boolean sendKeyEvent(android.view.KeyEvent);
    method public boolean setComposingRegion(int, int);
    method public boolean setComposingText(java.lang.CharSequence, int);
    method public boolean setSelection(int, int);
    method public void setTarget(android.view.inputmethod.InputConnection);
  }

  public abstract interface InputMethod {
    method public abstract void attachToken(android.os.IBinder);
    method public abstract void bindInput(android.view.inputmethod.InputBinding);
    method public abstract void changeInputMethodSubtype(android.view.inputmethod.InputMethodSubtype);
    method public abstract void createSession(android.view.inputmethod.InputMethod.SessionCallback);
    method public abstract void hideSoftInput(int, android.os.ResultReceiver);
    method public abstract void restartInput(android.view.inputmethod.InputConnection, android.view.inputmethod.EditorInfo);
    method public abstract void revokeSession(android.view.inputmethod.InputMethodSession);
    method public abstract void setSessionEnabled(android.view.inputmethod.InputMethodSession, boolean);
    method public abstract void showSoftInput(int, android.os.ResultReceiver);
    method public abstract void startInput(android.view.inputmethod.InputConnection, android.view.inputmethod.EditorInfo);
    method public abstract void unbindInput();
    field public static final java.lang.String SERVICE_INTERFACE = "android.view.InputMethod";
    field public static final java.lang.String SERVICE_META_DATA = "android.view.im";
    field public static final int SHOW_EXPLICIT = 1; // 0x1
    field public static final int SHOW_FORCED = 2; // 0x2
  }

  public static abstract interface InputMethod.SessionCallback {
    method public abstract void sessionCreated(android.view.inputmethod.InputMethodSession);
  }

  public final class InputMethodInfo implements android.os.Parcelable {
    ctor public InputMethodInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    ctor public InputMethodInfo(java.lang.String, java.lang.String, java.lang.CharSequence, java.lang.String);
    method public int describeContents();
    method public void dump(android.util.Printer, java.lang.String);
    method public android.content.ComponentName getComponent();
    method public java.lang.String getId();
    method public int getIsDefaultResourceId();
    method public java.lang.String getPackageName();
    method public android.content.pm.ServiceInfo getServiceInfo();
    method public java.lang.String getServiceName();
    method public java.lang.String getSettingsActivity();
    method public android.view.inputmethod.InputMethodSubtype getSubtypeAt(int);
    method public int getSubtypeCount();
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputMethodInfo> CREATOR;
  }

  public final class InputMethodManager {
    method public void displayCompletions(android.view.View, android.view.inputmethod.CompletionInfo[]);
    method public android.view.inputmethod.InputMethodSubtype getCurrentInputMethodSubtype();
    method public java.util.List<android.view.inputmethod.InputMethodInfo> getEnabledInputMethodList();
    method public java.util.List<android.view.inputmethod.InputMethodSubtype> getEnabledInputMethodSubtypeList(android.view.inputmethod.InputMethodInfo, boolean);
    method public java.util.List<android.view.inputmethod.InputMethodInfo> getInputMethodList();
    method public android.view.inputmethod.InputMethodSubtype getLastInputMethodSubtype();
    method public java.util.Map<android.view.inputmethod.InputMethodInfo, java.util.List<android.view.inputmethod.InputMethodSubtype>> getShortcutInputMethodsAndSubtypes();
    method public void hideSoftInputFromInputMethod(android.os.IBinder, int);
    method public boolean hideSoftInputFromWindow(android.os.IBinder, int);
    method public boolean hideSoftInputFromWindow(android.os.IBinder, int, android.os.ResultReceiver);
    method public void hideStatusIcon(android.os.IBinder);
    method public boolean isAcceptingText();
    method public boolean isActive(android.view.View);
    method public boolean isActive();
    method public boolean isFullscreenMode();
    method public deprecated boolean isWatchingCursor(android.view.View);
    method public void restartInput(android.view.View);
    method public void sendAppPrivateCommand(android.view.View, java.lang.String, android.os.Bundle);
    method public void setAdditionalInputMethodSubtypes(java.lang.String, android.view.inputmethod.InputMethodSubtype[]);
    method public boolean setCurrentInputMethodSubtype(android.view.inputmethod.InputMethodSubtype);
    method public void setInputMethod(android.os.IBinder, java.lang.String);
    method public void setInputMethodAndSubtype(android.os.IBinder, java.lang.String, android.view.inputmethod.InputMethodSubtype);
    method public boolean shouldOfferSwitchingToNextInputMethod(android.os.IBinder);
    method public void showInputMethodAndSubtypeEnabler(java.lang.String);
    method public void showInputMethodPicker();
    method public boolean showSoftInput(android.view.View, int);
    method public boolean showSoftInput(android.view.View, int, android.os.ResultReceiver);
    method public void showSoftInputFromInputMethod(android.os.IBinder, int);
    method public void showStatusIcon(android.os.IBinder, java.lang.String, int);
    method public boolean switchToLastInputMethod(android.os.IBinder);
    method public boolean switchToNextInputMethod(android.os.IBinder, boolean);
    method public void toggleSoftInput(int, int);
    method public void toggleSoftInputFromWindow(android.os.IBinder, int, int);
    method public deprecated void updateCursor(android.view.View, int, int, int, int);
    method public void updateCursorAnchorInfo(android.view.View, android.view.inputmethod.CursorAnchorInfo);
    method public void updateExtractedText(android.view.View, int, android.view.inputmethod.ExtractedText);
    method public void updateSelection(android.view.View, int, int, int, int);
    method public void viewClicked(android.view.View);
    field public static final int HIDE_IMPLICIT_ONLY = 1; // 0x1
    field public static final int HIDE_NOT_ALWAYS = 2; // 0x2
    field public static final int RESULT_HIDDEN = 3; // 0x3
    field public static final int RESULT_SHOWN = 2; // 0x2
    field public static final int RESULT_UNCHANGED_HIDDEN = 1; // 0x1
    field public static final int RESULT_UNCHANGED_SHOWN = 0; // 0x0
    field public static final int SHOW_FORCED = 2; // 0x2
    field public static final int SHOW_IMPLICIT = 1; // 0x1
  }

  public abstract interface InputMethodSession {
    method public abstract void appPrivateCommand(java.lang.String, android.os.Bundle);
    method public abstract void dispatchGenericMotionEvent(int, android.view.MotionEvent, android.view.inputmethod.InputMethodSession.EventCallback);
    method public abstract void dispatchKeyEvent(int, android.view.KeyEvent, android.view.inputmethod.InputMethodSession.EventCallback);
    method public abstract void dispatchTrackballEvent(int, android.view.MotionEvent, android.view.inputmethod.InputMethodSession.EventCallback);
    method public abstract void displayCompletions(android.view.inputmethod.CompletionInfo[]);
    method public abstract void finishInput();
    method public abstract void toggleSoftInput(int, int);
    method public abstract void updateCursor(android.graphics.Rect);
    method public abstract void updateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo);
    method public abstract void updateExtractedText(int, android.view.inputmethod.ExtractedText);
    method public abstract void updateSelection(int, int, int, int, int, int);
    method public abstract void viewClicked(boolean);
  }

  public static abstract interface InputMethodSession.EventCallback {
    method public abstract void finishedEvent(int, boolean);
  }

  public final class InputMethodSubtype implements android.os.Parcelable {
    ctor public deprecated InputMethodSubtype(int, int, java.lang.String, java.lang.String, java.lang.String, boolean, boolean);
    ctor public deprecated InputMethodSubtype(int, int, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, int);
    method public boolean containsExtraValueKey(java.lang.String);
    method public int describeContents();
    method public java.lang.CharSequence getDisplayName(android.content.Context, java.lang.String, android.content.pm.ApplicationInfo);
    method public java.lang.String getExtraValue();
    method public java.lang.String getExtraValueOf(java.lang.String);
    method public int getIconResId();
    method public java.lang.String getLocale();
    method public java.lang.String getMode();
    method public int getNameResId();
    method public boolean isAsciiCapable();
    method public boolean isAuxiliary();
    method public boolean overridesImplicitlyEnabledSubtype();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputMethodSubtype> CREATOR;
  }

  public static class InputMethodSubtype.InputMethodSubtypeBuilder {
    ctor public InputMethodSubtype.InputMethodSubtypeBuilder();
    method public android.view.inputmethod.InputMethodSubtype build();
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setIsAsciiCapable(boolean);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setIsAuxiliary(boolean);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setOverridesImplicitlyEnabledSubtype(boolean);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeExtraValue(java.lang.String);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeIconResId(int);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeId(int);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeLocale(java.lang.String);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeMode(java.lang.String);
    method public android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeNameResId(int);
  }

}

package android.view.textservice {

  public final class SentenceSuggestionsInfo implements android.os.Parcelable {
    ctor public SentenceSuggestionsInfo(android.view.textservice.SuggestionsInfo[], int[], int[]);
    ctor public SentenceSuggestionsInfo(android.os.Parcel);
    method public int describeContents();
    method public int getLengthAt(int);
    method public int getOffsetAt(int);
    method public int getSuggestionsCount();
    method public android.view.textservice.SuggestionsInfo getSuggestionsInfoAt(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.textservice.SentenceSuggestionsInfo> CREATOR;
  }

  public final class SpellCheckerInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.content.ComponentName getComponent();
    method public java.lang.String getId();
    method public java.lang.String getPackageName();
    method public android.content.pm.ServiceInfo getServiceInfo();
    method public java.lang.String getSettingsActivity();
    method public android.view.textservice.SpellCheckerSubtype getSubtypeAt(int);
    method public int getSubtypeCount();
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.textservice.SpellCheckerInfo> CREATOR;
  }

  public class SpellCheckerSession {
    method public void cancel();
    method public void close();
    method public void getSentenceSuggestions(android.view.textservice.TextInfo[], int);
    method public android.view.textservice.SpellCheckerInfo getSpellChecker();
    method public deprecated void getSuggestions(android.view.textservice.TextInfo, int);
    method public deprecated void getSuggestions(android.view.textservice.TextInfo[], int, boolean);
    method public boolean isSessionDisconnected();
    field public static final java.lang.String SERVICE_META_DATA = "android.view.textservice.scs";
  }

  public static abstract interface SpellCheckerSession.SpellCheckerSessionListener {
    method public abstract void onGetSentenceSuggestions(android.view.textservice.SentenceSuggestionsInfo[]);
    method public abstract void onGetSuggestions(android.view.textservice.SuggestionsInfo[]);
  }

  public final class SpellCheckerSubtype implements android.os.Parcelable {
    ctor public SpellCheckerSubtype(int, java.lang.String, java.lang.String);
    method public boolean containsExtraValueKey(java.lang.String);
    method public int describeContents();
    method public java.lang.CharSequence getDisplayName(android.content.Context, java.lang.String, android.content.pm.ApplicationInfo);
    method public java.lang.String getExtraValue();
    method public java.lang.String getExtraValueOf(java.lang.String);
    method public java.lang.String getLocale();
    method public int getNameResId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.textservice.SpellCheckerSubtype> CREATOR;
  }

  public final class SuggestionsInfo implements android.os.Parcelable {
    ctor public SuggestionsInfo(int, java.lang.String[]);
    ctor public SuggestionsInfo(int, java.lang.String[], int, int);
    ctor public SuggestionsInfo(android.os.Parcel);
    method public int describeContents();
    method public int getCookie();
    method public int getSequence();
    method public java.lang.String getSuggestionAt(int);
    method public int getSuggestionsAttributes();
    method public int getSuggestionsCount();
    method public void setCookieAndSequence(int, int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.textservice.SuggestionsInfo> CREATOR;
    field public static final int RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS = 4; // 0x4
    field public static final int RESULT_ATTR_IN_THE_DICTIONARY = 1; // 0x1
    field public static final int RESULT_ATTR_LOOKS_LIKE_TYPO = 2; // 0x2
  }

  public final class TextInfo implements android.os.Parcelable {
    ctor public TextInfo(java.lang.String);
    ctor public TextInfo(java.lang.String, int, int);
    ctor public TextInfo(java.lang.CharSequence, int, int, int, int);
    ctor public TextInfo(android.os.Parcel);
    method public int describeContents();
    method public java.lang.CharSequence getCharSequence();
    method public int getCookie();
    method public int getSequence();
    method public java.lang.String getText();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.textservice.TextInfo> CREATOR;
  }

  public final class TextServicesManager {
    method public android.view.textservice.SpellCheckerSession newSpellCheckerSession(android.os.Bundle, java.util.Locale, android.view.textservice.SpellCheckerSession.SpellCheckerSessionListener, boolean);
  }

}

package android.webkit {

  public abstract class ClientCertRequest {
    ctor public ClientCertRequest();
    method public abstract void cancel();
    method public abstract java.lang.String getHost();
    method public abstract java.lang.String[] getKeyTypes();
    method public abstract int getPort();
    method public abstract java.security.Principal[] getPrincipals();
    method public abstract void ignore();
    method public abstract void proceed(java.security.PrivateKey, java.security.cert.X509Certificate[]);
  }

  public class ConsoleMessage {
    ctor public ConsoleMessage(java.lang.String, java.lang.String, int, android.webkit.ConsoleMessage.MessageLevel);
    method public int lineNumber();
    method public java.lang.String message();
    method public android.webkit.ConsoleMessage.MessageLevel messageLevel();
    method public java.lang.String sourceId();
  }

  public static final class ConsoleMessage.MessageLevel extends java.lang.Enum {
    method public static android.webkit.ConsoleMessage.MessageLevel valueOf(java.lang.String);
    method public static final android.webkit.ConsoleMessage.MessageLevel[] values();
    enum_constant public static final android.webkit.ConsoleMessage.MessageLevel DEBUG;
    enum_constant public static final android.webkit.ConsoleMessage.MessageLevel ERROR;
    enum_constant public static final android.webkit.ConsoleMessage.MessageLevel LOG;
    enum_constant public static final android.webkit.ConsoleMessage.MessageLevel TIP;
    enum_constant public static final android.webkit.ConsoleMessage.MessageLevel WARNING;
  }

  public abstract class CookieManager {
    ctor public CookieManager();
    method public abstract boolean acceptCookie();
    method public abstract boolean acceptThirdPartyCookies(android.webkit.WebView);
    method public static boolean allowFileSchemeCookies();
    method public abstract void flush();
    method public abstract java.lang.String getCookie(java.lang.String);
    method public static synchronized android.webkit.CookieManager getInstance();
    method public abstract boolean hasCookies();
    method public abstract deprecated void removeAllCookie();
    method public abstract void removeAllCookies(android.webkit.ValueCallback<java.lang.Boolean>);
    method public abstract deprecated void removeExpiredCookie();
    method public abstract deprecated void removeSessionCookie();
    method public abstract void removeSessionCookies(android.webkit.ValueCallback<java.lang.Boolean>);
    method public abstract void setAcceptCookie(boolean);
    method public static void setAcceptFileSchemeCookies(boolean);
    method public abstract void setAcceptThirdPartyCookies(android.webkit.WebView, boolean);
    method public abstract void setCookie(java.lang.String, java.lang.String);
    method public abstract void setCookie(java.lang.String, java.lang.String, android.webkit.ValueCallback<java.lang.Boolean>);
  }

  public final deprecated class CookieSyncManager extends android.webkit.WebSyncManager {
    method public static synchronized android.webkit.CookieSyncManager createInstance(android.content.Context);
    method public static synchronized android.webkit.CookieSyncManager getInstance();
    method protected deprecated void syncFromRamToFlash();
    field protected static final java.lang.String LOGTAG = "websync";
    field protected android.webkit.WebViewDatabase mDataBase;
    field protected android.os.Handler mHandler;
  }

  public class DateSorter {
    ctor public DateSorter(android.content.Context);
    method public long getBoundary(int);
    method public int getIndex(long);
    method public java.lang.String getLabel(int);
    field public static final int DAY_COUNT = 5; // 0x5
  }

  public abstract interface DownloadListener {
    method public abstract void onDownloadStart(java.lang.String, java.lang.String, java.lang.String, java.lang.String, long);
  }

  public class GeolocationPermissions {
    method public void allow(java.lang.String);
    method public void clear(java.lang.String);
    method public void clearAll();
    method public void getAllowed(java.lang.String, android.webkit.ValueCallback<java.lang.Boolean>);
    method public static android.webkit.GeolocationPermissions getInstance();
    method public void getOrigins(android.webkit.ValueCallback<java.util.Set<java.lang.String>>);
  }

  public static abstract interface GeolocationPermissions.Callback {
    method public abstract void invoke(java.lang.String, boolean, boolean);
  }

  public class HttpAuthHandler extends android.os.Handler {
    method public void cancel();
    method public void proceed(java.lang.String, java.lang.String);
    method public boolean useHttpAuthUsernamePassword();
  }

  public abstract class JavascriptInterface implements java.lang.annotation.Annotation {
  }

  public class JsPromptResult extends android.webkit.JsResult {
    method public void confirm(java.lang.String);
  }

  public class JsResult {
    method public final void cancel();
    method public final void confirm();
  }

  public class MimeTypeMap {
    method public java.lang.String getExtensionFromMimeType(java.lang.String);
    method public static java.lang.String getFileExtensionFromUrl(java.lang.String);
    method public java.lang.String getMimeTypeFromExtension(java.lang.String);
    method public static android.webkit.MimeTypeMap getSingleton();
    method public boolean hasExtension(java.lang.String);
    method public boolean hasMimeType(java.lang.String);
  }

  public abstract class PermissionRequest {
    ctor public PermissionRequest();
    method public abstract void deny();
    method public abstract android.net.Uri getOrigin();
    method public abstract java.lang.String[] getResources();
    method public abstract void grant(java.lang.String[]);
    field public static final java.lang.String RESOURCE_AUDIO_CAPTURE = "android.webkit.resource.AUDIO_CAPTURE";
    field public static final java.lang.String RESOURCE_PROTECTED_MEDIA_ID = "android.webkit.resource.PROTECTED_MEDIA_ID";
    field public static final java.lang.String RESOURCE_VIDEO_CAPTURE = "android.webkit.resource.VIDEO_CAPTURE";
  }

  public abstract interface PluginStub {
    method public abstract android.view.View getEmbeddedView(int, android.content.Context);
    method public abstract android.view.View getFullScreenView(int, android.content.Context);
  }

  public class SslErrorHandler extends android.os.Handler {
    method public void cancel();
    method public void proceed();
  }

  public final class URLUtil {
    ctor public URLUtil();
    method public static java.lang.String composeSearchUrl(java.lang.String, java.lang.String, java.lang.String);
    method public static byte[] decode(byte[]) throws java.lang.IllegalArgumentException;
    method public static final java.lang.String guessFileName(java.lang.String, java.lang.String, java.lang.String);
    method public static java.lang.String guessUrl(java.lang.String);
    method public static boolean isAboutUrl(java.lang.String);
    method public static boolean isAssetUrl(java.lang.String);
    method public static boolean isContentUrl(java.lang.String);
    method public static deprecated boolean isCookielessProxyUrl(java.lang.String);
    method public static boolean isDataUrl(java.lang.String);
    method public static boolean isFileUrl(java.lang.String);
    method public static boolean isHttpUrl(java.lang.String);
    method public static boolean isHttpsUrl(java.lang.String);
    method public static boolean isJavaScriptUrl(java.lang.String);
    method public static boolean isNetworkUrl(java.lang.String);
    method public static boolean isValidUrl(java.lang.String);
    method public static java.lang.String stripAnchor(java.lang.String);
  }

  public abstract interface ValueCallback {
    method public abstract void onReceiveValue(T);
  }

  public abstract class WebBackForwardList implements java.lang.Cloneable java.io.Serializable {
    ctor public WebBackForwardList();
    method protected abstract android.webkit.WebBackForwardList clone();
    method public abstract int getCurrentIndex();
    method public abstract android.webkit.WebHistoryItem getCurrentItem();
    method public abstract android.webkit.WebHistoryItem getItemAtIndex(int);
    method public abstract int getSize();
  }

  public class WebChromeClient {
    ctor public WebChromeClient();
    method public android.graphics.Bitmap getDefaultVideoPoster();
    method public android.view.View getVideoLoadingProgressView();
    method public void getVisitedHistory(android.webkit.ValueCallback<java.lang.String[]>);
    method public void onCloseWindow(android.webkit.WebView);
    method public deprecated void onConsoleMessage(java.lang.String, int, java.lang.String);
    method public boolean onConsoleMessage(android.webkit.ConsoleMessage);
    method public boolean onCreateWindow(android.webkit.WebView, boolean, boolean, android.os.Message);
    method public deprecated void onExceededDatabaseQuota(java.lang.String, java.lang.String, long, long, long, android.webkit.WebStorage.QuotaUpdater);
    method public void onGeolocationPermissionsHidePrompt();
    method public void onGeolocationPermissionsShowPrompt(java.lang.String, android.webkit.GeolocationPermissions.Callback);
    method public void onHideCustomView();
    method public boolean onJsAlert(android.webkit.WebView, java.lang.String, java.lang.String, android.webkit.JsResult);
    method public boolean onJsBeforeUnload(android.webkit.WebView, java.lang.String, java.lang.String, android.webkit.JsResult);
    method public boolean onJsConfirm(android.webkit.WebView, java.lang.String, java.lang.String, android.webkit.JsResult);
    method public boolean onJsPrompt(android.webkit.WebView, java.lang.String, java.lang.String, java.lang.String, android.webkit.JsPromptResult);
    method public deprecated boolean onJsTimeout();
    method public void onPermissionRequest(android.webkit.PermissionRequest);
    method public void onPermissionRequestCanceled(android.webkit.PermissionRequest);
    method public void onProgressChanged(android.webkit.WebView, int);
    method public deprecated void onReachedMaxAppCacheSize(long, long, android.webkit.WebStorage.QuotaUpdater);
    method public void onReceivedIcon(android.webkit.WebView, android.graphics.Bitmap);
    method public void onReceivedTitle(android.webkit.WebView, java.lang.String);
    method public void onReceivedTouchIconUrl(android.webkit.WebView, java.lang.String, boolean);
    method public void onRequestFocus(android.webkit.WebView);
    method public void onShowCustomView(android.view.View, android.webkit.WebChromeClient.CustomViewCallback);
    method public deprecated void onShowCustomView(android.view.View, int, android.webkit.WebChromeClient.CustomViewCallback);
    method public boolean onShowFileChooser(android.webkit.WebView, android.webkit.ValueCallback<android.net.Uri[]>, android.webkit.WebChromeClient.FileChooserParams);
  }

  public static abstract interface WebChromeClient.CustomViewCallback {
    method public abstract void onCustomViewHidden();
  }

  public static abstract class WebChromeClient.FileChooserParams {
    ctor public WebChromeClient.FileChooserParams();
    method public abstract android.content.Intent createIntent();
    method public abstract java.lang.String[] getAcceptTypes();
    method public abstract java.lang.String getFilenameHint();
    method public abstract int getMode();
    method public abstract java.lang.CharSequence getTitle();
    method public abstract boolean isCaptureEnabled();
    method public static android.net.Uri[] parseResult(int, android.content.Intent);
    field public static final int MODE_OPEN = 0; // 0x0
    field public static final int MODE_OPEN_MULTIPLE = 1; // 0x1
    field public static final int MODE_SAVE = 3; // 0x3
  }

  public abstract class WebHistoryItem implements java.lang.Cloneable {
    ctor public WebHistoryItem();
    method protected abstract android.webkit.WebHistoryItem clone();
    method public abstract android.graphics.Bitmap getFavicon();
    method public abstract java.lang.String getOriginalUrl();
    method public abstract java.lang.String getTitle();
    method public abstract java.lang.String getUrl();
  }

  public abstract deprecated class WebIconDatabase {
    ctor public WebIconDatabase();
    method public abstract void close();
    method public static android.webkit.WebIconDatabase getInstance();
    method public abstract void open(java.lang.String);
    method public abstract void releaseIconForPageUrl(java.lang.String);
    method public abstract void removeAllIcons();
    method public abstract void requestIconForPageUrl(java.lang.String, android.webkit.WebIconDatabase.IconListener);
    method public abstract void retainIconForPageUrl(java.lang.String);
  }

  public static abstract deprecated interface WebIconDatabase.IconListener {
    method public abstract void onReceivedIcon(java.lang.String, android.graphics.Bitmap);
  }

  public class WebMessage {
    ctor public WebMessage(java.lang.String);
    ctor public WebMessage(java.lang.String, android.webkit.WebMessagePort[]);
    method public java.lang.String getData();
    method public android.webkit.WebMessagePort[] getPorts();
  }

  public abstract class WebMessagePort {
    ctor public WebMessagePort();
    method public abstract void close();
    method public abstract void postMessage(android.webkit.WebMessage);
    method public abstract void setWebMessageCallback(android.webkit.WebMessagePort.WebMessageCallback);
    method public abstract void setWebMessageCallback(android.webkit.WebMessagePort.WebMessageCallback, android.os.Handler);
  }

  public static abstract class WebMessagePort.WebMessageCallback {
    ctor public WebMessagePort.WebMessageCallback();
    method public void onMessage(android.webkit.WebMessagePort, android.webkit.WebMessage);
  }

  public abstract class WebResourceError {
    ctor public WebResourceError();
    method public abstract java.lang.String getDescription();
    method public abstract int getErrorCode();
  }

  public abstract interface WebResourceRequest {
    method public abstract java.lang.String getMethod();
    method public abstract java.util.Map<java.lang.String, java.lang.String> getRequestHeaders();
    method public abstract android.net.Uri getUrl();
    method public abstract boolean hasGesture();
    method public abstract boolean isForMainFrame();
  }

  public class WebResourceResponse extends android.webkit.WebResourceResponseBase {
    ctor public WebResourceResponse(java.lang.String, java.lang.String, java.io.InputStream);
    ctor public WebResourceResponse(java.lang.String, java.lang.String, int, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.io.InputStream);
    method public java.io.InputStream getData();
    method public java.lang.String getEncoding();
    method public java.lang.String getMimeType();
    method public java.lang.String getReasonPhrase();
    method public java.util.Map<java.lang.String, java.lang.String> getResponseHeaders();
    method public int getStatusCode();
    method public void setData(java.io.InputStream);
    method public void setEncoding(java.lang.String);
    method public void setMimeType(java.lang.String);
    method public void setResponseHeaders(java.util.Map<java.lang.String, java.lang.String>);
    method public void setStatusCodeAndReasonPhrase(int, java.lang.String);
  }

  public abstract class WebResourceResponseBase {
    ctor public WebResourceResponseBase();
    method public abstract java.io.InputStream getData();
    method public abstract java.lang.String getEncoding();
    method public abstract java.lang.String getMimeType();
    method public abstract java.lang.String getReasonPhrase();
    method public abstract java.util.Map<java.lang.String, java.lang.String> getResponseHeaders();
    method public abstract int getStatusCode();
  }

  public abstract class WebSettings {
    ctor public WebSettings();
    method public abstract deprecated boolean enableSmoothTransition();
    method public abstract boolean getAllowContentAccess();
    method public abstract boolean getAllowFileAccess();
    method public abstract boolean getAllowFileAccessFromFileURLs();
    method public abstract boolean getAllowUniversalAccessFromFileURLs();
    method public abstract boolean getBlockNetworkImage();
    method public abstract boolean getBlockNetworkLoads();
    method public abstract boolean getBuiltInZoomControls();
    method public abstract int getCacheMode();
    method public abstract java.lang.String getCursiveFontFamily();
    method public abstract boolean getDatabaseEnabled();
    method public abstract deprecated java.lang.String getDatabasePath();
    method public abstract int getDefaultFixedFontSize();
    method public abstract int getDefaultFontSize();
    method public abstract java.lang.String getDefaultTextEncodingName();
    method public static java.lang.String getDefaultUserAgent(android.content.Context);
    method public abstract deprecated android.webkit.WebSettings.ZoomDensity getDefaultZoom();
    method public abstract boolean getDisplayZoomControls();
    method public abstract boolean getDomStorageEnabled();
    method public abstract java.lang.String getFantasyFontFamily();
    method public abstract java.lang.String getFixedFontFamily();
    method public abstract boolean getJavaScriptCanOpenWindowsAutomatically();
    method public abstract boolean getJavaScriptEnabled();
    method public abstract android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm();
    method public abstract deprecated boolean getLightTouchEnabled();
    method public abstract boolean getLoadWithOverviewMode();
    method public abstract boolean getLoadsImagesAutomatically();
    method public abstract boolean getMediaPlaybackRequiresUserGesture();
    method public abstract int getMinimumFontSize();
    method public abstract int getMinimumLogicalFontSize();
    method public abstract int getMixedContentMode();
    method public abstract boolean getOffscreenPreRaster();
    method public abstract deprecated android.webkit.WebSettings.PluginState getPluginState();
    method public abstract java.lang.String getSansSerifFontFamily();
    method public abstract boolean getSaveFormData();
    method public abstract deprecated boolean getSavePassword();
    method public abstract java.lang.String getSerifFontFamily();
    method public abstract java.lang.String getStandardFontFamily();
    method public deprecated synchronized android.webkit.WebSettings.TextSize getTextSize();
    method public abstract int getTextZoom();
    method public abstract boolean getUseWideViewPort();
    method public abstract java.lang.String getUserAgentString();
    method public abstract void setAllowContentAccess(boolean);
    method public abstract void setAllowFileAccess(boolean);
    method public abstract void setAllowFileAccessFromFileURLs(boolean);
    method public abstract void setAllowUniversalAccessFromFileURLs(boolean);
    method public abstract void setAppCacheEnabled(boolean);
    method public abstract deprecated void setAppCacheMaxSize(long);
    method public abstract void setAppCachePath(java.lang.String);
    method public abstract void setBlockNetworkImage(boolean);
    method public abstract void setBlockNetworkLoads(boolean);
    method public abstract void setBuiltInZoomControls(boolean);
    method public abstract void setCacheMode(int);
    method public abstract void setCursiveFontFamily(java.lang.String);
    method public abstract void setDatabaseEnabled(boolean);
    method public abstract deprecated void setDatabasePath(java.lang.String);
    method public abstract void setDefaultFixedFontSize(int);
    method public abstract void setDefaultFontSize(int);
    method public abstract void setDefaultTextEncodingName(java.lang.String);
    method public abstract deprecated void setDefaultZoom(android.webkit.WebSettings.ZoomDensity);
    method public abstract void setDisplayZoomControls(boolean);
    method public abstract void setDomStorageEnabled(boolean);
    method public abstract deprecated void setEnableSmoothTransition(boolean);
    method public abstract void setFantasyFontFamily(java.lang.String);
    method public abstract void setFixedFontFamily(java.lang.String);
    method public abstract void setGeolocationDatabasePath(java.lang.String);
    method public abstract void setGeolocationEnabled(boolean);
    method public abstract void setJavaScriptCanOpenWindowsAutomatically(boolean);
    method public abstract void setJavaScriptEnabled(boolean);
    method public abstract void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm);
    method public abstract deprecated void setLightTouchEnabled(boolean);
    method public abstract void setLoadWithOverviewMode(boolean);
    method public abstract void setLoadsImagesAutomatically(boolean);
    method public abstract void setMediaPlaybackRequiresUserGesture(boolean);
    method public abstract void setMinimumFontSize(int);
    method public abstract void setMinimumLogicalFontSize(int);
    method public abstract void setMixedContentMode(int);
    method public abstract void setNeedInitialFocus(boolean);
    method public abstract void setOffscreenPreRaster(boolean);
    method public abstract deprecated void setPluginState(android.webkit.WebSettings.PluginState);
    method public abstract deprecated void setRenderPriority(android.webkit.WebSettings.RenderPriority);
    method public abstract void setSansSerifFontFamily(java.lang.String);
    method public abstract void setSaveFormData(boolean);
    method public abstract deprecated void setSavePassword(boolean);
    method public abstract void setSerifFontFamily(java.lang.String);
    method public abstract void setStandardFontFamily(java.lang.String);
    method public abstract void setSupportMultipleWindows(boolean);
    method public abstract void setSupportZoom(boolean);
    method public deprecated synchronized void setTextSize(android.webkit.WebSettings.TextSize);
    method public abstract void setTextZoom(int);
    method public abstract void setUseWideViewPort(boolean);
    method public abstract void setUserAgentString(java.lang.String);
    method public abstract boolean supportMultipleWindows();
    method public abstract boolean supportZoom();
    field public static final int LOAD_CACHE_ELSE_NETWORK = 1; // 0x1
    field public static final int LOAD_CACHE_ONLY = 3; // 0x3
    field public static final int LOAD_DEFAULT = -1; // 0xffffffff
    field public static final deprecated int LOAD_NORMAL = 0; // 0x0
    field public static final int LOAD_NO_CACHE = 2; // 0x2
    field public static final int MIXED_CONTENT_ALWAYS_ALLOW = 0; // 0x0
    field public static final int MIXED_CONTENT_COMPATIBILITY_MODE = 2; // 0x2
    field public static final int MIXED_CONTENT_NEVER_ALLOW = 1; // 0x1
  }

  public static final class WebSettings.LayoutAlgorithm extends java.lang.Enum {
    method public static android.webkit.WebSettings.LayoutAlgorithm valueOf(java.lang.String);
    method public static final android.webkit.WebSettings.LayoutAlgorithm[] values();
    enum_constant public static final deprecated android.webkit.WebSettings.LayoutAlgorithm NARROW_COLUMNS;
    enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm NORMAL;
    enum_constant public static final deprecated android.webkit.WebSettings.LayoutAlgorithm SINGLE_COLUMN;
    enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm TEXT_AUTOSIZING;
  }

  public static final class WebSettings.PluginState extends java.lang.Enum {
    method public static android.webkit.WebSettings.PluginState valueOf(java.lang.String);
    method public static final android.webkit.WebSettings.PluginState[] values();
    enum_constant public static final android.webkit.WebSettings.PluginState OFF;
    enum_constant public static final android.webkit.WebSettings.PluginState ON;
    enum_constant public static final android.webkit.WebSettings.PluginState ON_DEMAND;
  }

  public static final class WebSettings.RenderPriority extends java.lang.Enum {
    method public static android.webkit.WebSettings.RenderPriority valueOf(java.lang.String);
    method public static final android.webkit.WebSettings.RenderPriority[] values();
    enum_constant public static final android.webkit.WebSettings.RenderPriority HIGH;
    enum_constant public static final android.webkit.WebSettings.RenderPriority LOW;
    enum_constant public static final android.webkit.WebSettings.RenderPriority NORMAL;
  }

  public static final deprecated class WebSettings.TextSize extends java.lang.Enum {
    method public static android.webkit.WebSettings.TextSize valueOf(java.lang.String);
    method public static final android.webkit.WebSettings.TextSize[] values();
    enum_constant public static final android.webkit.WebSettings.TextSize LARGER;
    enum_constant public static final android.webkit.WebSettings.TextSize LARGEST;
    enum_constant public static final android.webkit.WebSettings.TextSize NORMAL;
    enum_constant public static final android.webkit.WebSettings.TextSize SMALLER;
    enum_constant public static final android.webkit.WebSettings.TextSize SMALLEST;
  }

  public static final class WebSettings.ZoomDensity extends java.lang.Enum {
    method public static android.webkit.WebSettings.ZoomDensity valueOf(java.lang.String);
    method public static final android.webkit.WebSettings.ZoomDensity[] values();
    enum_constant public static final android.webkit.WebSettings.ZoomDensity CLOSE;
    enum_constant public static final android.webkit.WebSettings.ZoomDensity FAR;
    enum_constant public static final android.webkit.WebSettings.ZoomDensity MEDIUM;
  }

  public class WebStorage {
    method public void deleteAllData();
    method public void deleteOrigin(java.lang.String);
    method public static android.webkit.WebStorage getInstance();
    method public void getOrigins(android.webkit.ValueCallback<java.util.Map>);
    method public void getQuotaForOrigin(java.lang.String, android.webkit.ValueCallback<java.lang.Long>);
    method public void getUsageForOrigin(java.lang.String, android.webkit.ValueCallback<java.lang.Long>);
    method public deprecated void setQuotaForOrigin(java.lang.String, long);
  }

  public static class WebStorage.Origin {
    method public java.lang.String getOrigin();
    method public long getQuota();
    method public long getUsage();
  }

  public static abstract deprecated interface WebStorage.QuotaUpdater {
    method public abstract void updateQuota(long);
  }

   abstract deprecated class WebSyncManager implements java.lang.Runnable {
    ctor protected WebSyncManager(android.content.Context, java.lang.String);
    method protected void onSyncInit();
    method public void resetSync();
    method public void run();
    method public void startSync();
    method public void stopSync();
    method public void sync();
    field protected static final java.lang.String LOGTAG = "websync";
    field protected android.webkit.WebViewDatabase mDataBase;
    field protected android.os.Handler mHandler;
  }

  public class WebView extends android.widget.AbsoluteLayout implements android.view.ViewGroup.OnHierarchyChangeListener android.view.ViewTreeObserver.OnGlobalFocusChangeListener {
    ctor public WebView(android.content.Context);
    ctor public WebView(android.content.Context, android.util.AttributeSet);
    ctor public WebView(android.content.Context, android.util.AttributeSet, int);
    ctor public WebView(android.content.Context, android.util.AttributeSet, int, int);
    ctor public deprecated WebView(android.content.Context, android.util.AttributeSet, int, boolean);
    method public void addJavascriptInterface(java.lang.Object, java.lang.String);
    method public boolean canGoBack();
    method public boolean canGoBackOrForward(int);
    method public boolean canGoForward();
    method public deprecated boolean canZoomIn();
    method public deprecated boolean canZoomOut();
    method public deprecated android.graphics.Picture capturePicture();
    method public void clearCache(boolean);
    method public static void clearClientCertPreferences(java.lang.Runnable);
    method public void clearFormData();
    method public void clearHistory();
    method public void clearMatches();
    method public void clearSslPreferences();
    method public deprecated void clearView();
    method public android.webkit.WebBackForwardList copyBackForwardList();
    method public deprecated android.print.PrintDocumentAdapter createPrintDocumentAdapter();
    method public android.print.PrintDocumentAdapter createPrintDocumentAdapter(java.lang.String);
    method public android.webkit.WebMessagePort[] createWebMessageChannel();
    method public void destroy();
    method public void documentHasImages(android.os.Message);
    method public static void enableSlowWholeDocumentDraw();
    method public void evaluateJavascript(java.lang.String, android.webkit.ValueCallback<java.lang.String>);
    method public static java.lang.String findAddress(java.lang.String);
    method public deprecated int findAll(java.lang.String);
    method public void findAllAsync(java.lang.String);
    method public void findNext(boolean);
    method public void flingScroll(int, int);
    method public deprecated void freeMemory();
    method public android.net.http.SslCertificate getCertificate();
    method public int getContentHeight();
    method public android.graphics.Bitmap getFavicon();
    method public android.webkit.WebView.HitTestResult getHitTestResult();
    method public java.lang.String[] getHttpAuthUsernamePassword(java.lang.String, java.lang.String);
    method public java.lang.String getOriginalUrl();
    method public int getProgress();
    method public deprecated float getScale();
    method public android.webkit.WebSettings getSettings();
    method public java.lang.String getTitle();
    method public java.lang.String getUrl();
    method public void goBack();
    method public void goBackOrForward(int);
    method public void goForward();
    method public void insertVisualStateCallback(long, android.webkit.WebView.VisualStateCallback);
    method public void invokeZoomPicker();
    method public boolean isPrivateBrowsingEnabled();
    method public void loadData(java.lang.String, java.lang.String, java.lang.String);
    method public void loadDataWithBaseURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public void loadUrl(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
    method public void loadUrl(java.lang.String);
    method public deprecated void onChildViewAdded(android.view.View, android.view.View);
    method public deprecated void onChildViewRemoved(android.view.View, android.view.View);
    method public deprecated void onGlobalFocusChanged(android.view.View, android.view.View);
    method public void onPause();
    method public void onResume();
    method public boolean overlayHorizontalScrollbar();
    method public boolean overlayVerticalScrollbar();
    method public boolean pageDown(boolean);
    method public boolean pageUp(boolean);
    method public void pauseTimers();
    method public void postMessageToMainFrame(android.webkit.WebMessage, android.net.Uri);
    method public void postUrl(java.lang.String, byte[]);
    method public void reload();
    method public void removeJavascriptInterface(java.lang.String);
    method public void requestFocusNodeHref(android.os.Message);
    method public void requestImageRef(android.os.Message);
    method public android.webkit.WebBackForwardList restoreState(android.os.Bundle);
    method public void resumeTimers();
    method public deprecated void savePassword(java.lang.String, java.lang.String, java.lang.String);
    method public android.webkit.WebBackForwardList saveState(android.os.Bundle);
    method public void saveWebArchive(java.lang.String);
    method public void saveWebArchive(java.lang.String, boolean, android.webkit.ValueCallback<java.lang.String>);
    method public deprecated void setCertificate(android.net.http.SslCertificate);
    method public void setDownloadListener(android.webkit.DownloadListener);
    method public void setFindListener(android.webkit.WebView.FindListener);
    method public void setHorizontalScrollbarOverlay(boolean);
    method public void setHttpAuthUsernamePassword(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public void setInitialScale(int);
    method public deprecated void setMapTrackballToArrowKeys(boolean);
    method public void setNetworkAvailable(boolean);
    method public deprecated void setPictureListener(android.webkit.WebView.PictureListener);
    method public void setVerticalScrollbarOverlay(boolean);
    method public void setWebChromeClient(android.webkit.WebChromeClient);
    method public static void setWebContentsDebuggingEnabled(boolean);
    method public void setWebViewClient(android.webkit.WebViewClient);
    method public deprecated boolean showFindDialog(java.lang.String, boolean);
    method public void stopLoading();
    method public void zoomBy(float);
    method public boolean zoomIn();
    method public boolean zoomOut();
    field public static final java.lang.String SCHEME_GEO = "geo:0,0?q=";
    field public static final java.lang.String SCHEME_MAILTO = "mailto:";
    field public static final java.lang.String SCHEME_TEL = "tel:";
  }

  public static abstract interface WebView.FindListener {
    method public abstract void onFindResultReceived(int, int, boolean);
  }

  public static class WebView.HitTestResult {
    method public java.lang.String getExtra();
    method public int getType();
    field public static final deprecated int ANCHOR_TYPE = 1; // 0x1
    field public static final int EDIT_TEXT_TYPE = 9; // 0x9
    field public static final int EMAIL_TYPE = 4; // 0x4
    field public static final int GEO_TYPE = 3; // 0x3
    field public static final deprecated int IMAGE_ANCHOR_TYPE = 6; // 0x6
    field public static final int IMAGE_TYPE = 5; // 0x5
    field public static final int PHONE_TYPE = 2; // 0x2
    field public static final int SRC_ANCHOR_TYPE = 7; // 0x7
    field public static final int SRC_IMAGE_ANCHOR_TYPE = 8; // 0x8
    field public static final int UNKNOWN_TYPE = 0; // 0x0
  }

  public static abstract deprecated interface WebView.PictureListener {
    method public abstract deprecated void onNewPicture(android.webkit.WebView, android.graphics.Picture);
  }

  public static abstract class WebView.VisualStateCallback {
    ctor public WebView.VisualStateCallback();
    method public abstract void onComplete(long);
  }

  public class WebView.WebViewTransport {
    ctor public WebView.WebViewTransport();
    method public synchronized android.webkit.WebView getWebView();
    method public synchronized void setWebView(android.webkit.WebView);
  }

  public class WebViewClient {
    ctor public WebViewClient();
    method public void doUpdateVisitedHistory(android.webkit.WebView, java.lang.String, boolean);
    method public void onFormResubmission(android.webkit.WebView, android.os.Message, android.os.Message);
    method public void onLoadResource(android.webkit.WebView, java.lang.String);
    method public void onPageCommitVisible(android.webkit.WebView, java.lang.String);
    method public void onPageFinished(android.webkit.WebView, java.lang.String);
    method public void onPageStarted(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
    method public void onReceivedClientCertRequest(android.webkit.WebView, android.webkit.ClientCertRequest);
    method public deprecated void onReceivedError(android.webkit.WebView, int, java.lang.String, java.lang.String);
    method public void onReceivedError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceError);
    method public void onReceivedHttpAuthRequest(android.webkit.WebView, android.webkit.HttpAuthHandler, java.lang.String, java.lang.String);
    method public void onReceivedHttpError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceResponseBase);
    method public void onReceivedLoginRequest(android.webkit.WebView, java.lang.String, java.lang.String, java.lang.String);
    method public void onReceivedSslError(android.webkit.WebView, android.webkit.SslErrorHandler, android.net.http.SslError);
    method public void onScaleChanged(android.webkit.WebView, float, float);
    method public deprecated void onTooManyRedirects(android.webkit.WebView, android.os.Message, android.os.Message);
    method public void onUnhandledInputEvent(android.webkit.WebView, android.view.InputEvent);
    method public deprecated void onUnhandledKeyEvent(android.webkit.WebView, android.view.KeyEvent);
    method public deprecated android.webkit.WebResourceResponse shouldInterceptRequest(android.webkit.WebView, java.lang.String);
    method public android.webkit.WebResourceResponse shouldInterceptRequest(android.webkit.WebView, android.webkit.WebResourceRequest);
    method public boolean shouldOverrideKeyEvent(android.webkit.WebView, android.view.KeyEvent);
    method public boolean shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String);
    field public static final int ERROR_AUTHENTICATION = -4; // 0xfffffffc
    field public static final int ERROR_BAD_URL = -12; // 0xfffffff4
    field public static final int ERROR_CONNECT = -6; // 0xfffffffa
    field public static final int ERROR_FAILED_SSL_HANDSHAKE = -11; // 0xfffffff5
    field public static final int ERROR_FILE = -13; // 0xfffffff3
    field public static final int ERROR_FILE_NOT_FOUND = -14; // 0xfffffff2
    field public static final int ERROR_HOST_LOOKUP = -2; // 0xfffffffe
    field public static final int ERROR_IO = -7; // 0xfffffff9
    field public static final int ERROR_PROXY_AUTHENTICATION = -5; // 0xfffffffb
    field public static final int ERROR_REDIRECT_LOOP = -9; // 0xfffffff7
    field public static final int ERROR_TIMEOUT = -8; // 0xfffffff8
    field public static final int ERROR_TOO_MANY_REQUESTS = -15; // 0xfffffff1
    field public static final int ERROR_UNKNOWN = -1; // 0xffffffff
    field public static final int ERROR_UNSUPPORTED_AUTH_SCHEME = -3; // 0xfffffffd
    field public static final int ERROR_UNSUPPORTED_SCHEME = -10; // 0xfffffff6
  }

  public abstract class WebViewDatabase {
    ctor public WebViewDatabase();
    method public abstract void clearFormData();
    method public abstract void clearHttpAuthUsernamePassword();
    method public abstract deprecated void clearUsernamePassword();
    method public static android.webkit.WebViewDatabase getInstance(android.content.Context);
    method public abstract boolean hasFormData();
    method public abstract boolean hasHttpAuthUsernamePassword();
    method public abstract deprecated boolean hasUsernamePassword();
  }

  public class WebViewFragment extends android.app.Fragment {
    ctor public WebViewFragment();
    method public android.webkit.WebView getWebView();
  }

}

package android.widget {

  public abstract class AbsListView extends android.widget.AdapterView implements android.widget.Filter.FilterListener android.text.TextWatcher android.view.ViewTreeObserver.OnGlobalLayoutListener android.view.ViewTreeObserver.OnTouchModeChangeListener {
    ctor public AbsListView(android.content.Context);
    ctor public AbsListView(android.content.Context, android.util.AttributeSet);
    ctor public AbsListView(android.content.Context, android.util.AttributeSet, int);
    ctor public AbsListView(android.content.Context, android.util.AttributeSet, int, int);
    method public void afterTextChanged(android.text.Editable);
    method public void beforeTextChanged(java.lang.CharSequence, int, int, int);
    method public boolean canScrollList(int);
    method public void clearChoices();
    method public void clearTextFilter();
    method public void deferNotifyDataSetChanged();
    method public void fling(int);
    method public int getCacheColorHint();
    method public int getCheckedItemCount();
    method public long[] getCheckedItemIds();
    method public int getCheckedItemPosition();
    method public android.util.SparseBooleanArray getCheckedItemPositions();
    method public int getChoiceMode();
    method public int getListPaddingBottom();
    method public int getListPaddingLeft();
    method public int getListPaddingRight();
    method public int getListPaddingTop();
    method public android.view.View getSelectedView();
    method public android.graphics.drawable.Drawable getSelector();
    method public java.lang.CharSequence getTextFilter();
    method public int getTranscriptMode();
    method protected void handleDataChanged();
    method public boolean hasTextFilter();
    method public void invalidateViews();
    method public boolean isFastScrollAlwaysVisible();
    method public boolean isFastScrollEnabled();
    method protected boolean isInFilterMode();
    method public boolean isItemChecked(int);
    method public boolean isScrollingCacheEnabled();
    method public boolean isSmoothScrollbarEnabled();
    method public boolean isStackFromBottom();
    method public boolean isTextFilterEnabled();
    method protected void layoutChildren();
    method public void onFilterComplete(int);
    method public void onGlobalLayout();
    method public void onInitializeAccessibilityNodeInfoForItem(android.view.View, int, android.view.accessibility.AccessibilityNodeInfo);
    method public boolean onRemoteAdapterConnected();
    method public void onRemoteAdapterDisconnected();
    method public void onRestoreInstanceState(android.os.Parcelable);
    method public android.os.Parcelable onSaveInstanceState();
    method public void onTextChanged(java.lang.CharSequence, int, int, int);
    method public void onTouchModeChanged(boolean);
    method public int pointToPosition(int, int);
    method public long pointToRowId(int, int);
    method public void reclaimViews(java.util.List<android.view.View>);
    method public void scrollListBy(int);
    method public void setAdapter(android.widget.ListAdapter);
    method public void setCacheColorHint(int);
    method public void setChoiceMode(int);
    method public void setDrawSelectorOnTop(boolean);
    method public void setFastScrollAlwaysVisible(boolean);
    method public void setFastScrollEnabled(boolean);
    method public void setFastScrollStyle(int);
    method public void setFilterText(java.lang.String);
    method public void setFriction(float);
    method public void setItemChecked(int, boolean);
    method public void setMultiChoiceModeListener(android.widget.AbsListView.MultiChoiceModeListener);
    method public void setOnScrollListener(android.widget.AbsListView.OnScrollListener);
    method public void setRecyclerListener(android.widget.AbsListView.RecyclerListener);
    method public void setRemoteViewsAdapter(android.content.Intent);
    method public void setScrollIndicators(android.view.View, android.view.View);
    method public void setScrollingCacheEnabled(boolean);
    method public void setSelectionFromTop(int, int);
    method public void setSelector(int);
    method public void setSelector(android.graphics.drawable.Drawable);
    method public void setSmoothScrollbarEnabled(boolean);
    method public void setStackFromBottom(boolean);
    method public void setTextFilterEnabled(boolean);
    method public void setTranscriptMode(int);
    method public void setVelocityScale(float);
    method public void smoothScrollBy(int, int);
    method public void smoothScrollToPosition(int);
    method public void smoothScrollToPosition(int, int);
    method public void smoothScrollToPositionFromTop(int, int, int);
    method public void smoothScrollToPositionFromTop(int, int);
    method public boolean verifyDrawable(android.graphics.drawable.Drawable);
    field public static final int CHOICE_MODE_MULTIPLE = 2; // 0x2
    field public static final int CHOICE_MODE_MULTIPLE_MODAL = 3; // 0x3
    field public static final int CHOICE_MODE_NONE = 0; // 0x0
    field public static final int CHOICE_MODE_SINGLE = 1; // 0x1
    field public static final int TRANSCRIPT_MODE_ALWAYS_SCROLL = 2; // 0x2
    field public static final int TRANSCRIPT_MODE_DISABLED = 0; // 0x0
    field public static final int TRANSCRIPT_MODE_NORMAL = 1; // 0x1
  }

  public static class AbsListView.LayoutParams extends android.view.ViewGroup.LayoutParams {
    ctor public AbsListView.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public AbsListView.LayoutParams(int, int);
    ctor public AbsListView.LayoutParams(int, int, int);
    ctor public AbsListView.LayoutParams(android.view.ViewGroup.LayoutParams);
  }

  public static abstract interface AbsListView.MultiChoiceModeListener implements android.view.ActionMode.Callback {
    method public abstract void onItemCheckedStateChanged(android.view.ActionMode, int, long, boolean);
  }

  public static abstract interface AbsListView.OnScrollListener {
    method public abstract void onScroll(android.widget.AbsListView, int, int, int);
    method public abstract void onScrollStateChanged(android.widget.AbsListView, int);
    field public static final int SCROLL_STATE_FLING = 2; // 0x2
    field public static final int SCROLL_STATE_IDLE = 0; // 0x0
    field public static final int SCROLL_STATE_TOUCH_SCROLL = 1; // 0x1
  }

  public static abstract interface AbsListView.RecyclerListener {
    method public abstract void onMovedToScrapHeap(android.view.View);
  }

  public static abstract interface AbsListView.SelectionBoundsAdjuster {
    method public abstract void adjustListItemSelectionBounds(android.graphics.Rect);
  }

  public abstract class AbsSeekBar extends android.widget.ProgressBar {
    ctor public AbsSeekBar(android.content.Context);
    ctor public AbsSeekBar(android.content.Context, android.util.AttributeSet);
    ctor public AbsSeekBar(android.content.Context, android.util.AttributeSet, int);
    ctor public AbsSeekBar(android.content.Context, android.util.AttributeSet, int, int);
    method public int getKeyProgressIncrement();
    method public boolean getSplitTrack();
    method public android.graphics.drawable.Drawable getThumb();
    method public int getThumbOffset();
    method public android.content.res.ColorStateList getThumbTintList();
    method public android.graphics.PorterDuff.Mode getThumbTintMode();
    method public void setKeyProgressIncrement(int);
    method public void setSplitTrack(boolean);
    method public void setThumb(android.graphics.drawable.Drawable);
    method public void setThumbOffset(int);
    method public void setThumbTintList(android.content.res.ColorStateList);
    method public void setThumbTintMode(android.graphics.PorterDuff.Mode);
  }

  public abstract class AbsSpinner extends android.widget.AdapterView {
    ctor public AbsSpinner(android.content.Context);
    ctor public AbsSpinner(android.content.Context, android.util.AttributeSet);
    ctor public AbsSpinner(android.content.Context, android.util.AttributeSet, int);
    ctor public AbsSpinner(android.content.Context, android.util.AttributeSet, int, int);
    method public android.widget.SpinnerAdapter getAdapter();
    method public android.view.View getSelectedView();
    method public void onRestoreInstanceState(android.os.Parcelable);
    method public android.os.Parcelable onSaveInstanceState();
    method public int pointToPosition(int, int);
    method public void setAdapter(android.widget.SpinnerAdapter);
    method public void setSelection(int, boolean);
    method public void setSelection(int);
  }

  public deprecated class AbsoluteLayout extends android.view.ViewGroup {
    ctor public AbsoluteLayout(android.content.Context);
    ctor public AbsoluteLayout(android.content.Context, android.util.AttributeSet);
    ctor public AbsoluteLayout(android.content.Context, android.util.AttributeSet, int);
    ctor public AbsoluteLayout(android.content.Context, android.util.AttributeSet, int, int);
    method protected void onLayout(boolean, int, int, int, int);
  }

  public static class AbsoluteLayout.LayoutParams extends android.view.ViewGroup.LayoutParams {
    ctor public AbsoluteLayout.LayoutParams(int, int, int, int);
    ctor public AbsoluteLayout.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public AbsoluteLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    method public java.lang.String debug(java.lang.String);
    field public int x;
    field public int y;
  }

  public class ActionMenuView extends android.widget.LinearLayout {
    ctor public ActionMenuView(android.content.Context);
    ctor public ActionMenuView(android.content.Context, android.util.AttributeSet);
    method public void dismissPopupMenus();
    method public android.view.Menu getMenu();
    method public int getPopupTheme();
    method public boolean hideOverflowMenu();
    method public boolean isOverflowMenuShowing();
    method public void onConfigurationChanged(android.content.res.Configuration);
    method public void onDetachedFromWindow();
    method public void setOnMenuItemClickListener(android.widget.ActionMenuView.OnMenuItemClickListener);
    method public void setOverflowTintList(android.content.res.ColorStateList);
    method public void setOverflowTintMode(android.graphics.PorterDuff.Mode);
    method public void setPopupTheme(int);
    method public boolean showOverflowMenu();
  }

  public static class ActionMenuView.LayoutParams extends android.widget.LinearLayout.LayoutParams {
    ctor public ActionMenuView.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public ActionMenuView.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public ActionMenuView.LayoutParams(android.widget.ActionMenuView.LayoutParams);
    ctor public ActionMenuView.LayoutParams(int, int);
  }

  public static abstract interface ActionMenuView.OnMenuItemClickListener {
    method public abstract boolean onMenuItemClick(android.view.MenuItem);
  }

  public abstract interface Adapter {
    method public abstract int getCount();
    method public abstract java.lang.Object getItem(int);
    method public abstract long getItemId(int);
    method public abstract int getItemViewType(int);
    method public abstract android.view.View getView(int, android.view.View, android.view.ViewGroup);
    method public abstract int getViewTypeCount();
    method public abstract boolean hasStableIds();
    method public abstract boolean isEmpty();
    method public abstract void registerDataSetObserver(android.database.DataSetObserver);
    method public abstract void unregisterDataSetObserver(android.database.DataSetObserver);
    field public static final int IGNORE_ITEM_VIEW_TYPE = -1; // 0xffffffff
    field public static final int NO_SELECTION = -2147483648; // 0x80000000
  }

  public abstract class AdapterView extends android.view.ViewGroup {
    ctor public AdapterView(android.content.Context);
    ctor public AdapterView(android.content.Context, android.util.AttributeSet);
    ctor public AdapterView(android.content.Context, android.util.AttributeSet, int);
    ctor public AdapterView(android.content.Context, android.util.AttributeSet, int, int);
    method public abstract T getAdapter();
    method public int getCount();
    method public android.view.View getEmptyView();
    method public int getFirstVisiblePosition();
    method public java.lang.Object getItemAtPosition(int);
    method public long getItemIdAtPosition(int);
    method public int getLastVisiblePosition();
    method public final android.widget.AdapterView.OnItemClickListener getOnItemClickListener();
    method public final android.widget.AdapterView.OnItemLongClickListener getOnItemLongClickListener();
    method public final android.widget.AdapterView.OnItemSelectedListener getOnItemSelectedListener();
    method public int getPositionForView(android.view.View);
    method public java.lang.Object getSelectedItem();
    method public long getSelectedItemId();
    method public int getSelectedItemPosition();
    method public abstract android.view.View getSelectedView();
    method protected void onLayout(boolean, int, int, int, int);
    method public boolean performItemClick(android.view.View, int, long);
    method public abstract void setAdapter(T);
    method public void setEmptyView(android.view.View);
    method public void setOnItemClickListener(android.widget.AdapterView.OnItemClickListener);
    method public void setOnItemLongClickListener(android.widget.AdapterView.OnItemLongClickListener);
    method public void setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener);
    method public abstract void setSelection(int);
    field public static final int INVALID_POSITION = -1; // 0xffffffff
    field public static final long INVALID_ROW_ID = -9223372036854775808L; // 0x8000000000000000L
    field public static final int ITEM_VIEW_TYPE_HEADER_OR_FOOTER = -2; // 0xfffffffe
    field public static final int ITEM_VIEW_TYPE_IGNORE = -1; // 0xffffffff
  }

  public static class AdapterView.AdapterContextMenuInfo implements android.view.ContextMenu.ContextMenuInfo {
    ctor public AdapterView.AdapterContextMenuInfo(android.view.View, int, long);
    field public long id;
    field public int position;
    field public android.view.View targetView;
  }

  public static abstract interface AdapterView.OnItemClickListener {
    method public abstract void onItemClick(android.widget.AdapterView<?>, android.view.View, int, long);
  }

  public static abstract interface AdapterView.OnItemLongClickListener {
    method public abstract boolean onItemLongClick(android.widget.AdapterView<?>, android.view.View, int, long);
  }

  public static abstract interface AdapterView.OnItemSelectedListener {
    method public abstract void onItemSelected(android.widget.AdapterView<?>, android.view.View, int, long);
    method public abstract void onNothingSelected(android.widget.AdapterView<?>);
  }

  public abstract class AdapterViewAnimator extends android.widget.AdapterView implements android.widget.Advanceable {
    ctor public AdapterViewAnimator(android.content.Context);
    ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet);
    ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet, int);
    ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet, int, int);
    method public void advance();
    method public void deferNotifyDataSetChanged();
    method public void fyiWillBeAdvancedByHostKThx();
    method public android.widget.Adapter getAdapter();
    method public android.view.View getCurrentView();
    method public int getDisplayedChild();
    method public android.animation.ObjectAnimator getInAnimation();
    method public android.animation.ObjectAnimator getOutAnimation();
    method public android.view.View getSelectedView();
    method public boolean onRemoteAdapterConnected();
    method public void onRemoteAdapterDisconnected();
    method public void onRestoreInstanceState(android.os.Parcelable);
    method public android.os.Parcelable onSaveInstanceState();
    method public void setAdapter(android.widget.Adapter);
    method public void setAnimateFirstView(boolean);
    method public void setDisplayedChild(int);
    method public void setInAnimation(android.animation.ObjectAnimator);
    method public void setInAnimation(android.content.Context, int);
    method public void setOutAnimation(android.animation.ObjectAnimator);
    method public void setOutAnimation(android.content.Context, int);
    method public void setRemoteViewsAdapter(android.content.Intent);
    method public void setSelection(int);
    method public void showNext();
    method public void showPrevious();
  }

  public class AdapterViewFlipper extends android.widget.AdapterViewAnimator {
    ctor public AdapterViewFlipper(android.content.Context);
    ctor public AdapterViewFlipper(android.content.Context, android.util.AttributeSet);
    ctor public AdapterViewFlipper(android.content.Context, android.util.AttributeSet, int);
    ctor public AdapterViewFlipper(android.content.Context, android.util.AttributeSet, int, int);
    method public int getFlipInterval();
    method public boolean isAutoStart();
    method public boolean isFlipping();
    method public void setAutoStart(boolean);
    method public void setFlipInterval(int);
    method public void startFlipping();
    method public void stopFlipping();
  }

  public abstract interface Advanceable {
    method public abstract void advance();
    method public abstract void fyiWillBeAdvancedByHostKThx();
  }

  public class AlphabetIndexer extends android.database.DataSetObserver implements android.widget.SectionIndexer {
    ctor public AlphabetIndexer(android.database.Cursor, int, java.lang.CharSequence);
    method protected int compare(java.lang.String, java.lang.String);
    method public int getPositionForSection(int);
    method public int getSectionForPosition(int);
    method public java.lang.Object[] getSections();
    method public void setCursor(android.database.Cursor);
    field protected java.lang.CharSequence mAlphabet;
    field protected int mColumnIndex;
    field protected android.database.Cursor mDataCursor;
  }

  public deprecated class AnalogClock extends android.view.View {
    ctor public AnalogClock(android.content.Context);
    ctor public AnalogClock(android.content.Context, android.util.AttributeSet);
    ctor public AnalogClock(android.content.Context, android.util.AttributeSet, int);
    ctor public AnalogClock(android.content.Context, android.util.AttributeSet, int, int);
  }

  public class ArrayAdapter extends android.widget.BaseAdapter implements android.widget.Filterable android.widget.Spinner.ThemedSpinnerAdapter {
    ctor public ArrayAdapter(android.content.Context, int);
    ctor public ArrayAdapter(android.content.Context, int, int);
    ctor public ArrayAdapter(android.content.Context, int, T[]);
    ctor public ArrayAdapter(android.content.Context, int, int, T[]);
    ctor public ArrayAdapter(android.content.Context, int, java.util.List<T>);
    ctor public ArrayAdapter(android.content.Context, int, int, java.util.List<T>);
    method public void add(T);
    method public void addAll(java.util.Collection<? extends T>);
    method public void addAll(T...);
    method public void clear();
    method public static android.widget.ArrayAdapter<java.lang.CharSequence> createFromResource(android.content.Context, int, int);
    method public android.content.Context getContext();
    method public int getCount();
    method public android.content.res.Resources.Theme getDropDownViewTheme();
    method public android.widget.Filter getFilter();
    method public T getItem(int);
    method public long getItemId(int);
    method public int getPosition(T);
    method public android.view.View getView(int, android.view.View, android.view.ViewGroup);
    method public void insert(T, int);
    method public void remove(T);
    method public void setDropDownViewResource(int);
    method public void setDropDownViewTheme(android.content.res.Resources.Theme);
    method public void setNotifyOnChange(boolean);
    method public void sort(java.util.Comparator<? super T>);
  }

  public class AutoCompleteTextView extends android.widget.EditText implements android.widget.Filter.FilterListener {
    ctor public AutoCompleteTextView(android.content.Context);
    ctor public AutoCompleteTextView(android.content.Context, android.util.AttributeSet);
    ctor public AutoCompleteTextView(android.content.Context, android.util.AttributeSet, int);
    ctor public AutoCompleteTextView(android.content.Context, android.util.AttributeSet, int, int);
    method public void clearListSelection();
    method protected java.lang.CharSequence convertSelectionToString(java.lang.Object);
    method public void dismissDropDown();
    method public boolean enoughToFilter();
    method public android.widget.ListAdapter getAdapter();
    method public java.lang.CharSequence getCompletionHint();
    method public int getDropDownAnchor();
    method public android.graphics.drawable.Drawable getDropDownBackground();
    method public int getDropDownHeight();
    method public int getDropDownHorizontalOffset();
    method public int getDropDownVerticalOffset();
    method public int getDropDownWidth();
    method protected android.widget.Filter getFilter();
    method public deprecated android.widget.AdapterView.OnItemClickListener getItemClickListener();
    method public deprecated android.widget.AdapterView.OnItemSelectedListener getItemSelectedListener();
    method public int getListSelection();
    method public android.widget.AdapterView.OnItemClickListener getOnItemClickListener();
    method public android.widget.AdapterView.OnItemSelectedListener getOnItemSelectedListener();
    method public int getThreshold();
    method public android.widget.AutoCompleteTextView.Validator getValidator();
    method public boolean isPerformingCompletion();
    method public boolean isPopupShowing();
    method public void onFilterComplete(int);
    method public void performCompletion();
    method protected void performFiltering(java.lang.CharSequence, int);
    method public void performValidation();
    method protected void replaceText(java.lang.CharSequence);
    method public void setAdapter(T);
    method public void setCompletionHint(java.lang.CharSequence);
    method public void setDropDownAnchor(int);
    method public void setDropDownBackgroundDrawable(android.graphics.drawable.Drawable);
    method public void setDropDownBackgroundResource(int);
    method public void setDropDownHeight(int);
    method public void setDropDownHorizontalOffset(int);
    method public void setDropDownVerticalOffset(int);
    method public void setDropDownWidth(int);
    method public void setListSelection(int);
    method public void setOnDismissListener(android.widget.AutoCompleteTextView.OnDismissListener);
    method public void setOnItemClickListener(android.widget.AdapterView.OnItemClickListener);
    method public void setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener);
    method public void setText(java.lang.CharSequence, boolean);
    method public void setThreshold(int);
    method public void setValidator(android.widget.AutoCompleteTextView.Validator);
    method public void showDropDown();
  }

  public static abstract interface AutoCompleteTextView.OnDismissListener {
    method public abstract void onDismiss();
  }

  public static abstract interface AutoCompleteTextView.Validator {
    method public abstract java.lang.CharSequence fixText(java.lang.CharSequence);
    method public abstract boolean isValid(java.lang.CharSequence);
  }

  public abstract class BaseAdapter implements android.widget.ListAdapter android.widget.SpinnerAdapter {
    ctor public BaseAdapter();
    method public boolean areAllItemsEnabled();
    method public android.view.View getDropDownView(int, android.view.View, android.view.ViewGroup);
    method public int getItemViewType(int);
    method public int getViewTypeCount();
    method public boolean hasStableIds();
    method public boolean isEmpty();
    method public boolean isEnabled(int);
    method public void notifyDataSetChanged();
    method public void notifyDataSetInvalidated();
    method public void registerDataSetObserver(android.database.DataSetObserver);
    method public void unregisterDataSetObserver(android.database.DataSetObserver);
  }

  public abstract class BaseExpandableListAdapter implements android.widget.ExpandableListAdapter android.widget.HeterogeneousExpandableList {
    ctor public BaseExpandableListAdapter();
    method public boolean areAllItemsEnabled();
    method public int getChildType(int, int);
    method public int getChildTypeCount();
    method public long getCombinedChildId(long, long);
    method public long getCombinedGroupId(long);
    method public int getGroupType(int);
    method public int getGroupTypeCount();
    method public boolean isEmpty();
    method public void notifyDataSetChanged();
    method public void notifyDataSetInvalidated();
    method public void onGroupCollapsed(int);
    method public void onGroupExpanded(int);
    method public void registerDataSetObserver(android.database.DataSetObserver);
    method public void unregisterDataSetObserver(android.database.DataSetObserver);
  }

  public class Button extends android.widget.TextView {
    ctor public Button(android.content.Context);
    ctor public Button(android.content.Context, android.util.AttributeSet);
    ctor public Button(android.content.Context, android.util.AttributeSet, int);
    ctor public Button(android.content.Context, android.util.AttributeSet, int, int);
  }

  public class CalendarView extends android.widget.FrameLayout {
    ctor public CalendarView(android.content.Context);
    ctor public CalendarView(android.content.Context, android.util.AttributeSet);
    ctor public CalendarView(android.content.Context, android.util.AttributeSet, int);
    ctor public CalendarView(android.content.Context, android.util.AttributeSet, int, int);
    method public long getDate();
    method public int getDateTextAppearance();
    method public int getFirstDayOfWeek();
    method public deprecated int getFocusedMonthDateColor();
    method public long getMaxDate();
    method public long getMinDate();
    method public deprecated android.graphics.drawable.Drawable getSelectedDateVerticalBar();
    method public deprecated int getSelectedWeekBackgroundColor();
    method public boolean getShowWeekNumber();
    method public deprecated int getShownWeekCount();
    method public deprecated int getUnfocusedMonthDateColor();
    method public int getWeekDayTextAppearance();
    method public deprecated int getWeekNumberColor();
    method public deprecated int getWeekSeparatorLineColor();
    method public void setDate(long);
    method public void setDate(long, boolean, boolean);
    method public void setDateTextAppearance(int);
    method public void setFirstDayOfWeek(int);
    method public deprecated void setFocusedMonthDateColor(int);
    method public void setMaxDate(long);
    method public void setMinDate(long);
    method public void setOnDateChangeListener(android.widget.CalendarView.OnDateChangeListener);
    method public deprecated void setSelectedDateVerticalBar(int);
    method public deprecated void setSelectedDateVerticalBar(android.graphics.drawable.Drawable);
    method public deprecated void setSelectedWeekBackgroundColor(int);
    method public void setShowWeekNumber(boolean);
    method public deprecated void setShownWeekCount(int);
    method public deprecated void setUnfocusedMonthDateColor(int);
    method public void setWeekDayTextAppearance(int);
    method public deprecated void setWeekNumberColor(int);
    method public deprecated void setWeekSeparatorLineColor(int);
  }

  public static abstract interface CalendarView.OnDateChangeListener {
    method public abstract void onSelectedDayChange(android.widget.CalendarView, int, int, int);
  }

  public class CheckBox extends android.widget.CompoundButton {
    ctor public CheckBox(android.content.Context);
    ctor public CheckBox(android.content.Context, android.util.AttributeSet);
    ctor public CheckBox(android.content.Context, android.util.AttributeSet, int);
    ctor public CheckBox(android.content.Context, android.util.AttributeSet, int, int);
  }

  public abstract interface Checkable {
    method public abstract boolean isChecked();
    method public abstract void setChecked(boolean);
    method public abstract void toggle();
  }

  public class CheckedTextView extends android.widget.TextView implements android.widget.Checkable {
    ctor public CheckedTextView(android.content.Context);
    ctor public CheckedTextView(android.content.Context, android.util.AttributeSet);
    ctor public CheckedTextView(android.content.Context, android.util.AttributeSet, int);
    ctor public CheckedTextView(android.content.Context, android.util.AttributeSet, int, int);
    method public android.graphics.drawable.Drawable getCheckMarkDrawable();
    method public android.content.res.ColorStateList getCheckMarkTintList();
    method public android.graphics.PorterDuff.Mode getCheckMarkTintMode();
    method public boolean isChecked();
    method public void setCheckMarkDrawable(int);
    method public void setCheckMarkDrawable(android.graphics.drawable.Drawable);
    method public void setCheckMarkTintList(android.content.res.ColorStateList);
    method public void setCheckMarkTintMode(android.graphics.PorterDuff.Mode);
    method public void setChecked(boolean);
    method public void toggle();
  }

  public class Chronometer extends android.widget.TextView {
    ctor public Chronometer(android.content.Context);
    ctor public Chronometer(android.content.Context, android.util.AttributeSet);
    ctor public Chronometer(android.content.Context, android.util.AttributeSet, int);
    ctor public Chronometer(android.content.Context, android.util.AttributeSet, int, int);
    method public long getBase();
    method public java.lang.String getFormat();
    method public android.widget.Chronometer.OnChronometerTickListener getOnChronometerTickListener();
    method public void setBase(long);
    method public void setFormat(java.lang.String);
    method public void setOnChronometerTickListener(android.widget.Chronometer.OnChronometerTickListener);
    method public void start();
    method public void stop();
  }

  public static abstract interface Chronometer.OnChronometerTickListener {
    method public abstract void onChronometerTick(android.widget.Chronometer);
  }

  public abstract class CompoundButton extends android.widget.Button implements android.widget.Checkable {
    ctor public CompoundButton(android.content.Context);
    ctor public CompoundButton(android.content.Context, android.util.AttributeSet);
    ctor public CompoundButton(android.content.Context, android.util.AttributeSet, int);
    ctor public CompoundButton(android.content.Context, android.util.AttributeSet, int, int);
    method public android.graphics.drawable.Drawable getButtonDrawable();
    method public android.content.res.ColorStateList getButtonTintList();
    method public android.graphics.PorterDuff.Mode getButtonTintMode();
    method public boolean isChecked();
    method public void setButtonDrawable(int);
    method public void setButtonDrawable(android.graphics.drawable.Drawable);
    method public void setButtonTintList(android.content.res.ColorStateList);
    method public void setButtonTintMode(android.graphics.PorterDuff.Mode);
    method public void setChecked(boolean);
    method public void setOnCheckedChangeListener(android.widget.CompoundButton.OnCheckedChangeListener);
    method public void toggle();
  }

  public static abstract interface CompoundButton.OnCheckedChangeListener {
    method public abstract void onCheckedChanged(android.widget.CompoundButton, boolean);
  }

  public abstract class CursorAdapter extends android.widget.BaseAdapter implements android.widget.Filterable android.widget.Spinner.ThemedSpinnerAdapter {
    ctor public deprecated CursorAdapter(android.content.Context, android.database.Cursor);
    ctor public CursorAdapter(android.content.Context, android.database.Cursor, boolean);
    ctor public CursorAdapter(android.content.Context, android.database.Cursor, int);
    method public abstract void bindView(android.view.View, android.content.Context, android.database.Cursor);
    method public void changeCursor(android.database.Cursor);
    method public java.lang.CharSequence convertToString(android.database.Cursor);
    method public int getCount();
    method public android.database.Cursor getCursor();
    method public android.content.res.Resources.Theme getDropDownViewTheme();
    method public android.widget.Filter getFilter();
    method public android.widget.FilterQueryProvider getFilterQueryProvider();
    method public java.lang.Object getItem(int);
    method public long getItemId(int);
    method public android.view.View getView(int, android.view.View, android.view.ViewGroup);
    method protected deprecated void init(android.content.Context, android.database.Cursor, boolean);
    method public android.view.View newDropDownView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
    method public abstract android.view.View newView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
    method protected void onContentChanged();
    method public android.database.Cursor runQueryOnBackgroundThread(java.lang.CharSequence);
    method public void setDropDownViewTheme(android.content.res.Resources.Theme);
    method public void setFilterQueryProvider(android.widget.FilterQueryProvider);
    method public android.database.Cursor swapCursor(android.database.Cursor);
    field public static final deprecated int FLAG_AUTO_REQUERY = 1; // 0x1
    field public static final int FLAG_REGISTER_CONTENT_OBSERVER = 2; // 0x2
  }

  public abstract class CursorTreeAdapter extends android.widget.BaseExpandableListAdapter implements android.widget.Filterable {
    ctor public CursorTreeAdapter(android.database.Cursor, android.content.Context);
    ctor public CursorTreeAdapter(android.database.Cursor, android.content.Context, boolean);
    method protected abstract void bindChildView(android.view.View, android.content.Context, android.database.Cursor, boolean);
    method protected abstract void bindGroupView(android.view.View, android.content.Context, android.database.Cursor, boolean);
    method public void changeCursor(android.database.Cursor);
    method public java.lang.String convertToString(android.database.Cursor);
    method public android.database.Cursor getChild(int, int);
    method public long getChildId(int, int);
    method public android.view.View getChildView(int, int, boolean, android.view.View, android.view.ViewGroup);
    method public int getChildrenCount(int);
    method protected abstract android.database.Cursor getChildrenCursor(android.database.Cursor);
    method public android.database.Cursor getCursor();
    method public android.widget.Filter getFilter();
    method public android.widget.FilterQueryProvider getFilterQueryProvider();
    method public android.database.Cursor getGroup(int);
    method public int getGroupCount();
    method public long getGroupId(int);
    method public android.view.View getGroupView(int, boolean, android.view.View, android.view.ViewGroup);
    method public boolean hasStableIds();
    method public boolean isChildSelectable(int, int);
    method protected abstract android.view.View newChildView(android.content.Context, android.database.Cursor, boolean, android.view.ViewGroup);
    method protected abstract android.view.View newGroupView(android.content.Context, android.database.Cursor, boolean, android.view.ViewGroup);
    method public void notifyDataSetChanged(boolean);
    method public android.database.Cursor runQueryOnBackgroundThread(java.lang.CharSequence);
    method public void setChildrenCursor(int, android.database.Cursor);
    method public void setFilterQueryProvider(android.widget.FilterQueryProvider);
    method public void setGroupCursor(android.database.Cursor);
  }

  public class DatePicker extends android.widget.FrameLayout {
    ctor public DatePicker(android.content.Context);
    ctor public DatePicker(android.content.Context, android.util.AttributeSet);
    ctor public DatePicker(android.content.Context, android.util.AttributeSet, int);
    ctor public DatePicker(android.content.Context, android.util.AttributeSet, int, int);
    method public android.widget.CalendarView getCalendarView();
    method public boolean getCalendarViewShown();
    method public int getDayOfMonth();
    method public int getFirstDayOfWeek();
    method public long getMaxDate();
    method public long getMinDate();
    method public int getMonth();
    method public boolean getSpinnersShown();
    method public int getYear();
    method public void init(int, int, int, android.widget.DatePicker.OnDateChangedListener);
    method public void setCalendarViewShown(boolean);
    method public void setFirstDayOfWeek(int);
    method public void setMaxDate(long);
    method public void setMinDate(long);
    method public void setSpinnersShown(boolean);
    method public void updateDate(int, int, int);
  }

  public static abstract interface DatePicker.OnDateChangedListener {
    method public abstract void onDateChanged(android.widget.DatePicker, int, int, int);
  }

  public class DialerFilter extends android.widget.RelativeLayout {
    ctor public DialerFilter(android.content.Context);
    ctor public DialerFilter(android.content.Context, android.util.AttributeSet);
    method public void append(java.lang.String);
    method public void clearText();
    method public java.lang.CharSequence getDigits();
    method public java.lang.CharSequence getFilterText();
    method public java.lang.CharSequence getLetters();
    method public int getMode();
    method public boolean isQwertyKeyboard();
    method protected void onModeChange(int, int);
    method public void removeFilterWatcher(android.text.TextWatcher);
    method public void setDigitsWatcher(android.text.TextWatcher);
    method public void setFilterWatcher(android.text.TextWatcher);
    method public void setLettersWatcher(android.text.TextWatcher);
    method public void setMode(int);
    field public static final int DIGITS_AND_LETTERS = 1; // 0x1
    field public static final int DIGITS_AND_LETTERS_NO_DIGITS = 2; // 0x2
    field public static final int DIGITS_AND_LETTERS_NO_LETTERS = 3; // 0x3
    field public static final int DIGITS_ONLY = 4; // 0x4
    field public static final int LETTERS_ONLY = 5; // 0x5
  }

  public deprecated class DigitalClock extends android.widget.TextView {
    ctor public DigitalClock(android.content.Context);
    ctor public DigitalClock(android.content.Context, android.util.AttributeSet);
  }

  public class EdgeEffect {
    ctor public EdgeEffect(android.content.Context);
    method public boolean draw(android.graphics.Canvas);
    method public void finish();
    method public int getColor();
    method public int getMaxHeight();
    method public boolean isFinished();
    method public void onAbsorb(int);
    method public void onPull(float);
    method public void onPull(float, float);
    method public void onRelease();
    method public void setColor(int);
    method public void setSize(int, int);
  }

  public class EditText extends android.widget.TextView {
    ctor public EditText(android.content.Context);
    ctor public EditText(android.content.Context, android.util.AttributeSet);
    ctor public EditText(android.content.Context, android.util.AttributeSet, int);
    ctor public EditText(android.content.Context, android.util.AttributeSet, int, int);
    method public void extendSelection(int);
    method public void selectAll();
    method public void setSelection(int, int);
    method public void setSelection(int);
  }

  public abstract interface ExpandableListAdapter {
    method public abstract boolean areAllItemsEnabled();
    method public abstract java.lang.Object getChild(int, int);
    method public abstract long getChildId(int, int);
    method public abstract android.view.View getChildView(int, int, boolean, android.view.View, android.view.ViewGroup);
    method public abstract int getChildrenCount(int);
    method public abstract long getCombinedChildId(long, long);
    method public abstract long getCombinedGroupId(long);
    method public abstract java.lang.Object getGroup(int);
    method public abstract int getGroupCount();
    method public abstract long getGroupId(int);
    method public abstract android.view.View getGroupView(int, boolean, android.view.View, android.view.ViewGroup);
    method public abstract boolean hasStableIds();
    method public abstract boolean isChildSelectable(int, int);
    method public abstract boolean isEmpty();
    method public abstract void onGroupCollapsed(int);
    method public abstract void onGroupExpanded(int);
    method public abstract void registerDataSetObserver(android.database.DataSetObserver);
    method public abstract void unregisterDataSetObserver(android.database.DataSetObserver);
  }

  public class ExpandableListView extends android.widget.ListView {
    ctor public ExpandableListView(android.content.Context);
    ctor public ExpandableListView(android.content.Context, android.util.AttributeSet);
    ctor public ExpandableListView(android.content.Context, android.util.AttributeSet, int);
    ctor public ExpandableListView(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean collapseGroup(int);
    method public boolean expandGroup(int);
    method public boolean expandGroup(int, boolean);
    method public android.widget.ExpandableListAdapter getExpandableListAdapter();
    method public long getExpandableListPosition(int);
    method public int getFlatListPosition(long);
    method public static int getPackedPositionChild(long);
    method public static long getPackedPositionForChild(int, int);
    method public static long getPackedPositionForGroup(int);
    method public static int getPackedPositionGroup(long);
    method public static int getPackedPositionType(long);
    method public long getSelectedId();
    method public long getSelectedPosition();
    method public boolean isGroupExpanded(int);
    method public void setAdapter(android.widget.ExpandableListAdapter);
    method public void setChildDivider(android.graphics.drawable.Drawable);
    method public void setChildIndicator(android.graphics.drawable.Drawable);
    method public void setChildIndicatorBounds(int, int);
    method public void setChildIndicatorBoundsRelative(int, int);
    method public void setGroupIndicator(android.graphics.drawable.Drawable);
    method public void setIndicatorBounds(int, int);
    method public void setIndicatorBoundsRelative(int, int);
    method public void setOnChildClickListener(android.widget.ExpandableListView.OnChildClickListener);
    method public void setOnGroupClickListener(android.widget.ExpandableListView.OnGroupClickListener);
    method public void setOnGroupCollapseListener(android.widget.ExpandableListView.OnGroupCollapseListener);
    method public void setOnGroupExpandListener(android.widget.ExpandableListView.OnGroupExpandListener);
    method public boolean setSelectedChild(int, int, boolean);
    method public void setSelectedGroup(int);
    field public static final int CHILD_INDICATOR_INHERIT = -1; // 0xffffffff
    field public static final int PACKED_POSITION_TYPE_CHILD = 1; // 0x1
    field public static final int PACKED_POSITION_TYPE_GROUP = 0; // 0x0
    field public static final int PACKED_POSITION_TYPE_NULL = 2; // 0x2
    field public static final long PACKED_POSITION_VALUE_NULL = 4294967295L; // 0xffffffffL
  }

  public static class ExpandableListView.ExpandableListContextMenuInfo implements android.view.ContextMenu.ContextMenuInfo {
    ctor public ExpandableListView.ExpandableListContextMenuInfo(android.view.View, long, long);
    field public long id;
    field public long packedPosition;
    field public android.view.View targetView;
  }

  public static abstract interface ExpandableListView.OnChildClickListener {
    method public abstract boolean onChildClick(android.widget.ExpandableListView, android.view.View, int, int, long);
  }

  public static abstract interface ExpandableListView.OnGroupClickListener {
    method public abstract boolean onGroupClick(android.widget.ExpandableListView, android.view.View, int, long);
  }

  public static abstract interface ExpandableListView.OnGroupCollapseListener {
    method public abstract void onGroupCollapse(int);
  }

  public static abstract interface ExpandableListView.OnGroupExpandListener {
    method public abstract void onGroupExpand(int);
  }

  public abstract class Filter {
    ctor public Filter();
    method public java.lang.CharSequence convertResultToString(java.lang.Object);
    method public final void filter(java.lang.CharSequence);
    method public final void filter(java.lang.CharSequence, android.widget.Filter.FilterListener);
    method protected abstract android.widget.Filter.FilterResults performFiltering(java.lang.CharSequence);
    method protected abstract void publishResults(java.lang.CharSequence, android.widget.Filter.FilterResults);
  }

  public static abstract interface Filter.FilterListener {
    method public abstract void onFilterComplete(int);
  }

  protected static class Filter.FilterResults {
    ctor public Filter.FilterResults();
    field public int count;
    field public java.lang.Object values;
  }

  public abstract interface FilterQueryProvider {
    method public abstract android.database.Cursor runQuery(java.lang.CharSequence);
  }

  public abstract interface Filterable {
    method public abstract android.widget.Filter getFilter();
  }

  public class FrameLayout extends android.view.ViewGroup {
    ctor public FrameLayout(android.content.Context);
    ctor public FrameLayout(android.content.Context, android.util.AttributeSet);
    ctor public FrameLayout(android.content.Context, android.util.AttributeSet, int);
    ctor public FrameLayout(android.content.Context, android.util.AttributeSet, int, int);
    method public deprecated boolean getConsiderGoneChildrenWhenMeasuring();
    method public boolean getMeasureAllChildren();
    method protected void onLayout(boolean, int, int, int, int);
    method public void setMeasureAllChildren(boolean);
  }

  public static class FrameLayout.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
    ctor public FrameLayout.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public FrameLayout.LayoutParams(int, int);
    ctor public FrameLayout.LayoutParams(int, int, int);
    ctor public FrameLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public FrameLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public FrameLayout.LayoutParams(android.widget.FrameLayout.LayoutParams);
    field public int gravity;
  }

  public deprecated class Gallery extends android.widget.AbsSpinner implements android.view.GestureDetector.OnGestureListener {
    ctor public Gallery(android.content.Context);
    ctor public Gallery(android.content.Context, android.util.AttributeSet);
    ctor public Gallery(android.content.Context, android.util.AttributeSet, int);
    ctor public Gallery(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean onDown(android.view.MotionEvent);
    method public boolean onFling(android.view.MotionEvent, android.view.MotionEvent, float, float);
    method public void onLongPress(android.view.MotionEvent);
    method public boolean onScroll(android.view.MotionEvent, android.view.MotionEvent, float, float);
    method public void onShowPress(android.view.MotionEvent);
    method public boolean onSingleTapUp(android.view.MotionEvent);
    method public void setAnimationDuration(int);
    method public void setCallbackDuringFling(boolean);
    method public void setGravity(int);
    method public void setSpacing(int);
    method public void setUnselectedAlpha(float);
  }

  public static class Gallery.LayoutParams extends android.view.ViewGroup.LayoutParams {
    ctor public Gallery.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public Gallery.LayoutParams(int, int);
    ctor public Gallery.LayoutParams(android.view.ViewGroup.LayoutParams);
  }

  public class GridLayout extends android.view.ViewGroup {
    ctor public GridLayout(android.content.Context);
    ctor public GridLayout(android.content.Context, android.util.AttributeSet);
    ctor public GridLayout(android.content.Context, android.util.AttributeSet, int);
    ctor public GridLayout(android.content.Context, android.util.AttributeSet, int, int);
    method public int getAlignmentMode();
    method public int getColumnCount();
    method public int getOrientation();
    method public int getRowCount();
    method public boolean getUseDefaultMargins();
    method public boolean isColumnOrderPreserved();
    method public boolean isRowOrderPreserved();
    method protected void onLayout(boolean, int, int, int, int);
    method public void setAlignmentMode(int);
    method public void setColumnCount(int);
    method public void setColumnOrderPreserved(boolean);
    method public void setOrientation(int);
    method public void setRowCount(int);
    method public void setRowOrderPreserved(boolean);
    method public void setUseDefaultMargins(boolean);
    method public static android.widget.GridLayout.Spec spec(int, int, android.widget.GridLayout.Alignment, float);
    method public static android.widget.GridLayout.Spec spec(int, android.widget.GridLayout.Alignment, float);
    method public static android.widget.GridLayout.Spec spec(int, int, float);
    method public static android.widget.GridLayout.Spec spec(int, float);
    method public static android.widget.GridLayout.Spec spec(int, int, android.widget.GridLayout.Alignment);
    method public static android.widget.GridLayout.Spec spec(int, android.widget.GridLayout.Alignment);
    method public static android.widget.GridLayout.Spec spec(int, int);
    method public static android.widget.GridLayout.Spec spec(int);
    field public static final int ALIGN_BOUNDS = 0; // 0x0
    field public static final int ALIGN_MARGINS = 1; // 0x1
    field public static final android.widget.GridLayout.Alignment BASELINE;
    field public static final android.widget.GridLayout.Alignment BOTTOM;
    field public static final android.widget.GridLayout.Alignment CENTER;
    field public static final android.widget.GridLayout.Alignment END;
    field public static final android.widget.GridLayout.Alignment FILL;
    field public static final int HORIZONTAL = 0; // 0x0
    field public static final android.widget.GridLayout.Alignment LEFT;
    field public static final android.widget.GridLayout.Alignment RIGHT;
    field public static final android.widget.GridLayout.Alignment START;
    field public static final android.widget.GridLayout.Alignment TOP;
    field public static final int UNDEFINED = -2147483648; // 0x80000000
    field public static final int VERTICAL = 1; // 0x1
  }

  public static abstract class GridLayout.Alignment {
  }

  public static class GridLayout.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
    ctor public GridLayout.LayoutParams(android.widget.GridLayout.Spec, android.widget.GridLayout.Spec);
    ctor public GridLayout.LayoutParams();
    ctor public GridLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public GridLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public GridLayout.LayoutParams(android.widget.GridLayout.LayoutParams);
    ctor public GridLayout.LayoutParams(android.content.Context, android.util.AttributeSet);
    method public void setGravity(int);
    field public android.widget.GridLayout.Spec columnSpec;
    field public android.widget.GridLayout.Spec rowSpec;
  }

  public static class GridLayout.Spec {
  }

  public class GridView extends android.widget.AbsListView {
    ctor public GridView(android.content.Context);
    ctor public GridView(android.content.Context, android.util.AttributeSet);
    ctor public GridView(android.content.Context, android.util.AttributeSet, int);
    ctor public GridView(android.content.Context, android.util.AttributeSet, int, int);
    method public android.widget.ListAdapter getAdapter();
    method public int getColumnWidth();
    method public int getGravity();
    method public int getHorizontalSpacing();
    method public int getNumColumns();
    method public int getRequestedColumnWidth();
    method public int getRequestedHorizontalSpacing();
    method public int getStretchMode();
    method public int getVerticalSpacing();
    method public void setColumnWidth(int);
    method public void setGravity(int);
    method public void setHorizontalSpacing(int);
    method public void setNumColumns(int);
    method public void setSelection(int);
    method public void setStretchMode(int);
    method public void setVerticalSpacing(int);
    method public void smoothScrollByOffset(int);
    field public static final int AUTO_FIT = -1; // 0xffffffff
    field public static final int NO_STRETCH = 0; // 0x0
    field public static final int STRETCH_COLUMN_WIDTH = 2; // 0x2
    field public static final int STRETCH_SPACING = 1; // 0x1
    field public static final int STRETCH_SPACING_UNIFORM = 3; // 0x3
  }

  public class HeaderViewListAdapter implements android.widget.Filterable android.widget.WrapperListAdapter {
    ctor public HeaderViewListAdapter(java.util.ArrayList<android.widget.ListView.FixedViewInfo>, java.util.ArrayList<android.widget.ListView.FixedViewInfo>, android.widget.ListAdapter);
    method public boolean areAllItemsEnabled();
    method public int getCount();
    method public android.widget.Filter getFilter();
    method public int getFootersCount();
    method public int getHeadersCount();
    method public java.lang.Object getItem(int);
    method public long getItemId(int);
    method public int getItemViewType(int);
    method public android.view.View getView(int, android.view.View, android.view.ViewGroup);
    method public int getViewTypeCount();
    method public android.widget.ListAdapter getWrappedAdapter();
    method public boolean hasStableIds();
    method public boolean isEmpty();
    method public boolean isEnabled(int);
    method public void registerDataSetObserver(android.database.DataSetObserver);
    method public boolean removeFooter(android.view.View);
    method public boolean removeHeader(android.view.View);
    method public void unregisterDataSetObserver(android.database.DataSetObserver);
  }

  public abstract interface HeterogeneousExpandableList {
    method public abstract int getChildType(int, int);
    method public abstract int getChildTypeCount();
    method public abstract int getGroupType(int);
    method public abstract int getGroupTypeCount();
  }

  public class HorizontalScrollView extends android.widget.FrameLayout {
    ctor public HorizontalScrollView(android.content.Context);
    ctor public HorizontalScrollView(android.content.Context, android.util.AttributeSet);
    ctor public HorizontalScrollView(android.content.Context, android.util.AttributeSet, int);
    ctor public HorizontalScrollView(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean arrowScroll(int);
    method protected int computeScrollDeltaToGetChildRectOnScreen(android.graphics.Rect);
    method public boolean executeKeyEvent(android.view.KeyEvent);
    method public void fling(int);
    method public boolean fullScroll(int);
    method public int getMaxScrollAmount();
    method public boolean isFillViewport();
    method public boolean isSmoothScrollingEnabled();
    method public boolean pageScroll(int);
    method public void setFillViewport(boolean);
    method public void setSmoothScrollingEnabled(boolean);
    method public final void smoothScrollBy(int, int);
    method public final void smoothScrollTo(int, int);
  }

  public class ImageButton extends android.widget.ImageView {
    ctor public ImageButton(android.content.Context);
    ctor public ImageButton(android.content.Context, android.util.AttributeSet);
    ctor public ImageButton(android.content.Context, android.util.AttributeSet, int);
    ctor public ImageButton(android.content.Context, android.util.AttributeSet, int, int);
  }

  public class ImageSwitcher extends android.widget.ViewSwitcher {
    ctor public ImageSwitcher(android.content.Context);
    ctor public ImageSwitcher(android.content.Context, android.util.AttributeSet);
    method public void setImageDrawable(android.graphics.drawable.Drawable);
    method public void setImageResource(int);
    method public void setImageURI(android.net.Uri);
  }

  public class ImageView extends android.view.View {
    ctor public ImageView(android.content.Context);
    ctor public ImageView(android.content.Context, android.util.AttributeSet);
    ctor public ImageView(android.content.Context, android.util.AttributeSet, int);
    ctor public ImageView(android.content.Context, android.util.AttributeSet, int, int);
    method public final void clearColorFilter();
    method public boolean getAdjustViewBounds();
    method public boolean getBaselineAlignBottom();
    method public android.graphics.ColorFilter getColorFilter();
    method public boolean getCropToPadding();
    method public android.graphics.drawable.Drawable getDrawable();
    method public int getImageAlpha();
    method public android.graphics.Matrix getImageMatrix();
    method public android.content.res.ColorStateList getImageTintList();
    method public android.graphics.PorterDuff.Mode getImageTintMode();
    method public int getMaxHeight();
    method public int getMaxWidth();
    method public android.widget.ImageView.ScaleType getScaleType();
    method public int[] onCreateDrawableState(int);
    method public void setAdjustViewBounds(boolean);
    method public deprecated void setAlpha(int);
    method public void setBaseline(int);
    method public void setBaselineAlignBottom(boolean);
    method public final void setColorFilter(int, android.graphics.PorterDuff.Mode);
    method public final void setColorFilter(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setCropToPadding(boolean);
    method protected boolean setFrame(int, int, int, int);
    method public void setImageAlpha(int);
    method public void setImageBitmap(android.graphics.Bitmap);
    method public void setImageDrawable(android.graphics.drawable.Drawable);
    method public void setImageLevel(int);
    method public void setImageMatrix(android.graphics.Matrix);
    method public void setImageResource(int);
    method public void setImageState(int[], boolean);
    method public void setImageTintList(android.content.res.ColorStateList);
    method public void setImageTintMode(android.graphics.PorterDuff.Mode);
    method public void setImageURI(android.net.Uri);
    method public void setMaxHeight(int);
    method public void setMaxWidth(int);
    method public void setScaleType(android.widget.ImageView.ScaleType);
  }

  public static final class ImageView.ScaleType extends java.lang.Enum {
    method public static android.widget.ImageView.ScaleType valueOf(java.lang.String);
    method public static final android.widget.ImageView.ScaleType[] values();
    enum_constant public static final android.widget.ImageView.ScaleType CENTER;
    enum_constant public static final android.widget.ImageView.ScaleType CENTER_CROP;
    enum_constant public static final android.widget.ImageView.ScaleType CENTER_INSIDE;
    enum_constant public static final android.widget.ImageView.ScaleType FIT_CENTER;
    enum_constant public static final android.widget.ImageView.ScaleType FIT_END;
    enum_constant public static final android.widget.ImageView.ScaleType FIT_START;
    enum_constant public static final android.widget.ImageView.ScaleType FIT_XY;
    enum_constant public static final android.widget.ImageView.ScaleType MATRIX;
  }

  public class LinearLayout extends android.view.ViewGroup {
    ctor public LinearLayout(android.content.Context);
    ctor public LinearLayout(android.content.Context, android.util.AttributeSet);
    ctor public LinearLayout(android.content.Context, android.util.AttributeSet, int);
    ctor public LinearLayout(android.content.Context, android.util.AttributeSet, int, int);
    method public int getBaselineAlignedChildIndex();
    method public android.graphics.drawable.Drawable getDividerDrawable();
    method public int getDividerPadding();
    method public int getOrientation();
    method public int getShowDividers();
    method public float getWeightSum();
    method public boolean isBaselineAligned();
    method public boolean isMeasureWithLargestChildEnabled();
    method protected void onLayout(boolean, int, int, int, int);
    method public void setBaselineAligned(boolean);
    method public void setBaselineAlignedChildIndex(int);
    method public void setDividerDrawable(android.graphics.drawable.Drawable);
    method public void setDividerPadding(int);
    method public void setGravity(int);
    method public void setHorizontalGravity(int);
    method public void setMeasureWithLargestChildEnabled(boolean);
    method public void setOrientation(int);
    method public void setShowDividers(int);
    method public void setVerticalGravity(int);
    method public void setWeightSum(float);
    field public static final int HORIZONTAL = 0; // 0x0
    field public static final int SHOW_DIVIDER_BEGINNING = 1; // 0x1
    field public static final int SHOW_DIVIDER_END = 4; // 0x4
    field public static final int SHOW_DIVIDER_MIDDLE = 2; // 0x2
    field public static final int SHOW_DIVIDER_NONE = 0; // 0x0
    field public static final int VERTICAL = 1; // 0x1
  }

  public static class LinearLayout.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
    ctor public LinearLayout.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public LinearLayout.LayoutParams(int, int);
    ctor public LinearLayout.LayoutParams(int, int, float);
    ctor public LinearLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public LinearLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams);
    method public java.lang.String debug(java.lang.String);
    field public int gravity;
    field public float weight;
  }

  public abstract interface ListAdapter implements android.widget.Adapter {
    method public abstract boolean areAllItemsEnabled();
    method public abstract boolean isEnabled(int);
  }

  public class ListPopupWindow {
    ctor public ListPopupWindow(android.content.Context);
    ctor public ListPopupWindow(android.content.Context, android.util.AttributeSet);
    ctor public ListPopupWindow(android.content.Context, android.util.AttributeSet, int);
    ctor public ListPopupWindow(android.content.Context, android.util.AttributeSet, int, int);
    method public void clearListSelection();
    method public android.view.View.OnTouchListener createDragToOpenListener(android.view.View);
    method public void dismiss();
    method public android.view.View getAnchorView();
    method public int getAnimationStyle();
    method public android.graphics.drawable.Drawable getBackground();
    method public int getHeight();
    method public int getHorizontalOffset();
    method public int getInputMethodMode();
    method public android.widget.ListView getListView();
    method public int getPromptPosition();
    method public java.lang.Object getSelectedItem();
    method public long getSelectedItemId();
    method public int getSelectedItemPosition();
    method public android.view.View getSelectedView();
    method public int getSoftInputMode();
    method public int getVerticalOffset();
    method public int getWidth();
    method public boolean isInputMethodNotNeeded();
    method public boolean isModal();
    method public boolean isShowing();
    method public boolean onKeyDown(int, android.view.KeyEvent);
    method public boolean onKeyPreIme(int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public boolean performItemClick(int);
    method public void postShow();
    method public void setAdapter(android.widget.ListAdapter);
    method public void setAnchorView(android.view.View);
    method public void setAnimationStyle(int);
    method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
    method public void setContentWidth(int);
    method public void setDropDownGravity(int);
    method public void setHeight(int);
    method public void setHorizontalOffset(int);
    method public void setInputMethodMode(int);
    method public void setListSelector(android.graphics.drawable.Drawable);
    method public void setModal(boolean);
    method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
    method public void setOnItemClickListener(android.widget.AdapterView.OnItemClickListener);
    method public void setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener);
    method public void setPromptPosition(int);
    method public void setPromptView(android.view.View);
    method public void setSelection(int);
    method public void setSoftInputMode(int);
    method public void setVerticalOffset(int);
    method public void setWidth(int);
    method public void show();
    field public static final int INPUT_METHOD_FROM_FOCUSABLE = 0; // 0x0
    field public static final int INPUT_METHOD_NEEDED = 1; // 0x1
    field public static final int INPUT_METHOD_NOT_NEEDED = 2; // 0x2
    field public static final int MATCH_PARENT = -1; // 0xffffffff
    field public static final int POSITION_PROMPT_ABOVE = 0; // 0x0
    field public static final int POSITION_PROMPT_BELOW = 1; // 0x1
    field public static final int WRAP_CONTENT = -2; // 0xfffffffe
  }

  public class ListView extends android.widget.AbsListView {
    ctor public ListView(android.content.Context);
    ctor public ListView(android.content.Context, android.util.AttributeSet);
    ctor public ListView(android.content.Context, android.util.AttributeSet, int);
    ctor public ListView(android.content.Context, android.util.AttributeSet, int, int);
    method public void addFooterView(android.view.View, java.lang.Object, boolean);
    method public void addFooterView(android.view.View);
    method public void addHeaderView(android.view.View, java.lang.Object, boolean);
    method public void addHeaderView(android.view.View);
    method public boolean areFooterDividersEnabled();
    method public boolean areHeaderDividersEnabled();
    method protected android.view.View findViewTraversal(int);
    method protected android.view.View findViewWithTagTraversal(java.lang.Object);
    method public android.widget.ListAdapter getAdapter();
    method public deprecated long[] getCheckItemIds();
    method public android.graphics.drawable.Drawable getDivider();
    method public int getDividerHeight();
    method public int getFooterViewsCount();
    method public int getHeaderViewsCount();
    method public boolean getItemsCanFocus();
    method public int getMaxScrollAmount();
    method public android.graphics.drawable.Drawable getOverscrollFooter();
    method public android.graphics.drawable.Drawable getOverscrollHeader();
    method public boolean removeFooterView(android.view.View);
    method public boolean removeHeaderView(android.view.View);
    method public void setDivider(android.graphics.drawable.Drawable);
    method public void setDividerHeight(int);
    method public void setFooterDividersEnabled(boolean);
    method public void setHeaderDividersEnabled(boolean);
    method public void setItemsCanFocus(boolean);
    method public void setOverscrollFooter(android.graphics.drawable.Drawable);
    method public void setOverscrollHeader(android.graphics.drawable.Drawable);
    method public void setSelection(int);
    method public void setSelectionAfterHeaderView();
    method public void smoothScrollByOffset(int);
  }

  public class ListView.FixedViewInfo {
    ctor public ListView.FixedViewInfo();
    field public java.lang.Object data;
    field public boolean isSelectable;
    field public android.view.View view;
  }

  public class MediaController extends android.widget.FrameLayout {
    ctor public MediaController(android.content.Context, android.util.AttributeSet);
    ctor public MediaController(android.content.Context, boolean);
    ctor public MediaController(android.content.Context);
    method public void hide();
    method public boolean isShowing();
    method public void onFinishInflate();
    method public void setAnchorView(android.view.View);
    method public void setMediaPlayer(android.widget.MediaController.MediaPlayerControl);
    method public void setPrevNextListeners(android.view.View.OnClickListener, android.view.View.OnClickListener);
    method public void show();
    method public void show(int);
  }

  public static abstract interface MediaController.MediaPlayerControl {
    method public abstract boolean canPause();
    method public abstract boolean canSeekBackward();
    method public abstract boolean canSeekForward();
    method public abstract int getAudioSessionId();
    method public abstract int getBufferPercentage();
    method public abstract int getCurrentPosition();
    method public abstract int getDuration();
    method public abstract boolean isPlaying();
    method public abstract void pause();
    method public abstract void seekTo(int);
    method public abstract void start();
  }

  public class MultiAutoCompleteTextView extends android.widget.AutoCompleteTextView {
    ctor public MultiAutoCompleteTextView(android.content.Context);
    ctor public MultiAutoCompleteTextView(android.content.Context, android.util.AttributeSet);
    ctor public MultiAutoCompleteTextView(android.content.Context, android.util.AttributeSet, int);
    ctor public MultiAutoCompleteTextView(android.content.Context, android.util.AttributeSet, int, int);
    method protected void performFiltering(java.lang.CharSequence, int, int, int);
    method public void setTokenizer(android.widget.MultiAutoCompleteTextView.Tokenizer);
  }

  public static class MultiAutoCompleteTextView.CommaTokenizer implements android.widget.MultiAutoCompleteTextView.Tokenizer {
    ctor public MultiAutoCompleteTextView.CommaTokenizer();
    method public int findTokenEnd(java.lang.CharSequence, int);
    method public int findTokenStart(java.lang.CharSequence, int);
    method public java.lang.CharSequence terminateToken(java.lang.CharSequence);
  }

  public static abstract interface MultiAutoCompleteTextView.Tokenizer {
    method public abstract int findTokenEnd(java.lang.CharSequence, int);
    method public abstract int findTokenStart(java.lang.CharSequence, int);
    method public abstract java.lang.CharSequence terminateToken(java.lang.CharSequence);
  }

  public class NumberPicker extends android.widget.LinearLayout {
    ctor public NumberPicker(android.content.Context);
    ctor public NumberPicker(android.content.Context, android.util.AttributeSet);
    ctor public NumberPicker(android.content.Context, android.util.AttributeSet, int);
    ctor public NumberPicker(android.content.Context, android.util.AttributeSet, int, int);
    method public java.lang.String[] getDisplayedValues();
    method public int getMaxValue();
    method public int getMinValue();
    method public int getValue();
    method public boolean getWrapSelectorWheel();
    method public void setDisplayedValues(java.lang.String[]);
    method public void setFormatter(android.widget.NumberPicker.Formatter);
    method public void setMaxValue(int);
    method public void setMinValue(int);
    method public void setOnLongPressUpdateInterval(long);
    method public void setOnScrollListener(android.widget.NumberPicker.OnScrollListener);
    method public void setOnValueChangedListener(android.widget.NumberPicker.OnValueChangeListener);
    method public void setValue(int);
    method public void setWrapSelectorWheel(boolean);
  }

  public static abstract interface NumberPicker.Formatter {
    method public abstract java.lang.String format(int);
  }

  public static abstract interface NumberPicker.OnScrollListener {
    method public abstract void onScrollStateChange(android.widget.NumberPicker, int);
    field public static final int SCROLL_STATE_FLING = 2; // 0x2
    field public static final int SCROLL_STATE_IDLE = 0; // 0x0
    field public static final int SCROLL_STATE_TOUCH_SCROLL = 1; // 0x1
  }

  public static abstract interface NumberPicker.OnValueChangeListener {
    method public abstract void onValueChange(android.widget.NumberPicker, int, int);
  }

  public class OverScroller {
    ctor public OverScroller(android.content.Context);
    ctor public OverScroller(android.content.Context, android.view.animation.Interpolator);
    ctor public OverScroller(android.content.Context, android.view.animation.Interpolator, float, float);
    ctor public OverScroller(android.content.Context, android.view.animation.Interpolator, float, float, boolean);
    method public void abortAnimation();
    method public boolean computeScrollOffset();
    method public void fling(int, int, int, int, int, int, int, int);
    method public void fling(int, int, int, int, int, int, int, int, int, int);
    method public final void forceFinished(boolean);
    method public float getCurrVelocity();
    method public final int getCurrX();
    method public final int getCurrY();
    method public final int getFinalX();
    method public final int getFinalY();
    method public final int getStartX();
    method public final int getStartY();
    method public final boolean isFinished();
    method public boolean isOverScrolled();
    method public void notifyHorizontalEdgeReached(int, int, int);
    method public void notifyVerticalEdgeReached(int, int, int);
    method public final void setFriction(float);
    method public boolean springBack(int, int, int, int, int, int);
    method public void startScroll(int, int, int, int);
    method public void startScroll(int, int, int, int, int);
  }

  public class PopupMenu {
    ctor public PopupMenu(android.content.Context, android.view.View);
    ctor public PopupMenu(android.content.Context, android.view.View, int);
    ctor public PopupMenu(android.content.Context, android.view.View, int, int, int);
    method public void dismiss();
    method public android.view.View.OnTouchListener getDragToOpenListener();
    method public int getGravity();
    method public android.view.Menu getMenu();
    method public android.view.MenuInflater getMenuInflater();
    method public void inflate(int);
    method public void setGravity(int);
    method public void setOnDismissListener(android.widget.PopupMenu.OnDismissListener);
    method public void setOnMenuItemClickListener(android.widget.PopupMenu.OnMenuItemClickListener);
    method public void show();
  }

  public static abstract interface PopupMenu.OnDismissListener {
    method public abstract void onDismiss(android.widget.PopupMenu);
  }

  public static abstract interface PopupMenu.OnMenuItemClickListener {
    method public abstract boolean onMenuItemClick(android.view.MenuItem);
  }

  public class PopupWindow {
    ctor public PopupWindow(android.content.Context);
    ctor public PopupWindow(android.content.Context, android.util.AttributeSet);
    ctor public PopupWindow(android.content.Context, android.util.AttributeSet, int);
    ctor public PopupWindow(android.content.Context, android.util.AttributeSet, int, int);
    ctor public PopupWindow();
    ctor public PopupWindow(android.view.View);
    ctor public PopupWindow(int, int);
    ctor public PopupWindow(android.view.View, int, int);
    ctor public PopupWindow(android.view.View, int, int, boolean);
    method public void dismiss();
    method public int getAnimationStyle();
    method public android.graphics.drawable.Drawable getBackground();
    method public android.view.View getContentView();
    method public float getElevation();
    method public int getHeight();
    method public int getInputMethodMode();
    method public int getMaxAvailableHeight(android.view.View);
    method public int getMaxAvailableHeight(android.view.View, int);
    method public boolean getOverlapAnchor();
    method public int getSoftInputMode();
    method public int getWidth();
    method public boolean isAboveAnchor();
    method public boolean isAttachedInDecor();
    method public boolean isClippingEnabled();
    method public boolean isFocusable();
    method public boolean isOutsideTouchable();
    method public boolean isShowing();
    method public boolean isSplitTouchEnabled();
    method public boolean isTouchable();
    method public void setAnimationStyle(int);
    method public void setAttachedInDecor(boolean);
    method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
    method public void setClippingEnabled(boolean);
    method public void setContentView(android.view.View);
    method public void setElevation(float);
    method public void setEnterTransition(android.transition.Transition);
    method public void setExitTransition(android.transition.Transition);
    method public void setFocusable(boolean);
    method public void setHeight(int);
    method public void setIgnoreCheekPress();
    method public void setInputMethodMode(int);
    method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
    method public void setOutsideTouchable(boolean);
    method public void setOverlapAnchor(boolean);
    method public void setSoftInputMode(int);
    method public void setSplitTouchEnabled(boolean);
    method public void setTouchInterceptor(android.view.View.OnTouchListener);
    method public void setTouchable(boolean);
    method public void setWidth(int);
    method public deprecated void setWindowLayoutMode(int, int);
    method public void showAsDropDown(android.view.View);
    method public void showAsDropDown(android.view.View, int, int);
    method public void showAsDropDown(android.view.View, int, int, int);
    method public void showAtLocation(android.view.View, int, int, int);
    method public void update();
    method public void update(int, int);
    method public void update(int, int, int, int);
    method public void update(int, int, int, int, boolean);
    method public void update(android.view.View, int, int);
    method public void update(android.view.View, int, int, int, int);
    field public static final int INPUT_METHOD_FROM_FOCUSABLE = 0; // 0x0
    field public static final int INPUT_METHOD_NEEDED = 1; // 0x1
    field public static final int INPUT_METHOD_NOT_NEEDED = 2; // 0x2
  }

  public static abstract interface PopupWindow.OnDismissListener {
    method public abstract void onDismiss();
  }

  public class ProgressBar extends android.view.View {
    ctor public ProgressBar(android.content.Context);
    ctor public ProgressBar(android.content.Context, android.util.AttributeSet);
    ctor public ProgressBar(android.content.Context, android.util.AttributeSet, int);
    ctor public ProgressBar(android.content.Context, android.util.AttributeSet, int, int);
    method public android.graphics.drawable.Drawable getIndeterminateDrawable();
    method public android.content.res.ColorStateList getIndeterminateTintList();
    method public android.graphics.PorterDuff.Mode getIndeterminateTintMode();
    method public android.view.animation.Interpolator getInterpolator();
    method public synchronized int getMax();
    method public synchronized int getProgress();
    method public android.content.res.ColorStateList getProgressBackgroundTintList();
    method public android.graphics.PorterDuff.Mode getProgressBackgroundTintMode();
    method public android.graphics.drawable.Drawable getProgressDrawable();
    method public android.content.res.ColorStateList getProgressTintList();
    method public android.graphics.PorterDuff.Mode getProgressTintMode();
    method public synchronized int getSecondaryProgress();
    method public android.content.res.ColorStateList getSecondaryProgressTintList();
    method public android.graphics.PorterDuff.Mode getSecondaryProgressTintMode();
    method public final synchronized void incrementProgressBy(int);
    method public final synchronized void incrementSecondaryProgressBy(int);
    method public synchronized boolean isIndeterminate();
    method public void onRestoreInstanceState(android.os.Parcelable);
    method public android.os.Parcelable onSaveInstanceState();
    method public synchronized void setIndeterminate(boolean);
    method public void setIndeterminateDrawable(android.graphics.drawable.Drawable);
    method public void setIndeterminateDrawableTiled(android.graphics.drawable.Drawable);
    method public void setIndeterminateTintList(android.content.res.ColorStateList);
    method public void setIndeterminateTintMode(android.graphics.PorterDuff.Mode);
    method public void setInterpolator(android.content.Context, int);
    method public void setInterpolator(android.view.animation.Interpolator);
    method public synchronized void setMax(int);
    method public synchronized void setProgress(int);
    method public void setProgressBackgroundTintList(android.content.res.ColorStateList);
    method public void setProgressBackgroundTintMode(android.graphics.PorterDuff.Mode);
    method public void setProgressDrawable(android.graphics.drawable.Drawable);
    method public void setProgressDrawableTiled(android.graphics.drawable.Drawable);
    method public void setProgressTintList(android.content.res.ColorStateList);
    method public void setProgressTintMode(android.graphics.PorterDuff.Mode);
    method public synchronized void setSecondaryProgress(int);
    method public void setSecondaryProgressTintList(android.content.res.ColorStateList);
    method public void setSecondaryProgressTintMode(android.graphics.PorterDuff.Mode);
  }

  public class QuickContactBadge extends android.widget.ImageView implements android.view.View.OnClickListener {
    ctor public QuickContactBadge(android.content.Context);
    ctor public QuickContactBadge(android.content.Context, android.util.AttributeSet);
    ctor public QuickContactBadge(android.content.Context, android.util.AttributeSet, int);
    ctor public QuickContactBadge(android.content.Context, android.util.AttributeSet, int, int);
    method public void assignContactFromEmail(java.lang.String, boolean);
    method public void assignContactFromEmail(java.lang.String, boolean, android.os.Bundle);
    method public void assignContactFromPhone(java.lang.String, boolean);
    method public void assignContactFromPhone(java.lang.String, boolean, android.os.Bundle);
    method public void assignContactUri(android.net.Uri);
    method public void onClick(android.view.View);
    method public void setExcludeMimes(java.lang.String[]);
    method public void setImageToDefault();
    method public void setMode(int);
    method public void setOverlay(android.graphics.drawable.Drawable);
    method public void setPrioritizedMimeType(java.lang.String);
    field protected java.lang.String[] mExcludeMimes;
  }

  public class RadioButton extends android.widget.CompoundButton {
    ctor public RadioButton(android.content.Context);
    ctor public RadioButton(android.content.Context, android.util.AttributeSet);
    ctor public RadioButton(android.content.Context, android.util.AttributeSet, int);
    ctor public RadioButton(android.content.Context, android.util.AttributeSet, int, int);
  }

  public class RadioGroup extends android.widget.LinearLayout {
    ctor public RadioGroup(android.content.Context);
    ctor public RadioGroup(android.content.Context, android.util.AttributeSet);
    method public void check(int);
    method public void clearCheck();
    method public int getCheckedRadioButtonId();
    method public void setOnCheckedChangeListener(android.widget.RadioGroup.OnCheckedChangeListener);
  }

  public static class RadioGroup.LayoutParams extends android.widget.LinearLayout.LayoutParams {
    ctor public RadioGroup.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public RadioGroup.LayoutParams(int, int);
    ctor public RadioGroup.LayoutParams(int, int, float);
    ctor public RadioGroup.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public RadioGroup.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
  }

  public static abstract interface RadioGroup.OnCheckedChangeListener {
    method public abstract void onCheckedChanged(android.widget.RadioGroup, int);
  }

  public class RatingBar extends android.widget.AbsSeekBar {
    ctor public RatingBar(android.content.Context, android.util.AttributeSet, int);
    ctor public RatingBar(android.content.Context, android.util.AttributeSet, int, int);
    ctor public RatingBar(android.content.Context, android.util.AttributeSet);
    ctor public RatingBar(android.content.Context);
    method public int getNumStars();
    method public android.widget.RatingBar.OnRatingBarChangeListener getOnRatingBarChangeListener();
    method public float getRating();
    method public float getStepSize();
    method public boolean isIndicator();
    method public void setIsIndicator(boolean);
    method public void setNumStars(int);
    method public void setOnRatingBarChangeListener(android.widget.RatingBar.OnRatingBarChangeListener);
    method public void setRating(float);
    method public void setStepSize(float);
  }

  public static abstract interface RatingBar.OnRatingBarChangeListener {
    method public abstract void onRatingChanged(android.widget.RatingBar, float, boolean);
  }

  public class RelativeLayout extends android.view.ViewGroup {
    ctor public RelativeLayout(android.content.Context);
    ctor public RelativeLayout(android.content.Context, android.util.AttributeSet);
    ctor public RelativeLayout(android.content.Context, android.util.AttributeSet, int);
    ctor public RelativeLayout(android.content.Context, android.util.AttributeSet, int, int);
    method public int getGravity();
    method protected void onLayout(boolean, int, int, int, int);
    method public void setGravity(int);
    method public void setHorizontalGravity(int);
    method public void setIgnoreGravity(int);
    method public void setVerticalGravity(int);
    field public static final int ABOVE = 2; // 0x2
    field public static final int ALIGN_BASELINE = 4; // 0x4
    field public static final int ALIGN_BOTTOM = 8; // 0x8
    field public static final int ALIGN_END = 19; // 0x13
    field public static final int ALIGN_LEFT = 5; // 0x5
    field public static final int ALIGN_PARENT_BOTTOM = 12; // 0xc
    field public static final int ALIGN_PARENT_END = 21; // 0x15
    field public static final int ALIGN_PARENT_LEFT = 9; // 0x9
    field public static final int ALIGN_PARENT_RIGHT = 11; // 0xb
    field public static final int ALIGN_PARENT_START = 20; // 0x14
    field public static final int ALIGN_PARENT_TOP = 10; // 0xa
    field public static final int ALIGN_RIGHT = 7; // 0x7
    field public static final int ALIGN_START = 18; // 0x12
    field public static final int ALIGN_TOP = 6; // 0x6
    field public static final int BELOW = 3; // 0x3
    field public static final int CENTER_HORIZONTAL = 14; // 0xe
    field public static final int CENTER_IN_PARENT = 13; // 0xd
    field public static final int CENTER_VERTICAL = 15; // 0xf
    field public static final int END_OF = 17; // 0x11
    field public static final int LEFT_OF = 0; // 0x0
    field public static final int RIGHT_OF = 1; // 0x1
    field public static final int START_OF = 16; // 0x10
    field public static final int TRUE = -1; // 0xffffffff
  }

  public static class RelativeLayout.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
    ctor public RelativeLayout.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public RelativeLayout.LayoutParams(int, int);
    ctor public RelativeLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public RelativeLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public RelativeLayout.LayoutParams(android.widget.RelativeLayout.LayoutParams);
    method public void addRule(int);
    method public void addRule(int, int);
    method public java.lang.String debug(java.lang.String);
    method public int getRule(int);
    method public int[] getRules();
    method public void removeRule(int);
    field public boolean alignWithParent;
  }

  public class RemoteViews implements android.view.LayoutInflater.Filter android.os.Parcelable {
    ctor public RemoteViews(java.lang.String, int);
    ctor public RemoteViews(android.widget.RemoteViews, android.widget.RemoteViews);
    ctor public RemoteViews(android.os.Parcel);
    method public void addView(int, android.widget.RemoteViews);
    method public android.view.View apply(android.content.Context, android.view.ViewGroup);
    method public android.widget.RemoteViews clone();
    method public int describeContents();
    method public int getLayoutId();
    method public java.lang.String getPackage();
    method public boolean onLoadClass(java.lang.Class);
    method public void reapply(android.content.Context, android.view.View);
    method public void removeAllViews(int);
    method public void setAccessibilityTraversalAfter(int, int);
    method public void setAccessibilityTraversalBefore(int, int);
    method public void setBitmap(int, java.lang.String, android.graphics.Bitmap);
    method public void setBoolean(int, java.lang.String, boolean);
    method public void setBundle(int, java.lang.String, android.os.Bundle);
    method public void setByte(int, java.lang.String, byte);
    method public void setChar(int, java.lang.String, char);
    method public void setCharSequence(int, java.lang.String, java.lang.CharSequence);
    method public void setChronometer(int, long, java.lang.String, boolean);
    method public void setContentDescription(int, java.lang.CharSequence);
    method public void setDisplayedChild(int, int);
    method public void setDouble(int, java.lang.String, double);
    method public void setEmptyView(int, int);
    method public void setFloat(int, java.lang.String, float);
    method public void setImageViewBitmap(int, android.graphics.Bitmap);
    method public void setImageViewResource(int, int);
    method public void setImageViewUri(int, android.net.Uri);
    method public void setInt(int, java.lang.String, int);
    method public void setIntent(int, java.lang.String, android.content.Intent);
    method public void setLabelFor(int, int);
    method public void setLong(int, java.lang.String, long);
    method public void setOnClickFillInIntent(int, android.content.Intent);
    method public void setOnClickPendingIntent(int, android.app.PendingIntent);
    method public void setPendingIntentTemplate(int, android.app.PendingIntent);
    method public void setProgressBar(int, int, int, boolean);
    method public void setRelativeScrollPosition(int, int);
    method public deprecated void setRemoteAdapter(int, int, android.content.Intent);
    method public void setRemoteAdapter(int, android.content.Intent);
    method public void setScrollPosition(int, int);
    method public void setShort(int, java.lang.String, short);
    method public void setString(int, java.lang.String, java.lang.String);
    method public void setTextColor(int, int);
    method public void setTextViewCompoundDrawables(int, int, int, int, int);
    method public void setTextViewCompoundDrawablesRelative(int, int, int, int, int);
    method public void setTextViewText(int, java.lang.CharSequence);
    method public void setTextViewTextSize(int, int, float);
    method public void setUri(int, java.lang.String, android.net.Uri);
    method public void setViewPadding(int, int, int, int, int);
    method public void setViewVisibility(int, int);
    method public void showNext(int);
    method public void showPrevious(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.widget.RemoteViews> CREATOR;
  }

  public static class RemoteViews.ActionException extends java.lang.RuntimeException {
    ctor public RemoteViews.ActionException(java.lang.Exception);
    ctor public RemoteViews.ActionException(java.lang.String);
  }

  public static abstract class RemoteViews.RemoteView implements java.lang.annotation.Annotation {
  }

  public abstract class RemoteViewsService extends android.app.Service {
    ctor public RemoteViewsService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract android.widget.RemoteViewsService.RemoteViewsFactory onGetViewFactory(android.content.Intent);
  }

  public static abstract interface RemoteViewsService.RemoteViewsFactory {
    method public abstract int getCount();
    method public abstract long getItemId(int);
    method public abstract android.widget.RemoteViews getLoadingView();
    method public abstract android.widget.RemoteViews getViewAt(int);
    method public abstract int getViewTypeCount();
    method public abstract boolean hasStableIds();
    method public abstract void onCreate();
    method public abstract void onDataSetChanged();
    method public abstract void onDestroy();
  }

  public abstract class ResourceCursorAdapter extends android.widget.CursorAdapter {
    ctor public deprecated ResourceCursorAdapter(android.content.Context, int, android.database.Cursor);
    ctor public ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, boolean);
    ctor public ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, int);
    method public android.view.View newView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
    method public void setDropDownViewResource(int);
    method public void setViewResource(int);
  }

  public abstract class ResourceCursorTreeAdapter extends android.widget.CursorTreeAdapter {
    ctor public ResourceCursorTreeAdapter(android.content.Context, android.database.Cursor, int, int, int, int);
    ctor public ResourceCursorTreeAdapter(android.content.Context, android.database.Cursor, int, int, int);
    ctor public ResourceCursorTreeAdapter(android.content.Context, android.database.Cursor, int, int);
    method public android.view.View newChildView(android.content.Context, android.database.Cursor, boolean, android.view.ViewGroup);
    method public android.view.View newGroupView(android.content.Context, android.database.Cursor, boolean, android.view.ViewGroup);
  }

  public class ScrollView extends android.widget.FrameLayout {
    ctor public ScrollView(android.content.Context);
    ctor public ScrollView(android.content.Context, android.util.AttributeSet);
    ctor public ScrollView(android.content.Context, android.util.AttributeSet, int);
    ctor public ScrollView(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean arrowScroll(int);
    method protected int computeScrollDeltaToGetChildRectOnScreen(android.graphics.Rect);
    method public boolean executeKeyEvent(android.view.KeyEvent);
    method public void fling(int);
    method public boolean fullScroll(int);
    method public int getMaxScrollAmount();
    method public boolean isFillViewport();
    method public boolean isSmoothScrollingEnabled();
    method public boolean pageScroll(int);
    method public void setFillViewport(boolean);
    method public void setSmoothScrollingEnabled(boolean);
    method public final void smoothScrollBy(int, int);
    method public final void smoothScrollTo(int, int);
  }

  public class Scroller {
    ctor public Scroller(android.content.Context);
    ctor public Scroller(android.content.Context, android.view.animation.Interpolator);
    ctor public Scroller(android.content.Context, android.view.animation.Interpolator, boolean);
    method public void abortAnimation();
    method public boolean computeScrollOffset();
    method public void extendDuration(int);
    method public void fling(int, int, int, int, int, int, int, int);
    method public final void forceFinished(boolean);
    method public float getCurrVelocity();
    method public final int getCurrX();
    method public final int getCurrY();
    method public final int getDuration();
    method public final int getFinalX();
    method public final int getFinalY();
    method public final int getStartX();
    method public final int getStartY();
    method public final boolean isFinished();
    method public void setFinalX(int);
    method public void setFinalY(int);
    method public final void setFriction(float);
    method public void startScroll(int, int, int, int);
    method public void startScroll(int, int, int, int, int);
    method public int timePassed();
  }

  public class SearchView extends android.widget.LinearLayout implements android.view.CollapsibleActionView {
    ctor public SearchView(android.content.Context);
    ctor public SearchView(android.content.Context, android.util.AttributeSet);
    ctor public SearchView(android.content.Context, android.util.AttributeSet, int);
    ctor public SearchView(android.content.Context, android.util.AttributeSet, int, int);
    method public int getImeOptions();
    method public int getInputType();
    method public int getMaxWidth();
    method public java.lang.CharSequence getQuery();
    method public java.lang.CharSequence getQueryHint();
    method public android.widget.CursorAdapter getSuggestionsAdapter();
    method public boolean isIconfiedByDefault();
    method public boolean isIconified();
    method public boolean isQueryRefinementEnabled();
    method public boolean isSubmitButtonEnabled();
    method public void onActionViewCollapsed();
    method public void onActionViewExpanded();
    method public void setIconified(boolean);
    method public void setIconifiedByDefault(boolean);
    method public void setImeOptions(int);
    method public void setInputType(int);
    method public void setMaxWidth(int);
    method public void setOnCloseListener(android.widget.SearchView.OnCloseListener);
    method public void setOnQueryTextFocusChangeListener(android.view.View.OnFocusChangeListener);
    method public void setOnQueryTextListener(android.widget.SearchView.OnQueryTextListener);
    method public void setOnSearchClickListener(android.view.View.OnClickListener);
    method public void setOnSuggestionListener(android.widget.SearchView.OnSuggestionListener);
    method public void setQuery(java.lang.CharSequence, boolean);
    method public void setQueryHint(java.lang.CharSequence);
    method public void setQueryRefinementEnabled(boolean);
    method public void setSearchableInfo(android.app.SearchableInfo);
    method public void setSubmitButtonEnabled(boolean);
    method public void setSuggestionsAdapter(android.widget.CursorAdapter);
  }

  public static abstract interface SearchView.OnCloseListener {
    method public abstract boolean onClose();
  }

  public static abstract interface SearchView.OnQueryTextListener {
    method public abstract boolean onQueryTextChange(java.lang.String);
    method public abstract boolean onQueryTextSubmit(java.lang.String);
  }

  public static abstract interface SearchView.OnSuggestionListener {
    method public abstract boolean onSuggestionClick(int);
    method public abstract boolean onSuggestionSelect(int);
  }

  public abstract interface SectionIndexer {
    method public abstract int getPositionForSection(int);
    method public abstract int getSectionForPosition(int);
    method public abstract java.lang.Object[] getSections();
  }

  public class SeekBar extends android.widget.AbsSeekBar {
    ctor public SeekBar(android.content.Context);
    ctor public SeekBar(android.content.Context, android.util.AttributeSet);
    ctor public SeekBar(android.content.Context, android.util.AttributeSet, int);
    ctor public SeekBar(android.content.Context, android.util.AttributeSet, int, int);
    method public void setOnSeekBarChangeListener(android.widget.SeekBar.OnSeekBarChangeListener);
  }

  public static abstract interface SeekBar.OnSeekBarChangeListener {
    method public abstract void onProgressChanged(android.widget.SeekBar, int, boolean);
    method public abstract void onStartTrackingTouch(android.widget.SeekBar);
    method public abstract void onStopTrackingTouch(android.widget.SeekBar);
  }

  public class ShareActionProvider extends android.view.ActionProvider {
    ctor public ShareActionProvider(android.content.Context);
    method public android.view.View onCreateActionView();
    method public void setOnShareTargetSelectedListener(android.widget.ShareActionProvider.OnShareTargetSelectedListener);
    method public void setShareHistoryFileName(java.lang.String);
    method public void setShareIntent(android.content.Intent);
    field public static final java.lang.String DEFAULT_SHARE_HISTORY_FILE_NAME = "share_history.xml";
  }

  public static abstract interface ShareActionProvider.OnShareTargetSelectedListener {
    method public abstract boolean onShareTargetSelected(android.widget.ShareActionProvider, android.content.Intent);
  }

  public class SimpleAdapter extends android.widget.BaseAdapter implements android.widget.Filterable android.widget.Spinner.ThemedSpinnerAdapter {
    ctor public SimpleAdapter(android.content.Context, java.util.List<? extends java.util.Map<java.lang.String, ?>>, int, java.lang.String[], int[]);
    method public int getCount();
    method public android.content.res.Resources.Theme getDropDownViewTheme();
    method public android.widget.Filter getFilter();
    method public java.lang.Object getItem(int);
    method public long getItemId(int);
    method public android.view.View getView(int, android.view.View, android.view.ViewGroup);
    method public android.widget.SimpleAdapter.ViewBinder getViewBinder();
    method public void setDropDownViewResource(int);
    method public void setDropDownViewTheme(android.content.res.Resources.Theme);
    method public void setViewBinder(android.widget.SimpleAdapter.ViewBinder);
    method public void setViewImage(android.widget.ImageView, int);
    method public void setViewImage(android.widget.ImageView, java.lang.String);
    method public void setViewText(android.widget.TextView, java.lang.String);
  }

  public static abstract interface SimpleAdapter.ViewBinder {
    method public abstract boolean setViewValue(android.view.View, java.lang.Object, java.lang.String);
  }

  public class SimpleCursorAdapter extends android.widget.ResourceCursorAdapter {
    ctor public deprecated SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[]);
    ctor public SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[], int);
    method public void bindView(android.view.View, android.content.Context, android.database.Cursor);
    method public void changeCursorAndColumns(android.database.Cursor, java.lang.String[], int[]);
    method public android.widget.SimpleCursorAdapter.CursorToStringConverter getCursorToStringConverter();
    method public int getStringConversionColumn();
    method public android.widget.SimpleCursorAdapter.ViewBinder getViewBinder();
    method public void setCursorToStringConverter(android.widget.SimpleCursorAdapter.CursorToStringConverter);
    method public void setStringConversionColumn(int);
    method public void setViewBinder(android.widget.SimpleCursorAdapter.ViewBinder);
    method public void setViewImage(android.widget.ImageView, java.lang.String);
    method public void setViewText(android.widget.TextView, java.lang.String);
  }

  public static abstract interface SimpleCursorAdapter.CursorToStringConverter {
    method public abstract java.lang.CharSequence convertToString(android.database.Cursor);
  }

  public static abstract interface SimpleCursorAdapter.ViewBinder {
    method public abstract boolean setViewValue(android.view.View, android.database.Cursor, int);
  }

  public abstract class SimpleCursorTreeAdapter extends android.widget.ResourceCursorTreeAdapter {
    ctor public SimpleCursorTreeAdapter(android.content.Context, android.database.Cursor, int, int, java.lang.String[], int[], int, int, java.lang.String[], int[]);
    ctor public SimpleCursorTreeAdapter(android.content.Context, android.database.Cursor, int, int, java.lang.String[], int[], int, java.lang.String[], int[]);
    ctor public SimpleCursorTreeAdapter(android.content.Context, android.database.Cursor, int, java.lang.String[], int[], int, java.lang.String[], int[]);
    method protected void bindChildView(android.view.View, android.content.Context, android.database.Cursor, boolean);
    method protected void bindGroupView(android.view.View, android.content.Context, android.database.Cursor, boolean);
    method public android.widget.SimpleCursorTreeAdapter.ViewBinder getViewBinder();
    method public void setViewBinder(android.widget.SimpleCursorTreeAdapter.ViewBinder);
    method protected void setViewImage(android.widget.ImageView, java.lang.String);
    method public void setViewText(android.widget.TextView, java.lang.String);
  }

  public static abstract interface SimpleCursorTreeAdapter.ViewBinder {
    method public abstract boolean setViewValue(android.view.View, android.database.Cursor, int);
  }

  public class SimpleExpandableListAdapter extends android.widget.BaseExpandableListAdapter {
    ctor public SimpleExpandableListAdapter(android.content.Context, java.util.List<? extends java.util.Map<java.lang.String, ?>>, int, java.lang.String[], int[], java.util.List<? extends java.util.List<? extends java.util.Map<java.lang.String, ?>>>, int, java.lang.String[], int[]);
    ctor public SimpleExpandableListAdapter(android.content.Context, java.util.List<? extends java.util.Map<java.lang.String, ?>>, int, int, java.lang.String[], int[], java.util.List<? extends java.util.List<? extends java.util.Map<java.lang.String, ?>>>, int, java.lang.String[], int[]);
    ctor public SimpleExpandableListAdapter(android.content.Context, java.util.List<? extends java.util.Map<java.lang.String, ?>>, int, int, java.lang.String[], int[], java.util.List<? extends java.util.List<? extends java.util.Map<java.lang.String, ?>>>, int, int, java.lang.String[], int[]);
    method public java.lang.Object getChild(int, int);
    method public long getChildId(int, int);
    method public android.view.View getChildView(int, int, boolean, android.view.View, android.view.ViewGroup);
    method public int getChildrenCount(int);
    method public java.lang.Object getGroup(int);
    method public int getGroupCount();
    method public long getGroupId(int);
    method public android.view.View getGroupView(int, boolean, android.view.View, android.view.ViewGroup);
    method public boolean hasStableIds();
    method public boolean isChildSelectable(int, int);
    method public android.view.View newChildView(boolean, android.view.ViewGroup);
    method public android.view.View newGroupView(boolean, android.view.ViewGroup);
  }

  public deprecated class SlidingDrawer extends android.view.ViewGroup {
    ctor public SlidingDrawer(android.content.Context, android.util.AttributeSet);
    ctor public SlidingDrawer(android.content.Context, android.util.AttributeSet, int);
    ctor public SlidingDrawer(android.content.Context, android.util.AttributeSet, int, int);
    method public void animateClose();
    method public void animateOpen();
    method public void animateToggle();
    method public void close();
    method public android.view.View getContent();
    method public android.view.View getHandle();
    method public boolean isMoving();
    method public boolean isOpened();
    method public void lock();
    method protected void onLayout(boolean, int, int, int, int);
    method public void open();
    method public void setOnDrawerCloseListener(android.widget.SlidingDrawer.OnDrawerCloseListener);
    method public void setOnDrawerOpenListener(android.widget.SlidingDrawer.OnDrawerOpenListener);
    method public void setOnDrawerScrollListener(android.widget.SlidingDrawer.OnDrawerScrollListener);
    method public void toggle();
    method public void unlock();
    field public static final int ORIENTATION_HORIZONTAL = 0; // 0x0
    field public static final int ORIENTATION_VERTICAL = 1; // 0x1
  }

  public static abstract interface SlidingDrawer.OnDrawerCloseListener {
    method public abstract void onDrawerClosed();
  }

  public static abstract interface SlidingDrawer.OnDrawerOpenListener {
    method public abstract void onDrawerOpened();
  }

  public static abstract interface SlidingDrawer.OnDrawerScrollListener {
    method public abstract void onScrollEnded();
    method public abstract void onScrollStarted();
  }

  public final class Space extends android.view.View {
    ctor public Space(android.content.Context, android.util.AttributeSet, int, int);
    ctor public Space(android.content.Context, android.util.AttributeSet, int);
    ctor public Space(android.content.Context, android.util.AttributeSet);
    ctor public Space(android.content.Context);
  }

  public class Spinner extends android.widget.AbsSpinner implements android.content.DialogInterface.OnClickListener {
    ctor public Spinner(android.content.Context);
    ctor public Spinner(android.content.Context, int);
    ctor public Spinner(android.content.Context, android.util.AttributeSet);
    ctor public Spinner(android.content.Context, android.util.AttributeSet, int);
    ctor public Spinner(android.content.Context, android.util.AttributeSet, int, int);
    ctor public Spinner(android.content.Context, android.util.AttributeSet, int, int, int);
    ctor public Spinner(android.content.Context, android.util.AttributeSet, int, int, int, android.content.Context);
    method public int getDropDownHorizontalOffset();
    method public int getDropDownVerticalOffset();
    method public int getDropDownWidth();
    method public int getGravity();
    method public android.graphics.drawable.Drawable getPopupBackground();
    method public android.content.Context getPopupContext();
    method public java.lang.CharSequence getPrompt();
    method public void onClick(android.content.DialogInterface, int);
    method public void setDropDownHorizontalOffset(int);
    method public void setDropDownVerticalOffset(int);
    method public void setDropDownWidth(int);
    method public void setGravity(int);
    method public void setPopupBackgroundDrawable(android.graphics.drawable.Drawable);
    method public void setPopupBackgroundResource(int);
    method public void setPrompt(java.lang.CharSequence);
    method public void setPromptId(int);
    field public static final int MODE_DIALOG = 0; // 0x0
    field public static final int MODE_DROPDOWN = 1; // 0x1
  }

  public static abstract interface Spinner.ThemedSpinnerAdapter {
    method public abstract android.content.res.Resources.Theme getDropDownViewTheme();
    method public abstract void setDropDownViewTheme(android.content.res.Resources.Theme);
  }

  public abstract interface SpinnerAdapter implements android.widget.Adapter {
    method public abstract android.view.View getDropDownView(int, android.view.View, android.view.ViewGroup);
  }

  public class StackView extends android.widget.AdapterViewAnimator {
    ctor public StackView(android.content.Context);
    ctor public StackView(android.content.Context, android.util.AttributeSet);
    ctor public StackView(android.content.Context, android.util.AttributeSet, int);
    ctor public StackView(android.content.Context, android.util.AttributeSet, int, int);
  }

  public class Switch extends android.widget.CompoundButton {
    ctor public Switch(android.content.Context);
    ctor public Switch(android.content.Context, android.util.AttributeSet);
    ctor public Switch(android.content.Context, android.util.AttributeSet, int);
    ctor public Switch(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean getShowText();
    method public boolean getSplitTrack();
    method public int getSwitchMinWidth();
    method public int getSwitchPadding();
    method public java.lang.CharSequence getTextOff();
    method public java.lang.CharSequence getTextOn();
    method public android.graphics.drawable.Drawable getThumbDrawable();
    method public int getThumbTextPadding();
    method public android.content.res.ColorStateList getThumbTintList();
    method public android.graphics.PorterDuff.Mode getThumbTintMode();
    method public android.graphics.drawable.Drawable getTrackDrawable();
    method public android.content.res.ColorStateList getTrackTintList();
    method public android.graphics.PorterDuff.Mode getTrackTintMode();
    method public void onMeasure(int, int);
    method public void setShowText(boolean);
    method public void setSplitTrack(boolean);
    method public void setSwitchMinWidth(int);
    method public void setSwitchPadding(int);
    method public void setSwitchTextAppearance(android.content.Context, int);
    method public void setSwitchTypeface(android.graphics.Typeface, int);
    method public void setSwitchTypeface(android.graphics.Typeface);
    method public void setTextOff(java.lang.CharSequence);
    method public void setTextOn(java.lang.CharSequence);
    method public void setThumbDrawable(android.graphics.drawable.Drawable);
    method public void setThumbResource(int);
    method public void setThumbTextPadding(int);
    method public void setThumbTintList(android.content.res.ColorStateList);
    method public void setThumbTintMode(android.graphics.PorterDuff.Mode);
    method public void setTrackDrawable(android.graphics.drawable.Drawable);
    method public void setTrackResource(int);
    method public void setTrackTintList(android.content.res.ColorStateList);
    method public void setTrackTintMode(android.graphics.PorterDuff.Mode);
  }

  public class TabHost extends android.widget.FrameLayout implements android.view.ViewTreeObserver.OnTouchModeChangeListener {
    ctor public TabHost(android.content.Context);
    ctor public TabHost(android.content.Context, android.util.AttributeSet);
    ctor public TabHost(android.content.Context, android.util.AttributeSet, int);
    ctor public TabHost(android.content.Context, android.util.AttributeSet, int, int);
    method public void addTab(android.widget.TabHost.TabSpec);
    method public void clearAllTabs();
    method public int getCurrentTab();
    method public java.lang.String getCurrentTabTag();
    method public android.view.View getCurrentTabView();
    method public android.view.View getCurrentView();
    method public android.widget.FrameLayout getTabContentView();
    method public android.widget.TabWidget getTabWidget();
    method public android.widget.TabHost.TabSpec newTabSpec(java.lang.String);
    method public void onTouchModeChanged(boolean);
    method public void setCurrentTab(int);
    method public void setCurrentTabByTag(java.lang.String);
    method public void setOnTabChangedListener(android.widget.TabHost.OnTabChangeListener);
    method public void setup();
    method public void setup(android.app.LocalActivityManager);
  }

  public static abstract interface TabHost.OnTabChangeListener {
    method public abstract void onTabChanged(java.lang.String);
  }

  public static abstract interface TabHost.TabContentFactory {
    method public abstract android.view.View createTabContent(java.lang.String);
  }

  public class TabHost.TabSpec {
    method public java.lang.String getTag();
    method public android.widget.TabHost.TabSpec setContent(int);
    method public android.widget.TabHost.TabSpec setContent(android.widget.TabHost.TabContentFactory);
    method public android.widget.TabHost.TabSpec setContent(android.content.Intent);
    method public android.widget.TabHost.TabSpec setIndicator(java.lang.CharSequence);
    method public android.widget.TabHost.TabSpec setIndicator(java.lang.CharSequence, android.graphics.drawable.Drawable);
    method public android.widget.TabHost.TabSpec setIndicator(android.view.View);
  }

  public class TabWidget extends android.widget.LinearLayout implements android.view.View.OnFocusChangeListener {
    ctor public TabWidget(android.content.Context);
    ctor public TabWidget(android.content.Context, android.util.AttributeSet);
    ctor public TabWidget(android.content.Context, android.util.AttributeSet, int);
    ctor public TabWidget(android.content.Context, android.util.AttributeSet, int, int);
    method public void dispatchDraw(android.graphics.Canvas);
    method public void focusCurrentTab(int);
    method public android.view.View getChildTabViewAt(int);
    method public int getTabCount();
    method public boolean isStripEnabled();
    method public void onFocusChange(android.view.View, boolean);
    method public void setCurrentTab(int);
    method public void setDividerDrawable(int);
    method public void setLeftStripDrawable(android.graphics.drawable.Drawable);
    method public void setLeftStripDrawable(int);
    method public void setRightStripDrawable(android.graphics.drawable.Drawable);
    method public void setRightStripDrawable(int);
    method public void setStripEnabled(boolean);
  }

  public class TableLayout extends android.widget.LinearLayout {
    ctor public TableLayout(android.content.Context);
    ctor public TableLayout(android.content.Context, android.util.AttributeSet);
    method public boolean isColumnCollapsed(int);
    method public boolean isColumnShrinkable(int);
    method public boolean isColumnStretchable(int);
    method public boolean isShrinkAllColumns();
    method public boolean isStretchAllColumns();
    method public void setColumnCollapsed(int, boolean);
    method public void setColumnShrinkable(int, boolean);
    method public void setColumnStretchable(int, boolean);
    method public void setShrinkAllColumns(boolean);
    method public void setStretchAllColumns(boolean);
  }

  public static class TableLayout.LayoutParams extends android.widget.LinearLayout.LayoutParams {
    ctor public TableLayout.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public TableLayout.LayoutParams(int, int);
    ctor public TableLayout.LayoutParams(int, int, float);
    ctor public TableLayout.LayoutParams();
    ctor public TableLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public TableLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
  }

  public class TableRow extends android.widget.LinearLayout {
    ctor public TableRow(android.content.Context);
    ctor public TableRow(android.content.Context, android.util.AttributeSet);
    method public android.view.View getVirtualChildAt(int);
    method public int getVirtualChildCount();
  }

  public static class TableRow.LayoutParams extends android.widget.LinearLayout.LayoutParams {
    ctor public TableRow.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public TableRow.LayoutParams(int, int);
    ctor public TableRow.LayoutParams(int, int, float);
    ctor public TableRow.LayoutParams();
    ctor public TableRow.LayoutParams(int);
    ctor public TableRow.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public TableRow.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    field public int column;
    field public int span;
  }

  public class TextClock extends android.widget.TextView {
    ctor public TextClock(android.content.Context);
    ctor public TextClock(android.content.Context, android.util.AttributeSet);
    ctor public TextClock(android.content.Context, android.util.AttributeSet, int);
    ctor public TextClock(android.content.Context, android.util.AttributeSet, int, int);
    method public java.lang.CharSequence getFormat12Hour();
    method public java.lang.CharSequence getFormat24Hour();
    method public java.lang.String getTimeZone();
    method public boolean is24HourModeEnabled();
    method public void setFormat12Hour(java.lang.CharSequence);
    method public void setFormat24Hour(java.lang.CharSequence);
    method public void setTimeZone(java.lang.String);
    field public static final deprecated java.lang.CharSequence DEFAULT_FORMAT_12_HOUR;
    field public static final deprecated java.lang.CharSequence DEFAULT_FORMAT_24_HOUR;
  }

  public class TextSwitcher extends android.widget.ViewSwitcher {
    ctor public TextSwitcher(android.content.Context);
    ctor public TextSwitcher(android.content.Context, android.util.AttributeSet);
    method public void setCurrentText(java.lang.CharSequence);
    method public void setText(java.lang.CharSequence);
  }

  public class TextView extends android.view.View implements android.view.ViewTreeObserver.OnPreDrawListener {
    ctor public TextView(android.content.Context);
    ctor public TextView(android.content.Context, android.util.AttributeSet);
    ctor public TextView(android.content.Context, android.util.AttributeSet, int);
    ctor public TextView(android.content.Context, android.util.AttributeSet, int, int);
    method public void addTextChangedListener(android.text.TextWatcher);
    method public final void append(java.lang.CharSequence);
    method public void append(java.lang.CharSequence, int, int);
    method public void beginBatchEdit();
    method public boolean bringPointIntoView(int);
    method public void clearComposingText();
    method public void debug(int);
    method public boolean didTouchFocusSelect();
    method public void endBatchEdit();
    method public boolean extractText(android.view.inputmethod.ExtractedTextRequest, android.view.inputmethod.ExtractedText);
    method public final int getAutoLinkMask();
    method public int getBreakStrategy();
    method public int getCompoundDrawablePadding();
    method public android.content.res.ColorStateList getCompoundDrawableTintList();
    method public android.graphics.PorterDuff.Mode getCompoundDrawableTintMode();
    method public android.graphics.drawable.Drawable[] getCompoundDrawables();
    method public android.graphics.drawable.Drawable[] getCompoundDrawablesRelative();
    method public int getCompoundPaddingBottom();
    method public int getCompoundPaddingEnd();
    method public int getCompoundPaddingLeft();
    method public int getCompoundPaddingRight();
    method public int getCompoundPaddingStart();
    method public int getCompoundPaddingTop();
    method public final int getCurrentHintTextColor();
    method public final int getCurrentTextColor();
    method public android.view.ActionMode.Callback getCustomSelectionActionModeCallback();
    method protected boolean getDefaultEditable();
    method protected android.text.method.MovementMethod getDefaultMovementMethod();
    method public android.text.Editable getEditableText();
    method public android.text.TextUtils.TruncateAt getEllipsize();
    method public java.lang.CharSequence getError();
    method public int getExtendedPaddingBottom();
    method public int getExtendedPaddingTop();
    method public android.text.InputFilter[] getFilters();
    method public java.lang.String getFontFeatureSettings();
    method public boolean getFreezesText();
    method public int getGravity();
    method public int getHighlightColor();
    method public java.lang.CharSequence getHint();
    method public final android.content.res.ColorStateList getHintTextColors();
    method public int getImeActionId();
    method public java.lang.CharSequence getImeActionLabel();
    method public int getImeOptions();
    method public boolean getIncludeFontPadding();
    method public android.os.Bundle getInputExtras(boolean);
    method public int getInputType();
    method public final android.text.method.KeyListener getKeyListener();
    method public final android.text.Layout getLayout();
    method public float getLetterSpacing();
    method public int getLineBounds(int, android.graphics.Rect);
    method public int getLineCount();
    method public int getLineHeight();
    method public float getLineSpacingExtra();
    method public float getLineSpacingMultiplier();
    method public final android.content.res.ColorStateList getLinkTextColors();
    method public final boolean getLinksClickable();
    method public int getMarqueeRepeatLimit();
    method public int getMaxEms();
    method public int getMaxHeight();
    method public int getMaxLines();
    method public int getMaxWidth();
    method public int getMinEms();
    method public int getMinHeight();
    method public int getMinLines();
    method public int getMinWidth();
    method public final android.text.method.MovementMethod getMovementMethod();
    method public int getOffsetForPosition(float, float);
    method public android.text.TextPaint getPaint();
    method public int getPaintFlags();
    method public java.lang.String getPrivateImeOptions();
    method public int getSelectionEnd();
    method public int getSelectionStart();
    method public int getShadowColor();
    method public float getShadowDx();
    method public float getShadowDy();
    method public float getShadowRadius();
    method public final boolean getShowSoftInputOnFocus();
    method public java.lang.CharSequence getText();
    method public final android.content.res.ColorStateList getTextColors();
    method public java.util.Locale getTextLocale();
    method public float getTextScaleX();
    method public float getTextSize();
    method public int getTotalPaddingBottom();
    method public int getTotalPaddingEnd();
    method public int getTotalPaddingLeft();
    method public int getTotalPaddingRight();
    method public int getTotalPaddingStart();
    method public int getTotalPaddingTop();
    method public final android.text.method.TransformationMethod getTransformationMethod();
    method public android.graphics.Typeface getTypeface();
    method public android.text.style.URLSpan[] getUrls();
    method public boolean hasSelection();
    method public boolean isCursorVisible();
    method public boolean isInputMethodTarget();
    method public boolean isSuggestionsEnabled();
    method public boolean isTextSelectable();
    method public int length();
    method public boolean moveCursorToVisibleOffset();
    method public void onBeginBatchEdit();
    method public void onCommitCompletion(android.view.inputmethod.CompletionInfo);
    method public void onCommitCorrection(android.view.inputmethod.CorrectionInfo);
    method public void onEditorAction(int);
    method public void onEndBatchEdit();
    method public boolean onPreDraw();
    method public boolean onPrivateIMECommand(java.lang.String, android.os.Bundle);
    method public void onRestoreInstanceState(android.os.Parcelable);
    method public android.os.Parcelable onSaveInstanceState();
    method protected void onSelectionChanged(int, int);
    method protected void onTextChanged(java.lang.CharSequence, int, int, int);
    method public boolean onTextContextMenuItem(int);
    method public void removeTextChangedListener(android.text.TextWatcher);
    method public void setAllCaps(boolean);
    method public final void setAutoLinkMask(int);
    method public void setBreakStrategy(int);
    method public void setCompoundDrawablePadding(int);
    method public void setCompoundDrawableTintList(android.content.res.ColorStateList);
    method public void setCompoundDrawableTintMode(android.graphics.PorterDuff.Mode);
    method public void setCompoundDrawables(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
    method public void setCompoundDrawablesRelative(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
    method public void setCompoundDrawablesRelativeWithIntrinsicBounds(int, int, int, int);
    method public void setCompoundDrawablesRelativeWithIntrinsicBounds(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
    method public void setCompoundDrawablesWithIntrinsicBounds(int, int, int, int);
    method public void setCompoundDrawablesWithIntrinsicBounds(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
    method public void setCursorVisible(boolean);
    method public void setCustomSelectionActionModeCallback(android.view.ActionMode.Callback);
    method public final void setEditableFactory(android.text.Editable.Factory);
    method public void setElegantTextHeight(boolean);
    method public void setEllipsize(android.text.TextUtils.TruncateAt);
    method public void setEms(int);
    method public void setError(java.lang.CharSequence);
    method public void setError(java.lang.CharSequence, android.graphics.drawable.Drawable);
    method public void setExtractedText(android.view.inputmethod.ExtractedText);
    method public void setFilters(android.text.InputFilter[]);
    method public void setFontFeatureSettings(java.lang.String);
    method protected boolean setFrame(int, int, int, int);
    method public void setFreezesText(boolean);
    method public void setGravity(int);
    method public void setHeight(int);
    method public void setHighlightColor(int);
    method public final void setHint(java.lang.CharSequence);
    method public final void setHint(int);
    method public final void setHintTextColor(int);
    method public final void setHintTextColor(android.content.res.ColorStateList);
    method public void setHorizontallyScrolling(boolean);
    method public void setImeActionLabel(java.lang.CharSequence, int);
    method public void setImeOptions(int);
    method public void setIncludeFontPadding(boolean);
    method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public void setInputType(int);
    method public void setKeyListener(android.text.method.KeyListener);
    method public void setLetterSpacing(float);
    method public void setLineSpacing(float, float);
    method public void setLines(int);
    method public final void setLinkTextColor(int);
    method public final void setLinkTextColor(android.content.res.ColorStateList);
    method public final void setLinksClickable(boolean);
    method public void setMarqueeRepeatLimit(int);
    method public void setMaxEms(int);
    method public void setMaxHeight(int);
    method public void setMaxLines(int);
    method public void setMaxWidth(int);
    method public void setMinEms(int);
    method public void setMinHeight(int);
    method public void setMinLines(int);
    method public void setMinWidth(int);
    method public final void setMovementMethod(android.text.method.MovementMethod);
    method public void setOnEditorActionListener(android.widget.TextView.OnEditorActionListener);
    method public void setPaintFlags(int);
    method public void setPrivateImeOptions(java.lang.String);
    method public void setRawInputType(int);
    method public void setScroller(android.widget.Scroller);
    method public void setSelectAllOnFocus(boolean);
    method public void setShadowLayer(float, float, float, int);
    method public final void setShowSoftInputOnFocus(boolean);
    method public void setSingleLine();
    method public void setSingleLine(boolean);
    method public final void setSpannableFactory(android.text.Spannable.Factory);
    method public final void setText(java.lang.CharSequence);
    method public void setText(java.lang.CharSequence, android.widget.TextView.BufferType);
    method public final void setText(char[], int, int);
    method public final void setText(int);
    method public final void setText(int, android.widget.TextView.BufferType);
    method public void setTextAppearance(int);
    method public deprecated void setTextAppearance(android.content.Context, int);
    method public void setTextColor(int);
    method public void setTextColor(android.content.res.ColorStateList);
    method public void setTextIsSelectable(boolean);
    method public final void setTextKeepState(java.lang.CharSequence);
    method public final void setTextKeepState(java.lang.CharSequence, android.widget.TextView.BufferType);
    method public void setTextLocale(java.util.Locale);
    method public void setTextScaleX(float);
    method public void setTextSize(float);
    method public void setTextSize(int, float);
    method public final void setTransformationMethod(android.text.method.TransformationMethod);
    method public void setTypeface(android.graphics.Typeface, int);
    method public void setTypeface(android.graphics.Typeface);
    method public void setWidth(int);
  }

  public static final class TextView.BufferType extends java.lang.Enum {
    method public static android.widget.TextView.BufferType valueOf(java.lang.String);
    method public static final android.widget.TextView.BufferType[] values();
    enum_constant public static final android.widget.TextView.BufferType EDITABLE;
    enum_constant public static final android.widget.TextView.BufferType NORMAL;
    enum_constant public static final android.widget.TextView.BufferType SPANNABLE;
  }

  public static abstract interface TextView.OnEditorActionListener {
    method public abstract boolean onEditorAction(android.widget.TextView, int, android.view.KeyEvent);
  }

  public static class TextView.SavedState extends android.view.View.BaseSavedState {
    field public static final android.os.Parcelable.Creator<android.widget.TextView.SavedState> CREATOR;
  }

  public class TimePicker extends android.widget.FrameLayout {
    ctor public TimePicker(android.content.Context);
    ctor public TimePicker(android.content.Context, android.util.AttributeSet);
    ctor public TimePicker(android.content.Context, android.util.AttributeSet, int);
    ctor public TimePicker(android.content.Context, android.util.AttributeSet, int, int);
    method public deprecated java.lang.Integer getCurrentHour();
    method public deprecated java.lang.Integer getCurrentMinute();
    method public int getHour();
    method public int getMinute();
    method public boolean is24HourView();
    method public deprecated void setCurrentHour(java.lang.Integer);
    method public deprecated void setCurrentMinute(java.lang.Integer);
    method public void setHour(int);
    method public void setIs24HourView(java.lang.Boolean);
    method public void setMinute(int);
    method public void setOnTimeChangedListener(android.widget.TimePicker.OnTimeChangedListener);
  }

  public static abstract interface TimePicker.OnTimeChangedListener {
    method public abstract void onTimeChanged(android.widget.TimePicker, int, int);
  }

  public class Toast {
    ctor public Toast(android.content.Context);
    method public void cancel();
    method public int getDuration();
    method public int getGravity();
    method public float getHorizontalMargin();
    method public float getVerticalMargin();
    method public android.view.View getView();
    method public int getXOffset();
    method public int getYOffset();
    method public static android.widget.Toast makeText(android.content.Context, java.lang.CharSequence, int);
    method public static android.widget.Toast makeText(android.content.Context, int, int) throws android.content.res.Resources.NotFoundException;
    method public void setDuration(int);
    method public void setGravity(int, int, int);
    method public void setMargin(float, float);
    method public void setText(int);
    method public void setText(java.lang.CharSequence);
    method public void setView(android.view.View);
    method public void show();
    field public static final int LENGTH_LONG = 1; // 0x1
    field public static final int LENGTH_SHORT = 0; // 0x0
  }

  public class ToggleButton extends android.widget.CompoundButton {
    ctor public ToggleButton(android.content.Context, android.util.AttributeSet, int, int);
    ctor public ToggleButton(android.content.Context, android.util.AttributeSet, int);
    ctor public ToggleButton(android.content.Context, android.util.AttributeSet);
    ctor public ToggleButton(android.content.Context);
    method public java.lang.CharSequence getTextOff();
    method public java.lang.CharSequence getTextOn();
    method public void setTextOff(java.lang.CharSequence);
    method public void setTextOn(java.lang.CharSequence);
  }

  public class Toolbar extends android.view.ViewGroup {
    ctor public Toolbar(android.content.Context);
    ctor public Toolbar(android.content.Context, android.util.AttributeSet);
    ctor public Toolbar(android.content.Context, android.util.AttributeSet, int);
    ctor public Toolbar(android.content.Context, android.util.AttributeSet, int, int);
    method public void collapseActionView();
    method public void dismissPopupMenus();
    method public int getContentInsetEnd();
    method public int getContentInsetLeft();
    method public int getContentInsetRight();
    method public int getContentInsetStart();
    method public android.graphics.drawable.Drawable getLogo();
    method public java.lang.CharSequence getLogoDescription();
    method public android.view.Menu getMenu();
    method public java.lang.CharSequence getNavigationContentDescription();
    method public android.graphics.drawable.Drawable getNavigationIcon();
    method public int getPopupTheme();
    method public java.lang.CharSequence getSubtitle();
    method public java.lang.CharSequence getTitle();
    method public boolean hasExpandedActionView();
    method public boolean hideOverflowMenu();
    method public void inflateMenu(int);
    method public boolean isOverflowMenuShowing();
    method protected void onLayout(boolean, int, int, int, int);
    method public void setContentInsetsAbsolute(int, int);
    method public void setContentInsetsRelative(int, int);
    method public void setLogo(int);
    method public void setLogo(android.graphics.drawable.Drawable);
    method public void setLogoDescription(int);
    method public void setLogoDescription(java.lang.CharSequence);
    method public void setNavigationContentDescription(int);
    method public void setNavigationContentDescription(java.lang.CharSequence);
    method public void setNavigationIcon(int);
    method public void setNavigationIcon(android.graphics.drawable.Drawable);
    method public void setNavigationOnClickListener(android.view.View.OnClickListener);
    method public void setNavigationTintList(android.content.res.ColorStateList);
    method public void setNavigationTintMode(android.graphics.PorterDuff.Mode);
    method public void setOnMenuItemClickListener(android.widget.Toolbar.OnMenuItemClickListener);
    method public void setOverflowTintList(android.content.res.ColorStateList);
    method public void setOverflowTintMode(android.graphics.PorterDuff.Mode);
    method public void setPopupTheme(int);
    method public void setSubtitle(int);
    method public void setSubtitle(java.lang.CharSequence);
    method public void setSubtitleTextAppearance(android.content.Context, int);
    method public void setSubtitleTextColor(int);
    method public void setTitle(int);
    method public void setTitle(java.lang.CharSequence);
    method public void setTitleTextAppearance(android.content.Context, int);
    method public void setTitleTextColor(int);
    method public boolean showOverflowMenu();
  }

  public static class Toolbar.LayoutParams extends android.app.ActionBar.LayoutParams {
    ctor public Toolbar.LayoutParams(android.content.Context, android.util.AttributeSet);
    ctor public Toolbar.LayoutParams(int, int);
    ctor public Toolbar.LayoutParams(int, int, int);
    ctor public Toolbar.LayoutParams(int);
    ctor public Toolbar.LayoutParams(android.widget.Toolbar.LayoutParams);
    ctor public Toolbar.LayoutParams(android.app.ActionBar.LayoutParams);
    ctor public Toolbar.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public Toolbar.LayoutParams(android.view.ViewGroup.LayoutParams);
  }

  public static abstract interface Toolbar.OnMenuItemClickListener {
    method public abstract boolean onMenuItemClick(android.view.MenuItem);
  }

  public deprecated class TwoLineListItem extends android.widget.RelativeLayout {
    ctor public TwoLineListItem(android.content.Context);
    ctor public TwoLineListItem(android.content.Context, android.util.AttributeSet);
    ctor public TwoLineListItem(android.content.Context, android.util.AttributeSet, int);
    ctor public TwoLineListItem(android.content.Context, android.util.AttributeSet, int, int);
    method public android.widget.TextView getText1();
    method public android.widget.TextView getText2();
  }

  public class VideoView extends android.view.SurfaceView implements android.widget.MediaController.MediaPlayerControl {
    ctor public VideoView(android.content.Context);
    ctor public VideoView(android.content.Context, android.util.AttributeSet);
    ctor public VideoView(android.content.Context, android.util.AttributeSet, int);
    ctor public VideoView(android.content.Context, android.util.AttributeSet, int, int);
    method public void addSubtitleSource(java.io.InputStream, android.media.MediaFormat);
    method public boolean canPause();
    method public boolean canSeekBackward();
    method public boolean canSeekForward();
    method public int getAudioSessionId();
    method public int getBufferPercentage();
    method public int getCurrentPosition();
    method public int getDuration();
    method public boolean isPlaying();
    method public void pause();
    method public int resolveAdjustedSize(int, int);
    method public void resume();
    method public void seekTo(int);
    method public void setMediaController(android.widget.MediaController);
    method public void setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener);
    method public void setOnErrorListener(android.media.MediaPlayer.OnErrorListener);
    method public void setOnInfoListener(android.media.MediaPlayer.OnInfoListener);
    method public void setOnPreparedListener(android.media.MediaPlayer.OnPreparedListener);
    method public void setVideoPath(java.lang.String);
    method public void setVideoURI(android.net.Uri);
    method public void setVideoURI(android.net.Uri, java.util.Map<java.lang.String, java.lang.String>);
    method public void start();
    method public void stopPlayback();
    method public void suspend();
  }

  public class ViewAnimator extends android.widget.FrameLayout {
    ctor public ViewAnimator(android.content.Context);
    ctor public ViewAnimator(android.content.Context, android.util.AttributeSet);
    method public boolean getAnimateFirstView();
    method public android.view.View getCurrentView();
    method public int getDisplayedChild();
    method public android.view.animation.Animation getInAnimation();
    method public android.view.animation.Animation getOutAnimation();
    method public void setAnimateFirstView(boolean);
    method public void setDisplayedChild(int);
    method public void setInAnimation(android.view.animation.Animation);
    method public void setInAnimation(android.content.Context, int);
    method public void setOutAnimation(android.view.animation.Animation);
    method public void setOutAnimation(android.content.Context, int);
    method public void showNext();
    method public void showPrevious();
  }

  public class ViewFlipper extends android.widget.ViewAnimator {
    ctor public ViewFlipper(android.content.Context);
    ctor public ViewFlipper(android.content.Context, android.util.AttributeSet);
    method public boolean isAutoStart();
    method public boolean isFlipping();
    method public void setAutoStart(boolean);
    method public void setFlipInterval(int);
    method public void startFlipping();
    method public void stopFlipping();
  }

  public class ViewSwitcher extends android.widget.ViewAnimator {
    ctor public ViewSwitcher(android.content.Context);
    ctor public ViewSwitcher(android.content.Context, android.util.AttributeSet);
    method public android.view.View getNextView();
    method public void reset();
    method public void setFactory(android.widget.ViewSwitcher.ViewFactory);
  }

  public static abstract interface ViewSwitcher.ViewFactory {
    method public abstract android.view.View makeView();
  }

  public abstract interface WrapperListAdapter implements android.widget.ListAdapter {
    method public abstract android.widget.ListAdapter getWrappedAdapter();
  }

  public class ZoomButton extends android.widget.ImageButton implements android.view.View.OnLongClickListener {
    ctor public ZoomButton(android.content.Context);
    ctor public ZoomButton(android.content.Context, android.util.AttributeSet);
    ctor public ZoomButton(android.content.Context, android.util.AttributeSet, int);
    ctor public ZoomButton(android.content.Context, android.util.AttributeSet, int, int);
    method public boolean onLongClick(android.view.View);
    method public void setZoomSpeed(long);
  }

  public class ZoomButtonsController implements android.view.View.OnTouchListener {
    ctor public ZoomButtonsController(android.view.View);
    method public android.view.ViewGroup getContainer();
    method public android.view.View getZoomControls();
    method public boolean isAutoDismissed();
    method public boolean isVisible();
    method public boolean onTouch(android.view.View, android.view.MotionEvent);
    method public void setAutoDismissed(boolean);
    method public void setFocusable(boolean);
    method public void setOnZoomListener(android.widget.ZoomButtonsController.OnZoomListener);
    method public void setVisible(boolean);
    method public void setZoomInEnabled(boolean);
    method public void setZoomOutEnabled(boolean);
    method public void setZoomSpeed(long);
  }

  public static abstract interface ZoomButtonsController.OnZoomListener {
    method public abstract void onVisibilityChanged(boolean);
    method public abstract void onZoom(boolean);
  }

  public class ZoomControls extends android.widget.LinearLayout {
    ctor public ZoomControls(android.content.Context);
    ctor public ZoomControls(android.content.Context, android.util.AttributeSet);
    method public void hide();
    method public void setIsZoomInEnabled(boolean);
    method public void setIsZoomOutEnabled(boolean);
    method public void setOnZoomInClickListener(android.view.View.OnClickListener);
    method public void setOnZoomOutClickListener(android.view.View.OnClickListener);
    method public void setZoomSpeed(long);
    method public void show();
  }

}

package com.android.internal.util {

  public abstract interface Predicate {
    method public abstract boolean apply(T);
  }

}

package dalvik.annotation {

  public abstract deprecated class TestTarget implements java.lang.annotation.Annotation {
  }

  public abstract deprecated class TestTargetClass implements java.lang.annotation.Annotation {
  }

}

package dalvik.bytecode {

  public final class OpcodeInfo {
    field public static final int MAXIMUM_PACKED_VALUE;
    field public static final int MAXIMUM_VALUE;
  }

  public abstract interface Opcodes {
    field public static final int OP_ADD_DOUBLE = 171; // 0xab
    field public static final int OP_ADD_DOUBLE_2ADDR = 203; // 0xcb
    field public static final int OP_ADD_FLOAT = 166; // 0xa6
    field public static final int OP_ADD_FLOAT_2ADDR = 198; // 0xc6
    field public static final int OP_ADD_INT = 144; // 0x90
    field public static final int OP_ADD_INT_2ADDR = 176; // 0xb0
    field public static final int OP_ADD_INT_LIT16 = 208; // 0xd0
    field public static final int OP_ADD_INT_LIT8 = 216; // 0xd8
    field public static final int OP_ADD_LONG = 155; // 0x9b
    field public static final int OP_ADD_LONG_2ADDR = 187; // 0xbb
    field public static final int OP_AGET = 68; // 0x44
    field public static final int OP_AGET_BOOLEAN = 71; // 0x47
    field public static final int OP_AGET_BYTE = 72; // 0x48
    field public static final int OP_AGET_CHAR = 73; // 0x49
    field public static final int OP_AGET_OBJECT = 70; // 0x46
    field public static final int OP_AGET_SHORT = 74; // 0x4a
    field public static final int OP_AGET_WIDE = 69; // 0x45
    field public static final int OP_AND_INT = 149; // 0x95
    field public static final int OP_AND_INT_2ADDR = 181; // 0xb5
    field public static final int OP_AND_INT_LIT16 = 213; // 0xd5
    field public static final int OP_AND_INT_LIT8 = 221; // 0xdd
    field public static final int OP_AND_LONG = 160; // 0xa0
    field public static final int OP_AND_LONG_2ADDR = 192; // 0xc0
    field public static final int OP_APUT = 75; // 0x4b
    field public static final int OP_APUT_BOOLEAN = 78; // 0x4e
    field public static final int OP_APUT_BYTE = 79; // 0x4f
    field public static final int OP_APUT_CHAR = 80; // 0x50
    field public static final int OP_APUT_OBJECT = 77; // 0x4d
    field public static final int OP_APUT_SHORT = 81; // 0x51
    field public static final int OP_APUT_WIDE = 76; // 0x4c
    field public static final int OP_ARRAY_LENGTH = 33; // 0x21
    field public static final deprecated int OP_BREAKPOINT = 236; // 0xec
    field public static final int OP_CHECK_CAST = 31; // 0x1f
    field public static final int OP_CHECK_CAST_JUMBO = 511; // 0x1ff
    field public static final int OP_CMPG_DOUBLE = 48; // 0x30
    field public static final int OP_CMPG_FLOAT = 46; // 0x2e
    field public static final int OP_CMPL_DOUBLE = 47; // 0x2f
    field public static final int OP_CMPL_FLOAT = 45; // 0x2d
    field public static final int OP_CMP_LONG = 49; // 0x31
    field public static final int OP_CONST = 20; // 0x14
    field public static final int OP_CONST_16 = 19; // 0x13
    field public static final int OP_CONST_4 = 18; // 0x12
    field public static final int OP_CONST_CLASS = 28; // 0x1c
    field public static final int OP_CONST_CLASS_JUMBO = 255; // 0xff
    field public static final int OP_CONST_HIGH16 = 21; // 0x15
    field public static final int OP_CONST_STRING = 26; // 0x1a
    field public static final int OP_CONST_STRING_JUMBO = 27; // 0x1b
    field public static final int OP_CONST_WIDE = 24; // 0x18
    field public static final int OP_CONST_WIDE_16 = 22; // 0x16
    field public static final int OP_CONST_WIDE_32 = 23; // 0x17
    field public static final int OP_CONST_WIDE_HIGH16 = 25; // 0x19
    field public static final int OP_DIV_DOUBLE = 174; // 0xae
    field public static final int OP_DIV_DOUBLE_2ADDR = 206; // 0xce
    field public static final int OP_DIV_FLOAT = 169; // 0xa9
    field public static final int OP_DIV_FLOAT_2ADDR = 201; // 0xc9
    field public static final int OP_DIV_INT = 147; // 0x93
    field public static final int OP_DIV_INT_2ADDR = 179; // 0xb3
    field public static final int OP_DIV_INT_LIT16 = 211; // 0xd3
    field public static final int OP_DIV_INT_LIT8 = 219; // 0xdb
    field public static final int OP_DIV_LONG = 158; // 0x9e
    field public static final int OP_DIV_LONG_2ADDR = 190; // 0xbe
    field public static final int OP_DOUBLE_TO_FLOAT = 140; // 0x8c
    field public static final int OP_DOUBLE_TO_INT = 138; // 0x8a
    field public static final int OP_DOUBLE_TO_LONG = 139; // 0x8b
    field public static final deprecated int OP_EXECUTE_INLINE = 238; // 0xee
    field public static final deprecated int OP_EXECUTE_INLINE_RANGE = 239; // 0xef
    field public static final int OP_FILLED_NEW_ARRAY = 36; // 0x24
    field public static final int OP_FILLED_NEW_ARRAY_JUMBO = 1535; // 0x5ff
    field public static final int OP_FILLED_NEW_ARRAY_RANGE = 37; // 0x25
    field public static final int OP_FILL_ARRAY_DATA = 38; // 0x26
    field public static final int OP_FLOAT_TO_DOUBLE = 137; // 0x89
    field public static final int OP_FLOAT_TO_INT = 135; // 0x87
    field public static final int OP_FLOAT_TO_LONG = 136; // 0x88
    field public static final int OP_GOTO = 40; // 0x28
    field public static final int OP_GOTO_16 = 41; // 0x29
    field public static final int OP_GOTO_32 = 42; // 0x2a
    field public static final int OP_IF_EQ = 50; // 0x32
    field public static final int OP_IF_EQZ = 56; // 0x38
    field public static final int OP_IF_GE = 53; // 0x35
    field public static final int OP_IF_GEZ = 59; // 0x3b
    field public static final int OP_IF_GT = 54; // 0x36
    field public static final int OP_IF_GTZ = 60; // 0x3c
    field public static final int OP_IF_LE = 55; // 0x37
    field public static final int OP_IF_LEZ = 61; // 0x3d
    field public static final int OP_IF_LT = 52; // 0x34
    field public static final int OP_IF_LTZ = 58; // 0x3a
    field public static final int OP_IF_NE = 51; // 0x33
    field public static final int OP_IF_NEZ = 57; // 0x39
    field public static final int OP_IGET = 82; // 0x52
    field public static final int OP_IGET_BOOLEAN = 85; // 0x55
    field public static final int OP_IGET_BOOLEAN_JUMBO = 2559; // 0x9ff
    field public static final int OP_IGET_BYTE = 86; // 0x56
    field public static final int OP_IGET_BYTE_JUMBO = 2815; // 0xaff
    field public static final int OP_IGET_CHAR = 87; // 0x57
    field public static final int OP_IGET_CHAR_JUMBO = 3071; // 0xbff
    field public static final int OP_IGET_JUMBO = 1791; // 0x6ff
    field public static final int OP_IGET_OBJECT = 84; // 0x54
    field public static final int OP_IGET_OBJECT_JUMBO = 2303; // 0x8ff
    field public static final deprecated int OP_IGET_OBJECT_QUICK = 244; // 0xf4
    field public static final deprecated int OP_IGET_QUICK = 242; // 0xf2
    field public static final int OP_IGET_SHORT = 88; // 0x58
    field public static final int OP_IGET_SHORT_JUMBO = 3327; // 0xcff
    field public static final int OP_IGET_WIDE = 83; // 0x53
    field public static final int OP_IGET_WIDE_JUMBO = 2047; // 0x7ff
    field public static final deprecated int OP_IGET_WIDE_QUICK = 243; // 0xf3
    field public static final deprecated int OP_IGET_WIDE_VOLATILE = 232; // 0xe8
    field public static final int OP_INSTANCE_OF = 32; // 0x20
    field public static final int OP_INSTANCE_OF_JUMBO = 767; // 0x2ff
    field public static final int OP_INT_TO_BYTE = 141; // 0x8d
    field public static final int OP_INT_TO_CHAR = 142; // 0x8e
    field public static final int OP_INT_TO_DOUBLE = 131; // 0x83
    field public static final int OP_INT_TO_FLOAT = 130; // 0x82
    field public static final int OP_INT_TO_LONG = 129; // 0x81
    field public static final int OP_INT_TO_SHORT = 143; // 0x8f
    field public static final int OP_INVOKE_DIRECT = 112; // 0x70
    field public static final deprecated int OP_INVOKE_DIRECT_EMPTY = 240; // 0xf0
    field public static final int OP_INVOKE_DIRECT_JUMBO = 9471; // 0x24ff
    field public static final int OP_INVOKE_DIRECT_RANGE = 118; // 0x76
    field public static final int OP_INVOKE_INTERFACE = 114; // 0x72
    field public static final int OP_INVOKE_INTERFACE_JUMBO = 9983; // 0x26ff
    field public static final int OP_INVOKE_INTERFACE_RANGE = 120; // 0x78
    field public static final int OP_INVOKE_STATIC = 113; // 0x71
    field public static final int OP_INVOKE_STATIC_JUMBO = 9727; // 0x25ff
    field public static final int OP_INVOKE_STATIC_RANGE = 119; // 0x77
    field public static final int OP_INVOKE_SUPER = 111; // 0x6f
    field public static final int OP_INVOKE_SUPER_JUMBO = 9215; // 0x23ff
    field public static final deprecated int OP_INVOKE_SUPER_QUICK = 250; // 0xfa
    field public static final deprecated int OP_INVOKE_SUPER_QUICK_RANGE = 251; // 0xfb
    field public static final int OP_INVOKE_SUPER_RANGE = 117; // 0x75
    field public static final int OP_INVOKE_VIRTUAL = 110; // 0x6e
    field public static final int OP_INVOKE_VIRTUAL_JUMBO = 8959; // 0x22ff
    field public static final deprecated int OP_INVOKE_VIRTUAL_QUICK = 248; // 0xf8
    field public static final deprecated int OP_INVOKE_VIRTUAL_QUICK_RANGE = 249; // 0xf9
    field public static final int OP_INVOKE_VIRTUAL_RANGE = 116; // 0x74
    field public static final int OP_IPUT = 89; // 0x59
    field public static final int OP_IPUT_BOOLEAN = 92; // 0x5c
    field public static final int OP_IPUT_BOOLEAN_JUMBO = 4351; // 0x10ff
    field public static final int OP_IPUT_BYTE = 93; // 0x5d
    field public static final int OP_IPUT_BYTE_JUMBO = 4607; // 0x11ff
    field public static final int OP_IPUT_CHAR = 94; // 0x5e
    field public static final int OP_IPUT_CHAR_JUMBO = 4863; // 0x12ff
    field public static final int OP_IPUT_JUMBO = 3583; // 0xdff
    field public static final int OP_IPUT_OBJECT = 91; // 0x5b
    field public static final int OP_IPUT_OBJECT_JUMBO = 4095; // 0xfff
    field public static final deprecated int OP_IPUT_OBJECT_QUICK = 247; // 0xf7
    field public static final deprecated int OP_IPUT_QUICK = 245; // 0xf5
    field public static final int OP_IPUT_SHORT = 95; // 0x5f
    field public static final int OP_IPUT_SHORT_JUMBO = 5119; // 0x13ff
    field public static final int OP_IPUT_WIDE = 90; // 0x5a
    field public static final int OP_IPUT_WIDE_JUMBO = 3839; // 0xeff
    field public static final deprecated int OP_IPUT_WIDE_QUICK = 246; // 0xf6
    field public static final deprecated int OP_IPUT_WIDE_VOLATILE = 233; // 0xe9
    field public static final int OP_LONG_TO_DOUBLE = 134; // 0x86
    field public static final int OP_LONG_TO_FLOAT = 133; // 0x85
    field public static final int OP_LONG_TO_INT = 132; // 0x84
    field public static final int OP_MONITOR_ENTER = 29; // 0x1d
    field public static final int OP_MONITOR_EXIT = 30; // 0x1e
    field public static final int OP_MOVE = 1; // 0x1
    field public static final int OP_MOVE_16 = 3; // 0x3
    field public static final int OP_MOVE_EXCEPTION = 13; // 0xd
    field public static final int OP_MOVE_FROM16 = 2; // 0x2
    field public static final int OP_MOVE_OBJECT = 7; // 0x7
    field public static final int OP_MOVE_OBJECT_16 = 9; // 0x9
    field public static final int OP_MOVE_OBJECT_FROM16 = 8; // 0x8
    field public static final int OP_MOVE_RESULT = 10; // 0xa
    field public static final int OP_MOVE_RESULT_OBJECT = 12; // 0xc
    field public static final int OP_MOVE_RESULT_WIDE = 11; // 0xb
    field public static final int OP_MOVE_WIDE = 4; // 0x4
    field public static final int OP_MOVE_WIDE_16 = 6; // 0x6
    field public static final int OP_MOVE_WIDE_FROM16 = 5; // 0x5
    field public static final int OP_MUL_DOUBLE = 173; // 0xad
    field public static final int OP_MUL_DOUBLE_2ADDR = 205; // 0xcd
    field public static final int OP_MUL_FLOAT = 168; // 0xa8
    field public static final int OP_MUL_FLOAT_2ADDR = 200; // 0xc8
    field public static final int OP_MUL_INT = 146; // 0x92
    field public static final int OP_MUL_INT_2ADDR = 178; // 0xb2
    field public static final int OP_MUL_INT_LIT16 = 210; // 0xd2
    field public static final int OP_MUL_INT_LIT8 = 218; // 0xda
    field public static final int OP_MUL_LONG = 157; // 0x9d
    field public static final int OP_MUL_LONG_2ADDR = 189; // 0xbd
    field public static final int OP_NEG_DOUBLE = 128; // 0x80
    field public static final int OP_NEG_FLOAT = 127; // 0x7f
    field public static final int OP_NEG_INT = 123; // 0x7b
    field public static final int OP_NEG_LONG = 125; // 0x7d
    field public static final int OP_NEW_ARRAY = 35; // 0x23
    field public static final int OP_NEW_ARRAY_JUMBO = 1279; // 0x4ff
    field public static final int OP_NEW_INSTANCE = 34; // 0x22
    field public static final int OP_NEW_INSTANCE_JUMBO = 1023; // 0x3ff
    field public static final int OP_NOP = 0; // 0x0
    field public static final int OP_NOT_INT = 124; // 0x7c
    field public static final int OP_NOT_LONG = 126; // 0x7e
    field public static final int OP_OR_INT = 150; // 0x96
    field public static final int OP_OR_INT_2ADDR = 182; // 0xb6
    field public static final int OP_OR_INT_LIT16 = 214; // 0xd6
    field public static final int OP_OR_INT_LIT8 = 222; // 0xde
    field public static final int OP_OR_LONG = 161; // 0xa1
    field public static final int OP_OR_LONG_2ADDR = 193; // 0xc1
    field public static final int OP_PACKED_SWITCH = 43; // 0x2b
    field public static final int OP_REM_DOUBLE = 175; // 0xaf
    field public static final int OP_REM_DOUBLE_2ADDR = 207; // 0xcf
    field public static final int OP_REM_FLOAT = 170; // 0xaa
    field public static final int OP_REM_FLOAT_2ADDR = 202; // 0xca
    field public static final int OP_REM_INT = 148; // 0x94
    field public static final int OP_REM_INT_2ADDR = 180; // 0xb4
    field public static final int OP_REM_INT_LIT16 = 212; // 0xd4
    field public static final int OP_REM_INT_LIT8 = 220; // 0xdc
    field public static final int OP_REM_LONG = 159; // 0x9f
    field public static final int OP_REM_LONG_2ADDR = 191; // 0xbf
    field public static final int OP_RETURN = 15; // 0xf
    field public static final int OP_RETURN_OBJECT = 17; // 0x11
    field public static final int OP_RETURN_VOID = 14; // 0xe
    field public static final int OP_RETURN_WIDE = 16; // 0x10
    field public static final int OP_RSUB_INT = 209; // 0xd1
    field public static final int OP_RSUB_INT_LIT8 = 217; // 0xd9
    field public static final int OP_SGET = 96; // 0x60
    field public static final int OP_SGET_BOOLEAN = 99; // 0x63
    field public static final int OP_SGET_BOOLEAN_JUMBO = 6143; // 0x17ff
    field public static final int OP_SGET_BYTE = 100; // 0x64
    field public static final int OP_SGET_BYTE_JUMBO = 6399; // 0x18ff
    field public static final int OP_SGET_CHAR = 101; // 0x65
    field public static final int OP_SGET_CHAR_JUMBO = 6655; // 0x19ff
    field public static final int OP_SGET_JUMBO = 5375; // 0x14ff
    field public static final int OP_SGET_OBJECT = 98; // 0x62
    field public static final int OP_SGET_OBJECT_JUMBO = 5887; // 0x16ff
    field public static final int OP_SGET_SHORT = 102; // 0x66
    field public static final int OP_SGET_SHORT_JUMBO = 6911; // 0x1aff
    field public static final int OP_SGET_WIDE = 97; // 0x61
    field public static final int OP_SGET_WIDE_JUMBO = 5631; // 0x15ff
    field public static final deprecated int OP_SGET_WIDE_VOLATILE = 234; // 0xea
    field public static final int OP_SHL_INT = 152; // 0x98
    field public static final int OP_SHL_INT_2ADDR = 184; // 0xb8
    field public static final int OP_SHL_INT_LIT8 = 224; // 0xe0
    field public static final int OP_SHL_LONG = 163; // 0xa3
    field public static final int OP_SHL_LONG_2ADDR = 195; // 0xc3
    field public static final int OP_SHR_INT = 153; // 0x99
    field public static final int OP_SHR_INT_2ADDR = 185; // 0xb9
    field public static final int OP_SHR_INT_LIT8 = 225; // 0xe1
    field public static final int OP_SHR_LONG = 164; // 0xa4
    field public static final int OP_SHR_LONG_2ADDR = 196; // 0xc4
    field public static final int OP_SPARSE_SWITCH = 44; // 0x2c
    field public static final int OP_SPUT = 103; // 0x67
    field public static final int OP_SPUT_BOOLEAN = 106; // 0x6a
    field public static final int OP_SPUT_BOOLEAN_JUMBO = 7935; // 0x1eff
    field public static final int OP_SPUT_BYTE = 107; // 0x6b
    field public static final int OP_SPUT_BYTE_JUMBO = 8191; // 0x1fff
    field public static final int OP_SPUT_CHAR = 108; // 0x6c
    field public static final int OP_SPUT_CHAR_JUMBO = 8447; // 0x20ff
    field public static final int OP_SPUT_JUMBO = 7167; // 0x1bff
    field public static final int OP_SPUT_OBJECT = 105; // 0x69
    field public static final int OP_SPUT_OBJECT_JUMBO = 7679; // 0x1dff
    field public static final int OP_SPUT_SHORT = 109; // 0x6d
    field public static final int OP_SPUT_SHORT_JUMBO = 8703; // 0x21ff
    field public static final int OP_SPUT_WIDE = 104; // 0x68
    field public static final int OP_SPUT_WIDE_JUMBO = 7423; // 0x1cff
    field public static final deprecated int OP_SPUT_WIDE_VOLATILE = 235; // 0xeb
    field public static final int OP_SUB_DOUBLE = 172; // 0xac
    field public static final int OP_SUB_DOUBLE_2ADDR = 204; // 0xcc
    field public static final int OP_SUB_FLOAT = 167; // 0xa7
    field public static final int OP_SUB_FLOAT_2ADDR = 199; // 0xc7
    field public static final int OP_SUB_INT = 145; // 0x91
    field public static final int OP_SUB_INT_2ADDR = 177; // 0xb1
    field public static final int OP_SUB_LONG = 156; // 0x9c
    field public static final int OP_SUB_LONG_2ADDR = 188; // 0xbc
    field public static final int OP_THROW = 39; // 0x27
    field public static final deprecated int OP_THROW_VERIFICATION_ERROR = 237; // 0xed
    field public static final int OP_USHR_INT = 154; // 0x9a
    field public static final int OP_USHR_INT_2ADDR = 186; // 0xba
    field public static final int OP_USHR_INT_LIT8 = 226; // 0xe2
    field public static final int OP_USHR_LONG = 165; // 0xa5
    field public static final int OP_USHR_LONG_2ADDR = 197; // 0xc5
    field public static final int OP_XOR_INT = 151; // 0x97
    field public static final int OP_XOR_INT_2ADDR = 183; // 0xb7
    field public static final int OP_XOR_INT_LIT16 = 215; // 0xd7
    field public static final int OP_XOR_INT_LIT8 = 223; // 0xdf
    field public static final int OP_XOR_LONG = 162; // 0xa2
    field public static final int OP_XOR_LONG_2ADDR = 194; // 0xc2
  }

}

package dalvik.system {

  public class BaseDexClassLoader extends java.lang.ClassLoader {
    ctor public BaseDexClassLoader(java.lang.String, java.io.File, java.lang.String, java.lang.ClassLoader);
    method public java.lang.String findLibrary(java.lang.String);
  }

  public class DexClassLoader extends dalvik.system.BaseDexClassLoader {
    ctor public DexClassLoader(java.lang.String, java.lang.String, java.lang.String, java.lang.ClassLoader);
  }

  public final class DexFile {
    ctor public DexFile(java.io.File) throws java.io.IOException;
    ctor public DexFile(java.lang.String) throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public java.util.Enumeration<java.lang.String> entries();
    method public java.lang.String getName();
    method public static boolean isDexOptNeeded(java.lang.String) throws java.io.FileNotFoundException, java.io.IOException;
    method public java.lang.Class loadClass(java.lang.String, java.lang.ClassLoader);
    method public static dalvik.system.DexFile loadDex(java.lang.String, java.lang.String, int) throws java.io.IOException;
  }

  public class PathClassLoader extends dalvik.system.BaseDexClassLoader {
    ctor public PathClassLoader(java.lang.String, java.lang.ClassLoader);
    ctor public PathClassLoader(java.lang.String, java.lang.String, java.lang.ClassLoader);
  }

}

package java.awt.font {

  public final class NumericShaper implements java.io.Serializable {
    method public static java.awt.font.NumericShaper getContextualShaper(int, int);
    method public static java.awt.font.NumericShaper getContextualShaper(int);
    method public int getRanges();
    method public static java.awt.font.NumericShaper getShaper(int);
    method public boolean isContextual();
    method public void shape(char[], int, int, int);
    method public void shape(char[], int, int);
    field public static final int ALL_RANGES = 524287; // 0x7ffff
    field public static final int ARABIC = 2; // 0x2
    field public static final int BENGALI = 16; // 0x10
    field public static final int DEVANAGARI = 8; // 0x8
    field public static final int EASTERN_ARABIC = 4; // 0x4
    field public static final int ETHIOPIC = 65536; // 0x10000
    field public static final int EUROPEAN = 1; // 0x1
    field public static final int GUJARATI = 64; // 0x40
    field public static final int GURMUKHI = 32; // 0x20
    field public static final int KANNADA = 1024; // 0x400
    field public static final int KHMER = 131072; // 0x20000
    field public static final int LAO = 8192; // 0x2000
    field public static final int MALAYALAM = 2048; // 0x800
    field public static final int MONGOLIAN = 262144; // 0x40000
    field public static final int MYANMAR = 32768; // 0x8000
    field public static final int ORIYA = 128; // 0x80
    field public static final int TAMIL = 256; // 0x100
    field public static final int TELUGU = 512; // 0x200
    field public static final int THAI = 4096; // 0x1000
    field public static final int TIBETAN = 16384; // 0x4000
  }

  public final class TextAttribute extends java.text.AttributedCharacterIterator.Attribute {
    ctor protected TextAttribute(java.lang.String);
    field public static final java.awt.font.TextAttribute BACKGROUND;
    field public static final java.awt.font.TextAttribute BIDI_EMBEDDING;
    field public static final java.awt.font.TextAttribute CHAR_REPLACEMENT;
    field public static final java.awt.font.TextAttribute FAMILY;
    field public static final java.awt.font.TextAttribute FONT;
    field public static final java.awt.font.TextAttribute FOREGROUND;
    field public static final java.awt.font.TextAttribute INPUT_METHOD_HIGHLIGHT;
    field public static final java.awt.font.TextAttribute INPUT_METHOD_UNDERLINE;
    field public static final java.awt.font.TextAttribute JUSTIFICATION;
    field public static final java.lang.Float JUSTIFICATION_FULL;
    field public static final java.lang.Float JUSTIFICATION_NONE;
    field public static final java.awt.font.TextAttribute KERNING;
    field public static final java.lang.Integer KERNING_ON;
    field public static final java.awt.font.TextAttribute LIGATURES;
    field public static final java.lang.Integer LIGATURES_ON;
    field public static final java.awt.font.TextAttribute NUMERIC_SHAPING;
    field public static final java.awt.font.TextAttribute POSTURE;
    field public static final java.lang.Float POSTURE_OBLIQUE;
    field public static final java.lang.Float POSTURE_REGULAR;
    field public static final java.awt.font.TextAttribute RUN_DIRECTION;
    field public static final java.lang.Boolean RUN_DIRECTION_LTR;
    field public static final java.lang.Boolean RUN_DIRECTION_RTL;
    field public static final java.awt.font.TextAttribute SIZE;
    field public static final java.awt.font.TextAttribute STRIKETHROUGH;
    field public static final java.lang.Boolean STRIKETHROUGH_ON;
    field public static final java.awt.font.TextAttribute SUPERSCRIPT;
    field public static final java.lang.Integer SUPERSCRIPT_SUB;
    field public static final java.lang.Integer SUPERSCRIPT_SUPER;
    field public static final java.awt.font.TextAttribute SWAP_COLORS;
    field public static final java.lang.Boolean SWAP_COLORS_ON;
    field public static final java.awt.font.TextAttribute TRACKING;
    field public static final java.lang.Float TRACKING_LOOSE;
    field public static final java.lang.Float TRACKING_TIGHT;
    field public static final java.awt.font.TextAttribute TRANSFORM;
    field public static final java.awt.font.TextAttribute UNDERLINE;
    field public static final java.lang.Integer UNDERLINE_LOW_DASHED;
    field public static final java.lang.Integer UNDERLINE_LOW_DOTTED;
    field public static final java.lang.Integer UNDERLINE_LOW_GRAY;
    field public static final java.lang.Integer UNDERLINE_LOW_ONE_PIXEL;
    field public static final java.lang.Integer UNDERLINE_LOW_TWO_PIXEL;
    field public static final java.lang.Integer UNDERLINE_ON;
    field public static final java.awt.font.TextAttribute WEIGHT;
    field public static final java.lang.Float WEIGHT_BOLD;
    field public static final java.lang.Float WEIGHT_DEMIBOLD;
    field public static final java.lang.Float WEIGHT_DEMILIGHT;
    field public static final java.lang.Float WEIGHT_EXTRABOLD;
    field public static final java.lang.Float WEIGHT_EXTRA_LIGHT;
    field public static final java.lang.Float WEIGHT_HEAVY;
    field public static final java.lang.Float WEIGHT_LIGHT;
    field public static final java.lang.Float WEIGHT_MEDIUM;
    field public static final java.lang.Float WEIGHT_REGULAR;
    field public static final java.lang.Float WEIGHT_SEMIBOLD;
    field public static final java.lang.Float WEIGHT_ULTRABOLD;
    field public static final java.awt.font.TextAttribute WIDTH;
    field public static final java.lang.Float WIDTH_CONDENSED;
    field public static final java.lang.Float WIDTH_EXTENDED;
    field public static final java.lang.Float WIDTH_REGULAR;
    field public static final java.lang.Float WIDTH_SEMI_CONDENSED;
    field public static final java.lang.Float WIDTH_SEMI_EXTENDED;
  }

}

package java.beans {

  public class IndexedPropertyChangeEvent extends java.beans.PropertyChangeEvent {
    ctor public IndexedPropertyChangeEvent(java.lang.Object, java.lang.String, java.lang.Object, java.lang.Object, int);
    method public int getIndex();
  }

  public class PropertyChangeEvent extends java.util.EventObject {
    ctor public PropertyChangeEvent(java.lang.Object, java.lang.String, java.lang.Object, java.lang.Object);
    method public java.lang.Object getNewValue();
    method public java.lang.Object getOldValue();
    method public java.lang.Object getPropagationId();
    method public java.lang.String getPropertyName();
    method public void setPropagationId(java.lang.Object);
  }

  public abstract interface PropertyChangeListener implements java.util.EventListener {
    method public abstract void propertyChange(java.beans.PropertyChangeEvent);
  }

  public class PropertyChangeListenerProxy extends java.util.EventListenerProxy implements java.beans.PropertyChangeListener {
    ctor public PropertyChangeListenerProxy(java.lang.String, java.beans.PropertyChangeListener);
    method public java.lang.String getPropertyName();
    method public void propertyChange(java.beans.PropertyChangeEvent);
  }

  public class PropertyChangeSupport implements java.io.Serializable {
    ctor public PropertyChangeSupport(java.lang.Object);
    method public void addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener);
    method public void addPropertyChangeListener(java.beans.PropertyChangeListener);
    method public void fireIndexedPropertyChange(java.lang.String, int, java.lang.Object, java.lang.Object);
    method public void fireIndexedPropertyChange(java.lang.String, int, boolean, boolean);
    method public void fireIndexedPropertyChange(java.lang.String, int, int, int);
    method public void firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object);
    method public void firePropertyChange(java.lang.String, boolean, boolean);
    method public void firePropertyChange(java.lang.String, int, int);
    method public void firePropertyChange(java.beans.PropertyChangeEvent);
    method public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String);
    method public java.beans.PropertyChangeListener[] getPropertyChangeListeners();
    method public boolean hasListeners(java.lang.String);
    method public void removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener);
    method public void removePropertyChangeListener(java.beans.PropertyChangeListener);
  }

}

package java.io {

  public class BufferedInputStream extends java.io.FilterInputStream {
    ctor public BufferedInputStream(java.io.InputStream);
    ctor public BufferedInputStream(java.io.InputStream, int);
    field protected volatile byte[] buf;
    field protected int count;
    field protected int marklimit;
    field protected int markpos;
    field protected int pos;
  }

  public class BufferedOutputStream extends java.io.FilterOutputStream {
    ctor public BufferedOutputStream(java.io.OutputStream);
    ctor public BufferedOutputStream(java.io.OutputStream, int);
    field protected byte[] buf;
    field protected int count;
  }

  public class BufferedReader extends java.io.Reader {
    ctor public BufferedReader(java.io.Reader);
    ctor public BufferedReader(java.io.Reader, int);
    method public void close() throws java.io.IOException;
    method public int read(char[], int, int) throws java.io.IOException;
    method public java.lang.String readLine() throws java.io.IOException;
  }

  public class BufferedWriter extends java.io.Writer {
    ctor public BufferedWriter(java.io.Writer);
    ctor public BufferedWriter(java.io.Writer, int);
    method public void close() throws java.io.IOException;
    method public void flush() throws java.io.IOException;
    method public void newLine() throws java.io.IOException;
    method public void write(char[], int, int) throws java.io.IOException;
  }

  public class ByteArrayInputStream extends java.io.InputStream {
    ctor public ByteArrayInputStream(byte[]);
    ctor public ByteArrayInputStream(byte[], int, int);
    method public synchronized int read();
    field protected byte[] buf;
    field protected int count;
    field protected int mark;
    field protected int pos;
  }

  public class ByteArrayOutputStream extends java.io.OutputStream {
    ctor public ByteArrayOutputStream();
    ctor public ByteArrayOutputStream(int);
    method public synchronized void reset();
    method public int size();
    method public synchronized byte[] toByteArray();
    method public deprecated java.lang.String toString(int);
    method public java.lang.String toString(java.lang.String) throws java.io.UnsupportedEncodingException;
    method public synchronized void write(int);
    method public synchronized void writeTo(java.io.OutputStream) throws java.io.IOException;
    field protected byte[] buf;
    field protected int count;
  }

  public class CharArrayReader extends java.io.Reader {
    ctor public CharArrayReader(char[]);
    ctor public CharArrayReader(char[], int, int);
    method public void close();
    method public int read(char[], int, int) throws java.io.IOException;
    field protected char[] buf;
    field protected int count;
    field protected int markedPos;
    field protected int pos;
  }

  public class CharArrayWriter extends java.io.Writer {
    ctor public CharArrayWriter();
    ctor public CharArrayWriter(int);
    method public void close();
    method public void flush();
    method public void reset();
    method public int size();
    method public char[] toCharArray();
    method public void write(char[], int, int);
    method public void writeTo(java.io.Writer) throws java.io.IOException;
    field protected char[] buf;
    field protected int count;
  }

  public class CharConversionException extends java.io.IOException {
    ctor public CharConversionException();
    ctor public CharConversionException(java.lang.String);
  }

  public abstract interface Closeable implements java.lang.AutoCloseable {
    method public abstract void close() throws java.io.IOException;
  }

  public final class Console implements java.io.Flushable {
    method public void flush();
    method public java.io.Console format(java.lang.String, java.lang.Object...);
    method public java.io.Console printf(java.lang.String, java.lang.Object...);
    method public java.lang.String readLine();
    method public java.lang.String readLine(java.lang.String, java.lang.Object...);
    method public char[] readPassword();
    method public char[] readPassword(java.lang.String, java.lang.Object...);
    method public java.io.Reader reader();
    method public java.io.PrintWriter writer();
  }

  public abstract interface DataInput {
    method public abstract boolean readBoolean() throws java.io.IOException;
    method public abstract byte readByte() throws java.io.IOException;
    method public abstract char readChar() throws java.io.IOException;
    method public abstract double readDouble() throws java.io.IOException;
    method public abstract float readFloat() throws java.io.IOException;
    method public abstract void readFully(byte[]) throws java.io.IOException;
    method public abstract void readFully(byte[], int, int) throws java.io.IOException;
    method public abstract int readInt() throws java.io.IOException;
    method public abstract java.lang.String readLine() throws java.io.IOException;
    method public abstract long readLong() throws java.io.IOException;
    method public abstract short readShort() throws java.io.IOException;
    method public abstract java.lang.String readUTF() throws java.io.IOException;
    method public abstract int readUnsignedByte() throws java.io.IOException;
    method public abstract int readUnsignedShort() throws java.io.IOException;
    method public abstract int skipBytes(int) throws java.io.IOException;
  }

  public class DataInputStream extends java.io.FilterInputStream implements java.io.DataInput {
    ctor public DataInputStream(java.io.InputStream);
    method public final int read(byte[]) throws java.io.IOException;
    method public final int read(byte[], int, int) throws java.io.IOException;
    method public final boolean readBoolean() throws java.io.IOException;
    method public final byte readByte() throws java.io.IOException;
    method public final char readChar() throws java.io.IOException;
    method public final double readDouble() throws java.io.IOException;
    method public final float readFloat() throws java.io.IOException;
    method public final void readFully(byte[]) throws java.io.IOException;
    method public final void readFully(byte[], int, int) throws java.io.IOException;
    method public final int readInt() throws java.io.IOException;
    method public final deprecated java.lang.String readLine() throws java.io.IOException;
    method public final long readLong() throws java.io.IOException;
    method public final short readShort() throws java.io.IOException;
    method public final java.lang.String readUTF() throws java.io.IOException;
    method public static final java.lang.String readUTF(java.io.DataInput) throws java.io.IOException;
    method public final int readUnsignedByte() throws java.io.IOException;
    method public final int readUnsignedShort() throws java.io.IOException;
    method public final int skipBytes(int) throws java.io.IOException;
  }

  public abstract interface DataOutput {
    method public abstract void write(byte[]) throws java.io.IOException;
    method public abstract void write(byte[], int, int) throws java.io.IOException;
    method public abstract void write(int) throws java.io.IOException;
    method public abstract void writeBoolean(boolean) throws java.io.IOException;
    method public abstract void writeByte(int) throws java.io.IOException;
    method public abstract void writeBytes(java.lang.String) throws java.io.IOException;
    method public abstract void writeChar(int) throws java.io.IOException;
    method public abstract void writeChars(java.lang.String) throws java.io.IOException;
    method public abstract void writeDouble(double) throws java.io.IOException;
    method public abstract void writeFloat(float) throws java.io.IOException;
    method public abstract void writeInt(int) throws java.io.IOException;
    method public abstract void writeLong(long) throws java.io.IOException;
    method public abstract void writeShort(int) throws java.io.IOException;
    method public abstract void writeUTF(java.lang.String) throws java.io.IOException;
  }

  public class DataOutputStream extends java.io.FilterOutputStream implements java.io.DataOutput {
    ctor public DataOutputStream(java.io.OutputStream);
    method public final int size();
    method public final void writeBoolean(boolean) throws java.io.IOException;
    method public final void writeByte(int) throws java.io.IOException;
    method public final void writeBytes(java.lang.String) throws java.io.IOException;
    method public final void writeChar(int) throws java.io.IOException;
    method public final void writeChars(java.lang.String) throws java.io.IOException;
    method public final void writeDouble(double) throws java.io.IOException;
    method public final void writeFloat(float) throws java.io.IOException;
    method public final void writeInt(int) throws java.io.IOException;
    method public final void writeLong(long) throws java.io.IOException;
    method public final void writeShort(int) throws java.io.IOException;
    method public final void writeUTF(java.lang.String) throws java.io.IOException;
    field protected int written;
  }

  public class EOFException extends java.io.IOException {
    ctor public EOFException();
    ctor public EOFException(java.lang.String);
  }

  public abstract interface Externalizable implements java.io.Serializable {
    method public abstract void readExternal(java.io.ObjectInput) throws java.lang.ClassNotFoundException, java.io.IOException;
    method public abstract void writeExternal(java.io.ObjectOutput) throws java.io.IOException;
  }

  public class File implements java.lang.Comparable java.io.Serializable {
    ctor public File(java.io.File, java.lang.String);
    ctor public File(java.lang.String);
    ctor public File(java.lang.String, java.lang.String);
    ctor public File(java.net.URI);
    method public boolean canExecute();
    method public boolean canRead();
    method public boolean canWrite();
    method public int compareTo(java.io.File);
    method public boolean createNewFile() throws java.io.IOException;
    method public static java.io.File createTempFile(java.lang.String, java.lang.String) throws java.io.IOException;
    method public static java.io.File createTempFile(java.lang.String, java.lang.String, java.io.File) throws java.io.IOException;
    method public boolean delete();
    method public void deleteOnExit();
    method public boolean exists();
    method public java.io.File getAbsoluteFile();
    method public java.lang.String getAbsolutePath();
    method public java.io.File getCanonicalFile() throws java.io.IOException;
    method public java.lang.String getCanonicalPath() throws java.io.IOException;
    method public long getFreeSpace();
    method public java.lang.String getName();
    method public java.lang.String getParent();
    method public java.io.File getParentFile();
    method public java.lang.String getPath();
    method public long getTotalSpace();
    method public long getUsableSpace();
    method public boolean isAbsolute();
    method public boolean isDirectory();
    method public boolean isFile();
    method public boolean isHidden();
    method public long lastModified();
    method public long length();
    method public java.lang.String[] list();
    method public java.lang.String[] list(java.io.FilenameFilter);
    method public java.io.File[] listFiles();
    method public java.io.File[] listFiles(java.io.FilenameFilter);
    method public java.io.File[] listFiles(java.io.FileFilter);
    method public static java.io.File[] listRoots();
    method public boolean mkdir();
    method public boolean mkdirs();
    method public boolean renameTo(java.io.File);
    method public boolean setExecutable(boolean, boolean);
    method public boolean setExecutable(boolean);
    method public boolean setLastModified(long);
    method public boolean setReadOnly();
    method public boolean setReadable(boolean, boolean);
    method public boolean setReadable(boolean);
    method public boolean setWritable(boolean, boolean);
    method public boolean setWritable(boolean);
    method public java.net.URI toURI();
    method public deprecated java.net.URL toURL() throws java.net.MalformedURLException;
    field public static final java.lang.String pathSeparator;
    field public static final char pathSeparatorChar;
    field public static final java.lang.String separator;
    field public static final char separatorChar;
  }

  public final class FileDescriptor {
    ctor public FileDescriptor();
    method public void sync() throws java.io.SyncFailedException;
    method public boolean valid();
    field public static final java.io.FileDescriptor err;
    field public static final java.io.FileDescriptor in;
    field public static final java.io.FileDescriptor out;
  }

  public abstract interface FileFilter {
    method public abstract boolean accept(java.io.File);
  }

  public class FileInputStream extends java.io.InputStream {
    ctor public FileInputStream(java.io.File) throws java.io.FileNotFoundException;
    ctor public FileInputStream(java.io.FileDescriptor);
    ctor public FileInputStream(java.lang.String) throws java.io.FileNotFoundException;
    method public java.nio.channels.FileChannel getChannel();
    method public final java.io.FileDescriptor getFD() throws java.io.IOException;
    method public int read() throws java.io.IOException;
  }

  public class FileNotFoundException extends java.io.IOException {
    ctor public FileNotFoundException();
    ctor public FileNotFoundException(java.lang.String);
  }

  public class FileOutputStream extends java.io.OutputStream {
    ctor public FileOutputStream(java.io.File) throws java.io.FileNotFoundException;
    ctor public FileOutputStream(java.io.File, boolean) throws java.io.FileNotFoundException;
    ctor public FileOutputStream(java.io.FileDescriptor);
    ctor public FileOutputStream(java.lang.String) throws java.io.FileNotFoundException;
    ctor public FileOutputStream(java.lang.String, boolean) throws java.io.FileNotFoundException;
    method public java.nio.channels.FileChannel getChannel();
    method public final java.io.FileDescriptor getFD() throws java.io.IOException;
    method public void write(int) throws java.io.IOException;
  }

  public final class FilePermission extends java.security.Permission implements java.io.Serializable {
    ctor public FilePermission(java.lang.String, java.lang.String);
    method public java.lang.String getActions();
    method public boolean implies(java.security.Permission);
  }

  public class FileReader extends java.io.InputStreamReader {
    ctor public FileReader(java.io.File) throws java.io.FileNotFoundException;
    ctor public FileReader(java.io.FileDescriptor);
    ctor public FileReader(java.lang.String) throws java.io.FileNotFoundException;
  }

  public class FileWriter extends java.io.OutputStreamWriter {
    ctor public FileWriter(java.io.File) throws java.io.IOException;
    ctor public FileWriter(java.io.File, boolean) throws java.io.IOException;
    ctor public FileWriter(java.io.FileDescriptor);
    ctor public FileWriter(java.lang.String) throws java.io.IOException;
    ctor public FileWriter(java.lang.String, boolean) throws java.io.IOException;
  }

  public abstract interface FilenameFilter {
    method public abstract boolean accept(java.io.File, java.lang.String);
  }

  public class FilterInputStream extends java.io.InputStream {
    ctor protected FilterInputStream(java.io.InputStream);
    method public int read() throws java.io.IOException;
    field protected volatile java.io.InputStream in;
  }

  public class FilterOutputStream extends java.io.OutputStream {
    ctor public FilterOutputStream(java.io.OutputStream);
    method public void write(int) throws java.io.IOException;
    field protected java.io.OutputStream out;
  }

  public abstract class FilterReader extends java.io.Reader {
    ctor protected FilterReader(java.io.Reader);
    method public void close() throws java.io.IOException;
    method public int read(char[], int, int) throws java.io.IOException;
    field protected java.io.Reader in;
  }

  public abstract class FilterWriter extends java.io.Writer {
    ctor protected FilterWriter(java.io.Writer);
    method public void close() throws java.io.IOException;
    method public void flush() throws java.io.IOException;
    method public void write(char[], int, int) throws java.io.IOException;
    field protected java.io.Writer out;
  }

  public abstract interface Flushable {
    method public abstract void flush() throws java.io.IOException;
  }

  public class IOError extends java.lang.Error {
    ctor public IOError(java.lang.Throwable);
  }

  public class IOException extends java.lang.Exception {
    ctor public IOException();
    ctor public IOException(java.lang.String);
    ctor public IOException(java.lang.String, java.lang.Throwable);
    ctor public IOException(java.lang.Throwable);
  }

  public abstract class InputStream implements java.io.Closeable {
    ctor public InputStream();
    method public int available() throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public void mark(int);
    method public boolean markSupported();
    method public abstract int read() throws java.io.IOException;
    method public int read(byte[]) throws java.io.IOException;
    method public int read(byte[], int, int) throws java.io.IOException;
    method public synchronized void reset() throws java.io.IOException;
    method public long skip(long) throws java.io.IOException;
  }

  public class InputStreamReader extends java.io.Reader {
    ctor public InputStreamReader(java.io.InputStream);
    ctor public InputStreamReader(java.io.InputStream, java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public InputStreamReader(java.io.InputStream, java.nio.charset.CharsetDecoder);
    ctor public InputStreamReader(java.io.InputStream, java.nio.charset.Charset);
    method public void close() throws java.io.IOException;
    method public java.lang.String getEncoding();
    method public int read(char[], int, int) throws java.io.IOException;
  }

  public class InterruptedIOException extends java.io.IOException {
    ctor public InterruptedIOException();
    ctor public InterruptedIOException(java.lang.String);
    field public int bytesTransferred;
  }

  public class InvalidClassException extends java.io.ObjectStreamException {
    ctor public InvalidClassException(java.lang.String);
    ctor public InvalidClassException(java.lang.String, java.lang.String);
    field public java.lang.String classname;
  }

  public class InvalidObjectException extends java.io.ObjectStreamException {
    ctor public InvalidObjectException(java.lang.String);
  }

  public deprecated class LineNumberInputStream extends java.io.FilterInputStream {
    ctor public LineNumberInputStream(java.io.InputStream);
    method public int getLineNumber();
    method public void setLineNumber(int);
  }

  public class LineNumberReader extends java.io.BufferedReader {
    ctor public LineNumberReader(java.io.Reader);
    ctor public LineNumberReader(java.io.Reader, int);
    method public int getLineNumber();
    method public void setLineNumber(int);
  }

  public class NotActiveException extends java.io.ObjectStreamException {
    ctor public NotActiveException();
    ctor public NotActiveException(java.lang.String);
  }

  public class NotSerializableException extends java.io.ObjectStreamException {
    ctor public NotSerializableException();
    ctor public NotSerializableException(java.lang.String);
  }

  public abstract interface ObjectInput implements java.lang.AutoCloseable java.io.DataInput {
    method public abstract int available() throws java.io.IOException;
    method public abstract void close() throws java.io.IOException;
    method public abstract int read() throws java.io.IOException;
    method public abstract int read(byte[]) throws java.io.IOException;
    method public abstract int read(byte[], int, int) throws java.io.IOException;
    method public abstract java.lang.Object readObject() throws java.lang.ClassNotFoundException, java.io.IOException;
    method public abstract long skip(long) throws java.io.IOException;
  }

  public class ObjectInputStream extends java.io.InputStream implements java.io.ObjectInput java.io.ObjectStreamConstants {
    ctor protected ObjectInputStream() throws java.io.IOException;
    ctor public ObjectInputStream(java.io.InputStream) throws java.io.IOException, java.io.StreamCorruptedException;
    method public void defaultReadObject() throws java.lang.ClassNotFoundException, java.io.IOException, java.io.NotActiveException;
    method protected boolean enableResolveObject(boolean);
    method public int read() throws java.io.IOException;
    method public boolean readBoolean() throws java.io.IOException;
    method public byte readByte() throws java.io.IOException;
    method public char readChar() throws java.io.IOException;
    method protected java.io.ObjectStreamClass readClassDescriptor() throws java.lang.ClassNotFoundException, java.io.IOException;
    method public double readDouble() throws java.io.IOException;
    method public java.io.ObjectInputStream.GetField readFields() throws java.lang.ClassNotFoundException, java.io.IOException, java.io.NotActiveException;
    method public float readFloat() throws java.io.IOException;
    method public void readFully(byte[]) throws java.io.IOException;
    method public void readFully(byte[], int, int) throws java.io.IOException;
    method public int readInt() throws java.io.IOException;
    method public deprecated java.lang.String readLine() throws java.io.IOException;
    method public long readLong() throws java.io.IOException;
    method public final java.lang.Object readObject() throws java.lang.ClassNotFoundException, java.io.IOException, java.io.OptionalDataException;
    method protected java.lang.Object readObjectOverride() throws java.lang.ClassNotFoundException, java.io.IOException, java.io.OptionalDataException;
    method public short readShort() throws java.io.IOException;
    method protected void readStreamHeader() throws java.io.IOException, java.io.StreamCorruptedException;
    method public java.lang.String readUTF() throws java.io.IOException;
    method public java.lang.Object readUnshared() throws java.lang.ClassNotFoundException, java.io.IOException;
    method public int readUnsignedByte() throws java.io.IOException;
    method public int readUnsignedShort() throws java.io.IOException;
    method public synchronized void registerValidation(java.io.ObjectInputValidation, int) throws java.io.InvalidObjectException, java.io.NotActiveException;
    method protected java.lang.Class<?> resolveClass(java.io.ObjectStreamClass) throws java.lang.ClassNotFoundException, java.io.IOException;
    method protected java.lang.Object resolveObject(java.lang.Object) throws java.io.IOException;
    method protected java.lang.Class<?> resolveProxyClass(java.lang.String[]) throws java.lang.ClassNotFoundException, java.io.IOException;
    method public int skipBytes(int) throws java.io.IOException;
  }

  public static abstract class ObjectInputStream.GetField {
    ctor public ObjectInputStream.GetField();
    method public abstract boolean defaulted(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract boolean get(java.lang.String, boolean) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract char get(java.lang.String, char) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract byte get(java.lang.String, byte) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract short get(java.lang.String, short) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract int get(java.lang.String, int) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract long get(java.lang.String, long) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract float get(java.lang.String, float) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract double get(java.lang.String, double) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract java.lang.Object get(java.lang.String, java.lang.Object) throws java.io.IOException, java.lang.IllegalArgumentException;
    method public abstract java.io.ObjectStreamClass getObjectStreamClass();
  }

  public abstract interface ObjectInputValidation {
    method public abstract void validateObject() throws java.io.InvalidObjectException;
  }

  public abstract interface ObjectOutput implements java.lang.AutoCloseable java.io.DataOutput {
    method public abstract void close() throws java.io.IOException;
    method public abstract void flush() throws java.io.IOException;
    method public abstract void write(byte[]) throws java.io.IOException;
    method public abstract void write(byte[], int, int) throws java.io.IOException;
    method public abstract void write(int) throws java.io.IOException;
    method public abstract void writeObject(java.lang.Object) throws java.io.IOException;
  }

  public class ObjectOutputStream extends java.io.OutputStream implements java.io.ObjectOutput java.io.ObjectStreamConstants {
    ctor protected ObjectOutputStream() throws java.io.IOException;
    ctor public ObjectOutputStream(java.io.OutputStream) throws java.io.IOException;
    method protected void annotateClass(java.lang.Class<?>) throws java.io.IOException;
    method protected void annotateProxyClass(java.lang.Class<?>) throws java.io.IOException;
    method public void defaultWriteObject() throws java.io.IOException;
    method protected void drain() throws java.io.IOException;
    method protected boolean enableReplaceObject(boolean);
    method public java.io.ObjectOutputStream.PutField putFields() throws java.io.IOException;
    method protected java.lang.Object replaceObject(java.lang.Object) throws java.io.IOException;
    method public void reset() throws java.io.IOException;
    method public void useProtocolVersion(int) throws java.io.IOException;
    method public void write(int) throws java.io.IOException;
    method public void writeBoolean(boolean) throws java.io.IOException;
    method public void writeByte(int) throws java.io.IOException;
    method public void writeBytes(java.lang.String) throws java.io.IOException;
    method public void writeChar(int) throws java.io.IOException;
    method public void writeChars(java.lang.String) throws java.io.IOException;
    method protected void writeClassDescriptor(java.io.ObjectStreamClass) throws java.io.IOException;
    method public void writeDouble(double) throws java.io.IOException;
    method public void writeFields() throws java.io.IOException;
    method public void writeFloat(float) throws java.io.IOException;
    method public void writeInt(int) throws java.io.IOException;
    method public void writeLong(long) throws java.io.IOException;
    method public final void writeObject(java.lang.Object) throws java.io.IOException;
    method protected void writeObjectOverride(java.lang.Object) throws java.io.IOException;
    method public void writeShort(int) throws java.io.IOException;
    method protected void writeStreamHeader() throws java.io.IOException;
    method public void writeUTF(java.lang.String) throws java.io.IOException;
    method public void writeUnshared(java.lang.Object) throws java.io.IOException;
  }

  public static abstract class ObjectOutputStream.PutField {
    ctor public ObjectOutputStream.PutField();
    method public abstract void put(java.lang.String, boolean);
    method public abstract void put(java.lang.String, char);
    method public abstract void put(java.lang.String, byte);
    method public abstract void put(java.lang.String, short);
    method public abstract void put(java.lang.String, int);
    method public abstract void put(java.lang.String, long);
    method public abstract void put(java.lang.String, float);
    method public abstract void put(java.lang.String, double);
    method public abstract void put(java.lang.String, java.lang.Object);
    method public abstract deprecated void write(java.io.ObjectOutput) throws java.io.IOException;
  }

  public class ObjectStreamClass implements java.io.Serializable {
    method public java.lang.Class<?> forClass();
    method public java.io.ObjectStreamField getField(java.lang.String);
    method public java.io.ObjectStreamField[] getFields();
    method public java.lang.String getName();
    method public long getSerialVersionUID();
    method public static java.io.ObjectStreamClass lookup(java.lang.Class<?>);
    method public static java.io.ObjectStreamClass lookupAny(java.lang.Class<?>);
    field public static final java.io.ObjectStreamField[] NO_FIELDS;
  }

  public abstract interface ObjectStreamConstants {
    field public static final int PROTOCOL_VERSION_1 = 1; // 0x1
    field public static final int PROTOCOL_VERSION_2 = 2; // 0x2
    field public static final byte SC_BLOCK_DATA = 8; // 0x8
    field public static final byte SC_ENUM = 16; // 0x10
    field public static final byte SC_EXTERNALIZABLE = 4; // 0x4
    field public static final byte SC_SERIALIZABLE = 2; // 0x2
    field public static final byte SC_WRITE_METHOD = 1; // 0x1
    field public static final short STREAM_MAGIC = -21267; // 0xffffaced
    field public static final short STREAM_VERSION = 5; // 0x5
    field public static final java.io.SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION;
    field public static final java.io.SerializablePermission SUBSTITUTION_PERMISSION;
    field public static final byte TC_ARRAY = 117; // 0x75
    field public static final byte TC_BASE = 112; // 0x70
    field public static final byte TC_BLOCKDATA = 119; // 0x77
    field public static final byte TC_BLOCKDATALONG = 122; // 0x7a
    field public static final byte TC_CLASS = 118; // 0x76
    field public static final byte TC_CLASSDESC = 114; // 0x72
    field public static final byte TC_ENDBLOCKDATA = 120; // 0x78
    field public static final byte TC_ENUM = 126; // 0x7e
    field public static final byte TC_EXCEPTION = 123; // 0x7b
    field public static final byte TC_LONGSTRING = 124; // 0x7c
    field public static final byte TC_MAX = 126; // 0x7e
    field public static final byte TC_NULL = 112; // 0x70
    field public static final byte TC_OBJECT = 115; // 0x73
    field public static final byte TC_PROXYCLASSDESC = 125; // 0x7d
    field public static final byte TC_REFERENCE = 113; // 0x71
    field public static final byte TC_RESET = 121; // 0x79
    field public static final byte TC_STRING = 116; // 0x74
    field public static final int baseWireHandle = 8257536; // 0x7e0000
  }

  public abstract class ObjectStreamException extends java.io.IOException {
    ctor protected ObjectStreamException();
    ctor protected ObjectStreamException(java.lang.String);
  }

  public class ObjectStreamField implements java.lang.Comparable {
    ctor public ObjectStreamField(java.lang.String, java.lang.Class<?>);
    ctor public ObjectStreamField(java.lang.String, java.lang.Class<?>, boolean);
    method public int compareTo(java.lang.Object);
    method public java.lang.String getName();
    method public int getOffset();
    method public java.lang.Class<?> getType();
    method public char getTypeCode();
    method public java.lang.String getTypeString();
    method public boolean isPrimitive();
    method public boolean isUnshared();
    method protected void setOffset(int);
  }

  public class OptionalDataException extends java.io.ObjectStreamException {
    field public boolean eof;
    field public int length;
  }

  public abstract class OutputStream implements java.io.Closeable java.io.Flushable {
    ctor public OutputStream();
    method public void close() throws java.io.IOException;
    method public void flush() throws java.io.IOException;
    method public void write(byte[]) throws java.io.IOException;
    method public void write(byte[], int, int) throws java.io.IOException;
    method public abstract void write(int) throws java.io.IOException;
  }

  public class OutputStreamWriter extends java.io.Writer {
    ctor public OutputStreamWriter(java.io.OutputStream);
    ctor public OutputStreamWriter(java.io.OutputStream, java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public OutputStreamWriter(java.io.OutputStream, java.nio.charset.Charset);
    ctor public OutputStreamWriter(java.io.OutputStream, java.nio.charset.CharsetEncoder);
    method public void close() throws java.io.IOException;
    method public void flush() throws java.io.IOException;
    method public java.lang.String getEncoding();
    method public void write(char[], int, int) throws java.io.IOException;
  }

  public class PipedInputStream extends java.io.InputStream {
    ctor public PipedInputStream();
    ctor public PipedInputStream(java.io.PipedOutputStream) throws java.io.IOException;
    ctor public PipedInputStream(int);
    ctor public PipedInputStream(java.io.PipedOutputStream, int) throws java.io.IOException;
    method public void connect(java.io.PipedOutputStream) throws java.io.IOException;
    method public synchronized int read() throws java.io.IOException;
    method protected synchronized void receive(int) throws java.io.IOException;
    field protected static final int PIPE_SIZE = 1024; // 0x400
    field protected byte[] buffer;
    field protected int in;
    field protected int out;
  }

  public class PipedOutputStream extends java.io.OutputStream {
    ctor public PipedOutputStream();
    ctor public PipedOutputStream(java.io.PipedInputStream) throws java.io.IOException;
    method public void connect(java.io.PipedInputStream) throws java.io.IOException;
    method public void write(int) throws java.io.IOException;
  }

  public class PipedReader extends java.io.Reader {
    ctor public PipedReader();
    ctor public PipedReader(java.io.PipedWriter) throws java.io.IOException;
    ctor public PipedReader(int);
    ctor public PipedReader(java.io.PipedWriter, int) throws java.io.IOException;
    method public synchronized void close() throws java.io.IOException;
    method public void connect(java.io.PipedWriter) throws java.io.IOException;
    method public synchronized int read(char[], int, int) throws java.io.IOException;
  }

  public class PipedWriter extends java.io.Writer {
    ctor public PipedWriter();
    ctor public PipedWriter(java.io.PipedReader) throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public void connect(java.io.PipedReader) throws java.io.IOException;
    method public void flush() throws java.io.IOException;
    method public void write(char[], int, int) throws java.io.IOException;
  }

  public class PrintStream extends java.io.FilterOutputStream implements java.lang.Appendable java.io.Closeable {
    ctor public PrintStream(java.io.OutputStream);
    ctor public PrintStream(java.io.OutputStream, boolean);
    ctor public PrintStream(java.io.OutputStream, boolean, java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public PrintStream(java.io.File) throws java.io.FileNotFoundException;
    ctor public PrintStream(java.io.File, java.lang.String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    ctor public PrintStream(java.lang.String) throws java.io.FileNotFoundException;
    ctor public PrintStream(java.lang.String, java.lang.String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    method public java.io.PrintStream append(char);
    method public java.io.PrintStream append(java.lang.CharSequence);
    method public java.io.PrintStream append(java.lang.CharSequence, int, int);
    method public boolean checkError();
    method protected void clearError();
    method public java.io.PrintStream format(java.lang.String, java.lang.Object...);
    method public java.io.PrintStream format(java.util.Locale, java.lang.String, java.lang.Object...);
    method public void print(char[]);
    method public void print(char);
    method public void print(double);
    method public void print(float);
    method public void print(int);
    method public void print(long);
    method public void print(java.lang.Object);
    method public synchronized void print(java.lang.String);
    method public void print(boolean);
    method public java.io.PrintStream printf(java.lang.String, java.lang.Object...);
    method public java.io.PrintStream printf(java.util.Locale, java.lang.String, java.lang.Object...);
    method public void println();
    method public void println(char[]);
    method public void println(char);
    method public void println(double);
    method public void println(float);
    method public void println(int);
    method public void println(long);
    method public void println(java.lang.Object);
    method public synchronized void println(java.lang.String);
    method public void println(boolean);
    method protected void setError();
  }

  public class PrintWriter extends java.io.Writer {
    ctor public PrintWriter(java.io.OutputStream);
    ctor public PrintWriter(java.io.OutputStream, boolean);
    ctor public PrintWriter(java.io.Writer);
    ctor public PrintWriter(java.io.Writer, boolean);
    ctor public PrintWriter(java.io.File) throws java.io.FileNotFoundException;
    ctor public PrintWriter(java.io.File, java.lang.String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    ctor public PrintWriter(java.lang.String) throws java.io.FileNotFoundException;
    ctor public PrintWriter(java.lang.String, java.lang.String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    method public boolean checkError();
    method protected void clearError();
    method public void close();
    method public void flush();
    method public java.io.PrintWriter format(java.lang.String, java.lang.Object...);
    method public java.io.PrintWriter format(java.util.Locale, java.lang.String, java.lang.Object...);
    method public void print(char[]);
    method public void print(char);
    method public void print(double);
    method public void print(float);
    method public void print(int);
    method public void print(long);
    method public void print(java.lang.Object);
    method public void print(java.lang.String);
    method public void print(boolean);
    method public java.io.PrintWriter printf(java.lang.String, java.lang.Object...);
    method public java.io.PrintWriter printf(java.util.Locale, java.lang.String, java.lang.Object...);
    method public void println();
    method public void println(char[]);
    method public void println(char);
    method public void println(double);
    method public void println(float);
    method public void println(int);
    method public void println(long);
    method public void println(java.lang.Object);
    method public void println(java.lang.String);
    method public void println(boolean);
    method protected void setError();
    method public void write(char[], int, int);
    field protected java.io.Writer out;
  }

  public class PushbackInputStream extends java.io.FilterInputStream {
    ctor public PushbackInputStream(java.io.InputStream);
    ctor public PushbackInputStream(java.io.InputStream, int);
    method public void unread(byte[]) throws java.io.IOException;
    method public void unread(byte[], int, int) throws java.io.IOException;
    method public void unread(int) throws java.io.IOException;
    field protected byte[] buf;
    field protected int pos;
  }

  public class PushbackReader extends java.io.FilterReader {
    ctor public PushbackReader(java.io.Reader);
    ctor public PushbackReader(java.io.Reader, int);
    method public void unread(char[]) throws java.io.IOException;
    method public void unread(char[], int, int) throws java.io.IOException;
    method public void unread(int) throws java.io.IOException;
  }

  public class RandomAccessFile implements java.io.Closeable java.io.DataInput java.io.DataOutput {
    ctor public RandomAccessFile(java.io.File, java.lang.String) throws java.io.FileNotFoundException;
    ctor public RandomAccessFile(java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
    method public void close() throws java.io.IOException;
    method public final synchronized java.nio.channels.FileChannel getChannel();
    method public final java.io.FileDescriptor getFD() throws java.io.IOException;
    method public long getFilePointer() throws java.io.IOException;
    method public long length() throws java.io.IOException;
    method public int read() throws java.io.IOException;
    method public int read(byte[]) throws java.io.IOException;
    method public int read(byte[], int, int) throws java.io.IOException;
    method public final boolean readBoolean() throws java.io.IOException;
    method public final byte readByte() throws java.io.IOException;
    method public final char readChar() throws java.io.IOException;
    method public final double readDouble() throws java.io.IOException;
    method public final float readFloat() throws java.io.IOException;
    method public final void readFully(byte[]) throws java.io.IOException;
    method public final void readFully(byte[], int, int) throws java.io.IOException;
    method public final int readInt() throws java.io.IOException;
    method public final java.lang.String readLine() throws java.io.IOException;
    method public final long readLong() throws java.io.IOException;
    method public final short readShort() throws java.io.IOException;
    method public final java.lang.String readUTF() throws java.io.IOException;
    method public final int readUnsignedByte() throws java.io.IOException;
    method public final int readUnsignedShort() throws java.io.IOException;
    method public void seek(long) throws java.io.IOException;
    method public void setLength(long) throws java.io.IOException;
    method public int skipBytes(int) throws java.io.IOException;
    method public void write(byte[]) throws java.io.IOException;
    method public void write(byte[], int, int) throws java.io.IOException;
    method public void write(int) throws java.io.IOException;
    method public final void writeBoolean(boolean) throws java.io.IOException;
    method public final void writeByte(int) throws java.io.IOException;
    method public final void writeBytes(java.lang.String) throws java.io.IOException;
    method public final void writeChar(int) throws java.io.IOException;
    method public final void writeChars(java.lang.String) throws java.io.IOException;
    method public final void writeDouble(double) throws java.io.IOException;
    method public final void writeFloat(float) throws java.io.IOException;
    method public final void writeInt(int) throws java.io.IOException;
    method public final void writeLong(long) throws java.io.IOException;
    method public final void writeShort(int) throws java.io.IOException;
    method public final void writeUTF(java.lang.String) throws java.io.IOException;
  }

  public abstract class Reader implements java.io.Closeable java.lang.Readable {
    ctor protected Reader();
    ctor protected Reader(java.lang.Object);
    method public abstract void close() throws java.io.IOException;
    method public void mark(int) throws java.io.IOException;
    method public boolean markSupported();
    method public int read() throws java.io.IOException;
    method public int read(char[]) throws java.io.IOException;
    method public abstract int read(char[], int, int) throws java.io.IOException;
    method public int read(java.nio.CharBuffer) throws java.io.IOException;
    method public boolean ready() throws java.io.IOException;
    method public void reset() throws java.io.IOException;
    method public long skip(long) throws java.io.IOException;
    field protected java.lang.Object lock;
  }

  public class SequenceInputStream extends java.io.InputStream {
    ctor public SequenceInputStream(java.io.InputStream, java.io.InputStream);
    ctor public SequenceInputStream(java.util.Enumeration<? extends java.io.InputStream>);
    method public int read() throws java.io.IOException;
  }

  public abstract interface Serializable {
  }

  public final class SerializablePermission extends java.security.BasicPermission {
    ctor public SerializablePermission(java.lang.String);
    ctor public SerializablePermission(java.lang.String, java.lang.String);
  }

  public class StreamCorruptedException extends java.io.ObjectStreamException {
    ctor public StreamCorruptedException();
    ctor public StreamCorruptedException(java.lang.String);
  }

  public class StreamTokenizer {
    ctor public deprecated StreamTokenizer(java.io.InputStream);
    ctor public StreamTokenizer(java.io.Reader);
    method public void commentChar(int);
    method public void eolIsSignificant(boolean);
    method public int lineno();
    method public void lowerCaseMode(boolean);
    method public int nextToken() throws java.io.IOException;
    method public void ordinaryChar(int);
    method public void ordinaryChars(int, int);
    method public void parseNumbers();
    method public void pushBack();
    method public void quoteChar(int);
    method public void resetSyntax();
    method public void slashSlashComments(boolean);
    method public void slashStarComments(boolean);
    method public void whitespaceChars(int, int);
    method public void wordChars(int, int);
    field public static final int TT_EOF = -1; // 0xffffffff
    field public static final int TT_EOL = 10; // 0xa
    field public static final int TT_NUMBER = -2; // 0xfffffffe
    field public static final int TT_WORD = -3; // 0xfffffffd
    field public double nval;
    field public java.lang.String sval;
    field public int ttype;
  }

  public deprecated class StringBufferInputStream extends java.io.InputStream {
    ctor public StringBufferInputStream(java.lang.String);
    method public synchronized int read();
    field protected java.lang.String buffer;
    field protected int count;
    field protected int pos;
  }

  public class StringReader extends java.io.Reader {
    ctor public StringReader(java.lang.String);
    method public void close();
    method public int read(char[], int, int) throws java.io.IOException;
  }

  public class StringWriter extends java.io.Writer {
    ctor public StringWriter();
    ctor public StringWriter(int);
    method public void close() throws java.io.IOException;
    method public void flush();
    method public java.lang.StringBuffer getBuffer();
    method public void write(char[], int, int);
  }

  public class SyncFailedException extends java.io.IOException {
    ctor public SyncFailedException(java.lang.String);
  }

  public class UTFDataFormatException extends java.io.IOException {
    ctor public UTFDataFormatException();
    ctor public UTFDataFormatException(java.lang.String);
  }

  public class UnsupportedEncodingException extends java.io.IOException {
    ctor public UnsupportedEncodingException();
    ctor public UnsupportedEncodingException(java.lang.String);
  }

  public class WriteAbortedException extends java.io.ObjectStreamException {
    ctor public WriteAbortedException(java.lang.String, java.lang.Exception);
    field public java.lang.Exception detail;
  }

  public abstract class Writer implements java.lang.Appendable java.io.Closeable java.io.Flushable {
    ctor protected Writer();
    ctor protected Writer(java.lang.Object);
    method public java.io.Writer append(char) throws java.io.IOException;
    method public java.io.Writer append(java.lang.CharSequence) throws java.io.IOException;
    method public java.io.Writer append(java.lang.CharSequence, int, int) throws java.io.IOException;
    method public abstract void close() throws java.io.IOException;
    method public abstract void flush() throws java.io.IOException;
    method public void write(char[]) throws java.io.IOException;
    method public abstract void write(char[], int, int) throws java.io.IOException;
    method public void write(int) throws java.io.IOException;
    method public void write(java.lang.String) throws java.io.IOException;
    method public void write(java.lang.String, int, int) throws java.io.IOException;
    field protected java.lang.Object lock;
  }

}

package java.lang {

  public class AbstractMethodError extends java.lang.IncompatibleClassChangeError {
    ctor public AbstractMethodError();
    ctor public AbstractMethodError(java.lang.String);
  }

   abstract class AbstractStringBuilder {
    method public int capacity();
    method public char charAt(int);
    method public int codePointAt(int);
    method public int codePointBefore(int);
    method public int codePointCount(int, int);
    method public void ensureCapacity(int);
    method public void getChars(int, int, char[], int);
    method public int indexOf(java.lang.String);
    method public int indexOf(java.lang.String, int);
    method public int lastIndexOf(java.lang.String);
    method public int lastIndexOf(java.lang.String, int);
    method public int length();
    method public int offsetByCodePoints(int, int);
    method public void setCharAt(int, char);
    method public void setLength(int);
    method public java.lang.CharSequence subSequence(int, int);
    method public java.lang.String substring(int);
    method public java.lang.String substring(int, int);
    method public void trimToSize();
  }

  public abstract interface Appendable {
    method public abstract java.lang.Appendable append(char) throws java.io.IOException;
    method public abstract java.lang.Appendable append(java.lang.CharSequence) throws java.io.IOException;
    method public abstract java.lang.Appendable append(java.lang.CharSequence, int, int) throws java.io.IOException;
  }

  public class ArithmeticException extends java.lang.RuntimeException {
    ctor public ArithmeticException();
    ctor public ArithmeticException(java.lang.String);
  }

  public class ArrayIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
    ctor public ArrayIndexOutOfBoundsException();
    ctor public ArrayIndexOutOfBoundsException(int);
    ctor public ArrayIndexOutOfBoundsException(java.lang.String);
  }

  public class ArrayStoreException extends java.lang.RuntimeException {
    ctor public ArrayStoreException();
    ctor public ArrayStoreException(java.lang.String);
  }

  public class AssertionError extends java.lang.Error {
    ctor public AssertionError();
    ctor public AssertionError(java.lang.String, java.lang.Throwable);
    ctor public AssertionError(java.lang.Object);
    ctor public AssertionError(boolean);
    ctor public AssertionError(char);
    ctor public AssertionError(int);
    ctor public AssertionError(long);
    ctor public AssertionError(float);
    ctor public AssertionError(double);
  }

  public abstract interface AutoCloseable {
    method public abstract void close() throws java.lang.Exception;
  }

  public final class Boolean implements java.lang.Comparable java.io.Serializable {
    ctor public Boolean(java.lang.String);
    ctor public Boolean(boolean);
    method public boolean booleanValue();
    method public static int compare(boolean, boolean);
    method public int compareTo(java.lang.Boolean);
    method public static boolean getBoolean(java.lang.String);
    method public static boolean parseBoolean(java.lang.String);
    method public static java.lang.String toString(boolean);
    method public static java.lang.Boolean valueOf(java.lang.String);
    method public static java.lang.Boolean valueOf(boolean);
    field public static final java.lang.Boolean FALSE;
    field public static final java.lang.Boolean TRUE;
    field public static final java.lang.Class<java.lang.Boolean> TYPE;
  }

  public final class Byte extends java.lang.Number implements java.lang.Comparable {
    ctor public Byte(byte);
    ctor public Byte(java.lang.String) throws java.lang.NumberFormatException;
    method public static int compare(byte, byte);
    method public int compareTo(java.lang.Byte);
    method public static java.lang.Byte decode(java.lang.String) throws java.lang.NumberFormatException;
    method public double doubleValue();
    method public float floatValue();
    method public int intValue();
    method public long longValue();
    method public static byte parseByte(java.lang.String) throws java.lang.NumberFormatException;
    method public static byte parseByte(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.String toString(byte);
    method public static java.lang.Byte valueOf(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.Byte valueOf(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.Byte valueOf(byte);
    field public static final byte MAX_VALUE = 127; // 0x7f
    field public static final byte MIN_VALUE = -128; // 0xffffff80
    field public static final int SIZE = 8; // 0x8
    field public static final java.lang.Class<java.lang.Byte> TYPE;
  }

  public abstract interface CharSequence {
    method public abstract char charAt(int);
    method public abstract int length();
    method public abstract java.lang.CharSequence subSequence(int, int);
    method public abstract java.lang.String toString();
  }

  public final class Character implements java.lang.Comparable java.io.Serializable {
    ctor public Character(char);
    method public static int charCount(int);
    method public char charValue();
    method public static int codePointAt(java.lang.CharSequence, int);
    method public static int codePointAt(char[], int);
    method public static int codePointAt(char[], int, int);
    method public static int codePointBefore(java.lang.CharSequence, int);
    method public static int codePointBefore(char[], int);
    method public static int codePointBefore(char[], int, int);
    method public static int codePointCount(java.lang.CharSequence, int, int);
    method public static int codePointCount(char[], int, int);
    method public static int compare(char, char);
    method public int compareTo(java.lang.Character);
    method public static int digit(char, int);
    method public static int digit(int, int);
    method public static char forDigit(int, int);
    method public static byte getDirectionality(char);
    method public static byte getDirectionality(int);
    method public static java.lang.String getName(int);
    method public static int getNumericValue(char);
    method public static int getNumericValue(int);
    method public static int getType(char);
    method public static int getType(int);
    method public static char highSurrogate(int);
    method public static boolean isAlphabetic(int);
    method public static boolean isBmpCodePoint(int);
    method public static boolean isDefined(char);
    method public static boolean isDefined(int);
    method public static boolean isDigit(char);
    method public static boolean isDigit(int);
    method public static boolean isHighSurrogate(char);
    method public static boolean isISOControl(char);
    method public static boolean isISOControl(int);
    method public static boolean isIdentifierIgnorable(char);
    method public static boolean isIdentifierIgnorable(int);
    method public static boolean isIdeographic(int);
    method public static boolean isJavaIdentifierPart(char);
    method public static boolean isJavaIdentifierPart(int);
    method public static boolean isJavaIdentifierStart(char);
    method public static boolean isJavaIdentifierStart(int);
    method public static deprecated boolean isJavaLetter(char);
    method public static deprecated boolean isJavaLetterOrDigit(char);
    method public static boolean isLetter(char);
    method public static boolean isLetter(int);
    method public static boolean isLetterOrDigit(char);
    method public static boolean isLetterOrDigit(int);
    method public static boolean isLowSurrogate(char);
    method public static boolean isLowerCase(char);
    method public static boolean isLowerCase(int);
    method public static boolean isMirrored(char);
    method public static boolean isMirrored(int);
    method public static deprecated boolean isSpace(char);
    method public static boolean isSpaceChar(char);
    method public static boolean isSpaceChar(int);
    method public static boolean isSupplementaryCodePoint(int);
    method public static boolean isSurrogate(char);
    method public static boolean isSurrogatePair(char, char);
    method public static boolean isTitleCase(char);
    method public static boolean isTitleCase(int);
    method public static boolean isUnicodeIdentifierPart(char);
    method public static boolean isUnicodeIdentifierPart(int);
    method public static boolean isUnicodeIdentifierStart(char);
    method public static boolean isUnicodeIdentifierStart(int);
    method public static boolean isUpperCase(char);
    method public static boolean isUpperCase(int);
    method public static boolean isValidCodePoint(int);
    method public static boolean isWhitespace(char);
    method public static boolean isWhitespace(int);
    method public static char lowSurrogate(int);
    method public static int offsetByCodePoints(java.lang.CharSequence, int, int);
    method public static int offsetByCodePoints(char[], int, int, int, int);
    method public static char reverseBytes(char);
    method public static int toChars(int, char[], int);
    method public static char[] toChars(int);
    method public static int toCodePoint(char, char);
    method public static char toLowerCase(char);
    method public static int toLowerCase(int);
    method public static java.lang.String toString(char);
    method public static char toTitleCase(char);
    method public static int toTitleCase(int);
    method public static char toUpperCase(char);
    method public static int toUpperCase(int);
    method public static java.lang.Character valueOf(char);
    field public static final byte COMBINING_SPACING_MARK = 8; // 0x8
    field public static final byte CONNECTOR_PUNCTUATION = 23; // 0x17
    field public static final byte CONTROL = 15; // 0xf
    field public static final byte CURRENCY_SYMBOL = 26; // 0x1a
    field public static final byte DASH_PUNCTUATION = 20; // 0x14
    field public static final byte DECIMAL_DIGIT_NUMBER = 9; // 0x9
    field public static final byte DIRECTIONALITY_ARABIC_NUMBER = 6; // 0x6
    field public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = 9; // 0x9
    field public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 7; // 0x7
    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = 3; // 0x3
    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 4; // 0x4
    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 5; // 0x5
    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = 0; // 0x0
    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 14; // 0xe
    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 15; // 0xf
    field public static final byte DIRECTIONALITY_NONSPACING_MARK = 8; // 0x8
    field public static final byte DIRECTIONALITY_OTHER_NEUTRALS = 13; // 0xd
    field public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 10; // 0xa
    field public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18; // 0x12
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1; // 0x1
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2; // 0x2
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 16; // 0x10
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 17; // 0x11
    field public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = 11; // 0xb
    field public static final byte DIRECTIONALITY_UNDEFINED = -1; // 0xffffffff
    field public static final byte DIRECTIONALITY_WHITESPACE = 12; // 0xc
    field public static final byte ENCLOSING_MARK = 7; // 0x7
    field public static final byte END_PUNCTUATION = 22; // 0x16
    field public static final byte FINAL_QUOTE_PUNCTUATION = 30; // 0x1e
    field public static final byte FORMAT = 16; // 0x10
    field public static final byte INITIAL_QUOTE_PUNCTUATION = 29; // 0x1d
    field public static final byte LETTER_NUMBER = 10; // 0xa
    field public static final byte LINE_SEPARATOR = 13; // 0xd
    field public static final byte LOWERCASE_LETTER = 2; // 0x2
    field public static final byte MATH_SYMBOL = 25; // 0x19
    field public static final int MAX_CODE_POINT = 1114111; // 0x10ffff
    field public static final char MAX_HIGH_SURROGATE = 56319; // 0xdbff '\udbff'
    field public static final char MAX_LOW_SURROGATE = 57343; // 0xdfff '\udfff'
    field public static final int MAX_RADIX = 36; // 0x24
    field public static final char MAX_SURROGATE = 57343; // 0xdfff '\udfff'
    field public static final char MAX_VALUE = 65535; // 0xffff '\uffff'
    field public static final int MIN_CODE_POINT = 0; // 0x0
    field public static final char MIN_HIGH_SURROGATE = 55296; // 0xd800 '\ud800'
    field public static final char MIN_LOW_SURROGATE = 56320; // 0xdc00 '\udc00'
    field public static final int MIN_RADIX = 2; // 0x2
    field public static final int MIN_SUPPLEMENTARY_CODE_POINT = 65536; // 0x10000
    field public static final char MIN_SURROGATE = 55296; // 0xd800 '\ud800'
    field public static final char MIN_VALUE = 0; // 0x0000 '\u0000'
    field public static final byte MODIFIER_LETTER = 4; // 0x4
    field public static final byte MODIFIER_SYMBOL = 27; // 0x1b
    field public static final byte NON_SPACING_MARK = 6; // 0x6
    field public static final byte OTHER_LETTER = 5; // 0x5
    field public static final byte OTHER_NUMBER = 11; // 0xb
    field public static final byte OTHER_PUNCTUATION = 24; // 0x18
    field public static final byte OTHER_SYMBOL = 28; // 0x1c
    field public static final byte PARAGRAPH_SEPARATOR = 14; // 0xe
    field public static final byte PRIVATE_USE = 18; // 0x12
    field public static final int SIZE = 16; // 0x10
    field public static final byte SPACE_SEPARATOR = 12; // 0xc
    field public static final byte START_PUNCTUATION = 21; // 0x15
    field public static final byte SURROGATE = 19; // 0x13
    field public static final byte TITLECASE_LETTER = 3; // 0x3
    field public static final java.lang.Class<java.lang.Character> TYPE;
    field public static final byte UNASSIGNED = 0; // 0x0
    field public static final byte UPPERCASE_LETTER = 1; // 0x1
  }

  public static class Character.Subset {
    ctor protected Character.Subset(java.lang.String);
    method public final boolean equals(java.lang.Object);
    method public final int hashCode();
    method public final java.lang.String toString();
  }

  public static final class Character.UnicodeBlock extends java.lang.Character.Subset {
    method public static java.lang.Character.UnicodeBlock forName(java.lang.String);
    method public static java.lang.Character.UnicodeBlock of(char);
    method public static java.lang.Character.UnicodeBlock of(int);
    field public static final java.lang.Character.UnicodeBlock AEGEAN_NUMBERS;
    field public static final java.lang.Character.UnicodeBlock ALCHEMICAL_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS;
    field public static final java.lang.Character.UnicodeBlock ANCIENT_GREEK_MUSICAL_NOTATION;
    field public static final java.lang.Character.UnicodeBlock ANCIENT_GREEK_NUMBERS;
    field public static final java.lang.Character.UnicodeBlock ANCIENT_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock ARABIC;
    field public static final java.lang.Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_A;
    field public static final java.lang.Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_B;
    field public static final java.lang.Character.UnicodeBlock ARABIC_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock ARMENIAN;
    field public static final java.lang.Character.UnicodeBlock ARROWS;
    field public static final java.lang.Character.UnicodeBlock AVESTAN;
    field public static final java.lang.Character.UnicodeBlock BALINESE;
    field public static final java.lang.Character.UnicodeBlock BAMUM;
    field public static final java.lang.Character.UnicodeBlock BAMUM_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock BASIC_LATIN;
    field public static final java.lang.Character.UnicodeBlock BATAK;
    field public static final java.lang.Character.UnicodeBlock BENGALI;
    field public static final java.lang.Character.UnicodeBlock BLOCK_ELEMENTS;
    field public static final java.lang.Character.UnicodeBlock BOPOMOFO;
    field public static final java.lang.Character.UnicodeBlock BOPOMOFO_EXTENDED;
    field public static final java.lang.Character.UnicodeBlock BOX_DRAWING;
    field public static final java.lang.Character.UnicodeBlock BRAHMI;
    field public static final java.lang.Character.UnicodeBlock BRAILLE_PATTERNS;
    field public static final java.lang.Character.UnicodeBlock BUGINESE;
    field public static final java.lang.Character.UnicodeBlock BUHID;
    field public static final java.lang.Character.UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock CARIAN;
    field public static final java.lang.Character.UnicodeBlock CHAM;
    field public static final java.lang.Character.UnicodeBlock CHEROKEE;
    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY;
    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_FORMS;
    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS;
    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock CJK_RADICALS_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock CJK_STROKES;
    field public static final java.lang.Character.UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION;
    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS;
    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A;
    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B;
    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C;
    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D;
    field public static final java.lang.Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS;
    field public static final java.lang.Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock COMBINING_HALF_MARKS;
    field public static final java.lang.Character.UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock COMMON_INDIC_NUMBER_FORMS;
    field public static final java.lang.Character.UnicodeBlock CONTROL_PICTURES;
    field public static final java.lang.Character.UnicodeBlock COPTIC;
    field public static final java.lang.Character.UnicodeBlock COUNTING_ROD_NUMERALS;
    field public static final java.lang.Character.UnicodeBlock CUNEIFORM;
    field public static final java.lang.Character.UnicodeBlock CUNEIFORM_NUMBERS_AND_PUNCTUATION;
    field public static final java.lang.Character.UnicodeBlock CURRENCY_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock CYPRIOT_SYLLABARY;
    field public static final java.lang.Character.UnicodeBlock CYRILLIC;
    field public static final java.lang.Character.UnicodeBlock CYRILLIC_EXTENDED_A;
    field public static final java.lang.Character.UnicodeBlock CYRILLIC_EXTENDED_B;
    field public static final java.lang.Character.UnicodeBlock CYRILLIC_SUPPLEMENTARY;
    field public static final java.lang.Character.UnicodeBlock DESERET;
    field public static final java.lang.Character.UnicodeBlock DEVANAGARI;
    field public static final java.lang.Character.UnicodeBlock DEVANAGARI_EXTENDED;
    field public static final java.lang.Character.UnicodeBlock DINGBATS;
    field public static final java.lang.Character.UnicodeBlock DOMINO_TILES;
    field public static final java.lang.Character.UnicodeBlock EGYPTIAN_HIEROGLYPHS;
    field public static final java.lang.Character.UnicodeBlock EMOTICONS;
    field public static final java.lang.Character.UnicodeBlock ENCLOSED_ALPHANUMERICS;
    field public static final java.lang.Character.UnicodeBlock ENCLOSED_ALPHANUMERIC_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS;
    field public static final java.lang.Character.UnicodeBlock ENCLOSED_IDEOGRAPHIC_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock ETHIOPIC;
    field public static final java.lang.Character.UnicodeBlock ETHIOPIC_EXTENDED;
    field public static final java.lang.Character.UnicodeBlock ETHIOPIC_EXTENDED_A;
    field public static final java.lang.Character.UnicodeBlock ETHIOPIC_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock GENERAL_PUNCTUATION;
    field public static final java.lang.Character.UnicodeBlock GEOMETRIC_SHAPES;
    field public static final java.lang.Character.UnicodeBlock GEORGIAN;
    field public static final java.lang.Character.UnicodeBlock GEORGIAN_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock GLAGOLITIC;
    field public static final java.lang.Character.UnicodeBlock GOTHIC;
    field public static final java.lang.Character.UnicodeBlock GREEK;
    field public static final java.lang.Character.UnicodeBlock GREEK_EXTENDED;
    field public static final java.lang.Character.UnicodeBlock GUJARATI;
    field public static final java.lang.Character.UnicodeBlock GURMUKHI;
    field public static final java.lang.Character.UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS;
    field public static final java.lang.Character.UnicodeBlock HANGUL_COMPATIBILITY_JAMO;
    field public static final java.lang.Character.UnicodeBlock HANGUL_JAMO;
    field public static final java.lang.Character.UnicodeBlock HANGUL_JAMO_EXTENDED_A;
    field public static final java.lang.Character.UnicodeBlock HANGUL_JAMO_EXTENDED_B;
    field public static final java.lang.Character.UnicodeBlock HANGUL_SYLLABLES;
    field public static final java.lang.Character.UnicodeBlock HANUNOO;
    field public static final java.lang.Character.UnicodeBlock HEBREW;
    field public static final java.lang.Character.UnicodeBlock HIGH_PRIVATE_USE_SURROGATES;
    field public static final java.lang.Character.UnicodeBlock HIGH_SURROGATES;
    field public static final java.lang.Character.UnicodeBlock HIRAGANA;
    field public static final java.lang.Character.UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS;
    field public static final java.lang.Character.UnicodeBlock IMPERIAL_ARAMAIC;
    field public static final java.lang.Character.UnicodeBlock INSCRIPTIONAL_PAHLAVI;
    field public static final java.lang.Character.UnicodeBlock INSCRIPTIONAL_PARTHIAN;
    field public static final java.lang.Character.UnicodeBlock IPA_EXTENSIONS;
    field public static final java.lang.Character.UnicodeBlock JAVANESE;
    field public static final java.lang.Character.UnicodeBlock KAITHI;
    field public static final java.lang.Character.UnicodeBlock KANA_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock KANBUN;
    field public static final java.lang.Character.UnicodeBlock KANGXI_RADICALS;
    field public static final java.lang.Character.UnicodeBlock KANNADA;
    field public static final java.lang.Character.UnicodeBlock KATAKANA;
    field public static final java.lang.Character.UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS;
    field public static final java.lang.Character.UnicodeBlock KAYAH_LI;
    field public static final java.lang.Character.UnicodeBlock KHAROSHTHI;
    field public static final java.lang.Character.UnicodeBlock KHMER;
    field public static final java.lang.Character.UnicodeBlock KHMER_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock LAO;
    field public static final java.lang.Character.UnicodeBlock LATIN_1_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_A;
    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_ADDITIONAL;
    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_B;
    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_C;
    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_D;
    field public static final java.lang.Character.UnicodeBlock LEPCHA;
    field public static final java.lang.Character.UnicodeBlock LETTERLIKE_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock LIMBU;
    field public static final java.lang.Character.UnicodeBlock LINEAR_B_IDEOGRAMS;
    field public static final java.lang.Character.UnicodeBlock LINEAR_B_SYLLABARY;
    field public static final java.lang.Character.UnicodeBlock LISU;
    field public static final java.lang.Character.UnicodeBlock LOW_SURROGATES;
    field public static final java.lang.Character.UnicodeBlock LYCIAN;
    field public static final java.lang.Character.UnicodeBlock LYDIAN;
    field public static final java.lang.Character.UnicodeBlock MAHJONG_TILES;
    field public static final java.lang.Character.UnicodeBlock MALAYALAM;
    field public static final java.lang.Character.UnicodeBlock MANDAIC;
    field public static final java.lang.Character.UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock MATHEMATICAL_OPERATORS;
    field public static final java.lang.Character.UnicodeBlock MEETEI_MAYEK;
    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A;
    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B;
    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS;
    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS;
    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_TECHNICAL;
    field public static final java.lang.Character.UnicodeBlock MODIFIER_TONE_LETTERS;
    field public static final java.lang.Character.UnicodeBlock MONGOLIAN;
    field public static final java.lang.Character.UnicodeBlock MUSICAL_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock MYANMAR;
    field public static final java.lang.Character.UnicodeBlock MYANMAR_EXTENDED_A;
    field public static final java.lang.Character.UnicodeBlock NEW_TAI_LUE;
    field public static final java.lang.Character.UnicodeBlock NKO;
    field public static final java.lang.Character.UnicodeBlock NUMBER_FORMS;
    field public static final java.lang.Character.UnicodeBlock OGHAM;
    field public static final java.lang.Character.UnicodeBlock OLD_ITALIC;
    field public static final java.lang.Character.UnicodeBlock OLD_PERSIAN;
    field public static final java.lang.Character.UnicodeBlock OLD_SOUTH_ARABIAN;
    field public static final java.lang.Character.UnicodeBlock OLD_TURKIC;
    field public static final java.lang.Character.UnicodeBlock OL_CHIKI;
    field public static final java.lang.Character.UnicodeBlock OPTICAL_CHARACTER_RECOGNITION;
    field public static final java.lang.Character.UnicodeBlock ORIYA;
    field public static final java.lang.Character.UnicodeBlock OSMANYA;
    field public static final java.lang.Character.UnicodeBlock PHAGS_PA;
    field public static final java.lang.Character.UnicodeBlock PHAISTOS_DISC;
    field public static final java.lang.Character.UnicodeBlock PHOENICIAN;
    field public static final java.lang.Character.UnicodeBlock PHONETIC_EXTENSIONS;
    field public static final java.lang.Character.UnicodeBlock PHONETIC_EXTENSIONS_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock PLAYING_CARDS;
    field public static final java.lang.Character.UnicodeBlock PRIVATE_USE_AREA;
    field public static final java.lang.Character.UnicodeBlock REJANG;
    field public static final java.lang.Character.UnicodeBlock RUMI_NUMERAL_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock RUNIC;
    field public static final java.lang.Character.UnicodeBlock SAMARITAN;
    field public static final java.lang.Character.UnicodeBlock SAURASHTRA;
    field public static final java.lang.Character.UnicodeBlock SHAVIAN;
    field public static final java.lang.Character.UnicodeBlock SINHALA;
    field public static final java.lang.Character.UnicodeBlock SMALL_FORM_VARIANTS;
    field public static final java.lang.Character.UnicodeBlock SPACING_MODIFIER_LETTERS;
    field public static final java.lang.Character.UnicodeBlock SPECIALS;
    field public static final java.lang.Character.UnicodeBlock SUNDANESE;
    field public static final java.lang.Character.UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS;
    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_ARROWS_A;
    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_ARROWS_B;
    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS;
    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_PUNCTUATION;
    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A;
    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B;
    field public static final deprecated java.lang.Character.UnicodeBlock SURROGATES_AREA;
    field public static final java.lang.Character.UnicodeBlock SYLOTI_NAGRI;
    field public static final java.lang.Character.UnicodeBlock SYRIAC;
    field public static final java.lang.Character.UnicodeBlock TAGALOG;
    field public static final java.lang.Character.UnicodeBlock TAGBANWA;
    field public static final java.lang.Character.UnicodeBlock TAGS;
    field public static final java.lang.Character.UnicodeBlock TAI_LE;
    field public static final java.lang.Character.UnicodeBlock TAI_THAM;
    field public static final java.lang.Character.UnicodeBlock TAI_VIET;
    field public static final java.lang.Character.UnicodeBlock TAI_XUAN_JING_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock TAMIL;
    field public static final java.lang.Character.UnicodeBlock TELUGU;
    field public static final java.lang.Character.UnicodeBlock THAANA;
    field public static final java.lang.Character.UnicodeBlock THAI;
    field public static final java.lang.Character.UnicodeBlock TIBETAN;
    field public static final java.lang.Character.UnicodeBlock TIFINAGH;
    field public static final java.lang.Character.UnicodeBlock TRANSPORT_AND_MAP_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock UGARITIC;
    field public static final java.lang.Character.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS;
    field public static final java.lang.Character.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED;
    field public static final java.lang.Character.UnicodeBlock VAI;
    field public static final java.lang.Character.UnicodeBlock VARIATION_SELECTORS;
    field public static final java.lang.Character.UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT;
    field public static final java.lang.Character.UnicodeBlock VEDIC_EXTENSIONS;
    field public static final java.lang.Character.UnicodeBlock VERTICAL_FORMS;
    field public static final java.lang.Character.UnicodeBlock YIJING_HEXAGRAM_SYMBOLS;
    field public static final java.lang.Character.UnicodeBlock YI_RADICALS;
    field public static final java.lang.Character.UnicodeBlock YI_SYLLABLES;
  }

  public final class Class implements java.lang.reflect.AnnotatedElement java.lang.reflect.GenericDeclaration java.io.Serializable java.lang.reflect.Type {
    method public java.lang.Class<? extends U> asSubclass(java.lang.Class<U>);
    method public T cast(java.lang.Object);
    method public boolean desiredAssertionStatus();
    method public static java.lang.Class<?> forName(java.lang.String) throws java.lang.ClassNotFoundException;
    method public static java.lang.Class<?> forName(java.lang.String, boolean, java.lang.ClassLoader) throws java.lang.ClassNotFoundException;
    method public A getAnnotation(java.lang.Class<A>);
    method public java.lang.annotation.Annotation[] getAnnotations();
    method public java.lang.String getCanonicalName();
    method public java.lang.ClassLoader getClassLoader();
    method public java.lang.Class<?>[] getClasses();
    method public java.lang.Class<?> getComponentType();
    method public java.lang.reflect.Constructor<T> getConstructor(java.lang.Class<?>...) throws java.lang.NoSuchMethodException;
    method public java.lang.reflect.Constructor<?>[] getConstructors();
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public java.lang.Class<?>[] getDeclaredClasses();
    method public java.lang.reflect.Constructor<T> getDeclaredConstructor(java.lang.Class<?>...) throws java.lang.NoSuchMethodException;
    method public java.lang.reflect.Constructor<?>[] getDeclaredConstructors();
    method public java.lang.reflect.Field getDeclaredField(java.lang.String) throws java.lang.NoSuchFieldException;
    method public java.lang.reflect.Field[] getDeclaredFields();
    method public java.lang.reflect.Method getDeclaredMethod(java.lang.String, java.lang.Class<?>...) throws java.lang.NoSuchMethodException;
    method public java.lang.reflect.Method[] getDeclaredMethods();
    method public java.lang.Class<?> getDeclaringClass();
    method public java.lang.Class<?> getEnclosingClass();
    method public java.lang.reflect.Constructor<?> getEnclosingConstructor();
    method public java.lang.reflect.Method getEnclosingMethod();
    method public T[] getEnumConstants();
    method public java.lang.reflect.Field getField(java.lang.String) throws java.lang.NoSuchFieldException;
    method public java.lang.reflect.Field[] getFields();
    method public java.lang.reflect.Type[] getGenericInterfaces();
    method public java.lang.reflect.Type getGenericSuperclass();
    method public java.lang.Class<?>[] getInterfaces();
    method public java.lang.reflect.Method getMethod(java.lang.String, java.lang.Class<?>...) throws java.lang.NoSuchMethodException;
    method public java.lang.reflect.Method[] getMethods();
    method public int getModifiers();
    method public java.lang.String getName();
    method public java.lang.Package getPackage();
    method public java.security.ProtectionDomain getProtectionDomain();
    method public java.net.URL getResource(java.lang.String);
    method public java.io.InputStream getResourceAsStream(java.lang.String);
    method public java.lang.Object[] getSigners();
    method public java.lang.String getSimpleName();
    method public java.lang.Class<? super T> getSuperclass();
    method public synchronized java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters();
    method public boolean isAnnotation();
    method public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>);
    method public boolean isAnonymousClass();
    method public boolean isArray();
    method public boolean isAssignableFrom(java.lang.Class<?>);
    method public boolean isEnum();
    method public boolean isInstance(java.lang.Object);
    method public boolean isInterface();
    method public boolean isLocalClass();
    method public boolean isMemberClass();
    method public boolean isPrimitive();
    method public boolean isSynthetic();
    method public T newInstance() throws java.lang.IllegalAccessException, java.lang.InstantiationException;
  }

  public class ClassCastException extends java.lang.RuntimeException {
    ctor public ClassCastException();
    ctor public ClassCastException(java.lang.String);
  }

  public class ClassCircularityError extends java.lang.LinkageError {
    ctor public ClassCircularityError();
    ctor public ClassCircularityError(java.lang.String);
  }

  public class ClassFormatError extends java.lang.LinkageError {
    ctor public ClassFormatError();
    ctor public ClassFormatError(java.lang.String);
  }

  public abstract class ClassLoader {
    ctor protected ClassLoader();
    ctor protected ClassLoader(java.lang.ClassLoader);
    method public void clearAssertionStatus();
    method protected final deprecated java.lang.Class<?> defineClass(byte[], int, int) throws java.lang.ClassFormatError;
    method protected final java.lang.Class<?> defineClass(java.lang.String, byte[], int, int) throws java.lang.ClassFormatError;
    method protected final java.lang.Class<?> defineClass(java.lang.String, byte[], int, int, java.security.ProtectionDomain) throws java.lang.ClassFormatError;
    method protected final java.lang.Class<?> defineClass(java.lang.String, java.nio.ByteBuffer, java.security.ProtectionDomain) throws java.lang.ClassFormatError;
    method protected java.lang.Package definePackage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.net.URL) throws java.lang.IllegalArgumentException;
    method protected java.lang.Class<?> findClass(java.lang.String) throws java.lang.ClassNotFoundException;
    method protected java.lang.String findLibrary(java.lang.String);
    method protected final java.lang.Class<?> findLoadedClass(java.lang.String);
    method protected java.net.URL findResource(java.lang.String);
    method protected java.util.Enumeration<java.net.URL> findResources(java.lang.String) throws java.io.IOException;
    method protected final java.lang.Class<?> findSystemClass(java.lang.String) throws java.lang.ClassNotFoundException;
    method protected java.lang.Package getPackage(java.lang.String);
    method protected java.lang.Package[] getPackages();
    method public final java.lang.ClassLoader getParent();
    method public java.net.URL getResource(java.lang.String);
    method public java.io.InputStream getResourceAsStream(java.lang.String);
    method public java.util.Enumeration<java.net.URL> getResources(java.lang.String) throws java.io.IOException;
    method public static java.lang.ClassLoader getSystemClassLoader();
    method public static java.net.URL getSystemResource(java.lang.String);
    method public static java.io.InputStream getSystemResourceAsStream(java.lang.String);
    method public static java.util.Enumeration<java.net.URL> getSystemResources(java.lang.String) throws java.io.IOException;
    method public java.lang.Class<?> loadClass(java.lang.String) throws java.lang.ClassNotFoundException;
    method protected java.lang.Class<?> loadClass(java.lang.String, boolean) throws java.lang.ClassNotFoundException;
    method protected final void resolveClass(java.lang.Class<?>);
    method public void setClassAssertionStatus(java.lang.String, boolean);
    method public void setDefaultAssertionStatus(boolean);
    method public void setPackageAssertionStatus(java.lang.String, boolean);
    method protected final void setSigners(java.lang.Class<?>, java.lang.Object[]);
  }

  public class ClassNotFoundException extends java.lang.ReflectiveOperationException {
    ctor public ClassNotFoundException();
    ctor public ClassNotFoundException(java.lang.String);
    ctor public ClassNotFoundException(java.lang.String, java.lang.Throwable);
    method public java.lang.Throwable getException();
  }

  public class CloneNotSupportedException extends java.lang.Exception {
    ctor public CloneNotSupportedException();
    ctor public CloneNotSupportedException(java.lang.String);
  }

  public abstract interface Cloneable {
  }

  public abstract interface Comparable {
    method public abstract int compareTo(T);
  }

  public final class Compiler {
    method public static java.lang.Object command(java.lang.Object);
    method public static boolean compileClass(java.lang.Class<?>);
    method public static boolean compileClasses(java.lang.String);
    method public static void disable();
    method public static void enable();
  }

  public abstract class Deprecated implements java.lang.annotation.Annotation {
  }

  public final class Double extends java.lang.Number implements java.lang.Comparable {
    ctor public Double(double);
    ctor public Double(java.lang.String) throws java.lang.NumberFormatException;
    method public static int compare(double, double);
    method public int compareTo(java.lang.Double);
    method public static long doubleToLongBits(double);
    method public static long doubleToRawLongBits(double);
    method public double doubleValue();
    method public float floatValue();
    method public int intValue();
    method public boolean isInfinite();
    method public static boolean isInfinite(double);
    method public boolean isNaN();
    method public static boolean isNaN(double);
    method public static double longBitsToDouble(long);
    method public long longValue();
    method public static double parseDouble(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.String toHexString(double);
    method public static java.lang.String toString(double);
    method public static java.lang.Double valueOf(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.Double valueOf(double);
    field public static final int MAX_EXPONENT = 1023; // 0x3ff
    field public static final double MAX_VALUE = 1.7976931348623157E308;
    field public static final int MIN_EXPONENT = -1022; // 0xfffffc02
    field public static final double MIN_NORMAL = 2.2250738585072014E-308;
    field public static final double MIN_VALUE = 4.9E-324;
    field public static final double NEGATIVE_INFINITY = (-1.0/0.0);
    field public static final double NaN = (0.0/0.0);
    field public static final double POSITIVE_INFINITY = (1.0/0.0);
    field public static final int SIZE = 64; // 0x40
    field public static final java.lang.Class<java.lang.Double> TYPE;
  }

  public abstract class Enum implements java.lang.Comparable java.io.Serializable {
    ctor protected Enum(java.lang.String, int);
    method protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method public final int compareTo(E);
    method public final boolean equals(java.lang.Object);
    method protected final void finalize();
    method public final java.lang.Class<E> getDeclaringClass();
    method public final int hashCode();
    method public final java.lang.String name();
    method public final int ordinal();
    method public static T valueOf(java.lang.Class<T>, java.lang.String);
  }

  public class EnumConstantNotPresentException extends java.lang.RuntimeException {
    ctor public EnumConstantNotPresentException(java.lang.Class<? extends java.lang.Enum>, java.lang.String);
    method public java.lang.String constantName();
    method public java.lang.Class<? extends java.lang.Enum> enumType();
  }

  public class Error extends java.lang.Throwable {
    ctor public Error();
    ctor public Error(java.lang.String);
    ctor public Error(java.lang.String, java.lang.Throwable);
    ctor public Error(java.lang.Throwable);
  }

  public class Exception extends java.lang.Throwable {
    ctor public Exception();
    ctor public Exception(java.lang.String);
    ctor public Exception(java.lang.String, java.lang.Throwable);
    ctor public Exception(java.lang.Throwable);
  }

  public class ExceptionInInitializerError extends java.lang.LinkageError {
    ctor public ExceptionInInitializerError();
    ctor public ExceptionInInitializerError(java.lang.String);
    ctor public ExceptionInInitializerError(java.lang.Throwable);
    method public java.lang.Throwable getException();
  }

  public final class Float extends java.lang.Number implements java.lang.Comparable {
    ctor public Float(float);
    ctor public Float(double);
    ctor public Float(java.lang.String) throws java.lang.NumberFormatException;
    method public static int compare(float, float);
    method public int compareTo(java.lang.Float);
    method public double doubleValue();
    method public static int floatToIntBits(float);
    method public static int floatToRawIntBits(float);
    method public float floatValue();
    method public static float intBitsToFloat(int);
    method public int intValue();
    method public boolean isInfinite();
    method public static boolean isInfinite(float);
    method public boolean isNaN();
    method public static boolean isNaN(float);
    method public long longValue();
    method public static float parseFloat(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.String toHexString(float);
    method public static java.lang.String toString(float);
    method public static java.lang.Float valueOf(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.Float valueOf(float);
    field public static final int MAX_EXPONENT = 127; // 0x7f
    field public static final float MAX_VALUE = 3.4028235E38f;
    field public static final int MIN_EXPONENT = -126; // 0xffffff82
    field public static final float MIN_NORMAL = 1.17549435E-38f;
    field public static final float MIN_VALUE = 1.4E-45f;
    field public static final float NEGATIVE_INFINITY = (-1.0f/0.0f);
    field public static final float NaN = (0.0f/0.0f);
    field public static final float POSITIVE_INFINITY = (1.0f/0.0f);
    field public static final int SIZE = 32; // 0x20
    field public static final java.lang.Class<java.lang.Float> TYPE;
  }

  public class IllegalAccessError extends java.lang.IncompatibleClassChangeError {
    ctor public IllegalAccessError();
    ctor public IllegalAccessError(java.lang.String);
  }

  public class IllegalAccessException extends java.lang.ReflectiveOperationException {
    ctor public IllegalAccessException();
    ctor public IllegalAccessException(java.lang.String);
  }

  public class IllegalArgumentException extends java.lang.RuntimeException {
    ctor public IllegalArgumentException();
    ctor public IllegalArgumentException(java.lang.String);
    ctor public IllegalArgumentException(java.lang.String, java.lang.Throwable);
    ctor public IllegalArgumentException(java.lang.Throwable);
  }

  public class IllegalMonitorStateException extends java.lang.RuntimeException {
    ctor public IllegalMonitorStateException();
    ctor public IllegalMonitorStateException(java.lang.String);
  }

  public class IllegalStateException extends java.lang.RuntimeException {
    ctor public IllegalStateException();
    ctor public IllegalStateException(java.lang.String);
    ctor public IllegalStateException(java.lang.String, java.lang.Throwable);
    ctor public IllegalStateException(java.lang.Throwable);
  }

  public class IllegalThreadStateException extends java.lang.IllegalArgumentException {
    ctor public IllegalThreadStateException();
    ctor public IllegalThreadStateException(java.lang.String);
  }

  public class IncompatibleClassChangeError extends java.lang.LinkageError {
    ctor public IncompatibleClassChangeError();
    ctor public IncompatibleClassChangeError(java.lang.String);
  }

  public class IndexOutOfBoundsException extends java.lang.RuntimeException {
    ctor public IndexOutOfBoundsException();
    ctor public IndexOutOfBoundsException(java.lang.String);
  }

  public class InheritableThreadLocal extends java.lang.ThreadLocal {
    ctor public InheritableThreadLocal();
    method protected T childValue(T);
  }

  public class InstantiationError extends java.lang.IncompatibleClassChangeError {
    ctor public InstantiationError();
    ctor public InstantiationError(java.lang.String);
  }

  public class InstantiationException extends java.lang.ReflectiveOperationException {
    ctor public InstantiationException();
    ctor public InstantiationException(java.lang.String);
  }

  public final class Integer extends java.lang.Number implements java.lang.Comparable {
    ctor public Integer(int);
    ctor public Integer(java.lang.String) throws java.lang.NumberFormatException;
    method public static int bitCount(int);
    method public static int compare(int, int);
    method public int compareTo(java.lang.Integer);
    method public static java.lang.Integer decode(java.lang.String) throws java.lang.NumberFormatException;
    method public double doubleValue();
    method public float floatValue();
    method public static java.lang.Integer getInteger(java.lang.String);
    method public static java.lang.Integer getInteger(java.lang.String, int);
    method public static java.lang.Integer getInteger(java.lang.String, java.lang.Integer);
    method public static int highestOneBit(int);
    method public int intValue();
    method public long longValue();
    method public static int lowestOneBit(int);
    method public static int numberOfLeadingZeros(int);
    method public static int numberOfTrailingZeros(int);
    method public static int parseInt(java.lang.String) throws java.lang.NumberFormatException;
    method public static int parseInt(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static int reverse(int);
    method public static int reverseBytes(int);
    method public static int rotateLeft(int, int);
    method public static int rotateRight(int, int);
    method public static int signum(int);
    method public static java.lang.String toBinaryString(int);
    method public static java.lang.String toHexString(int);
    method public static java.lang.String toOctalString(int);
    method public static java.lang.String toString(int);
    method public static java.lang.String toString(int, int);
    method public static java.lang.Integer valueOf(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.Integer valueOf(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.Integer valueOf(int);
    field public static final int MAX_VALUE = 2147483647; // 0x7fffffff
    field public static final int MIN_VALUE = -2147483648; // 0x80000000
    field public static final int SIZE = 32; // 0x20
    field public static final java.lang.Class<java.lang.Integer> TYPE;
  }

  public class InternalError extends java.lang.VirtualMachineError {
    ctor public InternalError();
    ctor public InternalError(java.lang.String);
  }

  public class InterruptedException extends java.lang.Exception {
    ctor public InterruptedException();
    ctor public InterruptedException(java.lang.String);
  }

  public abstract interface Iterable {
    method public abstract java.util.Iterator<T> iterator();
  }

  public class LinkageError extends java.lang.Error {
    ctor public LinkageError();
    ctor public LinkageError(java.lang.String);
    ctor public LinkageError(java.lang.String, java.lang.Throwable);
  }

  public final class Long extends java.lang.Number implements java.lang.Comparable {
    ctor public Long(long);
    ctor public Long(java.lang.String) throws java.lang.NumberFormatException;
    method public static int bitCount(long);
    method public static int compare(long, long);
    method public int compareTo(java.lang.Long);
    method public static java.lang.Long decode(java.lang.String) throws java.lang.NumberFormatException;
    method public double doubleValue();
    method public float floatValue();
    method public static java.lang.Long getLong(java.lang.String);
    method public static java.lang.Long getLong(java.lang.String, long);
    method public static java.lang.Long getLong(java.lang.String, java.lang.Long);
    method public static long highestOneBit(long);
    method public int intValue();
    method public long longValue();
    method public static long lowestOneBit(long);
    method public static int numberOfLeadingZeros(long);
    method public static int numberOfTrailingZeros(long);
    method public static long parseLong(java.lang.String) throws java.lang.NumberFormatException;
    method public static long parseLong(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static long reverse(long);
    method public static long reverseBytes(long);
    method public static long rotateLeft(long, int);
    method public static long rotateRight(long, int);
    method public static int signum(long);
    method public static java.lang.String toBinaryString(long);
    method public static java.lang.String toHexString(long);
    method public static java.lang.String toOctalString(long);
    method public static java.lang.String toString(long);
    method public static java.lang.String toString(long, int);
    method public static java.lang.Long valueOf(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.Long valueOf(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.Long valueOf(long);
    field public static final long MAX_VALUE = 9223372036854775807L; // 0x7fffffffffffffffL
    field public static final long MIN_VALUE = -9223372036854775808L; // 0x8000000000000000L
    field public static final int SIZE = 64; // 0x40
    field public static final java.lang.Class<java.lang.Long> TYPE;
  }

  public final class Math {
    method public static double IEEEremainder(double, double);
    method public static double abs(double);
    method public static float abs(float);
    method public static int abs(int);
    method public static long abs(long);
    method public static double acos(double);
    method public static double asin(double);
    method public static double atan(double);
    method public static double atan2(double, double);
    method public static double cbrt(double);
    method public static double ceil(double);
    method public static double copySign(double, double);
    method public static float copySign(float, float);
    method public static double cos(double);
    method public static double cosh(double);
    method public static double exp(double);
    method public static double expm1(double);
    method public static double floor(double);
    method public static int getExponent(float);
    method public static int getExponent(double);
    method public static double hypot(double, double);
    method public static double log(double);
    method public static double log10(double);
    method public static double log1p(double);
    method public static double max(double, double);
    method public static float max(float, float);
    method public static int max(int, int);
    method public static long max(long, long);
    method public static double min(double, double);
    method public static float min(float, float);
    method public static int min(int, int);
    method public static long min(long, long);
    method public static double nextAfter(double, double);
    method public static float nextAfter(float, double);
    method public static double nextUp(double);
    method public static float nextUp(float);
    method public static double pow(double, double);
    method public static double random();
    method public static double rint(double);
    method public static long round(double);
    method public static int round(float);
    method public static double scalb(double, int);
    method public static float scalb(float, int);
    method public static double signum(double);
    method public static float signum(float);
    method public static double sin(double);
    method public static double sinh(double);
    method public static double sqrt(double);
    method public static double tan(double);
    method public static double tanh(double);
    method public static double toDegrees(double);
    method public static double toRadians(double);
    method public static double ulp(double);
    method public static float ulp(float);
    field public static final double E = 2.718281828459045;
    field public static final double PI = 3.141592653589793;
  }

  public class NegativeArraySizeException extends java.lang.RuntimeException {
    ctor public NegativeArraySizeException();
    ctor public NegativeArraySizeException(java.lang.String);
  }

  public class NoClassDefFoundError extends java.lang.LinkageError {
    ctor public NoClassDefFoundError();
    ctor public NoClassDefFoundError(java.lang.String);
  }

  public class NoSuchFieldError extends java.lang.IncompatibleClassChangeError {
    ctor public NoSuchFieldError();
    ctor public NoSuchFieldError(java.lang.String);
  }

  public class NoSuchFieldException extends java.lang.ReflectiveOperationException {
    ctor public NoSuchFieldException();
    ctor public NoSuchFieldException(java.lang.String);
  }

  public class NoSuchMethodError extends java.lang.IncompatibleClassChangeError {
    ctor public NoSuchMethodError();
    ctor public NoSuchMethodError(java.lang.String);
  }

  public class NoSuchMethodException extends java.lang.ReflectiveOperationException {
    ctor public NoSuchMethodException();
    ctor public NoSuchMethodException(java.lang.String);
  }

  public class NullPointerException extends java.lang.RuntimeException {
    ctor public NullPointerException();
    ctor public NullPointerException(java.lang.String);
  }

  public abstract class Number implements java.io.Serializable {
    ctor public Number();
    method public byte byteValue();
    method public abstract double doubleValue();
    method public abstract float floatValue();
    method public abstract int intValue();
    method public abstract long longValue();
    method public short shortValue();
  }

  public class NumberFormatException extends java.lang.IllegalArgumentException {
    ctor public NumberFormatException();
    ctor public NumberFormatException(java.lang.String);
  }

  public class Object {
    ctor public Object();
    method protected java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method public boolean equals(java.lang.Object);
    method protected void finalize() throws java.lang.Throwable;
    method public final java.lang.Class<?> getClass();
    method public int hashCode();
    method public final void notify();
    method public final void notifyAll();
    method public java.lang.String toString();
    method public final void wait() throws java.lang.InterruptedException;
    method public final void wait(long) throws java.lang.InterruptedException;
    method public final void wait(long, int) throws java.lang.InterruptedException;
  }

  public class OutOfMemoryError extends java.lang.VirtualMachineError {
    ctor public OutOfMemoryError();
    ctor public OutOfMemoryError(java.lang.String);
  }

  public abstract class Override implements java.lang.annotation.Annotation {
  }

  public class Package implements java.lang.reflect.AnnotatedElement {
    method public A getAnnotation(java.lang.Class<A>);
    method public java.lang.annotation.Annotation[] getAnnotations();
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public java.lang.String getImplementationTitle();
    method public java.lang.String getImplementationVendor();
    method public java.lang.String getImplementationVersion();
    method public java.lang.String getName();
    method public static java.lang.Package getPackage(java.lang.String);
    method public static java.lang.Package[] getPackages();
    method public java.lang.String getSpecificationTitle();
    method public java.lang.String getSpecificationVendor();
    method public java.lang.String getSpecificationVersion();
    method public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>);
    method public boolean isCompatibleWith(java.lang.String) throws java.lang.NumberFormatException;
    method public boolean isSealed();
    method public boolean isSealed(java.net.URL);
  }

  public abstract class Process {
    ctor public Process();
    method public abstract void destroy();
    method public abstract int exitValue();
    method public abstract java.io.InputStream getErrorStream();
    method public abstract java.io.InputStream getInputStream();
    method public abstract java.io.OutputStream getOutputStream();
    method public abstract int waitFor() throws java.lang.InterruptedException;
  }

  public final class ProcessBuilder {
    ctor public ProcessBuilder(java.lang.String...);
    ctor public ProcessBuilder(java.util.List<java.lang.String>);
    method public java.util.List<java.lang.String> command();
    method public java.lang.ProcessBuilder command(java.lang.String...);
    method public java.lang.ProcessBuilder command(java.util.List<java.lang.String>);
    method public java.io.File directory();
    method public java.lang.ProcessBuilder directory(java.io.File);
    method public java.util.Map<java.lang.String, java.lang.String> environment();
    method public boolean redirectErrorStream();
    method public java.lang.ProcessBuilder redirectErrorStream(boolean);
    method public java.lang.Process start() throws java.io.IOException;
  }

  public abstract interface Readable {
    method public abstract int read(java.nio.CharBuffer) throws java.io.IOException;
  }

  public class ReflectiveOperationException extends java.lang.Exception {
    ctor public ReflectiveOperationException();
    ctor public ReflectiveOperationException(java.lang.String);
    ctor public ReflectiveOperationException(java.lang.Throwable);
    ctor public ReflectiveOperationException(java.lang.String, java.lang.Throwable);
  }

  public abstract interface Runnable {
    method public abstract void run();
  }

  public class Runtime {
    method public void addShutdownHook(java.lang.Thread);
    method public int availableProcessors();
    method public java.lang.Process exec(java.lang.String[]) throws java.io.IOException;
    method public java.lang.Process exec(java.lang.String[], java.lang.String[]) throws java.io.IOException;
    method public java.lang.Process exec(java.lang.String[], java.lang.String[], java.io.File) throws java.io.IOException;
    method public java.lang.Process exec(java.lang.String) throws java.io.IOException;
    method public java.lang.Process exec(java.lang.String, java.lang.String[]) throws java.io.IOException;
    method public java.lang.Process exec(java.lang.String, java.lang.String[], java.io.File) throws java.io.IOException;
    method public void exit(int);
    method public long freeMemory();
    method public void gc();
    method public deprecated java.io.InputStream getLocalizedInputStream(java.io.InputStream);
    method public deprecated java.io.OutputStream getLocalizedOutputStream(java.io.OutputStream);
    method public static java.lang.Runtime getRuntime();
    method public void halt(int);
    method public void load(java.lang.String);
    method public void loadLibrary(java.lang.String);
    method public long maxMemory();
    method public boolean removeShutdownHook(java.lang.Thread);
    method public void runFinalization();
    method public static deprecated void runFinalizersOnExit(boolean);
    method public long totalMemory();
    method public void traceInstructions(boolean);
    method public void traceMethodCalls(boolean);
  }

  public class RuntimeException extends java.lang.Exception {
    ctor public RuntimeException();
    ctor public RuntimeException(java.lang.String);
    ctor public RuntimeException(java.lang.String, java.lang.Throwable);
    ctor public RuntimeException(java.lang.Throwable);
  }

  public final class RuntimePermission extends java.security.BasicPermission {
    ctor public RuntimePermission(java.lang.String);
    ctor public RuntimePermission(java.lang.String, java.lang.String);
  }

  public abstract class SafeVarargs implements java.lang.annotation.Annotation {
  }

  public class SecurityException extends java.lang.RuntimeException {
    ctor public SecurityException();
    ctor public SecurityException(java.lang.String);
    ctor public SecurityException(java.lang.String, java.lang.Throwable);
    ctor public SecurityException(java.lang.Throwable);
  }

  public class SecurityManager {
    ctor public SecurityManager();
    method public void checkAccept(java.lang.String, int);
    method public void checkAccess(java.lang.Thread);
    method public void checkAccess(java.lang.ThreadGroup);
    method public void checkAwtEventQueueAccess();
    method public void checkConnect(java.lang.String, int);
    method public void checkConnect(java.lang.String, int, java.lang.Object);
    method public void checkCreateClassLoader();
    method public void checkDelete(java.lang.String);
    method public void checkExec(java.lang.String);
    method public void checkExit(int);
    method public void checkLink(java.lang.String);
    method public void checkListen(int);
    method public void checkMemberAccess(java.lang.Class<?>, int);
    method public void checkMulticast(java.net.InetAddress);
    method public deprecated void checkMulticast(java.net.InetAddress, byte);
    method public void checkPackageAccess(java.lang.String);
    method public void checkPackageDefinition(java.lang.String);
    method public void checkPermission(java.security.Permission);
    method public void checkPermission(java.security.Permission, java.lang.Object);
    method public void checkPrintJobAccess();
    method public void checkPropertiesAccess();
    method public void checkPropertyAccess(java.lang.String);
    method public void checkRead(java.io.FileDescriptor);
    method public void checkRead(java.lang.String);
    method public void checkRead(java.lang.String, java.lang.Object);
    method public void checkSecurityAccess(java.lang.String);
    method public void checkSetFactory();
    method public void checkSystemClipboardAccess();
    method public boolean checkTopLevelWindow(java.lang.Object);
    method public void checkWrite(java.io.FileDescriptor);
    method public void checkWrite(java.lang.String);
    method protected deprecated int classDepth(java.lang.String);
    method protected deprecated int classLoaderDepth();
    method protected deprecated java.lang.ClassLoader currentClassLoader();
    method protected deprecated java.lang.Class<?> currentLoadedClass();
    method protected java.lang.Class[] getClassContext();
    method public deprecated boolean getInCheck();
    method public java.lang.Object getSecurityContext();
    method public java.lang.ThreadGroup getThreadGroup();
    method protected deprecated boolean inClass(java.lang.String);
    method protected deprecated boolean inClassLoader();
    field protected deprecated boolean inCheck;
  }

  public final class Short extends java.lang.Number implements java.lang.Comparable {
    ctor public Short(java.lang.String) throws java.lang.NumberFormatException;
    ctor public Short(short);
    method public static int compare(short, short);
    method public int compareTo(java.lang.Short);
    method public static java.lang.Short decode(java.lang.String) throws java.lang.NumberFormatException;
    method public double doubleValue();
    method public float floatValue();
    method public int intValue();
    method public long longValue();
    method public static short parseShort(java.lang.String) throws java.lang.NumberFormatException;
    method public static short parseShort(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static short reverseBytes(short);
    method public static java.lang.String toString(short);
    method public static java.lang.Short valueOf(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.Short valueOf(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.Short valueOf(short);
    field public static final short MAX_VALUE = 32767; // 0x7fff
    field public static final short MIN_VALUE = -32768; // 0xffff8000
    field public static final int SIZE = 16; // 0x10
    field public static final java.lang.Class<java.lang.Short> TYPE;
  }

  public class StackOverflowError extends java.lang.VirtualMachineError {
    ctor public StackOverflowError();
    ctor public StackOverflowError(java.lang.String);
  }

  public final class StackTraceElement implements java.io.Serializable {
    ctor public StackTraceElement(java.lang.String, java.lang.String, java.lang.String, int);
    method public java.lang.String getClassName();
    method public java.lang.String getFileName();
    method public int getLineNumber();
    method public java.lang.String getMethodName();
    method public boolean isNativeMethod();
  }

  public final class StrictMath {
    method public static double IEEEremainder(double, double);
    method public static double abs(double);
    method public static float abs(float);
    method public static int abs(int);
    method public static long abs(long);
    method public static double acos(double);
    method public static double asin(double);
    method public static double atan(double);
    method public static double atan2(double, double);
    method public static double cbrt(double);
    method public static double ceil(double);
    method public static double copySign(double, double);
    method public static float copySign(float, float);
    method public static double cos(double);
    method public static double cosh(double);
    method public static double exp(double);
    method public static double expm1(double);
    method public static double floor(double);
    method public static int getExponent(float);
    method public static int getExponent(double);
    method public static double hypot(double, double);
    method public static double log(double);
    method public static double log10(double);
    method public static double log1p(double);
    method public static double max(double, double);
    method public static float max(float, float);
    method public static int max(int, int);
    method public static long max(long, long);
    method public static double min(double, double);
    method public static float min(float, float);
    method public static int min(int, int);
    method public static long min(long, long);
    method public static double nextAfter(double, double);
    method public static float nextAfter(float, double);
    method public static double nextUp(double);
    method public static float nextUp(float);
    method public static double pow(double, double);
    method public static double random();
    method public static double rint(double);
    method public static long round(double);
    method public static int round(float);
    method public static double scalb(double, int);
    method public static float scalb(float, int);
    method public static double signum(double);
    method public static float signum(float);
    method public static double sin(double);
    method public static double sinh(double);
    method public static double sqrt(double);
    method public static double tan(double);
    method public static double tanh(double);
    method public static double toDegrees(double);
    method public static double toRadians(double);
    method public static double ulp(double);
    method public static float ulp(float);
    field public static final double E = 2.718281828459045;
    field public static final double PI = 3.141592653589793;
  }

  public final class String implements java.lang.CharSequence java.lang.Comparable java.io.Serializable {
    ctor public String();
    ctor public String(byte[]);
    ctor public deprecated String(byte[], int);
    ctor public String(byte[], int, int);
    ctor public deprecated String(byte[], int, int, int);
    ctor public String(byte[], int, int, java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public String(byte[], java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public String(byte[], int, int, java.nio.charset.Charset);
    ctor public String(byte[], java.nio.charset.Charset);
    ctor public String(char[]);
    ctor public String(char[], int, int);
    ctor public String(java.lang.String);
    ctor public String(java.lang.StringBuffer);
    ctor public String(int[], int, int);
    ctor public String(java.lang.StringBuilder);
    method public char charAt(int);
    method public int codePointAt(int);
    method public int codePointBefore(int);
    method public int codePointCount(int, int);
    method public int compareTo(java.lang.String);
    method public int compareToIgnoreCase(java.lang.String);
    method public java.lang.String concat(java.lang.String);
    method public boolean contains(java.lang.CharSequence);
    method public boolean contentEquals(java.lang.StringBuffer);
    method public boolean contentEquals(java.lang.CharSequence);
    method public static java.lang.String copyValueOf(char[]);
    method public static java.lang.String copyValueOf(char[], int, int);
    method public boolean endsWith(java.lang.String);
    method public boolean equalsIgnoreCase(java.lang.String);
    method public static java.lang.String format(java.lang.String, java.lang.Object...);
    method public static java.lang.String format(java.util.Locale, java.lang.String, java.lang.Object...);
    method public deprecated void getBytes(int, int, byte[], int);
    method public byte[] getBytes();
    method public byte[] getBytes(java.lang.String) throws java.io.UnsupportedEncodingException;
    method public byte[] getBytes(java.nio.charset.Charset);
    method public void getChars(int, int, char[], int);
    method public int indexOf(int);
    method public int indexOf(int, int);
    method public int indexOf(java.lang.String);
    method public int indexOf(java.lang.String, int);
    method public java.lang.String intern();
    method public boolean isEmpty();
    method public int lastIndexOf(int);
    method public int lastIndexOf(int, int);
    method public int lastIndexOf(java.lang.String);
    method public int lastIndexOf(java.lang.String, int);
    method public int length();
    method public boolean matches(java.lang.String);
    method public int offsetByCodePoints(int, int);
    method public boolean regionMatches(int, java.lang.String, int, int);
    method public boolean regionMatches(boolean, int, java.lang.String, int, int);
    method public java.lang.String replace(char, char);
    method public java.lang.String replace(java.lang.CharSequence, java.lang.CharSequence);
    method public java.lang.String replaceAll(java.lang.String, java.lang.String);
    method public java.lang.String replaceFirst(java.lang.String, java.lang.String);
    method public java.lang.String[] split(java.lang.String);
    method public java.lang.String[] split(java.lang.String, int);
    method public boolean startsWith(java.lang.String);
    method public boolean startsWith(java.lang.String, int);
    method public java.lang.CharSequence subSequence(int, int);
    method public java.lang.String substring(int);
    method public java.lang.String substring(int, int);
    method public char[] toCharArray();
    method public java.lang.String toLowerCase();
    method public java.lang.String toLowerCase(java.util.Locale);
    method public java.lang.String toUpperCase();
    method public java.lang.String toUpperCase(java.util.Locale);
    method public java.lang.String trim();
    method public static java.lang.String valueOf(char[]);
    method public static java.lang.String valueOf(char[], int, int);
    method public static java.lang.String valueOf(char);
    method public static java.lang.String valueOf(double);
    method public static java.lang.String valueOf(float);
    method public static java.lang.String valueOf(int);
    method public static java.lang.String valueOf(long);
    method public static java.lang.String valueOf(java.lang.Object);
    method public static java.lang.String valueOf(boolean);
    field public static final java.util.Comparator<java.lang.String> CASE_INSENSITIVE_ORDER;
  }

  public final class StringBuffer extends java.lang.AbstractStringBuilder implements java.lang.Appendable java.lang.CharSequence java.io.Serializable {
    ctor public StringBuffer();
    ctor public StringBuffer(int);
    ctor public StringBuffer(java.lang.String);
    ctor public StringBuffer(java.lang.CharSequence);
    method public java.lang.StringBuffer append(boolean);
    method public synchronized java.lang.StringBuffer append(char);
    method public java.lang.StringBuffer append(double);
    method public java.lang.StringBuffer append(float);
    method public java.lang.StringBuffer append(int);
    method public java.lang.StringBuffer append(long);
    method public synchronized java.lang.StringBuffer append(java.lang.Object);
    method public synchronized java.lang.StringBuffer append(java.lang.String);
    method public synchronized java.lang.StringBuffer append(java.lang.StringBuffer);
    method public synchronized java.lang.StringBuffer append(char[]);
    method public synchronized java.lang.StringBuffer append(char[], int, int);
    method public synchronized java.lang.StringBuffer append(java.lang.CharSequence);
    method public synchronized java.lang.StringBuffer append(java.lang.CharSequence, int, int);
    method public java.lang.StringBuffer appendCodePoint(int);
    method public synchronized java.lang.StringBuffer delete(int, int);
    method public synchronized java.lang.StringBuffer deleteCharAt(int);
    method public synchronized java.lang.StringBuffer insert(int, char);
    method public java.lang.StringBuffer insert(int, boolean);
    method public java.lang.StringBuffer insert(int, int);
    method public java.lang.StringBuffer insert(int, long);
    method public java.lang.StringBuffer insert(int, double);
    method public java.lang.StringBuffer insert(int, float);
    method public java.lang.StringBuffer insert(int, java.lang.Object);
    method public synchronized java.lang.StringBuffer insert(int, java.lang.String);
    method public synchronized java.lang.StringBuffer insert(int, char[]);
    method public synchronized java.lang.StringBuffer insert(int, char[], int, int);
    method public synchronized java.lang.StringBuffer insert(int, java.lang.CharSequence);
    method public synchronized java.lang.StringBuffer insert(int, java.lang.CharSequence, int, int);
    method public synchronized java.lang.StringBuffer replace(int, int, java.lang.String);
    method public synchronized java.lang.StringBuffer reverse();
  }

  public final class StringBuilder extends java.lang.AbstractStringBuilder implements java.lang.Appendable java.lang.CharSequence java.io.Serializable {
    ctor public StringBuilder();
    ctor public StringBuilder(int);
    ctor public StringBuilder(java.lang.CharSequence);
    ctor public StringBuilder(java.lang.String);
    method public java.lang.StringBuilder append(boolean);
    method public java.lang.StringBuilder append(char);
    method public java.lang.StringBuilder append(int);
    method public java.lang.StringBuilder append(long);
    method public java.lang.StringBuilder append(float);
    method public java.lang.StringBuilder append(double);
    method public java.lang.StringBuilder append(java.lang.Object);
    method public java.lang.StringBuilder append(java.lang.String);
    method public java.lang.StringBuilder append(java.lang.StringBuffer);
    method public java.lang.StringBuilder append(char[]);
    method public java.lang.StringBuilder append(char[], int, int);
    method public java.lang.StringBuilder append(java.lang.CharSequence);
    method public java.lang.StringBuilder append(java.lang.CharSequence, int, int);
    method public java.lang.StringBuilder appendCodePoint(int);
    method public java.lang.StringBuilder delete(int, int);
    method public java.lang.StringBuilder deleteCharAt(int);
    method public java.lang.StringBuilder insert(int, boolean);
    method public java.lang.StringBuilder insert(int, char);
    method public java.lang.StringBuilder insert(int, int);
    method public java.lang.StringBuilder insert(int, long);
    method public java.lang.StringBuilder insert(int, float);
    method public java.lang.StringBuilder insert(int, double);
    method public java.lang.StringBuilder insert(int, java.lang.Object);
    method public java.lang.StringBuilder insert(int, java.lang.String);
    method public java.lang.StringBuilder insert(int, char[]);
    method public java.lang.StringBuilder insert(int, char[], int, int);
    method public java.lang.StringBuilder insert(int, java.lang.CharSequence);
    method public java.lang.StringBuilder insert(int, java.lang.CharSequence, int, int);
    method public java.lang.StringBuilder replace(int, int, java.lang.String);
    method public java.lang.StringBuilder reverse();
  }

  public class StringIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
    ctor public StringIndexOutOfBoundsException();
    ctor public StringIndexOutOfBoundsException(int);
    ctor public StringIndexOutOfBoundsException(java.lang.String);
  }

  public abstract class SuppressWarnings implements java.lang.annotation.Annotation {
  }

  public final class System {
    method public static void arraycopy(java.lang.Object, int, java.lang.Object, int, int);
    method public static java.lang.String clearProperty(java.lang.String);
    method public static java.io.Console console();
    method public static long currentTimeMillis();
    method public static void exit(int);
    method public static void gc();
    method public static java.util.Properties getProperties();
    method public static java.lang.String getProperty(java.lang.String);
    method public static java.lang.String getProperty(java.lang.String, java.lang.String);
    method public static java.lang.SecurityManager getSecurityManager();
    method public static java.lang.String getenv(java.lang.String);
    method public static java.util.Map<java.lang.String, java.lang.String> getenv();
    method public static int identityHashCode(java.lang.Object);
    method public static java.nio.channels.Channel inheritedChannel() throws java.io.IOException;
    method public static java.lang.String lineSeparator();
    method public static void load(java.lang.String);
    method public static void loadLibrary(java.lang.String);
    method public static java.lang.String mapLibraryName(java.lang.String);
    method public static long nanoTime();
    method public static void runFinalization();
    method public static deprecated void runFinalizersOnExit(boolean);
    method public static void setErr(java.io.PrintStream);
    method public static void setIn(java.io.InputStream);
    method public static void setOut(java.io.PrintStream);
    method public static void setProperties(java.util.Properties);
    method public static java.lang.String setProperty(java.lang.String, java.lang.String);
    method public static void setSecurityManager(java.lang.SecurityManager);
    field public static final java.io.PrintStream err;
    field public static final java.io.InputStream in;
    field public static final java.io.PrintStream out;
  }

  public class Thread implements java.lang.Runnable {
    ctor public Thread();
    ctor public Thread(java.lang.Runnable);
    ctor public Thread(java.lang.Runnable, java.lang.String);
    ctor public Thread(java.lang.String);
    ctor public Thread(java.lang.ThreadGroup, java.lang.Runnable);
    ctor public Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String);
    ctor public Thread(java.lang.ThreadGroup, java.lang.String);
    ctor public Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String, long);
    method public static int activeCount();
    method public final void checkAccess();
    method public deprecated int countStackFrames();
    method public static java.lang.Thread currentThread();
    method public deprecated void destroy();
    method public static void dumpStack();
    method public static int enumerate(java.lang.Thread[]);
    method public static java.util.Map<java.lang.Thread, java.lang.StackTraceElement[]> getAllStackTraces();
    method public java.lang.ClassLoader getContextClassLoader();
    method public static java.lang.Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler();
    method public long getId();
    method public final java.lang.String getName();
    method public final int getPriority();
    method public java.lang.StackTraceElement[] getStackTrace();
    method public java.lang.Thread.State getState();
    method public final java.lang.ThreadGroup getThreadGroup();
    method public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler();
    method public static boolean holdsLock(java.lang.Object);
    method public void interrupt();
    method public static boolean interrupted();
    method public final boolean isAlive();
    method public final boolean isDaemon();
    method public boolean isInterrupted();
    method public final void join() throws java.lang.InterruptedException;
    method public final void join(long) throws java.lang.InterruptedException;
    method public final void join(long, int) throws java.lang.InterruptedException;
    method public final deprecated void resume();
    method public void run();
    method public void setContextClassLoader(java.lang.ClassLoader);
    method public final void setDaemon(boolean);
    method public static void setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler);
    method public final void setName(java.lang.String);
    method public final void setPriority(int);
    method public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler);
    method public static void sleep(long) throws java.lang.InterruptedException;
    method public static void sleep(long, int) throws java.lang.InterruptedException;
    method public synchronized void start();
    method public final deprecated void stop();
    method public final deprecated synchronized void stop(java.lang.Throwable);
    method public final deprecated void suspend();
    method public static void yield();
    field public static final int MAX_PRIORITY = 10; // 0xa
    field public static final int MIN_PRIORITY = 1; // 0x1
    field public static final int NORM_PRIORITY = 5; // 0x5
  }

  public static final class Thread.State extends java.lang.Enum {
    method public static java.lang.Thread.State valueOf(java.lang.String);
    method public static final java.lang.Thread.State[] values();
    enum_constant public static final java.lang.Thread.State BLOCKED;
    enum_constant public static final java.lang.Thread.State NEW;
    enum_constant public static final java.lang.Thread.State RUNNABLE;
    enum_constant public static final java.lang.Thread.State TERMINATED;
    enum_constant public static final java.lang.Thread.State TIMED_WAITING;
    enum_constant public static final java.lang.Thread.State WAITING;
  }

  public static abstract interface Thread.UncaughtExceptionHandler {
    method public abstract void uncaughtException(java.lang.Thread, java.lang.Throwable);
  }

  public class ThreadDeath extends java.lang.Error {
    ctor public ThreadDeath();
  }

  public class ThreadGroup implements java.lang.Thread.UncaughtExceptionHandler {
    ctor public ThreadGroup(java.lang.String);
    ctor public ThreadGroup(java.lang.ThreadGroup, java.lang.String);
    method public int activeCount();
    method public int activeGroupCount();
    method public deprecated boolean allowThreadSuspension(boolean);
    method public final void checkAccess();
    method public final void destroy();
    method public int enumerate(java.lang.Thread[]);
    method public int enumerate(java.lang.Thread[], boolean);
    method public int enumerate(java.lang.ThreadGroup[]);
    method public int enumerate(java.lang.ThreadGroup[], boolean);
    method public final int getMaxPriority();
    method public final java.lang.String getName();
    method public final java.lang.ThreadGroup getParent();
    method public final void interrupt();
    method public final boolean isDaemon();
    method public synchronized boolean isDestroyed();
    method public void list();
    method public final boolean parentOf(java.lang.ThreadGroup);
    method public final deprecated void resume();
    method public final void setDaemon(boolean);
    method public final void setMaxPriority(int);
    method public final deprecated void stop();
    method public final deprecated void suspend();
    method public void uncaughtException(java.lang.Thread, java.lang.Throwable);
  }

  public class ThreadLocal {
    ctor public ThreadLocal();
    method public T get();
    method protected T initialValue();
    method public void remove();
    method public void set(T);
  }

  public class Throwable implements java.io.Serializable {
    ctor public Throwable();
    ctor public Throwable(java.lang.String);
    ctor public Throwable(java.lang.String, java.lang.Throwable);
    ctor public Throwable(java.lang.Throwable);
    ctor protected Throwable(java.lang.String, java.lang.Throwable, boolean, boolean);
    method public final void addSuppressed(java.lang.Throwable);
    method public java.lang.Throwable fillInStackTrace();
    method public java.lang.Throwable getCause();
    method public java.lang.String getLocalizedMessage();
    method public java.lang.String getMessage();
    method public java.lang.StackTraceElement[] getStackTrace();
    method public final java.lang.Throwable[] getSuppressed();
    method public java.lang.Throwable initCause(java.lang.Throwable);
    method public void printStackTrace();
    method public void printStackTrace(java.io.PrintStream);
    method public void printStackTrace(java.io.PrintWriter);
    method public void setStackTrace(java.lang.StackTraceElement[]);
  }

  public class TypeNotPresentException extends java.lang.RuntimeException {
    ctor public TypeNotPresentException(java.lang.String, java.lang.Throwable);
    method public java.lang.String typeName();
  }

  public class UnknownError extends java.lang.VirtualMachineError {
    ctor public UnknownError();
    ctor public UnknownError(java.lang.String);
  }

  public class UnsatisfiedLinkError extends java.lang.LinkageError {
    ctor public UnsatisfiedLinkError();
    ctor public UnsatisfiedLinkError(java.lang.String);
  }

  public class UnsupportedClassVersionError extends java.lang.ClassFormatError {
    ctor public UnsupportedClassVersionError();
    ctor public UnsupportedClassVersionError(java.lang.String);
  }

  public class UnsupportedOperationException extends java.lang.RuntimeException {
    ctor public UnsupportedOperationException();
    ctor public UnsupportedOperationException(java.lang.String);
    ctor public UnsupportedOperationException(java.lang.String, java.lang.Throwable);
    ctor public UnsupportedOperationException(java.lang.Throwable);
  }

  public class VerifyError extends java.lang.LinkageError {
    ctor public VerifyError();
    ctor public VerifyError(java.lang.String);
  }

  public abstract class VirtualMachineError extends java.lang.Error {
    ctor public VirtualMachineError();
    ctor public VirtualMachineError(java.lang.String);
  }

  public final class Void {
    field public static final java.lang.Class<java.lang.Void> TYPE;
  }

}

package java.lang.annotation {

  public abstract interface Annotation {
    method public abstract java.lang.Class<? extends java.lang.annotation.Annotation> annotationType();
    method public abstract boolean equals(java.lang.Object);
    method public abstract int hashCode();
    method public abstract java.lang.String toString();
  }

  public class AnnotationFormatError extends java.lang.Error {
    ctor public AnnotationFormatError(java.lang.String);
    ctor public AnnotationFormatError(java.lang.String, java.lang.Throwable);
    ctor public AnnotationFormatError(java.lang.Throwable);
  }

  public class AnnotationTypeMismatchException extends java.lang.RuntimeException {
    ctor public AnnotationTypeMismatchException(java.lang.reflect.Method, java.lang.String);
    method public java.lang.reflect.Method element();
    method public java.lang.String foundType();
  }

  public abstract class Documented implements java.lang.annotation.Annotation {
  }

  public final class ElementType extends java.lang.Enum {
    method public static java.lang.annotation.ElementType valueOf(java.lang.String);
    method public static final java.lang.annotation.ElementType[] values();
    enum_constant public static final java.lang.annotation.ElementType ANNOTATION_TYPE;
    enum_constant public static final java.lang.annotation.ElementType CONSTRUCTOR;
    enum_constant public static final java.lang.annotation.ElementType FIELD;
    enum_constant public static final java.lang.annotation.ElementType LOCAL_VARIABLE;
    enum_constant public static final java.lang.annotation.ElementType METHOD;
    enum_constant public static final java.lang.annotation.ElementType PACKAGE;
    enum_constant public static final java.lang.annotation.ElementType PARAMETER;
    enum_constant public static final java.lang.annotation.ElementType TYPE;
  }

  public class IncompleteAnnotationException extends java.lang.RuntimeException {
    ctor public IncompleteAnnotationException(java.lang.Class<? extends java.lang.annotation.Annotation>, java.lang.String);
    method public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType();
    method public java.lang.String elementName();
  }

  public abstract class Inherited implements java.lang.annotation.Annotation {
  }

  public abstract class Retention implements java.lang.annotation.Annotation {
  }

  public final class RetentionPolicy extends java.lang.Enum {
    method public static java.lang.annotation.RetentionPolicy valueOf(java.lang.String);
    method public static final java.lang.annotation.RetentionPolicy[] values();
    enum_constant public static final java.lang.annotation.RetentionPolicy CLASS;
    enum_constant public static final java.lang.annotation.RetentionPolicy RUNTIME;
    enum_constant public static final java.lang.annotation.RetentionPolicy SOURCE;
  }

  public abstract class Target implements java.lang.annotation.Annotation {
  }

}

package java.lang.ref {

  public class PhantomReference extends java.lang.ref.Reference {
    ctor public PhantomReference(T, java.lang.ref.ReferenceQueue<? super T>);
  }

  public abstract class Reference {
    method public void clear();
    method public boolean enqueue();
    method public T get();
    method public boolean isEnqueued();
  }

  public class ReferenceQueue {
    ctor public ReferenceQueue();
    method public synchronized java.lang.ref.Reference<? extends T> poll();
    method public java.lang.ref.Reference<? extends T> remove() throws java.lang.InterruptedException;
    method public synchronized java.lang.ref.Reference<? extends T> remove(long) throws java.lang.InterruptedException;
  }

  public class SoftReference extends java.lang.ref.Reference {
    ctor public SoftReference(T);
    ctor public SoftReference(T, java.lang.ref.ReferenceQueue<? super T>);
  }

  public class WeakReference extends java.lang.ref.Reference {
    ctor public WeakReference(T);
    ctor public WeakReference(T, java.lang.ref.ReferenceQueue<? super T>);
  }

}

package java.lang.reflect {

  public class AccessibleObject implements java.lang.reflect.AnnotatedElement {
    ctor protected AccessibleObject();
    method public T getAnnotation(java.lang.Class<T>);
    method public java.lang.annotation.Annotation[] getAnnotations();
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public boolean isAccessible();
    method public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>);
    method public void setAccessible(boolean);
    method public static void setAccessible(java.lang.reflect.AccessibleObject[], boolean);
  }

  public abstract interface AnnotatedElement {
    method public abstract T getAnnotation(java.lang.Class<T>);
    method public abstract java.lang.annotation.Annotation[] getAnnotations();
    method public abstract java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public abstract boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>);
  }

  public final class Array {
    method public static java.lang.Object get(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static boolean getBoolean(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static byte getByte(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static char getChar(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static double getDouble(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static float getFloat(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static int getInt(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static int getLength(java.lang.Object);
    method public static long getLong(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static short getShort(java.lang.Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static java.lang.Object newInstance(java.lang.Class<?>, int...) throws java.lang.IllegalArgumentException, java.lang.NegativeArraySizeException;
    method public static java.lang.Object newInstance(java.lang.Class<?>, int) throws java.lang.NegativeArraySizeException;
    method public static void set(java.lang.Object, int, java.lang.Object) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static void setBoolean(java.lang.Object, int, boolean);
    method public static void setByte(java.lang.Object, int, byte) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static void setChar(java.lang.Object, int, char) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static void setDouble(java.lang.Object, int, double) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static void setFloat(java.lang.Object, int, float) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static void setInt(java.lang.Object, int, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static void setLong(java.lang.Object, int, long) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
    method public static void setShort(java.lang.Object, int, short) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
  }

  public final class Constructor extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
    method public A getAnnotation(java.lang.Class<A>);
    method public java.lang.Class<T> getDeclaringClass();
    method public java.lang.Class<?>[] getExceptionTypes();
    method public java.lang.reflect.Type[] getGenericExceptionTypes();
    method public java.lang.reflect.Type[] getGenericParameterTypes();
    method public int getModifiers();
    method public java.lang.String getName();
    method public java.lang.annotation.Annotation[][] getParameterAnnotations();
    method public java.lang.Class<?>[] getParameterTypes();
    method public java.lang.reflect.TypeVariable<java.lang.reflect.Constructor<T>>[] getTypeParameters();
    method public boolean isSynthetic();
    method public boolean isVarArgs();
    method public T newInstance(java.lang.Object...) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException;
    method public java.lang.String toGenericString();
  }

  public final class Field extends java.lang.reflect.AccessibleObject implements java.lang.reflect.Member {
    method public java.lang.Object get(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public A getAnnotation(java.lang.Class<A>);
    method public boolean getBoolean(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public byte getByte(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public char getChar(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public java.lang.Class<?> getDeclaringClass();
    method public double getDouble(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public float getFloat(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public java.lang.reflect.Type getGenericType();
    method public int getInt(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public long getLong(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public int getModifiers();
    method public java.lang.String getName();
    method public short getShort(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public java.lang.Class<?> getType();
    method public boolean isEnumConstant();
    method public boolean isSynthetic();
    method public void set(java.lang.Object, java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setBoolean(java.lang.Object, boolean) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setByte(java.lang.Object, byte) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setChar(java.lang.Object, char) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setDouble(java.lang.Object, double) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setFloat(java.lang.Object, float) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setInt(java.lang.Object, int) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setLong(java.lang.Object, long) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public void setShort(java.lang.Object, short) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
    method public java.lang.String toGenericString();
  }

  public abstract interface GenericArrayType implements java.lang.reflect.Type {
    method public abstract java.lang.reflect.Type getGenericComponentType();
  }

  public abstract interface GenericDeclaration {
    method public abstract java.lang.reflect.TypeVariable<?>[] getTypeParameters();
  }

  public class GenericSignatureFormatError extends java.lang.ClassFormatError {
    ctor public GenericSignatureFormatError();
  }

  public abstract interface InvocationHandler {
    method public abstract java.lang.Object invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) throws java.lang.Throwable;
  }

  public class InvocationTargetException extends java.lang.ReflectiveOperationException {
    ctor protected InvocationTargetException();
    ctor public InvocationTargetException(java.lang.Throwable);
    ctor public InvocationTargetException(java.lang.Throwable, java.lang.String);
    method public java.lang.Throwable getTargetException();
  }

  public class MalformedParameterizedTypeException extends java.lang.RuntimeException {
    ctor public MalformedParameterizedTypeException();
  }

  public abstract interface Member {
    method public abstract java.lang.Class<?> getDeclaringClass();
    method public abstract int getModifiers();
    method public abstract java.lang.String getName();
    method public abstract boolean isSynthetic();
    field public static final int DECLARED = 1; // 0x1
    field public static final int PUBLIC = 0; // 0x0
  }

  public final class Method extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
    method public A getAnnotation(java.lang.Class<A>);
    method public java.lang.Class<?> getDeclaringClass();
    method public java.lang.Object getDefaultValue();
    method public java.lang.Class<?>[] getExceptionTypes();
    method public java.lang.reflect.Type[] getGenericExceptionTypes();
    method public java.lang.reflect.Type[] getGenericParameterTypes();
    method public java.lang.reflect.Type getGenericReturnType();
    method public int getModifiers();
    method public java.lang.String getName();
    method public java.lang.annotation.Annotation[][] getParameterAnnotations();
    method public java.lang.Class<?>[] getParameterTypes();
    method public java.lang.Class<?> getReturnType();
    method public java.lang.reflect.TypeVariable<java.lang.reflect.Method>[] getTypeParameters();
    method public java.lang.Object invoke(java.lang.Object, java.lang.Object...) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException;
    method public boolean isBridge();
    method public boolean isSynthetic();
    method public boolean isVarArgs();
    method public java.lang.String toGenericString();
  }

  public class Modifier {
    ctor public Modifier();
    method public static int classModifiers();
    method public static int constructorModifiers();
    method public static int fieldModifiers();
    method public static int interfaceModifiers();
    method public static boolean isAbstract(int);
    method public static boolean isFinal(int);
    method public static boolean isInterface(int);
    method public static boolean isNative(int);
    method public static boolean isPrivate(int);
    method public static boolean isProtected(int);
    method public static boolean isPublic(int);
    method public static boolean isStatic(int);
    method public static boolean isStrict(int);
    method public static boolean isSynchronized(int);
    method public static boolean isTransient(int);
    method public static boolean isVolatile(int);
    method public static int methodModifiers();
    method public static java.lang.String toString(int);
    field public static final int ABSTRACT = 1024; // 0x400
    field public static final int FINAL = 16; // 0x10
    field public static final int INTERFACE = 512; // 0x200
    field public static final int NATIVE = 256; // 0x100
    field public static final int PRIVATE = 2; // 0x2
    field public static final int PROTECTED = 4; // 0x4
    field public static final int PUBLIC = 1; // 0x1
    field public static final int STATIC = 8; // 0x8
    field public static final int STRICT = 2048; // 0x800
    field public static final int SYNCHRONIZED = 32; // 0x20
    field public static final int TRANSIENT = 128; // 0x80
    field public static final int VOLATILE = 64; // 0x40
  }

  public abstract interface ParameterizedType implements java.lang.reflect.Type {
    method public abstract java.lang.reflect.Type[] getActualTypeArguments();
    method public abstract java.lang.reflect.Type getOwnerType();
    method public abstract java.lang.reflect.Type getRawType();
  }

  public class Proxy implements java.io.Serializable {
    ctor protected Proxy(java.lang.reflect.InvocationHandler);
    method public static java.lang.reflect.InvocationHandler getInvocationHandler(java.lang.Object) throws java.lang.IllegalArgumentException;
    method public static java.lang.Class<?> getProxyClass(java.lang.ClassLoader, java.lang.Class<?>...) throws java.lang.IllegalArgumentException;
    method public static boolean isProxyClass(java.lang.Class<?>);
    method public static java.lang.Object newProxyInstance(java.lang.ClassLoader, java.lang.Class<?>[], java.lang.reflect.InvocationHandler) throws java.lang.IllegalArgumentException;
    field protected java.lang.reflect.InvocationHandler h;
  }

  public final class ReflectPermission extends java.security.BasicPermission {
    ctor public ReflectPermission(java.lang.String);
    ctor public ReflectPermission(java.lang.String, java.lang.String);
  }

  public abstract interface Type {
  }

  public abstract interface TypeVariable implements java.lang.reflect.Type {
    method public abstract java.lang.reflect.Type[] getBounds();
    method public abstract D getGenericDeclaration();
    method public abstract java.lang.String getName();
  }

  public class UndeclaredThrowableException extends java.lang.RuntimeException {
    ctor public UndeclaredThrowableException(java.lang.Throwable);
    ctor public UndeclaredThrowableException(java.lang.Throwable, java.lang.String);
    method public java.lang.Throwable getUndeclaredThrowable();
  }

  public abstract interface WildcardType implements java.lang.reflect.Type {
    method public abstract java.lang.reflect.Type[] getLowerBounds();
    method public abstract java.lang.reflect.Type[] getUpperBounds();
  }

}

package java.math {

  public class BigDecimal extends java.lang.Number implements java.lang.Comparable java.io.Serializable {
    ctor public BigDecimal(char[], int, int);
    ctor public BigDecimal(char[], int, int, java.math.MathContext);
    ctor public BigDecimal(char[]);
    ctor public BigDecimal(char[], java.math.MathContext);
    ctor public BigDecimal(java.lang.String);
    ctor public BigDecimal(java.lang.String, java.math.MathContext);
    ctor public BigDecimal(double);
    ctor public BigDecimal(double, java.math.MathContext);
    ctor public BigDecimal(java.math.BigInteger);
    ctor public BigDecimal(java.math.BigInteger, java.math.MathContext);
    ctor public BigDecimal(java.math.BigInteger, int);
    ctor public BigDecimal(java.math.BigInteger, int, java.math.MathContext);
    ctor public BigDecimal(int);
    ctor public BigDecimal(int, java.math.MathContext);
    ctor public BigDecimal(long);
    ctor public BigDecimal(long, java.math.MathContext);
    method public java.math.BigDecimal abs();
    method public java.math.BigDecimal abs(java.math.MathContext);
    method public java.math.BigDecimal add(java.math.BigDecimal);
    method public java.math.BigDecimal add(java.math.BigDecimal, java.math.MathContext);
    method public byte byteValueExact();
    method public int compareTo(java.math.BigDecimal);
    method public java.math.BigDecimal divide(java.math.BigDecimal, int, int);
    method public java.math.BigDecimal divide(java.math.BigDecimal, int, java.math.RoundingMode);
    method public java.math.BigDecimal divide(java.math.BigDecimal, int);
    method public java.math.BigDecimal divide(java.math.BigDecimal, java.math.RoundingMode);
    method public java.math.BigDecimal divide(java.math.BigDecimal);
    method public java.math.BigDecimal divide(java.math.BigDecimal, java.math.MathContext);
    method public java.math.BigDecimal[] divideAndRemainder(java.math.BigDecimal);
    method public java.math.BigDecimal[] divideAndRemainder(java.math.BigDecimal, java.math.MathContext);
    method public java.math.BigDecimal divideToIntegralValue(java.math.BigDecimal);
    method public java.math.BigDecimal divideToIntegralValue(java.math.BigDecimal, java.math.MathContext);
    method public double doubleValue();
    method public float floatValue();
    method public int intValue();
    method public int intValueExact();
    method public long longValue();
    method public long longValueExact();
    method public java.math.BigDecimal max(java.math.BigDecimal);
    method public java.math.BigDecimal min(java.math.BigDecimal);
    method public java.math.BigDecimal movePointLeft(int);
    method public java.math.BigDecimal movePointRight(int);
    method public java.math.BigDecimal multiply(java.math.BigDecimal);
    method public java.math.BigDecimal multiply(java.math.BigDecimal, java.math.MathContext);
    method public java.math.BigDecimal negate();
    method public java.math.BigDecimal negate(java.math.MathContext);
    method public java.math.BigDecimal plus();
    method public java.math.BigDecimal plus(java.math.MathContext);
    method public java.math.BigDecimal pow(int);
    method public java.math.BigDecimal pow(int, java.math.MathContext);
    method public int precision();
    method public java.math.BigDecimal remainder(java.math.BigDecimal);
    method public java.math.BigDecimal remainder(java.math.BigDecimal, java.math.MathContext);
    method public java.math.BigDecimal round(java.math.MathContext);
    method public int scale();
    method public java.math.BigDecimal scaleByPowerOfTen(int);
    method public java.math.BigDecimal setScale(int, java.math.RoundingMode);
    method public java.math.BigDecimal setScale(int, int);
    method public java.math.BigDecimal setScale(int);
    method public short shortValueExact();
    method public int signum();
    method public java.math.BigDecimal stripTrailingZeros();
    method public java.math.BigDecimal subtract(java.math.BigDecimal);
    method public java.math.BigDecimal subtract(java.math.BigDecimal, java.math.MathContext);
    method public java.math.BigInteger toBigInteger();
    method public java.math.BigInteger toBigIntegerExact();
    method public java.lang.String toEngineeringString();
    method public java.lang.String toPlainString();
    method public java.math.BigDecimal ulp();
    method public java.math.BigInteger unscaledValue();
    method public static java.math.BigDecimal valueOf(long, int);
    method public static java.math.BigDecimal valueOf(long);
    method public static java.math.BigDecimal valueOf(double);
    field public static final java.math.BigDecimal ONE;
    field public static final int ROUND_CEILING = 2; // 0x2
    field public static final int ROUND_DOWN = 1; // 0x1
    field public static final int ROUND_FLOOR = 3; // 0x3
    field public static final int ROUND_HALF_DOWN = 5; // 0x5
    field public static final int ROUND_HALF_EVEN = 6; // 0x6
    field public static final int ROUND_HALF_UP = 4; // 0x4
    field public static final int ROUND_UNNECESSARY = 7; // 0x7
    field public static final int ROUND_UP = 0; // 0x0
    field public static final java.math.BigDecimal TEN;
    field public static final java.math.BigDecimal ZERO;
  }

  public class BigInteger extends java.lang.Number implements java.lang.Comparable java.io.Serializable {
    ctor public BigInteger(int, java.util.Random);
    ctor public BigInteger(int, int, java.util.Random);
    ctor public BigInteger(java.lang.String);
    ctor public BigInteger(java.lang.String, int);
    ctor public BigInteger(int, byte[]);
    ctor public BigInteger(byte[]);
    method public java.math.BigInteger abs();
    method public java.math.BigInteger add(java.math.BigInteger);
    method public java.math.BigInteger and(java.math.BigInteger);
    method public java.math.BigInteger andNot(java.math.BigInteger);
    method public int bitCount();
    method public int bitLength();
    method public java.math.BigInteger clearBit(int);
    method public int compareTo(java.math.BigInteger);
    method public java.math.BigInteger divide(java.math.BigInteger);
    method public java.math.BigInteger[] divideAndRemainder(java.math.BigInteger);
    method public double doubleValue();
    method public java.math.BigInteger flipBit(int);
    method public float floatValue();
    method public java.math.BigInteger gcd(java.math.BigInteger);
    method public int getLowestSetBit();
    method public int intValue();
    method public boolean isProbablePrime(int);
    method public long longValue();
    method public java.math.BigInteger max(java.math.BigInteger);
    method public java.math.BigInteger min(java.math.BigInteger);
    method public java.math.BigInteger mod(java.math.BigInteger);
    method public java.math.BigInteger modInverse(java.math.BigInteger);
    method public java.math.BigInteger modPow(java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger multiply(java.math.BigInteger);
    method public java.math.BigInteger negate();
    method public java.math.BigInteger nextProbablePrime();
    method public java.math.BigInteger not();
    method public java.math.BigInteger or(java.math.BigInteger);
    method public java.math.BigInteger pow(int);
    method public static java.math.BigInteger probablePrime(int, java.util.Random);
    method public java.math.BigInteger remainder(java.math.BigInteger);
    method public java.math.BigInteger setBit(int);
    method public java.math.BigInteger shiftLeft(int);
    method public java.math.BigInteger shiftRight(int);
    method public int signum();
    method public java.math.BigInteger subtract(java.math.BigInteger);
    method public boolean testBit(int);
    method public byte[] toByteArray();
    method public java.lang.String toString(int);
    method public static java.math.BigInteger valueOf(long);
    method public java.math.BigInteger xor(java.math.BigInteger);
    field public static final java.math.BigInteger ONE;
    field public static final java.math.BigInteger TEN;
    field public static final java.math.BigInteger ZERO;
  }

  public final class MathContext implements java.io.Serializable {
    ctor public MathContext(int);
    ctor public MathContext(int, java.math.RoundingMode);
    ctor public MathContext(java.lang.String);
    method public int getPrecision();
    method public java.math.RoundingMode getRoundingMode();
    field public static final java.math.MathContext DECIMAL128;
    field public static final java.math.MathContext DECIMAL32;
    field public static final java.math.MathContext DECIMAL64;
    field public static final java.math.MathContext UNLIMITED;
  }

  public final class RoundingMode extends java.lang.Enum {
    method public static java.math.RoundingMode valueOf(java.lang.String);
    method public static java.math.RoundingMode valueOf(int);
    method public static final java.math.RoundingMode[] values();
    enum_constant public static final java.math.RoundingMode CEILING;
    enum_constant public static final java.math.RoundingMode DOWN;
    enum_constant public static final java.math.RoundingMode FLOOR;
    enum_constant public static final java.math.RoundingMode HALF_DOWN;
    enum_constant public static final java.math.RoundingMode HALF_EVEN;
    enum_constant public static final java.math.RoundingMode HALF_UP;
    enum_constant public static final java.math.RoundingMode UNNECESSARY;
    enum_constant public static final java.math.RoundingMode UP;
  }

}

package java.net {

  public abstract class Authenticator {
    ctor public Authenticator();
    method protected java.net.PasswordAuthentication getPasswordAuthentication();
    method protected final java.lang.String getRequestingHost();
    method protected final int getRequestingPort();
    method protected final java.lang.String getRequestingPrompt();
    method protected final java.lang.String getRequestingProtocol();
    method protected final java.lang.String getRequestingScheme();
    method protected final java.net.InetAddress getRequestingSite();
    method protected java.net.URL getRequestingURL();
    method protected java.net.Authenticator.RequestorType getRequestorType();
    method public static synchronized java.net.PasswordAuthentication requestPasswordAuthentication(java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String);
    method public static synchronized java.net.PasswordAuthentication requestPasswordAuthentication(java.lang.String, java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String);
    method public static java.net.PasswordAuthentication requestPasswordAuthentication(java.lang.String, java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String, java.net.URL, java.net.Authenticator.RequestorType);
    method public static void setDefault(java.net.Authenticator);
  }

  public static final class Authenticator.RequestorType extends java.lang.Enum {
    method public static java.net.Authenticator.RequestorType valueOf(java.lang.String);
    method public static final java.net.Authenticator.RequestorType[] values();
    enum_constant public static final java.net.Authenticator.RequestorType PROXY;
    enum_constant public static final java.net.Authenticator.RequestorType SERVER;
  }

  public class BindException extends java.net.SocketException {
    ctor public BindException();
    ctor public BindException(java.lang.String);
  }

  public abstract class CacheRequest {
    ctor public CacheRequest();
    method public abstract void abort();
    method public abstract java.io.OutputStream getBody() throws java.io.IOException;
  }

  public abstract class CacheResponse {
    ctor public CacheResponse();
    method public abstract java.io.InputStream getBody() throws java.io.IOException;
    method public abstract java.util.Map<java.lang.String, java.util.List<java.lang.String>> getHeaders() throws java.io.IOException;
  }

  public class ConnectException extends java.net.SocketException {
    ctor public ConnectException();
    ctor public ConnectException(java.lang.String);
  }

  public abstract class ContentHandler {
    ctor public ContentHandler();
    method public abstract java.lang.Object getContent(java.net.URLConnection) throws java.io.IOException;
    method public java.lang.Object getContent(java.net.URLConnection, java.lang.Class[]) throws java.io.IOException;
  }

  public abstract interface ContentHandlerFactory {
    method public abstract java.net.ContentHandler createContentHandler(java.lang.String);
  }

  public abstract class CookieHandler {
    ctor public CookieHandler();
    method public abstract java.util.Map<java.lang.String, java.util.List<java.lang.String>> get(java.net.URI, java.util.Map<java.lang.String, java.util.List<java.lang.String>>) throws java.io.IOException;
    method public static java.net.CookieHandler getDefault();
    method public abstract void put(java.net.URI, java.util.Map<java.lang.String, java.util.List<java.lang.String>>) throws java.io.IOException;
    method public static void setDefault(java.net.CookieHandler);
  }

  public class CookieManager extends java.net.CookieHandler {
    ctor public CookieManager();
    ctor public CookieManager(java.net.CookieStore, java.net.CookiePolicy);
    method public java.util.Map<java.lang.String, java.util.List<java.lang.String>> get(java.net.URI, java.util.Map<java.lang.String, java.util.List<java.lang.String>>) throws java.io.IOException;
    method public java.net.CookieStore getCookieStore();
    method public void put(java.net.URI, java.util.Map<java.lang.String, java.util.List<java.lang.String>>) throws java.io.IOException;
    method public void setCookiePolicy(java.net.CookiePolicy);
  }

  public abstract interface CookiePolicy {
    method public abstract boolean shouldAccept(java.net.URI, java.net.HttpCookie);
    field public static final java.net.CookiePolicy ACCEPT_ALL;
    field public static final java.net.CookiePolicy ACCEPT_NONE;
    field public static final java.net.CookiePolicy ACCEPT_ORIGINAL_SERVER;
  }

  public abstract interface CookieStore {
    method public abstract void add(java.net.URI, java.net.HttpCookie);
    method public abstract java.util.List<java.net.HttpCookie> get(java.net.URI);
    method public abstract java.util.List<java.net.HttpCookie> getCookies();
    method public abstract java.util.List<java.net.URI> getURIs();
    method public abstract boolean remove(java.net.URI, java.net.HttpCookie);
    method public abstract boolean removeAll();
  }

  public final class DatagramPacket {
    ctor public DatagramPacket(byte[], int);
    ctor public DatagramPacket(byte[], int, int);
    ctor public DatagramPacket(byte[], int, int, java.net.InetAddress, int);
    ctor public DatagramPacket(byte[], int, java.net.InetAddress, int);
    ctor public DatagramPacket(byte[], int, java.net.SocketAddress) throws java.net.SocketException;
    ctor public DatagramPacket(byte[], int, int, java.net.SocketAddress) throws java.net.SocketException;
    method public synchronized java.net.InetAddress getAddress();
    method public synchronized byte[] getData();
    method public synchronized int getLength();
    method public synchronized int getOffset();
    method public synchronized int getPort();
    method public synchronized java.net.SocketAddress getSocketAddress();
    method public synchronized void setAddress(java.net.InetAddress);
    method public synchronized void setData(byte[], int, int);
    method public synchronized void setData(byte[]);
    method public synchronized void setLength(int);
    method public synchronized void setPort(int);
    method public synchronized void setSocketAddress(java.net.SocketAddress);
  }

  public class DatagramSocket implements java.io.Closeable {
    ctor public DatagramSocket() throws java.net.SocketException;
    ctor public DatagramSocket(int) throws java.net.SocketException;
    ctor public DatagramSocket(int, java.net.InetAddress) throws java.net.SocketException;
    ctor protected DatagramSocket(java.net.DatagramSocketImpl);
    ctor public DatagramSocket(java.net.SocketAddress) throws java.net.SocketException;
    method public void bind(java.net.SocketAddress) throws java.net.SocketException;
    method public void close();
    method public void connect(java.net.SocketAddress) throws java.net.SocketException;
    method public void connect(java.net.InetAddress, int);
    method public void disconnect();
    method public boolean getBroadcast() throws java.net.SocketException;
    method public java.nio.channels.DatagramChannel getChannel();
    method public java.net.InetAddress getInetAddress();
    method public java.net.InetAddress getLocalAddress();
    method public int getLocalPort();
    method public java.net.SocketAddress getLocalSocketAddress();
    method public int getPort();
    method public synchronized int getReceiveBufferSize() throws java.net.SocketException;
    method public java.net.SocketAddress getRemoteSocketAddress();
    method public boolean getReuseAddress() throws java.net.SocketException;
    method public synchronized int getSendBufferSize() throws java.net.SocketException;
    method public synchronized int getSoTimeout() throws java.net.SocketException;
    method public int getTrafficClass() throws java.net.SocketException;
    method public boolean isBound();
    method public boolean isClosed();
    method public boolean isConnected();
    method public synchronized void receive(java.net.DatagramPacket) throws java.io.IOException;
    method public void send(java.net.DatagramPacket) throws java.io.IOException;
    method public void setBroadcast(boolean) throws java.net.SocketException;
    method public static synchronized void setDatagramSocketImplFactory(java.net.DatagramSocketImplFactory) throws java.io.IOException;
    method public synchronized void setReceiveBufferSize(int) throws java.net.SocketException;
    method public void setReuseAddress(boolean) throws java.net.SocketException;
    method public synchronized void setSendBufferSize(int) throws java.net.SocketException;
    method public synchronized void setSoTimeout(int) throws java.net.SocketException;
    method public void setTrafficClass(int) throws java.net.SocketException;
  }

  public abstract class DatagramSocketImpl implements java.net.SocketOptions {
    ctor public DatagramSocketImpl();
    method protected abstract void bind(int, java.net.InetAddress) throws java.net.SocketException;
    method protected abstract void close();
    method protected void connect(java.net.InetAddress, int) throws java.net.SocketException;
    method protected abstract void create() throws java.net.SocketException;
    method protected void disconnect();
    method protected java.io.FileDescriptor getFileDescriptor();
    method protected int getLocalPort();
    method protected abstract deprecated byte getTTL() throws java.io.IOException;
    method protected abstract int getTimeToLive() throws java.io.IOException;
    method protected abstract void join(java.net.InetAddress) throws java.io.IOException;
    method protected abstract void joinGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
    method protected abstract void leave(java.net.InetAddress) throws java.io.IOException;
    method protected abstract void leaveGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
    method protected abstract int peek(java.net.InetAddress) throws java.io.IOException;
    method protected abstract int peekData(java.net.DatagramPacket) throws java.io.IOException;
    method protected abstract void receive(java.net.DatagramPacket) throws java.io.IOException;
    method protected abstract void send(java.net.DatagramPacket) throws java.io.IOException;
    method protected abstract deprecated void setTTL(byte) throws java.io.IOException;
    method protected abstract void setTimeToLive(int) throws java.io.IOException;
    field protected java.io.FileDescriptor fd;
    field protected int localPort;
  }

  public abstract interface DatagramSocketImplFactory {
    method public abstract java.net.DatagramSocketImpl createDatagramSocketImpl();
  }

  public abstract interface FileNameMap {
    method public abstract java.lang.String getContentTypeFor(java.lang.String);
  }

  public final class HttpCookie implements java.lang.Cloneable {
    ctor public HttpCookie(java.lang.String, java.lang.String);
    method public java.lang.Object clone();
    method public static boolean domainMatches(java.lang.String, java.lang.String);
    method public java.lang.String getComment();
    method public java.lang.String getCommentURL();
    method public boolean getDiscard();
    method public java.lang.String getDomain();
    method public long getMaxAge();
    method public java.lang.String getName();
    method public java.lang.String getPath();
    method public java.lang.String getPortlist();
    method public boolean getSecure();
    method public java.lang.String getValue();
    method public int getVersion();
    method public boolean hasExpired();
    method public static java.util.List<java.net.HttpCookie> parse(java.lang.String);
    method public void setComment(java.lang.String);
    method public void setCommentURL(java.lang.String);
    method public void setDiscard(boolean);
    method public void setDomain(java.lang.String);
    method public void setMaxAge(long);
    method public void setPath(java.lang.String);
    method public void setPortlist(java.lang.String);
    method public void setSecure(boolean);
    method public void setValue(java.lang.String);
    method public void setVersion(int);
  }

  public class HttpRetryException extends java.io.IOException {
    ctor public HttpRetryException(java.lang.String, int);
    ctor public HttpRetryException(java.lang.String, int, java.lang.String);
    method public java.lang.String getLocation();
    method public java.lang.String getReason();
    method public int responseCode();
  }

  public abstract class HttpURLConnection extends java.net.URLConnection {
    ctor protected HttpURLConnection(java.net.URL);
    method public abstract void disconnect();
    method public java.io.InputStream getErrorStream();
    method public static boolean getFollowRedirects();
    method public boolean getInstanceFollowRedirects();
    method public java.lang.String getRequestMethod();
    method public int getResponseCode() throws java.io.IOException;
    method public java.lang.String getResponseMessage() throws java.io.IOException;
    method public void setChunkedStreamingMode(int);
    method public void setFixedLengthStreamingMode(long);
    method public void setFixedLengthStreamingMode(int);
    method public static void setFollowRedirects(boolean);
    method public void setInstanceFollowRedirects(boolean);
    method public void setRequestMethod(java.lang.String) throws java.net.ProtocolException;
    method public abstract boolean usingProxy();
    field public static final int HTTP_ACCEPTED = 202; // 0xca
    field public static final int HTTP_BAD_GATEWAY = 502; // 0x1f6
    field public static final int HTTP_BAD_METHOD = 405; // 0x195
    field public static final int HTTP_BAD_REQUEST = 400; // 0x190
    field public static final int HTTP_CLIENT_TIMEOUT = 408; // 0x198
    field public static final int HTTP_CONFLICT = 409; // 0x199
    field public static final int HTTP_CREATED = 201; // 0xc9
    field public static final int HTTP_ENTITY_TOO_LARGE = 413; // 0x19d
    field public static final int HTTP_FORBIDDEN = 403; // 0x193
    field public static final int HTTP_GATEWAY_TIMEOUT = 504; // 0x1f8
    field public static final int HTTP_GONE = 410; // 0x19a
    field public static final int HTTP_INTERNAL_ERROR = 500; // 0x1f4
    field public static final int HTTP_LENGTH_REQUIRED = 411; // 0x19b
    field public static final int HTTP_MOVED_PERM = 301; // 0x12d
    field public static final int HTTP_MOVED_TEMP = 302; // 0x12e
    field public static final int HTTP_MULT_CHOICE = 300; // 0x12c
    field public static final int HTTP_NOT_ACCEPTABLE = 406; // 0x196
    field public static final int HTTP_NOT_AUTHORITATIVE = 203; // 0xcb
    field public static final int HTTP_NOT_FOUND = 404; // 0x194
    field public static final int HTTP_NOT_IMPLEMENTED = 501; // 0x1f5
    field public static final int HTTP_NOT_MODIFIED = 304; // 0x130
    field public static final int HTTP_NO_CONTENT = 204; // 0xcc
    field public static final int HTTP_OK = 200; // 0xc8
    field public static final int HTTP_PARTIAL = 206; // 0xce
    field public static final int HTTP_PAYMENT_REQUIRED = 402; // 0x192
    field public static final int HTTP_PRECON_FAILED = 412; // 0x19c
    field public static final int HTTP_PROXY_AUTH = 407; // 0x197
    field public static final int HTTP_REQ_TOO_LONG = 414; // 0x19e
    field public static final int HTTP_RESET = 205; // 0xcd
    field public static final int HTTP_SEE_OTHER = 303; // 0x12f
    field public static final deprecated int HTTP_SERVER_ERROR = 500; // 0x1f4
    field public static final int HTTP_UNAUTHORIZED = 401; // 0x191
    field public static final int HTTP_UNAVAILABLE = 503; // 0x1f7
    field public static final int HTTP_UNSUPPORTED_TYPE = 415; // 0x19f
    field public static final int HTTP_USE_PROXY = 305; // 0x131
    field public static final int HTTP_VERSION = 505; // 0x1f9
    field protected int chunkLength;
    field protected int fixedContentLength;
    field protected long fixedContentLengthLong;
    field protected boolean instanceFollowRedirects;
    field protected java.lang.String method;
    field protected int responseCode;
    field protected java.lang.String responseMessage;
  }

  public final class IDN {
    method public static java.lang.String toASCII(java.lang.String, int);
    method public static java.lang.String toASCII(java.lang.String);
    method public static java.lang.String toUnicode(java.lang.String, int);
    method public static java.lang.String toUnicode(java.lang.String);
    field public static final int ALLOW_UNASSIGNED = 1; // 0x1
    field public static final int USE_STD3_ASCII_RULES = 2; // 0x2
  }

  public final class Inet4Address extends java.net.InetAddress {
  }

  public final class Inet6Address extends java.net.InetAddress {
    method public static java.net.Inet6Address getByAddress(java.lang.String, byte[], int) throws java.net.UnknownHostException;
    method public static java.net.Inet6Address getByAddress(java.lang.String, byte[], java.net.NetworkInterface) throws java.net.UnknownHostException;
    method public int getScopeId();
    method public java.net.NetworkInterface getScopedInterface();
    method public boolean isIPv4CompatibleAddress();
  }

  public class InetAddress implements java.io.Serializable {
    method public byte[] getAddress();
    method public static java.net.InetAddress[] getAllByName(java.lang.String) throws java.net.UnknownHostException;
    method public static java.net.InetAddress getByAddress(byte[]) throws java.net.UnknownHostException;
    method public static java.net.InetAddress getByAddress(java.lang.String, byte[]) throws java.net.UnknownHostException;
    method public static java.net.InetAddress getByName(java.lang.String) throws java.net.UnknownHostException;
    method public java.lang.String getCanonicalHostName();
    method public java.lang.String getHostAddress();
    method public java.lang.String getHostName();
    method public static java.net.InetAddress getLocalHost() throws java.net.UnknownHostException;
    method public static java.net.InetAddress getLoopbackAddress();
    method public boolean isAnyLocalAddress();
    method public boolean isLinkLocalAddress();
    method public boolean isLoopbackAddress();
    method public boolean isMCGlobal();
    method public boolean isMCLinkLocal();
    method public boolean isMCNodeLocal();
    method public boolean isMCOrgLocal();
    method public boolean isMCSiteLocal();
    method public boolean isMulticastAddress();
    method public boolean isReachable(int) throws java.io.IOException;
    method public boolean isReachable(java.net.NetworkInterface, int, int) throws java.io.IOException;
    method public boolean isSiteLocalAddress();
  }

  public class InetSocketAddress extends java.net.SocketAddress {
    ctor public InetSocketAddress(int);
    ctor public InetSocketAddress(java.net.InetAddress, int);
    ctor public InetSocketAddress(java.lang.String, int);
    method public static java.net.InetSocketAddress createUnresolved(java.lang.String, int);
    method public final boolean equals(java.lang.Object);
    method public final java.net.InetAddress getAddress();
    method public final java.lang.String getHostName();
    method public final java.lang.String getHostString();
    method public final int getPort();
    method public final int hashCode();
    method public final boolean isUnresolved();
  }

  public class InterfaceAddress {
    method public java.net.InetAddress getAddress();
    method public java.net.InetAddress getBroadcast();
    method public short getNetworkPrefixLength();
  }

  public abstract class JarURLConnection extends java.net.URLConnection {
    ctor protected JarURLConnection(java.net.URL) throws java.net.MalformedURLException;
    method public java.util.jar.Attributes getAttributes() throws java.io.IOException;
    method public java.security.cert.Certificate[] getCertificates() throws java.io.IOException;
    method public java.lang.String getEntryName();
    method public java.util.jar.JarEntry getJarEntry() throws java.io.IOException;
    method public abstract java.util.jar.JarFile getJarFile() throws java.io.IOException;
    method public java.net.URL getJarFileURL();
    method public java.util.jar.Attributes getMainAttributes() throws java.io.IOException;
    method public java.util.jar.Manifest getManifest() throws java.io.IOException;
    field protected java.net.URLConnection jarFileURLConnection;
  }

  public class MalformedURLException extends java.io.IOException {
    ctor public MalformedURLException();
    ctor public MalformedURLException(java.lang.String);
  }

  public class MulticastSocket extends java.net.DatagramSocket {
    ctor public MulticastSocket() throws java.io.IOException;
    ctor public MulticastSocket(int) throws java.io.IOException;
    ctor public MulticastSocket(java.net.SocketAddress) throws java.io.IOException;
    method public java.net.InetAddress getInterface() throws java.net.SocketException;
    method public boolean getLoopbackMode() throws java.net.SocketException;
    method public java.net.NetworkInterface getNetworkInterface() throws java.net.SocketException;
    method public deprecated byte getTTL() throws java.io.IOException;
    method public int getTimeToLive() throws java.io.IOException;
    method public void joinGroup(java.net.InetAddress) throws java.io.IOException;
    method public void joinGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
    method public void leaveGroup(java.net.InetAddress) throws java.io.IOException;
    method public void leaveGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
    method public deprecated void send(java.net.DatagramPacket, byte) throws java.io.IOException;
    method public void setInterface(java.net.InetAddress) throws java.net.SocketException;
    method public void setLoopbackMode(boolean) throws java.net.SocketException;
    method public void setNetworkInterface(java.net.NetworkInterface) throws java.net.SocketException;
    method public deprecated void setTTL(byte) throws java.io.IOException;
    method public void setTimeToLive(int) throws java.io.IOException;
  }

  public final class NetPermission extends java.security.BasicPermission {
    ctor public NetPermission(java.lang.String);
    ctor public NetPermission(java.lang.String, java.lang.String);
  }

  public final class NetworkInterface {
    method public static java.net.NetworkInterface getByIndex(int) throws java.net.SocketException;
    method public static java.net.NetworkInterface getByInetAddress(java.net.InetAddress) throws java.net.SocketException;
    method public static java.net.NetworkInterface getByName(java.lang.String) throws java.net.SocketException;
    method public java.lang.String getDisplayName();
    method public byte[] getHardwareAddress() throws java.net.SocketException;
    method public int getIndex();
    method public java.util.Enumeration<java.net.InetAddress> getInetAddresses();
    method public java.util.List<java.net.InterfaceAddress> getInterfaceAddresses();
    method public int getMTU() throws java.net.SocketException;
    method public java.lang.String getName();
    method public static java.util.Enumeration<java.net.NetworkInterface> getNetworkInterfaces() throws java.net.SocketException;
    method public java.net.NetworkInterface getParent();
    method public java.util.Enumeration<java.net.NetworkInterface> getSubInterfaces();
    method public boolean isLoopback() throws java.net.SocketException;
    method public boolean isPointToPoint() throws java.net.SocketException;
    method public boolean isUp() throws java.net.SocketException;
    method public boolean isVirtual();
    method public boolean supportsMulticast() throws java.net.SocketException;
  }

  public class NoRouteToHostException extends java.net.SocketException {
    ctor public NoRouteToHostException();
    ctor public NoRouteToHostException(java.lang.String);
  }

  public final class PasswordAuthentication {
    ctor public PasswordAuthentication(java.lang.String, char[]);
    method public char[] getPassword();
    method public java.lang.String getUserName();
  }

  public class PortUnreachableException extends java.net.SocketException {
    ctor public PortUnreachableException();
    ctor public PortUnreachableException(java.lang.String);
  }

  public class ProtocolException extends java.io.IOException {
    ctor public ProtocolException();
    ctor public ProtocolException(java.lang.String);
  }

  public class Proxy {
    ctor public Proxy(java.net.Proxy.Type, java.net.SocketAddress);
    method public java.net.SocketAddress address();
    method public final boolean equals(java.lang.Object);
    method public final int hashCode();
    method public java.net.Proxy.Type type();
    field public static final java.net.Proxy NO_PROXY;
  }

  public static final class Proxy.Type extends java.lang.Enum {
    method public static java.net.Proxy.Type valueOf(java.lang.String);
    method public static final java.net.Proxy.Type[] values();
    enum_constant public static final java.net.Proxy.Type DIRECT;
    enum_constant public static final java.net.Proxy.Type HTTP;
    enum_constant public static final java.net.Proxy.Type SOCKS;
  }

  public abstract class ProxySelector {
    ctor public ProxySelector();
    method public abstract void connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException);
    method public static java.net.ProxySelector getDefault();
    method public abstract java.util.List<java.net.Proxy> select(java.net.URI);
    method public static void setDefault(java.net.ProxySelector);
  }

  public abstract class ResponseCache {
    ctor public ResponseCache();
    method public abstract java.net.CacheResponse get(java.net.URI, java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>) throws java.io.IOException;
    method public static java.net.ResponseCache getDefault();
    method public abstract java.net.CacheRequest put(java.net.URI, java.net.URLConnection) throws java.io.IOException;
    method public static void setDefault(java.net.ResponseCache);
  }

  public abstract class SecureCacheResponse extends java.net.CacheResponse {
    ctor public SecureCacheResponse();
    method public abstract java.lang.String getCipherSuite();
    method public abstract java.util.List<java.security.cert.Certificate> getLocalCertificateChain();
    method public abstract java.security.Principal getLocalPrincipal();
    method public abstract java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public abstract java.util.List<java.security.cert.Certificate> getServerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException;
  }

  public class ServerSocket implements java.io.Closeable {
    ctor public ServerSocket() throws java.io.IOException;
    ctor public ServerSocket(int) throws java.io.IOException;
    ctor public ServerSocket(int, int) throws java.io.IOException;
    ctor public ServerSocket(int, int, java.net.InetAddress) throws java.io.IOException;
    method public java.net.Socket accept() throws java.io.IOException;
    method public void bind(java.net.SocketAddress) throws java.io.IOException;
    method public void bind(java.net.SocketAddress, int) throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public java.nio.channels.ServerSocketChannel getChannel();
    method public java.net.InetAddress getInetAddress();
    method public int getLocalPort();
    method public java.net.SocketAddress getLocalSocketAddress();
    method public int getReceiveBufferSize() throws java.net.SocketException;
    method public boolean getReuseAddress() throws java.net.SocketException;
    method public synchronized int getSoTimeout() throws java.io.IOException;
    method protected final void implAccept(java.net.Socket) throws java.io.IOException;
    method public boolean isBound();
    method public boolean isClosed();
    method public void setPerformancePreferences(int, int, int);
    method public void setReceiveBufferSize(int) throws java.net.SocketException;
    method public void setReuseAddress(boolean) throws java.net.SocketException;
    method public synchronized void setSoTimeout(int) throws java.net.SocketException;
    method public static synchronized void setSocketFactory(java.net.SocketImplFactory) throws java.io.IOException;
  }

  public class Socket implements java.io.Closeable {
    ctor public Socket();
    ctor public Socket(java.net.Proxy);
    ctor public Socket(java.lang.String, int) throws java.io.IOException, java.net.UnknownHostException;
    ctor public Socket(java.lang.String, int, java.net.InetAddress, int) throws java.io.IOException;
    ctor public deprecated Socket(java.lang.String, int, boolean) throws java.io.IOException;
    ctor public Socket(java.net.InetAddress, int) throws java.io.IOException;
    ctor public Socket(java.net.InetAddress, int, java.net.InetAddress, int) throws java.io.IOException;
    ctor public deprecated Socket(java.net.InetAddress, int, boolean) throws java.io.IOException;
    ctor protected Socket(java.net.SocketImpl) throws java.net.SocketException;
    method public void bind(java.net.SocketAddress) throws java.io.IOException;
    method public synchronized void close() throws java.io.IOException;
    method public void connect(java.net.SocketAddress) throws java.io.IOException;
    method public void connect(java.net.SocketAddress, int) throws java.io.IOException;
    method public java.nio.channels.SocketChannel getChannel();
    method public java.net.InetAddress getInetAddress();
    method public java.io.InputStream getInputStream() throws java.io.IOException;
    method public boolean getKeepAlive() throws java.net.SocketException;
    method public java.net.InetAddress getLocalAddress();
    method public int getLocalPort();
    method public java.net.SocketAddress getLocalSocketAddress();
    method public boolean getOOBInline() throws java.net.SocketException;
    method public java.io.OutputStream getOutputStream() throws java.io.IOException;
    method public int getPort();
    method public synchronized int getReceiveBufferSize() throws java.net.SocketException;
    method public java.net.SocketAddress getRemoteSocketAddress();
    method public boolean getReuseAddress() throws java.net.SocketException;
    method public synchronized int getSendBufferSize() throws java.net.SocketException;
    method public int getSoLinger() throws java.net.SocketException;
    method public synchronized int getSoTimeout() throws java.net.SocketException;
    method public boolean getTcpNoDelay() throws java.net.SocketException;
    method public int getTrafficClass() throws java.net.SocketException;
    method public boolean isBound();
    method public boolean isClosed();
    method public boolean isConnected();
    method public boolean isInputShutdown();
    method public boolean isOutputShutdown();
    method public void sendUrgentData(int) throws java.io.IOException;
    method public void setKeepAlive(boolean) throws java.net.SocketException;
    method public void setOOBInline(boolean) throws java.net.SocketException;
    method public void setPerformancePreferences(int, int, int);
    method public synchronized void setReceiveBufferSize(int) throws java.net.SocketException;
    method public void setReuseAddress(boolean) throws java.net.SocketException;
    method public synchronized void setSendBufferSize(int) throws java.net.SocketException;
    method public void setSoLinger(boolean, int) throws java.net.SocketException;
    method public synchronized void setSoTimeout(int) throws java.net.SocketException;
    method public static synchronized void setSocketImplFactory(java.net.SocketImplFactory) throws java.io.IOException;
    method public void setTcpNoDelay(boolean) throws java.net.SocketException;
    method public void setTrafficClass(int) throws java.net.SocketException;
    method public void shutdownInput() throws java.io.IOException;
    method public void shutdownOutput() throws java.io.IOException;
  }

  public abstract class SocketAddress implements java.io.Serializable {
    ctor public SocketAddress();
  }

  public class SocketException extends java.io.IOException {
    ctor public SocketException();
    ctor public SocketException(java.lang.String);
  }

  public abstract class SocketImpl implements java.net.SocketOptions {
    ctor public SocketImpl();
    method protected abstract void accept(java.net.SocketImpl) throws java.io.IOException;
    method protected abstract int available() throws java.io.IOException;
    method protected abstract void bind(java.net.InetAddress, int) throws java.io.IOException;
    method protected abstract void close() throws java.io.IOException;
    method protected abstract void connect(java.lang.String, int) throws java.io.IOException;
    method protected abstract void connect(java.net.InetAddress, int) throws java.io.IOException;
    method protected abstract void connect(java.net.SocketAddress, int) throws java.io.IOException;
    method protected abstract void create(boolean) throws java.io.IOException;
    method protected java.io.FileDescriptor getFileDescriptor();
    method protected java.net.InetAddress getInetAddress();
    method protected abstract java.io.InputStream getInputStream() throws java.io.IOException;
    method protected int getLocalPort();
    method protected abstract java.io.OutputStream getOutputStream() throws java.io.IOException;
    method protected int getPort();
    method protected abstract void listen(int) throws java.io.IOException;
    method protected abstract void sendUrgentData(int) throws java.io.IOException;
    method protected void setPerformancePreferences(int, int, int);
    method protected void shutdownInput() throws java.io.IOException;
    method protected void shutdownOutput() throws java.io.IOException;
    method protected boolean supportsUrgentData();
    field protected java.net.InetAddress address;
    field protected java.io.FileDescriptor fd;
    field protected int localport;
    field protected int port;
  }

  public abstract interface SocketImplFactory {
    method public abstract java.net.SocketImpl createSocketImpl();
  }

  public abstract interface SocketOptions {
    method public abstract java.lang.Object getOption(int) throws java.net.SocketException;
    method public abstract void setOption(int, java.lang.Object) throws java.net.SocketException;
    field public static final int IP_MULTICAST_IF = 16; // 0x10
    field public static final int IP_MULTICAST_IF2 = 31; // 0x1f
    field public static final int IP_MULTICAST_LOOP = 18; // 0x12
    field public static final int IP_TOS = 3; // 0x3
    field public static final int SO_BINDADDR = 15; // 0xf
    field public static final int SO_BROADCAST = 32; // 0x20
    field public static final int SO_KEEPALIVE = 8; // 0x8
    field public static final int SO_LINGER = 128; // 0x80
    field public static final int SO_OOBINLINE = 4099; // 0x1003
    field public static final int SO_RCVBUF = 4098; // 0x1002
    field public static final int SO_REUSEADDR = 4; // 0x4
    field public static final int SO_SNDBUF = 4097; // 0x1001
    field public static final int SO_TIMEOUT = 4102; // 0x1006
    field public static final int TCP_NODELAY = 1; // 0x1
  }

  public final class SocketPermission extends java.security.Permission implements java.io.Serializable {
    ctor public SocketPermission(java.lang.String, java.lang.String);
    method public java.lang.String getActions();
    method public boolean implies(java.security.Permission);
  }

  public class SocketTimeoutException extends java.io.InterruptedIOException {
    ctor public SocketTimeoutException();
    ctor public SocketTimeoutException(java.lang.String);
  }

  public final class URI implements java.lang.Comparable java.io.Serializable {
    ctor public URI(java.lang.String) throws java.net.URISyntaxException;
    ctor public URI(java.lang.String, java.lang.String, java.lang.String) throws java.net.URISyntaxException;
    ctor public URI(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String) throws java.net.URISyntaxException;
    ctor public URI(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.net.URISyntaxException;
    ctor public URI(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.net.URISyntaxException;
    method public int compareTo(java.net.URI);
    method public static java.net.URI create(java.lang.String);
    method public java.lang.String getAuthority();
    method public java.lang.String getFragment();
    method public java.lang.String getHost();
    method public java.lang.String getPath();
    method public int getPort();
    method public java.lang.String getQuery();
    method public java.lang.String getRawAuthority();
    method public java.lang.String getRawFragment();
    method public java.lang.String getRawPath();
    method public java.lang.String getRawQuery();
    method public java.lang.String getRawSchemeSpecificPart();
    method public java.lang.String getRawUserInfo();
    method public java.lang.String getScheme();
    method public java.lang.String getSchemeSpecificPart();
    method public java.lang.String getUserInfo();
    method public boolean isAbsolute();
    method public boolean isOpaque();
    method public java.net.URI normalize();
    method public java.net.URI parseServerAuthority() throws java.net.URISyntaxException;
    method public java.net.URI relativize(java.net.URI);
    method public java.net.URI resolve(java.net.URI);
    method public java.net.URI resolve(java.lang.String);
    method public java.lang.String toASCIIString();
    method public java.net.URL toURL() throws java.net.MalformedURLException;
  }

  public class URISyntaxException extends java.lang.Exception {
    ctor public URISyntaxException(java.lang.String, java.lang.String, int);
    ctor public URISyntaxException(java.lang.String, java.lang.String);
    method public int getIndex();
    method public java.lang.String getInput();
    method public java.lang.String getReason();
  }

  public final class URL implements java.io.Serializable {
    ctor public URL(java.lang.String) throws java.net.MalformedURLException;
    ctor public URL(java.net.URL, java.lang.String) throws java.net.MalformedURLException;
    ctor public URL(java.net.URL, java.lang.String, java.net.URLStreamHandler) throws java.net.MalformedURLException;
    ctor public URL(java.lang.String, java.lang.String, java.lang.String) throws java.net.MalformedURLException;
    ctor public URL(java.lang.String, java.lang.String, int, java.lang.String) throws java.net.MalformedURLException;
    ctor public URL(java.lang.String, java.lang.String, int, java.lang.String, java.net.URLStreamHandler) throws java.net.MalformedURLException;
    method public java.lang.String getAuthority();
    method public final java.lang.Object getContent() throws java.io.IOException;
    method public final java.lang.Object getContent(java.lang.Class[]) throws java.io.IOException;
    method public int getDefaultPort();
    method public java.lang.String getFile();
    method public java.lang.String getHost();
    method public java.lang.String getPath();
    method public int getPort();
    method public java.lang.String getProtocol();
    method public java.lang.String getQuery();
    method public java.lang.String getRef();
    method public java.lang.String getUserInfo();
    method public java.net.URLConnection openConnection() throws java.io.IOException;
    method public java.net.URLConnection openConnection(java.net.Proxy) throws java.io.IOException;
    method public final java.io.InputStream openStream() throws java.io.IOException;
    method public boolean sameFile(java.net.URL);
    method protected void set(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String);
    method protected void set(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public static synchronized void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory);
    method public java.lang.String toExternalForm();
    method public java.net.URI toURI() throws java.net.URISyntaxException;
  }

  public class URLClassLoader extends java.security.SecureClassLoader {
    ctor public URLClassLoader(java.net.URL[]);
    ctor public URLClassLoader(java.net.URL[], java.lang.ClassLoader);
    ctor public URLClassLoader(java.net.URL[], java.lang.ClassLoader, java.net.URLStreamHandlerFactory);
    method protected void addURL(java.net.URL);
    method protected java.lang.Package definePackage(java.lang.String, java.util.jar.Manifest, java.net.URL) throws java.lang.IllegalArgumentException;
    method public java.net.URL findResource(java.lang.String);
    method public java.util.Enumeration<java.net.URL> findResources(java.lang.String) throws java.io.IOException;
    method public java.net.URL[] getURLs();
    method public static java.net.URLClassLoader newInstance(java.net.URL[]);
    method public static java.net.URLClassLoader newInstance(java.net.URL[], java.lang.ClassLoader);
  }

  public abstract class URLConnection {
    ctor protected URLConnection(java.net.URL);
    method public void addRequestProperty(java.lang.String, java.lang.String);
    method public abstract void connect() throws java.io.IOException;
    method public boolean getAllowUserInteraction();
    method public int getConnectTimeout();
    method public java.lang.Object getContent() throws java.io.IOException;
    method public java.lang.Object getContent(java.lang.Class[]) throws java.io.IOException;
    method public java.lang.String getContentEncoding();
    method public int getContentLength();
    method public java.lang.String getContentType();
    method public long getDate();
    method public static boolean getDefaultAllowUserInteraction();
    method public static deprecated java.lang.String getDefaultRequestProperty(java.lang.String);
    method public boolean getDefaultUseCaches();
    method public boolean getDoInput();
    method public boolean getDoOutput();
    method public long getExpiration();
    method public static java.net.FileNameMap getFileNameMap();
    method public java.lang.String getHeaderField(int);
    method public java.lang.String getHeaderField(java.lang.String);
    method public long getHeaderFieldDate(java.lang.String, long);
    method public int getHeaderFieldInt(java.lang.String, int);
    method public java.lang.String getHeaderFieldKey(int);
    method public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getHeaderFields();
    method public long getIfModifiedSince();
    method public java.io.InputStream getInputStream() throws java.io.IOException;
    method public long getLastModified();
    method public java.io.OutputStream getOutputStream() throws java.io.IOException;
    method public java.security.Permission getPermission() throws java.io.IOException;
    method public int getReadTimeout();
    method public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getRequestProperties();
    method public java.lang.String getRequestProperty(java.lang.String);
    method public java.net.URL getURL();
    method public boolean getUseCaches();
    method public static java.lang.String guessContentTypeFromName(java.lang.String);
    method public static java.lang.String guessContentTypeFromStream(java.io.InputStream) throws java.io.IOException;
    method public void setAllowUserInteraction(boolean);
    method public void setConnectTimeout(int);
    method public static synchronized void setContentHandlerFactory(java.net.ContentHandlerFactory);
    method public static void setDefaultAllowUserInteraction(boolean);
    method public static deprecated void setDefaultRequestProperty(java.lang.String, java.lang.String);
    method public void setDefaultUseCaches(boolean);
    method public void setDoInput(boolean);
    method public void setDoOutput(boolean);
    method public static void setFileNameMap(java.net.FileNameMap);
    method public void setIfModifiedSince(long);
    method public void setReadTimeout(int);
    method public void setRequestProperty(java.lang.String, java.lang.String);
    method public void setUseCaches(boolean);
    field protected boolean allowUserInteraction;
    field protected boolean connected;
    field protected boolean doInput;
    field protected boolean doOutput;
    field protected long ifModifiedSince;
    field protected java.net.URL url;
    field protected boolean useCaches;
  }

  public class URLDecoder {
    ctor public URLDecoder();
    method public static deprecated java.lang.String decode(java.lang.String);
    method public static java.lang.String decode(java.lang.String, java.lang.String) throws java.io.UnsupportedEncodingException;
  }

  public class URLEncoder {
    method public static deprecated java.lang.String encode(java.lang.String);
    method public static java.lang.String encode(java.lang.String, java.lang.String) throws java.io.UnsupportedEncodingException;
  }

  public abstract class URLStreamHandler {
    ctor public URLStreamHandler();
    method protected boolean equals(java.net.URL, java.net.URL);
    method protected int getDefaultPort();
    method protected java.net.InetAddress getHostAddress(java.net.URL);
    method protected int hashCode(java.net.URL);
    method protected boolean hostsEqual(java.net.URL, java.net.URL);
    method protected abstract java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException;
    method protected java.net.URLConnection openConnection(java.net.URL, java.net.Proxy) throws java.io.IOException;
    method protected void parseURL(java.net.URL, java.lang.String, int, int);
    method protected boolean sameFile(java.net.URL, java.net.URL);
    method protected deprecated void setURL(java.net.URL, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String);
    method protected void setURL(java.net.URL, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method protected java.lang.String toExternalForm(java.net.URL);
  }

  public abstract interface URLStreamHandlerFactory {
    method public abstract java.net.URLStreamHandler createURLStreamHandler(java.lang.String);
  }

  public class UnknownHostException extends java.io.IOException {
    ctor public UnknownHostException();
    ctor public UnknownHostException(java.lang.String);
  }

  public class UnknownServiceException extends java.io.IOException {
    ctor public UnknownServiceException();
    ctor public UnknownServiceException(java.lang.String);
  }

}

package java.nio {

  public abstract class Buffer {
    method public abstract java.lang.Object array();
    method public abstract int arrayOffset();
    method public final int capacity();
    method public final java.nio.Buffer clear();
    method public final java.nio.Buffer flip();
    method public abstract boolean hasArray();
    method public final boolean hasRemaining();
    method public abstract boolean isDirect();
    method public abstract boolean isReadOnly();
    method public final int limit();
    method public final java.nio.Buffer limit(int);
    method public final java.nio.Buffer mark();
    method public final int position();
    method public final java.nio.Buffer position(int);
    method public final int remaining();
    method public final java.nio.Buffer reset();
    method public final java.nio.Buffer rewind();
  }

  public class BufferOverflowException extends java.lang.RuntimeException {
    ctor public BufferOverflowException();
  }

  public class BufferUnderflowException extends java.lang.RuntimeException {
    ctor public BufferUnderflowException();
  }

  public abstract class ByteBuffer extends java.nio.Buffer implements java.lang.Comparable {
    method public static java.nio.ByteBuffer allocate(int);
    method public static java.nio.ByteBuffer allocateDirect(int);
    method public final byte[] array();
    method public final int arrayOffset();
    method public abstract java.nio.CharBuffer asCharBuffer();
    method public abstract java.nio.DoubleBuffer asDoubleBuffer();
    method public abstract java.nio.FloatBuffer asFloatBuffer();
    method public abstract java.nio.IntBuffer asIntBuffer();
    method public abstract java.nio.LongBuffer asLongBuffer();
    method public abstract java.nio.ByteBuffer asReadOnlyBuffer();
    method public abstract java.nio.ShortBuffer asShortBuffer();
    method public abstract java.nio.ByteBuffer compact();
    method public int compareTo(java.nio.ByteBuffer);
    method public abstract java.nio.ByteBuffer duplicate();
    method public abstract byte get();
    method public java.nio.ByteBuffer get(byte[]);
    method public java.nio.ByteBuffer get(byte[], int, int);
    method public abstract byte get(int);
    method public abstract char getChar();
    method public abstract char getChar(int);
    method public abstract double getDouble();
    method public abstract double getDouble(int);
    method public abstract float getFloat();
    method public abstract float getFloat(int);
    method public abstract int getInt();
    method public abstract int getInt(int);
    method public abstract long getLong();
    method public abstract long getLong(int);
    method public abstract short getShort();
    method public abstract short getShort(int);
    method public final boolean hasArray();
    method public abstract boolean isDirect();
    method public final java.nio.ByteOrder order();
    method public final java.nio.ByteBuffer order(java.nio.ByteOrder);
    method public abstract java.nio.ByteBuffer put(byte);
    method public final java.nio.ByteBuffer put(byte[]);
    method public java.nio.ByteBuffer put(byte[], int, int);
    method public java.nio.ByteBuffer put(java.nio.ByteBuffer);
    method public abstract java.nio.ByteBuffer put(int, byte);
    method public abstract java.nio.ByteBuffer putChar(char);
    method public abstract java.nio.ByteBuffer putChar(int, char);
    method public abstract java.nio.ByteBuffer putDouble(double);
    method public abstract java.nio.ByteBuffer putDouble(int, double);
    method public abstract java.nio.ByteBuffer putFloat(float);
    method public abstract java.nio.ByteBuffer putFloat(int, float);
    method public abstract java.nio.ByteBuffer putInt(int);
    method public abstract java.nio.ByteBuffer putInt(int, int);
    method public abstract java.nio.ByteBuffer putLong(long);
    method public abstract java.nio.ByteBuffer putLong(int, long);
    method public abstract java.nio.ByteBuffer putShort(short);
    method public abstract java.nio.ByteBuffer putShort(int, short);
    method public abstract java.nio.ByteBuffer slice();
    method public static java.nio.ByteBuffer wrap(byte[]);
    method public static java.nio.ByteBuffer wrap(byte[], int, int);
  }

  public final class ByteOrder {
    method public static java.nio.ByteOrder nativeOrder();
    field public static final java.nio.ByteOrder BIG_ENDIAN;
    field public static final java.nio.ByteOrder LITTLE_ENDIAN;
  }

  public abstract class CharBuffer extends java.nio.Buffer implements java.lang.Appendable java.lang.CharSequence java.lang.Comparable java.lang.Readable {
    method public static java.nio.CharBuffer allocate(int);
    method public java.nio.CharBuffer append(char);
    method public java.nio.CharBuffer append(java.lang.CharSequence);
    method public java.nio.CharBuffer append(java.lang.CharSequence, int, int);
    method public final char[] array();
    method public final int arrayOffset();
    method public abstract java.nio.CharBuffer asReadOnlyBuffer();
    method public final char charAt(int);
    method public abstract java.nio.CharBuffer compact();
    method public int compareTo(java.nio.CharBuffer);
    method public abstract java.nio.CharBuffer duplicate();
    method public abstract char get();
    method public java.nio.CharBuffer get(char[]);
    method public java.nio.CharBuffer get(char[], int, int);
    method public abstract char get(int);
    method public final boolean hasArray();
    method public abstract boolean isDirect();
    method public final int length();
    method public abstract java.nio.ByteOrder order();
    method public abstract java.nio.CharBuffer put(char);
    method public final java.nio.CharBuffer put(char[]);
    method public java.nio.CharBuffer put(char[], int, int);
    method public java.nio.CharBuffer put(java.nio.CharBuffer);
    method public abstract java.nio.CharBuffer put(int, char);
    method public final java.nio.CharBuffer put(java.lang.String);
    method public java.nio.CharBuffer put(java.lang.String, int, int);
    method public int read(java.nio.CharBuffer) throws java.io.IOException;
    method public abstract java.nio.CharBuffer slice();
    method public abstract java.nio.CharBuffer subSequence(int, int);
    method public static java.nio.CharBuffer wrap(char[]);
    method public static java.nio.CharBuffer wrap(char[], int, int);
    method public static java.nio.CharBuffer wrap(java.lang.CharSequence);
    method public static java.nio.CharBuffer wrap(java.lang.CharSequence, int, int);
  }

  public abstract class DoubleBuffer extends java.nio.Buffer implements java.lang.Comparable {
    method public static java.nio.DoubleBuffer allocate(int);
    method public final double[] array();
    method public final int arrayOffset();
    method public abstract java.nio.DoubleBuffer asReadOnlyBuffer();
    method public abstract java.nio.DoubleBuffer compact();
    method public int compareTo(java.nio.DoubleBuffer);
    method public abstract java.nio.DoubleBuffer duplicate();
    method public abstract double get();
    method public java.nio.DoubleBuffer get(double[]);
    method public java.nio.DoubleBuffer get(double[], int, int);
    method public abstract double get(int);
    method public final boolean hasArray();
    method public abstract boolean isDirect();
    method public abstract java.nio.ByteOrder order();
    method public abstract java.nio.DoubleBuffer put(double);
    method public final java.nio.DoubleBuffer put(double[]);
    method public java.nio.DoubleBuffer put(double[], int, int);
    method public java.nio.DoubleBuffer put(java.nio.DoubleBuffer);
    method public abstract java.nio.DoubleBuffer put(int, double);
    method public abstract java.nio.DoubleBuffer slice();
    method public static java.nio.DoubleBuffer wrap(double[]);
    method public static java.nio.DoubleBuffer wrap(double[], int, int);
  }

  public abstract class FloatBuffer extends java.nio.Buffer implements java.lang.Comparable {
    method public static java.nio.FloatBuffer allocate(int);
    method public final float[] array();
    method public final int arrayOffset();
    method public abstract java.nio.FloatBuffer asReadOnlyBuffer();
    method public abstract java.nio.FloatBuffer compact();
    method public int compareTo(java.nio.FloatBuffer);
    method public abstract java.nio.FloatBuffer duplicate();
    method public abstract float get();
    method public java.nio.FloatBuffer get(float[]);
    method public java.nio.FloatBuffer get(float[], int, int);
    method public abstract float get(int);
    method public final boolean hasArray();
    method public abstract boolean isDirect();
    method public abstract java.nio.ByteOrder order();
    method public abstract java.nio.FloatBuffer put(float);
    method public final java.nio.FloatBuffer put(float[]);
    method public java.nio.FloatBuffer put(float[], int, int);
    method public java.nio.FloatBuffer put(java.nio.FloatBuffer);
    method public abstract java.nio.FloatBuffer put(int, float);
    method public abstract java.nio.FloatBuffer slice();
    method public static java.nio.FloatBuffer wrap(float[]);
    method public static java.nio.FloatBuffer wrap(float[], int, int);
  }

  public abstract class IntBuffer extends java.nio.Buffer implements java.lang.Comparable {
    method public static java.nio.IntBuffer allocate(int);
    method public final int[] array();
    method public final int arrayOffset();
    method public abstract java.nio.IntBuffer asReadOnlyBuffer();
    method public abstract java.nio.IntBuffer compact();
    method public int compareTo(java.nio.IntBuffer);
    method public abstract java.nio.IntBuffer duplicate();
    method public abstract int get();
    method public java.nio.IntBuffer get(int[]);
    method public java.nio.IntBuffer get(int[], int, int);
    method public abstract int get(int);
    method public final boolean hasArray();
    method public abstract boolean isDirect();
    method public abstract java.nio.ByteOrder order();
    method public abstract java.nio.IntBuffer put(int);
    method public final java.nio.IntBuffer put(int[]);
    method public java.nio.IntBuffer put(int[], int, int);
    method public java.nio.IntBuffer put(java.nio.IntBuffer);
    method public abstract java.nio.IntBuffer put(int, int);
    method public abstract java.nio.IntBuffer slice();
    method public static java.nio.IntBuffer wrap(int[]);
    method public static java.nio.IntBuffer wrap(int[], int, int);
  }

  public class InvalidMarkException extends java.lang.IllegalStateException {
    ctor public InvalidMarkException();
  }

  public abstract class LongBuffer extends java.nio.Buffer implements java.lang.Comparable {
    method public static java.nio.LongBuffer allocate(int);
    method public final long[] array();
    method public final int arrayOffset();
    method public abstract java.nio.LongBuffer asReadOnlyBuffer();
    method public abstract java.nio.LongBuffer compact();
    method public int compareTo(java.nio.LongBuffer);
    method public abstract java.nio.LongBuffer duplicate();
    method public abstract long get();
    method public java.nio.LongBuffer get(long[]);
    method public java.nio.LongBuffer get(long[], int, int);
    method public abstract long get(int);
    method public final boolean hasArray();
    method public abstract boolean isDirect();
    method public abstract java.nio.ByteOrder order();
    method public abstract java.nio.LongBuffer put(long);
    method public final java.nio.LongBuffer put(long[]);
    method public java.nio.LongBuffer put(long[], int, int);
    method public java.nio.LongBuffer put(java.nio.LongBuffer);
    method public abstract java.nio.LongBuffer put(int, long);
    method public abstract java.nio.LongBuffer slice();
    method public static java.nio.LongBuffer wrap(long[]);
    method public static java.nio.LongBuffer wrap(long[], int, int);
  }

  public abstract class MappedByteBuffer extends java.nio.ByteBuffer {
    method public final java.nio.MappedByteBuffer force();
    method public final boolean isLoaded();
    method public final java.nio.MappedByteBuffer load();
  }

  public class ReadOnlyBufferException extends java.lang.UnsupportedOperationException {
    ctor public ReadOnlyBufferException();
  }

  public abstract class ShortBuffer extends java.nio.Buffer implements java.lang.Comparable {
    method public static java.nio.ShortBuffer allocate(int);
    method public final short[] array();
    method public final int arrayOffset();
    method public abstract java.nio.ShortBuffer asReadOnlyBuffer();
    method public abstract java.nio.ShortBuffer compact();
    method public int compareTo(java.nio.ShortBuffer);
    method public abstract java.nio.ShortBuffer duplicate();
    method public abstract short get();
    method public java.nio.ShortBuffer get(short[]);
    method public java.nio.ShortBuffer get(short[], int, int);
    method public abstract short get(int);
    method public final boolean hasArray();
    method public abstract boolean isDirect();
    method public abstract java.nio.ByteOrder order();
    method public abstract java.nio.ShortBuffer put(short);
    method public final java.nio.ShortBuffer put(short[]);
    method public java.nio.ShortBuffer put(short[], int, int);
    method public java.nio.ShortBuffer put(java.nio.ShortBuffer);
    method public abstract java.nio.ShortBuffer put(int, short);
    method public abstract java.nio.ShortBuffer slice();
    method public static java.nio.ShortBuffer wrap(short[]);
    method public static java.nio.ShortBuffer wrap(short[], int, int);
  }

}

package java.nio.channels {

  public class AlreadyConnectedException extends java.lang.IllegalStateException {
    ctor public AlreadyConnectedException();
  }

  public class AsynchronousCloseException extends java.nio.channels.ClosedChannelException {
    ctor public AsynchronousCloseException();
  }

  public abstract interface ByteChannel implements java.nio.channels.ReadableByteChannel java.nio.channels.WritableByteChannel {
  }

  public class CancelledKeyException extends java.lang.IllegalStateException {
    ctor public CancelledKeyException();
  }

  public abstract interface Channel implements java.io.Closeable {
    method public abstract void close() throws java.io.IOException;
    method public abstract boolean isOpen();
  }

  public final class Channels {
    method public static java.nio.channels.ReadableByteChannel newChannel(java.io.InputStream);
    method public static java.nio.channels.WritableByteChannel newChannel(java.io.OutputStream);
    method public static java.io.InputStream newInputStream(java.nio.channels.ReadableByteChannel);
    method public static java.io.OutputStream newOutputStream(java.nio.channels.WritableByteChannel);
    method public static java.io.Reader newReader(java.nio.channels.ReadableByteChannel, java.nio.charset.CharsetDecoder, int);
    method public static java.io.Reader newReader(java.nio.channels.ReadableByteChannel, java.lang.String);
    method public static java.io.Writer newWriter(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int);
    method public static java.io.Writer newWriter(java.nio.channels.WritableByteChannel, java.lang.String);
  }

  public class ClosedByInterruptException extends java.nio.channels.AsynchronousCloseException {
    ctor public ClosedByInterruptException();
  }

  public class ClosedChannelException extends java.io.IOException {
    ctor public ClosedChannelException();
  }

  public class ClosedSelectorException extends java.lang.IllegalStateException {
    ctor public ClosedSelectorException();
  }

  public class ConnectionPendingException extends java.lang.IllegalStateException {
    ctor public ConnectionPendingException();
  }

  public abstract class DatagramChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ByteChannel java.nio.channels.GatheringByteChannel java.nio.channels.ScatteringByteChannel {
    ctor protected DatagramChannel(java.nio.channels.spi.SelectorProvider);
    method public abstract java.nio.channels.DatagramChannel connect(java.net.SocketAddress) throws java.io.IOException;
    method public abstract java.nio.channels.DatagramChannel disconnect() throws java.io.IOException;
    method public abstract boolean isConnected();
    method public static java.nio.channels.DatagramChannel open() throws java.io.IOException;
    method public abstract int read(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract long read(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
    method public final synchronized long read(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract java.net.SocketAddress receive(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract int send(java.nio.ByteBuffer, java.net.SocketAddress) throws java.io.IOException;
    method public abstract java.net.DatagramSocket socket();
    method public final int validOps();
    method public abstract int write(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract long write(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
    method public final synchronized long write(java.nio.ByteBuffer[]) throws java.io.IOException;
  }

  public abstract class FileChannel extends java.nio.channels.spi.AbstractInterruptibleChannel implements java.nio.channels.ByteChannel java.nio.channels.GatheringByteChannel java.nio.channels.ScatteringByteChannel {
    ctor protected FileChannel();
    method public abstract void force(boolean) throws java.io.IOException;
    method public final java.nio.channels.FileLock lock() throws java.io.IOException;
    method public abstract java.nio.channels.FileLock lock(long, long, boolean) throws java.io.IOException;
    method public abstract java.nio.MappedByteBuffer map(java.nio.channels.FileChannel.MapMode, long, long) throws java.io.IOException;
    method public abstract long position() throws java.io.IOException;
    method public abstract java.nio.channels.FileChannel position(long) throws java.io.IOException;
    method public abstract int read(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract int read(java.nio.ByteBuffer, long) throws java.io.IOException;
    method public final long read(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract long read(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
    method public abstract long size() throws java.io.IOException;
    method public abstract long transferFrom(java.nio.channels.ReadableByteChannel, long, long) throws java.io.IOException;
    method public abstract long transferTo(long, long, java.nio.channels.WritableByteChannel) throws java.io.IOException;
    method public abstract java.nio.channels.FileChannel truncate(long) throws java.io.IOException;
    method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
    method public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOException;
    method public abstract int write(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract int write(java.nio.ByteBuffer, long) throws java.io.IOException;
    method public final long write(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract long write(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
  }

  public static class FileChannel.MapMode {
    field public static final java.nio.channels.FileChannel.MapMode PRIVATE;
    field public static final java.nio.channels.FileChannel.MapMode READ_ONLY;
    field public static final java.nio.channels.FileChannel.MapMode READ_WRITE;
  }

  public abstract class FileLock implements java.lang.AutoCloseable {
    ctor protected FileLock(java.nio.channels.FileChannel, long, long, boolean);
    method public final java.nio.channels.FileChannel channel();
    method public final void close() throws java.io.IOException;
    method public final boolean isShared();
    method public abstract boolean isValid();
    method public final boolean overlaps(long, long);
    method public final long position();
    method public abstract void release() throws java.io.IOException;
    method public final long size();
    method public final java.lang.String toString();
  }

  public class FileLockInterruptionException extends java.io.IOException {
    ctor public FileLockInterruptionException();
  }

  public abstract interface GatheringByteChannel implements java.nio.channels.WritableByteChannel {
    method public abstract long write(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract long write(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
  }

  public class IllegalBlockingModeException extends java.lang.IllegalStateException {
    ctor public IllegalBlockingModeException();
  }

  public class IllegalSelectorException extends java.lang.IllegalArgumentException {
    ctor public IllegalSelectorException();
  }

  public abstract interface InterruptibleChannel implements java.nio.channels.Channel {
    method public abstract void close() throws java.io.IOException;
  }

  public class NoConnectionPendingException extends java.lang.IllegalStateException {
    ctor public NoConnectionPendingException();
  }

  public class NonReadableChannelException extends java.lang.IllegalStateException {
    ctor public NonReadableChannelException();
  }

  public class NonWritableChannelException extends java.lang.IllegalStateException {
    ctor public NonWritableChannelException();
  }

  public class NotYetBoundException extends java.lang.IllegalStateException {
    ctor public NotYetBoundException();
  }

  public class NotYetConnectedException extends java.lang.IllegalStateException {
    ctor public NotYetConnectedException();
  }

  public class OverlappingFileLockException extends java.lang.IllegalStateException {
    ctor public OverlappingFileLockException();
  }

  public abstract class Pipe {
    ctor protected Pipe();
    method public static java.nio.channels.Pipe open() throws java.io.IOException;
    method public abstract java.nio.channels.Pipe.SinkChannel sink();
    method public abstract java.nio.channels.Pipe.SourceChannel source();
  }

  public static abstract class Pipe.SinkChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.GatheringByteChannel java.nio.channels.WritableByteChannel {
    ctor protected Pipe.SinkChannel(java.nio.channels.spi.SelectorProvider);
    method public final int validOps();
  }

  public static abstract class Pipe.SourceChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ReadableByteChannel java.nio.channels.ScatteringByteChannel {
    ctor protected Pipe.SourceChannel(java.nio.channels.spi.SelectorProvider);
    method public final int validOps();
  }

  public abstract interface ReadableByteChannel implements java.nio.channels.Channel {
    method public abstract int read(java.nio.ByteBuffer) throws java.io.IOException;
  }

  public abstract interface ScatteringByteChannel implements java.nio.channels.ReadableByteChannel {
    method public abstract long read(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract long read(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
  }

  public abstract class SelectableChannel extends java.nio.channels.spi.AbstractInterruptibleChannel implements java.nio.channels.Channel {
    ctor protected SelectableChannel();
    method public abstract java.lang.Object blockingLock();
    method public abstract java.nio.channels.SelectableChannel configureBlocking(boolean) throws java.io.IOException;
    method public abstract boolean isBlocking();
    method public abstract boolean isRegistered();
    method public abstract java.nio.channels.SelectionKey keyFor(java.nio.channels.Selector);
    method public abstract java.nio.channels.spi.SelectorProvider provider();
    method public final java.nio.channels.SelectionKey register(java.nio.channels.Selector, int) throws java.nio.channels.ClosedChannelException;
    method public abstract java.nio.channels.SelectionKey register(java.nio.channels.Selector, int, java.lang.Object) throws java.nio.channels.ClosedChannelException;
    method public abstract int validOps();
  }

  public abstract class SelectionKey {
    ctor protected SelectionKey();
    method public final java.lang.Object attach(java.lang.Object);
    method public final java.lang.Object attachment();
    method public abstract void cancel();
    method public abstract java.nio.channels.SelectableChannel channel();
    method public abstract int interestOps();
    method public abstract java.nio.channels.SelectionKey interestOps(int);
    method public final boolean isAcceptable();
    method public final boolean isConnectable();
    method public final boolean isReadable();
    method public abstract boolean isValid();
    method public final boolean isWritable();
    method public abstract int readyOps();
    method public abstract java.nio.channels.Selector selector();
    field public static final int OP_ACCEPT = 16; // 0x10
    field public static final int OP_CONNECT = 8; // 0x8
    field public static final int OP_READ = 1; // 0x1
    field public static final int OP_WRITE = 4; // 0x4
  }

  public abstract class Selector implements java.io.Closeable {
    ctor protected Selector();
    method public abstract void close() throws java.io.IOException;
    method public abstract boolean isOpen();
    method public abstract java.util.Set<java.nio.channels.SelectionKey> keys();
    method public static java.nio.channels.Selector open() throws java.io.IOException;
    method public abstract java.nio.channels.spi.SelectorProvider provider();
    method public abstract int select() throws java.io.IOException;
    method public abstract int select(long) throws java.io.IOException;
    method public abstract int selectNow() throws java.io.IOException;
    method public abstract java.util.Set<java.nio.channels.SelectionKey> selectedKeys();
    method public abstract java.nio.channels.Selector wakeup();
  }

  public abstract class ServerSocketChannel extends java.nio.channels.spi.AbstractSelectableChannel {
    ctor protected ServerSocketChannel(java.nio.channels.spi.SelectorProvider);
    method public abstract java.nio.channels.SocketChannel accept() throws java.io.IOException;
    method public static java.nio.channels.ServerSocketChannel open() throws java.io.IOException;
    method public abstract java.net.ServerSocket socket();
    method public final int validOps();
  }

  public abstract class SocketChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ByteChannel java.nio.channels.GatheringByteChannel java.nio.channels.ScatteringByteChannel {
    ctor protected SocketChannel(java.nio.channels.spi.SelectorProvider);
    method public abstract boolean connect(java.net.SocketAddress) throws java.io.IOException;
    method public abstract boolean finishConnect() throws java.io.IOException;
    method public abstract boolean isConnected();
    method public abstract boolean isConnectionPending();
    method public static java.nio.channels.SocketChannel open() throws java.io.IOException;
    method public static java.nio.channels.SocketChannel open(java.net.SocketAddress) throws java.io.IOException;
    method public abstract int read(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract long read(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
    method public final synchronized long read(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract java.net.Socket socket();
    method public final int validOps();
    method public abstract int write(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract long write(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
    method public final synchronized long write(java.nio.ByteBuffer[]) throws java.io.IOException;
  }

  public class UnresolvedAddressException extends java.lang.IllegalArgumentException {
    ctor public UnresolvedAddressException();
  }

  public class UnsupportedAddressTypeException extends java.lang.IllegalArgumentException {
    ctor public UnsupportedAddressTypeException();
  }

  public abstract interface WritableByteChannel implements java.nio.channels.Channel {
    method public abstract int write(java.nio.ByteBuffer) throws java.io.IOException;
  }

}

package java.nio.channels.spi {

  public abstract class AbstractInterruptibleChannel implements java.nio.channels.Channel java.nio.channels.InterruptibleChannel {
    ctor protected AbstractInterruptibleChannel();
    method protected final void begin();
    method public final void close() throws java.io.IOException;
    method protected final void end(boolean) throws java.nio.channels.AsynchronousCloseException;
    method protected abstract void implCloseChannel() throws java.io.IOException;
    method public final synchronized boolean isOpen();
  }

  public abstract class AbstractSelectableChannel extends java.nio.channels.SelectableChannel {
    ctor protected AbstractSelectableChannel(java.nio.channels.spi.SelectorProvider);
    method public final java.lang.Object blockingLock();
    method public final java.nio.channels.SelectableChannel configureBlocking(boolean) throws java.io.IOException;
    method protected final synchronized void implCloseChannel() throws java.io.IOException;
    method protected abstract void implCloseSelectableChannel() throws java.io.IOException;
    method protected abstract void implConfigureBlocking(boolean) throws java.io.IOException;
    method public final boolean isBlocking();
    method public final synchronized boolean isRegistered();
    method public final synchronized java.nio.channels.SelectionKey keyFor(java.nio.channels.Selector);
    method public final java.nio.channels.spi.SelectorProvider provider();
    method public final java.nio.channels.SelectionKey register(java.nio.channels.Selector, int, java.lang.Object) throws java.nio.channels.ClosedChannelException;
  }

  public abstract class AbstractSelectionKey extends java.nio.channels.SelectionKey {
    ctor protected AbstractSelectionKey();
    method public final void cancel();
    method public final boolean isValid();
  }

  public abstract class AbstractSelector extends java.nio.channels.Selector {
    ctor protected AbstractSelector(java.nio.channels.spi.SelectorProvider);
    method protected final void begin();
    method protected final java.util.Set<java.nio.channels.SelectionKey> cancelledKeys();
    method public final void close() throws java.io.IOException;
    method protected final void deregister(java.nio.channels.spi.AbstractSelectionKey);
    method protected final void end();
    method protected abstract void implCloseSelector() throws java.io.IOException;
    method public final boolean isOpen();
    method public final java.nio.channels.spi.SelectorProvider provider();
    method protected abstract java.nio.channels.SelectionKey register(java.nio.channels.spi.AbstractSelectableChannel, int, java.lang.Object);
  }

  public abstract class SelectorProvider {
    ctor protected SelectorProvider();
    method public java.nio.channels.Channel inheritedChannel() throws java.io.IOException;
    method public abstract java.nio.channels.DatagramChannel openDatagramChannel() throws java.io.IOException;
    method public abstract java.nio.channels.Pipe openPipe() throws java.io.IOException;
    method public abstract java.nio.channels.spi.AbstractSelector openSelector() throws java.io.IOException;
    method public abstract java.nio.channels.ServerSocketChannel openServerSocketChannel() throws java.io.IOException;
    method public abstract java.nio.channels.SocketChannel openSocketChannel() throws java.io.IOException;
    method public static synchronized java.nio.channels.spi.SelectorProvider provider();
  }

}

package java.nio.charset {

  public class CharacterCodingException extends java.io.IOException {
    ctor public CharacterCodingException();
  }

  public abstract class Charset implements java.lang.Comparable {
    ctor protected Charset(java.lang.String, java.lang.String[]);
    method public final java.util.Set<java.lang.String> aliases();
    method public static java.util.SortedMap<java.lang.String, java.nio.charset.Charset> availableCharsets();
    method public boolean canEncode();
    method public final int compareTo(java.nio.charset.Charset);
    method public abstract boolean contains(java.nio.charset.Charset);
    method public final java.nio.CharBuffer decode(java.nio.ByteBuffer);
    method public static java.nio.charset.Charset defaultCharset();
    method public java.lang.String displayName();
    method public java.lang.String displayName(java.util.Locale);
    method public final java.nio.ByteBuffer encode(java.nio.CharBuffer);
    method public final java.nio.ByteBuffer encode(java.lang.String);
    method public final boolean equals(java.lang.Object);
    method public static java.nio.charset.Charset forName(java.lang.String);
    method public final int hashCode();
    method public final boolean isRegistered();
    method public static boolean isSupported(java.lang.String);
    method public final java.lang.String name();
    method public abstract java.nio.charset.CharsetDecoder newDecoder();
    method public abstract java.nio.charset.CharsetEncoder newEncoder();
    method public final java.lang.String toString();
  }

  public abstract class CharsetDecoder {
    ctor protected CharsetDecoder(java.nio.charset.Charset, float, float);
    method public final float averageCharsPerByte();
    method public final java.nio.charset.Charset charset();
    method public final java.nio.CharBuffer decode(java.nio.ByteBuffer) throws java.nio.charset.CharacterCodingException;
    method public final java.nio.charset.CoderResult decode(java.nio.ByteBuffer, java.nio.CharBuffer, boolean);
    method protected abstract java.nio.charset.CoderResult decodeLoop(java.nio.ByteBuffer, java.nio.CharBuffer);
    method public java.nio.charset.Charset detectedCharset();
    method public final java.nio.charset.CoderResult flush(java.nio.CharBuffer);
    method protected java.nio.charset.CoderResult implFlush(java.nio.CharBuffer);
    method protected void implOnMalformedInput(java.nio.charset.CodingErrorAction);
    method protected void implOnUnmappableCharacter(java.nio.charset.CodingErrorAction);
    method protected void implReplaceWith(java.lang.String);
    method protected void implReset();
    method public boolean isAutoDetecting();
    method public boolean isCharsetDetected();
    method public java.nio.charset.CodingErrorAction malformedInputAction();
    method public final float maxCharsPerByte();
    method public final java.nio.charset.CharsetDecoder onMalformedInput(java.nio.charset.CodingErrorAction);
    method public final java.nio.charset.CharsetDecoder onUnmappableCharacter(java.nio.charset.CodingErrorAction);
    method public final java.nio.charset.CharsetDecoder replaceWith(java.lang.String);
    method public final java.lang.String replacement();
    method public final java.nio.charset.CharsetDecoder reset();
    method public java.nio.charset.CodingErrorAction unmappableCharacterAction();
  }

  public abstract class CharsetEncoder {
    ctor protected CharsetEncoder(java.nio.charset.Charset, float, float);
    ctor protected CharsetEncoder(java.nio.charset.Charset, float, float, byte[]);
    method public final float averageBytesPerChar();
    method public boolean canEncode(char);
    method public boolean canEncode(java.lang.CharSequence);
    method public final java.nio.charset.Charset charset();
    method public final java.nio.ByteBuffer encode(java.nio.CharBuffer) throws java.nio.charset.CharacterCodingException;
    method public final java.nio.charset.CoderResult encode(java.nio.CharBuffer, java.nio.ByteBuffer, boolean);
    method protected abstract java.nio.charset.CoderResult encodeLoop(java.nio.CharBuffer, java.nio.ByteBuffer);
    method public final java.nio.charset.CoderResult flush(java.nio.ByteBuffer);
    method protected java.nio.charset.CoderResult implFlush(java.nio.ByteBuffer);
    method protected void implOnMalformedInput(java.nio.charset.CodingErrorAction);
    method protected void implOnUnmappableCharacter(java.nio.charset.CodingErrorAction);
    method protected void implReplaceWith(byte[]);
    method protected void implReset();
    method public boolean isLegalReplacement(byte[]);
    method public java.nio.charset.CodingErrorAction malformedInputAction();
    method public final float maxBytesPerChar();
    method public final java.nio.charset.CharsetEncoder onMalformedInput(java.nio.charset.CodingErrorAction);
    method public final java.nio.charset.CharsetEncoder onUnmappableCharacter(java.nio.charset.CodingErrorAction);
    method public final java.nio.charset.CharsetEncoder replaceWith(byte[]);
    method public final byte[] replacement();
    method public final java.nio.charset.CharsetEncoder reset();
    method public java.nio.charset.CodingErrorAction unmappableCharacterAction();
  }

  public class CoderMalfunctionError extends java.lang.Error {
    ctor public CoderMalfunctionError(java.lang.Exception);
  }

  public class CoderResult {
    method public boolean isError();
    method public boolean isMalformed();
    method public boolean isOverflow();
    method public boolean isUnderflow();
    method public boolean isUnmappable();
    method public int length() throws java.lang.UnsupportedOperationException;
    method public static synchronized java.nio.charset.CoderResult malformedForLength(int) throws java.lang.IllegalArgumentException;
    method public void throwException() throws java.nio.BufferOverflowException, java.nio.BufferUnderflowException, java.nio.charset.CharacterCodingException, java.nio.charset.MalformedInputException, java.nio.charset.UnmappableCharacterException;
    method public static synchronized java.nio.charset.CoderResult unmappableForLength(int) throws java.lang.IllegalArgumentException;
    field public static final java.nio.charset.CoderResult OVERFLOW;
    field public static final java.nio.charset.CoderResult UNDERFLOW;
  }

  public class CodingErrorAction {
    field public static final java.nio.charset.CodingErrorAction IGNORE;
    field public static final java.nio.charset.CodingErrorAction REPLACE;
    field public static final java.nio.charset.CodingErrorAction REPORT;
  }

  public class IllegalCharsetNameException extends java.lang.IllegalArgumentException {
    ctor public IllegalCharsetNameException(java.lang.String);
    method public java.lang.String getCharsetName();
  }

  public class MalformedInputException extends java.nio.charset.CharacterCodingException {
    ctor public MalformedInputException(int);
    method public int getInputLength();
  }

  public final class StandardCharsets {
    field public static final java.nio.charset.Charset ISO_8859_1;
    field public static final java.nio.charset.Charset US_ASCII;
    field public static final java.nio.charset.Charset UTF_16;
    field public static final java.nio.charset.Charset UTF_16BE;
    field public static final java.nio.charset.Charset UTF_16LE;
    field public static final java.nio.charset.Charset UTF_8;
  }

  public class UnmappableCharacterException extends java.nio.charset.CharacterCodingException {
    ctor public UnmappableCharacterException(int);
    method public int getInputLength();
  }

  public class UnsupportedCharsetException extends java.lang.IllegalArgumentException {
    ctor public UnsupportedCharsetException(java.lang.String);
    method public java.lang.String getCharsetName();
  }

}

package java.nio.charset.spi {

  public abstract class CharsetProvider {
    ctor protected CharsetProvider();
    method public abstract java.nio.charset.Charset charsetForName(java.lang.String);
    method public abstract java.util.Iterator<java.nio.charset.Charset> charsets();
  }

}

package java.security {

  public final class AccessControlContext {
    ctor public AccessControlContext(java.security.AccessControlContext, java.security.DomainCombiner);
    ctor public AccessControlContext(java.security.ProtectionDomain[]);
    method public void checkPermission(java.security.Permission) throws java.security.AccessControlException;
    method public java.security.DomainCombiner getDomainCombiner();
  }

  public class AccessControlException extends java.lang.SecurityException {
    ctor public AccessControlException(java.lang.String);
    ctor public AccessControlException(java.lang.String, java.security.Permission);
    method public java.security.Permission getPermission();
  }

  public final class AccessController {
    method public static void checkPermission(java.security.Permission) throws java.security.AccessControlException;
    method public static T doPrivileged(java.security.PrivilegedAction<T>);
    method public static T doPrivileged(java.security.PrivilegedAction<T>, java.security.AccessControlContext);
    method public static T doPrivileged(java.security.PrivilegedExceptionAction<T>) throws java.security.PrivilegedActionException;
    method public static T doPrivileged(java.security.PrivilegedExceptionAction<T>, java.security.AccessControlContext) throws java.security.PrivilegedActionException;
    method public static T doPrivilegedWithCombiner(java.security.PrivilegedAction<T>);
    method public static T doPrivilegedWithCombiner(java.security.PrivilegedExceptionAction<T>) throws java.security.PrivilegedActionException;
    method public static java.security.AccessControlContext getContext();
  }

  public class AlgorithmParameterGenerator {
    ctor protected AlgorithmParameterGenerator(java.security.AlgorithmParameterGeneratorSpi, java.security.Provider, java.lang.String);
    method public final java.security.AlgorithmParameters generateParameters();
    method public final java.lang.String getAlgorithm();
    method public static java.security.AlgorithmParameterGenerator getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.AlgorithmParameterGenerator getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.AlgorithmParameterGenerator getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public final void init(int);
    method public final void init(int, java.security.SecureRandom);
    method public final void init(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
    method public final void init(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
  }

  public abstract class AlgorithmParameterGeneratorSpi {
    ctor public AlgorithmParameterGeneratorSpi();
    method protected abstract java.security.AlgorithmParameters engineGenerateParameters();
    method protected abstract void engineInit(int, java.security.SecureRandom);
    method protected abstract void engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
  }

  public class AlgorithmParameters {
    ctor protected AlgorithmParameters(java.security.AlgorithmParametersSpi, java.security.Provider, java.lang.String);
    method public final java.lang.String getAlgorithm();
    method public final byte[] getEncoded() throws java.io.IOException;
    method public final byte[] getEncoded(java.lang.String) throws java.io.IOException;
    method public static java.security.AlgorithmParameters getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.AlgorithmParameters getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.AlgorithmParameters getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final T getParameterSpec(java.lang.Class<T>) throws java.security.spec.InvalidParameterSpecException;
    method public final java.security.Provider getProvider();
    method public final void init(java.security.spec.AlgorithmParameterSpec) throws java.security.spec.InvalidParameterSpecException;
    method public final void init(byte[]) throws java.io.IOException;
    method public final void init(byte[], java.lang.String) throws java.io.IOException;
    method public final java.lang.String toString();
  }

  public abstract class AlgorithmParametersSpi {
    ctor public AlgorithmParametersSpi();
    method protected abstract byte[] engineGetEncoded() throws java.io.IOException;
    method protected abstract byte[] engineGetEncoded(java.lang.String) throws java.io.IOException;
    method protected abstract T engineGetParameterSpec(java.lang.Class<T>) throws java.security.spec.InvalidParameterSpecException;
    method protected abstract void engineInit(java.security.spec.AlgorithmParameterSpec) throws java.security.spec.InvalidParameterSpecException;
    method protected abstract void engineInit(byte[]) throws java.io.IOException;
    method protected abstract void engineInit(byte[], java.lang.String) throws java.io.IOException;
    method protected abstract java.lang.String engineToString();
  }

  public final class AllPermission extends java.security.Permission {
    ctor public AllPermission(java.lang.String, java.lang.String);
    ctor public AllPermission();
    method public java.lang.String getActions();
    method public boolean implies(java.security.Permission);
  }

  public abstract class AuthProvider extends java.security.Provider {
    ctor protected AuthProvider(java.lang.String, double, java.lang.String);
    method public abstract void login(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler) throws javax.security.auth.login.LoginException;
    method public abstract void logout() throws javax.security.auth.login.LoginException;
    method public abstract void setCallbackHandler(javax.security.auth.callback.CallbackHandler);
  }

  public abstract class BasicPermission extends java.security.Permission implements java.io.Serializable {
    ctor public BasicPermission(java.lang.String);
    ctor public BasicPermission(java.lang.String, java.lang.String);
    method public java.lang.String getActions();
    method public boolean implies(java.security.Permission);
  }

  public abstract deprecated interface Certificate {
    method public abstract void decode(java.io.InputStream) throws java.io.IOException, java.security.KeyException;
    method public abstract void encode(java.io.OutputStream) throws java.io.IOException, java.security.KeyException;
    method public abstract java.lang.String getFormat();
    method public abstract java.security.Principal getGuarantor();
    method public abstract java.security.Principal getPrincipal();
    method public abstract java.security.PublicKey getPublicKey();
    method public abstract java.lang.String toString(boolean);
  }

  public final class CodeSigner implements java.io.Serializable {
    ctor public CodeSigner(java.security.cert.CertPath, java.security.Timestamp);
    method public java.security.cert.CertPath getSignerCertPath();
    method public java.security.Timestamp getTimestamp();
  }

  public class CodeSource implements java.io.Serializable {
    ctor public CodeSource(java.net.URL, java.security.cert.Certificate[]);
    ctor public CodeSource(java.net.URL, java.security.CodeSigner[]);
    method public final java.security.cert.Certificate[] getCertificates();
    method public final java.security.CodeSigner[] getCodeSigners();
    method public final java.net.URL getLocation();
    method public boolean implies(java.security.CodeSource);
  }

  public class DigestException extends java.security.GeneralSecurityException {
    ctor public DigestException(java.lang.String);
    ctor public DigestException();
    ctor public DigestException(java.lang.String, java.lang.Throwable);
    ctor public DigestException(java.lang.Throwable);
  }

  public class DigestInputStream extends java.io.FilterInputStream {
    ctor public DigestInputStream(java.io.InputStream, java.security.MessageDigest);
    method public java.security.MessageDigest getMessageDigest();
    method public void on(boolean);
    method public void setMessageDigest(java.security.MessageDigest);
    field protected java.security.MessageDigest digest;
  }

  public class DigestOutputStream extends java.io.FilterOutputStream {
    ctor public DigestOutputStream(java.io.OutputStream, java.security.MessageDigest);
    method public java.security.MessageDigest getMessageDigest();
    method public void on(boolean);
    method public void setMessageDigest(java.security.MessageDigest);
    field protected java.security.MessageDigest digest;
  }

  public abstract interface DomainCombiner {
    method public abstract java.security.ProtectionDomain[] combine(java.security.ProtectionDomain[], java.security.ProtectionDomain[]);
  }

  public class GeneralSecurityException extends java.lang.Exception {
    ctor public GeneralSecurityException(java.lang.String);
    ctor public GeneralSecurityException();
    ctor public GeneralSecurityException(java.lang.String, java.lang.Throwable);
    ctor public GeneralSecurityException(java.lang.Throwable);
  }

  public abstract interface Guard {
    method public abstract void checkGuard(java.lang.Object) throws java.lang.SecurityException;
  }

  public class GuardedObject implements java.io.Serializable {
    ctor public GuardedObject(java.lang.Object, java.security.Guard);
    method public java.lang.Object getObject() throws java.lang.SecurityException;
  }

  public abstract deprecated class Identity implements java.security.Principal java.io.Serializable {
    ctor protected Identity();
    ctor public Identity(java.lang.String);
    ctor public Identity(java.lang.String, java.security.IdentityScope) throws java.security.KeyManagementException;
    method public void addCertificate(java.security.Certificate) throws java.security.KeyManagementException;
    method public java.security.Certificate[] certificates();
    method public final boolean equals(java.lang.Object);
    method public java.lang.String getInfo();
    method public final java.lang.String getName();
    method public java.security.PublicKey getPublicKey();
    method public final java.security.IdentityScope getScope();
    method protected boolean identityEquals(java.security.Identity);
    method public void removeCertificate(java.security.Certificate) throws java.security.KeyManagementException;
    method public void setInfo(java.lang.String);
    method public void setPublicKey(java.security.PublicKey) throws java.security.KeyManagementException;
    method public java.lang.String toString(boolean);
  }

  public abstract deprecated class IdentityScope extends java.security.Identity {
    ctor protected IdentityScope();
    ctor public IdentityScope(java.lang.String);
    ctor public IdentityScope(java.lang.String, java.security.IdentityScope) throws java.security.KeyManagementException;
    method public abstract void addIdentity(java.security.Identity) throws java.security.KeyManagementException;
    method public abstract java.security.Identity getIdentity(java.lang.String);
    method public java.security.Identity getIdentity(java.security.Principal);
    method public abstract java.security.Identity getIdentity(java.security.PublicKey);
    method public static java.security.IdentityScope getSystemScope();
    method public abstract java.util.Enumeration<java.security.Identity> identities();
    method public abstract void removeIdentity(java.security.Identity) throws java.security.KeyManagementException;
    method protected static void setSystemScope(java.security.IdentityScope);
    method public abstract int size();
  }

  public class InvalidAlgorithmParameterException extends java.security.GeneralSecurityException {
    ctor public InvalidAlgorithmParameterException(java.lang.String);
    ctor public InvalidAlgorithmParameterException();
    ctor public InvalidAlgorithmParameterException(java.lang.String, java.lang.Throwable);
    ctor public InvalidAlgorithmParameterException(java.lang.Throwable);
  }

  public class InvalidKeyException extends java.security.KeyException {
    ctor public InvalidKeyException(java.lang.String);
    ctor public InvalidKeyException();
    ctor public InvalidKeyException(java.lang.String, java.lang.Throwable);
    ctor public InvalidKeyException(java.lang.Throwable);
  }

  public class InvalidParameterException extends java.lang.IllegalArgumentException {
    ctor public InvalidParameterException(java.lang.String);
    ctor public InvalidParameterException();
  }

  public abstract interface Key implements java.io.Serializable {
    method public abstract java.lang.String getAlgorithm();
    method public abstract byte[] getEncoded();
    method public abstract java.lang.String getFormat();
    field public static final long serialVersionUID = 6603384152749567654L; // 0x5ba3eee69414eea6L
  }

  public class KeyException extends java.security.GeneralSecurityException {
    ctor public KeyException(java.lang.String);
    ctor public KeyException();
    ctor public KeyException(java.lang.String, java.lang.Throwable);
    ctor public KeyException(java.lang.Throwable);
  }

  public class KeyFactory {
    ctor protected KeyFactory(java.security.KeyFactorySpi, java.security.Provider, java.lang.String);
    method public final java.security.PrivateKey generatePrivate(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
    method public final java.security.PublicKey generatePublic(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
    method public final java.lang.String getAlgorithm();
    method public static java.security.KeyFactory getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.KeyFactory getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.KeyFactory getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final T getKeySpec(java.security.Key, java.lang.Class<T>) throws java.security.spec.InvalidKeySpecException;
    method public final java.security.Provider getProvider();
    method public final java.security.Key translateKey(java.security.Key) throws java.security.InvalidKeyException;
  }

  public abstract class KeyFactorySpi {
    ctor public KeyFactorySpi();
    method protected abstract java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
    method protected abstract java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
    method protected abstract T engineGetKeySpec(java.security.Key, java.lang.Class<T>) throws java.security.spec.InvalidKeySpecException;
    method protected abstract java.security.Key engineTranslateKey(java.security.Key) throws java.security.InvalidKeyException;
  }

  public class KeyManagementException extends java.security.KeyException {
    ctor public KeyManagementException(java.lang.String);
    ctor public KeyManagementException();
    ctor public KeyManagementException(java.lang.String, java.lang.Throwable);
    ctor public KeyManagementException(java.lang.Throwable);
  }

  public final class KeyPair implements java.io.Serializable {
    ctor public KeyPair(java.security.PublicKey, java.security.PrivateKey);
    method public java.security.PrivateKey getPrivate();
    method public java.security.PublicKey getPublic();
  }

  public abstract class KeyPairGenerator extends java.security.KeyPairGeneratorSpi {
    ctor protected KeyPairGenerator(java.lang.String);
    method public final java.security.KeyPair genKeyPair();
    method public java.security.KeyPair generateKeyPair();
    method public java.lang.String getAlgorithm();
    method public static java.security.KeyPairGenerator getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.KeyPairGenerator getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.KeyPairGenerator getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public void initialize(int);
    method public void initialize(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
    method public void initialize(int, java.security.SecureRandom);
  }

  public abstract class KeyPairGeneratorSpi {
    ctor public KeyPairGeneratorSpi();
    method public abstract java.security.KeyPair generateKeyPair();
    method public abstract void initialize(int, java.security.SecureRandom);
    method public void initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
  }

  public class KeyRep implements java.io.Serializable {
    ctor public KeyRep(java.security.KeyRep.Type, java.lang.String, java.lang.String, byte[]);
    method protected java.lang.Object readResolve() throws java.io.ObjectStreamException;
  }

  public static final class KeyRep.Type extends java.lang.Enum {
    method public static java.security.KeyRep.Type valueOf(java.lang.String);
    method public static final java.security.KeyRep.Type[] values();
    enum_constant public static final java.security.KeyRep.Type PRIVATE;
    enum_constant public static final java.security.KeyRep.Type PUBLIC;
    enum_constant public static final java.security.KeyRep.Type SECRET;
  }

  public class KeyStore {
    ctor protected KeyStore(java.security.KeyStoreSpi, java.security.Provider, java.lang.String);
    method public final java.util.Enumeration<java.lang.String> aliases() throws java.security.KeyStoreException;
    method public final boolean containsAlias(java.lang.String) throws java.security.KeyStoreException;
    method public final void deleteEntry(java.lang.String) throws java.security.KeyStoreException;
    method public final boolean entryInstanceOf(java.lang.String, java.lang.Class<? extends java.security.KeyStore.Entry>) throws java.security.KeyStoreException;
    method public final java.security.cert.Certificate getCertificate(java.lang.String) throws java.security.KeyStoreException;
    method public final java.lang.String getCertificateAlias(java.security.cert.Certificate) throws java.security.KeyStoreException;
    method public final java.security.cert.Certificate[] getCertificateChain(java.lang.String) throws java.security.KeyStoreException;
    method public final java.util.Date getCreationDate(java.lang.String) throws java.security.KeyStoreException;
    method public static final java.lang.String getDefaultType();
    method public final java.security.KeyStore.Entry getEntry(java.lang.String, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableEntryException;
    method public static java.security.KeyStore getInstance(java.lang.String) throws java.security.KeyStoreException;
    method public static java.security.KeyStore getInstance(java.lang.String, java.lang.String) throws java.security.KeyStoreException, java.security.NoSuchProviderException;
    method public static java.security.KeyStore getInstance(java.lang.String, java.security.Provider) throws java.security.KeyStoreException;
    method public final java.security.Key getKey(java.lang.String, char[]) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    method public final java.security.Provider getProvider();
    method public final java.lang.String getType();
    method public final boolean isCertificateEntry(java.lang.String) throws java.security.KeyStoreException;
    method public final boolean isKeyEntry(java.lang.String) throws java.security.KeyStoreException;
    method public final void load(java.io.InputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
    method public final void load(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
    method public final void setCertificateEntry(java.lang.String, java.security.cert.Certificate) throws java.security.KeyStoreException;
    method public final void setEntry(java.lang.String, java.security.KeyStore.Entry, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException;
    method public final void setKeyEntry(java.lang.String, java.security.Key, char[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
    method public final void setKeyEntry(java.lang.String, byte[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
    method public final int size() throws java.security.KeyStoreException;
    method public final void store(java.io.OutputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException;
    method public final void store(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException;
  }

  public static abstract class KeyStore.Builder {
    ctor protected KeyStore.Builder();
    method public abstract java.security.KeyStore getKeyStore() throws java.security.KeyStoreException;
    method public abstract java.security.KeyStore.ProtectionParameter getProtectionParameter(java.lang.String) throws java.security.KeyStoreException;
    method public static java.security.KeyStore.Builder newInstance(java.security.KeyStore, java.security.KeyStore.ProtectionParameter);
    method public static java.security.KeyStore.Builder newInstance(java.lang.String, java.security.Provider, java.io.File, java.security.KeyStore.ProtectionParameter);
    method public static java.security.KeyStore.Builder newInstance(java.lang.String, java.security.Provider, java.security.KeyStore.ProtectionParameter);
  }

  public static class KeyStore.CallbackHandlerProtection implements java.security.KeyStore.ProtectionParameter {
    ctor public KeyStore.CallbackHandlerProtection(javax.security.auth.callback.CallbackHandler);
    method public javax.security.auth.callback.CallbackHandler getCallbackHandler();
  }

  public static abstract interface KeyStore.Entry {
  }

  public static abstract interface KeyStore.LoadStoreParameter {
    method public abstract java.security.KeyStore.ProtectionParameter getProtectionParameter();
  }

  public static class KeyStore.PasswordProtection implements javax.security.auth.Destroyable java.security.KeyStore.ProtectionParameter {
    ctor public KeyStore.PasswordProtection(char[]);
    method public synchronized void destroy() throws javax.security.auth.DestroyFailedException;
    method public synchronized char[] getPassword();
    method public synchronized boolean isDestroyed();
  }

  public static final class KeyStore.PrivateKeyEntry implements java.security.KeyStore.Entry {
    ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[]);
    method public java.security.cert.Certificate getCertificate();
    method public java.security.cert.Certificate[] getCertificateChain();
    method public java.security.PrivateKey getPrivateKey();
  }

  public static abstract interface KeyStore.ProtectionParameter {
  }

  public static final class KeyStore.SecretKeyEntry implements java.security.KeyStore.Entry {
    ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey);
    method public javax.crypto.SecretKey getSecretKey();
  }

  public static final class KeyStore.TrustedCertificateEntry implements java.security.KeyStore.Entry {
    ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate);
    method public java.security.cert.Certificate getTrustedCertificate();
  }

  public class KeyStoreException extends java.security.GeneralSecurityException {
    ctor public KeyStoreException(java.lang.String);
    ctor public KeyStoreException();
    ctor public KeyStoreException(java.lang.String, java.lang.Throwable);
    ctor public KeyStoreException(java.lang.Throwable);
  }

  public abstract class KeyStoreSpi {
    ctor public KeyStoreSpi();
    method public abstract java.util.Enumeration<java.lang.String> engineAliases();
    method public abstract boolean engineContainsAlias(java.lang.String);
    method public abstract void engineDeleteEntry(java.lang.String) throws java.security.KeyStoreException;
    method public boolean engineEntryInstanceOf(java.lang.String, java.lang.Class<? extends java.security.KeyStore.Entry>);
    method public abstract java.security.cert.Certificate engineGetCertificate(java.lang.String);
    method public abstract java.lang.String engineGetCertificateAlias(java.security.cert.Certificate);
    method public abstract java.security.cert.Certificate[] engineGetCertificateChain(java.lang.String);
    method public abstract java.util.Date engineGetCreationDate(java.lang.String);
    method public java.security.KeyStore.Entry engineGetEntry(java.lang.String, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableEntryException;
    method public abstract java.security.Key engineGetKey(java.lang.String, char[]) throws java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    method public abstract boolean engineIsCertificateEntry(java.lang.String);
    method public abstract boolean engineIsKeyEntry(java.lang.String);
    method public abstract void engineLoad(java.io.InputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
    method public void engineLoad(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
    method public abstract void engineSetCertificateEntry(java.lang.String, java.security.cert.Certificate) throws java.security.KeyStoreException;
    method public void engineSetEntry(java.lang.String, java.security.KeyStore.Entry, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException;
    method public abstract void engineSetKeyEntry(java.lang.String, java.security.Key, char[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
    method public abstract void engineSetKeyEntry(java.lang.String, byte[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
    method public abstract int engineSize();
    method public abstract void engineStore(java.io.OutputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
    method public void engineStore(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
  }

  public abstract class MessageDigest extends java.security.MessageDigestSpi {
    ctor protected MessageDigest(java.lang.String);
    method public byte[] digest();
    method public int digest(byte[], int, int) throws java.security.DigestException;
    method public byte[] digest(byte[]);
    method public final java.lang.String getAlgorithm();
    method public final int getDigestLength();
    method public static java.security.MessageDigest getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.MessageDigest getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.MessageDigest getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public static boolean isEqual(byte[], byte[]);
    method public void reset();
    method public void update(byte);
    method public void update(byte[], int, int);
    method public void update(byte[]);
    method public final void update(java.nio.ByteBuffer);
  }

  public abstract class MessageDigestSpi {
    ctor public MessageDigestSpi();
    method public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method protected abstract byte[] engineDigest();
    method protected int engineDigest(byte[], int, int) throws java.security.DigestException;
    method protected int engineGetDigestLength();
    method protected abstract void engineReset();
    method protected abstract void engineUpdate(byte);
    method protected abstract void engineUpdate(byte[], int, int);
    method protected void engineUpdate(java.nio.ByteBuffer);
  }

  public class NoSuchAlgorithmException extends java.security.GeneralSecurityException {
    ctor public NoSuchAlgorithmException(java.lang.String);
    ctor public NoSuchAlgorithmException();
    ctor public NoSuchAlgorithmException(java.lang.String, java.lang.Throwable);
    ctor public NoSuchAlgorithmException(java.lang.Throwable);
  }

  public class NoSuchProviderException extends java.security.GeneralSecurityException {
    ctor public NoSuchProviderException(java.lang.String);
    ctor public NoSuchProviderException();
  }

  public abstract class Permission implements java.security.Guard java.io.Serializable {
    ctor public Permission(java.lang.String);
    method public void checkGuard(java.lang.Object) throws java.lang.SecurityException;
    method public abstract java.lang.String getActions();
    method public final java.lang.String getName();
    method public abstract boolean implies(java.security.Permission);
    method public java.security.PermissionCollection newPermissionCollection();
  }

  public abstract class PermissionCollection implements java.io.Serializable {
    ctor public PermissionCollection();
    method public abstract void add(java.security.Permission);
    method public abstract java.util.Enumeration<java.security.Permission> elements();
    method public abstract boolean implies(java.security.Permission);
    method public boolean isReadOnly();
    method public void setReadOnly();
  }

  public final class Permissions extends java.security.PermissionCollection implements java.io.Serializable {
    ctor public Permissions();
    method public void add(java.security.Permission);
    method public java.util.Enumeration<java.security.Permission> elements();
    method public boolean implies(java.security.Permission);
  }

  public abstract class Policy {
    ctor public Policy();
    method public static java.security.Policy getInstance(java.lang.String, java.security.Policy.Parameters) throws java.security.NoSuchAlgorithmException;
    method public static java.security.Policy getInstance(java.lang.String, java.security.Policy.Parameters, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.Policy getInstance(java.lang.String, java.security.Policy.Parameters, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public java.security.Policy.Parameters getParameters();
    method public java.security.PermissionCollection getPermissions(java.security.CodeSource);
    method public java.security.PermissionCollection getPermissions(java.security.ProtectionDomain);
    method public static java.security.Policy getPolicy();
    method public java.security.Provider getProvider();
    method public java.lang.String getType();
    method public boolean implies(java.security.ProtectionDomain, java.security.Permission);
    method public void refresh();
    method public static void setPolicy(java.security.Policy);
    field public static final java.security.PermissionCollection UNSUPPORTED_EMPTY_COLLECTION;
  }

  public static abstract interface Policy.Parameters {
  }

  public abstract class PolicySpi {
    ctor public PolicySpi();
    method protected java.security.PermissionCollection engineGetPermissions(java.security.CodeSource);
    method protected java.security.PermissionCollection engineGetPermissions(java.security.ProtectionDomain);
    method protected abstract boolean engineImplies(java.security.ProtectionDomain, java.security.Permission);
    method protected void engineRefresh();
  }

  public abstract interface Principal {
    method public abstract boolean equals(java.lang.Object);
    method public abstract java.lang.String getName();
    method public abstract int hashCode();
    method public abstract java.lang.String toString();
  }

  public abstract interface PrivateKey implements java.security.Key {
    field public static final long serialVersionUID = 6034044314589513430L; // 0x53bd3b559a12c6d6L
  }

  public abstract interface PrivilegedAction {
    method public abstract T run();
  }

  public class PrivilegedActionException extends java.lang.Exception {
    ctor public PrivilegedActionException(java.lang.Exception);
    method public java.lang.Exception getException();
  }

  public abstract interface PrivilegedExceptionAction {
    method public abstract T run() throws java.lang.Exception;
  }

  public class ProtectionDomain {
    ctor public ProtectionDomain(java.security.CodeSource, java.security.PermissionCollection);
    ctor public ProtectionDomain(java.security.CodeSource, java.security.PermissionCollection, java.lang.ClassLoader, java.security.Principal[]);
    method public final java.lang.ClassLoader getClassLoader();
    method public final java.security.CodeSource getCodeSource();
    method public final java.security.PermissionCollection getPermissions();
    method public final java.security.Principal[] getPrincipals();
    method public boolean implies(java.security.Permission);
  }

  public abstract class Provider extends java.util.Properties {
    ctor protected Provider(java.lang.String, double, java.lang.String);
    method public java.lang.String getInfo();
    method public java.lang.String getName();
    method public synchronized java.security.Provider.Service getService(java.lang.String, java.lang.String);
    method public synchronized java.util.Set<java.security.Provider.Service> getServices();
    method public double getVersion();
    method public synchronized java.lang.Object put(java.lang.Object, java.lang.Object);
    method public synchronized void putAll(java.util.Map<?, ?>);
    method protected synchronized void putService(java.security.Provider.Service);
    method protected synchronized void removeService(java.security.Provider.Service);
  }

  public static class Provider.Service {
    ctor public Provider.Service(java.security.Provider, java.lang.String, java.lang.String, java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>);
    method public final java.lang.String getAlgorithm();
    method public final java.lang.String getAttribute(java.lang.String);
    method public final java.lang.String getClassName();
    method public final java.security.Provider getProvider();
    method public final java.lang.String getType();
    method public java.lang.Object newInstance(java.lang.Object) throws java.security.NoSuchAlgorithmException;
    method public boolean supportsParameter(java.lang.Object);
  }

  public class ProviderException extends java.lang.RuntimeException {
    ctor public ProviderException(java.lang.String);
    ctor public ProviderException();
    ctor public ProviderException(java.lang.String, java.lang.Throwable);
    ctor public ProviderException(java.lang.Throwable);
  }

  public abstract interface PublicKey implements java.security.Key {
    field public static final long serialVersionUID = 7187392471159151072L; // 0x63bebf5f40c219e0L
  }

  public class SecureClassLoader extends java.lang.ClassLoader {
    ctor protected SecureClassLoader();
    ctor protected SecureClassLoader(java.lang.ClassLoader);
    method protected final java.lang.Class<?> defineClass(java.lang.String, byte[], int, int, java.security.CodeSource);
    method protected final java.lang.Class<?> defineClass(java.lang.String, java.nio.ByteBuffer, java.security.CodeSource);
    method protected java.security.PermissionCollection getPermissions(java.security.CodeSource);
  }

  public class SecureRandom extends java.util.Random {
    ctor public SecureRandom();
    ctor public SecureRandom(byte[]);
    ctor protected SecureRandom(java.security.SecureRandomSpi, java.security.Provider);
    method public byte[] generateSeed(int);
    method public java.lang.String getAlgorithm();
    method public static java.security.SecureRandom getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.SecureRandom getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.SecureRandom getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public static byte[] getSeed(int);
    method protected final int next(int);
    method public synchronized void setSeed(byte[]);
  }

  public abstract class SecureRandomSpi implements java.io.Serializable {
    ctor public SecureRandomSpi();
    method protected abstract byte[] engineGenerateSeed(int);
    method protected abstract void engineNextBytes(byte[]);
    method protected abstract void engineSetSeed(byte[]);
  }

  public final class Security {
    method public static int addProvider(java.security.Provider);
    method public static deprecated java.lang.String getAlgorithmProperty(java.lang.String, java.lang.String);
    method public static java.util.Set<java.lang.String> getAlgorithms(java.lang.String);
    method public static java.lang.String getProperty(java.lang.String);
    method public static synchronized java.security.Provider getProvider(java.lang.String);
    method public static synchronized java.security.Provider[] getProviders();
    method public static java.security.Provider[] getProviders(java.lang.String);
    method public static synchronized java.security.Provider[] getProviders(java.util.Map<java.lang.String, java.lang.String>);
    method public static synchronized int insertProviderAt(java.security.Provider, int);
    method public static synchronized void removeProvider(java.lang.String);
    method public static void setProperty(java.lang.String, java.lang.String);
  }

  public final class SecurityPermission extends java.security.BasicPermission {
    ctor public SecurityPermission(java.lang.String);
    ctor public SecurityPermission(java.lang.String, java.lang.String);
  }

  public abstract class Signature extends java.security.SignatureSpi {
    ctor protected Signature(java.lang.String);
    method public final java.lang.String getAlgorithm();
    method public static java.security.Signature getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.Signature getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.Signature getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final deprecated java.lang.Object getParameter(java.lang.String) throws java.security.InvalidParameterException;
    method public final java.security.AlgorithmParameters getParameters();
    method public final java.security.Provider getProvider();
    method public final void initSign(java.security.PrivateKey) throws java.security.InvalidKeyException;
    method public final void initSign(java.security.PrivateKey, java.security.SecureRandom) throws java.security.InvalidKeyException;
    method public final void initVerify(java.security.PublicKey) throws java.security.InvalidKeyException;
    method public final void initVerify(java.security.cert.Certificate) throws java.security.InvalidKeyException;
    method public final deprecated void setParameter(java.lang.String, java.lang.Object) throws java.security.InvalidParameterException;
    method public final void setParameter(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
    method public final byte[] sign() throws java.security.SignatureException;
    method public final int sign(byte[], int, int) throws java.security.SignatureException;
    method public final void update(byte) throws java.security.SignatureException;
    method public final void update(byte[]) throws java.security.SignatureException;
    method public final void update(byte[], int, int) throws java.security.SignatureException;
    method public final void update(java.nio.ByteBuffer) throws java.security.SignatureException;
    method public final boolean verify(byte[]) throws java.security.SignatureException;
    method public final boolean verify(byte[], int, int) throws java.security.SignatureException;
    field protected static final int SIGN = 2; // 0x2
    field protected static final int UNINITIALIZED = 0; // 0x0
    field protected static final int VERIFY = 3; // 0x3
    field protected int state;
  }

  public class SignatureException extends java.security.GeneralSecurityException {
    ctor public SignatureException(java.lang.String);
    ctor public SignatureException();
    ctor public SignatureException(java.lang.String, java.lang.Throwable);
    ctor public SignatureException(java.lang.Throwable);
  }

  public abstract class SignatureSpi {
    ctor public SignatureSpi();
    method public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method protected abstract deprecated java.lang.Object engineGetParameter(java.lang.String) throws java.security.InvalidParameterException;
    method protected java.security.AlgorithmParameters engineGetParameters();
    method protected abstract void engineInitSign(java.security.PrivateKey) throws java.security.InvalidKeyException;
    method protected void engineInitSign(java.security.PrivateKey, java.security.SecureRandom) throws java.security.InvalidKeyException;
    method protected abstract void engineInitVerify(java.security.PublicKey) throws java.security.InvalidKeyException;
    method protected abstract deprecated void engineSetParameter(java.lang.String, java.lang.Object) throws java.security.InvalidParameterException;
    method protected void engineSetParameter(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
    method protected abstract byte[] engineSign() throws java.security.SignatureException;
    method protected int engineSign(byte[], int, int) throws java.security.SignatureException;
    method protected abstract void engineUpdate(byte) throws java.security.SignatureException;
    method protected abstract void engineUpdate(byte[], int, int) throws java.security.SignatureException;
    method protected void engineUpdate(java.nio.ByteBuffer);
    method protected abstract boolean engineVerify(byte[]) throws java.security.SignatureException;
    method protected boolean engineVerify(byte[], int, int) throws java.security.SignatureException;
    field protected java.security.SecureRandom appRandom;
  }

  public final class SignedObject implements java.io.Serializable {
    ctor public SignedObject(java.io.Serializable, java.security.PrivateKey, java.security.Signature) throws java.io.IOException, java.security.InvalidKeyException, java.security.SignatureException;
    method public java.lang.String getAlgorithm();
    method public java.lang.Object getObject() throws java.lang.ClassNotFoundException, java.io.IOException;
    method public byte[] getSignature();
    method public boolean verify(java.security.PublicKey, java.security.Signature) throws java.security.InvalidKeyException, java.security.SignatureException;
  }

  public abstract deprecated class Signer extends java.security.Identity {
    ctor protected Signer();
    ctor public Signer(java.lang.String);
    ctor public Signer(java.lang.String, java.security.IdentityScope) throws java.security.KeyManagementException;
    method public java.security.PrivateKey getPrivateKey();
    method public final void setKeyPair(java.security.KeyPair) throws java.security.InvalidParameterException, java.security.KeyException;
  }

  public final class Timestamp implements java.io.Serializable {
    ctor public Timestamp(java.util.Date, java.security.cert.CertPath);
    method public java.security.cert.CertPath getSignerCertPath();
    method public java.util.Date getTimestamp();
  }

  public class UnrecoverableEntryException extends java.security.GeneralSecurityException {
    ctor public UnrecoverableEntryException();
    ctor public UnrecoverableEntryException(java.lang.String);
  }

  public class UnrecoverableKeyException extends java.security.UnrecoverableEntryException {
    ctor public UnrecoverableKeyException(java.lang.String);
    ctor public UnrecoverableKeyException();
  }

  public final class UnresolvedPermission extends java.security.Permission implements java.io.Serializable {
    ctor public UnresolvedPermission(java.lang.String, java.lang.String, java.lang.String, java.security.cert.Certificate[]);
    method public java.lang.String getActions();
    method public java.lang.String getUnresolvedActions();
    method public java.security.cert.Certificate[] getUnresolvedCerts();
    method public java.lang.String getUnresolvedName();
    method public java.lang.String getUnresolvedType();
    method public boolean implies(java.security.Permission);
  }

}

package java.security.acl {

  public abstract interface Acl implements java.security.acl.Owner {
    method public abstract boolean addEntry(java.security.Principal, java.security.acl.AclEntry) throws java.security.acl.NotOwnerException;
    method public abstract boolean checkPermission(java.security.Principal, java.security.acl.Permission);
    method public abstract java.util.Enumeration<java.security.acl.AclEntry> entries();
    method public abstract java.lang.String getName();
    method public abstract java.util.Enumeration<java.security.acl.Permission> getPermissions(java.security.Principal);
    method public abstract boolean removeEntry(java.security.Principal, java.security.acl.AclEntry) throws java.security.acl.NotOwnerException;
    method public abstract void setName(java.security.Principal, java.lang.String) throws java.security.acl.NotOwnerException;
    method public abstract java.lang.String toString();
  }

  public abstract interface AclEntry implements java.lang.Cloneable {
    method public abstract boolean addPermission(java.security.acl.Permission);
    method public abstract boolean checkPermission(java.security.acl.Permission);
    method public abstract java.lang.Object clone();
    method public abstract java.security.Principal getPrincipal();
    method public abstract boolean isNegative();
    method public abstract java.util.Enumeration<java.security.acl.Permission> permissions();
    method public abstract boolean removePermission(java.security.acl.Permission);
    method public abstract void setNegativePermissions();
    method public abstract boolean setPrincipal(java.security.Principal);
    method public abstract java.lang.String toString();
  }

  public class AclNotFoundException extends java.lang.Exception {
    ctor public AclNotFoundException();
  }

  public abstract interface Group implements java.security.Principal {
    method public abstract boolean addMember(java.security.Principal);
    method public abstract boolean isMember(java.security.Principal);
    method public abstract java.util.Enumeration<? extends java.security.Principal> members();
    method public abstract boolean removeMember(java.security.Principal);
  }

  public class LastOwnerException extends java.lang.Exception {
    ctor public LastOwnerException();
  }

  public class NotOwnerException extends java.lang.Exception {
    ctor public NotOwnerException();
  }

  public abstract interface Owner {
    method public abstract boolean addOwner(java.security.Principal, java.security.Principal) throws java.security.acl.NotOwnerException;
    method public abstract boolean deleteOwner(java.security.Principal, java.security.Principal) throws java.security.acl.LastOwnerException, java.security.acl.NotOwnerException;
    method public abstract boolean isOwner(java.security.Principal);
  }

  public abstract interface Permission {
    method public abstract boolean equals(java.lang.Object);
    method public abstract java.lang.String toString();
  }

}

package java.security.cert {

  public abstract class CRL {
    ctor protected CRL(java.lang.String);
    method public final java.lang.String getType();
    method public abstract boolean isRevoked(java.security.cert.Certificate);
    method public abstract java.lang.String toString();
  }

  public class CRLException extends java.security.GeneralSecurityException {
    ctor public CRLException(java.lang.String);
    ctor public CRLException();
    ctor public CRLException(java.lang.String, java.lang.Throwable);
    ctor public CRLException(java.lang.Throwable);
  }

  public abstract interface CRLSelector implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
    method public abstract boolean match(java.security.cert.CRL);
  }

  public abstract class CertPath implements java.io.Serializable {
    ctor protected CertPath(java.lang.String);
    method public abstract java.util.List<? extends java.security.cert.Certificate> getCertificates();
    method public abstract byte[] getEncoded() throws java.security.cert.CertificateEncodingException;
    method public abstract byte[] getEncoded(java.lang.String) throws java.security.cert.CertificateEncodingException;
    method public abstract java.util.Iterator<java.lang.String> getEncodings();
    method public java.lang.String getType();
    method protected java.lang.Object writeReplace() throws java.io.ObjectStreamException;
  }

  protected static class CertPath.CertPathRep implements java.io.Serializable {
    ctor protected CertPath.CertPathRep(java.lang.String, byte[]);
    method protected java.lang.Object readResolve() throws java.io.ObjectStreamException;
  }

  public class CertPathBuilder {
    ctor protected CertPathBuilder(java.security.cert.CertPathBuilderSpi, java.security.Provider, java.lang.String);
    method public final java.security.cert.CertPathBuilderResult build(java.security.cert.CertPathParameters) throws java.security.cert.CertPathBuilderException, java.security.InvalidAlgorithmParameterException;
    method public final java.lang.String getAlgorithm();
    method public static final java.lang.String getDefaultType();
    method public static java.security.cert.CertPathBuilder getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.cert.CertPathBuilder getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.cert.CertPathBuilder getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
  }

  public class CertPathBuilderException extends java.security.GeneralSecurityException {
    ctor public CertPathBuilderException(java.lang.String, java.lang.Throwable);
    ctor public CertPathBuilderException(java.lang.Throwable);
    ctor public CertPathBuilderException(java.lang.String);
    ctor public CertPathBuilderException();
  }

  public abstract interface CertPathBuilderResult implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
    method public abstract java.security.cert.CertPath getCertPath();
  }

  public abstract class CertPathBuilderSpi {
    ctor public CertPathBuilderSpi();
    method public abstract java.security.cert.CertPathBuilderResult engineBuild(java.security.cert.CertPathParameters) throws java.security.cert.CertPathBuilderException, java.security.InvalidAlgorithmParameterException;
  }

  public abstract interface CertPathParameters implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
  }

  public class CertPathValidator {
    ctor protected CertPathValidator(java.security.cert.CertPathValidatorSpi, java.security.Provider, java.lang.String);
    method public final java.lang.String getAlgorithm();
    method public static final java.lang.String getDefaultType();
    method public static java.security.cert.CertPathValidator getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static java.security.cert.CertPathValidator getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.cert.CertPathValidator getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public final java.security.cert.CertPathValidatorResult validate(java.security.cert.CertPath, java.security.cert.CertPathParameters) throws java.security.cert.CertPathValidatorException, java.security.InvalidAlgorithmParameterException;
  }

  public class CertPathValidatorException extends java.security.GeneralSecurityException {
    ctor public CertPathValidatorException(java.lang.String, java.lang.Throwable, java.security.cert.CertPath, int);
    ctor public CertPathValidatorException(java.lang.String, java.lang.Throwable);
    ctor public CertPathValidatorException(java.lang.Throwable);
    ctor public CertPathValidatorException(java.lang.String);
    ctor public CertPathValidatorException();
    method public java.security.cert.CertPath getCertPath();
    method public int getIndex();
  }

  public abstract interface CertPathValidatorResult implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
  }

  public abstract class CertPathValidatorSpi {
    ctor public CertPathValidatorSpi();
    method public abstract java.security.cert.CertPathValidatorResult engineValidate(java.security.cert.CertPath, java.security.cert.CertPathParameters) throws java.security.cert.CertPathValidatorException, java.security.InvalidAlgorithmParameterException;
  }

  public abstract interface CertSelector implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
    method public abstract boolean match(java.security.cert.Certificate);
  }

  public class CertStore {
    ctor protected CertStore(java.security.cert.CertStoreSpi, java.security.Provider, java.lang.String, java.security.cert.CertStoreParameters);
    method public final java.util.Collection<? extends java.security.cert.CRL> getCRLs(java.security.cert.CRLSelector) throws java.security.cert.CertStoreException;
    method public final java.security.cert.CertStoreParameters getCertStoreParameters();
    method public final java.util.Collection<? extends java.security.cert.Certificate> getCertificates(java.security.cert.CertSelector) throws java.security.cert.CertStoreException;
    method public static final java.lang.String getDefaultType();
    method public static java.security.cert.CertStore getInstance(java.lang.String, java.security.cert.CertStoreParameters) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException;
    method public static java.security.cert.CertStore getInstance(java.lang.String, java.security.cert.CertStoreParameters, java.lang.String) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static java.security.cert.CertStore getInstance(java.lang.String, java.security.cert.CertStoreParameters, java.security.Provider) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public final java.lang.String getType();
  }

  public class CertStoreException extends java.security.GeneralSecurityException {
    ctor public CertStoreException(java.lang.String, java.lang.Throwable);
    ctor public CertStoreException(java.lang.Throwable);
    ctor public CertStoreException(java.lang.String);
    ctor public CertStoreException();
  }

  public abstract interface CertStoreParameters implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
  }

  public abstract class CertStoreSpi {
    ctor public CertStoreSpi(java.security.cert.CertStoreParameters) throws java.security.InvalidAlgorithmParameterException;
    method public abstract java.util.Collection<? extends java.security.cert.CRL> engineGetCRLs(java.security.cert.CRLSelector) throws java.security.cert.CertStoreException;
    method public abstract java.util.Collection<? extends java.security.cert.Certificate> engineGetCertificates(java.security.cert.CertSelector) throws java.security.cert.CertStoreException;
  }

  public abstract class Certificate implements java.io.Serializable {
    ctor protected Certificate(java.lang.String);
    method public abstract byte[] getEncoded() throws java.security.cert.CertificateEncodingException;
    method public abstract java.security.PublicKey getPublicKey();
    method public final java.lang.String getType();
    method public abstract java.lang.String toString();
    method public abstract void verify(java.security.PublicKey) throws java.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
    method public abstract void verify(java.security.PublicKey, java.lang.String) throws java.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
    method protected java.lang.Object writeReplace() throws java.io.ObjectStreamException;
  }

  protected static class Certificate.CertificateRep implements java.io.Serializable {
    ctor protected Certificate.CertificateRep(java.lang.String, byte[]);
    method protected java.lang.Object readResolve() throws java.io.ObjectStreamException;
  }

  public class CertificateEncodingException extends java.security.cert.CertificateException {
    ctor public CertificateEncodingException(java.lang.String);
    ctor public CertificateEncodingException();
    ctor public CertificateEncodingException(java.lang.String, java.lang.Throwable);
    ctor public CertificateEncodingException(java.lang.Throwable);
  }

  public class CertificateException extends java.security.GeneralSecurityException {
    ctor public CertificateException(java.lang.String);
    ctor public CertificateException();
    ctor public CertificateException(java.lang.String, java.lang.Throwable);
    ctor public CertificateException(java.lang.Throwable);
  }

  public class CertificateExpiredException extends java.security.cert.CertificateException {
    ctor public CertificateExpiredException(java.lang.String);
    ctor public CertificateExpiredException();
  }

  public class CertificateFactory {
    ctor protected CertificateFactory(java.security.cert.CertificateFactorySpi, java.security.Provider, java.lang.String);
    method public final java.security.cert.CRL generateCRL(java.io.InputStream) throws java.security.cert.CRLException;
    method public final java.util.Collection<? extends java.security.cert.CRL> generateCRLs(java.io.InputStream) throws java.security.cert.CRLException;
    method public final java.security.cert.CertPath generateCertPath(java.io.InputStream) throws java.security.cert.CertificateException;
    method public final java.security.cert.CertPath generateCertPath(java.io.InputStream, java.lang.String) throws java.security.cert.CertificateException;
    method public final java.security.cert.CertPath generateCertPath(java.util.List<? extends java.security.cert.Certificate>) throws java.security.cert.CertificateException;
    method public final java.security.cert.Certificate generateCertificate(java.io.InputStream) throws java.security.cert.CertificateException;
    method public final java.util.Collection<? extends java.security.cert.Certificate> generateCertificates(java.io.InputStream) throws java.security.cert.CertificateException;
    method public final java.util.Iterator<java.lang.String> getCertPathEncodings();
    method public static final java.security.cert.CertificateFactory getInstance(java.lang.String) throws java.security.cert.CertificateException;
    method public static final java.security.cert.CertificateFactory getInstance(java.lang.String, java.lang.String) throws java.security.cert.CertificateException, java.security.NoSuchProviderException;
    method public static final java.security.cert.CertificateFactory getInstance(java.lang.String, java.security.Provider) throws java.security.cert.CertificateException;
    method public final java.security.Provider getProvider();
    method public final java.lang.String getType();
  }

  public abstract class CertificateFactorySpi {
    ctor public CertificateFactorySpi();
    method public abstract java.security.cert.CRL engineGenerateCRL(java.io.InputStream) throws java.security.cert.CRLException;
    method public abstract java.util.Collection<? extends java.security.cert.CRL> engineGenerateCRLs(java.io.InputStream) throws java.security.cert.CRLException;
    method public java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream) throws java.security.cert.CertificateException;
    method public java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream, java.lang.String) throws java.security.cert.CertificateException;
    method public java.security.cert.CertPath engineGenerateCertPath(java.util.List<? extends java.security.cert.Certificate>) throws java.security.cert.CertificateException;
    method public abstract java.security.cert.Certificate engineGenerateCertificate(java.io.InputStream) throws java.security.cert.CertificateException;
    method public abstract java.util.Collection<? extends java.security.cert.Certificate> engineGenerateCertificates(java.io.InputStream) throws java.security.cert.CertificateException;
    method public java.util.Iterator<java.lang.String> engineGetCertPathEncodings();
  }

  public class CertificateNotYetValidException extends java.security.cert.CertificateException {
    ctor public CertificateNotYetValidException(java.lang.String);
    ctor public CertificateNotYetValidException();
  }

  public class CertificateParsingException extends java.security.cert.CertificateException {
    ctor public CertificateParsingException(java.lang.String);
    ctor public CertificateParsingException();
    ctor public CertificateParsingException(java.lang.String, java.lang.Throwable);
    ctor public CertificateParsingException(java.lang.Throwable);
  }

  public class CollectionCertStoreParameters implements java.security.cert.CertStoreParameters {
    ctor public CollectionCertStoreParameters();
    ctor public CollectionCertStoreParameters(java.util.Collection<?>);
    method public java.lang.Object clone();
    method public java.util.Collection<?> getCollection();
  }

  public class LDAPCertStoreParameters implements java.security.cert.CertStoreParameters {
    ctor public LDAPCertStoreParameters(java.lang.String, int);
    ctor public LDAPCertStoreParameters();
    ctor public LDAPCertStoreParameters(java.lang.String);
    method public java.lang.Object clone();
    method public int getPort();
    method public java.lang.String getServerName();
  }

  public class PKIXBuilderParameters extends java.security.cert.PKIXParameters {
    ctor public PKIXBuilderParameters(java.util.Set<java.security.cert.TrustAnchor>, java.security.cert.CertSelector) throws java.security.InvalidAlgorithmParameterException;
    ctor public PKIXBuilderParameters(java.security.KeyStore, java.security.cert.CertSelector) throws java.security.InvalidAlgorithmParameterException, java.security.KeyStoreException;
    method public int getMaxPathLength();
    method public void setMaxPathLength(int);
  }

  public class PKIXCertPathBuilderResult extends java.security.cert.PKIXCertPathValidatorResult implements java.security.cert.CertPathBuilderResult {
    ctor public PKIXCertPathBuilderResult(java.security.cert.CertPath, java.security.cert.TrustAnchor, java.security.cert.PolicyNode, java.security.PublicKey);
    method public java.security.cert.CertPath getCertPath();
  }

  public abstract class PKIXCertPathChecker implements java.lang.Cloneable {
    ctor protected PKIXCertPathChecker();
    method public abstract void check(java.security.cert.Certificate, java.util.Collection<java.lang.String>) throws java.security.cert.CertPathValidatorException;
    method public java.lang.Object clone();
    method public abstract java.util.Set<java.lang.String> getSupportedExtensions();
    method public abstract void init(boolean) throws java.security.cert.CertPathValidatorException;
    method public abstract boolean isForwardCheckingSupported();
  }

  public class PKIXCertPathValidatorResult implements java.security.cert.CertPathValidatorResult {
    ctor public PKIXCertPathValidatorResult(java.security.cert.TrustAnchor, java.security.cert.PolicyNode, java.security.PublicKey);
    method public java.lang.Object clone();
    method public java.security.cert.PolicyNode getPolicyTree();
    method public java.security.PublicKey getPublicKey();
    method public java.security.cert.TrustAnchor getTrustAnchor();
  }

  public class PKIXParameters implements java.security.cert.CertPathParameters {
    ctor public PKIXParameters(java.util.Set<java.security.cert.TrustAnchor>) throws java.security.InvalidAlgorithmParameterException;
    ctor public PKIXParameters(java.security.KeyStore) throws java.security.InvalidAlgorithmParameterException, java.security.KeyStoreException;
    method public void addCertPathChecker(java.security.cert.PKIXCertPathChecker);
    method public void addCertStore(java.security.cert.CertStore);
    method public java.lang.Object clone();
    method public java.util.List<java.security.cert.PKIXCertPathChecker> getCertPathCheckers();
    method public java.util.List<java.security.cert.CertStore> getCertStores();
    method public java.util.Date getDate();
    method public java.util.Set<java.lang.String> getInitialPolicies();
    method public boolean getPolicyQualifiersRejected();
    method public java.lang.String getSigProvider();
    method public java.security.cert.CertSelector getTargetCertConstraints();
    method public java.util.Set<java.security.cert.TrustAnchor> getTrustAnchors();
    method public boolean isAnyPolicyInhibited();
    method public boolean isExplicitPolicyRequired();
    method public boolean isPolicyMappingInhibited();
    method public boolean isRevocationEnabled();
    method public void setAnyPolicyInhibited(boolean);
    method public void setCertPathCheckers(java.util.List<java.security.cert.PKIXCertPathChecker>);
    method public void setCertStores(java.util.List<java.security.cert.CertStore>);
    method public void setDate(java.util.Date);
    method public void setExplicitPolicyRequired(boolean);
    method public void setInitialPolicies(java.util.Set<java.lang.String>);
    method public void setPolicyMappingInhibited(boolean);
    method public void setPolicyQualifiersRejected(boolean);
    method public void setRevocationEnabled(boolean);
    method public void setSigProvider(java.lang.String);
    method public void setTargetCertConstraints(java.security.cert.CertSelector);
    method public void setTrustAnchors(java.util.Set<java.security.cert.TrustAnchor>) throws java.security.InvalidAlgorithmParameterException;
  }

  public abstract interface PolicyNode {
    method public abstract java.util.Iterator<? extends java.security.cert.PolicyNode> getChildren();
    method public abstract int getDepth();
    method public abstract java.util.Set<java.lang.String> getExpectedPolicies();
    method public abstract java.security.cert.PolicyNode getParent();
    method public abstract java.util.Set<? extends java.security.cert.PolicyQualifierInfo> getPolicyQualifiers();
    method public abstract java.lang.String getValidPolicy();
    method public abstract boolean isCritical();
  }

  public class PolicyQualifierInfo {
    ctor public PolicyQualifierInfo(byte[]) throws java.io.IOException;
    method public final byte[] getEncoded();
    method public final byte[] getPolicyQualifier();
    method public final java.lang.String getPolicyQualifierId();
  }

  public class TrustAnchor {
    ctor public TrustAnchor(java.security.cert.X509Certificate, byte[]);
    ctor public TrustAnchor(java.lang.String, java.security.PublicKey, byte[]);
    ctor public TrustAnchor(javax.security.auth.x500.X500Principal, java.security.PublicKey, byte[]);
    method public final javax.security.auth.x500.X500Principal getCA();
    method public final java.lang.String getCAName();
    method public final java.security.PublicKey getCAPublicKey();
    method public final byte[] getNameConstraints();
    method public final java.security.cert.X509Certificate getTrustedCert();
  }

  public abstract class X509CRL extends java.security.cert.CRL implements java.security.cert.X509Extension {
    ctor protected X509CRL();
    method public abstract byte[] getEncoded() throws java.security.cert.CRLException;
    method public abstract java.security.Principal getIssuerDN();
    method public javax.security.auth.x500.X500Principal getIssuerX500Principal();
    method public abstract java.util.Date getNextUpdate();
    method public abstract java.security.cert.X509CRLEntry getRevokedCertificate(java.math.BigInteger);
    method public java.security.cert.X509CRLEntry getRevokedCertificate(java.security.cert.X509Certificate);
    method public abstract java.util.Set<? extends java.security.cert.X509CRLEntry> getRevokedCertificates();
    method public abstract java.lang.String getSigAlgName();
    method public abstract java.lang.String getSigAlgOID();
    method public abstract byte[] getSigAlgParams();
    method public abstract byte[] getSignature();
    method public abstract byte[] getTBSCertList() throws java.security.cert.CRLException;
    method public abstract java.util.Date getThisUpdate();
    method public abstract int getVersion();
    method public abstract void verify(java.security.PublicKey) throws java.security.cert.CRLException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
    method public abstract void verify(java.security.PublicKey, java.lang.String) throws java.security.cert.CRLException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
  }

  public abstract class X509CRLEntry implements java.security.cert.X509Extension {
    ctor public X509CRLEntry();
    method public javax.security.auth.x500.X500Principal getCertificateIssuer();
    method public abstract byte[] getEncoded() throws java.security.cert.CRLException;
    method public abstract java.util.Date getRevocationDate();
    method public abstract java.math.BigInteger getSerialNumber();
    method public abstract boolean hasExtensions();
    method public abstract java.lang.String toString();
  }

  public class X509CRLSelector implements java.security.cert.CRLSelector {
    ctor public X509CRLSelector();
    method public void addIssuer(javax.security.auth.x500.X500Principal);
    method public void addIssuerName(java.lang.String) throws java.io.IOException;
    method public void addIssuerName(byte[]) throws java.io.IOException;
    method public java.lang.Object clone();
    method public java.security.cert.X509Certificate getCertificateChecking();
    method public java.util.Date getDateAndTime();
    method public java.util.Collection<java.lang.Object> getIssuerNames();
    method public java.util.Collection<javax.security.auth.x500.X500Principal> getIssuers();
    method public java.math.BigInteger getMaxCRL();
    method public java.math.BigInteger getMinCRL();
    method public boolean match(java.security.cert.CRL);
    method public void setCertificateChecking(java.security.cert.X509Certificate);
    method public void setDateAndTime(java.util.Date);
    method public void setIssuerNames(java.util.Collection<?>) throws java.io.IOException;
    method public void setIssuers(java.util.Collection<javax.security.auth.x500.X500Principal>);
    method public void setMaxCRLNumber(java.math.BigInteger);
    method public void setMinCRLNumber(java.math.BigInteger);
  }

  public class X509CertSelector implements java.security.cert.CertSelector {
    ctor public X509CertSelector();
    method public void addPathToName(int, java.lang.String) throws java.io.IOException;
    method public void addPathToName(int, byte[]) throws java.io.IOException;
    method public void addSubjectAlternativeName(int, java.lang.String) throws java.io.IOException;
    method public void addSubjectAlternativeName(int, byte[]) throws java.io.IOException;
    method public java.lang.Object clone();
    method public byte[] getAuthorityKeyIdentifier();
    method public int getBasicConstraints();
    method public java.security.cert.X509Certificate getCertificate();
    method public java.util.Date getCertificateValid();
    method public java.util.Set<java.lang.String> getExtendedKeyUsage();
    method public javax.security.auth.x500.X500Principal getIssuer();
    method public byte[] getIssuerAsBytes() throws java.io.IOException;
    method public java.lang.String getIssuerAsString();
    method public boolean[] getKeyUsage();
    method public boolean getMatchAllSubjectAltNames();
    method public byte[] getNameConstraints();
    method public java.util.Collection<java.util.List<?>> getPathToNames();
    method public java.util.Set<java.lang.String> getPolicy();
    method public java.util.Date getPrivateKeyValid();
    method public java.math.BigInteger getSerialNumber();
    method public javax.security.auth.x500.X500Principal getSubject();
    method public java.util.Collection<java.util.List<?>> getSubjectAlternativeNames();
    method public byte[] getSubjectAsBytes() throws java.io.IOException;
    method public java.lang.String getSubjectAsString();
    method public byte[] getSubjectKeyIdentifier();
    method public java.security.PublicKey getSubjectPublicKey();
    method public java.lang.String getSubjectPublicKeyAlgID();
    method public boolean match(java.security.cert.Certificate);
    method public void setAuthorityKeyIdentifier(byte[]);
    method public void setBasicConstraints(int);
    method public void setCertificate(java.security.cert.X509Certificate);
    method public void setCertificateValid(java.util.Date);
    method public void setExtendedKeyUsage(java.util.Set<java.lang.String>) throws java.io.IOException;
    method public void setIssuer(javax.security.auth.x500.X500Principal);
    method public void setIssuer(java.lang.String) throws java.io.IOException;
    method public void setIssuer(byte[]) throws java.io.IOException;
    method public void setKeyUsage(boolean[]);
    method public void setMatchAllSubjectAltNames(boolean);
    method public void setNameConstraints(byte[]) throws java.io.IOException;
    method public void setPathToNames(java.util.Collection<java.util.List<?>>) throws java.io.IOException;
    method public void setPolicy(java.util.Set<java.lang.String>) throws java.io.IOException;
    method public void setPrivateKeyValid(java.util.Date);
    method public void setSerialNumber(java.math.BigInteger);
    method public void setSubject(javax.security.auth.x500.X500Principal);
    method public void setSubject(java.lang.String) throws java.io.IOException;
    method public void setSubject(byte[]) throws java.io.IOException;
    method public void setSubjectAlternativeNames(java.util.Collection<java.util.List<?>>) throws java.io.IOException;
    method public void setSubjectKeyIdentifier(byte[]);
    method public void setSubjectPublicKey(java.security.PublicKey);
    method public void setSubjectPublicKey(byte[]) throws java.io.IOException;
    method public void setSubjectPublicKeyAlgID(java.lang.String) throws java.io.IOException;
  }

  public abstract class X509Certificate extends java.security.cert.Certificate implements java.security.cert.X509Extension {
    ctor protected X509Certificate();
    method public abstract void checkValidity() throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException;
    method public abstract void checkValidity(java.util.Date) throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException;
    method public abstract int getBasicConstraints();
    method public java.util.List<java.lang.String> getExtendedKeyUsage() throws java.security.cert.CertificateParsingException;
    method public java.util.Collection<java.util.List<?>> getIssuerAlternativeNames() throws java.security.cert.CertificateParsingException;
    method public abstract java.security.Principal getIssuerDN();
    method public abstract boolean[] getIssuerUniqueID();
    method public javax.security.auth.x500.X500Principal getIssuerX500Principal();
    method public abstract boolean[] getKeyUsage();
    method public abstract java.util.Date getNotAfter();
    method public abstract java.util.Date getNotBefore();
    method public abstract java.math.BigInteger getSerialNumber();
    method public abstract java.lang.String getSigAlgName();
    method public abstract java.lang.String getSigAlgOID();
    method public abstract byte[] getSigAlgParams();
    method public abstract byte[] getSignature();
    method public java.util.Collection<java.util.List<?>> getSubjectAlternativeNames() throws java.security.cert.CertificateParsingException;
    method public abstract java.security.Principal getSubjectDN();
    method public abstract boolean[] getSubjectUniqueID();
    method public javax.security.auth.x500.X500Principal getSubjectX500Principal();
    method public abstract byte[] getTBSCertificate() throws java.security.cert.CertificateEncodingException;
    method public abstract int getVersion();
  }

  public abstract interface X509Extension {
    method public abstract java.util.Set<java.lang.String> getCriticalExtensionOIDs();
    method public abstract byte[] getExtensionValue(java.lang.String);
    method public abstract java.util.Set<java.lang.String> getNonCriticalExtensionOIDs();
    method public abstract boolean hasUnsupportedCriticalExtension();
  }

}

package java.security.interfaces {

  public abstract interface DSAKey {
    method public abstract java.security.interfaces.DSAParams getParams();
  }

  public abstract interface DSAKeyPairGenerator {
    method public abstract void initialize(java.security.interfaces.DSAParams, java.security.SecureRandom) throws java.security.InvalidParameterException;
    method public abstract void initialize(int, boolean, java.security.SecureRandom) throws java.security.InvalidParameterException;
  }

  public abstract interface DSAParams {
    method public abstract java.math.BigInteger getG();
    method public abstract java.math.BigInteger getP();
    method public abstract java.math.BigInteger getQ();
  }

  public abstract interface DSAPrivateKey implements java.security.interfaces.DSAKey java.security.PrivateKey {
    method public abstract java.math.BigInteger getX();
    field public static final long serialVersionUID = 7776497482533790279L; // 0x6bebab423b256247L
  }

  public abstract interface DSAPublicKey implements java.security.interfaces.DSAKey java.security.PublicKey {
    method public abstract java.math.BigInteger getY();
    field public static final long serialVersionUID = 1234526332779022332L; // 0x1121eb28ab28c7fcL
  }

  public abstract interface ECKey {
    method public abstract java.security.spec.ECParameterSpec getParams();
  }

  public abstract interface ECPrivateKey implements java.security.interfaces.ECKey java.security.PrivateKey {
    method public abstract java.math.BigInteger getS();
    field public static final long serialVersionUID = -7896394956925609184L; // 0x926a5e9fa2435b20L
  }

  public abstract interface ECPublicKey implements java.security.interfaces.ECKey java.security.PublicKey {
    method public abstract java.security.spec.ECPoint getW();
    field public static final long serialVersionUID = -3314988629879632826L; // 0xd1fecb679990cc46L
  }

  public abstract interface RSAKey {
    method public abstract java.math.BigInteger getModulus();
  }

  public abstract interface RSAMultiPrimePrivateCrtKey implements java.security.interfaces.RSAPrivateKey {
    method public abstract java.math.BigInteger getCrtCoefficient();
    method public abstract java.security.spec.RSAOtherPrimeInfo[] getOtherPrimeInfo();
    method public abstract java.math.BigInteger getPrimeExponentP();
    method public abstract java.math.BigInteger getPrimeExponentQ();
    method public abstract java.math.BigInteger getPrimeP();
    method public abstract java.math.BigInteger getPrimeQ();
    method public abstract java.math.BigInteger getPublicExponent();
    field public static final long serialVersionUID = 618058533534628008L; // 0x893c8f62dbaf8a8L
  }

  public abstract interface RSAPrivateCrtKey implements java.security.interfaces.RSAPrivateKey {
    method public abstract java.math.BigInteger getCrtCoefficient();
    method public abstract java.math.BigInteger getPrimeExponentP();
    method public abstract java.math.BigInteger getPrimeExponentQ();
    method public abstract java.math.BigInteger getPrimeP();
    method public abstract java.math.BigInteger getPrimeQ();
    method public abstract java.math.BigInteger getPublicExponent();
    field public static final long serialVersionUID = -5682214253527700368L; // 0xb124b83df8d1ec70L
  }

  public abstract interface RSAPrivateKey implements java.security.PrivateKey java.security.interfaces.RSAKey {
    method public abstract java.math.BigInteger getPrivateExponent();
    field public static final long serialVersionUID = 5187144804936595022L; // 0x47fc70b7a8c2364eL
  }

  public abstract interface RSAPublicKey implements java.security.PublicKey java.security.interfaces.RSAKey {
    method public abstract java.math.BigInteger getPublicExponent();
    field public static final long serialVersionUID = -8727434096241101194L; // 0x86e1ecedeceab676L
  }

}

package java.security.spec {

  public abstract interface AlgorithmParameterSpec {
  }

  public class DSAParameterSpec implements java.security.spec.AlgorithmParameterSpec java.security.interfaces.DSAParams {
    ctor public DSAParameterSpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getG();
    method public java.math.BigInteger getP();
    method public java.math.BigInteger getQ();
  }

  public class DSAPrivateKeySpec implements java.security.spec.KeySpec {
    ctor public DSAPrivateKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getG();
    method public java.math.BigInteger getP();
    method public java.math.BigInteger getQ();
    method public java.math.BigInteger getX();
  }

  public class DSAPublicKeySpec implements java.security.spec.KeySpec {
    ctor public DSAPublicKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getG();
    method public java.math.BigInteger getP();
    method public java.math.BigInteger getQ();
    method public java.math.BigInteger getY();
  }

  public abstract interface ECField {
    method public abstract int getFieldSize();
  }

  public class ECFieldF2m implements java.security.spec.ECField {
    ctor public ECFieldF2m(int);
    ctor public ECFieldF2m(int, java.math.BigInteger);
    ctor public ECFieldF2m(int, int[]);
    method public int getFieldSize();
    method public int getM();
    method public int[] getMidTermsOfReductionPolynomial();
    method public java.math.BigInteger getReductionPolynomial();
  }

  public class ECFieldFp implements java.security.spec.ECField {
    ctor public ECFieldFp(java.math.BigInteger);
    method public int getFieldSize();
    method public java.math.BigInteger getP();
  }

  public class ECGenParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public ECGenParameterSpec(java.lang.String);
    method public java.lang.String getName();
  }

  public class ECParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public ECParameterSpec(java.security.spec.EllipticCurve, java.security.spec.ECPoint, java.math.BigInteger, int);
    method public int getCofactor();
    method public java.security.spec.EllipticCurve getCurve();
    method public java.security.spec.ECPoint getGenerator();
    method public java.math.BigInteger getOrder();
  }

  public class ECPoint {
    ctor public ECPoint(java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getAffineX();
    method public java.math.BigInteger getAffineY();
    field public static final java.security.spec.ECPoint POINT_INFINITY;
  }

  public class ECPrivateKeySpec implements java.security.spec.KeySpec {
    ctor public ECPrivateKeySpec(java.math.BigInteger, java.security.spec.ECParameterSpec);
    method public java.security.spec.ECParameterSpec getParams();
    method public java.math.BigInteger getS();
  }

  public class ECPublicKeySpec implements java.security.spec.KeySpec {
    ctor public ECPublicKeySpec(java.security.spec.ECPoint, java.security.spec.ECParameterSpec);
    method public java.security.spec.ECParameterSpec getParams();
    method public java.security.spec.ECPoint getW();
  }

  public class EllipticCurve {
    ctor public EllipticCurve(java.security.spec.ECField, java.math.BigInteger, java.math.BigInteger, byte[]);
    ctor public EllipticCurve(java.security.spec.ECField, java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getA();
    method public java.math.BigInteger getB();
    method public java.security.spec.ECField getField();
    method public byte[] getSeed();
  }

  public abstract class EncodedKeySpec implements java.security.spec.KeySpec {
    ctor public EncodedKeySpec(byte[]);
    method public byte[] getEncoded();
    method public abstract java.lang.String getFormat();
  }

  public class InvalidKeySpecException extends java.security.GeneralSecurityException {
    ctor public InvalidKeySpecException(java.lang.String);
    ctor public InvalidKeySpecException();
    ctor public InvalidKeySpecException(java.lang.String, java.lang.Throwable);
    ctor public InvalidKeySpecException(java.lang.Throwable);
  }

  public class InvalidParameterSpecException extends java.security.GeneralSecurityException {
    ctor public InvalidParameterSpecException(java.lang.String);
    ctor public InvalidParameterSpecException();
  }

  public abstract interface KeySpec {
  }

  public class MGF1ParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public MGF1ParameterSpec(java.lang.String);
    method public java.lang.String getDigestAlgorithm();
    field public static final java.security.spec.MGF1ParameterSpec SHA1;
    field public static final java.security.spec.MGF1ParameterSpec SHA256;
    field public static final java.security.spec.MGF1ParameterSpec SHA384;
    field public static final java.security.spec.MGF1ParameterSpec SHA512;
  }

  public class PKCS8EncodedKeySpec extends java.security.spec.EncodedKeySpec {
    ctor public PKCS8EncodedKeySpec(byte[]);
    method public final java.lang.String getFormat();
  }

  public class PSSParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public PSSParameterSpec(int);
    ctor public PSSParameterSpec(java.lang.String, java.lang.String, java.security.spec.AlgorithmParameterSpec, int, int);
    method public java.lang.String getDigestAlgorithm();
    method public java.lang.String getMGFAlgorithm();
    method public java.security.spec.AlgorithmParameterSpec getMGFParameters();
    method public int getSaltLength();
    method public int getTrailerField();
    field public static final java.security.spec.PSSParameterSpec DEFAULT;
  }

  public class RSAKeyGenParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public RSAKeyGenParameterSpec(int, java.math.BigInteger);
    method public int getKeysize();
    method public java.math.BigInteger getPublicExponent();
    field public static final java.math.BigInteger F0;
    field public static final java.math.BigInteger F4;
  }

  public class RSAMultiPrimePrivateCrtKeySpec extends java.security.spec.RSAPrivateKeySpec {
    ctor public RSAMultiPrimePrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.security.spec.RSAOtherPrimeInfo[]);
    method public java.math.BigInteger getCrtCoefficient();
    method public java.security.spec.RSAOtherPrimeInfo[] getOtherPrimeInfo();
    method public java.math.BigInteger getPrimeExponentP();
    method public java.math.BigInteger getPrimeExponentQ();
    method public java.math.BigInteger getPrimeP();
    method public java.math.BigInteger getPrimeQ();
    method public java.math.BigInteger getPublicExponent();
  }

  public class RSAOtherPrimeInfo {
    ctor public RSAOtherPrimeInfo(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public final java.math.BigInteger getCrtCoefficient();
    method public final java.math.BigInteger getExponent();
    method public final java.math.BigInteger getPrime();
  }

  public class RSAPrivateCrtKeySpec extends java.security.spec.RSAPrivateKeySpec {
    ctor public RSAPrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getCrtCoefficient();
    method public java.math.BigInteger getPrimeExponentP();
    method public java.math.BigInteger getPrimeExponentQ();
    method public java.math.BigInteger getPrimeP();
    method public java.math.BigInteger getPrimeQ();
    method public java.math.BigInteger getPublicExponent();
  }

  public class RSAPrivateKeySpec implements java.security.spec.KeySpec {
    ctor public RSAPrivateKeySpec(java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getModulus();
    method public java.math.BigInteger getPrivateExponent();
  }

  public class RSAPublicKeySpec implements java.security.spec.KeySpec {
    ctor public RSAPublicKeySpec(java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getModulus();
    method public java.math.BigInteger getPublicExponent();
  }

  public class X509EncodedKeySpec extends java.security.spec.EncodedKeySpec {
    ctor public X509EncodedKeySpec(byte[]);
    method public final java.lang.String getFormat();
  }

}

package java.sql {

  public abstract interface Array {
    method public abstract void free() throws java.sql.SQLException;
    method public abstract java.lang.Object getArray() throws java.sql.SQLException;
    method public abstract java.lang.Object getArray(long, int) throws java.sql.SQLException;
    method public abstract java.lang.Object getArray(long, int, java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.lang.Object getArray(java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract int getBaseType() throws java.sql.SQLException;
    method public abstract java.lang.String getBaseTypeName() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getResultSet() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getResultSet(long, int) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getResultSet(long, int, java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getResultSet(java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
  }

  public class BatchUpdateException extends java.sql.SQLException implements java.io.Serializable {
    ctor public BatchUpdateException();
    ctor public BatchUpdateException(java.lang.Throwable);
    ctor public BatchUpdateException(int[], java.lang.Throwable);
    ctor public BatchUpdateException(java.lang.String, int[], java.lang.Throwable);
    ctor public BatchUpdateException(java.lang.String, java.lang.String, int[], java.lang.Throwable);
    ctor public BatchUpdateException(java.lang.String, java.lang.String, int, int[], java.lang.Throwable);
    ctor public BatchUpdateException(int[]);
    ctor public BatchUpdateException(java.lang.String, int[]);
    ctor public BatchUpdateException(java.lang.String, java.lang.String, int[]);
    ctor public BatchUpdateException(java.lang.String, java.lang.String, int, int[]);
    method public int[] getUpdateCounts();
  }

  public abstract interface Blob {
    method public abstract void free() throws java.sql.SQLException;
    method public abstract java.io.InputStream getBinaryStream() throws java.sql.SQLException;
    method public abstract java.io.InputStream getBinaryStream(long, long) throws java.sql.SQLException;
    method public abstract byte[] getBytes(long, int) throws java.sql.SQLException;
    method public abstract long length() throws java.sql.SQLException;
    method public abstract long position(java.sql.Blob, long) throws java.sql.SQLException;
    method public abstract long position(byte[], long) throws java.sql.SQLException;
    method public abstract java.io.OutputStream setBinaryStream(long) throws java.sql.SQLException;
    method public abstract int setBytes(long, byte[]) throws java.sql.SQLException;
    method public abstract int setBytes(long, byte[], int, int) throws java.sql.SQLException;
    method public abstract void truncate(long) throws java.sql.SQLException;
  }

  public abstract interface CallableStatement implements java.sql.PreparedStatement {
    method public abstract java.sql.Array getArray(int) throws java.sql.SQLException;
    method public abstract java.sql.Array getArray(java.lang.String) throws java.sql.SQLException;
    method public abstract java.math.BigDecimal getBigDecimal(int) throws java.sql.SQLException;
    method public abstract deprecated java.math.BigDecimal getBigDecimal(int, int) throws java.sql.SQLException;
    method public abstract java.math.BigDecimal getBigDecimal(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Blob getBlob(int) throws java.sql.SQLException;
    method public abstract java.sql.Blob getBlob(java.lang.String) throws java.sql.SQLException;
    method public abstract boolean getBoolean(int) throws java.sql.SQLException;
    method public abstract boolean getBoolean(java.lang.String) throws java.sql.SQLException;
    method public abstract byte getByte(int) throws java.sql.SQLException;
    method public abstract byte getByte(java.lang.String) throws java.sql.SQLException;
    method public abstract byte[] getBytes(int) throws java.sql.SQLException;
    method public abstract byte[] getBytes(java.lang.String) throws java.sql.SQLException;
    method public abstract java.io.Reader getCharacterStream(int) throws java.sql.SQLException;
    method public abstract java.io.Reader getCharacterStream(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Clob getClob(int) throws java.sql.SQLException;
    method public abstract java.sql.Clob getClob(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(int) throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(int, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(java.lang.String, java.util.Calendar) throws java.sql.SQLException;
    method public abstract double getDouble(int) throws java.sql.SQLException;
    method public abstract double getDouble(java.lang.String) throws java.sql.SQLException;
    method public abstract float getFloat(int) throws java.sql.SQLException;
    method public abstract float getFloat(java.lang.String) throws java.sql.SQLException;
    method public abstract int getInt(int) throws java.sql.SQLException;
    method public abstract int getInt(java.lang.String) throws java.sql.SQLException;
    method public abstract long getLong(int) throws java.sql.SQLException;
    method public abstract long getLong(java.lang.String) throws java.sql.SQLException;
    method public abstract java.io.Reader getNCharacterStream(int) throws java.sql.SQLException;
    method public abstract java.io.Reader getNCharacterStream(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.NClob getNClob(int) throws java.sql.SQLException;
    method public abstract java.sql.NClob getNClob(java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getNString(int) throws java.sql.SQLException;
    method public abstract java.lang.String getNString(java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(int) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(int, java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(java.lang.String, java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.sql.Ref getRef(int) throws java.sql.SQLException;
    method public abstract java.sql.Ref getRef(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.RowId getRowId(int) throws java.sql.SQLException;
    method public abstract java.sql.RowId getRowId(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.SQLXML getSQLXML(int) throws java.sql.SQLException;
    method public abstract java.sql.SQLXML getSQLXML(java.lang.String) throws java.sql.SQLException;
    method public abstract short getShort(int) throws java.sql.SQLException;
    method public abstract short getShort(java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getString(int) throws java.sql.SQLException;
    method public abstract java.lang.String getString(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(int) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(int, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(java.lang.String, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(int) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(int, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(java.lang.String, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.net.URL getURL(int) throws java.sql.SQLException;
    method public abstract java.net.URL getURL(java.lang.String) throws java.sql.SQLException;
    method public abstract void registerOutParameter(int, int) throws java.sql.SQLException;
    method public abstract void registerOutParameter(int, int, int) throws java.sql.SQLException;
    method public abstract void registerOutParameter(int, int, java.lang.String) throws java.sql.SQLException;
    method public abstract void registerOutParameter(java.lang.String, int) throws java.sql.SQLException;
    method public abstract void registerOutParameter(java.lang.String, int, int) throws java.sql.SQLException;
    method public abstract void registerOutParameter(java.lang.String, int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setAsciiStream(java.lang.String, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setAsciiStream(java.lang.String, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setAsciiStream(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBigDecimal(java.lang.String, java.math.BigDecimal) throws java.sql.SQLException;
    method public abstract void setBinaryStream(java.lang.String, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setBinaryStream(java.lang.String, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setBinaryStream(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBlob(java.lang.String, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setBlob(java.lang.String, java.sql.Blob) throws java.sql.SQLException;
    method public abstract void setBlob(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBoolean(java.lang.String, boolean) throws java.sql.SQLException;
    method public abstract void setByte(java.lang.String, byte) throws java.sql.SQLException;
    method public abstract void setBytes(java.lang.String, byte[]) throws java.sql.SQLException;
    method public abstract void setCharacterStream(java.lang.String, java.io.Reader, int) throws java.sql.SQLException;
    method public abstract void setCharacterStream(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setCharacterStream(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setClob(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setClob(java.lang.String, java.sql.Clob) throws java.sql.SQLException;
    method public abstract void setClob(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setDate(java.lang.String, java.sql.Date) throws java.sql.SQLException;
    method public abstract void setDate(java.lang.String, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setDouble(java.lang.String, double) throws java.sql.SQLException;
    method public abstract void setFloat(java.lang.String, float) throws java.sql.SQLException;
    method public abstract void setInt(java.lang.String, int) throws java.sql.SQLException;
    method public abstract void setLong(java.lang.String, long) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNClob(java.lang.String, java.sql.NClob) throws java.sql.SQLException;
    method public abstract void setNClob(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNClob(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNString(java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract void setNull(java.lang.String, int) throws java.sql.SQLException;
    method public abstract void setNull(java.lang.String, int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setObject(java.lang.String, java.lang.Object) throws java.sql.SQLException;
    method public abstract void setObject(java.lang.String, java.lang.Object, int) throws java.sql.SQLException;
    method public abstract void setObject(java.lang.String, java.lang.Object, int, int) throws java.sql.SQLException;
    method public abstract void setRowId(java.lang.String, java.sql.RowId) throws java.sql.SQLException;
    method public abstract void setSQLXML(java.lang.String, java.sql.SQLXML) throws java.sql.SQLException;
    method public abstract void setShort(java.lang.String, short) throws java.sql.SQLException;
    method public abstract void setString(java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract void setTime(java.lang.String, java.sql.Time) throws java.sql.SQLException;
    method public abstract void setTime(java.lang.String, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setTimestamp(java.lang.String, java.sql.Timestamp) throws java.sql.SQLException;
    method public abstract void setTimestamp(java.lang.String, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setURL(java.lang.String, java.net.URL) throws java.sql.SQLException;
    method public abstract boolean wasNull() throws java.sql.SQLException;
  }

  public final class ClientInfoStatus extends java.lang.Enum {
    method public static java.sql.ClientInfoStatus valueOf(java.lang.String);
    method public static final java.sql.ClientInfoStatus[] values();
    enum_constant public static final java.sql.ClientInfoStatus REASON_UNKNOWN;
    enum_constant public static final java.sql.ClientInfoStatus REASON_UNKNOWN_PROPERTY;
    enum_constant public static final java.sql.ClientInfoStatus REASON_VALUE_INVALID;
    enum_constant public static final java.sql.ClientInfoStatus REASON_VALUE_TRUNCATED;
  }

  public abstract interface Clob {
    method public abstract void free() throws java.sql.SQLException;
    method public abstract java.io.InputStream getAsciiStream() throws java.sql.SQLException;
    method public abstract java.io.Reader getCharacterStream() throws java.sql.SQLException;
    method public abstract java.io.Reader getCharacterStream(long, long) throws java.sql.SQLException;
    method public abstract java.lang.String getSubString(long, int) throws java.sql.SQLException;
    method public abstract long length() throws java.sql.SQLException;
    method public abstract long position(java.sql.Clob, long) throws java.sql.SQLException;
    method public abstract long position(java.lang.String, long) throws java.sql.SQLException;
    method public abstract java.io.OutputStream setAsciiStream(long) throws java.sql.SQLException;
    method public abstract java.io.Writer setCharacterStream(long) throws java.sql.SQLException;
    method public abstract int setString(long, java.lang.String) throws java.sql.SQLException;
    method public abstract int setString(long, java.lang.String, int, int) throws java.sql.SQLException;
    method public abstract void truncate(long) throws java.sql.SQLException;
  }

  public abstract interface Connection implements java.lang.AutoCloseable java.sql.Wrapper {
    method public abstract void clearWarnings() throws java.sql.SQLException;
    method public abstract void close() throws java.sql.SQLException;
    method public abstract void commit() throws java.sql.SQLException;
    method public abstract java.sql.Array createArrayOf(java.lang.String, java.lang.Object[]) throws java.sql.SQLException;
    method public abstract java.sql.Blob createBlob() throws java.sql.SQLException;
    method public abstract java.sql.Clob createClob() throws java.sql.SQLException;
    method public abstract java.sql.NClob createNClob() throws java.sql.SQLException;
    method public abstract java.sql.SQLXML createSQLXML() throws java.sql.SQLException;
    method public abstract java.sql.Statement createStatement() throws java.sql.SQLException;
    method public abstract java.sql.Statement createStatement(int, int) throws java.sql.SQLException;
    method public abstract java.sql.Statement createStatement(int, int, int) throws java.sql.SQLException;
    method public abstract java.sql.Struct createStruct(java.lang.String, java.lang.Object[]) throws java.sql.SQLException;
    method public abstract boolean getAutoCommit() throws java.sql.SQLException;
    method public abstract java.lang.String getCatalog() throws java.sql.SQLException;
    method public abstract java.lang.String getClientInfo(java.lang.String) throws java.sql.SQLException;
    method public abstract java.util.Properties getClientInfo() throws java.sql.SQLException;
    method public abstract int getHoldability() throws java.sql.SQLException;
    method public abstract java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException;
    method public abstract int getTransactionIsolation() throws java.sql.SQLException;
    method public abstract java.util.Map<java.lang.String, java.lang.Class<?>> getTypeMap() throws java.sql.SQLException;
    method public abstract java.sql.SQLWarning getWarnings() throws java.sql.SQLException;
    method public abstract boolean isClosed() throws java.sql.SQLException;
    method public abstract boolean isReadOnly() throws java.sql.SQLException;
    method public abstract boolean isValid(int) throws java.sql.SQLException;
    method public abstract java.lang.String nativeSQL(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.CallableStatement prepareCall(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.CallableStatement prepareCall(java.lang.String, int, int) throws java.sql.SQLException;
    method public abstract java.sql.CallableStatement prepareCall(java.lang.String, int, int, int) throws java.sql.SQLException;
    method public abstract java.sql.PreparedStatement prepareStatement(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.PreparedStatement prepareStatement(java.lang.String, int) throws java.sql.SQLException;
    method public abstract java.sql.PreparedStatement prepareStatement(java.lang.String, int[]) throws java.sql.SQLException;
    method public abstract java.sql.PreparedStatement prepareStatement(java.lang.String, int, int) throws java.sql.SQLException;
    method public abstract java.sql.PreparedStatement prepareStatement(java.lang.String, int, int, int) throws java.sql.SQLException;
    method public abstract java.sql.PreparedStatement prepareStatement(java.lang.String, java.lang.String[]) throws java.sql.SQLException;
    method public abstract void releaseSavepoint(java.sql.Savepoint) throws java.sql.SQLException;
    method public abstract void rollback() throws java.sql.SQLException;
    method public abstract void rollback(java.sql.Savepoint) throws java.sql.SQLException;
    method public abstract void setAutoCommit(boolean) throws java.sql.SQLException;
    method public abstract void setCatalog(java.lang.String) throws java.sql.SQLException;
    method public abstract void setClientInfo(java.lang.String, java.lang.String) throws java.sql.SQLClientInfoException;
    method public abstract void setClientInfo(java.util.Properties) throws java.sql.SQLClientInfoException;
    method public abstract void setHoldability(int) throws java.sql.SQLException;
    method public abstract void setReadOnly(boolean) throws java.sql.SQLException;
    method public abstract java.sql.Savepoint setSavepoint() throws java.sql.SQLException;
    method public abstract java.sql.Savepoint setSavepoint(java.lang.String) throws java.sql.SQLException;
    method public abstract void setTransactionIsolation(int) throws java.sql.SQLException;
    method public abstract void setTypeMap(java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    field public static final int TRANSACTION_NONE = 0; // 0x0
    field public static final int TRANSACTION_READ_COMMITTED = 2; // 0x2
    field public static final int TRANSACTION_READ_UNCOMMITTED = 1; // 0x1
    field public static final int TRANSACTION_REPEATABLE_READ = 4; // 0x4
    field public static final int TRANSACTION_SERIALIZABLE = 8; // 0x8
  }

  public class DataTruncation extends java.sql.SQLWarning implements java.io.Serializable {
    ctor public DataTruncation(int, boolean, boolean, int, int);
    ctor public DataTruncation(int, boolean, boolean, int, int, java.lang.Throwable);
    method public int getDataSize();
    method public int getIndex();
    method public boolean getParameter();
    method public boolean getRead();
    method public int getTransferSize();
  }

  public abstract interface DatabaseMetaData implements java.sql.Wrapper {
    method public abstract boolean allProceduresAreCallable() throws java.sql.SQLException;
    method public abstract boolean allTablesAreSelectable() throws java.sql.SQLException;
    method public abstract boolean autoCommitFailureClosesAllResultSets() throws java.sql.SQLException;
    method public abstract boolean dataDefinitionCausesTransactionCommit() throws java.sql.SQLException;
    method public abstract boolean dataDefinitionIgnoredInTransactions() throws java.sql.SQLException;
    method public abstract boolean deletesAreDetected(int) throws java.sql.SQLException;
    method public abstract boolean doesMaxRowSizeIncludeBlobs() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getAttributes(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getBestRowIdentifier(java.lang.String, java.lang.String, java.lang.String, int, boolean) throws java.sql.SQLException;
    method public abstract java.lang.String getCatalogSeparator() throws java.sql.SQLException;
    method public abstract java.lang.String getCatalogTerm() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getCatalogs() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getClientInfoProperties() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getColumnPrivileges(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Connection getConnection() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getCrossReference(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract int getDatabaseMajorVersion() throws java.sql.SQLException;
    method public abstract int getDatabaseMinorVersion() throws java.sql.SQLException;
    method public abstract java.lang.String getDatabaseProductName() throws java.sql.SQLException;
    method public abstract java.lang.String getDatabaseProductVersion() throws java.sql.SQLException;
    method public abstract int getDefaultTransactionIsolation() throws java.sql.SQLException;
    method public abstract int getDriverMajorVersion();
    method public abstract int getDriverMinorVersion();
    method public abstract java.lang.String getDriverName() throws java.sql.SQLException;
    method public abstract java.lang.String getDriverVersion() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getExportedKeys(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getExtraNameCharacters() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getFunctionColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getFunctions(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getIdentifierQuoteString() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getImportedKeys(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getIndexInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean) throws java.sql.SQLException;
    method public abstract int getJDBCMajorVersion() throws java.sql.SQLException;
    method public abstract int getJDBCMinorVersion() throws java.sql.SQLException;
    method public abstract int getMaxBinaryLiteralLength() throws java.sql.SQLException;
    method public abstract int getMaxCatalogNameLength() throws java.sql.SQLException;
    method public abstract int getMaxCharLiteralLength() throws java.sql.SQLException;
    method public abstract int getMaxColumnNameLength() throws java.sql.SQLException;
    method public abstract int getMaxColumnsInGroupBy() throws java.sql.SQLException;
    method public abstract int getMaxColumnsInIndex() throws java.sql.SQLException;
    method public abstract int getMaxColumnsInOrderBy() throws java.sql.SQLException;
    method public abstract int getMaxColumnsInSelect() throws java.sql.SQLException;
    method public abstract int getMaxColumnsInTable() throws java.sql.SQLException;
    method public abstract int getMaxConnections() throws java.sql.SQLException;
    method public abstract int getMaxCursorNameLength() throws java.sql.SQLException;
    method public abstract int getMaxIndexLength() throws java.sql.SQLException;
    method public abstract int getMaxProcedureNameLength() throws java.sql.SQLException;
    method public abstract int getMaxRowSize() throws java.sql.SQLException;
    method public abstract int getMaxSchemaNameLength() throws java.sql.SQLException;
    method public abstract int getMaxStatementLength() throws java.sql.SQLException;
    method public abstract int getMaxStatements() throws java.sql.SQLException;
    method public abstract int getMaxTableNameLength() throws java.sql.SQLException;
    method public abstract int getMaxTablesInSelect() throws java.sql.SQLException;
    method public abstract int getMaxUserNameLength() throws java.sql.SQLException;
    method public abstract java.lang.String getNumericFunctions() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getPrimaryKeys(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getProcedureColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getProcedureTerm() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getProcedures(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract int getResultSetHoldability() throws java.sql.SQLException;
    method public abstract java.sql.RowIdLifetime getRowIdLifetime() throws java.sql.SQLException;
    method public abstract java.lang.String getSQLKeywords() throws java.sql.SQLException;
    method public abstract int getSQLStateType() throws java.sql.SQLException;
    method public abstract java.lang.String getSchemaTerm() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getSchemas() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getSchemas(java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getSearchStringEscape() throws java.sql.SQLException;
    method public abstract java.lang.String getStringFunctions() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getSuperTables(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getSuperTypes(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getSystemFunctions() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getTablePrivileges(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getTableTypes() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) throws java.sql.SQLException;
    method public abstract java.lang.String getTimeDateFunctions() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getTypeInfo() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getUDTs(java.lang.String, java.lang.String, java.lang.String, int[]) throws java.sql.SQLException;
    method public abstract java.lang.String getURL() throws java.sql.SQLException;
    method public abstract java.lang.String getUserName() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getVersionColumns(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract boolean insertsAreDetected(int) throws java.sql.SQLException;
    method public abstract boolean isCatalogAtStart() throws java.sql.SQLException;
    method public abstract boolean isReadOnly() throws java.sql.SQLException;
    method public abstract boolean locatorsUpdateCopy() throws java.sql.SQLException;
    method public abstract boolean nullPlusNonNullIsNull() throws java.sql.SQLException;
    method public abstract boolean nullsAreSortedAtEnd() throws java.sql.SQLException;
    method public abstract boolean nullsAreSortedAtStart() throws java.sql.SQLException;
    method public abstract boolean nullsAreSortedHigh() throws java.sql.SQLException;
    method public abstract boolean nullsAreSortedLow() throws java.sql.SQLException;
    method public abstract boolean othersDeletesAreVisible(int) throws java.sql.SQLException;
    method public abstract boolean othersInsertsAreVisible(int) throws java.sql.SQLException;
    method public abstract boolean othersUpdatesAreVisible(int) throws java.sql.SQLException;
    method public abstract boolean ownDeletesAreVisible(int) throws java.sql.SQLException;
    method public abstract boolean ownInsertsAreVisible(int) throws java.sql.SQLException;
    method public abstract boolean ownUpdatesAreVisible(int) throws java.sql.SQLException;
    method public abstract boolean storesLowerCaseIdentifiers() throws java.sql.SQLException;
    method public abstract boolean storesLowerCaseQuotedIdentifiers() throws java.sql.SQLException;
    method public abstract boolean storesMixedCaseIdentifiers() throws java.sql.SQLException;
    method public abstract boolean storesMixedCaseQuotedIdentifiers() throws java.sql.SQLException;
    method public abstract boolean storesUpperCaseIdentifiers() throws java.sql.SQLException;
    method public abstract boolean storesUpperCaseQuotedIdentifiers() throws java.sql.SQLException;
    method public abstract boolean supportsANSI92EntryLevelSQL() throws java.sql.SQLException;
    method public abstract boolean supportsANSI92FullSQL() throws java.sql.SQLException;
    method public abstract boolean supportsANSI92IntermediateSQL() throws java.sql.SQLException;
    method public abstract boolean supportsAlterTableWithAddColumn() throws java.sql.SQLException;
    method public abstract boolean supportsAlterTableWithDropColumn() throws java.sql.SQLException;
    method public abstract boolean supportsBatchUpdates() throws java.sql.SQLException;
    method public abstract boolean supportsCatalogsInDataManipulation() throws java.sql.SQLException;
    method public abstract boolean supportsCatalogsInIndexDefinitions() throws java.sql.SQLException;
    method public abstract boolean supportsCatalogsInPrivilegeDefinitions() throws java.sql.SQLException;
    method public abstract boolean supportsCatalogsInProcedureCalls() throws java.sql.SQLException;
    method public abstract boolean supportsCatalogsInTableDefinitions() throws java.sql.SQLException;
    method public abstract boolean supportsColumnAliasing() throws java.sql.SQLException;
    method public abstract boolean supportsConvert() throws java.sql.SQLException;
    method public abstract boolean supportsConvert(int, int) throws java.sql.SQLException;
    method public abstract boolean supportsCoreSQLGrammar() throws java.sql.SQLException;
    method public abstract boolean supportsCorrelatedSubqueries() throws java.sql.SQLException;
    method public abstract boolean supportsDataDefinitionAndDataManipulationTransactions() throws java.sql.SQLException;
    method public abstract boolean supportsDataManipulationTransactionsOnly() throws java.sql.SQLException;
    method public abstract boolean supportsDifferentTableCorrelationNames() throws java.sql.SQLException;
    method public abstract boolean supportsExpressionsInOrderBy() throws java.sql.SQLException;
    method public abstract boolean supportsExtendedSQLGrammar() throws java.sql.SQLException;
    method public abstract boolean supportsFullOuterJoins() throws java.sql.SQLException;
    method public abstract boolean supportsGetGeneratedKeys() throws java.sql.SQLException;
    method public abstract boolean supportsGroupBy() throws java.sql.SQLException;
    method public abstract boolean supportsGroupByBeyondSelect() throws java.sql.SQLException;
    method public abstract boolean supportsGroupByUnrelated() throws java.sql.SQLException;
    method public abstract boolean supportsIntegrityEnhancementFacility() throws java.sql.SQLException;
    method public abstract boolean supportsLikeEscapeClause() throws java.sql.SQLException;
    method public abstract boolean supportsLimitedOuterJoins() throws java.sql.SQLException;
    method public abstract boolean supportsMinimumSQLGrammar() throws java.sql.SQLException;
    method public abstract boolean supportsMixedCaseIdentifiers() throws java.sql.SQLException;
    method public abstract boolean supportsMixedCaseQuotedIdentifiers() throws java.sql.SQLException;
    method public abstract boolean supportsMultipleOpenResults() throws java.sql.SQLException;
    method public abstract boolean supportsMultipleResultSets() throws java.sql.SQLException;
    method public abstract boolean supportsMultipleTransactions() throws java.sql.SQLException;
    method public abstract boolean supportsNamedParameters() throws java.sql.SQLException;
    method public abstract boolean supportsNonNullableColumns() throws java.sql.SQLException;
    method public abstract boolean supportsOpenCursorsAcrossCommit() throws java.sql.SQLException;
    method public abstract boolean supportsOpenCursorsAcrossRollback() throws java.sql.SQLException;
    method public abstract boolean supportsOpenStatementsAcrossCommit() throws java.sql.SQLException;
    method public abstract boolean supportsOpenStatementsAcrossRollback() throws java.sql.SQLException;
    method public abstract boolean supportsOrderByUnrelated() throws java.sql.SQLException;
    method public abstract boolean supportsOuterJoins() throws java.sql.SQLException;
    method public abstract boolean supportsPositionedDelete() throws java.sql.SQLException;
    method public abstract boolean supportsPositionedUpdate() throws java.sql.SQLException;
    method public abstract boolean supportsResultSetConcurrency(int, int) throws java.sql.SQLException;
    method public abstract boolean supportsResultSetHoldability(int) throws java.sql.SQLException;
    method public abstract boolean supportsResultSetType(int) throws java.sql.SQLException;
    method public abstract boolean supportsSavepoints() throws java.sql.SQLException;
    method public abstract boolean supportsSchemasInDataManipulation() throws java.sql.SQLException;
    method public abstract boolean supportsSchemasInIndexDefinitions() throws java.sql.SQLException;
    method public abstract boolean supportsSchemasInPrivilegeDefinitions() throws java.sql.SQLException;
    method public abstract boolean supportsSchemasInProcedureCalls() throws java.sql.SQLException;
    method public abstract boolean supportsSchemasInTableDefinitions() throws java.sql.SQLException;
    method public abstract boolean supportsSelectForUpdate() throws java.sql.SQLException;
    method public abstract boolean supportsStatementPooling() throws java.sql.SQLException;
    method public abstract boolean supportsStoredFunctionsUsingCallSyntax() throws java.sql.SQLException;
    method public abstract boolean supportsStoredProcedures() throws java.sql.SQLException;
    method public abstract boolean supportsSubqueriesInComparisons() throws java.sql.SQLException;
    method public abstract boolean supportsSubqueriesInExists() throws java.sql.SQLException;
    method public abstract boolean supportsSubqueriesInIns() throws java.sql.SQLException;
    method public abstract boolean supportsSubqueriesInQuantifieds() throws java.sql.SQLException;
    method public abstract boolean supportsTableCorrelationNames() throws java.sql.SQLException;
    method public abstract boolean supportsTransactionIsolationLevel(int) throws java.sql.SQLException;
    method public abstract boolean supportsTransactions() throws java.sql.SQLException;
    method public abstract boolean supportsUnion() throws java.sql.SQLException;
    method public abstract boolean supportsUnionAll() throws java.sql.SQLException;
    method public abstract boolean updatesAreDetected(int) throws java.sql.SQLException;
    method public abstract boolean usesLocalFilePerTable() throws java.sql.SQLException;
    method public abstract boolean usesLocalFiles() throws java.sql.SQLException;
    field public static final short attributeNoNulls = 0; // 0x0
    field public static final short attributeNullable = 1; // 0x1
    field public static final short attributeNullableUnknown = 2; // 0x2
    field public static final int bestRowNotPseudo = 1; // 0x1
    field public static final int bestRowPseudo = 2; // 0x2
    field public static final int bestRowSession = 2; // 0x2
    field public static final int bestRowTemporary = 0; // 0x0
    field public static final int bestRowTransaction = 1; // 0x1
    field public static final int bestRowUnknown = 0; // 0x0
    field public static final int columnNoNulls = 0; // 0x0
    field public static final int columnNullable = 1; // 0x1
    field public static final int columnNullableUnknown = 2; // 0x2
    field public static final int functionColumnIn = 1; // 0x1
    field public static final int functionColumnInOut = 2; // 0x2
    field public static final int functionColumnOut = 3; // 0x3
    field public static final int functionColumnResult = 5; // 0x5
    field public static final int functionColumnUnknown = 0; // 0x0
    field public static final int functionNoNulls = 0; // 0x0
    field public static final int functionNoTable = 1; // 0x1
    field public static final int functionNullable = 1; // 0x1
    field public static final int functionNullableUnknown = 2; // 0x2
    field public static final int functionResultUnknown = 0; // 0x0
    field public static final int functionReturn = 4; // 0x4
    field public static final int functionReturnsTable = 2; // 0x2
    field public static final int importedKeyCascade = 0; // 0x0
    field public static final int importedKeyInitiallyDeferred = 5; // 0x5
    field public static final int importedKeyInitiallyImmediate = 6; // 0x6
    field public static final int importedKeyNoAction = 3; // 0x3
    field public static final int importedKeyNotDeferrable = 7; // 0x7
    field public static final int importedKeyRestrict = 1; // 0x1
    field public static final int importedKeySetDefault = 4; // 0x4
    field public static final int importedKeySetNull = 2; // 0x2
    field public static final int procedureColumnIn = 1; // 0x1
    field public static final int procedureColumnInOut = 2; // 0x2
    field public static final int procedureColumnOut = 4; // 0x4
    field public static final int procedureColumnResult = 3; // 0x3
    field public static final int procedureColumnReturn = 5; // 0x5
    field public static final int procedureColumnUnknown = 0; // 0x0
    field public static final int procedureNoNulls = 0; // 0x0
    field public static final int procedureNoResult = 1; // 0x1
    field public static final int procedureNullable = 1; // 0x1
    field public static final int procedureNullableUnknown = 2; // 0x2
    field public static final int procedureResultUnknown = 0; // 0x0
    field public static final int procedureReturnsResult = 2; // 0x2
    field public static final int sqlStateSQL = 2; // 0x2
    field public static final int sqlStateSQL99 = 2; // 0x2
    field public static final int sqlStateXOpen = 1; // 0x1
    field public static final short tableIndexClustered = 1; // 0x1
    field public static final short tableIndexHashed = 2; // 0x2
    field public static final short tableIndexOther = 3; // 0x3
    field public static final short tableIndexStatistic = 0; // 0x0
    field public static final int typeNoNulls = 0; // 0x0
    field public static final int typeNullable = 1; // 0x1
    field public static final int typeNullableUnknown = 2; // 0x2
    field public static final int typePredBasic = 2; // 0x2
    field public static final int typePredChar = 1; // 0x1
    field public static final int typePredNone = 0; // 0x0
    field public static final int typeSearchable = 3; // 0x3
    field public static final int versionColumnNotPseudo = 1; // 0x1
    field public static final int versionColumnPseudo = 2; // 0x2
    field public static final int versionColumnUnknown = 0; // 0x0
  }

  public class Date extends java.util.Date {
    ctor public deprecated Date(int, int, int);
    ctor public Date(long);
    method public static java.sql.Date valueOf(java.lang.String);
  }

  public abstract interface Driver {
    method public abstract boolean acceptsURL(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Connection connect(java.lang.String, java.util.Properties) throws java.sql.SQLException;
    method public abstract int getMajorVersion();
    method public abstract int getMinorVersion();
    method public abstract java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String, java.util.Properties) throws java.sql.SQLException;
    method public abstract boolean jdbcCompliant();
  }

  public class DriverManager {
    method public static void deregisterDriver(java.sql.Driver) throws java.sql.SQLException;
    method public static java.sql.Connection getConnection(java.lang.String) throws java.sql.SQLException;
    method public static java.sql.Connection getConnection(java.lang.String, java.util.Properties) throws java.sql.SQLException;
    method public static java.sql.Connection getConnection(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public static java.sql.Driver getDriver(java.lang.String) throws java.sql.SQLException;
    method public static java.util.Enumeration<java.sql.Driver> getDrivers();
    method public static deprecated java.io.PrintStream getLogStream();
    method public static java.io.PrintWriter getLogWriter();
    method public static int getLoginTimeout();
    method public static void println(java.lang.String);
    method public static void registerDriver(java.sql.Driver) throws java.sql.SQLException;
    method public static deprecated void setLogStream(java.io.PrintStream);
    method public static void setLogWriter(java.io.PrintWriter);
    method public static void setLoginTimeout(int);
  }

  public class DriverPropertyInfo {
    ctor public DriverPropertyInfo(java.lang.String, java.lang.String);
    field public java.lang.String[] choices;
    field public java.lang.String description;
    field public java.lang.String name;
    field public boolean required;
    field public java.lang.String value;
  }

  public abstract interface NClob implements java.sql.Clob {
  }

  public abstract interface ParameterMetaData implements java.sql.Wrapper {
    method public abstract java.lang.String getParameterClassName(int) throws java.sql.SQLException;
    method public abstract int getParameterCount() throws java.sql.SQLException;
    method public abstract int getParameterMode(int) throws java.sql.SQLException;
    method public abstract int getParameterType(int) throws java.sql.SQLException;
    method public abstract java.lang.String getParameterTypeName(int) throws java.sql.SQLException;
    method public abstract int getPrecision(int) throws java.sql.SQLException;
    method public abstract int getScale(int) throws java.sql.SQLException;
    method public abstract int isNullable(int) throws java.sql.SQLException;
    method public abstract boolean isSigned(int) throws java.sql.SQLException;
    field public static final int parameterModeIn = 1; // 0x1
    field public static final int parameterModeInOut = 2; // 0x2
    field public static final int parameterModeOut = 4; // 0x4
    field public static final int parameterModeUnknown = 0; // 0x0
    field public static final int parameterNoNulls = 0; // 0x0
    field public static final int parameterNullable = 1; // 0x1
    field public static final int parameterNullableUnknown = 2; // 0x2
  }

  public abstract interface PreparedStatement implements java.sql.Statement {
    method public abstract void addBatch() throws java.sql.SQLException;
    method public abstract void clearParameters() throws java.sql.SQLException;
    method public abstract boolean execute() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet executeQuery() throws java.sql.SQLException;
    method public abstract int executeUpdate() throws java.sql.SQLException;
    method public abstract java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException;
    method public abstract java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException;
    method public abstract void setArray(int, java.sql.Array) throws java.sql.SQLException;
    method public abstract void setAsciiStream(int, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setAsciiStream(int, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setAsciiStream(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBigDecimal(int, java.math.BigDecimal) throws java.sql.SQLException;
    method public abstract void setBinaryStream(int, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setBinaryStream(int, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setBinaryStream(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBlob(int, java.sql.Blob) throws java.sql.SQLException;
    method public abstract void setBlob(int, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setBlob(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBoolean(int, boolean) throws java.sql.SQLException;
    method public abstract void setByte(int, byte) throws java.sql.SQLException;
    method public abstract void setBytes(int, byte[]) throws java.sql.SQLException;
    method public abstract void setCharacterStream(int, java.io.Reader, int) throws java.sql.SQLException;
    method public abstract void setCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setClob(int, java.sql.Clob) throws java.sql.SQLException;
    method public abstract void setClob(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setClob(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setDate(int, java.sql.Date) throws java.sql.SQLException;
    method public abstract void setDate(int, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setDouble(int, double) throws java.sql.SQLException;
    method public abstract void setFloat(int, float) throws java.sql.SQLException;
    method public abstract void setInt(int, int) throws java.sql.SQLException;
    method public abstract void setLong(int, long) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNClob(int, java.sql.NClob) throws java.sql.SQLException;
    method public abstract void setNClob(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNClob(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNString(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setNull(int, int) throws java.sql.SQLException;
    method public abstract void setNull(int, int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object, int) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object, int, int) throws java.sql.SQLException;
    method public abstract void setRef(int, java.sql.Ref) throws java.sql.SQLException;
    method public abstract void setRowId(int, java.sql.RowId) throws java.sql.SQLException;
    method public abstract void setSQLXML(int, java.sql.SQLXML) throws java.sql.SQLException;
    method public abstract void setShort(int, short) throws java.sql.SQLException;
    method public abstract void setString(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setTime(int, java.sql.Time) throws java.sql.SQLException;
    method public abstract void setTime(int, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setTimestamp(int, java.sql.Timestamp) throws java.sql.SQLException;
    method public abstract void setTimestamp(int, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setURL(int, java.net.URL) throws java.sql.SQLException;
    method public abstract deprecated void setUnicodeStream(int, java.io.InputStream, int) throws java.sql.SQLException;
  }

  public abstract interface Ref {
    method public abstract java.lang.String getBaseTypeName() throws java.sql.SQLException;
    method public abstract java.lang.Object getObject() throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract void setObject(java.lang.Object) throws java.sql.SQLException;
  }

  public abstract interface ResultSet implements java.lang.AutoCloseable java.sql.Wrapper {
    method public abstract boolean absolute(int) throws java.sql.SQLException;
    method public abstract void afterLast() throws java.sql.SQLException;
    method public abstract void beforeFirst() throws java.sql.SQLException;
    method public abstract void cancelRowUpdates() throws java.sql.SQLException;
    method public abstract void clearWarnings() throws java.sql.SQLException;
    method public abstract void close() throws java.sql.SQLException;
    method public abstract void deleteRow() throws java.sql.SQLException;
    method public abstract int findColumn(java.lang.String) throws java.sql.SQLException;
    method public abstract boolean first() throws java.sql.SQLException;
    method public abstract java.sql.Array getArray(int) throws java.sql.SQLException;
    method public abstract java.sql.Array getArray(java.lang.String) throws java.sql.SQLException;
    method public abstract java.io.InputStream getAsciiStream(int) throws java.sql.SQLException;
    method public abstract java.io.InputStream getAsciiStream(java.lang.String) throws java.sql.SQLException;
    method public abstract java.math.BigDecimal getBigDecimal(int) throws java.sql.SQLException;
    method public abstract deprecated java.math.BigDecimal getBigDecimal(int, int) throws java.sql.SQLException;
    method public abstract java.math.BigDecimal getBigDecimal(java.lang.String) throws java.sql.SQLException;
    method public abstract deprecated java.math.BigDecimal getBigDecimal(java.lang.String, int) throws java.sql.SQLException;
    method public abstract java.io.InputStream getBinaryStream(int) throws java.sql.SQLException;
    method public abstract java.io.InputStream getBinaryStream(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Blob getBlob(int) throws java.sql.SQLException;
    method public abstract java.sql.Blob getBlob(java.lang.String) throws java.sql.SQLException;
    method public abstract boolean getBoolean(int) throws java.sql.SQLException;
    method public abstract boolean getBoolean(java.lang.String) throws java.sql.SQLException;
    method public abstract byte getByte(int) throws java.sql.SQLException;
    method public abstract byte getByte(java.lang.String) throws java.sql.SQLException;
    method public abstract byte[] getBytes(int) throws java.sql.SQLException;
    method public abstract byte[] getBytes(java.lang.String) throws java.sql.SQLException;
    method public abstract java.io.Reader getCharacterStream(int) throws java.sql.SQLException;
    method public abstract java.io.Reader getCharacterStream(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Clob getClob(int) throws java.sql.SQLException;
    method public abstract java.sql.Clob getClob(java.lang.String) throws java.sql.SQLException;
    method public abstract int getConcurrency() throws java.sql.SQLException;
    method public abstract java.lang.String getCursorName() throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(int) throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(int, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Date getDate(java.lang.String, java.util.Calendar) throws java.sql.SQLException;
    method public abstract double getDouble(int) throws java.sql.SQLException;
    method public abstract double getDouble(java.lang.String) throws java.sql.SQLException;
    method public abstract int getFetchDirection() throws java.sql.SQLException;
    method public abstract int getFetchSize() throws java.sql.SQLException;
    method public abstract float getFloat(int) throws java.sql.SQLException;
    method public abstract float getFloat(java.lang.String) throws java.sql.SQLException;
    method public abstract int getHoldability() throws java.sql.SQLException;
    method public abstract int getInt(int) throws java.sql.SQLException;
    method public abstract int getInt(java.lang.String) throws java.sql.SQLException;
    method public abstract long getLong(int) throws java.sql.SQLException;
    method public abstract long getLong(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException;
    method public abstract java.io.Reader getNCharacterStream(int) throws java.sql.SQLException;
    method public abstract java.io.Reader getNCharacterStream(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.NClob getNClob(int) throws java.sql.SQLException;
    method public abstract java.sql.NClob getNClob(java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.String getNString(int) throws java.sql.SQLException;
    method public abstract java.lang.String getNString(java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(int) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(int, java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(java.lang.String) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject(java.lang.String, java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.sql.Ref getRef(int) throws java.sql.SQLException;
    method public abstract java.sql.Ref getRef(java.lang.String) throws java.sql.SQLException;
    method public abstract int getRow() throws java.sql.SQLException;
    method public abstract java.sql.RowId getRowId(int) throws java.sql.SQLException;
    method public abstract java.sql.RowId getRowId(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.SQLXML getSQLXML(int) throws java.sql.SQLException;
    method public abstract java.sql.SQLXML getSQLXML(java.lang.String) throws java.sql.SQLException;
    method public abstract short getShort(int) throws java.sql.SQLException;
    method public abstract short getShort(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Statement getStatement() throws java.sql.SQLException;
    method public abstract java.lang.String getString(int) throws java.sql.SQLException;
    method public abstract java.lang.String getString(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(int) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(int, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Time getTime(java.lang.String, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(int) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(int, java.util.Calendar) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.Timestamp getTimestamp(java.lang.String, java.util.Calendar) throws java.sql.SQLException;
    method public abstract int getType() throws java.sql.SQLException;
    method public abstract java.net.URL getURL(int) throws java.sql.SQLException;
    method public abstract java.net.URL getURL(java.lang.String) throws java.sql.SQLException;
    method public abstract deprecated java.io.InputStream getUnicodeStream(int) throws java.sql.SQLException;
    method public abstract deprecated java.io.InputStream getUnicodeStream(java.lang.String) throws java.sql.SQLException;
    method public abstract java.sql.SQLWarning getWarnings() throws java.sql.SQLException;
    method public abstract void insertRow() throws java.sql.SQLException;
    method public abstract boolean isAfterLast() throws java.sql.SQLException;
    method public abstract boolean isBeforeFirst() throws java.sql.SQLException;
    method public abstract boolean isClosed() throws java.sql.SQLException;
    method public abstract boolean isFirst() throws java.sql.SQLException;
    method public abstract boolean isLast() throws java.sql.SQLException;
    method public abstract boolean last() throws java.sql.SQLException;
    method public abstract void moveToCurrentRow() throws java.sql.SQLException;
    method public abstract void moveToInsertRow() throws java.sql.SQLException;
    method public abstract boolean next() throws java.sql.SQLException;
    method public abstract boolean previous() throws java.sql.SQLException;
    method public abstract void refreshRow() throws java.sql.SQLException;
    method public abstract boolean relative(int) throws java.sql.SQLException;
    method public abstract boolean rowDeleted() throws java.sql.SQLException;
    method public abstract boolean rowInserted() throws java.sql.SQLException;
    method public abstract boolean rowUpdated() throws java.sql.SQLException;
    method public abstract void setFetchDirection(int) throws java.sql.SQLException;
    method public abstract void setFetchSize(int) throws java.sql.SQLException;
    method public abstract void updateArray(int, java.sql.Array) throws java.sql.SQLException;
    method public abstract void updateArray(java.lang.String, java.sql.Array) throws java.sql.SQLException;
    method public abstract void updateAsciiStream(int, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void updateAsciiStream(java.lang.String, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void updateAsciiStream(int, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void updateAsciiStream(java.lang.String, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void updateAsciiStream(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void updateAsciiStream(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void updateBigDecimal(int, java.math.BigDecimal) throws java.sql.SQLException;
    method public abstract void updateBigDecimal(java.lang.String, java.math.BigDecimal) throws java.sql.SQLException;
    method public abstract void updateBinaryStream(int, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void updateBinaryStream(java.lang.String, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void updateBinaryStream(int, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void updateBinaryStream(java.lang.String, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void updateBinaryStream(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void updateBinaryStream(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void updateBlob(int, java.sql.Blob) throws java.sql.SQLException;
    method public abstract void updateBlob(java.lang.String, java.sql.Blob) throws java.sql.SQLException;
    method public abstract void updateBlob(int, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void updateBlob(java.lang.String, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void updateBlob(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void updateBlob(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void updateBoolean(int, boolean) throws java.sql.SQLException;
    method public abstract void updateBoolean(java.lang.String, boolean) throws java.sql.SQLException;
    method public abstract void updateByte(int, byte) throws java.sql.SQLException;
    method public abstract void updateByte(java.lang.String, byte) throws java.sql.SQLException;
    method public abstract void updateBytes(int, byte[]) throws java.sql.SQLException;
    method public abstract void updateBytes(java.lang.String, byte[]) throws java.sql.SQLException;
    method public abstract void updateCharacterStream(int, java.io.Reader, int) throws java.sql.SQLException;
    method public abstract void updateCharacterStream(java.lang.String, java.io.Reader, int) throws java.sql.SQLException;
    method public abstract void updateCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateCharacterStream(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateCharacterStream(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateClob(int, java.sql.Clob) throws java.sql.SQLException;
    method public abstract void updateClob(java.lang.String, java.sql.Clob) throws java.sql.SQLException;
    method public abstract void updateClob(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateClob(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateClob(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateClob(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateDate(int, java.sql.Date) throws java.sql.SQLException;
    method public abstract void updateDate(java.lang.String, java.sql.Date) throws java.sql.SQLException;
    method public abstract void updateDouble(int, double) throws java.sql.SQLException;
    method public abstract void updateDouble(java.lang.String, double) throws java.sql.SQLException;
    method public abstract void updateFloat(int, float) throws java.sql.SQLException;
    method public abstract void updateFloat(java.lang.String, float) throws java.sql.SQLException;
    method public abstract void updateInt(int, int) throws java.sql.SQLException;
    method public abstract void updateInt(java.lang.String, int) throws java.sql.SQLException;
    method public abstract void updateLong(int, long) throws java.sql.SQLException;
    method public abstract void updateLong(java.lang.String, long) throws java.sql.SQLException;
    method public abstract void updateNCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateNCharacterStream(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateNCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateNCharacterStream(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateNClob(int, java.sql.NClob) throws java.sql.SQLException;
    method public abstract void updateNClob(java.lang.String, java.sql.NClob) throws java.sql.SQLException;
    method public abstract void updateNClob(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateNClob(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void updateNClob(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateNClob(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void updateNString(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void updateNString(java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract void updateNull(int) throws java.sql.SQLException;
    method public abstract void updateNull(java.lang.String) throws java.sql.SQLException;
    method public abstract void updateObject(int, java.lang.Object) throws java.sql.SQLException;
    method public abstract void updateObject(int, java.lang.Object, int) throws java.sql.SQLException;
    method public abstract void updateObject(java.lang.String, java.lang.Object) throws java.sql.SQLException;
    method public abstract void updateObject(java.lang.String, java.lang.Object, int) throws java.sql.SQLException;
    method public abstract void updateRef(int, java.sql.Ref) throws java.sql.SQLException;
    method public abstract void updateRef(java.lang.String, java.sql.Ref) throws java.sql.SQLException;
    method public abstract void updateRow() throws java.sql.SQLException;
    method public abstract void updateRowId(int, java.sql.RowId) throws java.sql.SQLException;
    method public abstract void updateRowId(java.lang.String, java.sql.RowId) throws java.sql.SQLException;
    method public abstract void updateSQLXML(int, java.sql.SQLXML) throws java.sql.SQLException;
    method public abstract void updateSQLXML(java.lang.String, java.sql.SQLXML) throws java.sql.SQLException;
    method public abstract void updateShort(int, short) throws java.sql.SQLException;
    method public abstract void updateShort(java.lang.String, short) throws java.sql.SQLException;
    method public abstract void updateString(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void updateString(java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract void updateTime(int, java.sql.Time) throws java.sql.SQLException;
    method public abstract void updateTime(java.lang.String, java.sql.Time) throws java.sql.SQLException;
    method public abstract void updateTimestamp(int, java.sql.Timestamp) throws java.sql.SQLException;
    method public abstract void updateTimestamp(java.lang.String, java.sql.Timestamp) throws java.sql.SQLException;
    method public abstract boolean wasNull() throws java.sql.SQLException;
    field public static final int CLOSE_CURSORS_AT_COMMIT = 2; // 0x2
    field public static final int CONCUR_READ_ONLY = 1007; // 0x3ef
    field public static final int CONCUR_UPDATABLE = 1008; // 0x3f0
    field public static final int FETCH_FORWARD = 1000; // 0x3e8
    field public static final int FETCH_REVERSE = 1001; // 0x3e9
    field public static final int FETCH_UNKNOWN = 1002; // 0x3ea
    field public static final int HOLD_CURSORS_OVER_COMMIT = 1; // 0x1
    field public static final int TYPE_FORWARD_ONLY = 1003; // 0x3eb
    field public static final int TYPE_SCROLL_INSENSITIVE = 1004; // 0x3ec
    field public static final int TYPE_SCROLL_SENSITIVE = 1005; // 0x3ed
  }

  public abstract interface ResultSetMetaData implements java.sql.Wrapper {
    method public abstract java.lang.String getCatalogName(int) throws java.sql.SQLException;
    method public abstract java.lang.String getColumnClassName(int) throws java.sql.SQLException;
    method public abstract int getColumnCount() throws java.sql.SQLException;
    method public abstract int getColumnDisplaySize(int) throws java.sql.SQLException;
    method public abstract java.lang.String getColumnLabel(int) throws java.sql.SQLException;
    method public abstract java.lang.String getColumnName(int) throws java.sql.SQLException;
    method public abstract int getColumnType(int) throws java.sql.SQLException;
    method public abstract java.lang.String getColumnTypeName(int) throws java.sql.SQLException;
    method public abstract int getPrecision(int) throws java.sql.SQLException;
    method public abstract int getScale(int) throws java.sql.SQLException;
    method public abstract java.lang.String getSchemaName(int) throws java.sql.SQLException;
    method public abstract java.lang.String getTableName(int) throws java.sql.SQLException;
    method public abstract boolean isAutoIncrement(int) throws java.sql.SQLException;
    method public abstract boolean isCaseSensitive(int) throws java.sql.SQLException;
    method public abstract boolean isCurrency(int) throws java.sql.SQLException;
    method public abstract boolean isDefinitelyWritable(int) throws java.sql.SQLException;
    method public abstract int isNullable(int) throws java.sql.SQLException;
    method public abstract boolean isReadOnly(int) throws java.sql.SQLException;
    method public abstract boolean isSearchable(int) throws java.sql.SQLException;
    method public abstract boolean isSigned(int) throws java.sql.SQLException;
    method public abstract boolean isWritable(int) throws java.sql.SQLException;
    field public static final int columnNoNulls = 0; // 0x0
    field public static final int columnNullable = 1; // 0x1
    field public static final int columnNullableUnknown = 2; // 0x2
  }

  public abstract interface RowId {
    method public abstract boolean equals(java.lang.Object);
    method public abstract byte[] getBytes();
    method public abstract int hashCode();
    method public abstract java.lang.String toString();
  }

  public final class RowIdLifetime extends java.lang.Enum {
    method public static java.sql.RowIdLifetime valueOf(java.lang.String);
    method public static final java.sql.RowIdLifetime[] values();
    enum_constant public static final java.sql.RowIdLifetime ROWID_UNSUPPORTED;
    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_FOREVER;
    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_OTHER;
    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_SESSION;
    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_TRANSACTION;
  }

  public class SQLClientInfoException extends java.sql.SQLException {
    ctor public SQLClientInfoException();
    ctor public SQLClientInfoException(java.util.Map<java.lang.String, java.sql.ClientInfoStatus>);
    ctor public SQLClientInfoException(java.util.Map<java.lang.String, java.sql.ClientInfoStatus>, java.lang.Throwable);
    ctor public SQLClientInfoException(java.lang.String, java.util.Map<java.lang.String, java.sql.ClientInfoStatus>);
    ctor public SQLClientInfoException(java.lang.String, java.util.Map<java.lang.String, java.sql.ClientInfoStatus>, java.lang.Throwable);
    ctor public SQLClientInfoException(java.lang.String, java.lang.String, int, java.util.Map<java.lang.String, java.sql.ClientInfoStatus>);
    ctor public SQLClientInfoException(java.lang.String, java.lang.String, int, java.util.Map<java.lang.String, java.sql.ClientInfoStatus>, java.lang.Throwable);
    ctor public SQLClientInfoException(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.sql.ClientInfoStatus>);
    ctor public SQLClientInfoException(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.sql.ClientInfoStatus>, java.lang.Throwable);
    method public java.util.Map<java.lang.String, java.sql.ClientInfoStatus> getFailedProperties();
  }

  public abstract interface SQLData {
    method public abstract java.lang.String getSQLTypeName() throws java.sql.SQLException;
    method public abstract void readSQL(java.sql.SQLInput, java.lang.String) throws java.sql.SQLException;
    method public abstract void writeSQL(java.sql.SQLOutput) throws java.sql.SQLException;
  }

  public class SQLDataException extends java.sql.SQLNonTransientException {
    ctor public SQLDataException();
    ctor public SQLDataException(java.lang.String);
    ctor public SQLDataException(java.lang.String, java.lang.String);
    ctor public SQLDataException(java.lang.String, java.lang.String, int);
    ctor public SQLDataException(java.lang.Throwable);
    ctor public SQLDataException(java.lang.String, java.lang.Throwable);
    ctor public SQLDataException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLDataException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLException extends java.lang.Exception implements java.lang.Iterable java.io.Serializable {
    ctor public SQLException();
    ctor public SQLException(java.lang.String);
    ctor public SQLException(java.lang.String, java.lang.String);
    ctor public SQLException(java.lang.String, java.lang.String, int);
    ctor public SQLException(java.lang.Throwable);
    ctor public SQLException(java.lang.String, java.lang.Throwable);
    ctor public SQLException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLException(java.lang.String, java.lang.String, int, java.lang.Throwable);
    method public int getErrorCode();
    method public java.sql.SQLException getNextException();
    method public java.lang.String getSQLState();
    method public java.util.Iterator<java.lang.Throwable> iterator();
    method public void setNextException(java.sql.SQLException);
  }

  public class SQLFeatureNotSupportedException extends java.sql.SQLNonTransientException {
    ctor public SQLFeatureNotSupportedException();
    ctor public SQLFeatureNotSupportedException(java.lang.String);
    ctor public SQLFeatureNotSupportedException(java.lang.String, java.lang.String);
    ctor public SQLFeatureNotSupportedException(java.lang.String, java.lang.String, int);
    ctor public SQLFeatureNotSupportedException(java.lang.Throwable);
    ctor public SQLFeatureNotSupportedException(java.lang.String, java.lang.Throwable);
    ctor public SQLFeatureNotSupportedException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLFeatureNotSupportedException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public abstract interface SQLInput {
    method public abstract java.sql.Array readArray() throws java.sql.SQLException;
    method public abstract java.io.InputStream readAsciiStream() throws java.sql.SQLException;
    method public abstract java.math.BigDecimal readBigDecimal() throws java.sql.SQLException;
    method public abstract java.io.InputStream readBinaryStream() throws java.sql.SQLException;
    method public abstract java.sql.Blob readBlob() throws java.sql.SQLException;
    method public abstract boolean readBoolean() throws java.sql.SQLException;
    method public abstract byte readByte() throws java.sql.SQLException;
    method public abstract byte[] readBytes() throws java.sql.SQLException;
    method public abstract java.io.Reader readCharacterStream() throws java.sql.SQLException;
    method public abstract java.sql.Clob readClob() throws java.sql.SQLException;
    method public abstract java.sql.Date readDate() throws java.sql.SQLException;
    method public abstract double readDouble() throws java.sql.SQLException;
    method public abstract float readFloat() throws java.sql.SQLException;
    method public abstract int readInt() throws java.sql.SQLException;
    method public abstract long readLong() throws java.sql.SQLException;
    method public abstract java.sql.NClob readNClob() throws java.sql.SQLException;
    method public abstract java.lang.String readNString() throws java.sql.SQLException;
    method public abstract java.lang.Object readObject() throws java.sql.SQLException;
    method public abstract java.sql.Ref readRef() throws java.sql.SQLException;
    method public abstract java.sql.RowId readRowId() throws java.sql.SQLException;
    method public abstract java.sql.SQLXML readSQLXML() throws java.sql.SQLException;
    method public abstract short readShort() throws java.sql.SQLException;
    method public abstract java.lang.String readString() throws java.sql.SQLException;
    method public abstract java.sql.Time readTime() throws java.sql.SQLException;
    method public abstract java.sql.Timestamp readTimestamp() throws java.sql.SQLException;
    method public abstract java.net.URL readURL() throws java.sql.SQLException;
    method public abstract boolean wasNull() throws java.sql.SQLException;
  }

  public class SQLIntegrityConstraintViolationException extends java.sql.SQLNonTransientException {
    ctor public SQLIntegrityConstraintViolationException();
    ctor public SQLIntegrityConstraintViolationException(java.lang.String);
    ctor public SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String);
    ctor public SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String, int);
    ctor public SQLIntegrityConstraintViolationException(java.lang.Throwable);
    ctor public SQLIntegrityConstraintViolationException(java.lang.String, java.lang.Throwable);
    ctor public SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLIntegrityConstraintViolationException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLInvalidAuthorizationSpecException extends java.sql.SQLNonTransientException {
    ctor public SQLInvalidAuthorizationSpecException();
    ctor public SQLInvalidAuthorizationSpecException(java.lang.String);
    ctor public SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String);
    ctor public SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String, int);
    ctor public SQLInvalidAuthorizationSpecException(java.lang.Throwable);
    ctor public SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.Throwable);
    ctor public SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLInvalidAuthorizationSpecException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLNonTransientConnectionException extends java.sql.SQLNonTransientException {
    ctor public SQLNonTransientConnectionException();
    ctor public SQLNonTransientConnectionException(java.lang.String);
    ctor public SQLNonTransientConnectionException(java.lang.String, java.lang.String);
    ctor public SQLNonTransientConnectionException(java.lang.String, java.lang.String, int);
    ctor public SQLNonTransientConnectionException(java.lang.Throwable);
    ctor public SQLNonTransientConnectionException(java.lang.String, java.lang.Throwable);
    ctor public SQLNonTransientConnectionException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLNonTransientConnectionException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLNonTransientException extends java.sql.SQLException {
    ctor public SQLNonTransientException();
    ctor public SQLNonTransientException(java.lang.String);
    ctor public SQLNonTransientException(java.lang.String, java.lang.String);
    ctor public SQLNonTransientException(java.lang.String, java.lang.String, int);
    ctor public SQLNonTransientException(java.lang.Throwable);
    ctor public SQLNonTransientException(java.lang.String, java.lang.Throwable);
    ctor public SQLNonTransientException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLNonTransientException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public abstract interface SQLOutput {
    method public abstract void writeArray(java.sql.Array) throws java.sql.SQLException;
    method public abstract void writeAsciiStream(java.io.InputStream) throws java.sql.SQLException;
    method public abstract void writeBigDecimal(java.math.BigDecimal) throws java.sql.SQLException;
    method public abstract void writeBinaryStream(java.io.InputStream) throws java.sql.SQLException;
    method public abstract void writeBlob(java.sql.Blob) throws java.sql.SQLException;
    method public abstract void writeBoolean(boolean) throws java.sql.SQLException;
    method public abstract void writeByte(byte) throws java.sql.SQLException;
    method public abstract void writeBytes(byte[]) throws java.sql.SQLException;
    method public abstract void writeCharacterStream(java.io.Reader) throws java.sql.SQLException;
    method public abstract void writeClob(java.sql.Clob) throws java.sql.SQLException;
    method public abstract void writeDate(java.sql.Date) throws java.sql.SQLException;
    method public abstract void writeDouble(double) throws java.sql.SQLException;
    method public abstract void writeFloat(float) throws java.sql.SQLException;
    method public abstract void writeInt(int) throws java.sql.SQLException;
    method public abstract void writeLong(long) throws java.sql.SQLException;
    method public abstract void writeNClob(java.sql.NClob) throws java.sql.SQLException;
    method public abstract void writeNString(java.lang.String) throws java.sql.SQLException;
    method public abstract void writeObject(java.sql.SQLData) throws java.sql.SQLException;
    method public abstract void writeRef(java.sql.Ref) throws java.sql.SQLException;
    method public abstract void writeRowId(java.sql.RowId) throws java.sql.SQLException;
    method public abstract void writeSQLXML(java.sql.SQLXML) throws java.sql.SQLException;
    method public abstract void writeShort(short) throws java.sql.SQLException;
    method public abstract void writeString(java.lang.String) throws java.sql.SQLException;
    method public abstract void writeStruct(java.sql.Struct) throws java.sql.SQLException;
    method public abstract void writeTime(java.sql.Time) throws java.sql.SQLException;
    method public abstract void writeTimestamp(java.sql.Timestamp) throws java.sql.SQLException;
    method public abstract void writeURL(java.net.URL) throws java.sql.SQLException;
  }

  public final class SQLPermission extends java.security.BasicPermission implements java.security.Guard java.io.Serializable {
    ctor public SQLPermission(java.lang.String);
    ctor public SQLPermission(java.lang.String, java.lang.String);
  }

  public class SQLRecoverableException extends java.sql.SQLException {
    ctor public SQLRecoverableException();
    ctor public SQLRecoverableException(java.lang.String);
    ctor public SQLRecoverableException(java.lang.String, java.lang.String);
    ctor public SQLRecoverableException(java.lang.String, java.lang.String, int);
    ctor public SQLRecoverableException(java.lang.Throwable);
    ctor public SQLRecoverableException(java.lang.String, java.lang.Throwable);
    ctor public SQLRecoverableException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLRecoverableException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLSyntaxErrorException extends java.sql.SQLNonTransientException {
    ctor public SQLSyntaxErrorException();
    ctor public SQLSyntaxErrorException(java.lang.String);
    ctor public SQLSyntaxErrorException(java.lang.String, java.lang.String);
    ctor public SQLSyntaxErrorException(java.lang.String, java.lang.String, int);
    ctor public SQLSyntaxErrorException(java.lang.Throwable);
    ctor public SQLSyntaxErrorException(java.lang.String, java.lang.Throwable);
    ctor public SQLSyntaxErrorException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLSyntaxErrorException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLTimeoutException extends java.sql.SQLTransientException {
    ctor public SQLTimeoutException();
    ctor public SQLTimeoutException(java.lang.String);
    ctor public SQLTimeoutException(java.lang.String, java.lang.String);
    ctor public SQLTimeoutException(java.lang.String, java.lang.String, int);
    ctor public SQLTimeoutException(java.lang.Throwable);
    ctor public SQLTimeoutException(java.lang.String, java.lang.Throwable);
    ctor public SQLTimeoutException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLTimeoutException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLTransactionRollbackException extends java.sql.SQLTransientException {
    ctor public SQLTransactionRollbackException();
    ctor public SQLTransactionRollbackException(java.lang.String);
    ctor public SQLTransactionRollbackException(java.lang.String, java.lang.String);
    ctor public SQLTransactionRollbackException(java.lang.String, java.lang.String, int);
    ctor public SQLTransactionRollbackException(java.lang.Throwable);
    ctor public SQLTransactionRollbackException(java.lang.String, java.lang.Throwable);
    ctor public SQLTransactionRollbackException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLTransactionRollbackException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLTransientConnectionException extends java.sql.SQLTransientException {
    ctor public SQLTransientConnectionException();
    ctor public SQLTransientConnectionException(java.lang.String);
    ctor public SQLTransientConnectionException(java.lang.String, java.lang.String);
    ctor public SQLTransientConnectionException(java.lang.String, java.lang.String, int);
    ctor public SQLTransientConnectionException(java.lang.Throwable);
    ctor public SQLTransientConnectionException(java.lang.String, java.lang.Throwable);
    ctor public SQLTransientConnectionException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLTransientConnectionException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLTransientException extends java.sql.SQLException {
    ctor public SQLTransientException();
    ctor public SQLTransientException(java.lang.String);
    ctor public SQLTransientException(java.lang.String, java.lang.String);
    ctor public SQLTransientException(java.lang.String, java.lang.String, int);
    ctor public SQLTransientException(java.lang.Throwable);
    ctor public SQLTransientException(java.lang.String, java.lang.Throwable);
    ctor public SQLTransientException(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLTransientException(java.lang.String, java.lang.String, int, java.lang.Throwable);
  }

  public class SQLWarning extends java.sql.SQLException implements java.io.Serializable {
    ctor public SQLWarning();
    ctor public SQLWarning(java.lang.String);
    ctor public SQLWarning(java.lang.String, java.lang.String);
    ctor public SQLWarning(java.lang.String, java.lang.String, int);
    ctor public SQLWarning(java.lang.Throwable);
    ctor public SQLWarning(java.lang.String, java.lang.Throwable);
    ctor public SQLWarning(java.lang.String, java.lang.String, java.lang.Throwable);
    ctor public SQLWarning(java.lang.String, java.lang.String, int, java.lang.Throwable);
    method public java.sql.SQLWarning getNextWarning();
    method public void setNextWarning(java.sql.SQLWarning);
  }

  public abstract interface SQLXML {
    method public abstract void free() throws java.sql.SQLException;
    method public abstract java.io.InputStream getBinaryStream() throws java.sql.SQLException;
    method public abstract java.io.Reader getCharacterStream() throws java.sql.SQLException;
    method public abstract T getSource(java.lang.Class<T>) throws java.sql.SQLException;
    method public abstract java.lang.String getString() throws java.sql.SQLException;
    method public abstract java.io.OutputStream setBinaryStream() throws java.sql.SQLException;
    method public abstract java.io.Writer setCharacterStream() throws java.sql.SQLException;
    method public abstract T setResult(java.lang.Class<T>) throws java.sql.SQLException;
    method public abstract void setString(java.lang.String) throws java.sql.SQLException;
  }

  public abstract interface Savepoint {
    method public abstract int getSavepointId() throws java.sql.SQLException;
    method public abstract java.lang.String getSavepointName() throws java.sql.SQLException;
  }

  public abstract interface Statement implements java.lang.AutoCloseable java.sql.Wrapper {
    method public abstract void addBatch(java.lang.String) throws java.sql.SQLException;
    method public abstract void cancel() throws java.sql.SQLException;
    method public abstract void clearBatch() throws java.sql.SQLException;
    method public abstract void clearWarnings() throws java.sql.SQLException;
    method public abstract void close() throws java.sql.SQLException;
    method public abstract boolean execute(java.lang.String) throws java.sql.SQLException;
    method public abstract boolean execute(java.lang.String, int) throws java.sql.SQLException;
    method public abstract boolean execute(java.lang.String, int[]) throws java.sql.SQLException;
    method public abstract boolean execute(java.lang.String, java.lang.String[]) throws java.sql.SQLException;
    method public abstract int[] executeBatch() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet executeQuery(java.lang.String) throws java.sql.SQLException;
    method public abstract int executeUpdate(java.lang.String) throws java.sql.SQLException;
    method public abstract int executeUpdate(java.lang.String, int) throws java.sql.SQLException;
    method public abstract int executeUpdate(java.lang.String, int[]) throws java.sql.SQLException;
    method public abstract int executeUpdate(java.lang.String, java.lang.String[]) throws java.sql.SQLException;
    method public abstract java.sql.Connection getConnection() throws java.sql.SQLException;
    method public abstract int getFetchDirection() throws java.sql.SQLException;
    method public abstract int getFetchSize() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException;
    method public abstract int getMaxFieldSize() throws java.sql.SQLException;
    method public abstract int getMaxRows() throws java.sql.SQLException;
    method public abstract boolean getMoreResults() throws java.sql.SQLException;
    method public abstract boolean getMoreResults(int) throws java.sql.SQLException;
    method public abstract int getQueryTimeout() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getResultSet() throws java.sql.SQLException;
    method public abstract int getResultSetConcurrency() throws java.sql.SQLException;
    method public abstract int getResultSetHoldability() throws java.sql.SQLException;
    method public abstract int getResultSetType() throws java.sql.SQLException;
    method public abstract int getUpdateCount() throws java.sql.SQLException;
    method public abstract java.sql.SQLWarning getWarnings() throws java.sql.SQLException;
    method public abstract boolean isClosed() throws java.sql.SQLException;
    method public abstract boolean isPoolable() throws java.sql.SQLException;
    method public abstract void setCursorName(java.lang.String) throws java.sql.SQLException;
    method public abstract void setEscapeProcessing(boolean) throws java.sql.SQLException;
    method public abstract void setFetchDirection(int) throws java.sql.SQLException;
    method public abstract void setFetchSize(int) throws java.sql.SQLException;
    method public abstract void setMaxFieldSize(int) throws java.sql.SQLException;
    method public abstract void setMaxRows(int) throws java.sql.SQLException;
    method public abstract void setPoolable(boolean) throws java.sql.SQLException;
    method public abstract void setQueryTimeout(int) throws java.sql.SQLException;
    field public static final int CLOSE_ALL_RESULTS = 3; // 0x3
    field public static final int CLOSE_CURRENT_RESULT = 1; // 0x1
    field public static final int EXECUTE_FAILED = -3; // 0xfffffffd
    field public static final int KEEP_CURRENT_RESULT = 2; // 0x2
    field public static final int NO_GENERATED_KEYS = 2; // 0x2
    field public static final int RETURN_GENERATED_KEYS = 1; // 0x1
    field public static final int SUCCESS_NO_INFO = -2; // 0xfffffffe
  }

  public abstract interface Struct {
    method public abstract java.lang.Object[] getAttributes() throws java.sql.SQLException;
    method public abstract java.lang.Object[] getAttributes(java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.lang.String getSQLTypeName() throws java.sql.SQLException;
  }

  public class Time extends java.util.Date {
    ctor public deprecated Time(int, int, int);
    ctor public Time(long);
    method public static java.sql.Time valueOf(java.lang.String);
  }

  public class Timestamp extends java.util.Date {
    ctor public deprecated Timestamp(int, int, int, int, int, int, int) throws java.lang.IllegalArgumentException;
    ctor public Timestamp(long);
    method public boolean after(java.sql.Timestamp);
    method public boolean before(java.sql.Timestamp);
    method public int compareTo(java.sql.Timestamp);
    method public boolean equals(java.sql.Timestamp);
    method public int getNanos();
    method public void setNanos(int) throws java.lang.IllegalArgumentException;
    method public static java.sql.Timestamp valueOf(java.lang.String) throws java.lang.IllegalArgumentException;
  }

  public class Types {
    field public static final int ARRAY = 2003; // 0x7d3
    field public static final int BIGINT = -5; // 0xfffffffb
    field public static final int BINARY = -2; // 0xfffffffe
    field public static final int BIT = -7; // 0xfffffff9
    field public static final int BLOB = 2004; // 0x7d4
    field public static final int BOOLEAN = 16; // 0x10
    field public static final int CHAR = 1; // 0x1
    field public static final int CLOB = 2005; // 0x7d5
    field public static final int DATALINK = 70; // 0x46
    field public static final int DATE = 91; // 0x5b
    field public static final int DECIMAL = 3; // 0x3
    field public static final int DISTINCT = 2001; // 0x7d1
    field public static final int DOUBLE = 8; // 0x8
    field public static final int FLOAT = 6; // 0x6
    field public static final int INTEGER = 4; // 0x4
    field public static final int JAVA_OBJECT = 2000; // 0x7d0
    field public static final int LONGNVARCHAR = -16; // 0xfffffff0
    field public static final int LONGVARBINARY = -4; // 0xfffffffc
    field public static final int LONGVARCHAR = -1; // 0xffffffff
    field public static final int NCHAR = -15; // 0xfffffff1
    field public static final int NCLOB = 2011; // 0x7db
    field public static final int NULL = 0; // 0x0
    field public static final int NUMERIC = 2; // 0x2
    field public static final int NVARCHAR = -9; // 0xfffffff7
    field public static final int OTHER = 1111; // 0x457
    field public static final int REAL = 7; // 0x7
    field public static final int REF = 2006; // 0x7d6
    field public static final int ROWID = -8; // 0xfffffff8
    field public static final int SMALLINT = 5; // 0x5
    field public static final int SQLXML = 2009; // 0x7d9
    field public static final int STRUCT = 2002; // 0x7d2
    field public static final int TIME = 92; // 0x5c
    field public static final int TIMESTAMP = 93; // 0x5d
    field public static final int TINYINT = -6; // 0xfffffffa
    field public static final int VARBINARY = -3; // 0xfffffffd
    field public static final int VARCHAR = 12; // 0xc
  }

  public abstract interface Wrapper {
    method public abstract boolean isWrapperFor(java.lang.Class<?>) throws java.sql.SQLException;
    method public abstract T unwrap(java.lang.Class<T>) throws java.sql.SQLException;
  }

}

package java.text {

  public class Annotation {
    ctor public Annotation(java.lang.Object);
    method public java.lang.Object getValue();
  }

  public abstract interface AttributedCharacterIterator implements java.text.CharacterIterator {
    method public abstract java.util.Set<java.text.AttributedCharacterIterator.Attribute> getAllAttributeKeys();
    method public abstract java.lang.Object getAttribute(java.text.AttributedCharacterIterator.Attribute);
    method public abstract java.util.Map<java.text.AttributedCharacterIterator.Attribute, java.lang.Object> getAttributes();
    method public abstract int getRunLimit();
    method public abstract int getRunLimit(java.text.AttributedCharacterIterator.Attribute);
    method public abstract int getRunLimit(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>);
    method public abstract int getRunStart();
    method public abstract int getRunStart(java.text.AttributedCharacterIterator.Attribute);
    method public abstract int getRunStart(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>);
  }

  public static class AttributedCharacterIterator.Attribute implements java.io.Serializable {
    ctor protected AttributedCharacterIterator.Attribute(java.lang.String);
    method public final boolean equals(java.lang.Object);
    method protected java.lang.String getName();
    method public final int hashCode();
    method protected java.lang.Object readResolve() throws java.io.InvalidObjectException;
    field public static final java.text.AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT;
    field public static final java.text.AttributedCharacterIterator.Attribute LANGUAGE;
    field public static final java.text.AttributedCharacterIterator.Attribute READING;
  }

  public class AttributedString {
    ctor public AttributedString(java.text.AttributedCharacterIterator);
    ctor public AttributedString(java.text.AttributedCharacterIterator, int, int);
    ctor public AttributedString(java.text.AttributedCharacterIterator, int, int, java.text.AttributedCharacterIterator.Attribute[]);
    ctor public AttributedString(java.lang.String);
    ctor public AttributedString(java.lang.String, java.util.Map<? extends java.text.AttributedCharacterIterator.Attribute, ?>);
    method public void addAttribute(java.text.AttributedCharacterIterator.Attribute, java.lang.Object);
    method public void addAttribute(java.text.AttributedCharacterIterator.Attribute, java.lang.Object, int, int);
    method public void addAttributes(java.util.Map<? extends java.text.AttributedCharacterIterator.Attribute, ?>, int, int);
    method public java.text.AttributedCharacterIterator getIterator();
    method public java.text.AttributedCharacterIterator getIterator(java.text.AttributedCharacterIterator.Attribute[]);
    method public java.text.AttributedCharacterIterator getIterator(java.text.AttributedCharacterIterator.Attribute[], int, int);
  }

  public final class Bidi {
    ctor public Bidi(java.text.AttributedCharacterIterator);
    ctor public Bidi(char[], int, byte[], int, int, int);
    ctor public Bidi(java.lang.String, int);
    method public boolean baseIsLeftToRight();
    method public java.text.Bidi createLineBidi(int, int);
    method public int getBaseLevel();
    method public int getLength();
    method public int getLevelAt(int);
    method public int getRunCount();
    method public int getRunLevel(int);
    method public int getRunLimit(int);
    method public int getRunStart(int);
    method public boolean isLeftToRight();
    method public boolean isMixed();
    method public boolean isRightToLeft();
    method public static void reorderVisually(byte[], int, java.lang.Object[], int, int);
    method public static boolean requiresBidi(char[], int, int);
    field public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT = -2; // 0xfffffffe
    field public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT = -1; // 0xffffffff
    field public static final int DIRECTION_LEFT_TO_RIGHT = 0; // 0x0
    field public static final int DIRECTION_RIGHT_TO_LEFT = 1; // 0x1
  }

  public abstract class BreakIterator implements java.lang.Cloneable {
    ctor protected BreakIterator();
    method public java.lang.Object clone();
    method public abstract int current();
    method public abstract int first();
    method public abstract int following(int);
    method public static java.util.Locale[] getAvailableLocales();
    method public static java.text.BreakIterator getCharacterInstance();
    method public static java.text.BreakIterator getCharacterInstance(java.util.Locale);
    method public static java.text.BreakIterator getLineInstance();
    method public static java.text.BreakIterator getLineInstance(java.util.Locale);
    method public static java.text.BreakIterator getSentenceInstance();
    method public static java.text.BreakIterator getSentenceInstance(java.util.Locale);
    method public abstract java.text.CharacterIterator getText();
    method public static java.text.BreakIterator getWordInstance();
    method public static java.text.BreakIterator getWordInstance(java.util.Locale);
    method public boolean isBoundary(int);
    method public abstract int last();
    method public abstract int next();
    method public abstract int next(int);
    method public int preceding(int);
    method public abstract int previous();
    method public void setText(java.lang.String);
    method public abstract void setText(java.text.CharacterIterator);
    field public static final int DONE = -1; // 0xffffffff
  }

  public abstract interface CharacterIterator implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
    method public abstract char current();
    method public abstract char first();
    method public abstract int getBeginIndex();
    method public abstract int getEndIndex();
    method public abstract int getIndex();
    method public abstract char last();
    method public abstract char next();
    method public abstract char previous();
    method public abstract char setIndex(int);
    field public static final char DONE = 65535; // 0xffff '\uffff'
  }

  public class ChoiceFormat extends java.text.NumberFormat {
    ctor public ChoiceFormat(double[], java.lang.String[]);
    ctor public ChoiceFormat(java.lang.String);
    method public void applyPattern(java.lang.String);
    method public java.lang.StringBuffer format(double, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(long, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.Object[] getFormats();
    method public double[] getLimits();
    method public static final double nextDouble(double);
    method public static double nextDouble(double, boolean);
    method public java.lang.Number parse(java.lang.String, java.text.ParsePosition);
    method public static final double previousDouble(double);
    method public void setChoices(double[], java.lang.String[]);
    method public java.lang.String toPattern();
  }

  public final class CollationElementIterator {
    method public int getMaxExpansion(int);
    method public int getOffset();
    method public int next();
    method public int previous();
    method public static final int primaryOrder(int);
    method public void reset();
    method public static final short secondaryOrder(int);
    method public void setOffset(int);
    method public void setText(java.text.CharacterIterator);
    method public void setText(java.lang.String);
    method public static final short tertiaryOrder(int);
    field public static final int NULLORDER = -1; // 0xffffffff
  }

  public abstract class CollationKey implements java.lang.Comparable {
    ctor protected CollationKey(java.lang.String);
    method public abstract int compareTo(java.text.CollationKey);
    method public java.lang.String getSourceString();
    method public abstract byte[] toByteArray();
  }

  public abstract class Collator implements java.lang.Cloneable java.util.Comparator {
    ctor protected Collator();
    method public java.lang.Object clone();
    method public int compare(java.lang.Object, java.lang.Object);
    method public abstract int compare(java.lang.String, java.lang.String);
    method public boolean equals(java.lang.String, java.lang.String);
    method public static java.util.Locale[] getAvailableLocales();
    method public abstract java.text.CollationKey getCollationKey(java.lang.String);
    method public int getDecomposition();
    method public static java.text.Collator getInstance();
    method public static java.text.Collator getInstance(java.util.Locale);
    method public int getStrength();
    method public abstract int hashCode();
    method public void setDecomposition(int);
    method public void setStrength(int);
    field public static final int CANONICAL_DECOMPOSITION = 1; // 0x1
    field public static final int FULL_DECOMPOSITION = 2; // 0x2
    field public static final int IDENTICAL = 3; // 0x3
    field public static final int NO_DECOMPOSITION = 0; // 0x0
    field public static final int PRIMARY = 0; // 0x0
    field public static final int SECONDARY = 1; // 0x1
    field public static final int TERTIARY = 2; // 0x2
  }

  public abstract class DateFormat extends java.text.Format {
    ctor protected DateFormat();
    method public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String format(java.util.Date);
    method public abstract java.lang.StringBuffer format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition);
    method public static java.util.Locale[] getAvailableLocales();
    method public java.util.Calendar getCalendar();
    method public static final java.text.DateFormat getDateInstance();
    method public static final java.text.DateFormat getDateInstance(int);
    method public static final java.text.DateFormat getDateInstance(int, java.util.Locale);
    method public static final java.text.DateFormat getDateTimeInstance();
    method public static final java.text.DateFormat getDateTimeInstance(int, int);
    method public static final java.text.DateFormat getDateTimeInstance(int, int, java.util.Locale);
    method public static final java.text.DateFormat getInstance();
    method public java.text.NumberFormat getNumberFormat();
    method public static final java.text.DateFormat getTimeInstance();
    method public static final java.text.DateFormat getTimeInstance(int);
    method public static final java.text.DateFormat getTimeInstance(int, java.util.Locale);
    method public java.util.TimeZone getTimeZone();
    method public boolean isLenient();
    method public java.util.Date parse(java.lang.String) throws java.text.ParseException;
    method public abstract java.util.Date parse(java.lang.String, java.text.ParsePosition);
    method public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public void setCalendar(java.util.Calendar);
    method public void setLenient(boolean);
    method public void setNumberFormat(java.text.NumberFormat);
    method public void setTimeZone(java.util.TimeZone);
    field public static final int AM_PM_FIELD = 14; // 0xe
    field public static final int DATE_FIELD = 3; // 0x3
    field public static final int DAY_OF_WEEK_FIELD = 9; // 0x9
    field public static final int DAY_OF_WEEK_IN_MONTH_FIELD = 11; // 0xb
    field public static final int DAY_OF_YEAR_FIELD = 10; // 0xa
    field public static final int DEFAULT = 2; // 0x2
    field public static final int ERA_FIELD = 0; // 0x0
    field public static final int FULL = 0; // 0x0
    field public static final int HOUR0_FIELD = 16; // 0x10
    field public static final int HOUR1_FIELD = 15; // 0xf
    field public static final int HOUR_OF_DAY0_FIELD = 5; // 0x5
    field public static final int HOUR_OF_DAY1_FIELD = 4; // 0x4
    field public static final int LONG = 1; // 0x1
    field public static final int MEDIUM = 2; // 0x2
    field public static final int MILLISECOND_FIELD = 8; // 0x8
    field public static final int MINUTE_FIELD = 6; // 0x6
    field public static final int MONTH_FIELD = 2; // 0x2
    field public static final int SECOND_FIELD = 7; // 0x7
    field public static final int SHORT = 3; // 0x3
    field public static final int TIMEZONE_FIELD = 17; // 0x11
    field public static final int WEEK_OF_MONTH_FIELD = 13; // 0xd
    field public static final int WEEK_OF_YEAR_FIELD = 12; // 0xc
    field public static final int YEAR_FIELD = 1; // 0x1
    field protected java.util.Calendar calendar;
    field protected java.text.NumberFormat numberFormat;
  }

  public static class DateFormat.Field extends java.text.Format.Field {
    ctor protected DateFormat.Field(java.lang.String, int);
    method public int getCalendarField();
    method public static java.text.DateFormat.Field ofCalendarField(int);
    field public static final java.text.DateFormat.Field AM_PM;
    field public static final java.text.DateFormat.Field DAY_OF_MONTH;
    field public static final java.text.DateFormat.Field DAY_OF_WEEK;
    field public static final java.text.DateFormat.Field DAY_OF_WEEK_IN_MONTH;
    field public static final java.text.DateFormat.Field DAY_OF_YEAR;
    field public static final java.text.DateFormat.Field ERA;
    field public static final java.text.DateFormat.Field HOUR0;
    field public static final java.text.DateFormat.Field HOUR1;
    field public static final java.text.DateFormat.Field HOUR_OF_DAY0;
    field public static final java.text.DateFormat.Field HOUR_OF_DAY1;
    field public static final java.text.DateFormat.Field MILLISECOND;
    field public static final java.text.DateFormat.Field MINUTE;
    field public static final java.text.DateFormat.Field MONTH;
    field public static final java.text.DateFormat.Field SECOND;
    field public static final java.text.DateFormat.Field TIME_ZONE;
    field public static final java.text.DateFormat.Field WEEK_OF_MONTH;
    field public static final java.text.DateFormat.Field WEEK_OF_YEAR;
    field public static final java.text.DateFormat.Field YEAR;
  }

  public class DateFormatSymbols implements java.lang.Cloneable java.io.Serializable {
    ctor public DateFormatSymbols();
    ctor public DateFormatSymbols(java.util.Locale);
    method public java.lang.Object clone();
    method public java.lang.String[] getAmPmStrings();
    method public static java.util.Locale[] getAvailableLocales();
    method public java.lang.String[] getEras();
    method public static final java.text.DateFormatSymbols getInstance();
    method public static final java.text.DateFormatSymbols getInstance(java.util.Locale);
    method public java.lang.String getLocalPatternChars();
    method public java.lang.String[] getMonths();
    method public java.lang.String[] getShortMonths();
    method public java.lang.String[] getShortWeekdays();
    method public java.lang.String[] getWeekdays();
    method public java.lang.String[][] getZoneStrings();
    method public void setAmPmStrings(java.lang.String[]);
    method public void setEras(java.lang.String[]);
    method public void setLocalPatternChars(java.lang.String);
    method public void setMonths(java.lang.String[]);
    method public void setShortMonths(java.lang.String[]);
    method public void setShortWeekdays(java.lang.String[]);
    method public void setWeekdays(java.lang.String[]);
    method public void setZoneStrings(java.lang.String[][]);
  }

  public class DecimalFormat extends java.text.NumberFormat {
    ctor public DecimalFormat();
    ctor public DecimalFormat(java.lang.String);
    ctor public DecimalFormat(java.lang.String, java.text.DecimalFormatSymbols);
    method public void applyLocalizedPattern(java.lang.String);
    method public void applyPattern(java.lang.String);
    method public java.lang.StringBuffer format(double, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(long, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.text.DecimalFormatSymbols getDecimalFormatSymbols();
    method public int getGroupingSize();
    method public int getMultiplier();
    method public java.lang.String getNegativePrefix();
    method public java.lang.String getNegativeSuffix();
    method public java.lang.String getPositivePrefix();
    method public java.lang.String getPositiveSuffix();
    method public boolean isDecimalSeparatorAlwaysShown();
    method public boolean isParseBigDecimal();
    method public java.lang.Number parse(java.lang.String, java.text.ParsePosition);
    method public void setDecimalFormatSymbols(java.text.DecimalFormatSymbols);
    method public void setDecimalSeparatorAlwaysShown(boolean);
    method public void setGroupingSize(int);
    method public void setMultiplier(int);
    method public void setNegativePrefix(java.lang.String);
    method public void setNegativeSuffix(java.lang.String);
    method public void setParseBigDecimal(boolean);
    method public void setPositivePrefix(java.lang.String);
    method public void setPositiveSuffix(java.lang.String);
    method public java.lang.String toLocalizedPattern();
    method public java.lang.String toPattern();
  }

  public class DecimalFormatSymbols implements java.lang.Cloneable java.io.Serializable {
    ctor public DecimalFormatSymbols();
    ctor public DecimalFormatSymbols(java.util.Locale);
    method public java.lang.Object clone();
    method public static java.util.Locale[] getAvailableLocales();
    method public java.util.Currency getCurrency();
    method public java.lang.String getCurrencySymbol();
    method public char getDecimalSeparator();
    method public char getDigit();
    method public java.lang.String getExponentSeparator();
    method public char getGroupingSeparator();
    method public java.lang.String getInfinity();
    method public static java.text.DecimalFormatSymbols getInstance();
    method public static java.text.DecimalFormatSymbols getInstance(java.util.Locale);
    method public java.lang.String getInternationalCurrencySymbol();
    method public char getMinusSign();
    method public char getMonetaryDecimalSeparator();
    method public java.lang.String getNaN();
    method public char getPatternSeparator();
    method public char getPerMill();
    method public char getPercent();
    method public char getZeroDigit();
    method public void setCurrency(java.util.Currency);
    method public void setCurrencySymbol(java.lang.String);
    method public void setDecimalSeparator(char);
    method public void setDigit(char);
    method public void setExponentSeparator(java.lang.String);
    method public void setGroupingSeparator(char);
    method public void setInfinity(java.lang.String);
    method public void setInternationalCurrencySymbol(java.lang.String);
    method public void setMinusSign(char);
    method public void setMonetaryDecimalSeparator(char);
    method public void setNaN(java.lang.String);
    method public void setPatternSeparator(char);
    method public void setPerMill(char);
    method public void setPercent(char);
    method public void setZeroDigit(char);
  }

  public class FieldPosition {
    ctor public FieldPosition(int);
    ctor public FieldPosition(java.text.Format.Field);
    ctor public FieldPosition(java.text.Format.Field, int);
    method public int getBeginIndex();
    method public int getEndIndex();
    method public int getField();
    method public java.text.Format.Field getFieldAttribute();
    method public void setBeginIndex(int);
    method public void setEndIndex(int);
  }

  public abstract class Format implements java.lang.Cloneable java.io.Serializable {
    ctor protected Format();
    method public java.lang.Object clone();
    method public final java.lang.String format(java.lang.Object);
    method public abstract java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.text.AttributedCharacterIterator formatToCharacterIterator(java.lang.Object);
    method public java.lang.Object parseObject(java.lang.String) throws java.text.ParseException;
    method public abstract java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
  }

  public static class Format.Field extends java.text.AttributedCharacterIterator.Attribute {
    ctor protected Format.Field(java.lang.String);
  }

  public class MessageFormat extends java.text.Format {
    ctor public MessageFormat(java.lang.String, java.util.Locale);
    ctor public MessageFormat(java.lang.String);
    method public void applyPattern(java.lang.String);
    method public final java.lang.StringBuffer format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public static java.lang.String format(java.lang.String, java.lang.Object...);
    method public java.text.Format[] getFormats();
    method public java.text.Format[] getFormatsByArgumentIndex();
    method public java.util.Locale getLocale();
    method public java.lang.Object[] parse(java.lang.String) throws java.text.ParseException;
    method public java.lang.Object[] parse(java.lang.String, java.text.ParsePosition);
    method public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public void setFormat(int, java.text.Format);
    method public void setFormatByArgumentIndex(int, java.text.Format);
    method public void setFormats(java.text.Format[]);
    method public void setFormatsByArgumentIndex(java.text.Format[]);
    method public void setLocale(java.util.Locale);
    method public java.lang.String toPattern();
  }

  public static class MessageFormat.Field extends java.text.Format.Field {
    ctor protected MessageFormat.Field(java.lang.String);
    field public static final java.text.MessageFormat.Field ARGUMENT;
  }

  public final class Normalizer {
    method public static boolean isNormalized(java.lang.CharSequence, java.text.Normalizer.Form);
    method public static java.lang.String normalize(java.lang.CharSequence, java.text.Normalizer.Form);
  }

  public static final class Normalizer.Form extends java.lang.Enum {
    method public static java.text.Normalizer.Form valueOf(java.lang.String);
    method public static final java.text.Normalizer.Form[] values();
    enum_constant public static final java.text.Normalizer.Form NFC;
    enum_constant public static final java.text.Normalizer.Form NFD;
    enum_constant public static final java.text.Normalizer.Form NFKC;
    enum_constant public static final java.text.Normalizer.Form NFKD;
  }

  public abstract class NumberFormat extends java.text.Format {
    ctor protected NumberFormat();
    method public final java.lang.String format(double);
    method public abstract java.lang.StringBuffer format(double, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String format(long);
    method public abstract java.lang.StringBuffer format(long, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public static java.util.Locale[] getAvailableLocales();
    method public java.util.Currency getCurrency();
    method public static final java.text.NumberFormat getCurrencyInstance();
    method public static java.text.NumberFormat getCurrencyInstance(java.util.Locale);
    method public static final java.text.NumberFormat getInstance();
    method public static java.text.NumberFormat getInstance(java.util.Locale);
    method public static final java.text.NumberFormat getIntegerInstance();
    method public static java.text.NumberFormat getIntegerInstance(java.util.Locale);
    method public int getMaximumFractionDigits();
    method public int getMaximumIntegerDigits();
    method public int getMinimumFractionDigits();
    method public int getMinimumIntegerDigits();
    method public static final java.text.NumberFormat getNumberInstance();
    method public static java.text.NumberFormat getNumberInstance(java.util.Locale);
    method public static final java.text.NumberFormat getPercentInstance();
    method public static java.text.NumberFormat getPercentInstance(java.util.Locale);
    method public java.math.RoundingMode getRoundingMode();
    method public boolean isGroupingUsed();
    method public boolean isParseIntegerOnly();
    method public java.lang.Number parse(java.lang.String) throws java.text.ParseException;
    method public abstract java.lang.Number parse(java.lang.String, java.text.ParsePosition);
    method public final java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public void setCurrency(java.util.Currency);
    method public void setGroupingUsed(boolean);
    method public void setMaximumFractionDigits(int);
    method public void setMaximumIntegerDigits(int);
    method public void setMinimumFractionDigits(int);
    method public void setMinimumIntegerDigits(int);
    method public void setParseIntegerOnly(boolean);
    method public void setRoundingMode(java.math.RoundingMode);
    field public static final int FRACTION_FIELD = 1; // 0x1
    field public static final int INTEGER_FIELD = 0; // 0x0
  }

  public static class NumberFormat.Field extends java.text.Format.Field {
    ctor protected NumberFormat.Field(java.lang.String);
    field public static final java.text.NumberFormat.Field CURRENCY;
    field public static final java.text.NumberFormat.Field DECIMAL_SEPARATOR;
    field public static final java.text.NumberFormat.Field EXPONENT;
    field public static final java.text.NumberFormat.Field EXPONENT_SIGN;
    field public static final java.text.NumberFormat.Field EXPONENT_SYMBOL;
    field public static final java.text.NumberFormat.Field FRACTION;
    field public static final java.text.NumberFormat.Field GROUPING_SEPARATOR;
    field public static final java.text.NumberFormat.Field INTEGER;
    field public static final java.text.NumberFormat.Field PERCENT;
    field public static final java.text.NumberFormat.Field PERMILLE;
    field public static final java.text.NumberFormat.Field SIGN;
  }

  public class ParseException extends java.lang.Exception {
    ctor public ParseException(java.lang.String, int);
    method public int getErrorOffset();
  }

  public class ParsePosition {
    ctor public ParsePosition(int);
    method public int getErrorIndex();
    method public int getIndex();
    method public void setErrorIndex(int);
    method public void setIndex(int);
  }

  public class RuleBasedCollator extends java.text.Collator {
    ctor public RuleBasedCollator(java.lang.String) throws java.text.ParseException;
    method public int compare(java.lang.String, java.lang.String);
    method public java.text.CollationElementIterator getCollationElementIterator(java.text.CharacterIterator);
    method public java.text.CollationElementIterator getCollationElementIterator(java.lang.String);
    method public java.text.CollationKey getCollationKey(java.lang.String);
    method public java.lang.String getRules();
    method public int hashCode();
  }

  public class SimpleDateFormat extends java.text.DateFormat {
    ctor public SimpleDateFormat();
    ctor public SimpleDateFormat(java.lang.String);
    ctor public SimpleDateFormat(java.lang.String, java.text.DateFormatSymbols);
    ctor public SimpleDateFormat(java.lang.String, java.util.Locale);
    method public void applyLocalizedPattern(java.lang.String);
    method public void applyPattern(java.lang.String);
    method public java.lang.StringBuffer format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.util.Date get2DigitYearStart();
    method public java.text.DateFormatSymbols getDateFormatSymbols();
    method public java.util.Date parse(java.lang.String, java.text.ParsePosition);
    method public void set2DigitYearStart(java.util.Date);
    method public void setDateFormatSymbols(java.text.DateFormatSymbols);
    method public java.lang.String toLocalizedPattern();
    method public java.lang.String toPattern();
  }

  public final class StringCharacterIterator implements java.text.CharacterIterator {
    ctor public StringCharacterIterator(java.lang.String);
    ctor public StringCharacterIterator(java.lang.String, int);
    ctor public StringCharacterIterator(java.lang.String, int, int, int);
    method public java.lang.Object clone();
    method public char current();
    method public char first();
    method public int getBeginIndex();
    method public int getEndIndex();
    method public int getIndex();
    method public char last();
    method public char next();
    method public char previous();
    method public char setIndex(int);
    method public void setText(java.lang.String);
  }

}

package java.util {

  public abstract class AbstractCollection implements java.util.Collection {
    ctor protected AbstractCollection();
    method public boolean add(E);
    method public boolean addAll(java.util.Collection<? extends E>);
    method public void clear();
    method public boolean contains(java.lang.Object);
    method public boolean containsAll(java.util.Collection<?>);
    method public boolean isEmpty();
    method public abstract java.util.Iterator<E> iterator();
    method public boolean remove(java.lang.Object);
    method public boolean removeAll(java.util.Collection<?>);
    method public boolean retainAll(java.util.Collection<?>);
    method public abstract int size();
    method public java.lang.Object[] toArray();
    method public T[] toArray(T[]);
  }

  public abstract class AbstractList extends java.util.AbstractCollection implements java.util.List {
    ctor protected AbstractList();
    method public void add(int, E);
    method public boolean addAll(int, java.util.Collection<? extends E>);
    method public abstract E get(int);
    method public int indexOf(java.lang.Object);
    method public java.util.Iterator<E> iterator();
    method public int lastIndexOf(java.lang.Object);
    method public java.util.ListIterator<E> listIterator();
    method public java.util.ListIterator<E> listIterator(int);
    method public E remove(int);
    method protected void removeRange(int, int);
    method public E set(int, E);
    method public java.util.List<E> subList(int, int);
    field protected transient int modCount;
  }

  public abstract class AbstractMap implements java.util.Map {
    ctor protected AbstractMap();
    method public void clear();
    method public boolean containsKey(java.lang.Object);
    method public boolean containsValue(java.lang.Object);
    method public abstract java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public V get(java.lang.Object);
    method public boolean isEmpty();
    method public java.util.Set<K> keySet();
    method public V put(K, V);
    method public void putAll(java.util.Map<? extends K, ? extends V>);
    method public V remove(java.lang.Object);
    method public int size();
    method public java.util.Collection<V> values();
  }

  public static class AbstractMap.SimpleEntry implements java.util.Map.Entry java.io.Serializable {
    ctor public AbstractMap.SimpleEntry(K, V);
    ctor public AbstractMap.SimpleEntry(java.util.Map.Entry<? extends K, ? extends V>);
    method public K getKey();
    method public V getValue();
    method public V setValue(V);
  }

  public static class AbstractMap.SimpleImmutableEntry implements java.util.Map.Entry java.io.Serializable {
    ctor public AbstractMap.SimpleImmutableEntry(K, V);
    ctor public AbstractMap.SimpleImmutableEntry(java.util.Map.Entry<? extends K, ? extends V>);
    method public K getKey();
    method public V getValue();
    method public V setValue(V);
  }

  public abstract class AbstractQueue extends java.util.AbstractCollection implements java.util.Queue {
    ctor protected AbstractQueue();
    method public E element();
    method public E remove();
  }

  public abstract class AbstractSequentialList extends java.util.AbstractList {
    ctor protected AbstractSequentialList();
    method public E get(int);
    method public abstract java.util.ListIterator<E> listIterator(int);
  }

  public abstract class AbstractSet extends java.util.AbstractCollection implements java.util.Set {
    ctor protected AbstractSet();
  }

  public class ArrayDeque extends java.util.AbstractCollection implements java.lang.Cloneable java.util.Deque java.io.Serializable {
    ctor public ArrayDeque();
    ctor public ArrayDeque(int);
    ctor public ArrayDeque(java.util.Collection<? extends E>);
    method public void addFirst(E);
    method public void addLast(E);
    method public java.util.ArrayDeque<E> clone();
    method public java.util.Iterator<E> descendingIterator();
    method public E element();
    method public E getFirst();
    method public E getLast();
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public boolean offerFirst(E);
    method public boolean offerLast(E);
    method public E peek();
    method public E peekFirst();
    method public E peekLast();
    method public E poll();
    method public E pollFirst();
    method public E pollLast();
    method public E pop();
    method public void push(E);
    method public E remove();
    method public E removeFirst();
    method public boolean removeFirstOccurrence(java.lang.Object);
    method public E removeLast();
    method public boolean removeLastOccurrence(java.lang.Object);
    method public int size();
  }

  public class ArrayList extends java.util.AbstractList implements java.lang.Cloneable java.util.RandomAccess java.io.Serializable {
    ctor public ArrayList(int);
    ctor public ArrayList();
    ctor public ArrayList(java.util.Collection<? extends E>);
    method public java.lang.Object clone();
    method public void ensureCapacity(int);
    method public E get(int);
    method public int size();
    method public void trimToSize();
  }

  public class Arrays {
    method public static java.util.List<T> asList(T...);
    method public static int binarySearch(byte[], byte);
    method public static int binarySearch(byte[], int, int, byte);
    method public static int binarySearch(char[], char);
    method public static int binarySearch(char[], int, int, char);
    method public static int binarySearch(double[], double);
    method public static int binarySearch(double[], int, int, double);
    method public static int binarySearch(float[], float);
    method public static int binarySearch(float[], int, int, float);
    method public static int binarySearch(int[], int);
    method public static int binarySearch(int[], int, int, int);
    method public static int binarySearch(long[], long);
    method public static int binarySearch(long[], int, int, long);
    method public static int binarySearch(java.lang.Object[], java.lang.Object);
    method public static int binarySearch(java.lang.Object[], int, int, java.lang.Object);
    method public static int binarySearch(T[], T, java.util.Comparator<? super T>);
    method public static int binarySearch(T[], int, int, T, java.util.Comparator<? super T>);
    method public static int binarySearch(short[], short);
    method public static int binarySearch(short[], int, int, short);
    method public static boolean[] copyOf(boolean[], int);
    method public static byte[] copyOf(byte[], int);
    method public static char[] copyOf(char[], int);
    method public static double[] copyOf(double[], int);
    method public static float[] copyOf(float[], int);
    method public static int[] copyOf(int[], int);
    method public static long[] copyOf(long[], int);
    method public static short[] copyOf(short[], int);
    method public static T[] copyOf(T[], int);
    method public static T[] copyOf(U[], int, java.lang.Class<? extends T[]>);
    method public static boolean[] copyOfRange(boolean[], int, int);
    method public static byte[] copyOfRange(byte[], int, int);
    method public static char[] copyOfRange(char[], int, int);
    method public static double[] copyOfRange(double[], int, int);
    method public static float[] copyOfRange(float[], int, int);
    method public static int[] copyOfRange(int[], int, int);
    method public static long[] copyOfRange(long[], int, int);
    method public static short[] copyOfRange(short[], int, int);
    method public static T[] copyOfRange(T[], int, int);
    method public static T[] copyOfRange(U[], int, int, java.lang.Class<? extends T[]>);
    method public static boolean deepEquals(java.lang.Object[], java.lang.Object[]);
    method public static int deepHashCode(java.lang.Object[]);
    method public static java.lang.String deepToString(java.lang.Object[]);
    method public static boolean equals(byte[], byte[]);
    method public static boolean equals(short[], short[]);
    method public static boolean equals(char[], char[]);
    method public static boolean equals(int[], int[]);
    method public static boolean equals(long[], long[]);
    method public static boolean equals(float[], float[]);
    method public static boolean equals(double[], double[]);
    method public static boolean equals(boolean[], boolean[]);
    method public static boolean equals(java.lang.Object[], java.lang.Object[]);
    method public static void fill(byte[], byte);
    method public static void fill(byte[], int, int, byte);
    method public static void fill(short[], short);
    method public static void fill(short[], int, int, short);
    method public static void fill(char[], char);
    method public static void fill(char[], int, int, char);
    method public static void fill(int[], int);
    method public static void fill(int[], int, int, int);
    method public static void fill(long[], long);
    method public static void fill(long[], int, int, long);
    method public static void fill(float[], float);
    method public static void fill(float[], int, int, float);
    method public static void fill(double[], double);
    method public static void fill(double[], int, int, double);
    method public static void fill(boolean[], boolean);
    method public static void fill(boolean[], int, int, boolean);
    method public static void fill(java.lang.Object[], java.lang.Object);
    method public static void fill(java.lang.Object[], int, int, java.lang.Object);
    method public static int hashCode(boolean[]);
    method public static int hashCode(int[]);
    method public static int hashCode(short[]);
    method public static int hashCode(char[]);
    method public static int hashCode(byte[]);
    method public static int hashCode(long[]);
    method public static int hashCode(float[]);
    method public static int hashCode(double[]);
    method public static int hashCode(java.lang.Object[]);
    method public static void sort(byte[]);
    method public static void sort(byte[], int, int);
    method public static void sort(char[]);
    method public static void sort(char[], int, int);
    method public static void sort(double[]);
    method public static void sort(double[], int, int);
    method public static void sort(float[]);
    method public static void sort(float[], int, int);
    method public static void sort(int[]);
    method public static void sort(int[], int, int);
    method public static void sort(long[]);
    method public static void sort(long[], int, int);
    method public static void sort(short[]);
    method public static void sort(short[], int, int);
    method public static void sort(java.lang.Object[]);
    method public static void sort(java.lang.Object[], int, int);
    method public static void sort(T[], int, int, java.util.Comparator<? super T>);
    method public static void sort(T[], java.util.Comparator<? super T>);
    method public static java.lang.String toString(boolean[]);
    method public static java.lang.String toString(byte[]);
    method public static java.lang.String toString(char[]);
    method public static java.lang.String toString(double[]);
    method public static java.lang.String toString(float[]);
    method public static java.lang.String toString(int[]);
    method public static java.lang.String toString(long[]);
    method public static java.lang.String toString(short[]);
    method public static java.lang.String toString(java.lang.Object[]);
  }

  public class BitSet implements java.lang.Cloneable java.io.Serializable {
    ctor public BitSet();
    ctor public BitSet(int);
    method public void and(java.util.BitSet);
    method public void andNot(java.util.BitSet);
    method public int cardinality();
    method public void clear(int);
    method public void clear();
    method public void clear(int, int);
    method public java.lang.Object clone();
    method public void flip(int);
    method public void flip(int, int);
    method public boolean get(int);
    method public java.util.BitSet get(int, int);
    method public boolean intersects(java.util.BitSet);
    method public boolean isEmpty();
    method public int length();
    method public int nextClearBit(int);
    method public int nextSetBit(int);
    method public void or(java.util.BitSet);
    method public int previousClearBit(int);
    method public int previousSetBit(int);
    method public void set(int);
    method public void set(int, boolean);
    method public void set(int, int, boolean);
    method public void set(int, int);
    method public int size();
    method public byte[] toByteArray();
    method public long[] toLongArray();
    method public static java.util.BitSet valueOf(long[]);
    method public static java.util.BitSet valueOf(java.nio.LongBuffer);
    method public static java.util.BitSet valueOf(byte[]);
    method public static java.util.BitSet valueOf(java.nio.ByteBuffer);
    method public void xor(java.util.BitSet);
  }

  public abstract class Calendar implements java.lang.Cloneable java.lang.Comparable java.io.Serializable {
    ctor protected Calendar();
    ctor protected Calendar(java.util.TimeZone, java.util.Locale);
    method public abstract void add(int, int);
    method public boolean after(java.lang.Object);
    method public boolean before(java.lang.Object);
    method public final void clear();
    method public final void clear(int);
    method public java.lang.Object clone();
    method public int compareTo(java.util.Calendar);
    method protected void complete();
    method protected abstract void computeFields();
    method protected abstract void computeTime();
    method public int get(int);
    method public int getActualMaximum(int);
    method public int getActualMinimum(int);
    method public static synchronized java.util.Locale[] getAvailableLocales();
    method public java.lang.String getDisplayName(int, int, java.util.Locale);
    method public java.util.Map<java.lang.String, java.lang.Integer> getDisplayNames(int, int, java.util.Locale);
    method public int getFirstDayOfWeek();
    method public abstract int getGreatestMinimum(int);
    method public static synchronized java.util.Calendar getInstance();
    method public static synchronized java.util.Calendar getInstance(java.util.Locale);
    method public static synchronized java.util.Calendar getInstance(java.util.TimeZone);
    method public static synchronized java.util.Calendar getInstance(java.util.TimeZone, java.util.Locale);
    method public abstract int getLeastMaximum(int);
    method public abstract int getMaximum(int);
    method public int getMinimalDaysInFirstWeek();
    method public abstract int getMinimum(int);
    method public final java.util.Date getTime();
    method public long getTimeInMillis();
    method public java.util.TimeZone getTimeZone();
    method protected final int internalGet(int);
    method public boolean isLenient();
    method public final boolean isSet(int);
    method public void roll(int, int);
    method public abstract void roll(int, boolean);
    method public void set(int, int);
    method public final void set(int, int, int);
    method public final void set(int, int, int, int, int);
    method public final void set(int, int, int, int, int, int);
    method public void setFirstDayOfWeek(int);
    method public void setLenient(boolean);
    method public void setMinimalDaysInFirstWeek(int);
    method public final void setTime(java.util.Date);
    method public void setTimeInMillis(long);
    method public void setTimeZone(java.util.TimeZone);
    field public static final int ALL_STYLES = 0; // 0x0
    field public static final int AM = 0; // 0x0
    field public static final int AM_PM = 9; // 0x9
    field public static final int APRIL = 3; // 0x3
    field public static final int AUGUST = 7; // 0x7
    field public static final int DATE = 5; // 0x5
    field public static final int DAY_OF_MONTH = 5; // 0x5
    field public static final int DAY_OF_WEEK = 7; // 0x7
    field public static final int DAY_OF_WEEK_IN_MONTH = 8; // 0x8
    field public static final int DAY_OF_YEAR = 6; // 0x6
    field public static final int DECEMBER = 11; // 0xb
    field public static final int DST_OFFSET = 16; // 0x10
    field public static final int ERA = 0; // 0x0
    field public static final int FEBRUARY = 1; // 0x1
    field public static final int FIELD_COUNT = 17; // 0x11
    field public static final int FRIDAY = 6; // 0x6
    field public static final int HOUR = 10; // 0xa
    field public static final int HOUR_OF_DAY = 11; // 0xb
    field public static final int JANUARY = 0; // 0x0
    field public static final int JULY = 6; // 0x6
    field public static final int JUNE = 5; // 0x5
    field public static final int LONG = 2; // 0x2
    field public static final int MARCH = 2; // 0x2
    field public static final int MAY = 4; // 0x4
    field public static final int MILLISECOND = 14; // 0xe
    field public static final int MINUTE = 12; // 0xc
    field public static final int MONDAY = 2; // 0x2
    field public static final int MONTH = 2; // 0x2
    field public static final int NOVEMBER = 10; // 0xa
    field public static final int OCTOBER = 9; // 0x9
    field public static final int PM = 1; // 0x1
    field public static final int SATURDAY = 7; // 0x7
    field public static final int SECOND = 13; // 0xd
    field public static final int SEPTEMBER = 8; // 0x8
    field public static final int SHORT = 1; // 0x1
    field public static final int SUNDAY = 1; // 0x1
    field public static final int THURSDAY = 5; // 0x5
    field public static final int TUESDAY = 3; // 0x3
    field public static final int UNDECIMBER = 12; // 0xc
    field public static final int WEDNESDAY = 4; // 0x4
    field public static final int WEEK_OF_MONTH = 4; // 0x4
    field public static final int WEEK_OF_YEAR = 3; // 0x3
    field public static final int YEAR = 1; // 0x1
    field public static final int ZONE_OFFSET = 15; // 0xf
    field protected boolean areFieldsSet;
    field protected int[] fields;
    field protected boolean[] isSet;
    field protected boolean isTimeSet;
    field protected long time;
  }

  public abstract interface Collection implements java.lang.Iterable {
    method public abstract boolean add(E);
    method public abstract boolean addAll(java.util.Collection<? extends E>);
    method public abstract void clear();
    method public abstract boolean contains(java.lang.Object);
    method public abstract boolean containsAll(java.util.Collection<?>);
    method public abstract boolean equals(java.lang.Object);
    method public abstract int hashCode();
    method public abstract boolean isEmpty();
    method public abstract java.util.Iterator<E> iterator();
    method public abstract boolean remove(java.lang.Object);
    method public abstract boolean removeAll(java.util.Collection<?>);
    method public abstract boolean retainAll(java.util.Collection<?>);
    method public abstract int size();
    method public abstract java.lang.Object[] toArray();
    method public abstract T[] toArray(T[]);
  }

  public class Collections {
    method public static boolean addAll(java.util.Collection<? super T>, T...);
    method public static java.util.Queue<T> asLifoQueue(java.util.Deque<T>);
    method public static int binarySearch(java.util.List<? extends java.lang.Comparable<? super T>>, T);
    method public static int binarySearch(java.util.List<? extends T>, T, java.util.Comparator<? super T>);
    method public static java.util.Collection<E> checkedCollection(java.util.Collection<E>, java.lang.Class<E>);
    method public static java.util.List<E> checkedList(java.util.List<E>, java.lang.Class<E>);
    method public static java.util.Map<K, V> checkedMap(java.util.Map<K, V>, java.lang.Class<K>, java.lang.Class<V>);
    method public static java.util.Set<E> checkedSet(java.util.Set<E>, java.lang.Class<E>);
    method public static java.util.SortedMap<K, V> checkedSortedMap(java.util.SortedMap<K, V>, java.lang.Class<K>, java.lang.Class<V>);
    method public static java.util.SortedSet<E> checkedSortedSet(java.util.SortedSet<E>, java.lang.Class<E>);
    method public static void copy(java.util.List<? super T>, java.util.List<? extends T>);
    method public static boolean disjoint(java.util.Collection<?>, java.util.Collection<?>);
    method public static java.util.Enumeration<T> emptyEnumeration();
    method public static java.util.Iterator<T> emptyIterator();
    method public static final java.util.List<T> emptyList();
    method public static java.util.ListIterator<T> emptyListIterator();
    method public static final java.util.Map<K, V> emptyMap();
    method public static final java.util.Set<T> emptySet();
    method public static java.util.Enumeration<T> enumeration(java.util.Collection<T>);
    method public static void fill(java.util.List<? super T>, T);
    method public static int frequency(java.util.Collection<?>, java.lang.Object);
    method public static int indexOfSubList(java.util.List<?>, java.util.List<?>);
    method public static int lastIndexOfSubList(java.util.List<?>, java.util.List<?>);
    method public static java.util.ArrayList<T> list(java.util.Enumeration<T>);
    method public static T max(java.util.Collection<? extends T>);
    method public static T max(java.util.Collection<? extends T>, java.util.Comparator<? super T>);
    method public static T min(java.util.Collection<? extends T>);
    method public static T min(java.util.Collection<? extends T>, java.util.Comparator<? super T>);
    method public static java.util.List<T> nCopies(int, T);
    method public static java.util.Set<E> newSetFromMap(java.util.Map<E, java.lang.Boolean>);
    method public static boolean replaceAll(java.util.List<T>, T, T);
    method public static void reverse(java.util.List<?>);
    method public static java.util.Comparator<T> reverseOrder();
    method public static java.util.Comparator<T> reverseOrder(java.util.Comparator<T>);
    method public static void rotate(java.util.List<?>, int);
    method public static void shuffle(java.util.List<?>);
    method public static void shuffle(java.util.List<?>, java.util.Random);
    method public static java.util.Set<E> singleton(E);
    method public static java.util.List<E> singletonList(E);
    method public static java.util.Map<K, V> singletonMap(K, V);
    method public static void sort(java.util.List<T>);
    method public static void sort(java.util.List<T>, java.util.Comparator<? super T>);
    method public static void swap(java.util.List<?>, int, int);
    method public static java.util.Collection<T> synchronizedCollection(java.util.Collection<T>);
    method public static java.util.List<T> synchronizedList(java.util.List<T>);
    method public static java.util.Map<K, V> synchronizedMap(java.util.Map<K, V>);
    method public static java.util.Set<E> synchronizedSet(java.util.Set<E>);
    method public static java.util.SortedMap<K, V> synchronizedSortedMap(java.util.SortedMap<K, V>);
    method public static java.util.SortedSet<E> synchronizedSortedSet(java.util.SortedSet<E>);
    method public static java.util.Collection<E> unmodifiableCollection(java.util.Collection<? extends E>);
    method public static java.util.List<E> unmodifiableList(java.util.List<? extends E>);
    method public static java.util.Map<K, V> unmodifiableMap(java.util.Map<? extends K, ? extends V>);
    method public static java.util.Set<E> unmodifiableSet(java.util.Set<? extends E>);
    method public static java.util.SortedMap<K, V> unmodifiableSortedMap(java.util.SortedMap<K, ? extends V>);
    method public static java.util.SortedSet<E> unmodifiableSortedSet(java.util.SortedSet<E>);
    field public static final java.util.List EMPTY_LIST;
    field public static final java.util.Map EMPTY_MAP;
    field public static final java.util.Set EMPTY_SET;
  }

  public abstract interface Comparator {
    method public abstract int compare(T, T);
    method public abstract boolean equals(java.lang.Object);
  }

  public class ConcurrentModificationException extends java.lang.RuntimeException {
    ctor public ConcurrentModificationException();
    ctor public ConcurrentModificationException(java.lang.String);
    ctor public ConcurrentModificationException(java.lang.String, java.lang.Throwable);
    ctor public ConcurrentModificationException(java.lang.Throwable);
  }

  public final class Currency implements java.io.Serializable {
    method public static java.util.Set<java.util.Currency> getAvailableCurrencies();
    method public java.lang.String getCurrencyCode();
    method public int getDefaultFractionDigits();
    method public java.lang.String getDisplayName();
    method public java.lang.String getDisplayName(java.util.Locale);
    method public static java.util.Currency getInstance(java.lang.String);
    method public static java.util.Currency getInstance(java.util.Locale);
    method public java.lang.String getSymbol();
    method public java.lang.String getSymbol(java.util.Locale);
  }

  public class Date implements java.lang.Cloneable java.lang.Comparable java.io.Serializable {
    ctor public Date();
    ctor public deprecated Date(int, int, int);
    ctor public deprecated Date(int, int, int, int, int);
    ctor public deprecated Date(int, int, int, int, int, int);
    ctor public Date(long);
    ctor public deprecated Date(java.lang.String);
    method public static deprecated long UTC(int, int, int, int, int, int);
    method public boolean after(java.util.Date);
    method public boolean before(java.util.Date);
    method public java.lang.Object clone();
    method public int compareTo(java.util.Date);
    method public deprecated int getDate();
    method public deprecated int getDay();
    method public deprecated int getHours();
    method public deprecated int getMinutes();
    method public deprecated int getMonth();
    method public deprecated int getSeconds();
    method public long getTime();
    method public deprecated int getTimezoneOffset();
    method public deprecated int getYear();
    method public static deprecated long parse(java.lang.String);
    method public deprecated void setDate(int);
    method public deprecated void setHours(int);
    method public deprecated void setMinutes(int);
    method public deprecated void setMonth(int);
    method public deprecated void setSeconds(int);
    method public void setTime(long);
    method public deprecated void setYear(int);
    method public deprecated java.lang.String toGMTString();
    method public deprecated java.lang.String toLocaleString();
  }

  public abstract interface Deque implements java.util.Queue {
    method public abstract boolean add(E);
    method public abstract void addFirst(E);
    method public abstract void addLast(E);
    method public abstract boolean contains(java.lang.Object);
    method public abstract java.util.Iterator<E> descendingIterator();
    method public abstract E element();
    method public abstract E getFirst();
    method public abstract E getLast();
    method public abstract java.util.Iterator<E> iterator();
    method public abstract boolean offer(E);
    method public abstract boolean offerFirst(E);
    method public abstract boolean offerLast(E);
    method public abstract E peek();
    method public abstract E peekFirst();
    method public abstract E peekLast();
    method public abstract E poll();
    method public abstract E pollFirst();
    method public abstract E pollLast();
    method public abstract E pop();
    method public abstract void push(E);
    method public abstract E remove();
    method public abstract boolean remove(java.lang.Object);
    method public abstract E removeFirst();
    method public abstract boolean removeFirstOccurrence(java.lang.Object);
    method public abstract E removeLast();
    method public abstract boolean removeLastOccurrence(java.lang.Object);
    method public abstract int size();
  }

  public abstract class Dictionary {
    ctor public Dictionary();
    method public abstract java.util.Enumeration<V> elements();
    method public abstract V get(java.lang.Object);
    method public abstract boolean isEmpty();
    method public abstract java.util.Enumeration<K> keys();
    method public abstract V put(K, V);
    method public abstract V remove(java.lang.Object);
    method public abstract int size();
  }

  public class DuplicateFormatFlagsException extends java.util.IllegalFormatException {
    ctor public DuplicateFormatFlagsException(java.lang.String);
    method public java.lang.String getFlags();
  }

  public class EmptyStackException extends java.lang.RuntimeException {
    ctor public EmptyStackException();
  }

  public class EnumMap extends java.util.AbstractMap implements java.lang.Cloneable java.util.Map java.io.Serializable {
    ctor public EnumMap(java.lang.Class<K>);
    ctor public EnumMap(java.util.EnumMap<K, ? extends V>);
    ctor public EnumMap(java.util.Map<K, ? extends V>);
    method public java.util.EnumMap<K, V> clone();
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
  }

  public abstract class EnumSet extends java.util.AbstractSet implements java.lang.Cloneable java.io.Serializable {
    method public static java.util.EnumSet<E> allOf(java.lang.Class<E>);
    method public java.util.EnumSet<E> clone();
    method public static java.util.EnumSet<E> complementOf(java.util.EnumSet<E>);
    method public static java.util.EnumSet<E> copyOf(java.util.EnumSet<E>);
    method public static java.util.EnumSet<E> copyOf(java.util.Collection<E>);
    method public static java.util.EnumSet<E> noneOf(java.lang.Class<E>);
    method public static java.util.EnumSet<E> of(E);
    method public static java.util.EnumSet<E> of(E, E);
    method public static java.util.EnumSet<E> of(E, E, E);
    method public static java.util.EnumSet<E> of(E, E, E, E);
    method public static java.util.EnumSet<E> of(E, E, E, E, E);
    method public static java.util.EnumSet<E> of(E, E...);
    method public static java.util.EnumSet<E> range(E, E);
  }

  public abstract interface Enumeration {
    method public abstract boolean hasMoreElements();
    method public abstract E nextElement();
  }

  public abstract interface EventListener {
  }

  public abstract class EventListenerProxy implements java.util.EventListener {
    ctor public EventListenerProxy(java.util.EventListener);
    method public java.util.EventListener getListener();
  }

  public class EventObject implements java.io.Serializable {
    ctor public EventObject(java.lang.Object);
    method public java.lang.Object getSource();
    field protected transient java.lang.Object source;
  }

  public class FormatFlagsConversionMismatchException extends java.util.IllegalFormatException implements java.io.Serializable {
    ctor public FormatFlagsConversionMismatchException(java.lang.String, char);
    method public char getConversion();
    method public java.lang.String getFlags();
  }

  public abstract interface Formattable {
    method public abstract void formatTo(java.util.Formatter, int, int, int) throws java.util.IllegalFormatException;
  }

  public class FormattableFlags {
    field public static final int ALTERNATE = 4; // 0x4
    field public static final int LEFT_JUSTIFY = 1; // 0x1
    field public static final int UPPERCASE = 2; // 0x2
  }

  public final class Formatter implements java.io.Closeable java.io.Flushable {
    ctor public Formatter();
    ctor public Formatter(java.lang.Appendable);
    ctor public Formatter(java.util.Locale);
    ctor public Formatter(java.lang.Appendable, java.util.Locale);
    ctor public Formatter(java.lang.String) throws java.io.FileNotFoundException;
    ctor public Formatter(java.lang.String, java.lang.String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    ctor public Formatter(java.lang.String, java.lang.String, java.util.Locale) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    ctor public Formatter(java.io.File) throws java.io.FileNotFoundException;
    ctor public Formatter(java.io.File, java.lang.String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    ctor public Formatter(java.io.File, java.lang.String, java.util.Locale) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
    ctor public Formatter(java.io.OutputStream);
    ctor public Formatter(java.io.OutputStream, java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public Formatter(java.io.OutputStream, java.lang.String, java.util.Locale) throws java.io.UnsupportedEncodingException;
    ctor public Formatter(java.io.PrintStream);
    method public void close();
    method public void flush();
    method public java.util.Formatter format(java.lang.String, java.lang.Object...);
    method public java.util.Formatter format(java.util.Locale, java.lang.String, java.lang.Object...);
    method public java.io.IOException ioException();
    method public java.util.Locale locale();
    method public java.lang.Appendable out();
  }

  public static final class Formatter.BigDecimalLayoutForm extends java.lang.Enum {
    method public static java.util.Formatter.BigDecimalLayoutForm valueOf(java.lang.String);
    method public static final java.util.Formatter.BigDecimalLayoutForm[] values();
    enum_constant public static final java.util.Formatter.BigDecimalLayoutForm DECIMAL_FLOAT;
    enum_constant public static final java.util.Formatter.BigDecimalLayoutForm SCIENTIFIC;
  }

  public class FormatterClosedException extends java.lang.IllegalStateException implements java.io.Serializable {
    ctor public FormatterClosedException();
  }

  public class GregorianCalendar extends java.util.Calendar {
    ctor public GregorianCalendar();
    ctor public GregorianCalendar(int, int, int);
    ctor public GregorianCalendar(int, int, int, int, int);
    ctor public GregorianCalendar(int, int, int, int, int, int);
    ctor public GregorianCalendar(java.util.Locale);
    ctor public GregorianCalendar(java.util.TimeZone);
    ctor public GregorianCalendar(java.util.TimeZone, java.util.Locale);
    method public void add(int, int);
    method protected void computeFields();
    method protected void computeTime();
    method public int getGreatestMinimum(int);
    method public final java.util.Date getGregorianChange();
    method public int getLeastMaximum(int);
    method public int getMaximum(int);
    method public int getMinimum(int);
    method public boolean isLeapYear(int);
    method public void roll(int, boolean);
    method public void setGregorianChange(java.util.Date);
    field public static final int AD = 1; // 0x1
    field public static final int BC = 0; // 0x0
  }

  public class HashMap extends java.util.AbstractMap implements java.lang.Cloneable java.io.Serializable {
    ctor public HashMap();
    ctor public HashMap(int);
    ctor public HashMap(int, float);
    ctor public HashMap(java.util.Map<? extends K, ? extends V>);
    method public java.lang.Object clone();
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
  }

  public class HashSet extends java.util.AbstractSet implements java.lang.Cloneable java.io.Serializable java.util.Set {
    ctor public HashSet();
    ctor public HashSet(int);
    ctor public HashSet(int, float);
    ctor public HashSet(java.util.Collection<? extends E>);
    method public java.lang.Object clone();
    method public java.util.Iterator<E> iterator();
    method public int size();
  }

  public class Hashtable extends java.util.Dictionary implements java.lang.Cloneable java.util.Map java.io.Serializable {
    ctor public Hashtable();
    ctor public Hashtable(int);
    ctor public Hashtable(int, float);
    ctor public Hashtable(java.util.Map<? extends K, ? extends V>);
    method public synchronized void clear();
    method public synchronized java.lang.Object clone();
    method public boolean contains(java.lang.Object);
    method public synchronized boolean containsKey(java.lang.Object);
    method public synchronized boolean containsValue(java.lang.Object);
    method public synchronized java.util.Enumeration<V> elements();
    method public synchronized java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public synchronized V get(java.lang.Object);
    method public synchronized boolean isEmpty();
    method public synchronized java.util.Set<K> keySet();
    method public synchronized java.util.Enumeration<K> keys();
    method public synchronized V put(K, V);
    method public synchronized void putAll(java.util.Map<? extends K, ? extends V>);
    method protected void rehash();
    method public synchronized V remove(java.lang.Object);
    method public synchronized int size();
    method public synchronized java.util.Collection<V> values();
  }

  public class IdentityHashMap extends java.util.AbstractMap implements java.lang.Cloneable java.util.Map java.io.Serializable {
    ctor public IdentityHashMap();
    ctor public IdentityHashMap(int);
    ctor public IdentityHashMap(java.util.Map<? extends K, ? extends V>);
    method public java.lang.Object clone();
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
  }

  public class IllegalFormatCodePointException extends java.util.IllegalFormatException implements java.io.Serializable {
    ctor public IllegalFormatCodePointException(int);
    method public int getCodePoint();
  }

  public class IllegalFormatConversionException extends java.util.IllegalFormatException implements java.io.Serializable {
    ctor public IllegalFormatConversionException(char, java.lang.Class<?>);
    method public java.lang.Class<?> getArgumentClass();
    method public char getConversion();
  }

  public class IllegalFormatException extends java.lang.IllegalArgumentException implements java.io.Serializable {
  }

  public class IllegalFormatFlagsException extends java.util.IllegalFormatException implements java.io.Serializable {
    ctor public IllegalFormatFlagsException(java.lang.String);
    method public java.lang.String getFlags();
  }

  public class IllegalFormatPrecisionException extends java.util.IllegalFormatException {
    ctor public IllegalFormatPrecisionException(int);
    method public int getPrecision();
  }

  public class IllegalFormatWidthException extends java.util.IllegalFormatException {
    ctor public IllegalFormatWidthException(int);
    method public int getWidth();
  }

  public class IllformedLocaleException extends java.lang.RuntimeException {
    ctor public IllformedLocaleException();
    ctor public IllformedLocaleException(java.lang.String);
    ctor public IllformedLocaleException(java.lang.String, int);
    method public int getErrorIndex();
  }

  public class InputMismatchException extends java.util.NoSuchElementException implements java.io.Serializable {
    ctor public InputMismatchException();
    ctor public InputMismatchException(java.lang.String);
  }

  public class InvalidPropertiesFormatException extends java.io.IOException {
    ctor public InvalidPropertiesFormatException(java.lang.String);
    ctor public InvalidPropertiesFormatException(java.lang.Throwable);
  }

  public abstract interface Iterator {
    method public abstract boolean hasNext();
    method public abstract E next();
    method public abstract void remove();
  }

  public class LinkedHashMap extends java.util.HashMap {
    ctor public LinkedHashMap();
    ctor public LinkedHashMap(int);
    ctor public LinkedHashMap(int, float);
    ctor public LinkedHashMap(int, float, boolean);
    ctor public LinkedHashMap(java.util.Map<? extends K, ? extends V>);
    method protected boolean removeEldestEntry(java.util.Map.Entry<K, V>);
  }

  public class LinkedHashSet extends java.util.HashSet implements java.lang.Cloneable java.io.Serializable java.util.Set {
    ctor public LinkedHashSet();
    ctor public LinkedHashSet(int);
    ctor public LinkedHashSet(int, float);
    ctor public LinkedHashSet(java.util.Collection<? extends E>);
  }

  public class LinkedList extends java.util.AbstractSequentialList implements java.lang.Cloneable java.util.Deque java.util.List java.util.Queue java.io.Serializable {
    ctor public LinkedList();
    ctor public LinkedList(java.util.Collection<? extends E>);
    method public void addFirst(E);
    method public void addLast(E);
    method public java.lang.Object clone();
    method public java.util.Iterator<E> descendingIterator();
    method public E element();
    method public E getFirst();
    method public E getLast();
    method public java.util.ListIterator<E> listIterator(int);
    method public boolean offer(E);
    method public boolean offerFirst(E);
    method public boolean offerLast(E);
    method public E peek();
    method public E peekFirst();
    method public E peekLast();
    method public E poll();
    method public E pollFirst();
    method public E pollLast();
    method public E pop();
    method public void push(E);
    method public E remove();
    method public E removeFirst();
    method public boolean removeFirstOccurrence(java.lang.Object);
    method public E removeLast();
    method public boolean removeLastOccurrence(java.lang.Object);
    method public int size();
  }

  public abstract interface List implements java.util.Collection {
    method public abstract void add(int, E);
    method public abstract boolean add(E);
    method public abstract boolean addAll(int, java.util.Collection<? extends E>);
    method public abstract boolean addAll(java.util.Collection<? extends E>);
    method public abstract void clear();
    method public abstract boolean contains(java.lang.Object);
    method public abstract boolean containsAll(java.util.Collection<?>);
    method public abstract boolean equals(java.lang.Object);
    method public abstract E get(int);
    method public abstract int hashCode();
    method public abstract int indexOf(java.lang.Object);
    method public abstract boolean isEmpty();
    method public abstract java.util.Iterator<E> iterator();
    method public abstract int lastIndexOf(java.lang.Object);
    method public abstract java.util.ListIterator<E> listIterator();
    method public abstract java.util.ListIterator<E> listIterator(int);
    method public abstract E remove(int);
    method public abstract boolean remove(java.lang.Object);
    method public abstract boolean removeAll(java.util.Collection<?>);
    method public abstract boolean retainAll(java.util.Collection<?>);
    method public abstract E set(int, E);
    method public abstract int size();
    method public abstract java.util.List<E> subList(int, int);
    method public abstract java.lang.Object[] toArray();
    method public abstract T[] toArray(T[]);
  }

  public abstract interface ListIterator implements java.util.Iterator {
    method public abstract void add(E);
    method public abstract boolean hasNext();
    method public abstract boolean hasPrevious();
    method public abstract E next();
    method public abstract int nextIndex();
    method public abstract E previous();
    method public abstract int previousIndex();
    method public abstract void remove();
    method public abstract void set(E);
  }

  public abstract class ListResourceBundle extends java.util.ResourceBundle {
    ctor public ListResourceBundle();
    method protected abstract java.lang.Object[][] getContents();
    method public java.util.Enumeration<java.lang.String> getKeys();
    method public final java.lang.Object handleGetObject(java.lang.String);
  }

  public final class Locale implements java.lang.Cloneable java.io.Serializable {
    ctor public Locale(java.lang.String);
    ctor public Locale(java.lang.String, java.lang.String);
    ctor public Locale(java.lang.String, java.lang.String, java.lang.String);
    method public java.lang.Object clone();
    method public static java.util.Locale forLanguageTag(java.lang.String);
    method public static java.util.Locale[] getAvailableLocales();
    method public java.lang.String getCountry();
    method public static java.util.Locale getDefault();
    method public final java.lang.String getDisplayCountry();
    method public java.lang.String getDisplayCountry(java.util.Locale);
    method public final java.lang.String getDisplayLanguage();
    method public java.lang.String getDisplayLanguage(java.util.Locale);
    method public final java.lang.String getDisplayName();
    method public java.lang.String getDisplayName(java.util.Locale);
    method public java.lang.String getDisplayScript();
    method public java.lang.String getDisplayScript(java.util.Locale);
    method public final java.lang.String getDisplayVariant();
    method public java.lang.String getDisplayVariant(java.util.Locale);
    method public java.lang.String getExtension(char);
    method public java.util.Set<java.lang.Character> getExtensionKeys();
    method public java.lang.String getISO3Country();
    method public java.lang.String getISO3Language();
    method public static java.lang.String[] getISOCountries();
    method public static java.lang.String[] getISOLanguages();
    method public java.lang.String getLanguage();
    method public java.lang.String getScript();
    method public java.util.Set<java.lang.String> getUnicodeLocaleAttributes();
    method public java.util.Set<java.lang.String> getUnicodeLocaleKeys();
    method public java.lang.String getUnicodeLocaleType(java.lang.String);
    method public java.lang.String getVariant();
    method public static synchronized void setDefault(java.util.Locale);
    method public java.lang.String toLanguageTag();
    method public final java.lang.String toString();
    field public static final java.util.Locale CANADA;
    field public static final java.util.Locale CANADA_FRENCH;
    field public static final java.util.Locale CHINA;
    field public static final java.util.Locale CHINESE;
    field public static final java.util.Locale ENGLISH;
    field public static final java.util.Locale FRANCE;
    field public static final java.util.Locale FRENCH;
    field public static final java.util.Locale GERMAN;
    field public static final java.util.Locale GERMANY;
    field public static final java.util.Locale ITALIAN;
    field public static final java.util.Locale ITALY;
    field public static final java.util.Locale JAPAN;
    field public static final java.util.Locale JAPANESE;
    field public static final java.util.Locale KOREA;
    field public static final java.util.Locale KOREAN;
    field public static final java.util.Locale PRC;
    field public static final char PRIVATE_USE_EXTENSION = 120; // 0x0078 'x'
    field public static final java.util.Locale ROOT;
    field public static final java.util.Locale SIMPLIFIED_CHINESE;
    field public static final java.util.Locale TAIWAN;
    field public static final java.util.Locale TRADITIONAL_CHINESE;
    field public static final java.util.Locale UK;
    field public static final char UNICODE_LOCALE_EXTENSION = 117; // 0x0075 'u'
    field public static final java.util.Locale US;
  }

  public static final class Locale.Builder {
    ctor public Locale.Builder();
    method public java.util.Locale.Builder addUnicodeLocaleAttribute(java.lang.String);
    method public java.util.Locale build();
    method public java.util.Locale.Builder clear();
    method public java.util.Locale.Builder clearExtensions();
    method public java.util.Locale.Builder removeUnicodeLocaleAttribute(java.lang.String);
    method public java.util.Locale.Builder setExtension(char, java.lang.String);
    method public java.util.Locale.Builder setLanguage(java.lang.String);
    method public java.util.Locale.Builder setLanguageTag(java.lang.String);
    method public java.util.Locale.Builder setLocale(java.util.Locale);
    method public java.util.Locale.Builder setRegion(java.lang.String);
    method public java.util.Locale.Builder setScript(java.lang.String);
    method public java.util.Locale.Builder setUnicodeLocaleKeyword(java.lang.String, java.lang.String);
    method public java.util.Locale.Builder setVariant(java.lang.String);
  }

  public abstract interface Map {
    method public abstract void clear();
    method public abstract boolean containsKey(java.lang.Object);
    method public abstract boolean containsValue(java.lang.Object);
    method public abstract java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public abstract boolean equals(java.lang.Object);
    method public abstract V get(java.lang.Object);
    method public abstract int hashCode();
    method public abstract boolean isEmpty();
    method public abstract java.util.Set<K> keySet();
    method public abstract V put(K, V);
    method public abstract void putAll(java.util.Map<? extends K, ? extends V>);
    method public abstract V remove(java.lang.Object);
    method public abstract int size();
    method public abstract java.util.Collection<V> values();
  }

  public static abstract interface Map.Entry {
    method public abstract boolean equals(java.lang.Object);
    method public abstract K getKey();
    method public abstract V getValue();
    method public abstract int hashCode();
    method public abstract V setValue(V);
  }

  public class MissingFormatArgumentException extends java.util.IllegalFormatException {
    ctor public MissingFormatArgumentException(java.lang.String);
    method public java.lang.String getFormatSpecifier();
  }

  public class MissingFormatWidthException extends java.util.IllegalFormatException {
    ctor public MissingFormatWidthException(java.lang.String);
    method public java.lang.String getFormatSpecifier();
  }

  public class MissingResourceException extends java.lang.RuntimeException {
    ctor public MissingResourceException(java.lang.String, java.lang.String, java.lang.String);
    method public java.lang.String getClassName();
    method public java.lang.String getKey();
  }

  public abstract interface NavigableMap implements java.util.SortedMap {
    method public abstract java.util.Map.Entry<K, V> ceilingEntry(K);
    method public abstract K ceilingKey(K);
    method public abstract java.util.NavigableSet<K> descendingKeySet();
    method public abstract java.util.NavigableMap<K, V> descendingMap();
    method public abstract java.util.Map.Entry<K, V> firstEntry();
    method public abstract java.util.Map.Entry<K, V> floorEntry(K);
    method public abstract K floorKey(K);
    method public abstract java.util.NavigableMap<K, V> headMap(K, boolean);
    method public abstract java.util.SortedMap<K, V> headMap(K);
    method public abstract java.util.Map.Entry<K, V> higherEntry(K);
    method public abstract K higherKey(K);
    method public abstract java.util.Map.Entry<K, V> lastEntry();
    method public abstract java.util.Map.Entry<K, V> lowerEntry(K);
    method public abstract K lowerKey(K);
    method public abstract java.util.NavigableSet<K> navigableKeySet();
    method public abstract java.util.Map.Entry<K, V> pollFirstEntry();
    method public abstract java.util.Map.Entry<K, V> pollLastEntry();
    method public abstract java.util.NavigableMap<K, V> subMap(K, boolean, K, boolean);
    method public abstract java.util.SortedMap<K, V> subMap(K, K);
    method public abstract java.util.NavigableMap<K, V> tailMap(K, boolean);
    method public abstract java.util.SortedMap<K, V> tailMap(K);
  }

  public abstract interface NavigableSet implements java.util.SortedSet {
    method public abstract E ceiling(E);
    method public abstract java.util.Iterator<E> descendingIterator();
    method public abstract java.util.NavigableSet<E> descendingSet();
    method public abstract E floor(E);
    method public abstract java.util.NavigableSet<E> headSet(E, boolean);
    method public abstract java.util.SortedSet<E> headSet(E);
    method public abstract E higher(E);
    method public abstract java.util.Iterator<E> iterator();
    method public abstract E lower(E);
    method public abstract E pollFirst();
    method public abstract E pollLast();
    method public abstract java.util.NavigableSet<E> subSet(E, boolean, E, boolean);
    method public abstract java.util.SortedSet<E> subSet(E, E);
    method public abstract java.util.NavigableSet<E> tailSet(E, boolean);
    method public abstract java.util.SortedSet<E> tailSet(E);
  }

  public class NoSuchElementException extends java.lang.RuntimeException {
    ctor public NoSuchElementException();
    ctor public NoSuchElementException(java.lang.String);
  }

  public final class Objects {
    method public static int compare(T, T, java.util.Comparator<? super T>);
    method public static boolean deepEquals(java.lang.Object, java.lang.Object);
    method public static boolean equals(java.lang.Object, java.lang.Object);
    method public static int hash(java.lang.Object...);
    method public static int hashCode(java.lang.Object);
    method public static T requireNonNull(T);
    method public static T requireNonNull(T, java.lang.String);
    method public static java.lang.String toString(java.lang.Object);
    method public static java.lang.String toString(java.lang.Object, java.lang.String);
  }

  public class Observable {
    ctor public Observable();
    method public void addObserver(java.util.Observer);
    method protected void clearChanged();
    method public int countObservers();
    method public synchronized void deleteObserver(java.util.Observer);
    method public synchronized void deleteObservers();
    method public boolean hasChanged();
    method public void notifyObservers();
    method public void notifyObservers(java.lang.Object);
    method protected void setChanged();
  }

  public abstract interface Observer {
    method public abstract void update(java.util.Observable, java.lang.Object);
  }

  public class PriorityQueue extends java.util.AbstractQueue implements java.io.Serializable {
    ctor public PriorityQueue();
    ctor public PriorityQueue(int);
    ctor public PriorityQueue(int, java.util.Comparator<? super E>);
    ctor public PriorityQueue(java.util.Collection<? extends E>);
    ctor public PriorityQueue(java.util.PriorityQueue<? extends E>);
    ctor public PriorityQueue(java.util.SortedSet<? extends E>);
    method public java.util.Comparator<? super E> comparator();
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public E peek();
    method public E poll();
    method public int size();
  }

  public class Properties extends java.util.Hashtable {
    ctor public Properties();
    ctor public Properties(java.util.Properties);
    method public java.lang.String getProperty(java.lang.String);
    method public java.lang.String getProperty(java.lang.String, java.lang.String);
    method public void list(java.io.PrintStream);
    method public void list(java.io.PrintWriter);
    method public synchronized void load(java.io.InputStream) throws java.io.IOException;
    method public synchronized void load(java.io.Reader) throws java.io.IOException;
    method public synchronized void loadFromXML(java.io.InputStream) throws java.io.IOException, java.util.InvalidPropertiesFormatException;
    method public java.util.Enumeration<?> propertyNames();
    method public deprecated void save(java.io.OutputStream, java.lang.String);
    method public java.lang.Object setProperty(java.lang.String, java.lang.String);
    method public synchronized void store(java.io.OutputStream, java.lang.String) throws java.io.IOException;
    method public synchronized void store(java.io.Writer, java.lang.String) throws java.io.IOException;
    method public void storeToXML(java.io.OutputStream, java.lang.String) throws java.io.IOException;
    method public synchronized void storeToXML(java.io.OutputStream, java.lang.String, java.lang.String) throws java.io.IOException;
    method public java.util.Set<java.lang.String> stringPropertyNames();
    field protected java.util.Properties defaults;
  }

  public final class PropertyPermission extends java.security.BasicPermission {
    ctor public PropertyPermission(java.lang.String, java.lang.String);
  }

  public class PropertyResourceBundle extends java.util.ResourceBundle {
    ctor public PropertyResourceBundle(java.io.InputStream) throws java.io.IOException;
    ctor public PropertyResourceBundle(java.io.Reader) throws java.io.IOException;
    method public java.util.Enumeration<java.lang.String> getKeys();
    method public java.lang.Object handleGetObject(java.lang.String);
  }

  public abstract interface Queue implements java.util.Collection {
    method public abstract boolean add(E);
    method public abstract E element();
    method public abstract boolean offer(E);
    method public abstract E peek();
    method public abstract E poll();
    method public abstract E remove();
  }

  public class Random implements java.io.Serializable {
    ctor public Random();
    ctor public Random(long);
    method protected synchronized int next(int);
    method public boolean nextBoolean();
    method public void nextBytes(byte[]);
    method public double nextDouble();
    method public float nextFloat();
    method public synchronized double nextGaussian();
    method public int nextInt();
    method public int nextInt(int);
    method public long nextLong();
    method public synchronized void setSeed(long);
  }

  public abstract interface RandomAccess {
  }

  public abstract class ResourceBundle {
    ctor public ResourceBundle();
    method public static void clearCache();
    method public static void clearCache(java.lang.ClassLoader);
    method public boolean containsKey(java.lang.String);
    method public static java.util.ResourceBundle getBundle(java.lang.String) throws java.util.MissingResourceException;
    method public static java.util.ResourceBundle getBundle(java.lang.String, java.util.Locale);
    method public static java.util.ResourceBundle getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader) throws java.util.MissingResourceException;
    method public static java.util.ResourceBundle getBundle(java.lang.String, java.util.ResourceBundle.Control);
    method public static java.util.ResourceBundle getBundle(java.lang.String, java.util.Locale, java.util.ResourceBundle.Control);
    method public static java.util.ResourceBundle getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader, java.util.ResourceBundle.Control);
    method public abstract java.util.Enumeration<java.lang.String> getKeys();
    method public java.util.Locale getLocale();
    method public final java.lang.Object getObject(java.lang.String);
    method public final java.lang.String getString(java.lang.String);
    method public final java.lang.String[] getStringArray(java.lang.String);
    method protected abstract java.lang.Object handleGetObject(java.lang.String);
    method protected java.util.Set<java.lang.String> handleKeySet();
    method public java.util.Set<java.lang.String> keySet();
    method protected void setParent(java.util.ResourceBundle);
    field protected java.util.ResourceBundle parent;
  }

  public static class ResourceBundle.Control {
    ctor protected ResourceBundle.Control();
    method public java.util.List<java.util.Locale> getCandidateLocales(java.lang.String, java.util.Locale);
    method public static java.util.ResourceBundle.Control getControl(java.util.List<java.lang.String>);
    method public java.util.Locale getFallbackLocale(java.lang.String, java.util.Locale);
    method public java.util.List<java.lang.String> getFormats(java.lang.String);
    method public static java.util.ResourceBundle.Control getNoFallbackControl(java.util.List<java.lang.String>);
    method public long getTimeToLive(java.lang.String, java.util.Locale);
    method public boolean needsReload(java.lang.String, java.util.Locale, java.lang.String, java.lang.ClassLoader, java.util.ResourceBundle, long);
    method public java.util.ResourceBundle newBundle(java.lang.String, java.util.Locale, java.lang.String, java.lang.ClassLoader, boolean) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException;
    method public java.lang.String toBundleName(java.lang.String, java.util.Locale);
    method public final java.lang.String toResourceName(java.lang.String, java.lang.String);
    field public static final java.util.List<java.lang.String> FORMAT_CLASS;
    field public static final java.util.List<java.lang.String> FORMAT_DEFAULT;
    field public static final java.util.List<java.lang.String> FORMAT_PROPERTIES;
    field public static final long TTL_DONT_CACHE = -1L; // 0xffffffffffffffffL
    field public static final long TTL_NO_EXPIRATION_CONTROL = -2L; // 0xfffffffffffffffeL
  }

  public final class Scanner implements java.io.Closeable java.util.Iterator {
    ctor public Scanner(java.io.File) throws java.io.FileNotFoundException;
    ctor public Scanner(java.io.File, java.lang.String) throws java.io.FileNotFoundException;
    ctor public Scanner(java.lang.String);
    ctor public Scanner(java.io.InputStream);
    ctor public Scanner(java.io.InputStream, java.lang.String);
    ctor public Scanner(java.lang.Readable);
    ctor public Scanner(java.nio.channels.ReadableByteChannel);
    ctor public Scanner(java.nio.channels.ReadableByteChannel, java.lang.String);
    method public void close();
    method public java.util.regex.Pattern delimiter();
    method public java.lang.String findInLine(java.util.regex.Pattern);
    method public java.lang.String findInLine(java.lang.String);
    method public java.lang.String findWithinHorizon(java.util.regex.Pattern, int);
    method public java.lang.String findWithinHorizon(java.lang.String, int);
    method public boolean hasNext();
    method public boolean hasNext(java.util.regex.Pattern);
    method public boolean hasNext(java.lang.String);
    method public boolean hasNextBigDecimal();
    method public boolean hasNextBigInteger();
    method public boolean hasNextBigInteger(int);
    method public boolean hasNextBoolean();
    method public boolean hasNextByte();
    method public boolean hasNextByte(int);
    method public boolean hasNextDouble();
    method public boolean hasNextFloat();
    method public boolean hasNextInt();
    method public boolean hasNextInt(int);
    method public boolean hasNextLine();
    method public boolean hasNextLong();
    method public boolean hasNextLong(int);
    method public boolean hasNextShort();
    method public boolean hasNextShort(int);
    method public java.io.IOException ioException();
    method public java.util.Locale locale();
    method public java.util.regex.MatchResult match();
    method public java.lang.String next();
    method public java.lang.String next(java.util.regex.Pattern);
    method public java.lang.String next(java.lang.String);
    method public java.math.BigDecimal nextBigDecimal();
    method public java.math.BigInteger nextBigInteger();
    method public java.math.BigInteger nextBigInteger(int);
    method public boolean nextBoolean();
    method public byte nextByte();
    method public byte nextByte(int);
    method public double nextDouble();
    method public float nextFloat();
    method public int nextInt();
    method public int nextInt(int);
    method public java.lang.String nextLine();
    method public long nextLong();
    method public long nextLong(int);
    method public short nextShort();
    method public short nextShort(int);
    method public int radix();
    method public void remove();
    method public java.util.Scanner reset();
    method public java.util.Scanner skip(java.util.regex.Pattern);
    method public java.util.Scanner skip(java.lang.String);
    method public java.util.Scanner useDelimiter(java.util.regex.Pattern);
    method public java.util.Scanner useDelimiter(java.lang.String);
    method public java.util.Scanner useLocale(java.util.Locale);
    method public java.util.Scanner useRadix(int);
  }

  public class ServiceConfigurationError extends java.lang.Error {
    ctor public ServiceConfigurationError(java.lang.String);
    ctor public ServiceConfigurationError(java.lang.String, java.lang.Throwable);
  }

  public final class ServiceLoader implements java.lang.Iterable {
    method public java.util.Iterator<S> iterator();
    method public static java.util.ServiceLoader<S> load(java.lang.Class<S>, java.lang.ClassLoader);
    method public static java.util.ServiceLoader<S> load(java.lang.Class<S>);
    method public static java.util.ServiceLoader<S> loadInstalled(java.lang.Class<S>);
    method public void reload();
  }

  public abstract interface Set implements java.util.Collection {
    method public abstract boolean add(E);
    method public abstract boolean addAll(java.util.Collection<? extends E>);
    method public abstract void clear();
    method public abstract boolean contains(java.lang.Object);
    method public abstract boolean containsAll(java.util.Collection<?>);
    method public abstract boolean equals(java.lang.Object);
    method public abstract int hashCode();
    method public abstract boolean isEmpty();
    method public abstract java.util.Iterator<E> iterator();
    method public abstract boolean remove(java.lang.Object);
    method public abstract boolean removeAll(java.util.Collection<?>);
    method public abstract boolean retainAll(java.util.Collection<?>);
    method public abstract int size();
    method public abstract java.lang.Object[] toArray();
    method public abstract T[] toArray(T[]);
  }

  public class SimpleTimeZone extends java.util.TimeZone {
    ctor public SimpleTimeZone(int, java.lang.String);
    ctor public SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int);
    ctor public SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int, int);
    ctor public SimpleTimeZone(int, java.lang.String, int, int, int, int, int, int, int, int, int, int, int);
    method public int getOffset(int, int, int, int, int, int);
    method public int getRawOffset();
    method public boolean inDaylightTime(java.util.Date);
    method public void setDSTSavings(int);
    method public void setEndRule(int, int, int);
    method public void setEndRule(int, int, int, int);
    method public void setEndRule(int, int, int, int, boolean);
    method public void setRawOffset(int);
    method public void setStartRule(int, int, int);
    method public void setStartRule(int, int, int, int);
    method public void setStartRule(int, int, int, int, boolean);
    method public void setStartYear(int);
    method public boolean useDaylightTime();
    field public static final int STANDARD_TIME = 1; // 0x1
    field public static final int UTC_TIME = 2; // 0x2
    field public static final int WALL_TIME = 0; // 0x0
  }

  public abstract interface SortedMap implements java.util.Map {
    method public abstract java.util.Comparator<? super K> comparator();
    method public abstract K firstKey();
    method public abstract java.util.SortedMap<K, V> headMap(K);
    method public abstract K lastKey();
    method public abstract java.util.SortedMap<K, V> subMap(K, K);
    method public abstract java.util.SortedMap<K, V> tailMap(K);
  }

  public abstract interface SortedSet implements java.util.Set {
    method public abstract java.util.Comparator<? super E> comparator();
    method public abstract E first();
    method public abstract java.util.SortedSet<E> headSet(E);
    method public abstract E last();
    method public abstract java.util.SortedSet<E> subSet(E, E);
    method public abstract java.util.SortedSet<E> tailSet(E);
  }

  public class Stack extends java.util.Vector {
    ctor public Stack();
    method public boolean empty();
    method public synchronized E peek();
    method public synchronized E pop();
    method public E push(E);
    method public synchronized int search(java.lang.Object);
  }

  public class StringTokenizer implements java.util.Enumeration {
    ctor public StringTokenizer(java.lang.String);
    ctor public StringTokenizer(java.lang.String, java.lang.String);
    ctor public StringTokenizer(java.lang.String, java.lang.String, boolean);
    method public int countTokens();
    method public boolean hasMoreElements();
    method public boolean hasMoreTokens();
    method public java.lang.Object nextElement();
    method public java.lang.String nextToken();
    method public java.lang.String nextToken(java.lang.String);
  }

  public abstract class TimeZone implements java.lang.Cloneable java.io.Serializable {
    ctor public TimeZone();
    method public java.lang.Object clone();
    method public static synchronized java.lang.String[] getAvailableIDs();
    method public static synchronized java.lang.String[] getAvailableIDs(int);
    method public int getDSTSavings();
    method public static synchronized java.util.TimeZone getDefault();
    method public final java.lang.String getDisplayName();
    method public final java.lang.String getDisplayName(java.util.Locale);
    method public final java.lang.String getDisplayName(boolean, int);
    method public java.lang.String getDisplayName(boolean, int, java.util.Locale);
    method public java.lang.String getID();
    method public int getOffset(long);
    method public abstract int getOffset(int, int, int, int, int, int);
    method public abstract int getRawOffset();
    method public static synchronized java.util.TimeZone getTimeZone(java.lang.String);
    method public boolean hasSameRules(java.util.TimeZone);
    method public abstract boolean inDaylightTime(java.util.Date);
    method public static synchronized void setDefault(java.util.TimeZone);
    method public void setID(java.lang.String);
    method public abstract void setRawOffset(int);
    method public abstract boolean useDaylightTime();
    field public static final int LONG = 1; // 0x1
    field public static final int SHORT = 0; // 0x0
  }

  public class Timer {
    ctor public Timer(java.lang.String, boolean);
    ctor public Timer(java.lang.String);
    ctor public Timer(boolean);
    ctor public Timer();
    method public void cancel();
    method public int purge();
    method public void schedule(java.util.TimerTask, java.util.Date);
    method public void schedule(java.util.TimerTask, long);
    method public void schedule(java.util.TimerTask, long, long);
    method public void schedule(java.util.TimerTask, java.util.Date, long);
    method public void scheduleAtFixedRate(java.util.TimerTask, long, long);
    method public void scheduleAtFixedRate(java.util.TimerTask, java.util.Date, long);
  }

  public abstract class TimerTask implements java.lang.Runnable {
    ctor protected TimerTask();
    method public boolean cancel();
    method public abstract void run();
    method public long scheduledExecutionTime();
  }

  public class TooManyListenersException extends java.lang.Exception {
    ctor public TooManyListenersException();
    ctor public TooManyListenersException(java.lang.String);
  }

  public class TreeMap extends java.util.AbstractMap implements java.lang.Cloneable java.util.NavigableMap java.io.Serializable java.util.SortedMap {
    ctor public TreeMap();
    ctor public TreeMap(java.util.Map<? extends K, ? extends V>);
    ctor public TreeMap(java.util.Comparator<? super K>);
    ctor public TreeMap(java.util.SortedMap<K, ? extends V>);
    method public java.util.Map.Entry<K, V> ceilingEntry(K);
    method public K ceilingKey(K);
    method public java.lang.Object clone();
    method public java.util.Comparator<? super K> comparator();
    method public java.util.NavigableSet<K> descendingKeySet();
    method public java.util.NavigableMap<K, V> descendingMap();
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public java.util.Map.Entry<K, V> firstEntry();
    method public K firstKey();
    method public java.util.Map.Entry<K, V> floorEntry(K);
    method public K floorKey(K);
    method public java.util.NavigableMap<K, V> headMap(K, boolean);
    method public java.util.SortedMap<K, V> headMap(K);
    method public java.util.Map.Entry<K, V> higherEntry(K);
    method public K higherKey(K);
    method public java.util.Map.Entry<K, V> lastEntry();
    method public K lastKey();
    method public java.util.Map.Entry<K, V> lowerEntry(K);
    method public K lowerKey(K);
    method public java.util.NavigableSet<K> navigableKeySet();
    method public java.util.Map.Entry<K, V> pollFirstEntry();
    method public java.util.Map.Entry<K, V> pollLastEntry();
    method public java.util.NavigableMap<K, V> subMap(K, boolean, K, boolean);
    method public java.util.SortedMap<K, V> subMap(K, K);
    method public java.util.NavigableMap<K, V> tailMap(K, boolean);
    method public java.util.SortedMap<K, V> tailMap(K);
  }

  public class TreeSet extends java.util.AbstractSet implements java.lang.Cloneable java.util.NavigableSet java.io.Serializable {
    ctor public TreeSet();
    ctor public TreeSet(java.util.Collection<? extends E>);
    ctor public TreeSet(java.util.Comparator<? super E>);
    ctor public TreeSet(java.util.SortedSet<E>);
    method public E ceiling(E);
    method public java.lang.Object clone();
    method public java.util.Comparator<? super E> comparator();
    method public java.util.Iterator<E> descendingIterator();
    method public java.util.NavigableSet<E> descendingSet();
    method public E first();
    method public E floor(E);
    method public java.util.NavigableSet<E> headSet(E, boolean);
    method public java.util.SortedSet<E> headSet(E);
    method public E higher(E);
    method public java.util.Iterator<E> iterator();
    method public E last();
    method public E lower(E);
    method public E pollFirst();
    method public E pollLast();
    method public int size();
    method public java.util.NavigableSet<E> subSet(E, boolean, E, boolean);
    method public java.util.SortedSet<E> subSet(E, E);
    method public java.util.NavigableSet<E> tailSet(E, boolean);
    method public java.util.SortedSet<E> tailSet(E);
  }

  public final class UUID implements java.lang.Comparable java.io.Serializable {
    ctor public UUID(long, long);
    method public int clockSequence();
    method public int compareTo(java.util.UUID);
    method public static java.util.UUID fromString(java.lang.String);
    method public long getLeastSignificantBits();
    method public long getMostSignificantBits();
    method public static java.util.UUID nameUUIDFromBytes(byte[]);
    method public long node();
    method public static java.util.UUID randomUUID();
    method public long timestamp();
    method public int variant();
    method public int version();
  }

  public class UnknownFormatConversionException extends java.util.IllegalFormatException {
    ctor public UnknownFormatConversionException(java.lang.String);
    method public java.lang.String getConversion();
  }

  public class UnknownFormatFlagsException extends java.util.IllegalFormatException {
    ctor public UnknownFormatFlagsException(java.lang.String);
    method public java.lang.String getFlags();
  }

  public class Vector extends java.util.AbstractList implements java.lang.Cloneable java.util.List java.util.RandomAccess java.io.Serializable {
    ctor public Vector();
    ctor public Vector(int);
    ctor public Vector(int, int);
    ctor public Vector(java.util.Collection<? extends E>);
    method public synchronized void addElement(E);
    method public synchronized int capacity();
    method public synchronized java.lang.Object clone();
    method public synchronized void copyInto(java.lang.Object[]);
    method public synchronized E elementAt(int);
    method public java.util.Enumeration<E> elements();
    method public synchronized void ensureCapacity(int);
    method public synchronized E firstElement();
    method public E get(int);
    method public synchronized int indexOf(java.lang.Object, int);
    method public synchronized void insertElementAt(E, int);
    method public synchronized E lastElement();
    method public synchronized int lastIndexOf(java.lang.Object, int);
    method public synchronized void removeAllElements();
    method public synchronized boolean removeElement(java.lang.Object);
    method public synchronized void removeElementAt(int);
    method public synchronized void setElementAt(E, int);
    method public synchronized void setSize(int);
    method public synchronized int size();
    method public synchronized void trimToSize();
    field protected int capacityIncrement;
    field protected int elementCount;
    field protected java.lang.Object[] elementData;
  }

  public class WeakHashMap extends java.util.AbstractMap implements java.util.Map {
    ctor public WeakHashMap();
    ctor public WeakHashMap(int);
    ctor public WeakHashMap(int, float);
    ctor public WeakHashMap(java.util.Map<? extends K, ? extends V>);
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
  }

}

package java.util.concurrent {

  public abstract class AbstractExecutorService implements java.util.concurrent.ExecutorService {
    ctor public AbstractExecutorService();
    method public java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.lang.InterruptedException;
    method public java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
    method public T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method protected java.util.concurrent.RunnableFuture<T> newTaskFor(java.lang.Runnable, T);
    method protected java.util.concurrent.RunnableFuture<T> newTaskFor(java.util.concurrent.Callable<T>);
    method public java.util.concurrent.Future<?> submit(java.lang.Runnable);
    method public java.util.concurrent.Future<T> submit(java.lang.Runnable, T);
    method public java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T>);
  }

  public class ArrayBlockingQueue extends java.util.AbstractQueue implements java.util.concurrent.BlockingQueue java.io.Serializable {
    ctor public ArrayBlockingQueue(int);
    ctor public ArrayBlockingQueue(int, boolean);
    ctor public ArrayBlockingQueue(int, boolean, java.util.Collection<? extends E>);
    method public int drainTo(java.util.Collection<? super E>);
    method public int drainTo(java.util.Collection<? super E>, int);
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E peek();
    method public E poll();
    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void put(E) throws java.lang.InterruptedException;
    method public int remainingCapacity();
    method public int size();
    method public E take() throws java.lang.InterruptedException;
  }

  public abstract interface BlockingDeque implements java.util.concurrent.BlockingQueue java.util.Deque {
    method public abstract boolean add(E);
    method public abstract void addFirst(E);
    method public abstract void addLast(E);
    method public abstract boolean contains(java.lang.Object);
    method public abstract E element();
    method public abstract java.util.Iterator<E> iterator();
    method public abstract boolean offer(E);
    method public abstract boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract boolean offerFirst(E);
    method public abstract boolean offerFirst(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract boolean offerLast(E);
    method public abstract boolean offerLast(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract E peek();
    method public abstract E poll();
    method public abstract E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract E pollFirst(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract E pollLast(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract void push(E);
    method public abstract void put(E) throws java.lang.InterruptedException;
    method public abstract void putFirst(E) throws java.lang.InterruptedException;
    method public abstract void putLast(E) throws java.lang.InterruptedException;
    method public abstract E remove();
    method public abstract boolean remove(java.lang.Object);
    method public abstract boolean removeFirstOccurrence(java.lang.Object);
    method public abstract boolean removeLastOccurrence(java.lang.Object);
    method public abstract int size();
    method public abstract E take() throws java.lang.InterruptedException;
    method public abstract E takeFirst() throws java.lang.InterruptedException;
    method public abstract E takeLast() throws java.lang.InterruptedException;
  }

  public abstract interface BlockingQueue implements java.util.Queue {
    method public abstract boolean add(E);
    method public abstract boolean contains(java.lang.Object);
    method public abstract int drainTo(java.util.Collection<? super E>);
    method public abstract int drainTo(java.util.Collection<? super E>, int);
    method public abstract boolean offer(E);
    method public abstract boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract void put(E) throws java.lang.InterruptedException;
    method public abstract int remainingCapacity();
    method public abstract boolean remove(java.lang.Object);
    method public abstract E take() throws java.lang.InterruptedException;
  }

  public class BrokenBarrierException extends java.lang.Exception {
    ctor public BrokenBarrierException();
    ctor public BrokenBarrierException(java.lang.String);
  }

  public abstract interface Callable {
    method public abstract V call() throws java.lang.Exception;
  }

  public class CancellationException extends java.lang.IllegalStateException {
    ctor public CancellationException();
    ctor public CancellationException(java.lang.String);
  }

  public abstract interface CompletionService {
    method public abstract java.util.concurrent.Future<V> poll();
    method public abstract java.util.concurrent.Future<V> poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract java.util.concurrent.Future<V> submit(java.util.concurrent.Callable<V>);
    method public abstract java.util.concurrent.Future<V> submit(java.lang.Runnable, V);
    method public abstract java.util.concurrent.Future<V> take() throws java.lang.InterruptedException;
  }

  public class ConcurrentHashMap extends java.util.AbstractMap implements java.util.concurrent.ConcurrentMap java.io.Serializable {
    ctor public ConcurrentHashMap();
    ctor public ConcurrentHashMap(int);
    ctor public ConcurrentHashMap(java.util.Map<? extends K, ? extends V>);
    ctor public ConcurrentHashMap(int, float);
    ctor public ConcurrentHashMap(int, float, int);
    method public boolean contains(java.lang.Object);
    method public java.util.Enumeration<V> elements();
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public java.util.Enumeration<K> keys();
    method public V putIfAbsent(K, V);
    method public boolean remove(java.lang.Object, java.lang.Object);
    method public boolean replace(K, V, V);
    method public V replace(K, V);
  }

  public class ConcurrentLinkedDeque extends java.util.AbstractCollection implements java.util.Deque java.io.Serializable {
    ctor public ConcurrentLinkedDeque();
    ctor public ConcurrentLinkedDeque(java.util.Collection<? extends E>);
    method public void addFirst(E);
    method public void addLast(E);
    method public java.util.Iterator<E> descendingIterator();
    method public E element();
    method public E getFirst();
    method public E getLast();
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public boolean offerFirst(E);
    method public boolean offerLast(E);
    method public E peek();
    method public E peekFirst();
    method public E peekLast();
    method public E poll();
    method public E pollFirst();
    method public E pollLast();
    method public E pop();
    method public void push(E);
    method public E remove();
    method public E removeFirst();
    method public boolean removeFirstOccurrence(java.lang.Object);
    method public E removeLast();
    method public boolean removeLastOccurrence(java.lang.Object);
    method public int size();
  }

  public class ConcurrentLinkedQueue extends java.util.AbstractQueue implements java.util.Queue java.io.Serializable {
    ctor public ConcurrentLinkedQueue();
    ctor public ConcurrentLinkedQueue(java.util.Collection<? extends E>);
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public E peek();
    method public E poll();
    method public int size();
  }

  public abstract interface ConcurrentMap implements java.util.Map {
    method public abstract V putIfAbsent(K, V);
    method public abstract boolean remove(java.lang.Object, java.lang.Object);
    method public abstract boolean replace(K, V, V);
    method public abstract V replace(K, V);
  }

  public abstract interface ConcurrentNavigableMap implements java.util.concurrent.ConcurrentMap java.util.NavigableMap {
    method public abstract java.util.NavigableSet<K> descendingKeySet();
    method public abstract java.util.concurrent.ConcurrentNavigableMap<K, V> descendingMap();
    method public abstract java.util.concurrent.ConcurrentNavigableMap<K, V> headMap(K, boolean);
    method public abstract java.util.concurrent.ConcurrentNavigableMap<K, V> headMap(K);
    method public abstract java.util.NavigableSet<K> keySet();
    method public abstract java.util.NavigableSet<K> navigableKeySet();
    method public abstract java.util.concurrent.ConcurrentNavigableMap<K, V> subMap(K, boolean, K, boolean);
    method public abstract java.util.concurrent.ConcurrentNavigableMap<K, V> subMap(K, K);
    method public abstract java.util.concurrent.ConcurrentNavigableMap<K, V> tailMap(K, boolean);
    method public abstract java.util.concurrent.ConcurrentNavigableMap<K, V> tailMap(K);
  }

  public class ConcurrentSkipListMap extends java.util.AbstractMap implements java.lang.Cloneable java.util.concurrent.ConcurrentNavigableMap java.io.Serializable {
    ctor public ConcurrentSkipListMap();
    ctor public ConcurrentSkipListMap(java.util.Comparator<? super K>);
    ctor public ConcurrentSkipListMap(java.util.Map<? extends K, ? extends V>);
    ctor public ConcurrentSkipListMap(java.util.SortedMap<K, ? extends V>);
    method public java.util.Map.Entry<K, V> ceilingEntry(K);
    method public K ceilingKey(K);
    method public java.util.concurrent.ConcurrentSkipListMap<K, V> clone();
    method public java.util.Comparator<? super K> comparator();
    method public java.util.NavigableSet<K> descendingKeySet();
    method public java.util.concurrent.ConcurrentNavigableMap<K, V> descendingMap();
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public java.util.Map.Entry<K, V> firstEntry();
    method public K firstKey();
    method public java.util.Map.Entry<K, V> floorEntry(K);
    method public K floorKey(K);
    method public java.util.concurrent.ConcurrentNavigableMap<K, V> headMap(K, boolean);
    method public java.util.concurrent.ConcurrentNavigableMap<K, V> headMap(K);
    method public java.util.Map.Entry<K, V> higherEntry(K);
    method public K higherKey(K);
    method public java.util.Map.Entry<K, V> lastEntry();
    method public K lastKey();
    method public java.util.Map.Entry<K, V> lowerEntry(K);
    method public K lowerKey(K);
    method public java.util.NavigableSet<K> navigableKeySet();
    method public java.util.Map.Entry<K, V> pollFirstEntry();
    method public java.util.Map.Entry<K, V> pollLastEntry();
    method public V putIfAbsent(K, V);
    method public boolean remove(java.lang.Object, java.lang.Object);
    method public boolean replace(K, V, V);
    method public V replace(K, V);
    method public java.util.concurrent.ConcurrentNavigableMap<K, V> subMap(K, boolean, K, boolean);
    method public java.util.concurrent.ConcurrentNavigableMap<K, V> subMap(K, K);
    method public java.util.concurrent.ConcurrentNavigableMap<K, V> tailMap(K, boolean);
    method public java.util.concurrent.ConcurrentNavigableMap<K, V> tailMap(K);
  }

  public class ConcurrentSkipListSet extends java.util.AbstractSet implements java.lang.Cloneable java.util.NavigableSet java.io.Serializable {
    ctor public ConcurrentSkipListSet();
    ctor public ConcurrentSkipListSet(java.util.Comparator<? super E>);
    ctor public ConcurrentSkipListSet(java.util.Collection<? extends E>);
    ctor public ConcurrentSkipListSet(java.util.SortedSet<E>);
    method public E ceiling(E);
    method public java.util.concurrent.ConcurrentSkipListSet<E> clone();
    method public java.util.Comparator<? super E> comparator();
    method public java.util.Iterator<E> descendingIterator();
    method public java.util.NavigableSet<E> descendingSet();
    method public E first();
    method public E floor(E);
    method public java.util.NavigableSet<E> headSet(E, boolean);
    method public java.util.NavigableSet<E> headSet(E);
    method public E higher(E);
    method public java.util.Iterator<E> iterator();
    method public E last();
    method public E lower(E);
    method public E pollFirst();
    method public E pollLast();
    method public int size();
    method public java.util.NavigableSet<E> subSet(E, boolean, E, boolean);
    method public java.util.NavigableSet<E> subSet(E, E);
    method public java.util.NavigableSet<E> tailSet(E, boolean);
    method public java.util.NavigableSet<E> tailSet(E);
  }

  public class CopyOnWriteArrayList implements java.lang.Cloneable java.util.List java.util.RandomAccess java.io.Serializable {
    ctor public CopyOnWriteArrayList();
    ctor public CopyOnWriteArrayList(java.util.Collection<? extends E>);
    ctor public CopyOnWriteArrayList(E[]);
    method public synchronized boolean add(E);
    method public synchronized void add(int, E);
    method public synchronized boolean addAll(java.util.Collection<? extends E>);
    method public synchronized boolean addAll(int, java.util.Collection<? extends E>);
    method public synchronized int addAllAbsent(java.util.Collection<? extends E>);
    method public synchronized boolean addIfAbsent(E);
    method public synchronized void clear();
    method public java.lang.Object clone();
    method public boolean contains(java.lang.Object);
    method public boolean containsAll(java.util.Collection<?>);
    method public E get(int);
    method public int indexOf(E, int);
    method public int indexOf(java.lang.Object);
    method public boolean isEmpty();
    method public java.util.Iterator<E> iterator();
    method public int lastIndexOf(E, int);
    method public int lastIndexOf(java.lang.Object);
    method public java.util.ListIterator<E> listIterator(int);
    method public java.util.ListIterator<E> listIterator();
    method public synchronized E remove(int);
    method public synchronized boolean remove(java.lang.Object);
    method public synchronized boolean removeAll(java.util.Collection<?>);
    method public synchronized boolean retainAll(java.util.Collection<?>);
    method public synchronized E set(int, E);
    method public int size();
    method public java.util.List<E> subList(int, int);
    method public java.lang.Object[] toArray();
    method public T[] toArray(T[]);
  }

  public class CopyOnWriteArraySet extends java.util.AbstractSet implements java.io.Serializable {
    ctor public CopyOnWriteArraySet();
    ctor public CopyOnWriteArraySet(java.util.Collection<? extends E>);
    method public java.util.Iterator<E> iterator();
    method public int size();
  }

  public class CountDownLatch {
    ctor public CountDownLatch(int);
    method public void await() throws java.lang.InterruptedException;
    method public boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void countDown();
    method public long getCount();
  }

  public class CyclicBarrier {
    ctor public CyclicBarrier(int, java.lang.Runnable);
    ctor public CyclicBarrier(int);
    method public int await() throws java.util.concurrent.BrokenBarrierException, java.lang.InterruptedException;
    method public int await(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.BrokenBarrierException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public int getNumberWaiting();
    method public int getParties();
    method public boolean isBroken();
    method public void reset();
  }

  public class DelayQueue extends java.util.AbstractQueue implements java.util.concurrent.BlockingQueue {
    ctor public DelayQueue();
    ctor public DelayQueue(java.util.Collection<? extends E>);
    method public int drainTo(java.util.Collection<? super E>);
    method public int drainTo(java.util.Collection<? super E>, int);
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public boolean offer(E, long, java.util.concurrent.TimeUnit);
    method public E peek();
    method public E poll();
    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void put(E);
    method public int remainingCapacity();
    method public int size();
    method public E take() throws java.lang.InterruptedException;
  }

  public abstract interface Delayed implements java.lang.Comparable {
    method public abstract long getDelay(java.util.concurrent.TimeUnit);
  }

  public class Exchanger {
    ctor public Exchanger();
    method public V exchange(V) throws java.lang.InterruptedException;
    method public V exchange(V, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException;
  }

  public class ExecutionException extends java.lang.Exception {
    ctor protected ExecutionException();
    ctor protected ExecutionException(java.lang.String);
    ctor public ExecutionException(java.lang.String, java.lang.Throwable);
    ctor public ExecutionException(java.lang.Throwable);
  }

  public abstract interface Executor {
    method public abstract void execute(java.lang.Runnable);
  }

  public class ExecutorCompletionService implements java.util.concurrent.CompletionService {
    ctor public ExecutorCompletionService(java.util.concurrent.Executor);
    ctor public ExecutorCompletionService(java.util.concurrent.Executor, java.util.concurrent.BlockingQueue<java.util.concurrent.Future<V>>);
    method public java.util.concurrent.Future<V> poll();
    method public java.util.concurrent.Future<V> poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public java.util.concurrent.Future<V> submit(java.util.concurrent.Callable<V>);
    method public java.util.concurrent.Future<V> submit(java.lang.Runnable, V);
    method public java.util.concurrent.Future<V> take() throws java.lang.InterruptedException;
  }

  public abstract interface ExecutorService implements java.util.concurrent.Executor {
    method public abstract boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.lang.InterruptedException;
    method public abstract java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
    method public abstract T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public abstract boolean isShutdown();
    method public abstract boolean isTerminated();
    method public abstract void shutdown();
    method public abstract java.util.List<java.lang.Runnable> shutdownNow();
    method public abstract java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T>);
    method public abstract java.util.concurrent.Future<T> submit(java.lang.Runnable, T);
    method public abstract java.util.concurrent.Future<?> submit(java.lang.Runnable);
  }

  public class Executors {
    method public static java.util.concurrent.Callable<T> callable(java.lang.Runnable, T);
    method public static java.util.concurrent.Callable<java.lang.Object> callable(java.lang.Runnable);
    method public static java.util.concurrent.Callable<java.lang.Object> callable(java.security.PrivilegedAction<?>);
    method public static java.util.concurrent.Callable<java.lang.Object> callable(java.security.PrivilegedExceptionAction<?>);
    method public static java.util.concurrent.ThreadFactory defaultThreadFactory();
    method public static java.util.concurrent.ExecutorService newCachedThreadPool();
    method public static java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory);
    method public static java.util.concurrent.ExecutorService newFixedThreadPool(int);
    method public static java.util.concurrent.ExecutorService newFixedThreadPool(int, java.util.concurrent.ThreadFactory);
    method public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int);
    method public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int, java.util.concurrent.ThreadFactory);
    method public static java.util.concurrent.ExecutorService newSingleThreadExecutor();
    method public static java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory);
    method public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor();
    method public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory);
    method public static java.util.concurrent.Callable<T> privilegedCallable(java.util.concurrent.Callable<T>);
    method public static java.util.concurrent.Callable<T> privilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable<T>);
    method public static java.util.concurrent.ThreadFactory privilegedThreadFactory();
    method public static java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService);
    method public static java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService);
  }

  public class ForkJoinPool extends java.util.concurrent.AbstractExecutorService {
    ctor public ForkJoinPool();
    ctor public ForkJoinPool(int);
    ctor public ForkJoinPool(int, java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory, java.lang.Thread.UncaughtExceptionHandler, boolean);
    method public boolean awaitQuiescence(long, java.util.concurrent.TimeUnit);
    method public boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method protected int drainTasksTo(java.util.Collection<? super java.util.concurrent.ForkJoinTask<?>>);
    method public void execute(java.util.concurrent.ForkJoinTask<?>);
    method public void execute(java.lang.Runnable);
    method public int getActiveThreadCount();
    method public boolean getAsyncMode();
    method public java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory getFactory();
    method public int getParallelism();
    method public int getPoolSize();
    method public int getQueuedSubmissionCount();
    method public long getQueuedTaskCount();
    method public int getRunningThreadCount();
    method public long getStealCount();
    method public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler();
    method public boolean hasQueuedSubmissions();
    method public T invoke(java.util.concurrent.ForkJoinTask<T>);
    method public boolean isQuiescent();
    method public boolean isShutdown();
    method public boolean isTerminated();
    method public boolean isTerminating();
    method public static void managedBlock(java.util.concurrent.ForkJoinPool.ManagedBlocker) throws java.lang.InterruptedException;
    method protected java.util.concurrent.ForkJoinTask<?> pollSubmission();
    method public void shutdown();
    method public java.util.List<java.lang.Runnable> shutdownNow();
    method public java.util.concurrent.ForkJoinTask<T> submit(java.util.concurrent.ForkJoinTask<T>);
    field public static final java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory defaultForkJoinWorkerThreadFactory;
  }

  public static abstract interface ForkJoinPool.ForkJoinWorkerThreadFactory {
    method public abstract java.util.concurrent.ForkJoinWorkerThread newThread(java.util.concurrent.ForkJoinPool);
  }

  public static abstract interface ForkJoinPool.ManagedBlocker {
    method public abstract boolean block() throws java.lang.InterruptedException;
    method public abstract boolean isReleasable();
  }

  public abstract class ForkJoinTask implements java.util.concurrent.Future java.io.Serializable {
    ctor public ForkJoinTask();
    method public static java.util.concurrent.ForkJoinTask<?> adapt(java.lang.Runnable);
    method public static java.util.concurrent.ForkJoinTask<T> adapt(java.lang.Runnable, T);
    method public static java.util.concurrent.ForkJoinTask<T> adapt(java.util.concurrent.Callable<? extends T>);
    method public boolean cancel(boolean);
    method public void complete(V);
    method public void completeExceptionally(java.lang.Throwable);
    method protected abstract boolean exec();
    method public final java.util.concurrent.ForkJoinTask<V> fork();
    method public final V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
    method public final V get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public final java.lang.Throwable getException();
    method public static java.util.concurrent.ForkJoinPool getPool();
    method public static int getQueuedTaskCount();
    method public abstract V getRawResult();
    method public static int getSurplusQueuedTaskCount();
    method public static void helpQuiesce();
    method public static boolean inForkJoinPool();
    method public final V invoke();
    method public static void invokeAll(java.util.concurrent.ForkJoinTask<?>, java.util.concurrent.ForkJoinTask<?>);
    method public static void invokeAll(java.util.concurrent.ForkJoinTask<?>...);
    method public static java.util.Collection<T> invokeAll(java.util.Collection<T>);
    method public final boolean isCancelled();
    method public final boolean isCompletedAbnormally();
    method public final boolean isCompletedNormally();
    method public final boolean isDone();
    method public final V join();
    method protected static java.util.concurrent.ForkJoinTask<?> peekNextLocalTask();
    method protected static java.util.concurrent.ForkJoinTask<?> pollNextLocalTask();
    method protected static java.util.concurrent.ForkJoinTask<?> pollTask();
    method public final void quietlyInvoke();
    method public final void quietlyJoin();
    method public void reinitialize();
    method protected abstract void setRawResult(V);
    method public boolean tryUnfork();
  }

  public class ForkJoinWorkerThread extends java.lang.Thread {
    ctor protected ForkJoinWorkerThread(java.util.concurrent.ForkJoinPool);
    method public java.util.concurrent.ForkJoinPool getPool();
    method public int getPoolIndex();
    method protected void onStart();
    method protected void onTermination(java.lang.Throwable);
  }

  public abstract interface Future {
    method public abstract boolean cancel(boolean);
    method public abstract V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
    method public abstract V get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public abstract boolean isCancelled();
    method public abstract boolean isDone();
  }

  public class FutureTask implements java.util.concurrent.RunnableFuture {
    ctor public FutureTask(java.util.concurrent.Callable<V>);
    ctor public FutureTask(java.lang.Runnable, V);
    method public boolean cancel(boolean);
    method protected void done();
    method public V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
    method public V get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public boolean isCancelled();
    method public boolean isDone();
    method public void run();
    method protected boolean runAndReset();
    method protected void set(V);
    method protected void setException(java.lang.Throwable);
  }

  public class LinkedBlockingDeque extends java.util.AbstractQueue implements java.util.concurrent.BlockingDeque java.io.Serializable {
    ctor public LinkedBlockingDeque();
    ctor public LinkedBlockingDeque(int);
    ctor public LinkedBlockingDeque(java.util.Collection<? extends E>);
    method public void addFirst(E);
    method public void addLast(E);
    method public java.util.Iterator<E> descendingIterator();
    method public int drainTo(java.util.Collection<? super E>);
    method public int drainTo(java.util.Collection<? super E>, int);
    method public E getFirst();
    method public E getLast();
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public boolean offerFirst(E);
    method public boolean offerFirst(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public boolean offerLast(E);
    method public boolean offerLast(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E peek();
    method public E peekFirst();
    method public E peekLast();
    method public E poll();
    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E pollFirst();
    method public E pollFirst(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E pollLast();
    method public E pollLast(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E pop();
    method public void push(E);
    method public void put(E) throws java.lang.InterruptedException;
    method public void putFirst(E) throws java.lang.InterruptedException;
    method public void putLast(E) throws java.lang.InterruptedException;
    method public int remainingCapacity();
    method public E removeFirst();
    method public boolean removeFirstOccurrence(java.lang.Object);
    method public E removeLast();
    method public boolean removeLastOccurrence(java.lang.Object);
    method public int size();
    method public E take() throws java.lang.InterruptedException;
    method public E takeFirst() throws java.lang.InterruptedException;
    method public E takeLast() throws java.lang.InterruptedException;
  }

  public class LinkedBlockingQueue extends java.util.AbstractQueue implements java.util.concurrent.BlockingQueue java.io.Serializable {
    ctor public LinkedBlockingQueue();
    ctor public LinkedBlockingQueue(int);
    ctor public LinkedBlockingQueue(java.util.Collection<? extends E>);
    method public int drainTo(java.util.Collection<? super E>);
    method public int drainTo(java.util.Collection<? super E>, int);
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public boolean offer(E);
    method public E peek();
    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E poll();
    method public void put(E) throws java.lang.InterruptedException;
    method public int remainingCapacity();
    method public int size();
    method public E take() throws java.lang.InterruptedException;
  }

  public class LinkedTransferQueue extends java.util.AbstractQueue implements java.io.Serializable java.util.concurrent.TransferQueue {
    ctor public LinkedTransferQueue();
    ctor public LinkedTransferQueue(java.util.Collection<? extends E>);
    method public int drainTo(java.util.Collection<? super E>);
    method public int drainTo(java.util.Collection<? super E>, int);
    method public int getWaitingConsumerCount();
    method public boolean hasWaitingConsumer();
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E, long, java.util.concurrent.TimeUnit);
    method public boolean offer(E);
    method public E peek();
    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E poll();
    method public void put(E);
    method public int remainingCapacity();
    method public int size();
    method public E take() throws java.lang.InterruptedException;
    method public void transfer(E) throws java.lang.InterruptedException;
    method public boolean tryTransfer(E);
    method public boolean tryTransfer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
  }

  public class Phaser {
    ctor public Phaser();
    ctor public Phaser(int);
    ctor public Phaser(java.util.concurrent.Phaser);
    ctor public Phaser(java.util.concurrent.Phaser, int);
    method public int arrive();
    method public int arriveAndAwaitAdvance();
    method public int arriveAndDeregister();
    method public int awaitAdvance(int);
    method public int awaitAdvanceInterruptibly(int) throws java.lang.InterruptedException;
    method public int awaitAdvanceInterruptibly(int, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public int bulkRegister(int);
    method public void forceTermination();
    method public int getArrivedParties();
    method public java.util.concurrent.Phaser getParent();
    method public final int getPhase();
    method public int getRegisteredParties();
    method public java.util.concurrent.Phaser getRoot();
    method public int getUnarrivedParties();
    method public boolean isTerminated();
    method protected boolean onAdvance(int, int);
    method public int register();
  }

  public class PriorityBlockingQueue extends java.util.AbstractQueue implements java.util.concurrent.BlockingQueue java.io.Serializable {
    ctor public PriorityBlockingQueue();
    ctor public PriorityBlockingQueue(int);
    ctor public PriorityBlockingQueue(int, java.util.Comparator<? super E>);
    ctor public PriorityBlockingQueue(java.util.Collection<? extends E>);
    method public java.util.Comparator<? super E> comparator();
    method public int drainTo(java.util.Collection<? super E>);
    method public int drainTo(java.util.Collection<? super E>, int);
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E);
    method public boolean offer(E, long, java.util.concurrent.TimeUnit);
    method public E peek();
    method public E poll();
    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void put(E);
    method public int remainingCapacity();
    method public int size();
    method public E take() throws java.lang.InterruptedException;
  }

  public abstract class RecursiveAction extends java.util.concurrent.ForkJoinTask {
    ctor public RecursiveAction();
    method protected abstract void compute();
    method protected final boolean exec();
    method public final java.lang.Void getRawResult();
    method protected final void setRawResult(java.lang.Void);
  }

  public abstract class RecursiveTask extends java.util.concurrent.ForkJoinTask {
    ctor public RecursiveTask();
    method protected abstract V compute();
    method protected final boolean exec();
    method public final V getRawResult();
    method protected final void setRawResult(V);
  }

  public class RejectedExecutionException extends java.lang.RuntimeException {
    ctor public RejectedExecutionException();
    ctor public RejectedExecutionException(java.lang.String);
    ctor public RejectedExecutionException(java.lang.String, java.lang.Throwable);
    ctor public RejectedExecutionException(java.lang.Throwable);
  }

  public abstract interface RejectedExecutionHandler {
    method public abstract void rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor);
  }

  public abstract interface RunnableFuture implements java.util.concurrent.Future java.lang.Runnable {
    method public abstract void run();
  }

  public abstract interface RunnableScheduledFuture implements java.util.concurrent.RunnableFuture java.util.concurrent.ScheduledFuture {
    method public abstract boolean isPeriodic();
  }

  public abstract interface ScheduledExecutorService implements java.util.concurrent.ExecutorService {
    method public abstract java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit);
    method public abstract java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V>, long, java.util.concurrent.TimeUnit);
    method public abstract java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit);
    method public abstract java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit);
  }

  public abstract interface ScheduledFuture implements java.util.concurrent.Delayed java.util.concurrent.Future {
  }

  public class ScheduledThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor implements java.util.concurrent.ScheduledExecutorService {
    ctor public ScheduledThreadPoolExecutor(int);
    ctor public ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory);
    ctor public ScheduledThreadPoolExecutor(int, java.util.concurrent.RejectedExecutionHandler);
    ctor public ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler);
    method protected java.util.concurrent.RunnableScheduledFuture<V> decorateTask(java.lang.Runnable, java.util.concurrent.RunnableScheduledFuture<V>);
    method protected java.util.concurrent.RunnableScheduledFuture<V> decorateTask(java.util.concurrent.Callable<V>, java.util.concurrent.RunnableScheduledFuture<V>);
    method public boolean getContinueExistingPeriodicTasksAfterShutdownPolicy();
    method public boolean getExecuteExistingDelayedTasksAfterShutdownPolicy();
    method public boolean getRemoveOnCancelPolicy();
    method public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit);
    method public java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V>, long, java.util.concurrent.TimeUnit);
    method public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit);
    method public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit);
    method public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean);
    method public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean);
    method public void setRemoveOnCancelPolicy(boolean);
  }

  public class Semaphore implements java.io.Serializable {
    ctor public Semaphore(int);
    ctor public Semaphore(int, boolean);
    method public void acquire() throws java.lang.InterruptedException;
    method public void acquire(int) throws java.lang.InterruptedException;
    method public void acquireUninterruptibly();
    method public void acquireUninterruptibly(int);
    method public int availablePermits();
    method public int drainPermits();
    method public final int getQueueLength();
    method protected java.util.Collection<java.lang.Thread> getQueuedThreads();
    method public final boolean hasQueuedThreads();
    method public boolean isFair();
    method protected void reducePermits(int);
    method public void release();
    method public void release(int);
    method public boolean tryAcquire();
    method public boolean tryAcquire(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public boolean tryAcquire(int);
    method public boolean tryAcquire(int, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
  }

  public class SynchronousQueue extends java.util.AbstractQueue implements java.util.concurrent.BlockingQueue java.io.Serializable {
    ctor public SynchronousQueue();
    ctor public SynchronousQueue(boolean);
    method public int drainTo(java.util.Collection<? super E>);
    method public int drainTo(java.util.Collection<? super E>, int);
    method public java.util.Iterator<E> iterator();
    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public boolean offer(E);
    method public E peek();
    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public E poll();
    method public void put(E) throws java.lang.InterruptedException;
    method public int remainingCapacity();
    method public int size();
    method public E take() throws java.lang.InterruptedException;
  }

  public abstract interface ThreadFactory {
    method public abstract java.lang.Thread newThread(java.lang.Runnable);
  }

  public class ThreadLocalRandom extends java.util.Random {
    method public static java.util.concurrent.ThreadLocalRandom current();
    method public double nextDouble(double);
    method public double nextDouble(double, double);
    method public int nextInt(int, int);
    method public long nextLong(long);
    method public long nextLong(long, long);
  }

  public class ThreadPoolExecutor extends java.util.concurrent.AbstractExecutorService {
    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>);
    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.ThreadFactory);
    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.RejectedExecutionHandler);
    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler);
    method protected void afterExecute(java.lang.Runnable, java.lang.Throwable);
    method public void allowCoreThreadTimeOut(boolean);
    method public boolean allowsCoreThreadTimeOut();
    method public boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method protected void beforeExecute(java.lang.Thread, java.lang.Runnable);
    method public void execute(java.lang.Runnable);
    method public int getActiveCount();
    method public long getCompletedTaskCount();
    method public int getCorePoolSize();
    method public long getKeepAliveTime(java.util.concurrent.TimeUnit);
    method public int getLargestPoolSize();
    method public int getMaximumPoolSize();
    method public int getPoolSize();
    method public java.util.concurrent.BlockingQueue<java.lang.Runnable> getQueue();
    method public java.util.concurrent.RejectedExecutionHandler getRejectedExecutionHandler();
    method public long getTaskCount();
    method public java.util.concurrent.ThreadFactory getThreadFactory();
    method public boolean isShutdown();
    method public boolean isTerminated();
    method public boolean isTerminating();
    method public int prestartAllCoreThreads();
    method public boolean prestartCoreThread();
    method public void purge();
    method public boolean remove(java.lang.Runnable);
    method public void setCorePoolSize(int);
    method public void setKeepAliveTime(long, java.util.concurrent.TimeUnit);
    method public void setMaximumPoolSize(int);
    method public void setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler);
    method public void setThreadFactory(java.util.concurrent.ThreadFactory);
    method public void shutdown();
    method public java.util.List<java.lang.Runnable> shutdownNow();
    method protected void terminated();
  }

  public static class ThreadPoolExecutor.AbortPolicy implements java.util.concurrent.RejectedExecutionHandler {
    ctor public ThreadPoolExecutor.AbortPolicy();
    method public void rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor);
  }

  public static class ThreadPoolExecutor.CallerRunsPolicy implements java.util.concurrent.RejectedExecutionHandler {
    ctor public ThreadPoolExecutor.CallerRunsPolicy();
    method public void rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor);
  }

  public static class ThreadPoolExecutor.DiscardOldestPolicy implements java.util.concurrent.RejectedExecutionHandler {
    ctor public ThreadPoolExecutor.DiscardOldestPolicy();
    method public void rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor);
  }

  public static class ThreadPoolExecutor.DiscardPolicy implements java.util.concurrent.RejectedExecutionHandler {
    ctor public ThreadPoolExecutor.DiscardPolicy();
    method public void rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor);
  }

  public class TimeUnit extends java.lang.Enum {
    method public long convert(long, java.util.concurrent.TimeUnit);
    method public void sleep(long) throws java.lang.InterruptedException;
    method public void timedJoin(java.lang.Thread, long) throws java.lang.InterruptedException;
    method public void timedWait(java.lang.Object, long) throws java.lang.InterruptedException;
    method public long toDays(long);
    method public long toHours(long);
    method public long toMicros(long);
    method public long toMillis(long);
    method public long toMinutes(long);
    method public long toNanos(long);
    method public long toSeconds(long);
    method public static java.util.concurrent.TimeUnit valueOf(java.lang.String);
    method public static final java.util.concurrent.TimeUnit[] values();
    enum_constant public static final java.util.concurrent.TimeUnit DAYS;
    enum_constant public static final java.util.concurrent.TimeUnit HOURS;
    enum_constant public static final java.util.concurrent.TimeUnit MICROSECONDS;
    enum_constant public static final java.util.concurrent.TimeUnit MILLISECONDS;
    enum_constant public static final java.util.concurrent.TimeUnit MINUTES;
    enum_constant public static final java.util.concurrent.TimeUnit NANOSECONDS;
    enum_constant public static final java.util.concurrent.TimeUnit SECONDS;
  }

  public class TimeoutException extends java.lang.Exception {
    ctor public TimeoutException();
    ctor public TimeoutException(java.lang.String);
  }

  public abstract interface TransferQueue implements java.util.concurrent.BlockingQueue {
    method public abstract int getWaitingConsumerCount();
    method public abstract boolean hasWaitingConsumer();
    method public abstract void transfer(E) throws java.lang.InterruptedException;
    method public abstract boolean tryTransfer(E);
    method public abstract boolean tryTransfer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
  }

}

package java.util.concurrent.atomic {

  public class AtomicBoolean implements java.io.Serializable {
    ctor public AtomicBoolean(boolean);
    ctor public AtomicBoolean();
    method public final boolean compareAndSet(boolean, boolean);
    method public final boolean get();
    method public final boolean getAndSet(boolean);
    method public final void lazySet(boolean);
    method public final void set(boolean);
    method public boolean weakCompareAndSet(boolean, boolean);
  }

  public class AtomicInteger extends java.lang.Number implements java.io.Serializable {
    ctor public AtomicInteger(int);
    ctor public AtomicInteger();
    method public final int addAndGet(int);
    method public final boolean compareAndSet(int, int);
    method public final int decrementAndGet();
    method public double doubleValue();
    method public float floatValue();
    method public final int get();
    method public final int getAndAdd(int);
    method public final int getAndDecrement();
    method public final int getAndIncrement();
    method public final int getAndSet(int);
    method public final int incrementAndGet();
    method public int intValue();
    method public final void lazySet(int);
    method public long longValue();
    method public final void set(int);
    method public final boolean weakCompareAndSet(int, int);
  }

  public class AtomicIntegerArray implements java.io.Serializable {
    ctor public AtomicIntegerArray(int);
    ctor public AtomicIntegerArray(int[]);
    method public final int addAndGet(int, int);
    method public final boolean compareAndSet(int, int, int);
    method public final int decrementAndGet(int);
    method public final int get(int);
    method public final int getAndAdd(int, int);
    method public final int getAndDecrement(int);
    method public final int getAndIncrement(int);
    method public final int getAndSet(int, int);
    method public final int incrementAndGet(int);
    method public final void lazySet(int, int);
    method public final int length();
    method public final void set(int, int);
    method public final boolean weakCompareAndSet(int, int, int);
  }

  public abstract class AtomicIntegerFieldUpdater {
    ctor protected AtomicIntegerFieldUpdater();
    method public int addAndGet(T, int);
    method public abstract boolean compareAndSet(T, int, int);
    method public int decrementAndGet(T);
    method public abstract int get(T);
    method public int getAndAdd(T, int);
    method public int getAndDecrement(T);
    method public int getAndIncrement(T);
    method public int getAndSet(T, int);
    method public int incrementAndGet(T);
    method public abstract void lazySet(T, int);
    method public static java.util.concurrent.atomic.AtomicIntegerFieldUpdater<U> newUpdater(java.lang.Class<U>, java.lang.String);
    method public abstract void set(T, int);
    method public abstract boolean weakCompareAndSet(T, int, int);
  }

  public class AtomicLong extends java.lang.Number implements java.io.Serializable {
    ctor public AtomicLong(long);
    ctor public AtomicLong();
    method public final long addAndGet(long);
    method public final boolean compareAndSet(long, long);
    method public final long decrementAndGet();
    method public double doubleValue();
    method public float floatValue();
    method public final long get();
    method public final long getAndAdd(long);
    method public final long getAndDecrement();
    method public final long getAndIncrement();
    method public final long getAndSet(long);
    method public final long incrementAndGet();
    method public int intValue();
    method public final void lazySet(long);
    method public long longValue();
    method public final void set(long);
    method public final boolean weakCompareAndSet(long, long);
  }

  public class AtomicLongArray implements java.io.Serializable {
    ctor public AtomicLongArray(int);
    ctor public AtomicLongArray(long[]);
    method public long addAndGet(int, long);
    method public final boolean compareAndSet(int, long, long);
    method public final long decrementAndGet(int);
    method public final long get(int);
    method public final long getAndAdd(int, long);
    method public final long getAndDecrement(int);
    method public final long getAndIncrement(int);
    method public final long getAndSet(int, long);
    method public final long incrementAndGet(int);
    method public final void lazySet(int, long);
    method public final int length();
    method public final void set(int, long);
    method public final boolean weakCompareAndSet(int, long, long);
  }

  public abstract class AtomicLongFieldUpdater {
    ctor protected AtomicLongFieldUpdater();
    method public long addAndGet(T, long);
    method public abstract boolean compareAndSet(T, long, long);
    method public long decrementAndGet(T);
    method public abstract long get(T);
    method public long getAndAdd(T, long);
    method public long getAndDecrement(T);
    method public long getAndIncrement(T);
    method public long getAndSet(T, long);
    method public long incrementAndGet(T);
    method public abstract void lazySet(T, long);
    method public static java.util.concurrent.atomic.AtomicLongFieldUpdater<U> newUpdater(java.lang.Class<U>, java.lang.String);
    method public abstract void set(T, long);
    method public abstract boolean weakCompareAndSet(T, long, long);
  }

  public class AtomicMarkableReference {
    ctor public AtomicMarkableReference(V, boolean);
    method public boolean attemptMark(V, boolean);
    method public boolean compareAndSet(V, V, boolean, boolean);
    method public V get(boolean[]);
    method public V getReference();
    method public boolean isMarked();
    method public void set(V, boolean);
    method public boolean weakCompareAndSet(V, V, boolean, boolean);
  }

  public class AtomicReference implements java.io.Serializable {
    ctor public AtomicReference(V);
    ctor public AtomicReference();
    method public final boolean compareAndSet(V, V);
    method public final V get();
    method public final V getAndSet(V);
    method public final void lazySet(V);
    method public final void set(V);
    method public final boolean weakCompareAndSet(V, V);
  }

  public class AtomicReferenceArray implements java.io.Serializable {
    ctor public AtomicReferenceArray(int);
    ctor public AtomicReferenceArray(E[]);
    method public final boolean compareAndSet(int, E, E);
    method public final E get(int);
    method public final E getAndSet(int, E);
    method public final void lazySet(int, E);
    method public final int length();
    method public final void set(int, E);
    method public final boolean weakCompareAndSet(int, E, E);
  }

  public abstract class AtomicReferenceFieldUpdater {
    ctor protected AtomicReferenceFieldUpdater();
    method public abstract boolean compareAndSet(T, V, V);
    method public abstract V get(T);
    method public V getAndSet(T, V);
    method public abstract void lazySet(T, V);
    method public static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<U, W> newUpdater(java.lang.Class<U>, java.lang.Class<W>, java.lang.String);
    method public abstract void set(T, V);
    method public abstract boolean weakCompareAndSet(T, V, V);
  }

  public class AtomicStampedReference {
    ctor public AtomicStampedReference(V, int);
    method public boolean attemptStamp(V, int);
    method public boolean compareAndSet(V, V, int, int);
    method public V get(int[]);
    method public V getReference();
    method public int getStamp();
    method public void set(V, int);
    method public boolean weakCompareAndSet(V, V, int, int);
  }

}

package java.util.concurrent.locks {

  public abstract class AbstractOwnableSynchronizer implements java.io.Serializable {
    ctor protected AbstractOwnableSynchronizer();
    method protected final java.lang.Thread getExclusiveOwnerThread();
    method protected final void setExclusiveOwnerThread(java.lang.Thread);
  }

  public abstract class AbstractQueuedLongSynchronizer extends java.util.concurrent.locks.AbstractOwnableSynchronizer implements java.io.Serializable {
    ctor protected AbstractQueuedLongSynchronizer();
    method public final void acquire(long);
    method public final void acquireInterruptibly(long) throws java.lang.InterruptedException;
    method public final void acquireShared(long);
    method public final void acquireSharedInterruptibly(long) throws java.lang.InterruptedException;
    method protected final boolean compareAndSetState(long, long);
    method public final java.util.Collection<java.lang.Thread> getExclusiveQueuedThreads();
    method public final java.lang.Thread getFirstQueuedThread();
    method public final int getQueueLength();
    method public final java.util.Collection<java.lang.Thread> getQueuedThreads();
    method public final java.util.Collection<java.lang.Thread> getSharedQueuedThreads();
    method protected final long getState();
    method public final int getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
    method public final java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
    method public final boolean hasContended();
    method public final boolean hasQueuedPredecessors();
    method public final boolean hasQueuedThreads();
    method public final boolean hasWaiters(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
    method protected boolean isHeldExclusively();
    method public final boolean isQueued(java.lang.Thread);
    method public final boolean owns(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
    method public final boolean release(long);
    method public final boolean releaseShared(long);
    method protected final void setState(long);
    method protected boolean tryAcquire(long);
    method public final boolean tryAcquireNanos(long, long) throws java.lang.InterruptedException;
    method protected long tryAcquireShared(long);
    method public final boolean tryAcquireSharedNanos(long, long) throws java.lang.InterruptedException;
    method protected boolean tryRelease(long);
    method protected boolean tryReleaseShared(long);
  }

  public class AbstractQueuedLongSynchronizer.ConditionObject implements java.util.concurrent.locks.Condition java.io.Serializable {
    ctor public AbstractQueuedLongSynchronizer.ConditionObject();
    method public final void await() throws java.lang.InterruptedException;
    method public final boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public final long awaitNanos(long) throws java.lang.InterruptedException;
    method public final void awaitUninterruptibly();
    method public final boolean awaitUntil(java.util.Date) throws java.lang.InterruptedException;
    method protected final int getWaitQueueLength();
    method protected final java.util.Collection<java.lang.Thread> getWaitingThreads();
    method protected final boolean hasWaiters();
    method public final void signal();
    method public final void signalAll();
  }

  public abstract class AbstractQueuedSynchronizer extends java.util.concurrent.locks.AbstractOwnableSynchronizer implements java.io.Serializable {
    ctor protected AbstractQueuedSynchronizer();
    method public final void acquire(int);
    method public final void acquireInterruptibly(int) throws java.lang.InterruptedException;
    method public final void acquireShared(int);
    method public final void acquireSharedInterruptibly(int) throws java.lang.InterruptedException;
    method protected final boolean compareAndSetState(int, int);
    method public final java.util.Collection<java.lang.Thread> getExclusiveQueuedThreads();
    method public final java.lang.Thread getFirstQueuedThread();
    method public final int getQueueLength();
    method public final java.util.Collection<java.lang.Thread> getQueuedThreads();
    method public final java.util.Collection<java.lang.Thread> getSharedQueuedThreads();
    method protected final int getState();
    method public final int getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
    method public final java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
    method public final boolean hasContended();
    method public final boolean hasQueuedPredecessors();
    method public final boolean hasQueuedThreads();
    method public final boolean hasWaiters(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
    method protected boolean isHeldExclusively();
    method public final boolean isQueued(java.lang.Thread);
    method public final boolean owns(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
    method public final boolean release(int);
    method public final boolean releaseShared(int);
    method protected final void setState(int);
    method protected boolean tryAcquire(int);
    method public final boolean tryAcquireNanos(int, long) throws java.lang.InterruptedException;
    method protected int tryAcquireShared(int);
    method public final boolean tryAcquireSharedNanos(int, long) throws java.lang.InterruptedException;
    method protected boolean tryRelease(int);
    method protected boolean tryReleaseShared(int);
  }

  public class AbstractQueuedSynchronizer.ConditionObject implements java.util.concurrent.locks.Condition java.io.Serializable {
    ctor public AbstractQueuedSynchronizer.ConditionObject();
    method public final void await() throws java.lang.InterruptedException;
    method public final boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public final long awaitNanos(long) throws java.lang.InterruptedException;
    method public final void awaitUninterruptibly();
    method public final boolean awaitUntil(java.util.Date) throws java.lang.InterruptedException;
    method protected final int getWaitQueueLength();
    method protected final java.util.Collection<java.lang.Thread> getWaitingThreads();
    method protected final boolean hasWaiters();
    method public final void signal();
    method public final void signalAll();
  }

  public abstract interface Condition {
    method public abstract void await() throws java.lang.InterruptedException;
    method public abstract boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract long awaitNanos(long) throws java.lang.InterruptedException;
    method public abstract void awaitUninterruptibly();
    method public abstract boolean awaitUntil(java.util.Date) throws java.lang.InterruptedException;
    method public abstract void signal();
    method public abstract void signalAll();
  }

  public abstract interface Lock {
    method public abstract void lock();
    method public abstract void lockInterruptibly() throws java.lang.InterruptedException;
    method public abstract java.util.concurrent.locks.Condition newCondition();
    method public abstract boolean tryLock();
    method public abstract boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public abstract void unlock();
  }

  public class LockSupport {
    method public static java.lang.Object getBlocker(java.lang.Thread);
    method public static void park(java.lang.Object);
    method public static void park();
    method public static void parkNanos(java.lang.Object, long);
    method public static void parkNanos(long);
    method public static void parkUntil(java.lang.Object, long);
    method public static void parkUntil(long);
    method public static void unpark(java.lang.Thread);
  }

  public abstract interface ReadWriteLock {
    method public abstract java.util.concurrent.locks.Lock readLock();
    method public abstract java.util.concurrent.locks.Lock writeLock();
  }

  public class ReentrantLock implements java.util.concurrent.locks.Lock java.io.Serializable {
    ctor public ReentrantLock();
    ctor public ReentrantLock(boolean);
    method public int getHoldCount();
    method protected java.lang.Thread getOwner();
    method public final int getQueueLength();
    method protected java.util.Collection<java.lang.Thread> getQueuedThreads();
    method public int getWaitQueueLength(java.util.concurrent.locks.Condition);
    method protected java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.Condition);
    method public final boolean hasQueuedThread(java.lang.Thread);
    method public final boolean hasQueuedThreads();
    method public boolean hasWaiters(java.util.concurrent.locks.Condition);
    method public final boolean isFair();
    method public boolean isHeldByCurrentThread();
    method public boolean isLocked();
    method public void lock();
    method public void lockInterruptibly() throws java.lang.InterruptedException;
    method public java.util.concurrent.locks.Condition newCondition();
    method public boolean tryLock();
    method public boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void unlock();
  }

  public class ReentrantReadWriteLock implements java.util.concurrent.locks.ReadWriteLock java.io.Serializable {
    ctor public ReentrantReadWriteLock();
    ctor public ReentrantReadWriteLock(boolean);
    method protected java.lang.Thread getOwner();
    method public final int getQueueLength();
    method protected java.util.Collection<java.lang.Thread> getQueuedReaderThreads();
    method protected java.util.Collection<java.lang.Thread> getQueuedThreads();
    method protected java.util.Collection<java.lang.Thread> getQueuedWriterThreads();
    method public int getReadHoldCount();
    method public int getReadLockCount();
    method public int getWaitQueueLength(java.util.concurrent.locks.Condition);
    method protected java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.Condition);
    method public int getWriteHoldCount();
    method public final boolean hasQueuedThread(java.lang.Thread);
    method public final boolean hasQueuedThreads();
    method public boolean hasWaiters(java.util.concurrent.locks.Condition);
    method public final boolean isFair();
    method public boolean isWriteLocked();
    method public boolean isWriteLockedByCurrentThread();
    method public java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock readLock();
    method public java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock writeLock();
  }

  public static class ReentrantReadWriteLock.ReadLock implements java.util.concurrent.locks.Lock java.io.Serializable {
    ctor protected ReentrantReadWriteLock.ReadLock(java.util.concurrent.locks.ReentrantReadWriteLock);
    method public void lock();
    method public void lockInterruptibly() throws java.lang.InterruptedException;
    method public java.util.concurrent.locks.Condition newCondition();
    method public boolean tryLock();
    method public boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void unlock();
  }

  public static class ReentrantReadWriteLock.WriteLock implements java.util.concurrent.locks.Lock java.io.Serializable {
    ctor protected ReentrantReadWriteLock.WriteLock(java.util.concurrent.locks.ReentrantReadWriteLock);
    method public int getHoldCount();
    method public boolean isHeldByCurrentThread();
    method public void lock();
    method public void lockInterruptibly() throws java.lang.InterruptedException;
    method public java.util.concurrent.locks.Condition newCondition();
    method public boolean tryLock();
    method public boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void unlock();
  }

}

package java.util.jar {

  public class Attributes implements java.lang.Cloneable java.util.Map {
    ctor public Attributes();
    ctor public Attributes(java.util.jar.Attributes);
    ctor public Attributes(int);
    method public void clear();
    method public java.lang.Object clone();
    method public boolean containsKey(java.lang.Object);
    method public boolean containsValue(java.lang.Object);
    method public java.util.Set<java.util.Map.Entry<java.lang.Object, java.lang.Object>> entrySet();
    method public java.lang.Object get(java.lang.Object);
    method public java.lang.String getValue(java.util.jar.Attributes.Name);
    method public java.lang.String getValue(java.lang.String);
    method public boolean isEmpty();
    method public java.util.Set<java.lang.Object> keySet();
    method public java.lang.Object put(java.lang.Object, java.lang.Object);
    method public void putAll(java.util.Map<?, ?>);
    method public java.lang.String putValue(java.lang.String, java.lang.String);
    method public java.lang.Object remove(java.lang.Object);
    method public int size();
    method public java.util.Collection<java.lang.Object> values();
    field protected java.util.Map<java.lang.Object, java.lang.Object> map;
  }

  public static class Attributes.Name {
    ctor public Attributes.Name(java.lang.String);
    field public static final java.util.jar.Attributes.Name CLASS_PATH;
    field public static final java.util.jar.Attributes.Name CONTENT_TYPE;
    field public static final java.util.jar.Attributes.Name EXTENSION_INSTALLATION;
    field public static final java.util.jar.Attributes.Name EXTENSION_LIST;
    field public static final java.util.jar.Attributes.Name EXTENSION_NAME;
    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_TITLE;
    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_URL;
    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_VENDOR;
    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_VENDOR_ID;
    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_VERSION;
    field public static final java.util.jar.Attributes.Name MAIN_CLASS;
    field public static final java.util.jar.Attributes.Name MANIFEST_VERSION;
    field public static final java.util.jar.Attributes.Name SEALED;
    field public static final java.util.jar.Attributes.Name SIGNATURE_VERSION;
    field public static final java.util.jar.Attributes.Name SPECIFICATION_TITLE;
    field public static final java.util.jar.Attributes.Name SPECIFICATION_VENDOR;
    field public static final java.util.jar.Attributes.Name SPECIFICATION_VERSION;
  }

  public class JarEntry extends java.util.zip.ZipEntry {
    ctor public JarEntry(java.lang.String);
    ctor public JarEntry(java.util.zip.ZipEntry);
    ctor public JarEntry(java.util.jar.JarEntry);
    method public java.util.jar.Attributes getAttributes() throws java.io.IOException;
    method public java.security.cert.Certificate[] getCertificates();
    method public java.security.CodeSigner[] getCodeSigners();
  }

  public class JarException extends java.util.zip.ZipException {
    ctor public JarException();
    ctor public JarException(java.lang.String);
  }

  public class JarFile extends java.util.zip.ZipFile {
    ctor public JarFile(java.io.File) throws java.io.IOException;
    ctor public JarFile(java.io.File, boolean) throws java.io.IOException;
    ctor public JarFile(java.io.File, boolean, int) throws java.io.IOException;
    ctor public JarFile(java.lang.String) throws java.io.IOException;
    ctor public JarFile(java.lang.String, boolean) throws java.io.IOException;
    method public java.util.jar.JarEntry getJarEntry(java.lang.String);
    method public java.util.jar.Manifest getManifest() throws java.io.IOException;
    field public static final java.lang.String MANIFEST_NAME = "META-INF/MANIFEST.MF";
  }

  public class JarInputStream extends java.util.zip.ZipInputStream {
    ctor public JarInputStream(java.io.InputStream, boolean) throws java.io.IOException;
    ctor public JarInputStream(java.io.InputStream) throws java.io.IOException;
    method public java.util.jar.Manifest getManifest();
    method public java.util.jar.JarEntry getNextJarEntry() throws java.io.IOException;
  }

  public class JarOutputStream extends java.util.zip.ZipOutputStream {
    ctor public JarOutputStream(java.io.OutputStream, java.util.jar.Manifest) throws java.io.IOException;
    ctor public JarOutputStream(java.io.OutputStream) throws java.io.IOException;
  }

  public class Manifest implements java.lang.Cloneable {
    ctor public Manifest();
    ctor public Manifest(java.io.InputStream) throws java.io.IOException;
    ctor public Manifest(java.util.jar.Manifest);
    method public void clear();
    method public java.lang.Object clone();
    method public java.util.jar.Attributes getAttributes(java.lang.String);
    method public java.util.Map<java.lang.String, java.util.jar.Attributes> getEntries();
    method public java.util.jar.Attributes getMainAttributes();
    method public void read(java.io.InputStream) throws java.io.IOException;
    method public void write(java.io.OutputStream) throws java.io.IOException;
  }

  public abstract class Pack200 {
    method public static java.util.jar.Pack200.Packer newPacker();
    method public static java.util.jar.Pack200.Unpacker newUnpacker();
  }

  public static abstract interface Pack200.Packer {
    method public abstract void addPropertyChangeListener(java.beans.PropertyChangeListener);
    method public abstract void pack(java.util.jar.JarFile, java.io.OutputStream) throws java.io.IOException;
    method public abstract void pack(java.util.jar.JarInputStream, java.io.OutputStream) throws java.io.IOException;
    method public abstract java.util.SortedMap<java.lang.String, java.lang.String> properties();
    method public abstract void removePropertyChangeListener(java.beans.PropertyChangeListener);
    field public static final java.lang.String CLASS_ATTRIBUTE_PFX = "pack.class.attribute.";
    field public static final java.lang.String CODE_ATTRIBUTE_PFX = "pack.code.attribute.";
    field public static final java.lang.String DEFLATE_HINT = "pack.deflate.hint";
    field public static final java.lang.String EFFORT = "pack.effort";
    field public static final java.lang.String ERROR = "error";
    field public static final java.lang.String FALSE = "false";
    field public static final java.lang.String FIELD_ATTRIBUTE_PFX = "pack.field.attribute.";
    field public static final java.lang.String KEEP = "keep";
    field public static final java.lang.String KEEP_FILE_ORDER = "pack.keep.file.order";
    field public static final java.lang.String LATEST = "latest";
    field public static final java.lang.String METHOD_ATTRIBUTE_PFX = "pack.method.attribute.";
    field public static final java.lang.String MODIFICATION_TIME = "pack.modification.time";
    field public static final java.lang.String PASS = "pass";
    field public static final java.lang.String PASS_FILE_PFX = "pack.pass.file.";
    field public static final java.lang.String PROGRESS = "pack.progress";
    field public static final java.lang.String SEGMENT_LIMIT = "pack.segment.limit";
    field public static final java.lang.String STRIP = "strip";
    field public static final java.lang.String TRUE = "true";
    field public static final java.lang.String UNKNOWN_ATTRIBUTE = "pack.unknown.attribute";
  }

  public static abstract interface Pack200.Unpacker {
    method public abstract void addPropertyChangeListener(java.beans.PropertyChangeListener);
    method public abstract java.util.SortedMap<java.lang.String, java.lang.String> properties();
    method public abstract void removePropertyChangeListener(java.beans.PropertyChangeListener);
    method public abstract void unpack(java.io.InputStream, java.util.jar.JarOutputStream) throws java.io.IOException;
    method public abstract void unpack(java.io.File, java.util.jar.JarOutputStream) throws java.io.IOException;
    field public static final java.lang.String DEFLATE_HINT = "unpack.deflate.hint";
    field public static final java.lang.String FALSE = "false";
    field public static final java.lang.String KEEP = "keep";
    field public static final java.lang.String PROGRESS = "unpack.progress";
    field public static final java.lang.String TRUE = "true";
  }

}

package java.util.logging {

  public class ConsoleHandler extends java.util.logging.StreamHandler {
    ctor public ConsoleHandler();
  }

  public class ErrorManager {
    ctor public ErrorManager();
    method public void error(java.lang.String, java.lang.Exception, int);
    field public static final int CLOSE_FAILURE = 3; // 0x3
    field public static final int FLUSH_FAILURE = 2; // 0x2
    field public static final int FORMAT_FAILURE = 5; // 0x5
    field public static final int GENERIC_FAILURE = 0; // 0x0
    field public static final int OPEN_FAILURE = 4; // 0x4
    field public static final int WRITE_FAILURE = 1; // 0x1
  }

  public class FileHandler extends java.util.logging.StreamHandler {
    ctor public FileHandler() throws java.io.IOException;
    ctor public FileHandler(java.lang.String) throws java.io.IOException;
    ctor public FileHandler(java.lang.String, boolean) throws java.io.IOException;
    ctor public FileHandler(java.lang.String, int, int) throws java.io.IOException;
    ctor public FileHandler(java.lang.String, int, int, boolean) throws java.io.IOException;
  }

  public abstract interface Filter {
    method public abstract boolean isLoggable(java.util.logging.LogRecord);
  }

  public abstract class Formatter {
    ctor protected Formatter();
    method public abstract java.lang.String format(java.util.logging.LogRecord);
    method public java.lang.String formatMessage(java.util.logging.LogRecord);
    method public java.lang.String getHead(java.util.logging.Handler);
    method public java.lang.String getTail(java.util.logging.Handler);
  }

  public abstract class Handler {
    ctor protected Handler();
    method public abstract void close();
    method public abstract void flush();
    method public java.lang.String getEncoding();
    method public java.util.logging.ErrorManager getErrorManager();
    method public java.util.logging.Filter getFilter();
    method public java.util.logging.Formatter getFormatter();
    method public java.util.logging.Level getLevel();
    method public boolean isLoggable(java.util.logging.LogRecord);
    method public abstract void publish(java.util.logging.LogRecord);
    method protected void reportError(java.lang.String, java.lang.Exception, int);
    method public void setEncoding(java.lang.String) throws java.io.UnsupportedEncodingException;
    method public void setErrorManager(java.util.logging.ErrorManager);
    method public void setFilter(java.util.logging.Filter);
    method public void setFormatter(java.util.logging.Formatter);
    method public void setLevel(java.util.logging.Level);
  }

  public class Level implements java.io.Serializable {
    ctor protected Level(java.lang.String, int);
    ctor protected Level(java.lang.String, int, java.lang.String);
    method public java.lang.String getLocalizedName();
    method public java.lang.String getName();
    method public java.lang.String getResourceBundleName();
    method public final int intValue();
    method public static java.util.logging.Level parse(java.lang.String) throws java.lang.IllegalArgumentException;
    method public final java.lang.String toString();
    field public static final java.util.logging.Level ALL;
    field public static final java.util.logging.Level CONFIG;
    field public static final java.util.logging.Level FINE;
    field public static final java.util.logging.Level FINER;
    field public static final java.util.logging.Level FINEST;
    field public static final java.util.logging.Level INFO;
    field public static final java.util.logging.Level OFF;
    field public static final java.util.logging.Level SEVERE;
    field public static final java.util.logging.Level WARNING;
  }

  public class LogManager {
    ctor protected LogManager();
    method public synchronized boolean addLogger(java.util.logging.Logger);
    method public void addPropertyChangeListener(java.beans.PropertyChangeListener);
    method public void checkAccess();
    method public static java.util.logging.LogManager getLogManager();
    method public synchronized java.util.logging.Logger getLogger(java.lang.String);
    method public synchronized java.util.Enumeration<java.lang.String> getLoggerNames();
    method public static java.util.logging.LoggingMXBean getLoggingMXBean();
    method public java.lang.String getProperty(java.lang.String);
    method public void readConfiguration() throws java.io.IOException;
    method public void readConfiguration(java.io.InputStream) throws java.io.IOException;
    method public void removePropertyChangeListener(java.beans.PropertyChangeListener);
    method public synchronized void reset();
    field public static final java.lang.String LOGGING_MXBEAN_NAME = "java.util.logging:type=Logging";
  }

  public class LogRecord implements java.io.Serializable {
    ctor public LogRecord(java.util.logging.Level, java.lang.String);
    method public java.util.logging.Level getLevel();
    method public java.lang.String getLoggerName();
    method public java.lang.String getMessage();
    method public long getMillis();
    method public java.lang.Object[] getParameters();
    method public java.util.ResourceBundle getResourceBundle();
    method public java.lang.String getResourceBundleName();
    method public long getSequenceNumber();
    method public java.lang.String getSourceClassName();
    method public java.lang.String getSourceMethodName();
    method public int getThreadID();
    method public java.lang.Throwable getThrown();
    method public void setLevel(java.util.logging.Level);
    method public void setLoggerName(java.lang.String);
    method public void setMessage(java.lang.String);
    method public void setMillis(long);
    method public void setParameters(java.lang.Object[]);
    method public void setResourceBundle(java.util.ResourceBundle);
    method public void setResourceBundleName(java.lang.String);
    method public void setSequenceNumber(long);
    method public void setSourceClassName(java.lang.String);
    method public void setSourceMethodName(java.lang.String);
    method public void setThreadID(int);
    method public void setThrown(java.lang.Throwable);
  }

  public class Logger {
    ctor protected Logger(java.lang.String, java.lang.String);
    method public void addHandler(java.util.logging.Handler);
    method public void config(java.lang.String);
    method public void entering(java.lang.String, java.lang.String);
    method public void entering(java.lang.String, java.lang.String, java.lang.Object);
    method public void entering(java.lang.String, java.lang.String, java.lang.Object[]);
    method public void exiting(java.lang.String, java.lang.String);
    method public void exiting(java.lang.String, java.lang.String, java.lang.Object);
    method public void fine(java.lang.String);
    method public void finer(java.lang.String);
    method public void finest(java.lang.String);
    method public static java.util.logging.Logger getAnonymousLogger();
    method public static java.util.logging.Logger getAnonymousLogger(java.lang.String);
    method public java.util.logging.Filter getFilter();
    method public static java.util.logging.Logger getGlobal();
    method public java.util.logging.Handler[] getHandlers();
    method public java.util.logging.Level getLevel();
    method public static java.util.logging.Logger getLogger(java.lang.String);
    method public static java.util.logging.Logger getLogger(java.lang.String, java.lang.String);
    method public java.lang.String getName();
    method public java.util.logging.Logger getParent();
    method public java.util.ResourceBundle getResourceBundle();
    method public java.lang.String getResourceBundleName();
    method public boolean getUseParentHandlers();
    method public void info(java.lang.String);
    method public boolean isLoggable(java.util.logging.Level);
    method public void log(java.util.logging.Level, java.lang.String);
    method public void log(java.util.logging.Level, java.lang.String, java.lang.Object);
    method public void log(java.util.logging.Level, java.lang.String, java.lang.Object[]);
    method public void log(java.util.logging.Level, java.lang.String, java.lang.Throwable);
    method public void log(java.util.logging.LogRecord);
    method public void logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String);
    method public void logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.Object);
    method public void logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.Object[]);
    method public void logp(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable);
    method public void logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public void logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Object);
    method public void logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Object[]);
    method public void logrb(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable);
    method public void removeHandler(java.util.logging.Handler);
    method public void setFilter(java.util.logging.Filter);
    method public void setLevel(java.util.logging.Level);
    method public void setParent(java.util.logging.Logger);
    method public void setUseParentHandlers(boolean);
    method public void severe(java.lang.String);
    method public void throwing(java.lang.String, java.lang.String, java.lang.Throwable);
    method public void warning(java.lang.String);
    field public static final java.lang.String GLOBAL_LOGGER_NAME = "global";
    field public static final deprecated java.util.logging.Logger global;
  }

  public abstract interface LoggingMXBean {
    method public abstract java.lang.String getLoggerLevel(java.lang.String);
    method public abstract java.util.List<java.lang.String> getLoggerNames();
    method public abstract java.lang.String getParentLoggerName(java.lang.String);
    method public abstract void setLoggerLevel(java.lang.String, java.lang.String);
  }

  public final class LoggingPermission extends java.security.BasicPermission implements java.security.Guard java.io.Serializable {
    ctor public LoggingPermission(java.lang.String, java.lang.String);
  }

  public class MemoryHandler extends java.util.logging.Handler {
    ctor public MemoryHandler();
    ctor public MemoryHandler(java.util.logging.Handler, int, java.util.logging.Level);
    method public void close();
    method public void flush();
    method public java.util.logging.Level getPushLevel();
    method public synchronized void publish(java.util.logging.LogRecord);
    method public void push();
    method public void setPushLevel(java.util.logging.Level);
  }

  public class SimpleFormatter extends java.util.logging.Formatter {
    ctor public SimpleFormatter();
    method public java.lang.String format(java.util.logging.LogRecord);
  }

  public class SocketHandler extends java.util.logging.StreamHandler {
    ctor public SocketHandler() throws java.io.IOException;
    ctor public SocketHandler(java.lang.String, int) throws java.io.IOException;
  }

  public class StreamHandler extends java.util.logging.Handler {
    ctor public StreamHandler();
    ctor public StreamHandler(java.io.OutputStream, java.util.logging.Formatter);
    method public void close();
    method public void flush();
    method public synchronized void publish(java.util.logging.LogRecord);
    method protected void setOutputStream(java.io.OutputStream);
  }

  public class XMLFormatter extends java.util.logging.Formatter {
    ctor public XMLFormatter();
    method public java.lang.String format(java.util.logging.LogRecord);
  }

}

package java.util.prefs {

  public abstract class AbstractPreferences extends java.util.prefs.Preferences {
    ctor protected AbstractPreferences(java.util.prefs.AbstractPreferences, java.lang.String);
    method public java.lang.String absolutePath();
    method public void addNodeChangeListener(java.util.prefs.NodeChangeListener);
    method public void addPreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
    method protected final java.util.prefs.AbstractPreferences[] cachedChildren();
    method protected abstract java.util.prefs.AbstractPreferences childSpi(java.lang.String);
    method public java.lang.String[] childrenNames() throws java.util.prefs.BackingStoreException;
    method protected abstract java.lang.String[] childrenNamesSpi() throws java.util.prefs.BackingStoreException;
    method public void clear() throws java.util.prefs.BackingStoreException;
    method public void exportNode(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
    method public void exportSubtree(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
    method public void flush() throws java.util.prefs.BackingStoreException;
    method protected abstract void flushSpi() throws java.util.prefs.BackingStoreException;
    method public java.lang.String get(java.lang.String, java.lang.String);
    method public boolean getBoolean(java.lang.String, boolean);
    method public byte[] getByteArray(java.lang.String, byte[]);
    method protected java.util.prefs.AbstractPreferences getChild(java.lang.String) throws java.util.prefs.BackingStoreException;
    method public double getDouble(java.lang.String, double);
    method public float getFloat(java.lang.String, float);
    method public int getInt(java.lang.String, int);
    method public long getLong(java.lang.String, long);
    method protected abstract java.lang.String getSpi(java.lang.String);
    method protected boolean isRemoved();
    method public boolean isUserNode();
    method public java.lang.String[] keys() throws java.util.prefs.BackingStoreException;
    method protected abstract java.lang.String[] keysSpi() throws java.util.prefs.BackingStoreException;
    method public java.lang.String name();
    method public java.util.prefs.Preferences node(java.lang.String);
    method public boolean nodeExists(java.lang.String) throws java.util.prefs.BackingStoreException;
    method public java.util.prefs.Preferences parent();
    method public void put(java.lang.String, java.lang.String);
    method public void putBoolean(java.lang.String, boolean);
    method public void putByteArray(java.lang.String, byte[]);
    method public void putDouble(java.lang.String, double);
    method public void putFloat(java.lang.String, float);
    method public void putInt(java.lang.String, int);
    method public void putLong(java.lang.String, long);
    method protected abstract void putSpi(java.lang.String, java.lang.String);
    method public void remove(java.lang.String);
    method public void removeNode() throws java.util.prefs.BackingStoreException;
    method public void removeNodeChangeListener(java.util.prefs.NodeChangeListener);
    method protected abstract void removeNodeSpi() throws java.util.prefs.BackingStoreException;
    method public void removePreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
    method protected abstract void removeSpi(java.lang.String);
    method public void sync() throws java.util.prefs.BackingStoreException;
    method protected abstract void syncSpi() throws java.util.prefs.BackingStoreException;
    method public java.lang.String toString();
    field protected final java.lang.Object lock;
    field protected boolean newNode;
  }

  public class BackingStoreException extends java.lang.Exception {
    ctor public BackingStoreException(java.lang.String);
    ctor public BackingStoreException(java.lang.Throwable);
  }

  public class InvalidPreferencesFormatException extends java.lang.Exception {
    ctor public InvalidPreferencesFormatException(java.lang.String);
    ctor public InvalidPreferencesFormatException(java.lang.String, java.lang.Throwable);
    ctor public InvalidPreferencesFormatException(java.lang.Throwable);
  }

  public class NodeChangeEvent extends java.util.EventObject implements java.io.Serializable {
    ctor public NodeChangeEvent(java.util.prefs.Preferences, java.util.prefs.Preferences);
    method public java.util.prefs.Preferences getChild();
    method public java.util.prefs.Preferences getParent();
  }

  public abstract interface NodeChangeListener implements java.util.EventListener {
    method public abstract void childAdded(java.util.prefs.NodeChangeEvent);
    method public abstract void childRemoved(java.util.prefs.NodeChangeEvent);
  }

  public class PreferenceChangeEvent extends java.util.EventObject implements java.io.Serializable {
    ctor public PreferenceChangeEvent(java.util.prefs.Preferences, java.lang.String, java.lang.String);
    method public java.lang.String getKey();
    method public java.lang.String getNewValue();
    method public java.util.prefs.Preferences getNode();
  }

  public abstract interface PreferenceChangeListener implements java.util.EventListener {
    method public abstract void preferenceChange(java.util.prefs.PreferenceChangeEvent);
  }

  public abstract class Preferences {
    ctor protected Preferences();
    method public abstract java.lang.String absolutePath();
    method public abstract void addNodeChangeListener(java.util.prefs.NodeChangeListener);
    method public abstract void addPreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
    method public abstract java.lang.String[] childrenNames() throws java.util.prefs.BackingStoreException;
    method public abstract void clear() throws java.util.prefs.BackingStoreException;
    method public abstract void exportNode(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
    method public abstract void exportSubtree(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
    method public abstract void flush() throws java.util.prefs.BackingStoreException;
    method public abstract java.lang.String get(java.lang.String, java.lang.String);
    method public abstract boolean getBoolean(java.lang.String, boolean);
    method public abstract byte[] getByteArray(java.lang.String, byte[]);
    method public abstract double getDouble(java.lang.String, double);
    method public abstract float getFloat(java.lang.String, float);
    method public abstract int getInt(java.lang.String, int);
    method public abstract long getLong(java.lang.String, long);
    method public static void importPreferences(java.io.InputStream) throws java.io.IOException, java.util.prefs.InvalidPreferencesFormatException;
    method public abstract boolean isUserNode();
    method public abstract java.lang.String[] keys() throws java.util.prefs.BackingStoreException;
    method public abstract java.lang.String name();
    method public abstract java.util.prefs.Preferences node(java.lang.String);
    method public abstract boolean nodeExists(java.lang.String) throws java.util.prefs.BackingStoreException;
    method public abstract java.util.prefs.Preferences parent();
    method public abstract void put(java.lang.String, java.lang.String);
    method public abstract void putBoolean(java.lang.String, boolean);
    method public abstract void putByteArray(java.lang.String, byte[]);
    method public abstract void putDouble(java.lang.String, double);
    method public abstract void putFloat(java.lang.String, float);
    method public abstract void putInt(java.lang.String, int);
    method public abstract void putLong(java.lang.String, long);
    method public abstract void remove(java.lang.String);
    method public abstract void removeNode() throws java.util.prefs.BackingStoreException;
    method public abstract void removeNodeChangeListener(java.util.prefs.NodeChangeListener);
    method public abstract void removePreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
    method public abstract void sync() throws java.util.prefs.BackingStoreException;
    method public static java.util.prefs.Preferences systemNodeForPackage(java.lang.Class<?>);
    method public static java.util.prefs.Preferences systemRoot();
    method public abstract java.lang.String toString();
    method public static java.util.prefs.Preferences userNodeForPackage(java.lang.Class<?>);
    method public static java.util.prefs.Preferences userRoot();
    field public static final int MAX_KEY_LENGTH = 80; // 0x50
    field public static final int MAX_NAME_LENGTH = 80; // 0x50
    field public static final int MAX_VALUE_LENGTH = 8192; // 0x2000
  }

  public abstract interface PreferencesFactory {
    method public abstract java.util.prefs.Preferences systemRoot();
    method public abstract java.util.prefs.Preferences userRoot();
  }

}

package java.util.regex {

  public abstract interface MatchResult {
    method public abstract int end();
    method public abstract int end(int);
    method public abstract java.lang.String group();
    method public abstract java.lang.String group(int);
    method public abstract int groupCount();
    method public abstract int start();
    method public abstract int start(int);
  }

  public final class Matcher implements java.util.regex.MatchResult {
    method public java.util.regex.Matcher appendReplacement(java.lang.StringBuffer, java.lang.String);
    method public java.lang.StringBuffer appendTail(java.lang.StringBuffer);
    method public int end();
    method public int end(int);
    method public boolean find(int);
    method public boolean find();
    method public java.lang.String group();
    method public java.lang.String group(int);
    method public int groupCount();
    method public boolean hasAnchoringBounds();
    method public boolean hasTransparentBounds();
    method public boolean hitEnd();
    method public boolean lookingAt();
    method public boolean matches();
    method public java.util.regex.Pattern pattern();
    method public static java.lang.String quoteReplacement(java.lang.String);
    method public java.util.regex.Matcher region(int, int);
    method public int regionEnd();
    method public int regionStart();
    method public java.lang.String replaceAll(java.lang.String);
    method public java.lang.String replaceFirst(java.lang.String);
    method public boolean requireEnd();
    method public java.util.regex.Matcher reset();
    method public java.util.regex.Matcher reset(java.lang.CharSequence);
    method public int start();
    method public int start(int) throws java.lang.IllegalStateException;
    method public java.util.regex.MatchResult toMatchResult();
    method public java.util.regex.Matcher useAnchoringBounds(boolean);
    method public java.util.regex.Matcher usePattern(java.util.regex.Pattern);
    method public java.util.regex.Matcher useTransparentBounds(boolean);
  }

  public final class Pattern implements java.io.Serializable {
    method public static java.util.regex.Pattern compile(java.lang.String, int) throws java.util.regex.PatternSyntaxException;
    method public static java.util.regex.Pattern compile(java.lang.String);
    method public int flags();
    method public java.util.regex.Matcher matcher(java.lang.CharSequence);
    method public static boolean matches(java.lang.String, java.lang.CharSequence);
    method public java.lang.String pattern();
    method public static java.lang.String quote(java.lang.String);
    method public java.lang.String[] split(java.lang.CharSequence, int);
    method public java.lang.String[] split(java.lang.CharSequence);
    field public static final int CANON_EQ = 128; // 0x80
    field public static final int CASE_INSENSITIVE = 2; // 0x2
    field public static final int COMMENTS = 4; // 0x4
    field public static final int DOTALL = 32; // 0x20
    field public static final int LITERAL = 16; // 0x10
    field public static final int MULTILINE = 8; // 0x8
    field public static final int UNICODE_CASE = 64; // 0x40
    field public static final int UNIX_LINES = 1; // 0x1
  }

  public class PatternSyntaxException extends java.lang.IllegalArgumentException {
    ctor public PatternSyntaxException(java.lang.String, java.lang.String, int);
    method public java.lang.String getDescription();
    method public int getIndex();
    method public java.lang.String getPattern();
  }

}

package java.util.zip {

  public class Adler32 implements java.util.zip.Checksum {
    ctor public Adler32();
    method public long getValue();
    method public void reset();
    method public void update(int);
    method public void update(byte[]);
    method public void update(byte[], int, int);
  }

  public class CRC32 implements java.util.zip.Checksum {
    ctor public CRC32();
    method public long getValue();
    method public void reset();
    method public void update(int);
    method public void update(byte[]);
    method public void update(byte[], int, int);
  }

  public class CheckedInputStream extends java.io.FilterInputStream {
    ctor public CheckedInputStream(java.io.InputStream, java.util.zip.Checksum);
    method public java.util.zip.Checksum getChecksum();
  }

  public class CheckedOutputStream extends java.io.FilterOutputStream {
    ctor public CheckedOutputStream(java.io.OutputStream, java.util.zip.Checksum);
    method public java.util.zip.Checksum getChecksum();
  }

  public abstract interface Checksum {
    method public abstract long getValue();
    method public abstract void reset();
    method public abstract void update(byte[], int, int);
    method public abstract void update(int);
  }

  public class DataFormatException extends java.lang.Exception {
    ctor public DataFormatException();
    ctor public DataFormatException(java.lang.String);
  }

  public class Deflater {
    ctor public Deflater();
    ctor public Deflater(int);
    ctor public Deflater(int, boolean);
    method public int deflate(byte[]);
    method public synchronized int deflate(byte[], int, int);
    method public synchronized int deflate(byte[], int, int, int);
    method public synchronized void end();
    method public synchronized void finish();
    method public synchronized boolean finished();
    method public synchronized int getAdler();
    method public synchronized long getBytesRead();
    method public synchronized long getBytesWritten();
    method public synchronized int getTotalIn();
    method public synchronized int getTotalOut();
    method public synchronized boolean needsInput();
    method public synchronized void reset();
    method public void setDictionary(byte[]);
    method public synchronized void setDictionary(byte[], int, int);
    method public void setInput(byte[]);
    method public synchronized void setInput(byte[], int, int);
    method public synchronized void setLevel(int);
    method public synchronized void setStrategy(int);
    field public static final int BEST_COMPRESSION = 9; // 0x9
    field public static final int BEST_SPEED = 1; // 0x1
    field public static final int DEFAULT_COMPRESSION = -1; // 0xffffffff
    field public static final int DEFAULT_STRATEGY = 0; // 0x0
    field public static final int DEFLATED = 8; // 0x8
    field public static final int FILTERED = 1; // 0x1
    field public static final int FULL_FLUSH = 3; // 0x3
    field public static final int HUFFMAN_ONLY = 2; // 0x2
    field public static final int NO_COMPRESSION = 0; // 0x0
    field public static final int NO_FLUSH = 0; // 0x0
    field public static final int SYNC_FLUSH = 2; // 0x2
  }

  public class DeflaterInputStream extends java.io.FilterInputStream {
    ctor public DeflaterInputStream(java.io.InputStream);
    ctor public DeflaterInputStream(java.io.InputStream, java.util.zip.Deflater);
    ctor public DeflaterInputStream(java.io.InputStream, java.util.zip.Deflater, int);
    field protected final byte[] buf;
    field protected final java.util.zip.Deflater def;
  }

  public class DeflaterOutputStream extends java.io.FilterOutputStream {
    ctor public DeflaterOutputStream(java.io.OutputStream);
    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater);
    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int);
    ctor public DeflaterOutputStream(java.io.OutputStream, boolean);
    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, boolean);
    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int, boolean);
    method protected void deflate() throws java.io.IOException;
    method public void finish() throws java.io.IOException;
    field protected byte[] buf;
    field protected java.util.zip.Deflater def;
  }

  public class GZIPInputStream extends java.util.zip.InflaterInputStream {
    ctor public GZIPInputStream(java.io.InputStream) throws java.io.IOException;
    ctor public GZIPInputStream(java.io.InputStream, int) throws java.io.IOException;
    field public static final int GZIP_MAGIC = 35615; // 0x8b1f
    field protected java.util.zip.CRC32 crc;
    field protected boolean eos;
  }

  public class GZIPOutputStream extends java.util.zip.DeflaterOutputStream {
    ctor public GZIPOutputStream(java.io.OutputStream) throws java.io.IOException;
    ctor public GZIPOutputStream(java.io.OutputStream, boolean) throws java.io.IOException;
    ctor public GZIPOutputStream(java.io.OutputStream, int) throws java.io.IOException;
    ctor public GZIPOutputStream(java.io.OutputStream, int, boolean) throws java.io.IOException;
    field protected java.util.zip.CRC32 crc;
  }

  public class Inflater {
    ctor public Inflater();
    ctor public Inflater(boolean);
    method public synchronized void end();
    method public synchronized boolean finished();
    method public synchronized int getAdler();
    method public synchronized long getBytesRead();
    method public synchronized long getBytesWritten();
    method public synchronized int getRemaining();
    method public synchronized int getTotalIn();
    method public synchronized int getTotalOut();
    method public int inflate(byte[]) throws java.util.zip.DataFormatException;
    method public synchronized int inflate(byte[], int, int) throws java.util.zip.DataFormatException;
    method public synchronized boolean needsDictionary();
    method public synchronized boolean needsInput();
    method public synchronized void reset();
    method public synchronized void setDictionary(byte[]);
    method public synchronized void setDictionary(byte[], int, int);
    method public synchronized void setInput(byte[]);
    method public synchronized void setInput(byte[], int, int);
  }

  public class InflaterInputStream extends java.io.FilterInputStream {
    ctor public InflaterInputStream(java.io.InputStream);
    ctor public InflaterInputStream(java.io.InputStream, java.util.zip.Inflater);
    ctor public InflaterInputStream(java.io.InputStream, java.util.zip.Inflater, int);
    method protected void fill() throws java.io.IOException;
    field protected byte[] buf;
    field protected java.util.zip.Inflater inf;
    field protected int len;
  }

  public class InflaterOutputStream extends java.io.FilterOutputStream {
    ctor public InflaterOutputStream(java.io.OutputStream);
    ctor public InflaterOutputStream(java.io.OutputStream, java.util.zip.Inflater);
    ctor public InflaterOutputStream(java.io.OutputStream, java.util.zip.Inflater, int);
    method public void finish() throws java.io.IOException;
    field protected final byte[] buf;
    field protected final java.util.zip.Inflater inf;
  }

  public class ZipEntry implements java.lang.Cloneable {
    ctor public ZipEntry(java.lang.String);
    ctor public ZipEntry(java.util.zip.ZipEntry);
    method public java.lang.Object clone();
    method public java.lang.String getComment();
    method public long getCompressedSize();
    method public long getCrc();
    method public byte[] getExtra();
    method public int getMethod();
    method public java.lang.String getName();
    method public long getSize();
    method public long getTime();
    method public boolean isDirectory();
    method public void setComment(java.lang.String);
    method public void setCompressedSize(long);
    method public void setCrc(long);
    method public void setExtra(byte[]);
    method public void setMethod(int);
    method public void setSize(long);
    method public void setTime(long);
    field public static final int CENATT = 36; // 0x24
    field public static final int CENATX = 38; // 0x26
    field public static final int CENCOM = 32; // 0x20
    field public static final int CENCRC = 16; // 0x10
    field public static final int CENDSK = 34; // 0x22
    field public static final int CENEXT = 30; // 0x1e
    field public static final int CENFLG = 8; // 0x8
    field public static final int CENHDR = 46; // 0x2e
    field public static final int CENHOW = 10; // 0xa
    field public static final int CENLEN = 24; // 0x18
    field public static final int CENNAM = 28; // 0x1c
    field public static final int CENOFF = 42; // 0x2a
    field public static final long CENSIG = 33639248L; // 0x2014b50L
    field public static final int CENSIZ = 20; // 0x14
    field public static final int CENTIM = 12; // 0xc
    field public static final int CENVEM = 4; // 0x4
    field public static final int CENVER = 6; // 0x6
    field public static final int DEFLATED = 8; // 0x8
    field public static final int ENDCOM = 20; // 0x14
    field public static final int ENDHDR = 22; // 0x16
    field public static final int ENDOFF = 16; // 0x10
    field public static final long ENDSIG = 101010256L; // 0x6054b50L
    field public static final int ENDSIZ = 12; // 0xc
    field public static final int ENDSUB = 8; // 0x8
    field public static final int ENDTOT = 10; // 0xa
    field public static final int EXTCRC = 4; // 0x4
    field public static final int EXTHDR = 16; // 0x10
    field public static final int EXTLEN = 12; // 0xc
    field public static final long EXTSIG = 134695760L; // 0x8074b50L
    field public static final int EXTSIZ = 8; // 0x8
    field public static final int LOCCRC = 14; // 0xe
    field public static final int LOCEXT = 28; // 0x1c
    field public static final int LOCFLG = 6; // 0x6
    field public static final int LOCHDR = 30; // 0x1e
    field public static final int LOCHOW = 8; // 0x8
    field public static final int LOCLEN = 22; // 0x16
    field public static final int LOCNAM = 26; // 0x1a
    field public static final long LOCSIG = 67324752L; // 0x4034b50L
    field public static final int LOCSIZ = 18; // 0x12
    field public static final int LOCTIM = 10; // 0xa
    field public static final int LOCVER = 4; // 0x4
    field public static final int STORED = 0; // 0x0
  }

  public class ZipError extends java.lang.InternalError {
    ctor public ZipError(java.lang.String);
  }

  public class ZipException extends java.io.IOException {
    ctor public ZipException();
    ctor public ZipException(java.lang.String);
  }

  public class ZipFile implements java.io.Closeable {
    ctor public ZipFile(java.io.File) throws java.io.IOException, java.util.zip.ZipException;
    ctor public ZipFile(java.lang.String) throws java.io.IOException;
    ctor public ZipFile(java.io.File, int) throws java.io.IOException;
    method public void close() throws java.io.IOException;
    method public java.util.Enumeration<? extends java.util.zip.ZipEntry> entries();
    method public java.lang.String getComment();
    method public java.util.zip.ZipEntry getEntry(java.lang.String);
    method public java.io.InputStream getInputStream(java.util.zip.ZipEntry) throws java.io.IOException;
    method public java.lang.String getName();
    method public int size();
    field public static final int CENATT = 36; // 0x24
    field public static final int CENATX = 38; // 0x26
    field public static final int CENCOM = 32; // 0x20
    field public static final int CENCRC = 16; // 0x10
    field public static final int CENDSK = 34; // 0x22
    field public static final int CENEXT = 30; // 0x1e
    field public static final int CENFLG = 8; // 0x8
    field public static final int CENHDR = 46; // 0x2e
    field public static final int CENHOW = 10; // 0xa
    field public static final int CENLEN = 24; // 0x18
    field public static final int CENNAM = 28; // 0x1c
    field public static final int CENOFF = 42; // 0x2a
    field public static final long CENSIG = 33639248L; // 0x2014b50L
    field public static final int CENSIZ = 20; // 0x14
    field public static final int CENTIM = 12; // 0xc
    field public static final int CENVEM = 4; // 0x4
    field public static final int CENVER = 6; // 0x6
    field public static final int ENDCOM = 20; // 0x14
    field public static final int ENDHDR = 22; // 0x16
    field public static final int ENDOFF = 16; // 0x10
    field public static final long ENDSIG = 101010256L; // 0x6054b50L
    field public static final int ENDSIZ = 12; // 0xc
    field public static final int ENDSUB = 8; // 0x8
    field public static final int ENDTOT = 10; // 0xa
    field public static final int EXTCRC = 4; // 0x4
    field public static final int EXTHDR = 16; // 0x10
    field public static final int EXTLEN = 12; // 0xc
    field public static final long EXTSIG = 134695760L; // 0x8074b50L
    field public static final int EXTSIZ = 8; // 0x8
    field public static final int LOCCRC = 14; // 0xe
    field public static final int LOCEXT = 28; // 0x1c
    field public static final int LOCFLG = 6; // 0x6
    field public static final int LOCHDR = 30; // 0x1e
    field public static final int LOCHOW = 8; // 0x8
    field public static final int LOCLEN = 22; // 0x16
    field public static final int LOCNAM = 26; // 0x1a
    field public static final long LOCSIG = 67324752L; // 0x4034b50L
    field public static final int LOCSIZ = 18; // 0x12
    field public static final int LOCTIM = 10; // 0xa
    field public static final int LOCVER = 4; // 0x4
    field public static final int OPEN_DELETE = 4; // 0x4
    field public static final int OPEN_READ = 1; // 0x1
  }

  public class ZipInputStream extends java.util.zip.InflaterInputStream {
    ctor public ZipInputStream(java.io.InputStream);
    method public void closeEntry() throws java.io.IOException;
    method protected java.util.zip.ZipEntry createZipEntry(java.lang.String);
    method public java.util.zip.ZipEntry getNextEntry() throws java.io.IOException;
    field public static final int CENATT = 36; // 0x24
    field public static final int CENATX = 38; // 0x26
    field public static final int CENCOM = 32; // 0x20
    field public static final int CENCRC = 16; // 0x10
    field public static final int CENDSK = 34; // 0x22
    field public static final int CENEXT = 30; // 0x1e
    field public static final int CENFLG = 8; // 0x8
    field public static final int CENHDR = 46; // 0x2e
    field public static final int CENHOW = 10; // 0xa
    field public static final int CENLEN = 24; // 0x18
    field public static final int CENNAM = 28; // 0x1c
    field public static final int CENOFF = 42; // 0x2a
    field public static final long CENSIG = 33639248L; // 0x2014b50L
    field public static final int CENSIZ = 20; // 0x14
    field public static final int CENTIM = 12; // 0xc
    field public static final int CENVEM = 4; // 0x4
    field public static final int CENVER = 6; // 0x6
    field public static final int ENDCOM = 20; // 0x14
    field public static final int ENDHDR = 22; // 0x16
    field public static final int ENDOFF = 16; // 0x10
    field public static final long ENDSIG = 101010256L; // 0x6054b50L
    field public static final int ENDSIZ = 12; // 0xc
    field public static final int ENDSUB = 8; // 0x8
    field public static final int ENDTOT = 10; // 0xa
    field public static final int EXTCRC = 4; // 0x4
    field public static final int EXTHDR = 16; // 0x10
    field public static final int EXTLEN = 12; // 0xc
    field public static final long EXTSIG = 134695760L; // 0x8074b50L
    field public static final int EXTSIZ = 8; // 0x8
    field public static final int LOCCRC = 14; // 0xe
    field public static final int LOCEXT = 28; // 0x1c
    field public static final int LOCFLG = 6; // 0x6
    field public static final int LOCHDR = 30; // 0x1e
    field public static final int LOCHOW = 8; // 0x8
    field public static final int LOCLEN = 22; // 0x16
    field public static final int LOCNAM = 26; // 0x1a
    field public static final long LOCSIG = 67324752L; // 0x4034b50L
    field public static final int LOCSIZ = 18; // 0x12
    field public static final int LOCTIM = 10; // 0xa
    field public static final int LOCVER = 4; // 0x4
  }

  public class ZipOutputStream extends java.util.zip.DeflaterOutputStream {
    ctor public ZipOutputStream(java.io.OutputStream);
    method public void closeEntry() throws java.io.IOException;
    method public void putNextEntry(java.util.zip.ZipEntry) throws java.io.IOException;
    method public void setComment(java.lang.String);
    method public void setLevel(int);
    method public void setMethod(int);
    field public static final int CENATT = 36; // 0x24
    field public static final int CENATX = 38; // 0x26
    field public static final int CENCOM = 32; // 0x20
    field public static final int CENCRC = 16; // 0x10
    field public static final int CENDSK = 34; // 0x22
    field public static final int CENEXT = 30; // 0x1e
    field public static final int CENFLG = 8; // 0x8
    field public static final int CENHDR = 46; // 0x2e
    field public static final int CENHOW = 10; // 0xa
    field public static final int CENLEN = 24; // 0x18
    field public static final int CENNAM = 28; // 0x1c
    field public static final int CENOFF = 42; // 0x2a
    field public static final long CENSIG = 33639248L; // 0x2014b50L
    field public static final int CENSIZ = 20; // 0x14
    field public static final int CENTIM = 12; // 0xc
    field public static final int CENVEM = 4; // 0x4
    field public static final int CENVER = 6; // 0x6
    field public static final int DEFLATED = 8; // 0x8
    field public static final int ENDCOM = 20; // 0x14
    field public static final int ENDHDR = 22; // 0x16
    field public static final int ENDOFF = 16; // 0x10
    field public static final long ENDSIG = 101010256L; // 0x6054b50L
    field public static final int ENDSIZ = 12; // 0xc
    field public static final int ENDSUB = 8; // 0x8
    field public static final int ENDTOT = 10; // 0xa
    field public static final int EXTCRC = 4; // 0x4
    field public static final int EXTHDR = 16; // 0x10
    field public static final int EXTLEN = 12; // 0xc
    field public static final long EXTSIG = 134695760L; // 0x8074b50L
    field public static final int EXTSIZ = 8; // 0x8
    field public static final int LOCCRC = 14; // 0xe
    field public static final int LOCEXT = 28; // 0x1c
    field public static final int LOCFLG = 6; // 0x6
    field public static final int LOCHDR = 30; // 0x1e
    field public static final int LOCHOW = 8; // 0x8
    field public static final int LOCLEN = 22; // 0x16
    field public static final int LOCNAM = 26; // 0x1a
    field public static final long LOCSIG = 67324752L; // 0x4034b50L
    field public static final int LOCSIZ = 18; // 0x12
    field public static final int LOCTIM = 10; // 0xa
    field public static final int LOCVER = 4; // 0x4
    field public static final int STORED = 0; // 0x0
  }

}

package javax.crypto {

  public class AEADBadTagException extends javax.crypto.BadPaddingException {
    ctor public AEADBadTagException();
    ctor public AEADBadTagException(java.lang.String);
  }

  public class BadPaddingException extends java.security.GeneralSecurityException {
    ctor public BadPaddingException(java.lang.String);
    ctor public BadPaddingException();
  }

  public class Cipher {
    ctor protected Cipher(javax.crypto.CipherSpi, java.security.Provider, java.lang.String);
    method public final byte[] doFinal() throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
    method public final int doFinal(byte[], int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
    method public final byte[] doFinal(byte[]) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
    method public final byte[] doFinal(byte[], int, int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
    method public final int doFinal(byte[], int, int, byte[]) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
    method public final int doFinal(byte[], int, int, byte[], int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
    method public final int doFinal(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
    method public final java.lang.String getAlgorithm();
    method public final int getBlockSize();
    method public final javax.crypto.ExemptionMechanism getExemptionMechanism();
    method public final byte[] getIV();
    method public static final javax.crypto.Cipher getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException;
    method public static final javax.crypto.Cipher getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.NoSuchProviderException;
    method public static final javax.crypto.Cipher getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException;
    method public static final int getMaxAllowedKeyLength(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final java.security.spec.AlgorithmParameterSpec getMaxAllowedParameterSpec(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public final int getOutputSize(int);
    method public final java.security.AlgorithmParameters getParameters();
    method public final java.security.Provider getProvider();
    method public final void init(int, java.security.Key) throws java.security.InvalidKeyException;
    method public final void init(int, java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
    method public final void init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final void init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final void init(int, java.security.Key, java.security.AlgorithmParameters) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final void init(int, java.security.Key, java.security.AlgorithmParameters, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final void init(int, java.security.cert.Certificate) throws java.security.InvalidKeyException;
    method public final void init(int, java.security.cert.Certificate, java.security.SecureRandom) throws java.security.InvalidKeyException;
    method public final java.security.Key unwrap(byte[], java.lang.String, int) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
    method public final byte[] update(byte[]);
    method public final byte[] update(byte[], int, int);
    method public final int update(byte[], int, int, byte[]) throws javax.crypto.ShortBufferException;
    method public final int update(byte[], int, int, byte[], int) throws javax.crypto.ShortBufferException;
    method public final int update(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.ShortBufferException;
    method public final void updateAAD(byte[]);
    method public final void updateAAD(byte[], int, int);
    method public final void updateAAD(java.nio.ByteBuffer);
    method public final byte[] wrap(java.security.Key) throws javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException;
    field public static final int DECRYPT_MODE = 2; // 0x2
    field public static final int ENCRYPT_MODE = 1; // 0x1
    field public static final int PRIVATE_KEY = 2; // 0x2
    field public static final int PUBLIC_KEY = 1; // 0x1
    field public static final int SECRET_KEY = 3; // 0x3
    field public static final int UNWRAP_MODE = 4; // 0x4
    field public static final int WRAP_MODE = 3; // 0x3
  }

  public class CipherInputStream extends java.io.FilterInputStream {
    ctor public CipherInputStream(java.io.InputStream, javax.crypto.Cipher);
    ctor protected CipherInputStream(java.io.InputStream);
  }

  public class CipherOutputStream extends java.io.FilterOutputStream {
    ctor public CipherOutputStream(java.io.OutputStream, javax.crypto.Cipher);
    ctor protected CipherOutputStream(java.io.OutputStream);
  }

  public abstract class CipherSpi {
    ctor public CipherSpi();
    method protected abstract byte[] engineDoFinal(byte[], int, int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
    method protected abstract int engineDoFinal(byte[], int, int, byte[], int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
    method protected int engineDoFinal(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
    method protected abstract int engineGetBlockSize();
    method protected abstract byte[] engineGetIV();
    method protected int engineGetKeySize(java.security.Key) throws java.security.InvalidKeyException;
    method protected abstract int engineGetOutputSize(int);
    method protected abstract java.security.AlgorithmParameters engineGetParameters();
    method protected abstract void engineInit(int, java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
    method protected abstract void engineInit(int, java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method protected abstract void engineInit(int, java.security.Key, java.security.AlgorithmParameters, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method protected abstract void engineSetMode(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method protected abstract void engineSetPadding(java.lang.String) throws javax.crypto.NoSuchPaddingException;
    method protected java.security.Key engineUnwrap(byte[], java.lang.String, int) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
    method protected abstract byte[] engineUpdate(byte[], int, int);
    method protected abstract int engineUpdate(byte[], int, int, byte[], int) throws javax.crypto.ShortBufferException;
    method protected int engineUpdate(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.ShortBufferException;
    method protected void engineUpdateAAD(byte[], int, int);
    method protected void engineUpdateAAD(java.nio.ByteBuffer);
    method protected byte[] engineWrap(java.security.Key) throws javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException;
  }

  public class EncryptedPrivateKeyInfo {
    ctor public EncryptedPrivateKeyInfo(byte[]) throws java.io.IOException;
    ctor public EncryptedPrivateKeyInfo(java.lang.String, byte[]) throws java.security.NoSuchAlgorithmException;
    ctor public EncryptedPrivateKeyInfo(java.security.AlgorithmParameters, byte[]) throws java.security.NoSuchAlgorithmException;
    method public java.lang.String getAlgName();
    method public java.security.AlgorithmParameters getAlgParameters();
    method public byte[] getEncoded() throws java.io.IOException;
    method public byte[] getEncryptedData();
    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(javax.crypto.Cipher) throws java.security.spec.InvalidKeySpecException;
    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(java.security.Key) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(java.security.Key, java.lang.String) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(java.security.Key, java.security.Provider) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
  }

  public class ExemptionMechanism {
    ctor protected ExemptionMechanism(javax.crypto.ExemptionMechanismSpi, java.security.Provider, java.lang.String);
    method public final byte[] genExemptionBlob() throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException;
    method public final int genExemptionBlob(byte[]) throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException, javax.crypto.ShortBufferException;
    method public final int genExemptionBlob(byte[], int) throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException, javax.crypto.ShortBufferException;
    method public static final javax.crypto.ExemptionMechanism getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final javax.crypto.ExemptionMechanism getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static final javax.crypto.ExemptionMechanism getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.lang.String getName();
    method public final int getOutputSize(int) throws java.lang.IllegalStateException;
    method public final java.security.Provider getProvider();
    method public final void init(java.security.Key) throws javax.crypto.ExemptionMechanismException, java.security.InvalidKeyException;
    method public final void init(java.security.Key, java.security.AlgorithmParameters) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final boolean isCryptoAllowed(java.security.Key) throws javax.crypto.ExemptionMechanismException;
  }

  public class ExemptionMechanismException extends java.security.GeneralSecurityException {
    ctor public ExemptionMechanismException(java.lang.String);
    ctor public ExemptionMechanismException();
  }

  public abstract class ExemptionMechanismSpi {
    ctor public ExemptionMechanismSpi();
    method protected abstract byte[] engineGenExemptionBlob() throws javax.crypto.ExemptionMechanismException;
    method protected abstract int engineGenExemptionBlob(byte[], int) throws javax.crypto.ExemptionMechanismException, javax.crypto.ShortBufferException;
    method protected abstract int engineGetOutputSize(int);
    method protected abstract void engineInit(java.security.Key) throws javax.crypto.ExemptionMechanismException, java.security.InvalidKeyException;
    method protected abstract void engineInit(java.security.Key, java.security.AlgorithmParameters) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method protected abstract void engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
  }

  public class IllegalBlockSizeException extends java.security.GeneralSecurityException {
    ctor public IllegalBlockSizeException(java.lang.String);
    ctor public IllegalBlockSizeException();
  }

  public class KeyAgreement {
    ctor protected KeyAgreement(javax.crypto.KeyAgreementSpi, java.security.Provider, java.lang.String);
    method public final java.security.Key doPhase(java.security.Key, boolean) throws java.lang.IllegalStateException, java.security.InvalidKeyException;
    method public final byte[] generateSecret() throws java.lang.IllegalStateException;
    method public final int generateSecret(byte[], int) throws java.lang.IllegalStateException, javax.crypto.ShortBufferException;
    method public final javax.crypto.SecretKey generateSecret(java.lang.String) throws java.lang.IllegalStateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
    method public final java.lang.String getAlgorithm();
    method public static final javax.crypto.KeyAgreement getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final javax.crypto.KeyAgreement getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static final javax.crypto.KeyAgreement getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public final void init(java.security.Key) throws java.security.InvalidKeyException;
    method public final void init(java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
  }

  public abstract class KeyAgreementSpi {
    ctor public KeyAgreementSpi();
    method protected abstract java.security.Key engineDoPhase(java.security.Key, boolean) throws java.lang.IllegalStateException, java.security.InvalidKeyException;
    method protected abstract byte[] engineGenerateSecret() throws java.lang.IllegalStateException;
    method protected abstract int engineGenerateSecret(byte[], int) throws java.lang.IllegalStateException, javax.crypto.ShortBufferException;
    method protected abstract javax.crypto.SecretKey engineGenerateSecret(java.lang.String) throws java.lang.IllegalStateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
    method protected abstract void engineInit(java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
    method protected abstract void engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
  }

  public class KeyGenerator {
    ctor protected KeyGenerator(javax.crypto.KeyGeneratorSpi, java.security.Provider, java.lang.String);
    method public final javax.crypto.SecretKey generateKey();
    method public final java.lang.String getAlgorithm();
    method public static final javax.crypto.KeyGenerator getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final javax.crypto.KeyGenerator getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static final javax.crypto.KeyGenerator getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public final void init(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
    method public final void init(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
    method public final void init(int);
    method public final void init(int, java.security.SecureRandom);
    method public final void init(java.security.SecureRandom);
  }

  public abstract class KeyGeneratorSpi {
    ctor public KeyGeneratorSpi();
    method protected abstract javax.crypto.SecretKey engineGenerateKey();
    method protected abstract void engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
    method protected abstract void engineInit(int, java.security.SecureRandom);
    method protected abstract void engineInit(java.security.SecureRandom);
  }

  public class Mac implements java.lang.Cloneable {
    ctor protected Mac(javax.crypto.MacSpi, java.security.Provider, java.lang.String);
    method public final java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method public final byte[] doFinal() throws java.lang.IllegalStateException;
    method public final void doFinal(byte[], int) throws java.lang.IllegalStateException, javax.crypto.ShortBufferException;
    method public final byte[] doFinal(byte[]) throws java.lang.IllegalStateException;
    method public final java.lang.String getAlgorithm();
    method public static final javax.crypto.Mac getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final javax.crypto.Mac getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static final javax.crypto.Mac getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final int getMacLength();
    method public final java.security.Provider getProvider();
    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method public final void init(java.security.Key) throws java.security.InvalidKeyException;
    method public final void reset();
    method public final void update(byte) throws java.lang.IllegalStateException;
    method public final void update(byte[], int, int) throws java.lang.IllegalStateException;
    method public final void update(byte[]) throws java.lang.IllegalStateException;
    method public final void update(java.nio.ByteBuffer);
  }

  public abstract class MacSpi {
    ctor public MacSpi();
    method public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method protected abstract byte[] engineDoFinal();
    method protected abstract int engineGetMacLength();
    method protected abstract void engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method protected abstract void engineReset();
    method protected abstract void engineUpdate(byte);
    method protected abstract void engineUpdate(byte[], int, int);
    method protected void engineUpdate(java.nio.ByteBuffer);
  }

  public class NoSuchPaddingException extends java.security.GeneralSecurityException {
    ctor public NoSuchPaddingException(java.lang.String);
    ctor public NoSuchPaddingException();
  }

  public class NullCipher extends javax.crypto.Cipher {
    ctor public NullCipher();
  }

  public class SealedObject implements java.io.Serializable {
    ctor public SealedObject(java.io.Serializable, javax.crypto.Cipher) throws java.io.IOException, javax.crypto.IllegalBlockSizeException;
    ctor protected SealedObject(javax.crypto.SealedObject);
    method public final java.lang.String getAlgorithm();
    method public final java.lang.Object getObject(java.security.Key) throws java.lang.ClassNotFoundException, java.io.IOException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
    method public final java.lang.Object getObject(javax.crypto.Cipher) throws javax.crypto.BadPaddingException, java.lang.ClassNotFoundException, java.io.IOException, javax.crypto.IllegalBlockSizeException;
    method public final java.lang.Object getObject(java.security.Key, java.lang.String) throws java.lang.ClassNotFoundException, java.io.IOException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    field protected byte[] encodedParams;
  }

  public abstract interface SecretKey implements java.security.Key {
    field public static final long serialVersionUID = -4795878709595146952L; // 0xbd719db928b8f538L
  }

  public class SecretKeyFactory {
    ctor protected SecretKeyFactory(javax.crypto.SecretKeyFactorySpi, java.security.Provider, java.lang.String);
    method public final javax.crypto.SecretKey generateSecret(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
    method public final java.lang.String getAlgorithm();
    method public static final javax.crypto.SecretKeyFactory getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final javax.crypto.SecretKeyFactory getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static final javax.crypto.SecretKeyFactory getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.spec.KeySpec getKeySpec(javax.crypto.SecretKey, java.lang.Class) throws java.security.spec.InvalidKeySpecException;
    method public final java.security.Provider getProvider();
    method public final javax.crypto.SecretKey translateKey(javax.crypto.SecretKey) throws java.security.InvalidKeyException;
  }

  public abstract class SecretKeyFactorySpi {
    ctor public SecretKeyFactorySpi();
    method protected abstract javax.crypto.SecretKey engineGenerateSecret(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
    method protected abstract java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey, java.lang.Class) throws java.security.spec.InvalidKeySpecException;
    method protected abstract javax.crypto.SecretKey engineTranslateKey(javax.crypto.SecretKey) throws java.security.InvalidKeyException;
  }

  public class ShortBufferException extends java.security.GeneralSecurityException {
    ctor public ShortBufferException(java.lang.String);
    ctor public ShortBufferException();
  }

}

package javax.crypto.interfaces {

  public abstract interface DHKey {
    method public abstract javax.crypto.spec.DHParameterSpec getParams();
  }

  public abstract interface DHPrivateKey implements javax.crypto.interfaces.DHKey java.security.PrivateKey {
    method public abstract java.math.BigInteger getX();
    field public static final long serialVersionUID = 2211791113380396553L; // 0x1eb1dc4c8e677e09L
  }

  public abstract interface DHPublicKey implements javax.crypto.interfaces.DHKey java.security.PublicKey {
    method public abstract java.math.BigInteger getY();
    field public static final long serialVersionUID = -6628103563352519193L; // 0xa4043eed23df4de7L
  }

  public abstract interface PBEKey implements javax.crypto.SecretKey {
    method public abstract int getIterationCount();
    method public abstract char[] getPassword();
    method public abstract byte[] getSalt();
    field public static final long serialVersionUID = -1430015993304333921L; // 0xec279007d7f7c19fL
  }

}

package javax.crypto.spec {

  public class DESKeySpec implements java.security.spec.KeySpec {
    ctor public DESKeySpec(byte[]) throws java.security.InvalidKeyException;
    ctor public DESKeySpec(byte[], int) throws java.security.InvalidKeyException;
    method public byte[] getKey();
    method public static boolean isParityAdjusted(byte[], int) throws java.security.InvalidKeyException;
    method public static boolean isWeak(byte[], int) throws java.security.InvalidKeyException;
    field public static final int DES_KEY_LEN = 8; // 0x8
  }

  public class DESedeKeySpec implements java.security.spec.KeySpec {
    ctor public DESedeKeySpec(byte[]) throws java.security.InvalidKeyException;
    ctor public DESedeKeySpec(byte[], int) throws java.security.InvalidKeyException;
    method public byte[] getKey();
    method public static boolean isParityAdjusted(byte[], int) throws java.security.InvalidKeyException;
    field public static final int DES_EDE_KEY_LEN = 24; // 0x18
  }

  public class DHGenParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public DHGenParameterSpec(int, int);
    method public int getExponentSize();
    method public int getPrimeSize();
  }

  public class DHParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public DHParameterSpec(java.math.BigInteger, java.math.BigInteger);
    ctor public DHParameterSpec(java.math.BigInteger, java.math.BigInteger, int);
    method public java.math.BigInteger getG();
    method public int getL();
    method public java.math.BigInteger getP();
  }

  public class DHPrivateKeySpec implements java.security.spec.KeySpec {
    ctor public DHPrivateKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getG();
    method public java.math.BigInteger getP();
    method public java.math.BigInteger getX();
  }

  public class DHPublicKeySpec implements java.security.spec.KeySpec {
    ctor public DHPublicKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public java.math.BigInteger getG();
    method public java.math.BigInteger getP();
    method public java.math.BigInteger getY();
  }

  public class GCMParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public GCMParameterSpec(int, byte[]);
    ctor public GCMParameterSpec(int, byte[], int, int);
    method public byte[] getIV();
    method public int getTLen();
  }

  public class IvParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public IvParameterSpec(byte[]);
    ctor public IvParameterSpec(byte[], int, int);
    method public byte[] getIV();
  }

  public class OAEPParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public OAEPParameterSpec(java.lang.String, java.lang.String, java.security.spec.AlgorithmParameterSpec, javax.crypto.spec.PSource);
    method public java.lang.String getDigestAlgorithm();
    method public java.lang.String getMGFAlgorithm();
    method public java.security.spec.AlgorithmParameterSpec getMGFParameters();
    method public javax.crypto.spec.PSource getPSource();
    field public static final javax.crypto.spec.OAEPParameterSpec DEFAULT;
  }

  public class PBEKeySpec implements java.security.spec.KeySpec {
    ctor public PBEKeySpec(char[]);
    ctor public PBEKeySpec(char[], byte[], int, int);
    ctor public PBEKeySpec(char[], byte[], int);
    method public final void clearPassword();
    method public final int getIterationCount();
    method public final int getKeyLength();
    method public final char[] getPassword();
    method public final byte[] getSalt();
  }

  public class PBEParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public PBEParameterSpec(byte[], int);
    method public int getIterationCount();
    method public byte[] getSalt();
  }

  public class PSource {
    ctor protected PSource(java.lang.String);
    method public java.lang.String getAlgorithm();
  }

  public static final class PSource.PSpecified extends javax.crypto.spec.PSource {
    ctor public PSource.PSpecified(byte[]);
    method public byte[] getValue();
    field public static final javax.crypto.spec.PSource.PSpecified DEFAULT;
  }

  public class RC2ParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public RC2ParameterSpec(int);
    ctor public RC2ParameterSpec(int, byte[]);
    ctor public RC2ParameterSpec(int, byte[], int);
    method public int getEffectiveKeyBits();
    method public byte[] getIV();
  }

  public class RC5ParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    ctor public RC5ParameterSpec(int, int, int);
    ctor public RC5ParameterSpec(int, int, int, byte[]);
    ctor public RC5ParameterSpec(int, int, int, byte[], int);
    method public byte[] getIV();
    method public int getRounds();
    method public int getVersion();
    method public int getWordSize();
  }

  public class SecretKeySpec implements java.security.spec.KeySpec javax.crypto.SecretKey java.io.Serializable {
    ctor public SecretKeySpec(byte[], java.lang.String);
    ctor public SecretKeySpec(byte[], int, int, java.lang.String);
    method public java.lang.String getAlgorithm();
    method public byte[] getEncoded();
    method public java.lang.String getFormat();
  }

}

package javax.microedition.khronos.egl {

  public abstract interface EGL {
  }

  public abstract interface EGL10 implements javax.microedition.khronos.egl.EGL {
    method public abstract boolean eglChooseConfig(javax.microedition.khronos.egl.EGLDisplay, int[], javax.microedition.khronos.egl.EGLConfig[], int, int[]);
    method public abstract boolean eglCopyBuffers(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLSurface, java.lang.Object);
    method public abstract javax.microedition.khronos.egl.EGLContext eglCreateContext(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig, javax.microedition.khronos.egl.EGLContext, int[]);
    method public abstract javax.microedition.khronos.egl.EGLSurface eglCreatePbufferSurface(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig, int[]);
    method public abstract javax.microedition.khronos.egl.EGLSurface eglCreatePixmapSurface(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig, java.lang.Object, int[]);
    method public abstract javax.microedition.khronos.egl.EGLSurface eglCreateWindowSurface(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig, java.lang.Object, int[]);
    method public abstract boolean eglDestroyContext(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLContext);
    method public abstract boolean eglDestroySurface(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLSurface);
    method public abstract boolean eglGetConfigAttrib(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig, int, int[]);
    method public abstract boolean eglGetConfigs(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig[], int, int[]);
    method public abstract javax.microedition.khronos.egl.EGLContext eglGetCurrentContext();
    method public abstract javax.microedition.khronos.egl.EGLDisplay eglGetCurrentDisplay();
    method public abstract javax.microedition.khronos.egl.EGLSurface eglGetCurrentSurface(int);
    method public abstract javax.microedition.khronos.egl.EGLDisplay eglGetDisplay(java.lang.Object);
    method public abstract int eglGetError();
    method public abstract boolean eglInitialize(javax.microedition.khronos.egl.EGLDisplay, int[]);
    method public abstract boolean eglMakeCurrent(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLSurface, javax.microedition.khronos.egl.EGLSurface, javax.microedition.khronos.egl.EGLContext);
    method public abstract boolean eglQueryContext(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLContext, int, int[]);
    method public abstract java.lang.String eglQueryString(javax.microedition.khronos.egl.EGLDisplay, int);
    method public abstract boolean eglQuerySurface(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLSurface, int, int[]);
    method public abstract boolean eglSwapBuffers(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLSurface);
    method public abstract boolean eglTerminate(javax.microedition.khronos.egl.EGLDisplay);
    method public abstract boolean eglWaitGL();
    method public abstract boolean eglWaitNative(int, java.lang.Object);
    field public static final int EGL_ALPHA_FORMAT = 12424; // 0x3088
    field public static final int EGL_ALPHA_MASK_SIZE = 12350; // 0x303e
    field public static final int EGL_ALPHA_SIZE = 12321; // 0x3021
    field public static final int EGL_BAD_ACCESS = 12290; // 0x3002
    field public static final int EGL_BAD_ALLOC = 12291; // 0x3003
    field public static final int EGL_BAD_ATTRIBUTE = 12292; // 0x3004
    field public static final int EGL_BAD_CONFIG = 12293; // 0x3005
    field public static final int EGL_BAD_CONTEXT = 12294; // 0x3006
    field public static final int EGL_BAD_CURRENT_SURFACE = 12295; // 0x3007
    field public static final int EGL_BAD_DISPLAY = 12296; // 0x3008
    field public static final int EGL_BAD_MATCH = 12297; // 0x3009
    field public static final int EGL_BAD_NATIVE_PIXMAP = 12298; // 0x300a
    field public static final int EGL_BAD_NATIVE_WINDOW = 12299; // 0x300b
    field public static final int EGL_BAD_PARAMETER = 12300; // 0x300c
    field public static final int EGL_BAD_SURFACE = 12301; // 0x300d
    field public static final int EGL_BLUE_SIZE = 12322; // 0x3022
    field public static final int EGL_BUFFER_SIZE = 12320; // 0x3020
    field public static final int EGL_COLORSPACE = 12423; // 0x3087
    field public static final int EGL_COLOR_BUFFER_TYPE = 12351; // 0x303f
    field public static final int EGL_CONFIG_CAVEAT = 12327; // 0x3027
    field public static final int EGL_CONFIG_ID = 12328; // 0x3028
    field public static final int EGL_CORE_NATIVE_ENGINE = 12379; // 0x305b
    field public static final java.lang.Object EGL_DEFAULT_DISPLAY;
    field public static final int EGL_DEPTH_SIZE = 12325; // 0x3025
    field public static final int EGL_DONT_CARE = -1; // 0xffffffff
    field public static final int EGL_DRAW = 12377; // 0x3059
    field public static final int EGL_EXTENSIONS = 12373; // 0x3055
    field public static final int EGL_GREEN_SIZE = 12323; // 0x3023
    field public static final int EGL_HEIGHT = 12374; // 0x3056
    field public static final int EGL_HORIZONTAL_RESOLUTION = 12432; // 0x3090
    field public static final int EGL_LARGEST_PBUFFER = 12376; // 0x3058
    field public static final int EGL_LEVEL = 12329; // 0x3029
    field public static final int EGL_LUMINANCE_BUFFER = 12431; // 0x308f
    field public static final int EGL_LUMINANCE_SIZE = 12349; // 0x303d
    field public static final int EGL_MAX_PBUFFER_HEIGHT = 12330; // 0x302a
    field public static final int EGL_MAX_PBUFFER_PIXELS = 12331; // 0x302b
    field public static final int EGL_MAX_PBUFFER_WIDTH = 12332; // 0x302c
    field public static final int EGL_NATIVE_RENDERABLE = 12333; // 0x302d
    field public static final int EGL_NATIVE_VISUAL_ID = 12334; // 0x302e
    field public static final int EGL_NATIVE_VISUAL_TYPE = 12335; // 0x302f
    field public static final int EGL_NONE = 12344; // 0x3038
    field public static final int EGL_NON_CONFORMANT_CONFIG = 12369; // 0x3051
    field public static final int EGL_NOT_INITIALIZED = 12289; // 0x3001
    field public static final javax.microedition.khronos.egl.EGLContext EGL_NO_CONTEXT;
    field public static final javax.microedition.khronos.egl.EGLDisplay EGL_NO_DISPLAY;
    field public static final javax.microedition.khronos.egl.EGLSurface EGL_NO_SURFACE;
    field public static final int EGL_PBUFFER_BIT = 1; // 0x1
    field public static final int EGL_PIXEL_ASPECT_RATIO = 12434; // 0x3092
    field public static final int EGL_PIXMAP_BIT = 2; // 0x2
    field public static final int EGL_READ = 12378; // 0x305a
    field public static final int EGL_RED_SIZE = 12324; // 0x3024
    field public static final int EGL_RENDERABLE_TYPE = 12352; // 0x3040
    field public static final int EGL_RENDER_BUFFER = 12422; // 0x3086
    field public static final int EGL_RGB_BUFFER = 12430; // 0x308e
    field public static final int EGL_SAMPLES = 12337; // 0x3031
    field public static final int EGL_SAMPLE_BUFFERS = 12338; // 0x3032
    field public static final int EGL_SINGLE_BUFFER = 12421; // 0x3085
    field public static final int EGL_SLOW_CONFIG = 12368; // 0x3050
    field public static final int EGL_STENCIL_SIZE = 12326; // 0x3026
    field public static final int EGL_SUCCESS = 12288; // 0x3000
    field public static final int EGL_SURFACE_TYPE = 12339; // 0x3033
    field public static final int EGL_TRANSPARENT_BLUE_VALUE = 12341; // 0x3035
    field public static final int EGL_TRANSPARENT_GREEN_VALUE = 12342; // 0x3036
    field public static final int EGL_TRANSPARENT_RED_VALUE = 12343; // 0x3037
    field public static final int EGL_TRANSPARENT_RGB = 12370; // 0x3052
    field public static final int EGL_TRANSPARENT_TYPE = 12340; // 0x3034
    field public static final int EGL_VENDOR = 12371; // 0x3053
    field public static final int EGL_VERSION = 12372; // 0x3054
    field public static final int EGL_VERTICAL_RESOLUTION = 12433; // 0x3091
    field public static final int EGL_WIDTH = 12375; // 0x3057
    field public static final int EGL_WINDOW_BIT = 4; // 0x4
  }

  public abstract interface EGL11 implements javax.microedition.khronos.egl.EGL10 {
    field public static final int EGL_CONTEXT_LOST = 12302; // 0x300e
  }

  public abstract class EGLConfig {
    ctor public EGLConfig();
  }

  public abstract class EGLContext {
    ctor public EGLContext();
    method public static javax.microedition.khronos.egl.EGL getEGL();
    method public abstract javax.microedition.khronos.opengles.GL getGL();
  }

  public abstract class EGLDisplay {
    ctor public EGLDisplay();
  }

  public abstract class EGLSurface {
    ctor public EGLSurface();
  }

}

package javax.microedition.khronos.opengles {

  public abstract interface GL {
  }

  public abstract interface GL10 implements javax.microedition.khronos.opengles.GL {
    method public abstract void glActiveTexture(int);
    method public abstract void glAlphaFunc(int, float);
    method public abstract void glAlphaFuncx(int, int);
    method public abstract void glBindTexture(int, int);
    method public abstract void glBlendFunc(int, int);
    method public abstract void glClear(int);
    method public abstract void glClearColor(float, float, float, float);
    method public abstract void glClearColorx(int, int, int, int);
    method public abstract void glClearDepthf(float);
    method public abstract void glClearDepthx(int);
    method public abstract void glClearStencil(int);
    method public abstract void glClientActiveTexture(int);
    method public abstract void glColor4f(float, float, float, float);
    method public abstract void glColor4x(int, int, int, int);
    method public abstract void glColorMask(boolean, boolean, boolean, boolean);
    method public abstract void glColorPointer(int, int, int, java.nio.Buffer);
    method public abstract void glCompressedTexImage2D(int, int, int, int, int, int, int, java.nio.Buffer);
    method public abstract void glCompressedTexSubImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public abstract void glCopyTexImage2D(int, int, int, int, int, int, int, int);
    method public abstract void glCopyTexSubImage2D(int, int, int, int, int, int, int, int);
    method public abstract void glCullFace(int);
    method public abstract void glDeleteTextures(int, int[], int);
    method public abstract void glDeleteTextures(int, java.nio.IntBuffer);
    method public abstract void glDepthFunc(int);
    method public abstract void glDepthMask(boolean);
    method public abstract void glDepthRangef(float, float);
    method public abstract void glDepthRangex(int, int);
    method public abstract void glDisable(int);
    method public abstract void glDisableClientState(int);
    method public abstract void glDrawArrays(int, int, int);
    method public abstract void glDrawElements(int, int, int, java.nio.Buffer);
    method public abstract void glEnable(int);
    method public abstract void glEnableClientState(int);
    method public abstract void glFinish();
    method public abstract void glFlush();
    method public abstract void glFogf(int, float);
    method public abstract void glFogfv(int, float[], int);
    method public abstract void glFogfv(int, java.nio.FloatBuffer);
    method public abstract void glFogx(int, int);
    method public abstract void glFogxv(int, int[], int);
    method public abstract void glFogxv(int, java.nio.IntBuffer);
    method public abstract void glFrontFace(int);
    method public abstract void glFrustumf(float, float, float, float, float, float);
    method public abstract void glFrustumx(int, int, int, int, int, int);
    method public abstract void glGenTextures(int, int[], int);
    method public abstract void glGenTextures(int, java.nio.IntBuffer);
    method public abstract int glGetError();
    method public abstract void glGetIntegerv(int, int[], int);
    method public abstract void glGetIntegerv(int, java.nio.IntBuffer);
    method public abstract java.lang.String glGetString(int);
    method public abstract void glHint(int, int);
    method public abstract void glLightModelf(int, float);
    method public abstract void glLightModelfv(int, float[], int);
    method public abstract void glLightModelfv(int, java.nio.FloatBuffer);
    method public abstract void glLightModelx(int, int);
    method public abstract void glLightModelxv(int, int[], int);
    method public abstract void glLightModelxv(int, java.nio.IntBuffer);
    method public abstract void glLightf(int, int, float);
    method public abstract void glLightfv(int, int, float[], int);
    method public abstract void glLightfv(int, int, java.nio.FloatBuffer);
    method public abstract void glLightx(int, int, int);
    method public abstract void glLightxv(int, int, int[], int);
    method public abstract void glLightxv(int, int, java.nio.IntBuffer);
    method public abstract void glLineWidth(float);
    method public abstract void glLineWidthx(int);
    method public abstract void glLoadIdentity();
    method public abstract void glLoadMatrixf(float[], int);
    method public abstract void glLoadMatrixf(java.nio.FloatBuffer);
    method public abstract void glLoadMatrixx(int[], int);
    method public abstract void glLoadMatrixx(java.nio.IntBuffer);
    method public abstract void glLogicOp(int);
    method public abstract void glMaterialf(int, int, float);
    method public abstract void glMaterialfv(int, int, float[], int);
    method public abstract void glMaterialfv(int, int, java.nio.FloatBuffer);
    method public abstract void glMaterialx(int, int, int);
    method public abstract void glMaterialxv(int, int, int[], int);
    method public abstract void glMaterialxv(int, int, java.nio.IntBuffer);
    method public abstract void glMatrixMode(int);
    method public abstract void glMultMatrixf(float[], int);
    method public abstract void glMultMatrixf(java.nio.FloatBuffer);
    method public abstract void glMultMatrixx(int[], int);
    method public abstract void glMultMatrixx(java.nio.IntBuffer);
    method public abstract void glMultiTexCoord4f(int, float, float, float, float);
    method public abstract void glMultiTexCoord4x(int, int, int, int, int);
    method public abstract void glNormal3f(float, float, float);
    method public abstract void glNormal3x(int, int, int);
    method public abstract void glNormalPointer(int, int, java.nio.Buffer);
    method public abstract void glOrthof(float, float, float, float, float, float);
    method public abstract void glOrthox(int, int, int, int, int, int);
    method public abstract void glPixelStorei(int, int);
    method public abstract void glPointSize(float);
    method public abstract void glPointSizex(int);
    method public abstract void glPolygonOffset(float, float);
    method public abstract void glPolygonOffsetx(int, int);
    method public abstract void glPopMatrix();
    method public abstract void glPushMatrix();
    method public abstract void glReadPixels(int, int, int, int, int, int, java.nio.Buffer);
    method public abstract void glRotatef(float, float, float, float);
    method public abstract void glRotatex(int, int, int, int);
    method public abstract void glSampleCoverage(float, boolean);
    method public abstract void glSampleCoveragex(int, boolean);
    method public abstract void glScalef(float, float, float);
    method public abstract void glScalex(int, int, int);
    method public abstract void glScissor(int, int, int, int);
    method public abstract void glShadeModel(int);
    method public abstract void glStencilFunc(int, int, int);
    method public abstract void glStencilMask(int);
    method public abstract void glStencilOp(int, int, int);
    method public abstract void glTexCoordPointer(int, int, int, java.nio.Buffer);
    method public abstract void glTexEnvf(int, int, float);
    method public abstract void glTexEnvfv(int, int, float[], int);
    method public abstract void glTexEnvfv(int, int, java.nio.FloatBuffer);
    method public abstract void glTexEnvx(int, int, int);
    method public abstract void glTexEnvxv(int, int, int[], int);
    method public abstract void glTexEnvxv(int, int, java.nio.IntBuffer);
    method public abstract void glTexImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public abstract void glTexParameterf(int, int, float);
    method public abstract void glTexParameterx(int, int, int);
    method public abstract void glTexSubImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer);
    method public abstract void glTranslatef(float, float, float);
    method public abstract void glTranslatex(int, int, int);
    method public abstract void glVertexPointer(int, int, int, java.nio.Buffer);
    method public abstract void glViewport(int, int, int, int);
    field public static final int GL_ADD = 260; // 0x104
    field public static final int GL_ALIASED_LINE_WIDTH_RANGE = 33902; // 0x846e
    field public static final int GL_ALIASED_POINT_SIZE_RANGE = 33901; // 0x846d
    field public static final int GL_ALPHA = 6406; // 0x1906
    field public static final int GL_ALPHA_BITS = 3413; // 0xd55
    field public static final int GL_ALPHA_TEST = 3008; // 0xbc0
    field public static final int GL_ALWAYS = 519; // 0x207
    field public static final int GL_AMBIENT = 4608; // 0x1200
    field public static final int GL_AMBIENT_AND_DIFFUSE = 5634; // 0x1602
    field public static final int GL_AND = 5377; // 0x1501
    field public static final int GL_AND_INVERTED = 5380; // 0x1504
    field public static final int GL_AND_REVERSE = 5378; // 0x1502
    field public static final int GL_BACK = 1029; // 0x405
    field public static final int GL_BLEND = 3042; // 0xbe2
    field public static final int GL_BLUE_BITS = 3412; // 0xd54
    field public static final int GL_BYTE = 5120; // 0x1400
    field public static final int GL_CCW = 2305; // 0x901
    field public static final int GL_CLAMP_TO_EDGE = 33071; // 0x812f
    field public static final int GL_CLEAR = 5376; // 0x1500
    field public static final int GL_COLOR_ARRAY = 32886; // 0x8076
    field public static final int GL_COLOR_BUFFER_BIT = 16384; // 0x4000
    field public static final int GL_COLOR_LOGIC_OP = 3058; // 0xbf2
    field public static final int GL_COLOR_MATERIAL = 2903; // 0xb57
    field public static final int GL_COMPRESSED_TEXTURE_FORMATS = 34467; // 0x86a3
    field public static final int GL_CONSTANT_ATTENUATION = 4615; // 0x1207
    field public static final int GL_COPY = 5379; // 0x1503
    field public static final int GL_COPY_INVERTED = 5388; // 0x150c
    field public static final int GL_CULL_FACE = 2884; // 0xb44
    field public static final int GL_CW = 2304; // 0x900
    field public static final int GL_DECAL = 8449; // 0x2101
    field public static final int GL_DECR = 7683; // 0x1e03
    field public static final int GL_DEPTH_BITS = 3414; // 0xd56
    field public static final int GL_DEPTH_BUFFER_BIT = 256; // 0x100
    field public static final int GL_DEPTH_TEST = 2929; // 0xb71
    field public static final int GL_DIFFUSE = 4609; // 0x1201
    field public static final int GL_DITHER = 3024; // 0xbd0
    field public static final int GL_DONT_CARE = 4352; // 0x1100
    field public static final int GL_DST_ALPHA = 772; // 0x304
    field public static final int GL_DST_COLOR = 774; // 0x306
    field public static final int GL_EMISSION = 5632; // 0x1600
    field public static final int GL_EQUAL = 514; // 0x202
    field public static final int GL_EQUIV = 5385; // 0x1509
    field public static final int GL_EXP = 2048; // 0x800
    field public static final int GL_EXP2 = 2049; // 0x801
    field public static final int GL_EXTENSIONS = 7939; // 0x1f03
    field public static final int GL_FALSE = 0; // 0x0
    field public static final int GL_FASTEST = 4353; // 0x1101
    field public static final int GL_FIXED = 5132; // 0x140c
    field public static final int GL_FLAT = 7424; // 0x1d00
    field public static final int GL_FLOAT = 5126; // 0x1406
    field public static final int GL_FOG = 2912; // 0xb60
    field public static final int GL_FOG_COLOR = 2918; // 0xb66
    field public static final int GL_FOG_DENSITY = 2914; // 0xb62
    field public static final int GL_FOG_END = 2916; // 0xb64
    field public static final int GL_FOG_HINT = 3156; // 0xc54
    field public static final int GL_FOG_MODE = 2917; // 0xb65
    field public static final int GL_FOG_START = 2915; // 0xb63
    field public static final int GL_FRONT = 1028; // 0x404
    field public static final int GL_FRONT_AND_BACK = 1032; // 0x408
    field public static final int GL_GEQUAL = 518; // 0x206
    field public static final int GL_GREATER = 516; // 0x204
    field public static final int GL_GREEN_BITS = 3411; // 0xd53
    field public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = 35739; // 0x8b9b
    field public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = 35738; // 0x8b9a
    field public static final int GL_INCR = 7682; // 0x1e02
    field public static final int GL_INVALID_ENUM = 1280; // 0x500
    field public static final int GL_INVALID_OPERATION = 1282; // 0x502
    field public static final int GL_INVALID_VALUE = 1281; // 0x501
    field public static final int GL_INVERT = 5386; // 0x150a
    field public static final int GL_KEEP = 7680; // 0x1e00
    field public static final int GL_LEQUAL = 515; // 0x203
    field public static final int GL_LESS = 513; // 0x201
    field public static final int GL_LIGHT0 = 16384; // 0x4000
    field public static final int GL_LIGHT1 = 16385; // 0x4001
    field public static final int GL_LIGHT2 = 16386; // 0x4002
    field public static final int GL_LIGHT3 = 16387; // 0x4003
    field public static final int GL_LIGHT4 = 16388; // 0x4004
    field public static final int GL_LIGHT5 = 16389; // 0x4005
    field public static final int GL_LIGHT6 = 16390; // 0x4006
    field public static final int GL_LIGHT7 = 16391; // 0x4007
    field public static final int GL_LIGHTING = 2896; // 0xb50
    field public static final int GL_LIGHT_MODEL_AMBIENT = 2899; // 0xb53
    field public static final int GL_LIGHT_MODEL_TWO_SIDE = 2898; // 0xb52
    field public static final int GL_LINEAR = 9729; // 0x2601
    field public static final int GL_LINEAR_ATTENUATION = 4616; // 0x1208
    field public static final int GL_LINEAR_MIPMAP_LINEAR = 9987; // 0x2703
    field public static final int GL_LINEAR_MIPMAP_NEAREST = 9985; // 0x2701
    field public static final int GL_LINES = 1; // 0x1
    field public static final int GL_LINE_LOOP = 2; // 0x2
    field public static final int GL_LINE_SMOOTH = 2848; // 0xb20
    field public static final int GL_LINE_SMOOTH_HINT = 3154; // 0xc52
    field public static final int GL_LINE_STRIP = 3; // 0x3
    field public static final int GL_LUMINANCE = 6409; // 0x1909
    field public static final int GL_LUMINANCE_ALPHA = 6410; // 0x190a
    field public static final int GL_MAX_ELEMENTS_INDICES = 33001; // 0x80e9
    field public static final int GL_MAX_ELEMENTS_VERTICES = 33000; // 0x80e8
    field public static final int GL_MAX_LIGHTS = 3377; // 0xd31
    field public static final int GL_MAX_MODELVIEW_STACK_DEPTH = 3382; // 0xd36
    field public static final int GL_MAX_PROJECTION_STACK_DEPTH = 3384; // 0xd38
    field public static final int GL_MAX_TEXTURE_SIZE = 3379; // 0xd33
    field public static final int GL_MAX_TEXTURE_STACK_DEPTH = 3385; // 0xd39
    field public static final int GL_MAX_TEXTURE_UNITS = 34018; // 0x84e2
    field public static final int GL_MAX_VIEWPORT_DIMS = 3386; // 0xd3a
    field public static final int GL_MODELVIEW = 5888; // 0x1700
    field public static final int GL_MODULATE = 8448; // 0x2100
    field public static final int GL_MULTISAMPLE = 32925; // 0x809d
    field public static final int GL_NAND = 5390; // 0x150e
    field public static final int GL_NEAREST = 9728; // 0x2600
    field public static final int GL_NEAREST_MIPMAP_LINEAR = 9986; // 0x2702
    field public static final int GL_NEAREST_MIPMAP_NEAREST = 9984; // 0x2700
    field public static final int GL_NEVER = 512; // 0x200
    field public static final int GL_NICEST = 4354; // 0x1102
    field public static final int GL_NOOP = 5381; // 0x1505
    field public static final int GL_NOR = 5384; // 0x1508
    field public static final int GL_NORMALIZE = 2977; // 0xba1
    field public static final int GL_NORMAL_ARRAY = 32885; // 0x8075
    field public static final int GL_NOTEQUAL = 517; // 0x205
    field public static final int GL_NO_ERROR = 0; // 0x0
    field public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 34466; // 0x86a2
    field public static final int GL_ONE = 1; // 0x1
    field public static final int GL_ONE_MINUS_DST_ALPHA = 773; // 0x305
    field public static final int GL_ONE_MINUS_DST_COLOR = 775; // 0x307
    field public static final int GL_ONE_MINUS_SRC_ALPHA = 771; // 0x303
    field public static final int GL_ONE_MINUS_SRC_COLOR = 769; // 0x301
    field public static final int GL_OR = 5383; // 0x1507
    field public static final int GL_OR_INVERTED = 5389; // 0x150d
    field public static final int GL_OR_REVERSE = 5387; // 0x150b
    field public static final int GL_OUT_OF_MEMORY = 1285; // 0x505
    field public static final int GL_PACK_ALIGNMENT = 3333; // 0xd05
    field public static final int GL_PALETTE4_R5_G6_B5_OES = 35730; // 0x8b92
    field public static final int GL_PALETTE4_RGB5_A1_OES = 35732; // 0x8b94
    field public static final int GL_PALETTE4_RGB8_OES = 35728; // 0x8b90
    field public static final int GL_PALETTE4_RGBA4_OES = 35731; // 0x8b93
    field public static final int GL_PALETTE4_RGBA8_OES = 35729; // 0x8b91
    field public static final int GL_PALETTE8_R5_G6_B5_OES = 35735; // 0x8b97
    field public static final int GL_PALETTE8_RGB5_A1_OES = 35737; // 0x8b99
    field public static final int GL_PALETTE8_RGB8_OES = 35733; // 0x8b95
    field public static final int GL_PALETTE8_RGBA4_OES = 35736; // 0x8b98
    field public static final int GL_PALETTE8_RGBA8_OES = 35734; // 0x8b96
    field public static final int GL_PERSPECTIVE_CORRECTION_HINT = 3152; // 0xc50
    field public static final int GL_POINTS = 0; // 0x0
    field public static final int GL_POINT_FADE_THRESHOLD_SIZE = 33064; // 0x8128
    field public static final int GL_POINT_SIZE = 2833; // 0xb11
    field public static final int GL_POINT_SMOOTH = 2832; // 0xb10
    field public static final int GL_POINT_SMOOTH_HINT = 3153; // 0xc51
    field public static final int GL_POLYGON_OFFSET_FILL = 32823; // 0x8037
    field public static final int GL_POLYGON_SMOOTH_HINT = 3155; // 0xc53
    field public static final int GL_POSITION = 4611; // 0x1203
    field public static final int GL_PROJECTION = 5889; // 0x1701
    field public static final int GL_QUADRATIC_ATTENUATION = 4617; // 0x1209
    field public static final int GL_RED_BITS = 3410; // 0xd52
    field public static final int GL_RENDERER = 7937; // 0x1f01
    field public static final int GL_REPEAT = 10497; // 0x2901
    field public static final int GL_REPLACE = 7681; // 0x1e01
    field public static final int GL_RESCALE_NORMAL = 32826; // 0x803a
    field public static final int GL_RGB = 6407; // 0x1907
    field public static final int GL_RGBA = 6408; // 0x1908
    field public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 32926; // 0x809e
    field public static final int GL_SAMPLE_ALPHA_TO_ONE = 32927; // 0x809f
    field public static final int GL_SAMPLE_COVERAGE = 32928; // 0x80a0
    field public static final int GL_SCISSOR_TEST = 3089; // 0xc11
    field public static final int GL_SET = 5391; // 0x150f
    field public static final int GL_SHININESS = 5633; // 0x1601
    field public static final int GL_SHORT = 5122; // 0x1402
    field public static final int GL_SMOOTH = 7425; // 0x1d01
    field public static final int GL_SMOOTH_LINE_WIDTH_RANGE = 2850; // 0xb22
    field public static final int GL_SMOOTH_POINT_SIZE_RANGE = 2834; // 0xb12
    field public static final int GL_SPECULAR = 4610; // 0x1202
    field public static final int GL_SPOT_CUTOFF = 4614; // 0x1206
    field public static final int GL_SPOT_DIRECTION = 4612; // 0x1204
    field public static final int GL_SPOT_EXPONENT = 4613; // 0x1205
    field public static final int GL_SRC_ALPHA = 770; // 0x302
    field public static final int GL_SRC_ALPHA_SATURATE = 776; // 0x308
    field public static final int GL_SRC_COLOR = 768; // 0x300
    field public static final int GL_STACK_OVERFLOW = 1283; // 0x503
    field public static final int GL_STACK_UNDERFLOW = 1284; // 0x504
    field public static final int GL_STENCIL_BITS = 3415; // 0xd57
    field public static final int GL_STENCIL_BUFFER_BIT = 1024; // 0x400
    field public static final int GL_STENCIL_TEST = 2960; // 0xb90
    field public static final int GL_SUBPIXEL_BITS = 3408; // 0xd50
    field public static final int GL_TEXTURE = 5890; // 0x1702
    field public static final int GL_TEXTURE0 = 33984; // 0x84c0
    field public static final int GL_TEXTURE1 = 33985; // 0x84c1
    field public static final int GL_TEXTURE10 = 33994; // 0x84ca
    field public static final int GL_TEXTURE11 = 33995; // 0x84cb
    field public static final int GL_TEXTURE12 = 33996; // 0x84cc
    field public static final int GL_TEXTURE13 = 33997; // 0x84cd
    field public static final int GL_TEXTURE14 = 33998; // 0x84ce
    field public static final int GL_TEXTURE15 = 33999; // 0x84cf
    field public static final int GL_TEXTURE16 = 34000; // 0x84d0
    field public static final int GL_TEXTURE17 = 34001; // 0x84d1
    field public static final int GL_TEXTURE18 = 34002; // 0x84d2
    field public static final int GL_TEXTURE19 = 34003; // 0x84d3
    field public static final int GL_TEXTURE2 = 33986; // 0x84c2
    field public static final int GL_TEXTURE20 = 34004; // 0x84d4
    field public static final int GL_TEXTURE21 = 34005; // 0x84d5
    field public static final int GL_TEXTURE22 = 34006; // 0x84d6
    field public static final int GL_TEXTURE23 = 34007; // 0x84d7
    field public static final int GL_TEXTURE24 = 34008; // 0x84d8
    field public static final int GL_TEXTURE25 = 34009; // 0x84d9
    field public static final int GL_TEXTURE26 = 34010; // 0x84da
    field public static final int GL_TEXTURE27 = 34011; // 0x84db
    field public static final int GL_TEXTURE28 = 34012; // 0x84dc
    field public static final int GL_TEXTURE29 = 34013; // 0x84dd
    field public static final int GL_TEXTURE3 = 33987; // 0x84c3
    field public static final int GL_TEXTURE30 = 34014; // 0x84de
    field public static final int GL_TEXTURE31 = 34015; // 0x84df
    field public static final int GL_TEXTURE4 = 33988; // 0x84c4
    field public static final int GL_TEXTURE5 = 33989; // 0x84c5
    field public static final int GL_TEXTURE6 = 33990; // 0x84c6
    field public static final int GL_TEXTURE7 = 33991; // 0x84c7
    field public static final int GL_TEXTURE8 = 33992; // 0x84c8
    field public static final int GL_TEXTURE9 = 33993; // 0x84c9
    field public static final int GL_TEXTURE_2D = 3553; // 0xde1
    field public static final int GL_TEXTURE_COORD_ARRAY = 32888; // 0x8078
    field public static final int GL_TEXTURE_ENV = 8960; // 0x2300
    field public static final int GL_TEXTURE_ENV_COLOR = 8705; // 0x2201
    field public static final int GL_TEXTURE_ENV_MODE = 8704; // 0x2200
    field public static final int GL_TEXTURE_MAG_FILTER = 10240; // 0x2800
    field public static final int GL_TEXTURE_MIN_FILTER = 10241; // 0x2801
    field public static final int GL_TEXTURE_WRAP_S = 10242; // 0x2802
    field public static final int GL_TEXTURE_WRAP_T = 10243; // 0x2803
    field public static final int GL_TRIANGLES = 4; // 0x4
    field public static final int GL_TRIANGLE_FAN = 6; // 0x6
    field public static final int GL_TRIANGLE_STRIP = 5; // 0x5
    field public static final int GL_TRUE = 1; // 0x1
    field public static final int GL_UNPACK_ALIGNMENT = 3317; // 0xcf5
    field public static final int GL_UNSIGNED_BYTE = 5121; // 0x1401
    field public static final int GL_UNSIGNED_SHORT = 5123; // 0x1403
    field public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 32819; // 0x8033
    field public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 32820; // 0x8034
    field public static final int GL_UNSIGNED_SHORT_5_6_5 = 33635; // 0x8363
    field public static final int GL_VENDOR = 7936; // 0x1f00
    field public static final int GL_VERSION = 7938; // 0x1f02
    field public static final int GL_VERTEX_ARRAY = 32884; // 0x8074
    field public static final int GL_XOR = 5382; // 0x1506
    field public static final int GL_ZERO = 0; // 0x0
  }

  public abstract interface GL10Ext implements javax.microedition.khronos.opengles.GL {
    method public abstract int glQueryMatrixxOES(int[], int, int[], int);
    method public abstract int glQueryMatrixxOES(java.nio.IntBuffer, java.nio.IntBuffer);
  }

  public abstract interface GL11 implements javax.microedition.khronos.opengles.GL10 {
    method public abstract void glBindBuffer(int, int);
    method public abstract void glBufferData(int, int, java.nio.Buffer, int);
    method public abstract void glBufferSubData(int, int, int, java.nio.Buffer);
    method public abstract void glClipPlanef(int, float[], int);
    method public abstract void glClipPlanef(int, java.nio.FloatBuffer);
    method public abstract void glClipPlanex(int, int[], int);
    method public abstract void glClipPlanex(int, java.nio.IntBuffer);
    method public abstract void glColor4ub(byte, byte, byte, byte);
    method public abstract void glColorPointer(int, int, int, int);
    method public abstract void glDeleteBuffers(int, int[], int);
    method public abstract void glDeleteBuffers(int, java.nio.IntBuffer);
    method public abstract void glDrawElements(int, int, int, int);
    method public abstract void glGenBuffers(int, int[], int);
    method public abstract void glGenBuffers(int, java.nio.IntBuffer);
    method public abstract void glGetBooleanv(int, boolean[], int);
    method public abstract void glGetBooleanv(int, java.nio.IntBuffer);
    method public abstract void glGetBufferParameteriv(int, int, int[], int);
    method public abstract void glGetBufferParameteriv(int, int, java.nio.IntBuffer);
    method public abstract void glGetClipPlanef(int, float[], int);
    method public abstract void glGetClipPlanef(int, java.nio.FloatBuffer);
    method public abstract void glGetClipPlanex(int, int[], int);
    method public abstract void glGetClipPlanex(int, java.nio.IntBuffer);
    method public abstract void glGetFixedv(int, int[], int);
    method public abstract void glGetFixedv(int, java.nio.IntBuffer);
    method public abstract void glGetFloatv(int, float[], int);
    method public abstract void glGetFloatv(int, java.nio.FloatBuffer);
    method public abstract void glGetLightfv(int, int, float[], int);
    method public abstract void glGetLightfv(int, int, java.nio.FloatBuffer);
    method public abstract void glGetLightxv(int, int, int[], int);
    method public abstract void glGetLightxv(int, int, java.nio.IntBuffer);
    method public abstract void glGetMaterialfv(int, int, float[], int);
    method public abstract void glGetMaterialfv(int, int, java.nio.FloatBuffer);
    method public abstract void glGetMaterialxv(int, int, int[], int);
    method public abstract void glGetMaterialxv(int, int, java.nio.IntBuffer);
    method public abstract void glGetPointerv(int, java.nio.Buffer[]);
    method public abstract void glGetTexEnviv(int, int, int[], int);
    method public abstract void glGetTexEnviv(int, int, java.nio.IntBuffer);
    method public abstract void glGetTexEnvxv(int, int, int[], int);
    method public abstract void glGetTexEnvxv(int, int, java.nio.IntBuffer);
    method public abstract void glGetTexParameterfv(int, int, float[], int);
    method public abstract void glGetTexParameterfv(int, int, java.nio.FloatBuffer);
    method public abstract void glGetTexParameteriv(int, int, int[], int);
    method public abstract void glGetTexParameteriv(int, int, java.nio.IntBuffer);
    method public abstract void glGetTexParameterxv(int, int, int[], int);
    method public abstract void glGetTexParameterxv(int, int, java.nio.IntBuffer);
    method public abstract boolean glIsBuffer(int);
    method public abstract boolean glIsEnabled(int);
    method public abstract boolean glIsTexture(int);
    method public abstract void glNormalPointer(int, int, int);
    method public abstract void glPointParameterf(int, float);
    method public abstract void glPointParameterfv(int, float[], int);
    method public abstract void glPointParameterfv(int, java.nio.FloatBuffer);
    method public abstract void glPointParameterx(int, int);
    method public abstract void glPointParameterxv(int, int[], int);
    method public abstract void glPointParameterxv(int, java.nio.IntBuffer);
    method public abstract void glPointSizePointerOES(int, int, java.nio.Buffer);
    method public abstract void glTexCoordPointer(int, int, int, int);
    method public abstract void glTexEnvi(int, int, int);
    method public abstract void glTexEnviv(int, int, int[], int);
    method public abstract void glTexEnviv(int, int, java.nio.IntBuffer);
    method public abstract void glTexParameterfv(int, int, float[], int);
    method public abstract void glTexParameterfv(int, int, java.nio.FloatBuffer);
    method public abstract void glTexParameteri(int, int, int);
    method public abstract void glTexParameteriv(int, int, int[], int);
    method public abstract void glTexParameteriv(int, int, java.nio.IntBuffer);
    method public abstract void glTexParameterxv(int, int, int[], int);
    method public abstract void glTexParameterxv(int, int, java.nio.IntBuffer);
    method public abstract void glVertexPointer(int, int, int, int);
    field public static final int GL_ACTIVE_TEXTURE = 34016; // 0x84e0
    field public static final int GL_ADD_SIGNED = 34164; // 0x8574
    field public static final int GL_ALPHA_SCALE = 3356; // 0xd1c
    field public static final int GL_ALPHA_TEST_FUNC = 3009; // 0xbc1
    field public static final int GL_ALPHA_TEST_REF = 3010; // 0xbc2
    field public static final int GL_ARRAY_BUFFER = 34962; // 0x8892
    field public static final int GL_ARRAY_BUFFER_BINDING = 34964; // 0x8894
    field public static final int GL_BLEND_DST = 3040; // 0xbe0
    field public static final int GL_BLEND_SRC = 3041; // 0xbe1
    field public static final int GL_BUFFER_ACCESS = 35003; // 0x88bb
    field public static final int GL_BUFFER_SIZE = 34660; // 0x8764
    field public static final int GL_BUFFER_USAGE = 34661; // 0x8765
    field public static final int GL_CLIENT_ACTIVE_TEXTURE = 34017; // 0x84e1
    field public static final int GL_CLIP_PLANE0 = 12288; // 0x3000
    field public static final int GL_CLIP_PLANE1 = 12289; // 0x3001
    field public static final int GL_CLIP_PLANE2 = 12290; // 0x3002
    field public static final int GL_CLIP_PLANE3 = 12291; // 0x3003
    field public static final int GL_CLIP_PLANE4 = 12292; // 0x3004
    field public static final int GL_CLIP_PLANE5 = 12293; // 0x3005
    field public static final int GL_COLOR_ARRAY_BUFFER_BINDING = 34968; // 0x8898
    field public static final int GL_COLOR_ARRAY_POINTER = 32912; // 0x8090
    field public static final int GL_COLOR_ARRAY_SIZE = 32897; // 0x8081
    field public static final int GL_COLOR_ARRAY_STRIDE = 32899; // 0x8083
    field public static final int GL_COLOR_ARRAY_TYPE = 32898; // 0x8082
    field public static final int GL_COLOR_CLEAR_VALUE = 3106; // 0xc22
    field public static final int GL_COLOR_WRITEMASK = 3107; // 0xc23
    field public static final int GL_COMBINE = 34160; // 0x8570
    field public static final int GL_COMBINE_ALPHA = 34162; // 0x8572
    field public static final int GL_COMBINE_RGB = 34161; // 0x8571
    field public static final int GL_CONSTANT = 34166; // 0x8576
    field public static final int GL_COORD_REPLACE_OES = 34914; // 0x8862
    field public static final int GL_CULL_FACE_MODE = 2885; // 0xb45
    field public static final int GL_CURRENT_COLOR = 2816; // 0xb00
    field public static final int GL_CURRENT_NORMAL = 2818; // 0xb02
    field public static final int GL_CURRENT_TEXTURE_COORDS = 2819; // 0xb03
    field public static final int GL_DEPTH_CLEAR_VALUE = 2931; // 0xb73
    field public static final int GL_DEPTH_FUNC = 2932; // 0xb74
    field public static final int GL_DEPTH_RANGE = 2928; // 0xb70
    field public static final int GL_DEPTH_WRITEMASK = 2930; // 0xb72
    field public static final int GL_DOT3_RGB = 34478; // 0x86ae
    field public static final int GL_DOT3_RGBA = 34479; // 0x86af
    field public static final int GL_DYNAMIC_DRAW = 35048; // 0x88e8
    field public static final int GL_ELEMENT_ARRAY_BUFFER = 34963; // 0x8893
    field public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING = 34965; // 0x8895
    field public static final int GL_FRONT_FACE = 2886; // 0xb46
    field public static final int GL_GENERATE_MIPMAP = 33169; // 0x8191
    field public static final int GL_GENERATE_MIPMAP_HINT = 33170; // 0x8192
    field public static final int GL_INTERPOLATE = 34165; // 0x8575
    field public static final int GL_LINE_WIDTH = 2849; // 0xb21
    field public static final int GL_LOGIC_OP_MODE = 3056; // 0xbf0
    field public static final int GL_MATRIX_MODE = 2976; // 0xba0
    field public static final int GL_MAX_CLIP_PLANES = 3378; // 0xd32
    field public static final int GL_MODELVIEW_MATRIX = 2982; // 0xba6
    field public static final int GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES = 35213; // 0x898d
    field public static final int GL_MODELVIEW_STACK_DEPTH = 2979; // 0xba3
    field public static final int GL_NORMAL_ARRAY_BUFFER_BINDING = 34967; // 0x8897
    field public static final int GL_NORMAL_ARRAY_POINTER = 32911; // 0x808f
    field public static final int GL_NORMAL_ARRAY_STRIDE = 32895; // 0x807f
    field public static final int GL_NORMAL_ARRAY_TYPE = 32894; // 0x807e
    field public static final int GL_OPERAND0_ALPHA = 34200; // 0x8598
    field public static final int GL_OPERAND0_RGB = 34192; // 0x8590
    field public static final int GL_OPERAND1_ALPHA = 34201; // 0x8599
    field public static final int GL_OPERAND1_RGB = 34193; // 0x8591
    field public static final int GL_OPERAND2_ALPHA = 34202; // 0x859a
    field public static final int GL_OPERAND2_RGB = 34194; // 0x8592
    field public static final int GL_POINT_DISTANCE_ATTENUATION = 33065; // 0x8129
    field public static final int GL_POINT_FADE_THRESHOLD_SIZE = 33064; // 0x8128
    field public static final int GL_POINT_SIZE = 2833; // 0xb11
    field public static final int GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES = 35743; // 0x8b9f
    field public static final int GL_POINT_SIZE_ARRAY_OES = 35740; // 0x8b9c
    field public static final int GL_POINT_SIZE_ARRAY_POINTER_OES = 35212; // 0x898c
    field public static final int GL_POINT_SIZE_ARRAY_STRIDE_OES = 35211; // 0x898b
    field public static final int GL_POINT_SIZE_ARRAY_TYPE_OES = 35210; // 0x898a
    field public static final int GL_POINT_SIZE_MAX = 33063; // 0x8127
    field public static final int GL_POINT_SIZE_MIN = 33062; // 0x8126
    field public static final int GL_POINT_SPRITE_OES = 34913; // 0x8861
    field public static final int GL_POLYGON_OFFSET_FACTOR = 32824; // 0x8038
    field public static final int GL_POLYGON_OFFSET_UNITS = 10752; // 0x2a00
    field public static final int GL_PREVIOUS = 34168; // 0x8578
    field public static final int GL_PRIMARY_COLOR = 34167; // 0x8577
    field public static final int GL_PROJECTION_MATRIX = 2983; // 0xba7
    field public static final int GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES = 35214; // 0x898e
    field public static final int GL_PROJECTION_STACK_DEPTH = 2980; // 0xba4
    field public static final int GL_RGB_SCALE = 34163; // 0x8573
    field public static final int GL_SAMPLES = 32937; // 0x80a9
    field public static final int GL_SAMPLE_BUFFERS = 32936; // 0x80a8
    field public static final int GL_SAMPLE_COVERAGE_INVERT = 32939; // 0x80ab
    field public static final int GL_SAMPLE_COVERAGE_VALUE = 32938; // 0x80aa
    field public static final int GL_SCISSOR_BOX = 3088; // 0xc10
    field public static final int GL_SHADE_MODEL = 2900; // 0xb54
    field public static final int GL_SRC0_ALPHA = 34184; // 0x8588
    field public static final int GL_SRC0_RGB = 34176; // 0x8580
    field public static final int GL_SRC1_ALPHA = 34185; // 0x8589
    field public static final int GL_SRC1_RGB = 34177; // 0x8581
    field public static final int GL_SRC2_ALPHA = 34186; // 0x858a
    field public static final int GL_SRC2_RGB = 34178; // 0x8582
    field public static final int GL_STATIC_DRAW = 35044; // 0x88e4
    field public static final int GL_STENCIL_CLEAR_VALUE = 2961; // 0xb91
    field public static final int GL_STENCIL_FAIL = 2964; // 0xb94
    field public static final int GL_STENCIL_FUNC = 2962; // 0xb92
    field public static final int GL_STENCIL_PASS_DEPTH_FAIL = 2965; // 0xb95
    field public static final int GL_STENCIL_PASS_DEPTH_PASS = 2966; // 0xb96
    field public static final int GL_STENCIL_REF = 2967; // 0xb97
    field public static final int GL_STENCIL_VALUE_MASK = 2963; // 0xb93
    field public static final int GL_STENCIL_WRITEMASK = 2968; // 0xb98
    field public static final int GL_SUBTRACT = 34023; // 0x84e7
    field public static final int GL_TEXTURE_BINDING_2D = 32873; // 0x8069
    field public static final int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 34970; // 0x889a
    field public static final int GL_TEXTURE_COORD_ARRAY_POINTER = 32914; // 0x8092
    field public static final int GL_TEXTURE_COORD_ARRAY_SIZE = 32904; // 0x8088
    field public static final int GL_TEXTURE_COORD_ARRAY_STRIDE = 32906; // 0x808a
    field public static final int GL_TEXTURE_COORD_ARRAY_TYPE = 32905; // 0x8089
    field public static final int GL_TEXTURE_MATRIX = 2984; // 0xba8
    field public static final int GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 35215; // 0x898f
    field public static final int GL_TEXTURE_STACK_DEPTH = 2981; // 0xba5
    field public static final int GL_VERTEX_ARRAY_BUFFER_BINDING = 34966; // 0x8896
    field public static final int GL_VERTEX_ARRAY_POINTER = 32910; // 0x808e
    field public static final int GL_VERTEX_ARRAY_SIZE = 32890; // 0x807a
    field public static final int GL_VERTEX_ARRAY_STRIDE = 32892; // 0x807c
    field public static final int GL_VERTEX_ARRAY_TYPE = 32891; // 0x807b
    field public static final int GL_VIEWPORT = 2978; // 0xba2
    field public static final int GL_WRITE_ONLY = 35001; // 0x88b9
  }

  public abstract interface GL11Ext implements javax.microedition.khronos.opengles.GL {
    method public abstract void glCurrentPaletteMatrixOES(int);
    method public abstract void glDrawTexfOES(float, float, float, float, float);
    method public abstract void glDrawTexfvOES(float[], int);
    method public abstract void glDrawTexfvOES(java.nio.FloatBuffer);
    method public abstract void glDrawTexiOES(int, int, int, int, int);
    method public abstract void glDrawTexivOES(int[], int);
    method public abstract void glDrawTexivOES(java.nio.IntBuffer);
    method public abstract void glDrawTexsOES(short, short, short, short, short);
    method public abstract void glDrawTexsvOES(short[], int);
    method public abstract void glDrawTexsvOES(java.nio.ShortBuffer);
    method public abstract void glDrawTexxOES(int, int, int, int, int);
    method public abstract void glDrawTexxvOES(int[], int);
    method public abstract void glDrawTexxvOES(java.nio.IntBuffer);
    method public abstract void glEnable(int);
    method public abstract void glEnableClientState(int);
    method public abstract void glLoadPaletteFromModelViewMatrixOES();
    method public abstract void glMatrixIndexPointerOES(int, int, int, java.nio.Buffer);
    method public abstract void glMatrixIndexPointerOES(int, int, int, int);
    method public abstract void glTexParameterfv(int, int, float[], int);
    method public abstract void glWeightPointerOES(int, int, int, java.nio.Buffer);
    method public abstract void glWeightPointerOES(int, int, int, int);
    field public static final int GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES = 35742; // 0x8b9e
    field public static final int GL_MATRIX_INDEX_ARRAY_OES = 34884; // 0x8844
    field public static final int GL_MATRIX_INDEX_ARRAY_POINTER_OES = 34889; // 0x8849
    field public static final int GL_MATRIX_INDEX_ARRAY_SIZE_OES = 34886; // 0x8846
    field public static final int GL_MATRIX_INDEX_ARRAY_STRIDE_OES = 34888; // 0x8848
    field public static final int GL_MATRIX_INDEX_ARRAY_TYPE_OES = 34887; // 0x8847
    field public static final int GL_MATRIX_PALETTE_OES = 34880; // 0x8840
    field public static final int GL_MAX_PALETTE_MATRICES_OES = 34882; // 0x8842
    field public static final int GL_MAX_VERTEX_UNITS_OES = 34468; // 0x86a4
    field public static final int GL_TEXTURE_CROP_RECT_OES = 35741; // 0x8b9d
    field public static final int GL_WEIGHT_ARRAY_BUFFER_BINDING_OES = 34974; // 0x889e
    field public static final int GL_WEIGHT_ARRAY_OES = 34477; // 0x86ad
    field public static final int GL_WEIGHT_ARRAY_POINTER_OES = 34476; // 0x86ac
    field public static final int GL_WEIGHT_ARRAY_SIZE_OES = 34475; // 0x86ab
    field public static final int GL_WEIGHT_ARRAY_STRIDE_OES = 34474; // 0x86aa
    field public static final int GL_WEIGHT_ARRAY_TYPE_OES = 34473; // 0x86a9
  }

  public abstract interface GL11ExtensionPack implements javax.microedition.khronos.opengles.GL {
    method public abstract void glBindFramebufferOES(int, int);
    method public abstract void glBindRenderbufferOES(int, int);
    method public abstract void glBindTexture(int, int);
    method public abstract void glBlendEquation(int);
    method public abstract void glBlendEquationSeparate(int, int);
    method public abstract void glBlendFuncSeparate(int, int, int, int);
    method public abstract int glCheckFramebufferStatusOES(int);
    method public abstract void glCompressedTexImage2D(int, int, int, int, int, int, int, java.nio.Buffer);
    method public abstract void glCopyTexImage2D(int, int, int, int, int, int, int, int);
    method public abstract void glDeleteFramebuffersOES(int, int[], int);
    method public abstract void glDeleteFramebuffersOES(int, java.nio.IntBuffer);
    method public abstract void glDeleteRenderbuffersOES(int, int[], int);
    method public abstract void glDeleteRenderbuffersOES(int, java.nio.IntBuffer);
    method public abstract void glEnable(int);
    method public abstract void glFramebufferRenderbufferOES(int, int, int, int);
    method public abstract void glFramebufferTexture2DOES(int, int, int, int, int);
    method public abstract void glGenFramebuffersOES(int, int[], int);
    method public abstract void glGenFramebuffersOES(int, java.nio.IntBuffer);
    method public abstract void glGenRenderbuffersOES(int, int[], int);
    method public abstract void glGenRenderbuffersOES(int, java.nio.IntBuffer);
    method public abstract void glGenerateMipmapOES(int);
    method public abstract void glGetFramebufferAttachmentParameterivOES(int, int, int, int[], int);
    method public abstract void glGetFramebufferAttachmentParameterivOES(int, int, int, java.nio.IntBuffer);
    method public abstract void glGetIntegerv(int, int[], int);
    method public abstract void glGetIntegerv(int, java.nio.IntBuffer);
    method public abstract void glGetRenderbufferParameterivOES(int, int, int[], int);
    method public abstract void glGetRenderbufferParameterivOES(int, int, java.nio.IntBuffer);
    method public abstract void glGetTexGenfv(int, int, float[], int);
    method public abstract void glGetTexGenfv(int, int, java.nio.FloatBuffer);
    method public abstract void glGetTexGeniv(int, int, int[], int);
    method public abstract void glGetTexGeniv(int, int, java.nio.IntBuffer);
    method public abstract void glGetTexGenxv(int, int, int[], int);
    method public abstract void glGetTexGenxv(int, int, java.nio.IntBuffer);
    method public abstract boolean glIsFramebufferOES(int);
    method public abstract boolean glIsRenderbufferOES(int);
    method public abstract void glRenderbufferStorageOES(int, int, int, int);
    method public abstract void glStencilOp(int, int, int);
    method public abstract void glTexEnvf(int, int, float);
    method public abstract void glTexEnvfv(int, int, float[], int);
    method public abstract void glTexEnvfv(int, int, java.nio.FloatBuffer);
    method public abstract void glTexEnvx(int, int, int);
    method public abstract void glTexEnvxv(int, int, int[], int);
    method public abstract void glTexEnvxv(int, int, java.nio.IntBuffer);
    method public abstract void glTexGenf(int, int, float);
    method public abstract void glTexGenfv(int, int, float[], int);
    method public abstract void glTexGenfv(int, int, java.nio.FloatBuffer);
    method public abstract void glTexGeni(int, int, int);
    method public abstract void glTexGeniv(int, int, int[], int);
    method public abstract void glTexGeniv(int, int, java.nio.IntBuffer);
    method public abstract void glTexGenx(int, int, int);
    method public abstract void glTexGenxv(int, int, int[], int);
    method public abstract void glTexGenxv(int, int, java.nio.IntBuffer);
    method public abstract void glTexParameterf(int, int, float);
    field public static final int GL_BLEND_DST_ALPHA = 32970; // 0x80ca
    field public static final int GL_BLEND_DST_RGB = 32968; // 0x80c8
    field public static final int GL_BLEND_EQUATION = 32777; // 0x8009
    field public static final int GL_BLEND_EQUATION_ALPHA = 34877; // 0x883d
    field public static final int GL_BLEND_EQUATION_RGB = 32777; // 0x8009
    field public static final int GL_BLEND_SRC_ALPHA = 32971; // 0x80cb
    field public static final int GL_BLEND_SRC_RGB = 32969; // 0x80c9
    field public static final int GL_COLOR_ATTACHMENT0_OES = 36064; // 0x8ce0
    field public static final int GL_COLOR_ATTACHMENT10_OES = 36074; // 0x8cea
    field public static final int GL_COLOR_ATTACHMENT11_OES = 36075; // 0x8ceb
    field public static final int GL_COLOR_ATTACHMENT12_OES = 36076; // 0x8cec
    field public static final int GL_COLOR_ATTACHMENT13_OES = 36077; // 0x8ced
    field public static final int GL_COLOR_ATTACHMENT14_OES = 36078; // 0x8cee
    field public static final int GL_COLOR_ATTACHMENT15_OES = 36079; // 0x8cef
    field public static final int GL_COLOR_ATTACHMENT1_OES = 36065; // 0x8ce1
    field public static final int GL_COLOR_ATTACHMENT2_OES = 36066; // 0x8ce2
    field public static final int GL_COLOR_ATTACHMENT3_OES = 36067; // 0x8ce3
    field public static final int GL_COLOR_ATTACHMENT4_OES = 36068; // 0x8ce4
    field public static final int GL_COLOR_ATTACHMENT5_OES = 36069; // 0x8ce5
    field public static final int GL_COLOR_ATTACHMENT6_OES = 36070; // 0x8ce6
    field public static final int GL_COLOR_ATTACHMENT7_OES = 36071; // 0x8ce7
    field public static final int GL_COLOR_ATTACHMENT8_OES = 36072; // 0x8ce8
    field public static final int GL_COLOR_ATTACHMENT9_OES = 36073; // 0x8ce9
    field public static final int GL_DECR_WRAP = 34056; // 0x8508
    field public static final int GL_DEPTH_ATTACHMENT_OES = 36096; // 0x8d00
    field public static final int GL_DEPTH_COMPONENT = 6402; // 0x1902
    field public static final int GL_DEPTH_COMPONENT16 = 33189; // 0x81a5
    field public static final int GL_DEPTH_COMPONENT24 = 33190; // 0x81a6
    field public static final int GL_DEPTH_COMPONENT32 = 33191; // 0x81a7
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES = 36049; // 0x8cd1
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES = 36048; // 0x8cd0
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES = 36051; // 0x8cd3
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES = 36050; // 0x8cd2
    field public static final int GL_FRAMEBUFFER_BINDING_OES = 36006; // 0x8ca6
    field public static final int GL_FRAMEBUFFER_COMPLETE_OES = 36053; // 0x8cd5
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES = 36054; // 0x8cd6
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES = 36057; // 0x8cd9
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES = 36059; // 0x8cdb
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES = 36058; // 0x8cda
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES = 36055; // 0x8cd7
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES = 36060; // 0x8cdc
    field public static final int GL_FRAMEBUFFER_OES = 36160; // 0x8d40
    field public static final int GL_FRAMEBUFFER_UNSUPPORTED_OES = 36061; // 0x8cdd
    field public static final int GL_FUNC_ADD = 32774; // 0x8006
    field public static final int GL_FUNC_REVERSE_SUBTRACT = 32779; // 0x800b
    field public static final int GL_FUNC_SUBTRACT = 32778; // 0x800a
    field public static final int GL_INCR_WRAP = 34055; // 0x8507
    field public static final int GL_INVALID_FRAMEBUFFER_OPERATION_OES = 1286; // 0x506
    field public static final int GL_MAX_COLOR_ATTACHMENTS_OES = 36063; // 0x8cdf
    field public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 34076; // 0x851c
    field public static final int GL_MAX_RENDERBUFFER_SIZE_OES = 34024; // 0x84e8
    field public static final int GL_MIRRORED_REPEAT = 33648; // 0x8370
    field public static final int GL_NORMAL_MAP = 34065; // 0x8511
    field public static final int GL_REFLECTION_MAP = 34066; // 0x8512
    field public static final int GL_RENDERBUFFER_ALPHA_SIZE_OES = 36179; // 0x8d53
    field public static final int GL_RENDERBUFFER_BINDING_OES = 36007; // 0x8ca7
    field public static final int GL_RENDERBUFFER_BLUE_SIZE_OES = 36178; // 0x8d52
    field public static final int GL_RENDERBUFFER_DEPTH_SIZE_OES = 36180; // 0x8d54
    field public static final int GL_RENDERBUFFER_GREEN_SIZE_OES = 36177; // 0x8d51
    field public static final int GL_RENDERBUFFER_HEIGHT_OES = 36163; // 0x8d43
    field public static final int GL_RENDERBUFFER_INTERNAL_FORMAT_OES = 36164; // 0x8d44
    field public static final int GL_RENDERBUFFER_OES = 36161; // 0x8d41
    field public static final int GL_RENDERBUFFER_RED_SIZE_OES = 36176; // 0x8d50
    field public static final int GL_RENDERBUFFER_STENCIL_SIZE_OES = 36181; // 0x8d55
    field public static final int GL_RENDERBUFFER_WIDTH_OES = 36162; // 0x8d42
    field public static final int GL_RGB565_OES = 36194; // 0x8d62
    field public static final int GL_RGB5_A1 = 32855; // 0x8057
    field public static final int GL_RGB8 = 32849; // 0x8051
    field public static final int GL_RGBA4 = 32854; // 0x8056
    field public static final int GL_RGBA8 = 32856; // 0x8058
    field public static final int GL_STENCIL_ATTACHMENT_OES = 36128; // 0x8d20
    field public static final int GL_STENCIL_INDEX = 6401; // 0x1901
    field public static final int GL_STENCIL_INDEX1_OES = 36166; // 0x8d46
    field public static final int GL_STENCIL_INDEX4_OES = 36167; // 0x8d47
    field public static final int GL_STENCIL_INDEX8_OES = 36168; // 0x8d48
    field public static final int GL_STR = -1; // 0xffffffff
    field public static final int GL_TEXTURE_BINDING_CUBE_MAP = 34068; // 0x8514
    field public static final int GL_TEXTURE_CUBE_MAP = 34067; // 0x8513
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070; // 0x8516
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072; // 0x8518
    field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074; // 0x851a
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 34069; // 0x8515
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071; // 0x8517
    field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073; // 0x8519
    field public static final int GL_TEXTURE_GEN_MODE = 9472; // 0x2500
    field public static final int GL_TEXTURE_GEN_STR = 36192; // 0x8d60
  }

}

package javax.net {

  public abstract class ServerSocketFactory {
    ctor protected ServerSocketFactory();
    method public java.net.ServerSocket createServerSocket() throws java.io.IOException;
    method public abstract java.net.ServerSocket createServerSocket(int) throws java.io.IOException;
    method public abstract java.net.ServerSocket createServerSocket(int, int) throws java.io.IOException;
    method public abstract java.net.ServerSocket createServerSocket(int, int, java.net.InetAddress) throws java.io.IOException;
    method public static synchronized javax.net.ServerSocketFactory getDefault();
  }

  public abstract class SocketFactory {
    ctor protected SocketFactory();
    method public java.net.Socket createSocket() throws java.io.IOException;
    method public abstract java.net.Socket createSocket(java.lang.String, int) throws java.io.IOException, java.net.UnknownHostException;
    method public abstract java.net.Socket createSocket(java.lang.String, int, java.net.InetAddress, int) throws java.io.IOException, java.net.UnknownHostException;
    method public abstract java.net.Socket createSocket(java.net.InetAddress, int) throws java.io.IOException;
    method public abstract java.net.Socket createSocket(java.net.InetAddress, int, java.net.InetAddress, int) throws java.io.IOException;
    method public static synchronized javax.net.SocketFactory getDefault();
  }

}

package javax.net.ssl {

  public class CertPathTrustManagerParameters implements javax.net.ssl.ManagerFactoryParameters {
    ctor public CertPathTrustManagerParameters(java.security.cert.CertPathParameters);
    method public java.security.cert.CertPathParameters getParameters();
  }

  public class HandshakeCompletedEvent extends java.util.EventObject {
    ctor public HandshakeCompletedEvent(javax.net.ssl.SSLSocket, javax.net.ssl.SSLSession);
    method public java.lang.String getCipherSuite();
    method public java.security.cert.Certificate[] getLocalCertificates();
    method public java.security.Principal getLocalPrincipal();
    method public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public java.security.cert.Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public javax.net.ssl.SSLSession getSession();
    method public javax.net.ssl.SSLSocket getSocket();
  }

  public abstract interface HandshakeCompletedListener implements java.util.EventListener {
    method public abstract void handshakeCompleted(javax.net.ssl.HandshakeCompletedEvent);
  }

  public abstract interface HostnameVerifier {
    method public abstract boolean verify(java.lang.String, javax.net.ssl.SSLSession);
  }

  public abstract class HttpsURLConnection extends java.net.HttpURLConnection {
    ctor protected HttpsURLConnection(java.net.URL);
    method public abstract java.lang.String getCipherSuite();
    method public static javax.net.ssl.HostnameVerifier getDefaultHostnameVerifier();
    method public static javax.net.ssl.SSLSocketFactory getDefaultSSLSocketFactory();
    method public javax.net.ssl.HostnameVerifier getHostnameVerifier();
    method public abstract java.security.cert.Certificate[] getLocalCertificates();
    method public java.security.Principal getLocalPrincipal();
    method public java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public javax.net.ssl.SSLSocketFactory getSSLSocketFactory();
    method public abstract java.security.cert.Certificate[] getServerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public static void setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier);
    method public static void setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory);
    method public void setHostnameVerifier(javax.net.ssl.HostnameVerifier);
    method public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory);
    field protected javax.net.ssl.HostnameVerifier hostnameVerifier;
  }

  public abstract interface KeyManager {
  }

  public class KeyManagerFactory {
    ctor protected KeyManagerFactory(javax.net.ssl.KeyManagerFactorySpi, java.security.Provider, java.lang.String);
    method public final java.lang.String getAlgorithm();
    method public static final java.lang.String getDefaultAlgorithm();
    method public static final javax.net.ssl.KeyManagerFactory getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final javax.net.ssl.KeyManagerFactory getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static final javax.net.ssl.KeyManagerFactory getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final javax.net.ssl.KeyManager[] getKeyManagers();
    method public final java.security.Provider getProvider();
    method public final void init(java.security.KeyStore, char[]) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    method public final void init(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
  }

  public abstract class KeyManagerFactorySpi {
    ctor public KeyManagerFactorySpi();
    method protected abstract javax.net.ssl.KeyManager[] engineGetKeyManagers();
    method protected abstract void engineInit(java.security.KeyStore, char[]) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    method protected abstract void engineInit(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
  }

  public class KeyStoreBuilderParameters implements javax.net.ssl.ManagerFactoryParameters {
    ctor public KeyStoreBuilderParameters(java.security.KeyStore.Builder);
    ctor public KeyStoreBuilderParameters(java.util.List<java.security.KeyStore.Builder>);
    method public java.util.List<java.security.KeyStore.Builder> getParameters();
  }

  public abstract interface ManagerFactoryParameters {
  }

  public class SSLContext {
    ctor protected SSLContext(javax.net.ssl.SSLContextSpi, java.security.Provider, java.lang.String);
    method public final javax.net.ssl.SSLEngine createSSLEngine();
    method public final javax.net.ssl.SSLEngine createSSLEngine(java.lang.String, int);
    method public final javax.net.ssl.SSLSessionContext getClientSessionContext();
    method public static javax.net.ssl.SSLContext getDefault() throws java.security.NoSuchAlgorithmException;
    method public final javax.net.ssl.SSLParameters getDefaultSSLParameters();
    method public static javax.net.ssl.SSLContext getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static javax.net.ssl.SSLContext getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static javax.net.ssl.SSLContext getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.lang.String getProtocol();
    method public final java.security.Provider getProvider();
    method public final javax.net.ssl.SSLSessionContext getServerSessionContext();
    method public final javax.net.ssl.SSLServerSocketFactory getServerSocketFactory();
    method public final javax.net.ssl.SSLSocketFactory getSocketFactory();
    method public final javax.net.ssl.SSLParameters getSupportedSSLParameters();
    method public final void init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom) throws java.security.KeyManagementException;
    method public static void setDefault(javax.net.ssl.SSLContext);
  }

  public abstract class SSLContextSpi {
    ctor public SSLContextSpi();
    method protected abstract javax.net.ssl.SSLEngine engineCreateSSLEngine(java.lang.String, int);
    method protected abstract javax.net.ssl.SSLEngine engineCreateSSLEngine();
    method protected abstract javax.net.ssl.SSLSessionContext engineGetClientSessionContext();
    method protected javax.net.ssl.SSLParameters engineGetDefaultSSLParameters();
    method protected abstract javax.net.ssl.SSLSessionContext engineGetServerSessionContext();
    method protected abstract javax.net.ssl.SSLServerSocketFactory engineGetServerSocketFactory();
    method protected abstract javax.net.ssl.SSLSocketFactory engineGetSocketFactory();
    method protected javax.net.ssl.SSLParameters engineGetSupportedSSLParameters();
    method protected abstract void engineInit(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom) throws java.security.KeyManagementException;
  }

  public abstract class SSLEngine {
    ctor protected SSLEngine();
    ctor protected SSLEngine(java.lang.String, int);
    method public abstract void beginHandshake() throws javax.net.ssl.SSLException;
    method public abstract void closeInbound() throws javax.net.ssl.SSLException;
    method public abstract void closeOutbound();
    method public abstract java.lang.Runnable getDelegatedTask();
    method public abstract boolean getEnableSessionCreation();
    method public abstract java.lang.String[] getEnabledCipherSuites();
    method public abstract java.lang.String[] getEnabledProtocols();
    method public abstract javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus();
    method public abstract boolean getNeedClientAuth();
    method public java.lang.String getPeerHost();
    method public int getPeerPort();
    method public javax.net.ssl.SSLParameters getSSLParameters();
    method public abstract javax.net.ssl.SSLSession getSession();
    method public abstract java.lang.String[] getSupportedCipherSuites();
    method public abstract java.lang.String[] getSupportedProtocols();
    method public abstract boolean getUseClientMode();
    method public abstract boolean getWantClientAuth();
    method public abstract boolean isInboundDone();
    method public abstract boolean isOutboundDone();
    method public abstract void setEnableSessionCreation(boolean);
    method public abstract void setEnabledCipherSuites(java.lang.String[]);
    method public abstract void setEnabledProtocols(java.lang.String[]);
    method public abstract void setNeedClientAuth(boolean);
    method public void setSSLParameters(javax.net.ssl.SSLParameters);
    method public abstract void setUseClientMode(boolean);
    method public abstract void setWantClientAuth(boolean);
    method public abstract javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer[], int, int) throws javax.net.ssl.SSLException;
    method public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
    method public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer[]) throws javax.net.ssl.SSLException;
    method public abstract javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[], int, int, java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
    method public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[], java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
    method public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
  }

  public class SSLEngineResult {
    ctor public SSLEngineResult(javax.net.ssl.SSLEngineResult.Status, javax.net.ssl.SSLEngineResult.HandshakeStatus, int, int);
    method public final int bytesConsumed();
    method public final int bytesProduced();
    method public final javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus();
    method public final javax.net.ssl.SSLEngineResult.Status getStatus();
  }

  public static final class SSLEngineResult.HandshakeStatus extends java.lang.Enum {
    method public static javax.net.ssl.SSLEngineResult.HandshakeStatus valueOf(java.lang.String);
    method public static final javax.net.ssl.SSLEngineResult.HandshakeStatus[] values();
    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus FINISHED;
    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NEED_TASK;
    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NEED_UNWRAP;
    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NEED_WRAP;
    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NOT_HANDSHAKING;
  }

  public static final class SSLEngineResult.Status extends java.lang.Enum {
    method public static javax.net.ssl.SSLEngineResult.Status valueOf(java.lang.String);
    method public static final javax.net.ssl.SSLEngineResult.Status[] values();
    enum_constant public static final javax.net.ssl.SSLEngineResult.Status BUFFER_OVERFLOW;
    enum_constant public static final javax.net.ssl.SSLEngineResult.Status BUFFER_UNDERFLOW;
    enum_constant public static final javax.net.ssl.SSLEngineResult.Status CLOSED;
    enum_constant public static final javax.net.ssl.SSLEngineResult.Status OK;
  }

  public class SSLException extends java.io.IOException {
    ctor public SSLException(java.lang.String);
    ctor public SSLException(java.lang.String, java.lang.Throwable);
    ctor public SSLException(java.lang.Throwable);
  }

  public class SSLHandshakeException extends javax.net.ssl.SSLException {
    ctor public SSLHandshakeException(java.lang.String);
  }

  public class SSLKeyException extends javax.net.ssl.SSLException {
    ctor public SSLKeyException(java.lang.String);
  }

  public class SSLParameters {
    ctor public SSLParameters();
    ctor public SSLParameters(java.lang.String[]);
    ctor public SSLParameters(java.lang.String[], java.lang.String[]);
    method public java.lang.String[] getCipherSuites();
    method public boolean getNeedClientAuth();
    method public java.lang.String[] getProtocols();
    method public boolean getWantClientAuth();
    method public void setCipherSuites(java.lang.String[]);
    method public void setNeedClientAuth(boolean);
    method public void setProtocols(java.lang.String[]);
    method public void setWantClientAuth(boolean);
  }

  public class SSLPeerUnverifiedException extends javax.net.ssl.SSLException {
    ctor public SSLPeerUnverifiedException(java.lang.String);
  }

  public final class SSLPermission extends java.security.BasicPermission {
    ctor public SSLPermission(java.lang.String);
    ctor public SSLPermission(java.lang.String, java.lang.String);
  }

  public class SSLProtocolException extends javax.net.ssl.SSLException {
    ctor public SSLProtocolException(java.lang.String);
  }

  public abstract class SSLServerSocket extends java.net.ServerSocket {
    ctor protected SSLServerSocket() throws java.io.IOException;
    ctor protected SSLServerSocket(int) throws java.io.IOException;
    ctor protected SSLServerSocket(int, int) throws java.io.IOException;
    ctor protected SSLServerSocket(int, int, java.net.InetAddress) throws java.io.IOException;
    method public abstract boolean getEnableSessionCreation();
    method public abstract java.lang.String[] getEnabledCipherSuites();
    method public abstract java.lang.String[] getEnabledProtocols();
    method public abstract boolean getNeedClientAuth();
    method public abstract java.lang.String[] getSupportedCipherSuites();
    method public abstract java.lang.String[] getSupportedProtocols();
    method public abstract boolean getUseClientMode();
    method public abstract boolean getWantClientAuth();
    method public abstract void setEnableSessionCreation(boolean);
    method public abstract void setEnabledCipherSuites(java.lang.String[]);
    method public abstract void setEnabledProtocols(java.lang.String[]);
    method public abstract void setNeedClientAuth(boolean);
    method public abstract void setUseClientMode(boolean);
    method public abstract void setWantClientAuth(boolean);
  }

  public abstract class SSLServerSocketFactory extends javax.net.ServerSocketFactory {
    ctor protected SSLServerSocketFactory();
    method public static synchronized javax.net.ServerSocketFactory getDefault();
    method public abstract java.lang.String[] getDefaultCipherSuites();
    method public abstract java.lang.String[] getSupportedCipherSuites();
  }

  public abstract interface SSLSession {
    method public abstract int getApplicationBufferSize();
    method public abstract java.lang.String getCipherSuite();
    method public abstract long getCreationTime();
    method public abstract byte[] getId();
    method public abstract long getLastAccessedTime();
    method public abstract java.security.cert.Certificate[] getLocalCertificates();
    method public abstract java.security.Principal getLocalPrincipal();
    method public abstract int getPacketBufferSize();
    method public abstract javax.security.cert.X509Certificate[] getPeerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public abstract java.security.cert.Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public abstract java.lang.String getPeerHost();
    method public abstract int getPeerPort();
    method public abstract java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
    method public abstract java.lang.String getProtocol();
    method public abstract javax.net.ssl.SSLSessionContext getSessionContext();
    method public abstract java.lang.Object getValue(java.lang.String);
    method public abstract java.lang.String[] getValueNames();
    method public abstract void invalidate();
    method public abstract boolean isValid();
    method public abstract void putValue(java.lang.String, java.lang.Object);
    method public abstract void removeValue(java.lang.String);
  }

  public class SSLSessionBindingEvent extends java.util.EventObject {
    ctor public SSLSessionBindingEvent(javax.net.ssl.SSLSession, java.lang.String);
    method public java.lang.String getName();
    method public javax.net.ssl.SSLSession getSession();
  }

  public abstract interface SSLSessionBindingListener implements java.util.EventListener {
    method public abstract void valueBound(javax.net.ssl.SSLSessionBindingEvent);
    method public abstract void valueUnbound(javax.net.ssl.SSLSessionBindingEvent);
  }

  public abstract interface SSLSessionContext {
    method public abstract java.util.Enumeration<byte[]> getIds();
    method public abstract javax.net.ssl.SSLSession getSession(byte[]);
    method public abstract int getSessionCacheSize();
    method public abstract int getSessionTimeout();
    method public abstract void setSessionCacheSize(int) throws java.lang.IllegalArgumentException;
    method public abstract void setSessionTimeout(int) throws java.lang.IllegalArgumentException;
  }

  public abstract class SSLSocket extends java.net.Socket {
    ctor protected SSLSocket();
    ctor protected SSLSocket(java.lang.String, int) throws java.io.IOException, java.net.UnknownHostException;
    ctor protected SSLSocket(java.net.InetAddress, int) throws java.io.IOException;
    ctor protected SSLSocket(java.lang.String, int, java.net.InetAddress, int) throws java.io.IOException, java.net.UnknownHostException;
    ctor protected SSLSocket(java.net.InetAddress, int, java.net.InetAddress, int) throws java.io.IOException;
    method public abstract void addHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener);
    method public abstract boolean getEnableSessionCreation();
    method public abstract java.lang.String[] getEnabledCipherSuites();
    method public abstract java.lang.String[] getEnabledProtocols();
    method public abstract boolean getNeedClientAuth();
    method public javax.net.ssl.SSLParameters getSSLParameters();
    method public abstract javax.net.ssl.SSLSession getSession();
    method public abstract java.lang.String[] getSupportedCipherSuites();
    method public abstract java.lang.String[] getSupportedProtocols();
    method public abstract boolean getUseClientMode();
    method public abstract boolean getWantClientAuth();
    method public abstract void removeHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener);
    method public abstract void setEnableSessionCreation(boolean);
    method public abstract void setEnabledCipherSuites(java.lang.String[]);
    method public abstract void setEnabledProtocols(java.lang.String[]);
    method public abstract void setNeedClientAuth(boolean);
    method public void setSSLParameters(javax.net.ssl.SSLParameters);
    method public abstract void setUseClientMode(boolean);
    method public abstract void setWantClientAuth(boolean);
    method public abstract void startHandshake() throws java.io.IOException;
  }

  public abstract class SSLSocketFactory extends javax.net.SocketFactory {
    ctor public SSLSocketFactory();
    method public abstract java.net.Socket createSocket(java.net.Socket, java.lang.String, int, boolean) throws java.io.IOException;
    method public static synchronized javax.net.SocketFactory getDefault();
    method public abstract java.lang.String[] getDefaultCipherSuites();
    method public abstract java.lang.String[] getSupportedCipherSuites();
  }

  public abstract interface TrustManager {
  }

  public class TrustManagerFactory {
    ctor protected TrustManagerFactory(javax.net.ssl.TrustManagerFactorySpi, java.security.Provider, java.lang.String);
    method public final java.lang.String getAlgorithm();
    method public static final java.lang.String getDefaultAlgorithm();
    method public static final javax.net.ssl.TrustManagerFactory getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
    method public static final javax.net.ssl.TrustManagerFactory getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
    method public static final javax.net.ssl.TrustManagerFactory getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
    method public final java.security.Provider getProvider();
    method public final javax.net.ssl.TrustManager[] getTrustManagers();
    method public final void init(java.security.KeyStore) throws java.security.KeyStoreException;
    method public final void init(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
  }

  public abstract class TrustManagerFactorySpi {
    ctor public TrustManagerFactorySpi();
    method protected abstract javax.net.ssl.TrustManager[] engineGetTrustManagers();
    method protected abstract void engineInit(java.security.KeyStore) throws java.security.KeyStoreException;
    method protected abstract void engineInit(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
  }

  public abstract class X509ExtendedKeyManager implements javax.net.ssl.X509KeyManager {
    ctor protected X509ExtendedKeyManager();
    method public java.lang.String chooseEngineClientAlias(java.lang.String[], java.security.Principal[], javax.net.ssl.SSLEngine);
    method public java.lang.String chooseEngineServerAlias(java.lang.String, java.security.Principal[], javax.net.ssl.SSLEngine);
  }

  public abstract interface X509KeyManager implements javax.net.ssl.KeyManager {
    method public abstract java.lang.String chooseClientAlias(java.lang.String[], java.security.Principal[], java.net.Socket);
    method public abstract java.lang.String chooseServerAlias(java.lang.String, java.security.Principal[], java.net.Socket);
    method public abstract java.security.cert.X509Certificate[] getCertificateChain(java.lang.String);
    method public abstract java.lang.String[] getClientAliases(java.lang.String, java.security.Principal[]);
    method public abstract java.security.PrivateKey getPrivateKey(java.lang.String);
    method public abstract java.lang.String[] getServerAliases(java.lang.String, java.security.Principal[]);
  }

  public abstract interface X509TrustManager implements javax.net.ssl.TrustManager {
    method public abstract void checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String) throws java.security.cert.CertificateException;
    method public abstract void checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String) throws java.security.cert.CertificateException;
    method public abstract java.security.cert.X509Certificate[] getAcceptedIssuers();
  }

}

package javax.security.auth {

  public final class AuthPermission extends java.security.BasicPermission {
    ctor public AuthPermission(java.lang.String);
    ctor public AuthPermission(java.lang.String, java.lang.String);
  }

  public class DestroyFailedException extends java.lang.Exception {
    ctor public DestroyFailedException();
    ctor public DestroyFailedException(java.lang.String);
  }

  public abstract interface Destroyable {
    method public abstract void destroy() throws javax.security.auth.DestroyFailedException;
    method public abstract boolean isDestroyed();
  }

  public final class PrivateCredentialPermission extends java.security.Permission {
    ctor public PrivateCredentialPermission(java.lang.String, java.lang.String);
    method public java.lang.String getActions();
    method public java.lang.String getCredentialClass();
    method public java.lang.String[][] getPrincipals();
    method public boolean implies(java.security.Permission);
  }

  public final class Subject implements java.io.Serializable {
    ctor public Subject();
    ctor public Subject(boolean, java.util.Set<? extends java.security.Principal>, java.util.Set<?>, java.util.Set<?>);
    method public static T doAs(javax.security.auth.Subject, java.security.PrivilegedAction<T>);
    method public static T doAs(javax.security.auth.Subject, java.security.PrivilegedExceptionAction<T>) throws java.security.PrivilegedActionException;
    method public static T doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedAction<T>, java.security.AccessControlContext);
    method public static T doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedExceptionAction<T>, java.security.AccessControlContext) throws java.security.PrivilegedActionException;
    method public java.util.Set<java.security.Principal> getPrincipals();
    method public java.util.Set<T> getPrincipals(java.lang.Class<T>);
    method public java.util.Set<java.lang.Object> getPrivateCredentials();
    method public java.util.Set<T> getPrivateCredentials(java.lang.Class<T>);
    method public java.util.Set<java.lang.Object> getPublicCredentials();
    method public java.util.Set<T> getPublicCredentials(java.lang.Class<T>);
    method public static javax.security.auth.Subject getSubject(java.security.AccessControlContext);
    method public boolean isReadOnly();
    method public void setReadOnly();
  }

  public class SubjectDomainCombiner implements java.security.DomainCombiner {
    ctor public SubjectDomainCombiner(javax.security.auth.Subject);
    method public java.security.ProtectionDomain[] combine(java.security.ProtectionDomain[], java.security.ProtectionDomain[]);
    method public javax.security.auth.Subject getSubject();
  }

}

package javax.security.auth.callback {

  public abstract interface Callback {
  }

  public abstract interface CallbackHandler {
    method public abstract void handle(javax.security.auth.callback.Callback[]) throws java.io.IOException, javax.security.auth.callback.UnsupportedCallbackException;
  }

  public class PasswordCallback implements javax.security.auth.callback.Callback java.io.Serializable {
    ctor public PasswordCallback(java.lang.String, boolean);
    method public void clearPassword();
    method public char[] getPassword();
    method public java.lang.String getPrompt();
    method public boolean isEchoOn();
    method public void setPassword(char[]);
  }

  public class UnsupportedCallbackException extends java.lang.Exception {
    ctor public UnsupportedCallbackException(javax.security.auth.callback.Callback);
    ctor public UnsupportedCallbackException(javax.security.auth.callback.Callback, java.lang.String);
    method public javax.security.auth.callback.Callback getCallback();
  }

}

package javax.security.auth.login {

  public class LoginException extends java.security.GeneralSecurityException {
    ctor public LoginException();
    ctor public LoginException(java.lang.String);
  }

}

package javax.security.auth.x500 {

  public final class X500Principal implements java.security.Principal java.io.Serializable {
    ctor public X500Principal(byte[]);
    ctor public X500Principal(java.io.InputStream);
    ctor public X500Principal(java.lang.String);
    ctor public X500Principal(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
    method public byte[] getEncoded();
    method public java.lang.String getName();
    method public java.lang.String getName(java.lang.String);
    method public java.lang.String getName(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
    field public static final java.lang.String CANONICAL = "CANONICAL";
    field public static final java.lang.String RFC1779 = "RFC1779";
    field public static final java.lang.String RFC2253 = "RFC2253";
  }

}

package javax.security.cert {

  public abstract class Certificate {
    ctor public Certificate();
    method public abstract byte[] getEncoded() throws javax.security.cert.CertificateEncodingException;
    method public abstract java.security.PublicKey getPublicKey();
    method public abstract java.lang.String toString();
    method public abstract void verify(java.security.PublicKey) throws javax.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
    method public abstract void verify(java.security.PublicKey, java.lang.String) throws javax.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
  }

  public class CertificateEncodingException extends javax.security.cert.CertificateException {
    ctor public CertificateEncodingException(java.lang.String);
    ctor public CertificateEncodingException();
  }

  public class CertificateException extends java.lang.Exception {
    ctor public CertificateException(java.lang.String);
    ctor public CertificateException();
  }

  public class CertificateExpiredException extends javax.security.cert.CertificateException {
    ctor public CertificateExpiredException(java.lang.String);
    ctor public CertificateExpiredException();
  }

  public class CertificateNotYetValidException extends javax.security.cert.CertificateException {
    ctor public CertificateNotYetValidException(java.lang.String);
    ctor public CertificateNotYetValidException();
  }

  public class CertificateParsingException extends javax.security.cert.CertificateException {
    ctor public CertificateParsingException(java.lang.String);
    ctor public CertificateParsingException();
  }

  public abstract class X509Certificate extends javax.security.cert.Certificate {
    ctor public X509Certificate();
    method public abstract void checkValidity() throws javax.security.cert.CertificateExpiredException, javax.security.cert.CertificateNotYetValidException;
    method public abstract void checkValidity(java.util.Date) throws javax.security.cert.CertificateExpiredException, javax.security.cert.CertificateNotYetValidException;
    method public static final javax.security.cert.X509Certificate getInstance(java.io.InputStream) throws javax.security.cert.CertificateException;
    method public static final javax.security.cert.X509Certificate getInstance(byte[]) throws javax.security.cert.CertificateException;
    method public abstract java.security.Principal getIssuerDN();
    method public abstract java.util.Date getNotAfter();
    method public abstract java.util.Date getNotBefore();
    method public abstract java.math.BigInteger getSerialNumber();
    method public abstract java.lang.String getSigAlgName();
    method public abstract java.lang.String getSigAlgOID();
    method public abstract byte[] getSigAlgParams();
    method public abstract java.security.Principal getSubjectDN();
    method public abstract int getVersion();
  }

}

package javax.sql {

  public abstract interface CommonDataSource {
    method public abstract java.io.PrintWriter getLogWriter() throws java.sql.SQLException;
    method public abstract int getLoginTimeout() throws java.sql.SQLException;
    method public abstract void setLogWriter(java.io.PrintWriter) throws java.sql.SQLException;
    method public abstract void setLoginTimeout(int) throws java.sql.SQLException;
  }

  public class ConnectionEvent extends java.util.EventObject implements java.io.Serializable {
    ctor public ConnectionEvent(javax.sql.PooledConnection);
    ctor public ConnectionEvent(javax.sql.PooledConnection, java.sql.SQLException);
    method public java.sql.SQLException getSQLException();
  }

  public abstract interface ConnectionEventListener implements java.util.EventListener {
    method public abstract void connectionClosed(javax.sql.ConnectionEvent);
    method public abstract void connectionErrorOccurred(javax.sql.ConnectionEvent);
  }

  public abstract interface ConnectionPoolDataSource implements javax.sql.CommonDataSource {
    method public abstract javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException;
    method public abstract javax.sql.PooledConnection getPooledConnection(java.lang.String, java.lang.String) throws java.sql.SQLException;
  }

  public abstract interface DataSource implements javax.sql.CommonDataSource java.sql.Wrapper {
    method public abstract java.sql.Connection getConnection() throws java.sql.SQLException;
    method public abstract java.sql.Connection getConnection(java.lang.String, java.lang.String) throws java.sql.SQLException;
  }

  public abstract interface PooledConnection {
    method public abstract void addConnectionEventListener(javax.sql.ConnectionEventListener);
    method public abstract void addStatementEventListener(javax.sql.StatementEventListener);
    method public abstract void close() throws java.sql.SQLException;
    method public abstract java.sql.Connection getConnection() throws java.sql.SQLException;
    method public abstract void removeConnectionEventListener(javax.sql.ConnectionEventListener);
    method public abstract void removeStatementEventListener(javax.sql.StatementEventListener);
  }

  public abstract interface RowSet implements java.sql.ResultSet {
    method public abstract void addRowSetListener(javax.sql.RowSetListener);
    method public abstract void clearParameters() throws java.sql.SQLException;
    method public abstract void execute() throws java.sql.SQLException;
    method public abstract java.lang.String getCommand();
    method public abstract java.lang.String getDataSourceName();
    method public abstract boolean getEscapeProcessing() throws java.sql.SQLException;
    method public abstract int getMaxFieldSize() throws java.sql.SQLException;
    method public abstract int getMaxRows() throws java.sql.SQLException;
    method public abstract java.lang.String getPassword();
    method public abstract int getQueryTimeout() throws java.sql.SQLException;
    method public abstract int getTransactionIsolation();
    method public abstract java.util.Map<java.lang.String, java.lang.Class<?>> getTypeMap() throws java.sql.SQLException;
    method public abstract java.lang.String getUrl() throws java.sql.SQLException;
    method public abstract java.lang.String getUsername();
    method public abstract boolean isReadOnly();
    method public abstract void removeRowSetListener(javax.sql.RowSetListener);
    method public abstract void setArray(int, java.sql.Array) throws java.sql.SQLException;
    method public abstract void setAsciiStream(int, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setAsciiStream(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setAsciiStream(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setAsciiStream(java.lang.String, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setBigDecimal(int, java.math.BigDecimal) throws java.sql.SQLException;
    method public abstract void setBigDecimal(java.lang.String, java.math.BigDecimal) throws java.sql.SQLException;
    method public abstract void setBinaryStream(int, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setBinaryStream(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBinaryStream(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBinaryStream(java.lang.String, java.io.InputStream, int) throws java.sql.SQLException;
    method public abstract void setBlob(int, java.sql.Blob) throws java.sql.SQLException;
    method public abstract void setBlob(int, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBlob(int, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setBlob(java.lang.String, java.io.InputStream) throws java.sql.SQLException;
    method public abstract void setBlob(java.lang.String, java.io.InputStream, long) throws java.sql.SQLException;
    method public abstract void setBlob(java.lang.String, java.sql.Blob) throws java.sql.SQLException;
    method public abstract void setBoolean(int, boolean) throws java.sql.SQLException;
    method public abstract void setBoolean(java.lang.String, boolean) throws java.sql.SQLException;
    method public abstract void setByte(int, byte) throws java.sql.SQLException;
    method public abstract void setByte(java.lang.String, byte) throws java.sql.SQLException;
    method public abstract void setBytes(int, byte[]) throws java.sql.SQLException;
    method public abstract void setBytes(java.lang.String, byte[]) throws java.sql.SQLException;
    method public abstract void setCharacterStream(int, java.io.Reader, int) throws java.sql.SQLException;
    method public abstract void setCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setCharacterStream(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setCharacterStream(java.lang.String, java.io.Reader, int) throws java.sql.SQLException;
    method public abstract void setClob(int, java.sql.Clob) throws java.sql.SQLException;
    method public abstract void setClob(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setClob(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setClob(java.lang.String, java.sql.Clob) throws java.sql.SQLException;
    method public abstract void setClob(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setClob(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setCommand(java.lang.String) throws java.sql.SQLException;
    method public abstract void setConcurrency(int) throws java.sql.SQLException;
    method public abstract void setDataSourceName(java.lang.String) throws java.sql.SQLException;
    method public abstract void setDate(int, java.sql.Date) throws java.sql.SQLException;
    method public abstract void setDate(int, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setDate(java.lang.String, java.sql.Date) throws java.sql.SQLException;
    method public abstract void setDate(java.lang.String, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setDouble(int, double) throws java.sql.SQLException;
    method public abstract void setDouble(java.lang.String, double) throws java.sql.SQLException;
    method public abstract void setEscapeProcessing(boolean) throws java.sql.SQLException;
    method public abstract void setFloat(int, float) throws java.sql.SQLException;
    method public abstract void setFloat(java.lang.String, float) throws java.sql.SQLException;
    method public abstract void setInt(int, int) throws java.sql.SQLException;
    method public abstract void setInt(java.lang.String, int) throws java.sql.SQLException;
    method public abstract void setLong(int, long) throws java.sql.SQLException;
    method public abstract void setLong(java.lang.String, long) throws java.sql.SQLException;
    method public abstract void setMaxFieldSize(int) throws java.sql.SQLException;
    method public abstract void setMaxRows(int) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNCharacterStream(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNClob(int, java.sql.NClob) throws java.sql.SQLException;
    method public abstract void setNClob(int, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNClob(int, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNClob(java.lang.String, java.sql.NClob) throws java.sql.SQLException;
    method public abstract void setNClob(java.lang.String, java.io.Reader) throws java.sql.SQLException;
    method public abstract void setNClob(java.lang.String, java.io.Reader, long) throws java.sql.SQLException;
    method public abstract void setNString(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setNString(java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract void setNull(int, int) throws java.sql.SQLException;
    method public abstract void setNull(int, int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setNull(java.lang.String, int) throws java.sql.SQLException;
    method public abstract void setNull(java.lang.String, int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object, int) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object, int, int) throws java.sql.SQLException;
    method public abstract void setObject(java.lang.String, java.lang.Object) throws java.sql.SQLException;
    method public abstract void setObject(java.lang.String, java.lang.Object, int) throws java.sql.SQLException;
    method public abstract void setObject(java.lang.String, java.lang.Object, int, int) throws java.sql.SQLException;
    method public abstract void setPassword(java.lang.String) throws java.sql.SQLException;
    method public abstract void setQueryTimeout(int) throws java.sql.SQLException;
    method public abstract void setReadOnly(boolean) throws java.sql.SQLException;
    method public abstract void setRef(int, java.sql.Ref) throws java.sql.SQLException;
    method public abstract void setRowId(int, java.sql.RowId) throws java.sql.SQLException;
    method public abstract void setRowId(java.lang.String, java.sql.RowId) throws java.sql.SQLException;
    method public abstract void setSQLXML(int, java.sql.SQLXML) throws java.sql.SQLException;
    method public abstract void setSQLXML(java.lang.String, java.sql.SQLXML) throws java.sql.SQLException;
    method public abstract void setShort(int, short) throws java.sql.SQLException;
    method public abstract void setShort(java.lang.String, short) throws java.sql.SQLException;
    method public abstract void setString(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setString(java.lang.String, java.lang.String) throws java.sql.SQLException;
    method public abstract void setTime(int, java.sql.Time) throws java.sql.SQLException;
    method public abstract void setTime(int, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setTime(java.lang.String, java.sql.Time) throws java.sql.SQLException;
    method public abstract void setTime(java.lang.String, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setTimestamp(int, java.sql.Timestamp) throws java.sql.SQLException;
    method public abstract void setTimestamp(int, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setTimestamp(java.lang.String, java.sql.Timestamp) throws java.sql.SQLException;
    method public abstract void setTimestamp(java.lang.String, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
    method public abstract void setTransactionIsolation(int) throws java.sql.SQLException;
    method public abstract void setType(int) throws java.sql.SQLException;
    method public abstract void setTypeMap(java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract void setURL(int, java.net.URL) throws java.sql.SQLException;
    method public abstract void setUrl(java.lang.String) throws java.sql.SQLException;
    method public abstract void setUsername(java.lang.String) throws java.sql.SQLException;
  }

  public class RowSetEvent extends java.util.EventObject implements java.io.Serializable {
    ctor public RowSetEvent(javax.sql.RowSet);
  }

  public abstract interface RowSetInternal {
    method public abstract java.sql.Connection getConnection() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getOriginal() throws java.sql.SQLException;
    method public abstract java.sql.ResultSet getOriginalRow() throws java.sql.SQLException;
    method public abstract java.lang.Object[] getParams() throws java.sql.SQLException;
    method public abstract void setMetaData(javax.sql.RowSetMetaData) throws java.sql.SQLException;
  }

  public abstract interface RowSetListener implements java.util.EventListener {
    method public abstract void cursorMoved(javax.sql.RowSetEvent);
    method public abstract void rowChanged(javax.sql.RowSetEvent);
    method public abstract void rowSetChanged(javax.sql.RowSetEvent);
  }

  public abstract interface RowSetMetaData implements java.sql.ResultSetMetaData {
    method public abstract void setAutoIncrement(int, boolean) throws java.sql.SQLException;
    method public abstract void setCaseSensitive(int, boolean) throws java.sql.SQLException;
    method public abstract void setCatalogName(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setColumnCount(int) throws java.sql.SQLException;
    method public abstract void setColumnDisplaySize(int, int) throws java.sql.SQLException;
    method public abstract void setColumnLabel(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setColumnName(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setColumnType(int, int) throws java.sql.SQLException;
    method public abstract void setColumnTypeName(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setCurrency(int, boolean) throws java.sql.SQLException;
    method public abstract void setNullable(int, int) throws java.sql.SQLException;
    method public abstract void setPrecision(int, int) throws java.sql.SQLException;
    method public abstract void setScale(int, int) throws java.sql.SQLException;
    method public abstract void setSchemaName(int, java.lang.String) throws java.sql.SQLException;
    method public abstract void setSearchable(int, boolean) throws java.sql.SQLException;
    method public abstract void setSigned(int, boolean) throws java.sql.SQLException;
    method public abstract void setTableName(int, java.lang.String) throws java.sql.SQLException;
  }

  public abstract interface RowSetReader {
    method public abstract void readData(javax.sql.RowSetInternal) throws java.sql.SQLException;
  }

  public abstract interface RowSetWriter {
    method public abstract boolean writeData(javax.sql.RowSetInternal) throws java.sql.SQLException;
  }

  public class StatementEvent extends java.util.EventObject {
    ctor public StatementEvent(javax.sql.PooledConnection, java.sql.PreparedStatement, java.sql.SQLException);
    ctor public StatementEvent(javax.sql.PooledConnection, java.sql.PreparedStatement);
    method public java.sql.SQLException getSQLException();
    method public java.sql.PreparedStatement getStatement();
  }

  public abstract interface StatementEventListener implements java.util.EventListener {
    method public abstract void statementClosed(javax.sql.StatementEvent);
    method public abstract void statementErrorOccurred(javax.sql.StatementEvent);
  }

}

package javax.xml {

  public final class XMLConstants {
    field public static final java.lang.String DEFAULT_NS_PREFIX = "";
    field public static final java.lang.String FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing";
    field public static final java.lang.String NULL_NS_URI = "";
    field public static final java.lang.String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
    field public static final java.lang.String W3C_XML_SCHEMA_INSTANCE_NS_URI = "http://www.w3.org/2001/XMLSchema-instance";
    field public static final java.lang.String W3C_XML_SCHEMA_NS_URI = "http://www.w3.org/2001/XMLSchema";
    field public static final java.lang.String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
    field public static final java.lang.String XMLNS_ATTRIBUTE = "xmlns";
    field public static final java.lang.String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/";
    field public static final java.lang.String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
    field public static final java.lang.String XML_NS_PREFIX = "xml";
    field public static final java.lang.String XML_NS_URI = "http://www.w3.org/XML/1998/namespace";
  }

}

package javax.xml.datatype {

  public class DatatypeConfigurationException extends java.lang.Exception {
    ctor public DatatypeConfigurationException();
    ctor public DatatypeConfigurationException(java.lang.String);
    ctor public DatatypeConfigurationException(java.lang.String, java.lang.Throwable);
    ctor public DatatypeConfigurationException(java.lang.Throwable);
  }

  public final class DatatypeConstants {
    field public static final int APRIL = 4; // 0x4
    field public static final int AUGUST = 8; // 0x8
    field public static final javax.xml.namespace.QName DATE;
    field public static final javax.xml.namespace.QName DATETIME;
    field public static final javax.xml.datatype.DatatypeConstants.Field DAYS;
    field public static final int DECEMBER = 12; // 0xc
    field public static final javax.xml.namespace.QName DURATION;
    field public static final javax.xml.namespace.QName DURATION_DAYTIME;
    field public static final javax.xml.namespace.QName DURATION_YEARMONTH;
    field public static final int EQUAL = 0; // 0x0
    field public static final int FEBRUARY = 2; // 0x2
    field public static final int FIELD_UNDEFINED = -2147483648; // 0x80000000
    field public static final javax.xml.namespace.QName GDAY;
    field public static final javax.xml.namespace.QName GMONTH;
    field public static final javax.xml.namespace.QName GMONTHDAY;
    field public static final int GREATER = 1; // 0x1
    field public static final javax.xml.namespace.QName GYEAR;
    field public static final javax.xml.namespace.QName GYEARMONTH;
    field public static final javax.xml.datatype.DatatypeConstants.Field HOURS;
    field public static final int INDETERMINATE = 2; // 0x2
    field public static final int JANUARY = 1; // 0x1
    field public static final int JULY = 7; // 0x7
    field public static final int JUNE = 6; // 0x6
    field public static final int LESSER = -1; // 0xffffffff
    field public static final int MARCH = 3; // 0x3
    field public static final int MAX_TIMEZONE_OFFSET = -840; // 0xfffffcb8
    field public static final int MAY = 5; // 0x5
    field public static final javax.xml.datatype.DatatypeConstants.Field MINUTES;
    field public static final int MIN_TIMEZONE_OFFSET = 840; // 0x348
    field public static final javax.xml.datatype.DatatypeConstants.Field MONTHS;
    field public static final int NOVEMBER = 11; // 0xb
    field public static final int OCTOBER = 10; // 0xa
    field public static final javax.xml.datatype.DatatypeConstants.Field SECONDS;
    field public static final int SEPTEMBER = 9; // 0x9
    field public static final javax.xml.namespace.QName TIME;
    field public static final javax.xml.datatype.DatatypeConstants.Field YEARS;
  }

  public static final class DatatypeConstants.Field {
    method public int getId();
  }

  public abstract class DatatypeFactory {
    ctor protected DatatypeFactory();
    method public abstract javax.xml.datatype.Duration newDuration(java.lang.String);
    method public abstract javax.xml.datatype.Duration newDuration(long);
    method public abstract javax.xml.datatype.Duration newDuration(boolean, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigDecimal);
    method public javax.xml.datatype.Duration newDuration(boolean, int, int, int, int, int, int);
    method public javax.xml.datatype.Duration newDurationDayTime(java.lang.String);
    method public javax.xml.datatype.Duration newDurationDayTime(long);
    method public javax.xml.datatype.Duration newDurationDayTime(boolean, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
    method public javax.xml.datatype.Duration newDurationDayTime(boolean, int, int, int, int);
    method public javax.xml.datatype.Duration newDurationYearMonth(java.lang.String);
    method public javax.xml.datatype.Duration newDurationYearMonth(long);
    method public javax.xml.datatype.Duration newDurationYearMonth(boolean, java.math.BigInteger, java.math.BigInteger);
    method public javax.xml.datatype.Duration newDurationYearMonth(boolean, int, int);
    method public static javax.xml.datatype.DatatypeFactory newInstance() throws javax.xml.datatype.DatatypeConfigurationException;
    method public static javax.xml.datatype.DatatypeFactory newInstance(java.lang.String, java.lang.ClassLoader) throws javax.xml.datatype.DatatypeConfigurationException;
    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar();
    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(java.lang.String);
    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(java.util.GregorianCalendar);
    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(java.math.BigInteger, int, int, int, int, int, java.math.BigDecimal, int);
    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(int, int, int, int, int, int, int, int);
    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarDate(int, int, int, int);
    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarTime(int, int, int, int);
    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarTime(int, int, int, java.math.BigDecimal, int);
    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarTime(int, int, int, int, int);
    field public static final java.lang.String DATATYPEFACTORY_IMPLEMENTATION_CLASS;
    field public static final java.lang.String DATATYPEFACTORY_PROPERTY = "javax.xml.datatype.DatatypeFactory";
  }

  public abstract class Duration {
    ctor public Duration();
    method public abstract javax.xml.datatype.Duration add(javax.xml.datatype.Duration);
    method public abstract void addTo(java.util.Calendar);
    method public void addTo(java.util.Date);
    method public abstract int compare(javax.xml.datatype.Duration);
    method public int getDays();
    method public abstract java.lang.Number getField(javax.xml.datatype.DatatypeConstants.Field);
    method public int getHours();
    method public int getMinutes();
    method public int getMonths();
    method public int getSeconds();
    method public abstract int getSign();
    method public long getTimeInMillis(java.util.Calendar);
    method public long getTimeInMillis(java.util.Date);
    method public javax.xml.namespace.QName getXMLSchemaType();
    method public int getYears();
    method public abstract int hashCode();
    method public boolean isLongerThan(javax.xml.datatype.Duration);
    method public abstract boolean isSet(javax.xml.datatype.DatatypeConstants.Field);
    method public boolean isShorterThan(javax.xml.datatype.Duration);
    method public javax.xml.datatype.Duration multiply(int);
    method public abstract javax.xml.datatype.Duration multiply(java.math.BigDecimal);
    method public abstract javax.xml.datatype.Duration negate();
    method public abstract javax.xml.datatype.Duration normalizeWith(java.util.Calendar);
    method public javax.xml.datatype.Duration subtract(javax.xml.datatype.Duration);
  }

  public abstract class XMLGregorianCalendar implements java.lang.Cloneable {
    ctor public XMLGregorianCalendar();
    method public abstract void add(javax.xml.datatype.Duration);
    method public abstract void clear();
    method public abstract java.lang.Object clone();
    method public abstract int compare(javax.xml.datatype.XMLGregorianCalendar);
    method public abstract int getDay();
    method public abstract java.math.BigInteger getEon();
    method public abstract java.math.BigInteger getEonAndYear();
    method public abstract java.math.BigDecimal getFractionalSecond();
    method public abstract int getHour();
    method public int getMillisecond();
    method public abstract int getMinute();
    method public abstract int getMonth();
    method public abstract int getSecond();
    method public abstract java.util.TimeZone getTimeZone(int);
    method public abstract int getTimezone();
    method public abstract javax.xml.namespace.QName getXMLSchemaType();
    method public abstract int getYear();
    method public abstract boolean isValid();
    method public abstract javax.xml.datatype.XMLGregorianCalendar normalize();
    method public abstract void reset();
    method public abstract void setDay(int);
    method public abstract void setFractionalSecond(java.math.BigDecimal);
    method public abstract void setHour(int);
    method public abstract void setMillisecond(int);
    method public abstract void setMinute(int);
    method public abstract void setMonth(int);
    method public abstract void setSecond(int);
    method public void setTime(int, int, int);
    method public void setTime(int, int, int, java.math.BigDecimal);
    method public void setTime(int, int, int, int);
    method public abstract void setTimezone(int);
    method public abstract void setYear(java.math.BigInteger);
    method public abstract void setYear(int);
    method public abstract java.util.GregorianCalendar toGregorianCalendar();
    method public abstract java.util.GregorianCalendar toGregorianCalendar(java.util.TimeZone, java.util.Locale, javax.xml.datatype.XMLGregorianCalendar);
    method public abstract java.lang.String toXMLFormat();
  }

}

package javax.xml.namespace {

  public abstract interface NamespaceContext {
    method public abstract java.lang.String getNamespaceURI(java.lang.String);
    method public abstract java.lang.String getPrefix(java.lang.String);
    method public abstract java.util.Iterator getPrefixes(java.lang.String);
  }

  public class QName implements java.io.Serializable {
    ctor public QName(java.lang.String, java.lang.String);
    ctor public QName(java.lang.String, java.lang.String, java.lang.String);
    ctor public QName(java.lang.String);
    method public final boolean equals(java.lang.Object);
    method public java.lang.String getLocalPart();
    method public java.lang.String getNamespaceURI();
    method public java.lang.String getPrefix();
    method public final int hashCode();
    method public static javax.xml.namespace.QName valueOf(java.lang.String);
  }

}

package javax.xml.parsers {

  public abstract class DocumentBuilder {
    ctor protected DocumentBuilder();
    method public abstract org.w3c.dom.DOMImplementation getDOMImplementation();
    method public javax.xml.validation.Schema getSchema();
    method public abstract boolean isNamespaceAware();
    method public abstract boolean isValidating();
    method public boolean isXIncludeAware();
    method public abstract org.w3c.dom.Document newDocument();
    method public org.w3c.dom.Document parse(java.io.InputStream) throws java.io.IOException, org.xml.sax.SAXException;
    method public org.w3c.dom.Document parse(java.io.InputStream, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public org.w3c.dom.Document parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public org.w3c.dom.Document parse(java.io.File) throws java.io.IOException, org.xml.sax.SAXException;
    method public abstract org.w3c.dom.Document parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
    method public void reset();
    method public abstract void setEntityResolver(org.xml.sax.EntityResolver);
    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
  }

  public abstract class DocumentBuilderFactory {
    ctor protected DocumentBuilderFactory();
    method public abstract java.lang.Object getAttribute(java.lang.String) throws java.lang.IllegalArgumentException;
    method public abstract boolean getFeature(java.lang.String) throws javax.xml.parsers.ParserConfigurationException;
    method public javax.xml.validation.Schema getSchema();
    method public boolean isCoalescing();
    method public boolean isExpandEntityReferences();
    method public boolean isIgnoringComments();
    method public boolean isIgnoringElementContentWhitespace();
    method public boolean isNamespaceAware();
    method public boolean isValidating();
    method public boolean isXIncludeAware();
    method public abstract javax.xml.parsers.DocumentBuilder newDocumentBuilder() throws javax.xml.parsers.ParserConfigurationException;
    method public static javax.xml.parsers.DocumentBuilderFactory newInstance();
    method public static javax.xml.parsers.DocumentBuilderFactory newInstance(java.lang.String, java.lang.ClassLoader);
    method public abstract void setAttribute(java.lang.String, java.lang.Object) throws java.lang.IllegalArgumentException;
    method public void setCoalescing(boolean);
    method public void setExpandEntityReferences(boolean);
    method public abstract void setFeature(java.lang.String, boolean) throws javax.xml.parsers.ParserConfigurationException;
    method public void setIgnoringComments(boolean);
    method public void setIgnoringElementContentWhitespace(boolean);
    method public void setNamespaceAware(boolean);
    method public void setSchema(javax.xml.validation.Schema);
    method public void setValidating(boolean);
    method public void setXIncludeAware(boolean);
  }

  public class FactoryConfigurationError extends java.lang.Error {
    ctor public FactoryConfigurationError();
    ctor public FactoryConfigurationError(java.lang.String);
    ctor public FactoryConfigurationError(java.lang.Exception);
    ctor public FactoryConfigurationError(java.lang.Exception, java.lang.String);
    method public java.lang.Exception getException();
  }

  public class ParserConfigurationException extends java.lang.Exception {
    ctor public ParserConfigurationException();
    ctor public ParserConfigurationException(java.lang.String);
  }

  public abstract class SAXParser {
    ctor protected SAXParser();
    method public abstract org.xml.sax.Parser getParser() throws org.xml.sax.SAXException;
    method public abstract java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public javax.xml.validation.Schema getSchema();
    method public abstract org.xml.sax.XMLReader getXMLReader() throws org.xml.sax.SAXException;
    method public abstract boolean isNamespaceAware();
    method public abstract boolean isValidating();
    method public boolean isXIncludeAware();
    method public void parse(java.io.InputStream, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.io.InputStream, org.xml.sax.HandlerBase, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.lang.String, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.lang.String, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.io.File, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.io.File, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(org.xml.sax.InputSource, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(org.xml.sax.InputSource, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
    method public void reset();
    method public abstract void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
  }

  public abstract class SAXParserFactory {
    ctor protected SAXParserFactory();
    method public abstract boolean getFeature(java.lang.String) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public javax.xml.validation.Schema getSchema();
    method public boolean isNamespaceAware();
    method public boolean isValidating();
    method public boolean isXIncludeAware();
    method public static javax.xml.parsers.SAXParserFactory newInstance();
    method public static javax.xml.parsers.SAXParserFactory newInstance(java.lang.String, java.lang.ClassLoader);
    method public abstract javax.xml.parsers.SAXParser newSAXParser() throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException;
    method public abstract void setFeature(java.lang.String, boolean) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void setNamespaceAware(boolean);
    method public void setSchema(javax.xml.validation.Schema);
    method public void setValidating(boolean);
    method public void setXIncludeAware(boolean);
  }

}

package javax.xml.transform {

  public abstract interface ErrorListener {
    method public abstract void error(javax.xml.transform.TransformerException) throws javax.xml.transform.TransformerException;
    method public abstract void fatalError(javax.xml.transform.TransformerException) throws javax.xml.transform.TransformerException;
    method public abstract void warning(javax.xml.transform.TransformerException) throws javax.xml.transform.TransformerException;
  }

  public class OutputKeys {
    field public static final java.lang.String CDATA_SECTION_ELEMENTS = "cdata-section-elements";
    field public static final java.lang.String DOCTYPE_PUBLIC = "doctype-public";
    field public static final java.lang.String DOCTYPE_SYSTEM = "doctype-system";
    field public static final java.lang.String ENCODING = "encoding";
    field public static final java.lang.String INDENT = "indent";
    field public static final java.lang.String MEDIA_TYPE = "media-type";
    field public static final java.lang.String METHOD = "method";
    field public static final java.lang.String OMIT_XML_DECLARATION = "omit-xml-declaration";
    field public static final java.lang.String STANDALONE = "standalone";
    field public static final java.lang.String VERSION = "version";
  }

  public abstract interface Result {
    method public abstract java.lang.String getSystemId();
    method public abstract void setSystemId(java.lang.String);
    field public static final java.lang.String PI_DISABLE_OUTPUT_ESCAPING = "javax.xml.transform.disable-output-escaping";
    field public static final java.lang.String PI_ENABLE_OUTPUT_ESCAPING = "javax.xml.transform.enable-output-escaping";
  }

  public abstract interface Source {
    method public abstract java.lang.String getSystemId();
    method public abstract void setSystemId(java.lang.String);
  }

  public abstract interface SourceLocator {
    method public abstract int getColumnNumber();
    method public abstract int getLineNumber();
    method public abstract java.lang.String getPublicId();
    method public abstract java.lang.String getSystemId();
  }

  public abstract interface Templates {
    method public abstract java.util.Properties getOutputProperties();
    method public abstract javax.xml.transform.Transformer newTransformer() throws javax.xml.transform.TransformerConfigurationException;
  }

  public abstract class Transformer {
    ctor protected Transformer();
    method public abstract void clearParameters();
    method public abstract javax.xml.transform.ErrorListener getErrorListener();
    method public abstract java.util.Properties getOutputProperties();
    method public abstract java.lang.String getOutputProperty(java.lang.String) throws java.lang.IllegalArgumentException;
    method public abstract java.lang.Object getParameter(java.lang.String);
    method public abstract javax.xml.transform.URIResolver getURIResolver();
    method public void reset();
    method public abstract void setErrorListener(javax.xml.transform.ErrorListener) throws java.lang.IllegalArgumentException;
    method public abstract void setOutputProperties(java.util.Properties);
    method public abstract void setOutputProperty(java.lang.String, java.lang.String) throws java.lang.IllegalArgumentException;
    method public abstract void setParameter(java.lang.String, java.lang.Object);
    method public abstract void setURIResolver(javax.xml.transform.URIResolver);
    method public abstract void transform(javax.xml.transform.Source, javax.xml.transform.Result) throws javax.xml.transform.TransformerException;
  }

  public class TransformerConfigurationException extends javax.xml.transform.TransformerException {
    ctor public TransformerConfigurationException();
    ctor public TransformerConfigurationException(java.lang.String);
    ctor public TransformerConfigurationException(java.lang.Throwable);
    ctor public TransformerConfigurationException(java.lang.String, java.lang.Throwable);
    ctor public TransformerConfigurationException(java.lang.String, javax.xml.transform.SourceLocator);
    ctor public TransformerConfigurationException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable);
  }

  public class TransformerException extends java.lang.Exception {
    ctor public TransformerException(java.lang.String);
    ctor public TransformerException(java.lang.Throwable);
    ctor public TransformerException(java.lang.String, java.lang.Throwable);
    ctor public TransformerException(java.lang.String, javax.xml.transform.SourceLocator);
    ctor public TransformerException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable);
    method public java.lang.Throwable getException();
    method public java.lang.String getLocationAsString();
    method public javax.xml.transform.SourceLocator getLocator();
    method public java.lang.String getMessageAndLocation();
    method public void setLocator(javax.xml.transform.SourceLocator);
  }

  public abstract class TransformerFactory {
    ctor protected TransformerFactory();
    method public abstract javax.xml.transform.Source getAssociatedStylesheet(javax.xml.transform.Source, java.lang.String, java.lang.String, java.lang.String) throws javax.xml.transform.TransformerConfigurationException;
    method public abstract java.lang.Object getAttribute(java.lang.String);
    method public abstract javax.xml.transform.ErrorListener getErrorListener();
    method public abstract boolean getFeature(java.lang.String);
    method public abstract javax.xml.transform.URIResolver getURIResolver();
    method public static javax.xml.transform.TransformerFactory newInstance() throws javax.xml.transform.TransformerFactoryConfigurationError;
    method public static javax.xml.transform.TransformerFactory newInstance(java.lang.String, java.lang.ClassLoader) throws javax.xml.transform.TransformerFactoryConfigurationError;
    method public abstract javax.xml.transform.Templates newTemplates(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
    method public abstract javax.xml.transform.Transformer newTransformer(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
    method public abstract javax.xml.transform.Transformer newTransformer() throws javax.xml.transform.TransformerConfigurationException;
    method public abstract void setAttribute(java.lang.String, java.lang.Object);
    method public abstract void setErrorListener(javax.xml.transform.ErrorListener);
    method public abstract void setFeature(java.lang.String, boolean) throws javax.xml.transform.TransformerConfigurationException;
    method public abstract void setURIResolver(javax.xml.transform.URIResolver);
  }

  public class TransformerFactoryConfigurationError extends java.lang.Error {
    ctor public TransformerFactoryConfigurationError();
    ctor public TransformerFactoryConfigurationError(java.lang.String);
    ctor public TransformerFactoryConfigurationError(java.lang.Exception);
    ctor public TransformerFactoryConfigurationError(java.lang.Exception, java.lang.String);
    method public java.lang.Exception getException();
  }

  public abstract interface URIResolver {
    method public abstract javax.xml.transform.Source resolve(java.lang.String, java.lang.String) throws javax.xml.transform.TransformerException;
  }

}

package javax.xml.transform.dom {

  public abstract interface DOMLocator implements javax.xml.transform.SourceLocator {
    method public abstract org.w3c.dom.Node getOriginatingNode();
  }

  public class DOMResult implements javax.xml.transform.Result {
    ctor public DOMResult();
    ctor public DOMResult(org.w3c.dom.Node);
    ctor public DOMResult(org.w3c.dom.Node, java.lang.String);
    ctor public DOMResult(org.w3c.dom.Node, org.w3c.dom.Node);
    ctor public DOMResult(org.w3c.dom.Node, org.w3c.dom.Node, java.lang.String);
    method public org.w3c.dom.Node getNextSibling();
    method public org.w3c.dom.Node getNode();
    method public java.lang.String getSystemId();
    method public void setNextSibling(org.w3c.dom.Node);
    method public void setNode(org.w3c.dom.Node);
    method public void setSystemId(java.lang.String);
    field public static final java.lang.String FEATURE = "http://javax.xml.transform.dom.DOMResult/feature";
  }

  public class DOMSource implements javax.xml.transform.Source {
    ctor public DOMSource();
    ctor public DOMSource(org.w3c.dom.Node);
    ctor public DOMSource(org.w3c.dom.Node, java.lang.String);
    method public org.w3c.dom.Node getNode();
    method public java.lang.String getSystemId();
    method public void setNode(org.w3c.dom.Node);
    method public void setSystemId(java.lang.String);
    field public static final java.lang.String FEATURE = "http://javax.xml.transform.dom.DOMSource/feature";
  }

}

package javax.xml.transform.sax {

  public class SAXResult implements javax.xml.transform.Result {
    ctor public SAXResult();
    ctor public SAXResult(org.xml.sax.ContentHandler);
    method public org.xml.sax.ContentHandler getHandler();
    method public org.xml.sax.ext.LexicalHandler getLexicalHandler();
    method public java.lang.String getSystemId();
    method public void setHandler(org.xml.sax.ContentHandler);
    method public void setLexicalHandler(org.xml.sax.ext.LexicalHandler);
    method public void setSystemId(java.lang.String);
    field public static final java.lang.String FEATURE = "http://javax.xml.transform.sax.SAXResult/feature";
  }

  public class SAXSource implements javax.xml.transform.Source {
    ctor public SAXSource();
    ctor public SAXSource(org.xml.sax.XMLReader, org.xml.sax.InputSource);
    ctor public SAXSource(org.xml.sax.InputSource);
    method public org.xml.sax.InputSource getInputSource();
    method public java.lang.String getSystemId();
    method public org.xml.sax.XMLReader getXMLReader();
    method public void setInputSource(org.xml.sax.InputSource);
    method public void setSystemId(java.lang.String);
    method public void setXMLReader(org.xml.sax.XMLReader);
    method public static org.xml.sax.InputSource sourceToInputSource(javax.xml.transform.Source);
    field public static final java.lang.String FEATURE = "http://javax.xml.transform.sax.SAXSource/feature";
  }

  public abstract class SAXTransformerFactory extends javax.xml.transform.TransformerFactory {
    ctor protected SAXTransformerFactory();
    method public abstract javax.xml.transform.sax.TemplatesHandler newTemplatesHandler() throws javax.xml.transform.TransformerConfigurationException;
    method public abstract javax.xml.transform.sax.TransformerHandler newTransformerHandler(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
    method public abstract javax.xml.transform.sax.TransformerHandler newTransformerHandler(javax.xml.transform.Templates) throws javax.xml.transform.TransformerConfigurationException;
    method public abstract javax.xml.transform.sax.TransformerHandler newTransformerHandler() throws javax.xml.transform.TransformerConfigurationException;
    method public abstract org.xml.sax.XMLFilter newXMLFilter(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
    method public abstract org.xml.sax.XMLFilter newXMLFilter(javax.xml.transform.Templates) throws javax.xml.transform.TransformerConfigurationException;
    field public static final java.lang.String FEATURE = "http://javax.xml.transform.sax.SAXTransformerFactory/feature";
    field public static final java.lang.String FEATURE_XMLFILTER = "http://javax.xml.transform.sax.SAXTransformerFactory/feature/xmlfilter";
  }

  public abstract interface TemplatesHandler implements org.xml.sax.ContentHandler {
    method public abstract java.lang.String getSystemId();
    method public abstract javax.xml.transform.Templates getTemplates();
    method public abstract void setSystemId(java.lang.String);
  }

  public abstract interface TransformerHandler implements org.xml.sax.ContentHandler org.xml.sax.DTDHandler org.xml.sax.ext.LexicalHandler {
    method public abstract java.lang.String getSystemId();
    method public abstract javax.xml.transform.Transformer getTransformer();
    method public abstract void setResult(javax.xml.transform.Result) throws java.lang.IllegalArgumentException;
    method public abstract void setSystemId(java.lang.String);
  }

}

package javax.xml.transform.stream {

  public class StreamResult implements javax.xml.transform.Result {
    ctor public StreamResult();
    ctor public StreamResult(java.io.OutputStream);
    ctor public StreamResult(java.io.Writer);
    ctor public StreamResult(java.lang.String);
    ctor public StreamResult(java.io.File);
    method public java.io.OutputStream getOutputStream();
    method public java.lang.String getSystemId();
    method public java.io.Writer getWriter();
    method public void setOutputStream(java.io.OutputStream);
    method public void setSystemId(java.lang.String);
    method public void setSystemId(java.io.File);
    method public void setWriter(java.io.Writer);
    field public static final java.lang.String FEATURE = "http://javax.xml.transform.stream.StreamResult/feature";
  }

  public class StreamSource implements javax.xml.transform.Source {
    ctor public StreamSource();
    ctor public StreamSource(java.io.InputStream);
    ctor public StreamSource(java.io.InputStream, java.lang.String);
    ctor public StreamSource(java.io.Reader);
    ctor public StreamSource(java.io.Reader, java.lang.String);
    ctor public StreamSource(java.lang.String);
    ctor public StreamSource(java.io.File);
    method public java.io.InputStream getInputStream();
    method public java.lang.String getPublicId();
    method public java.io.Reader getReader();
    method public java.lang.String getSystemId();
    method public void setInputStream(java.io.InputStream);
    method public void setPublicId(java.lang.String);
    method public void setReader(java.io.Reader);
    method public void setSystemId(java.lang.String);
    method public void setSystemId(java.io.File);
    field public static final java.lang.String FEATURE = "http://javax.xml.transform.stream.StreamSource/feature";
  }

}

package javax.xml.validation {

  public abstract class Schema {
    ctor protected Schema();
    method public abstract javax.xml.validation.Validator newValidator();
    method public abstract javax.xml.validation.ValidatorHandler newValidatorHandler();
  }

  public abstract class SchemaFactory {
    ctor protected SchemaFactory();
    method public abstract org.xml.sax.ErrorHandler getErrorHandler();
    method public boolean getFeature(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract org.w3c.dom.ls.LSResourceResolver getResourceResolver();
    method public abstract boolean isSchemaLanguageSupported(java.lang.String);
    method public static javax.xml.validation.SchemaFactory newInstance(java.lang.String);
    method public static javax.xml.validation.SchemaFactory newInstance(java.lang.String, java.lang.String, java.lang.ClassLoader);
    method public javax.xml.validation.Schema newSchema(javax.xml.transform.Source) throws org.xml.sax.SAXException;
    method public javax.xml.validation.Schema newSchema(java.io.File) throws org.xml.sax.SAXException;
    method public javax.xml.validation.Schema newSchema(java.net.URL) throws org.xml.sax.SAXException;
    method public abstract javax.xml.validation.Schema newSchema(javax.xml.transform.Source[]) throws org.xml.sax.SAXException;
    method public abstract javax.xml.validation.Schema newSchema() throws org.xml.sax.SAXException;
    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
    method public void setFeature(java.lang.String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract void setResourceResolver(org.w3c.dom.ls.LSResourceResolver);
  }

  public abstract class SchemaFactoryLoader {
    ctor protected SchemaFactoryLoader();
    method public abstract javax.xml.validation.SchemaFactory newFactory(java.lang.String);
  }

  public abstract class TypeInfoProvider {
    ctor protected TypeInfoProvider();
    method public abstract org.w3c.dom.TypeInfo getAttributeTypeInfo(int);
    method public abstract org.w3c.dom.TypeInfo getElementTypeInfo();
    method public abstract boolean isIdAttribute(int);
    method public abstract boolean isSpecified(int);
  }

  public abstract class Validator {
    ctor protected Validator();
    method public abstract org.xml.sax.ErrorHandler getErrorHandler();
    method public boolean getFeature(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract org.w3c.dom.ls.LSResourceResolver getResourceResolver();
    method public abstract void reset();
    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
    method public void setFeature(java.lang.String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract void setResourceResolver(org.w3c.dom.ls.LSResourceResolver);
    method public void validate(javax.xml.transform.Source) throws java.io.IOException, org.xml.sax.SAXException;
    method public abstract void validate(javax.xml.transform.Source, javax.xml.transform.Result) throws java.io.IOException, org.xml.sax.SAXException;
  }

  public abstract class ValidatorHandler implements org.xml.sax.ContentHandler {
    ctor protected ValidatorHandler();
    method public abstract org.xml.sax.ContentHandler getContentHandler();
    method public abstract org.xml.sax.ErrorHandler getErrorHandler();
    method public boolean getFeature(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract org.w3c.dom.ls.LSResourceResolver getResourceResolver();
    method public abstract javax.xml.validation.TypeInfoProvider getTypeInfoProvider();
    method public abstract void setContentHandler(org.xml.sax.ContentHandler);
    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
    method public void setFeature(java.lang.String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract void setResourceResolver(org.w3c.dom.ls.LSResourceResolver);
  }

}

package javax.xml.xpath {

  public abstract interface XPath {
    method public abstract javax.xml.xpath.XPathExpression compile(java.lang.String) throws javax.xml.xpath.XPathExpressionException;
    method public abstract java.lang.Object evaluate(java.lang.String, java.lang.Object, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
    method public abstract java.lang.String evaluate(java.lang.String, java.lang.Object) throws javax.xml.xpath.XPathExpressionException;
    method public abstract java.lang.Object evaluate(java.lang.String, org.xml.sax.InputSource, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
    method public abstract java.lang.String evaluate(java.lang.String, org.xml.sax.InputSource) throws javax.xml.xpath.XPathExpressionException;
    method public abstract javax.xml.namespace.NamespaceContext getNamespaceContext();
    method public abstract javax.xml.xpath.XPathFunctionResolver getXPathFunctionResolver();
    method public abstract javax.xml.xpath.XPathVariableResolver getXPathVariableResolver();
    method public abstract void reset();
    method public abstract void setNamespaceContext(javax.xml.namespace.NamespaceContext);
    method public abstract void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver);
    method public abstract void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver);
  }

  public class XPathConstants {
    field public static final javax.xml.namespace.QName BOOLEAN;
    field public static final java.lang.String DOM_OBJECT_MODEL = "http://java.sun.com/jaxp/xpath/dom";
    field public static final javax.xml.namespace.QName NODE;
    field public static final javax.xml.namespace.QName NODESET;
    field public static final javax.xml.namespace.QName NUMBER;
    field public static final javax.xml.namespace.QName STRING;
  }

  public class XPathException extends java.lang.Exception {
    ctor public XPathException(java.lang.String);
    ctor public XPathException(java.lang.Throwable);
  }

  public abstract interface XPathExpression {
    method public abstract java.lang.Object evaluate(java.lang.Object, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
    method public abstract java.lang.String evaluate(java.lang.Object) throws javax.xml.xpath.XPathExpressionException;
    method public abstract java.lang.Object evaluate(org.xml.sax.InputSource, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
    method public abstract java.lang.String evaluate(org.xml.sax.InputSource) throws javax.xml.xpath.XPathExpressionException;
  }

  public class XPathExpressionException extends javax.xml.xpath.XPathException {
    ctor public XPathExpressionException(java.lang.String);
    ctor public XPathExpressionException(java.lang.Throwable);
  }

  public abstract class XPathFactory {
    ctor protected XPathFactory();
    method public abstract boolean getFeature(java.lang.String) throws javax.xml.xpath.XPathFactoryConfigurationException;
    method public abstract boolean isObjectModelSupported(java.lang.String);
    method public static final javax.xml.xpath.XPathFactory newInstance();
    method public static final javax.xml.xpath.XPathFactory newInstance(java.lang.String) throws javax.xml.xpath.XPathFactoryConfigurationException;
    method public static javax.xml.xpath.XPathFactory newInstance(java.lang.String, java.lang.String, java.lang.ClassLoader) throws javax.xml.xpath.XPathFactoryConfigurationException;
    method public abstract javax.xml.xpath.XPath newXPath();
    method public abstract void setFeature(java.lang.String, boolean) throws javax.xml.xpath.XPathFactoryConfigurationException;
    method public abstract void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver);
    method public abstract void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver);
    field public static final java.lang.String DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom";
    field public static final java.lang.String DEFAULT_PROPERTY_NAME = "javax.xml.xpath.XPathFactory";
  }

  public class XPathFactoryConfigurationException extends javax.xml.xpath.XPathException {
    ctor public XPathFactoryConfigurationException(java.lang.String);
    ctor public XPathFactoryConfigurationException(java.lang.Throwable);
  }

  public abstract interface XPathFunction {
    method public abstract java.lang.Object evaluate(java.util.List) throws javax.xml.xpath.XPathFunctionException;
  }

  public class XPathFunctionException extends javax.xml.xpath.XPathExpressionException {
    ctor public XPathFunctionException(java.lang.String);
    ctor public XPathFunctionException(java.lang.Throwable);
  }

  public abstract interface XPathFunctionResolver {
    method public abstract javax.xml.xpath.XPathFunction resolveFunction(javax.xml.namespace.QName, int);
  }

  public abstract interface XPathVariableResolver {
    method public abstract java.lang.Object resolveVariable(javax.xml.namespace.QName);
  }

}

package junit.framework {

  public class Assert {
    ctor protected Assert();
    method public static void assertEquals(java.lang.String, java.lang.Object, java.lang.Object);
    method public static void assertEquals(java.lang.Object, java.lang.Object);
    method public static void assertEquals(java.lang.String, java.lang.String, java.lang.String);
    method public static void assertEquals(java.lang.String, java.lang.String);
    method public static void assertEquals(java.lang.String, double, double, double);
    method public static void assertEquals(double, double, double);
    method public static void assertEquals(java.lang.String, float, float, float);
    method public static void assertEquals(float, float, float);
    method public static void assertEquals(java.lang.String, long, long);
    method public static void assertEquals(long, long);
    method public static void assertEquals(java.lang.String, boolean, boolean);
    method public static void assertEquals(boolean, boolean);
    method public static void assertEquals(java.lang.String, byte, byte);
    method public static void assertEquals(byte, byte);
    method public static void assertEquals(java.lang.String, char, char);
    method public static void assertEquals(char, char);
    method public static void assertEquals(java.lang.String, short, short);
    method public static void assertEquals(short, short);
    method public static void assertEquals(java.lang.String, int, int);
    method public static void assertEquals(int, int);
    method public static void assertFalse(java.lang.String, boolean);
    method public static void assertFalse(boolean);
    method public static void assertNotNull(java.lang.Object);
    method public static void assertNotNull(java.lang.String, java.lang.Object);
    method public static void assertNotSame(java.lang.String, java.lang.Object, java.lang.Object);
    method public static void assertNotSame(java.lang.Object, java.lang.Object);
    method public static void assertNull(java.lang.Object);
    method public static void assertNull(java.lang.String, java.lang.Object);
    method public static void assertSame(java.lang.String, java.lang.Object, java.lang.Object);
    method public static void assertSame(java.lang.Object, java.lang.Object);
    method public static void assertTrue(java.lang.String, boolean);
    method public static void assertTrue(boolean);
    method public static void fail(java.lang.String);
    method public static void fail();
    method public static void failNotEquals(java.lang.String, java.lang.Object, java.lang.Object);
    method public static void failNotSame(java.lang.String, java.lang.Object, java.lang.Object);
    method public static void failSame(java.lang.String);
    method public static java.lang.String format(java.lang.String, java.lang.Object, java.lang.Object);
  }

  public class AssertionFailedError extends java.lang.AssertionError {
    ctor public AssertionFailedError();
    ctor public AssertionFailedError(java.lang.String);
  }

  public class ComparisonFailure extends junit.framework.AssertionFailedError {
    ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String);
    method public java.lang.String getActual();
    method public java.lang.String getExpected();
  }

  public abstract interface Protectable {
    method public abstract void protect() throws java.lang.Throwable;
  }

  public abstract interface Test {
    method public abstract int countTestCases();
    method public abstract void run(junit.framework.TestResult);
  }

  public abstract class TestCase extends junit.framework.Assert implements junit.framework.Test {
    ctor public TestCase();
    ctor public TestCase(java.lang.String);
    method public int countTestCases();
    method protected junit.framework.TestResult createResult();
    method public java.lang.String getName();
    method public junit.framework.TestResult run();
    method public void run(junit.framework.TestResult);
    method public void runBare() throws java.lang.Throwable;
    method protected void runTest() throws java.lang.Throwable;
    method public void setName(java.lang.String);
    method protected void setUp() throws java.lang.Exception;
    method protected void tearDown() throws java.lang.Exception;
  }

  public class TestFailure {
    ctor public TestFailure(junit.framework.Test, java.lang.Throwable);
    method public java.lang.String exceptionMessage();
    method public junit.framework.Test failedTest();
    method public boolean isFailure();
    method public java.lang.Throwable thrownException();
    method public java.lang.String trace();
    field protected junit.framework.Test fFailedTest;
    field protected java.lang.Throwable fThrownException;
  }

  public abstract interface TestListener {
    method public abstract void addError(junit.framework.Test, java.lang.Throwable);
    method public abstract void addFailure(junit.framework.Test, junit.framework.AssertionFailedError);
    method public abstract void endTest(junit.framework.Test);
    method public abstract void startTest(junit.framework.Test);
  }

  public class TestResult {
    ctor public TestResult();
    method public synchronized void addError(junit.framework.Test, java.lang.Throwable);
    method public synchronized void addFailure(junit.framework.Test, junit.framework.AssertionFailedError);
    method public synchronized void addListener(junit.framework.TestListener);
    method public void endTest(junit.framework.Test);
    method public synchronized int errorCount();
    method public synchronized java.util.Enumeration<junit.framework.TestFailure> errors();
    method public synchronized int failureCount();
    method public synchronized java.util.Enumeration<junit.framework.TestFailure> failures();
    method public synchronized void removeListener(junit.framework.TestListener);
    method protected void run(junit.framework.TestCase);
    method public synchronized int runCount();
    method public void runProtected(junit.framework.Test, junit.framework.Protectable);
    method public synchronized boolean shouldStop();
    method public void startTest(junit.framework.Test);
    method public synchronized void stop();
    method public synchronized boolean wasSuccessful();
    field protected java.util.Vector<junit.framework.TestFailure> fErrors;
    field protected java.util.Vector<junit.framework.TestFailure> fFailures;
    field protected java.util.Vector<junit.framework.TestListener> fListeners;
    field protected int fRunTests;
  }

  public class TestSuite implements junit.framework.Test {
    ctor public TestSuite();
    ctor public TestSuite(java.lang.Class<?>);
    ctor public TestSuite(java.lang.Class<? extends junit.framework.TestCase>, java.lang.String);
    ctor public TestSuite(java.lang.String);
    ctor public TestSuite(java.lang.Class<?>...);
    ctor public TestSuite(java.lang.Class<? extends junit.framework.TestCase>[], java.lang.String);
    method public void addTest(junit.framework.Test);
    method public void addTestSuite(java.lang.Class<? extends junit.framework.TestCase>);
    method public int countTestCases();
    method public static junit.framework.Test createTest(java.lang.Class<?>, java.lang.String);
    method public java.lang.String getName();
    method public static java.lang.reflect.Constructor<?> getTestConstructor(java.lang.Class<?>) throws java.lang.NoSuchMethodException;
    method public void run(junit.framework.TestResult);
    method public void runTest(junit.framework.Test, junit.framework.TestResult);
    method public void setName(java.lang.String);
    method public junit.framework.Test testAt(int);
    method public int testCount();
    method public java.util.Enumeration<junit.framework.Test> tests();
    method public static junit.framework.Test warning(java.lang.String);
  }

}

package junit.runner {

  public abstract class BaseTestRunner implements junit.framework.TestListener {
    ctor public BaseTestRunner();
    method public synchronized void addError(junit.framework.Test, java.lang.Throwable);
    method public synchronized void addFailure(junit.framework.Test, junit.framework.AssertionFailedError);
    method protected void clearStatus();
    method public java.lang.String elapsedTimeAsString(long);
    method public synchronized void endTest(junit.framework.Test);
    method public java.lang.String extractClassName(java.lang.String);
    method public static java.lang.String getFilteredTrace(java.lang.Throwable);
    method public static java.lang.String getFilteredTrace(java.lang.String);
    method public deprecated junit.runner.TestSuiteLoader getLoader();
    method public static java.lang.String getPreference(java.lang.String);
    method public static int getPreference(java.lang.String, int);
    method protected static java.util.Properties getPreferences();
    method public junit.framework.Test getTest(java.lang.String);
    method public static deprecated boolean inVAJava();
    method protected java.lang.Class<?> loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException;
    method protected java.lang.String processArguments(java.lang.String[]);
    method protected abstract void runFailed(java.lang.String);
    method public static void savePreferences() throws java.io.IOException;
    method public void setLoading(boolean);
    method public void setPreference(java.lang.String, java.lang.String);
    method protected static void setPreferences(java.util.Properties);
    method protected static boolean showStackRaw();
    method public synchronized void startTest(junit.framework.Test);
    method public abstract void testEnded(java.lang.String);
    method public abstract void testFailed(int, junit.framework.Test, java.lang.Throwable);
    method public abstract void testStarted(java.lang.String);
    method public static java.lang.String truncate(java.lang.String);
    method protected boolean useReloadingTestSuiteLoader();
    field public static final java.lang.String SUITE_METHODNAME = "suite";
  }

  public abstract interface TestSuiteLoader {
    method public abstract java.lang.Class load(java.lang.String) throws java.lang.ClassNotFoundException;
    method public abstract java.lang.Class reload(java.lang.Class) throws java.lang.ClassNotFoundException;
  }

  public class Version {
    method public static java.lang.String id();
  }

}

package org.apache.http.conn {

  public deprecated class ConnectTimeoutException extends java.io.InterruptedIOException {
    ctor public ConnectTimeoutException();
    ctor public ConnectTimeoutException(java.lang.String);
  }

}

package org.apache.http.conn.scheme {

  public abstract deprecated interface HostNameResolver {
    method public abstract java.net.InetAddress resolve(java.lang.String) throws java.io.IOException;
  }

  public abstract deprecated interface LayeredSocketFactory implements org.apache.http.conn.scheme.SocketFactory {
    method public abstract java.net.Socket createSocket(java.net.Socket, java.lang.String, int, boolean) throws java.io.IOException, java.net.UnknownHostException;
  }

  public abstract deprecated interface SocketFactory {
    method public abstract java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws org.apache.http.conn.ConnectTimeoutException, java.io.IOException, java.net.UnknownHostException;
    method public abstract java.net.Socket createSocket() throws java.io.IOException;
    method public abstract boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException;
  }

}

package org.apache.http.conn.ssl {

  public abstract deprecated class AbstractVerifier implements org.apache.http.conn.ssl.X509HostnameVerifier {
    ctor public AbstractVerifier();
    method public static boolean acceptableCountryWildcard(java.lang.String);
    method public static int countDots(java.lang.String);
    method public static java.lang.String[] getCNs(java.security.cert.X509Certificate);
    method public static java.lang.String[] getDNSSubjectAlts(java.security.cert.X509Certificate);
    method public final void verify(java.lang.String, javax.net.ssl.SSLSocket) throws java.io.IOException;
    method public final boolean verify(java.lang.String, javax.net.ssl.SSLSession);
    method public final void verify(java.lang.String, java.security.cert.X509Certificate) throws javax.net.ssl.SSLException;
    method public final void verify(java.lang.String, java.lang.String[], java.lang.String[], boolean) throws javax.net.ssl.SSLException;
  }

  public deprecated class AllowAllHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {
    ctor public AllowAllHostnameVerifier();
    method public final java.lang.String toString();
    method public final void verify(java.lang.String, java.lang.String[], java.lang.String[]);
  }

  public deprecated class BrowserCompatHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {
    ctor public BrowserCompatHostnameVerifier();
    method public final java.lang.String toString();
    method public final void verify(java.lang.String, java.lang.String[], java.lang.String[]) throws javax.net.ssl.SSLException;
  }

  public deprecated class SSLSocketFactory implements org.apache.http.conn.scheme.LayeredSocketFactory {
    ctor public SSLSocketFactory(java.lang.String, java.security.KeyStore, java.lang.String, java.security.KeyStore, java.security.SecureRandom, org.apache.http.conn.scheme.HostNameResolver) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    ctor public SSLSocketFactory(java.security.KeyStore, java.lang.String, java.security.KeyStore) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    ctor public SSLSocketFactory(java.security.KeyStore, java.lang.String) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    ctor public SSLSocketFactory(java.security.KeyStore) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
    method public java.net.Socket connectSocket(java.net.Socket, java.lang.String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws java.io.IOException;
    method public java.net.Socket createSocket() throws java.io.IOException;
    method public java.net.Socket createSocket(java.net.Socket, java.lang.String, int, boolean) throws java.io.IOException, java.net.UnknownHostException;
    method public org.apache.http.conn.ssl.X509HostnameVerifier getHostnameVerifier();
    method public static org.apache.http.conn.ssl.SSLSocketFactory getSocketFactory();
    method public boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException;
    method public void setHostnameVerifier(org.apache.http.conn.ssl.X509HostnameVerifier);
    field public static final org.apache.http.conn.ssl.X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER;
    field public static final org.apache.http.conn.ssl.X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
    field public static final java.lang.String SSL = "SSL";
    field public static final java.lang.String SSLV2 = "SSLv2";
    field public static final org.apache.http.conn.ssl.X509HostnameVerifier STRICT_HOSTNAME_VERIFIER;
    field public static final java.lang.String TLS = "TLS";
  }

  public deprecated class StrictHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {
    ctor public StrictHostnameVerifier();
    method public final java.lang.String toString();
    method public final void verify(java.lang.String, java.lang.String[], java.lang.String[]) throws javax.net.ssl.SSLException;
  }

  public abstract deprecated interface X509HostnameVerifier implements javax.net.ssl.HostnameVerifier {
    method public abstract boolean verify(java.lang.String, javax.net.ssl.SSLSession);
    method public abstract void verify(java.lang.String, javax.net.ssl.SSLSocket) throws java.io.IOException;
    method public abstract void verify(java.lang.String, java.security.cert.X509Certificate) throws javax.net.ssl.SSLException;
    method public abstract void verify(java.lang.String, java.lang.String[], java.lang.String[]) throws javax.net.ssl.SSLException;
  }

}

package org.apache.http.params {

  public abstract deprecated interface CoreConnectionPNames {
    field public static final java.lang.String CONNECTION_TIMEOUT = "http.connection.timeout";
    field public static final java.lang.String MAX_HEADER_COUNT = "http.connection.max-header-count";
    field public static final java.lang.String MAX_LINE_LENGTH = "http.connection.max-line-length";
    field public static final java.lang.String SOCKET_BUFFER_SIZE = "http.socket.buffer-size";
    field public static final java.lang.String SO_LINGER = "http.socket.linger";
    field public static final java.lang.String SO_TIMEOUT = "http.socket.timeout";
    field public static final java.lang.String STALE_CONNECTION_CHECK = "http.connection.stalecheck";
    field public static final java.lang.String TCP_NODELAY = "http.tcp.nodelay";
  }

  public final deprecated class HttpConnectionParams implements org.apache.http.params.CoreConnectionPNames {
    method public static int getConnectionTimeout(org.apache.http.params.HttpParams);
    method public static int getLinger(org.apache.http.params.HttpParams);
    method public static int getSoTimeout(org.apache.http.params.HttpParams);
    method public static int getSocketBufferSize(org.apache.http.params.HttpParams);
    method public static boolean getTcpNoDelay(org.apache.http.params.HttpParams);
    method public static boolean isStaleCheckingEnabled(org.apache.http.params.HttpParams);
    method public static void setConnectionTimeout(org.apache.http.params.HttpParams, int);
    method public static void setLinger(org.apache.http.params.HttpParams, int);
    method public static void setSoTimeout(org.apache.http.params.HttpParams, int);
    method public static void setSocketBufferSize(org.apache.http.params.HttpParams, int);
    method public static void setStaleCheckingEnabled(org.apache.http.params.HttpParams, boolean);
    method public static void setTcpNoDelay(org.apache.http.params.HttpParams, boolean);
  }

  public abstract deprecated interface HttpParams {
    method public abstract org.apache.http.params.HttpParams copy();
    method public abstract boolean getBooleanParameter(java.lang.String, boolean);
    method public abstract double getDoubleParameter(java.lang.String, double);
    method public abstract int getIntParameter(java.lang.String, int);
    method public abstract long getLongParameter(java.lang.String, long);
    method public abstract java.lang.Object getParameter(java.lang.String);
    method public abstract boolean isParameterFalse(java.lang.String);
    method public abstract boolean isParameterTrue(java.lang.String);
    method public abstract boolean removeParameter(java.lang.String);
    method public abstract org.apache.http.params.HttpParams setBooleanParameter(java.lang.String, boolean);
    method public abstract org.apache.http.params.HttpParams setDoubleParameter(java.lang.String, double);
    method public abstract org.apache.http.params.HttpParams setIntParameter(java.lang.String, int);
    method public abstract org.apache.http.params.HttpParams setLongParameter(java.lang.String, long);
    method public abstract org.apache.http.params.HttpParams setParameter(java.lang.String, java.lang.Object);
  }

}

package org.json {

  public class JSONArray {
    ctor public JSONArray();
    ctor public JSONArray(java.util.Collection);
    ctor public JSONArray(org.json.JSONTokener) throws org.json.JSONException;
    ctor public JSONArray(java.lang.String) throws org.json.JSONException;
    ctor public JSONArray(java.lang.Object) throws org.json.JSONException;
    method public java.lang.Object get(int) throws org.json.JSONException;
    method public boolean getBoolean(int) throws org.json.JSONException;
    method public double getDouble(int) throws org.json.JSONException;
    method public int getInt(int) throws org.json.JSONException;
    method public org.json.JSONArray getJSONArray(int) throws org.json.JSONException;
    method public org.json.JSONObject getJSONObject(int) throws org.json.JSONException;
    method public long getLong(int) throws org.json.JSONException;
    method public java.lang.String getString(int) throws org.json.JSONException;
    method public boolean isNull(int);
    method public java.lang.String join(java.lang.String) throws org.json.JSONException;
    method public int length();
    method public java.lang.Object opt(int);
    method public boolean optBoolean(int);
    method public boolean optBoolean(int, boolean);
    method public double optDouble(int);
    method public double optDouble(int, double);
    method public int optInt(int);
    method public int optInt(int, int);
    method public org.json.JSONArray optJSONArray(int);
    method public org.json.JSONObject optJSONObject(int);
    method public long optLong(int);
    method public long optLong(int, long);
    method public java.lang.String optString(int);
    method public java.lang.String optString(int, java.lang.String);
    method public org.json.JSONArray put(boolean);
    method public org.json.JSONArray put(double) throws org.json.JSONException;
    method public org.json.JSONArray put(int);
    method public org.json.JSONArray put(long);
    method public org.json.JSONArray put(java.lang.Object);
    method public org.json.JSONArray put(int, boolean) throws org.json.JSONException;
    method public org.json.JSONArray put(int, double) throws org.json.JSONException;
    method public org.json.JSONArray put(int, int) throws org.json.JSONException;
    method public org.json.JSONArray put(int, long) throws org.json.JSONException;
    method public org.json.JSONArray put(int, java.lang.Object) throws org.json.JSONException;
    method public java.lang.Object remove(int);
    method public org.json.JSONObject toJSONObject(org.json.JSONArray) throws org.json.JSONException;
    method public java.lang.String toString(int) throws org.json.JSONException;
  }

  public class JSONException extends java.lang.Exception {
    ctor public JSONException(java.lang.String);
  }

  public class JSONObject {
    ctor public JSONObject();
    ctor public JSONObject(java.util.Map);
    ctor public JSONObject(org.json.JSONTokener) throws org.json.JSONException;
    ctor public JSONObject(java.lang.String) throws org.json.JSONException;
    ctor public JSONObject(org.json.JSONObject, java.lang.String[]) throws org.json.JSONException;
    method public org.json.JSONObject accumulate(java.lang.String, java.lang.Object) throws org.json.JSONException;
    method public java.lang.Object get(java.lang.String) throws org.json.JSONException;
    method public boolean getBoolean(java.lang.String) throws org.json.JSONException;
    method public double getDouble(java.lang.String) throws org.json.JSONException;
    method public int getInt(java.lang.String) throws org.json.JSONException;
    method public org.json.JSONArray getJSONArray(java.lang.String) throws org.json.JSONException;
    method public org.json.JSONObject getJSONObject(java.lang.String) throws org.json.JSONException;
    method public long getLong(java.lang.String) throws org.json.JSONException;
    method public java.lang.String getString(java.lang.String) throws org.json.JSONException;
    method public boolean has(java.lang.String);
    method public boolean isNull(java.lang.String);
    method public java.util.Iterator<java.lang.String> keys();
    method public int length();
    method public org.json.JSONArray names();
    method public static java.lang.String numberToString(java.lang.Number) throws org.json.JSONException;
    method public java.lang.Object opt(java.lang.String);
    method public boolean optBoolean(java.lang.String);
    method public boolean optBoolean(java.lang.String, boolean);
    method public double optDouble(java.lang.String);
    method public double optDouble(java.lang.String, double);
    method public int optInt(java.lang.String);
    method public int optInt(java.lang.String, int);
    method public org.json.JSONArray optJSONArray(java.lang.String);
    method public org.json.JSONObject optJSONObject(java.lang.String);
    method public long optLong(java.lang.String);
    method public long optLong(java.lang.String, long);
    method public java.lang.String optString(java.lang.String);
    method public java.lang.String optString(java.lang.String, java.lang.String);
    method public org.json.JSONObject put(java.lang.String, boolean) throws org.json.JSONException;
    method public org.json.JSONObject put(java.lang.String, double) throws org.json.JSONException;
    method public org.json.JSONObject put(java.lang.String, int) throws org.json.JSONException;
    method public org.json.JSONObject put(java.lang.String, long) throws org.json.JSONException;
    method public org.json.JSONObject put(java.lang.String, java.lang.Object) throws org.json.JSONException;
    method public org.json.JSONObject putOpt(java.lang.String, java.lang.Object) throws org.json.JSONException;
    method public static java.lang.String quote(java.lang.String);
    method public java.lang.Object remove(java.lang.String);
    method public org.json.JSONArray toJSONArray(org.json.JSONArray) throws org.json.JSONException;
    method public java.lang.String toString(int) throws org.json.JSONException;
    method public static java.lang.Object wrap(java.lang.Object);
    field public static final java.lang.Object NULL;
  }

  public class JSONStringer {
    ctor public JSONStringer();
    method public org.json.JSONStringer array() throws org.json.JSONException;
    method public org.json.JSONStringer endArray() throws org.json.JSONException;
    method public org.json.JSONStringer endObject() throws org.json.JSONException;
    method public org.json.JSONStringer key(java.lang.String) throws org.json.JSONException;
    method public org.json.JSONStringer object() throws org.json.JSONException;
    method public org.json.JSONStringer value(java.lang.Object) throws org.json.JSONException;
    method public org.json.JSONStringer value(boolean) throws org.json.JSONException;
    method public org.json.JSONStringer value(double) throws org.json.JSONException;
    method public org.json.JSONStringer value(long) throws org.json.JSONException;
  }

  public class JSONTokener {
    ctor public JSONTokener(java.lang.String);
    method public void back();
    method public static int dehexchar(char);
    method public boolean more();
    method public char next();
    method public char next(char) throws org.json.JSONException;
    method public java.lang.String next(int) throws org.json.JSONException;
    method public char nextClean() throws org.json.JSONException;
    method public java.lang.String nextString(char) throws org.json.JSONException;
    method public java.lang.String nextTo(java.lang.String);
    method public java.lang.String nextTo(char);
    method public java.lang.Object nextValue() throws org.json.JSONException;
    method public void skipPast(java.lang.String);
    method public char skipTo(char);
    method public org.json.JSONException syntaxError(java.lang.String);
  }

}

package org.w3c.dom {

  public abstract interface Attr implements org.w3c.dom.Node {
    method public abstract java.lang.String getName();
    method public abstract org.w3c.dom.Element getOwnerElement();
    method public abstract org.w3c.dom.TypeInfo getSchemaTypeInfo();
    method public abstract boolean getSpecified();
    method public abstract java.lang.String getValue();
    method public abstract boolean isId();
    method public abstract void setValue(java.lang.String) throws org.w3c.dom.DOMException;
  }

  public abstract interface CDATASection implements org.w3c.dom.Text {
  }

  public abstract interface CharacterData implements org.w3c.dom.Node {
    method public abstract void appendData(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void deleteData(int, int) throws org.w3c.dom.DOMException;
    method public abstract java.lang.String getData() throws org.w3c.dom.DOMException;
    method public abstract int getLength();
    method public abstract void insertData(int, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void replaceData(int, int, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void setData(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract java.lang.String substringData(int, int) throws org.w3c.dom.DOMException;
  }

  public abstract interface Comment implements org.w3c.dom.CharacterData {
  }

  public abstract interface DOMConfiguration {
    method public abstract boolean canSetParameter(java.lang.String, java.lang.Object);
    method public abstract java.lang.Object getParameter(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.DOMStringList getParameterNames();
    method public abstract void setParameter(java.lang.String, java.lang.Object) throws org.w3c.dom.DOMException;
  }

  public abstract interface DOMError {
    method public abstract org.w3c.dom.DOMLocator getLocation();
    method public abstract java.lang.String getMessage();
    method public abstract java.lang.Object getRelatedData();
    method public abstract java.lang.Object getRelatedException();
    method public abstract short getSeverity();
    method public abstract java.lang.String getType();
    field public static final short SEVERITY_ERROR = 2; // 0x2
    field public static final short SEVERITY_FATAL_ERROR = 3; // 0x3
    field public static final short SEVERITY_WARNING = 1; // 0x1
  }

  public abstract interface DOMErrorHandler {
    method public abstract boolean handleError(org.w3c.dom.DOMError);
  }

  public class DOMException extends java.lang.RuntimeException {
    ctor public DOMException(short, java.lang.String);
    field public static final short DOMSTRING_SIZE_ERR = 2; // 0x2
    field public static final short HIERARCHY_REQUEST_ERR = 3; // 0x3
    field public static final short INDEX_SIZE_ERR = 1; // 0x1
    field public static final short INUSE_ATTRIBUTE_ERR = 10; // 0xa
    field public static final short INVALID_ACCESS_ERR = 15; // 0xf
    field public static final short INVALID_CHARACTER_ERR = 5; // 0x5
    field public static final short INVALID_MODIFICATION_ERR = 13; // 0xd
    field public static final short INVALID_STATE_ERR = 11; // 0xb
    field public static final short NAMESPACE_ERR = 14; // 0xe
    field public static final short NOT_FOUND_ERR = 8; // 0x8
    field public static final short NOT_SUPPORTED_ERR = 9; // 0x9
    field public static final short NO_DATA_ALLOWED_ERR = 6; // 0x6
    field public static final short NO_MODIFICATION_ALLOWED_ERR = 7; // 0x7
    field public static final short SYNTAX_ERR = 12; // 0xc
    field public static final short TYPE_MISMATCH_ERR = 17; // 0x11
    field public static final short VALIDATION_ERR = 16; // 0x10
    field public static final short WRONG_DOCUMENT_ERR = 4; // 0x4
    field public short code;
  }

  public abstract interface DOMImplementation {
    method public abstract org.w3c.dom.Document createDocument(java.lang.String, java.lang.String, org.w3c.dom.DocumentType) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.DocumentType createDocumentType(java.lang.String, java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract java.lang.Object getFeature(java.lang.String, java.lang.String);
    method public abstract boolean hasFeature(java.lang.String, java.lang.String);
  }

  public abstract interface DOMImplementationList {
    method public abstract int getLength();
    method public abstract org.w3c.dom.DOMImplementation item(int);
  }

  public abstract interface DOMImplementationSource {
    method public abstract org.w3c.dom.DOMImplementation getDOMImplementation(java.lang.String);
    method public abstract org.w3c.dom.DOMImplementationList getDOMImplementationList(java.lang.String);
  }

  public abstract interface DOMLocator {
    method public abstract int getByteOffset();
    method public abstract int getColumnNumber();
    method public abstract int getLineNumber();
    method public abstract org.w3c.dom.Node getRelatedNode();
    method public abstract java.lang.String getUri();
    method public abstract int getUtf16Offset();
  }

  public abstract interface DOMStringList {
    method public abstract boolean contains(java.lang.String);
    method public abstract int getLength();
    method public abstract java.lang.String item(int);
  }

  public abstract interface Document implements org.w3c.dom.Node {
    method public abstract org.w3c.dom.Node adoptNode(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Attr createAttribute(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Attr createAttributeNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.CDATASection createCDATASection(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Comment createComment(java.lang.String);
    method public abstract org.w3c.dom.DocumentFragment createDocumentFragment();
    method public abstract org.w3c.dom.Element createElement(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Element createElementNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.EntityReference createEntityReference(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Text createTextNode(java.lang.String);
    method public abstract org.w3c.dom.DocumentType getDoctype();
    method public abstract org.w3c.dom.Element getDocumentElement();
    method public abstract java.lang.String getDocumentURI();
    method public abstract org.w3c.dom.DOMConfiguration getDomConfig();
    method public abstract org.w3c.dom.Element getElementById(java.lang.String);
    method public abstract org.w3c.dom.NodeList getElementsByTagName(java.lang.String);
    method public abstract org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String, java.lang.String);
    method public abstract org.w3c.dom.DOMImplementation getImplementation();
    method public abstract java.lang.String getInputEncoding();
    method public abstract boolean getStrictErrorChecking();
    method public abstract java.lang.String getXmlEncoding();
    method public abstract boolean getXmlStandalone();
    method public abstract java.lang.String getXmlVersion();
    method public abstract org.w3c.dom.Node importNode(org.w3c.dom.Node, boolean) throws org.w3c.dom.DOMException;
    method public abstract void normalizeDocument();
    method public abstract org.w3c.dom.Node renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void setDocumentURI(java.lang.String);
    method public abstract void setStrictErrorChecking(boolean);
    method public abstract void setXmlStandalone(boolean) throws org.w3c.dom.DOMException;
    method public abstract void setXmlVersion(java.lang.String) throws org.w3c.dom.DOMException;
  }

  public abstract interface DocumentFragment implements org.w3c.dom.Node {
  }

  public abstract interface DocumentType implements org.w3c.dom.Node {
    method public abstract org.w3c.dom.NamedNodeMap getEntities();
    method public abstract java.lang.String getInternalSubset();
    method public abstract java.lang.String getName();
    method public abstract org.w3c.dom.NamedNodeMap getNotations();
    method public abstract java.lang.String getPublicId();
    method public abstract java.lang.String getSystemId();
  }

  public abstract interface Element implements org.w3c.dom.Node {
    method public abstract java.lang.String getAttribute(java.lang.String);
    method public abstract java.lang.String getAttributeNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Attr getAttributeNode(java.lang.String);
    method public abstract org.w3c.dom.Attr getAttributeNodeNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.NodeList getElementsByTagName(java.lang.String);
    method public abstract org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.TypeInfo getSchemaTypeInfo();
    method public abstract java.lang.String getTagName();
    method public abstract boolean hasAttribute(java.lang.String);
    method public abstract boolean hasAttributeNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void removeAttribute(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void removeAttributeNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr) throws org.w3c.dom.DOMException;
    method public abstract void setAttribute(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void setAttributeNS(java.lang.String, java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr) throws org.w3c.dom.DOMException;
    method public abstract void setIdAttribute(java.lang.String, boolean) throws org.w3c.dom.DOMException;
    method public abstract void setIdAttributeNS(java.lang.String, java.lang.String, boolean) throws org.w3c.dom.DOMException;
    method public abstract void setIdAttributeNode(org.w3c.dom.Attr, boolean) throws org.w3c.dom.DOMException;
  }

  public abstract interface Entity implements org.w3c.dom.Node {
    method public abstract java.lang.String getInputEncoding();
    method public abstract java.lang.String getNotationName();
    method public abstract java.lang.String getPublicId();
    method public abstract java.lang.String getSystemId();
    method public abstract java.lang.String getXmlEncoding();
    method public abstract java.lang.String getXmlVersion();
  }

  public abstract interface EntityReference implements org.w3c.dom.Node {
  }

  public abstract interface NameList {
    method public abstract boolean contains(java.lang.String);
    method public abstract boolean containsNS(java.lang.String, java.lang.String);
    method public abstract int getLength();
    method public abstract java.lang.String getName(int);
    method public abstract java.lang.String getNamespaceURI(int);
  }

  public abstract interface NamedNodeMap {
    method public abstract int getLength();
    method public abstract org.w3c.dom.Node getNamedItem(java.lang.String);
    method public abstract org.w3c.dom.Node getNamedItemNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Node item(int);
    method public abstract org.w3c.dom.Node removeNamedItem(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Node removeNamedItemNS(java.lang.String, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Node setNamedItem(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
  }

  public abstract interface Node {
    method public abstract org.w3c.dom.Node appendChild(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Node cloneNode(boolean);
    method public abstract short compareDocumentPosition(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.NamedNodeMap getAttributes();
    method public abstract java.lang.String getBaseURI();
    method public abstract org.w3c.dom.NodeList getChildNodes();
    method public abstract java.lang.Object getFeature(java.lang.String, java.lang.String);
    method public abstract org.w3c.dom.Node getFirstChild();
    method public abstract org.w3c.dom.Node getLastChild();
    method public abstract java.lang.String getLocalName();
    method public abstract java.lang.String getNamespaceURI();
    method public abstract org.w3c.dom.Node getNextSibling();
    method public abstract java.lang.String getNodeName();
    method public abstract short getNodeType();
    method public abstract java.lang.String getNodeValue() throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Document getOwnerDocument();
    method public abstract org.w3c.dom.Node getParentNode();
    method public abstract java.lang.String getPrefix();
    method public abstract org.w3c.dom.Node getPreviousSibling();
    method public abstract java.lang.String getTextContent() throws org.w3c.dom.DOMException;
    method public abstract java.lang.Object getUserData(java.lang.String);
    method public abstract boolean hasAttributes();
    method public abstract boolean hasChildNodes();
    method public abstract org.w3c.dom.Node insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) throws org.w3c.dom.DOMException;
    method public abstract boolean isDefaultNamespace(java.lang.String);
    method public abstract boolean isEqualNode(org.w3c.dom.Node);
    method public abstract boolean isSameNode(org.w3c.dom.Node);
    method public abstract boolean isSupported(java.lang.String, java.lang.String);
    method public abstract java.lang.String lookupNamespaceURI(java.lang.String);
    method public abstract java.lang.String lookupPrefix(java.lang.String);
    method public abstract void normalize();
    method public abstract org.w3c.dom.Node removeChild(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Node replaceChild(org.w3c.dom.Node, org.w3c.dom.Node) throws org.w3c.dom.DOMException;
    method public abstract void setNodeValue(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void setPrefix(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract void setTextContent(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract java.lang.Object setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler);
    field public static final short ATTRIBUTE_NODE = 2; // 0x2
    field public static final short CDATA_SECTION_NODE = 4; // 0x4
    field public static final short COMMENT_NODE = 8; // 0x8
    field public static final short DOCUMENT_FRAGMENT_NODE = 11; // 0xb
    field public static final short DOCUMENT_NODE = 9; // 0x9
    field public static final short DOCUMENT_POSITION_CONTAINED_BY = 16; // 0x10
    field public static final short DOCUMENT_POSITION_CONTAINS = 8; // 0x8
    field public static final short DOCUMENT_POSITION_DISCONNECTED = 1; // 0x1
    field public static final short DOCUMENT_POSITION_FOLLOWING = 4; // 0x4
    field public static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32; // 0x20
    field public static final short DOCUMENT_POSITION_PRECEDING = 2; // 0x2
    field public static final short DOCUMENT_TYPE_NODE = 10; // 0xa
    field public static final short ELEMENT_NODE = 1; // 0x1
    field public static final short ENTITY_NODE = 6; // 0x6
    field public static final short ENTITY_REFERENCE_NODE = 5; // 0x5
    field public static final short NOTATION_NODE = 12; // 0xc
    field public static final short PROCESSING_INSTRUCTION_NODE = 7; // 0x7
    field public static final short TEXT_NODE = 3; // 0x3
  }

  public abstract interface NodeList {
    method public abstract int getLength();
    method public abstract org.w3c.dom.Node item(int);
  }

  public abstract interface Notation implements org.w3c.dom.Node {
    method public abstract java.lang.String getPublicId();
    method public abstract java.lang.String getSystemId();
  }

  public abstract interface ProcessingInstruction implements org.w3c.dom.Node {
    method public abstract java.lang.String getData();
    method public abstract java.lang.String getTarget();
    method public abstract void setData(java.lang.String) throws org.w3c.dom.DOMException;
  }

  public abstract interface Text implements org.w3c.dom.CharacterData {
    method public abstract java.lang.String getWholeText();
    method public abstract boolean isElementContentWhitespace();
    method public abstract org.w3c.dom.Text replaceWholeText(java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.Text splitText(int) throws org.w3c.dom.DOMException;
  }

  public abstract interface TypeInfo {
    method public abstract java.lang.String getTypeName();
    method public abstract java.lang.String getTypeNamespace();
    method public abstract boolean isDerivedFrom(java.lang.String, java.lang.String, int);
    field public static final int DERIVATION_EXTENSION = 2; // 0x2
    field public static final int DERIVATION_LIST = 8; // 0x8
    field public static final int DERIVATION_RESTRICTION = 1; // 0x1
    field public static final int DERIVATION_UNION = 4; // 0x4
  }

  public abstract interface UserDataHandler {
    method public abstract void handle(short, java.lang.String, java.lang.Object, org.w3c.dom.Node, org.w3c.dom.Node);
    field public static final short NODE_ADOPTED = 5; // 0x5
    field public static final short NODE_CLONED = 1; // 0x1
    field public static final short NODE_DELETED = 3; // 0x3
    field public static final short NODE_IMPORTED = 2; // 0x2
    field public static final short NODE_RENAMED = 4; // 0x4
  }

}

package org.w3c.dom.ls {

  public abstract interface DOMImplementationLS {
    method public abstract org.w3c.dom.ls.LSInput createLSInput();
    method public abstract org.w3c.dom.ls.LSOutput createLSOutput();
    method public abstract org.w3c.dom.ls.LSParser createLSParser(short, java.lang.String) throws org.w3c.dom.DOMException;
    method public abstract org.w3c.dom.ls.LSSerializer createLSSerializer();
    field public static final short MODE_ASYNCHRONOUS = 2; // 0x2
    field public static final short MODE_SYNCHRONOUS = 1; // 0x1
  }

  public class LSException extends java.lang.RuntimeException {
    ctor public LSException(short, java.lang.String);
    field public static final short PARSE_ERR = 81; // 0x51
    field public static final short SERIALIZE_ERR = 82; // 0x52
    field public short code;
  }

  public abstract interface LSInput {
    method public abstract java.lang.String getBaseURI();
    method public abstract java.io.InputStream getByteStream();
    method public abstract boolean getCertifiedText();
    method public abstract java.io.Reader getCharacterStream();
    method public abstract java.lang.String getEncoding();
    method public abstract java.lang.String getPublicId();
    method public abstract java.lang.String getStringData();
    method public abstract java.lang.String getSystemId();
    method public abstract void setBaseURI(java.lang.String);
    method public abstract void setByteStream(java.io.InputStream);
    method public abstract void setCertifiedText(boolean);
    method public abstract void setCharacterStream(java.io.Reader);
    method public abstract void setEncoding(java.lang.String);
    method public abstract void setPublicId(java.lang.String);
    method public abstract void setStringData(java.lang.String);
    method public abstract void setSystemId(java.lang.String);
  }

  public abstract interface LSOutput {
    method public abstract java.io.OutputStream getByteStream();
    method public abstract java.io.Writer getCharacterStream();
    method public abstract java.lang.String getEncoding();
    method public abstract java.lang.String getSystemId();
    method public abstract void setByteStream(java.io.OutputStream);
    method public abstract void setCharacterStream(java.io.Writer);
    method public abstract void setEncoding(java.lang.String);
    method public abstract void setSystemId(java.lang.String);
  }

  public abstract interface LSParser {
    method public abstract void abort();
    method public abstract boolean getAsync();
    method public abstract boolean getBusy();
    method public abstract org.w3c.dom.DOMConfiguration getDomConfig();
    method public abstract org.w3c.dom.ls.LSParserFilter getFilter();
    method public abstract org.w3c.dom.Document parse(org.w3c.dom.ls.LSInput) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
    method public abstract org.w3c.dom.Document parseURI(java.lang.String) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
    method public abstract org.w3c.dom.Node parseWithContext(org.w3c.dom.ls.LSInput, org.w3c.dom.Node, short) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
    method public abstract void setFilter(org.w3c.dom.ls.LSParserFilter);
    field public static final short ACTION_APPEND_AS_CHILDREN = 1; // 0x1
    field public static final short ACTION_INSERT_AFTER = 4; // 0x4
    field public static final short ACTION_INSERT_BEFORE = 3; // 0x3
    field public static final short ACTION_REPLACE = 5; // 0x5
    field public static final short ACTION_REPLACE_CHILDREN = 2; // 0x2
  }

  public abstract interface LSParserFilter {
    method public abstract short acceptNode(org.w3c.dom.Node);
    method public abstract int getWhatToShow();
    method public abstract short startElement(org.w3c.dom.Element);
    field public static final short FILTER_ACCEPT = 1; // 0x1
    field public static final short FILTER_INTERRUPT = 4; // 0x4
    field public static final short FILTER_REJECT = 2; // 0x2
    field public static final short FILTER_SKIP = 3; // 0x3
  }

  public abstract interface LSResourceResolver {
    method public abstract org.w3c.dom.ls.LSInput resolveResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
  }

  public abstract interface LSSerializer {
    method public abstract org.w3c.dom.DOMConfiguration getDomConfig();
    method public abstract java.lang.String getNewLine();
    method public abstract void setNewLine(java.lang.String);
    method public abstract boolean write(org.w3c.dom.Node, org.w3c.dom.ls.LSOutput) throws org.w3c.dom.ls.LSException;
    method public abstract java.lang.String writeToString(org.w3c.dom.Node) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
    method public abstract boolean writeToURI(org.w3c.dom.Node, java.lang.String) throws org.w3c.dom.ls.LSException;
  }

}

package org.xml.sax {

  public abstract deprecated interface AttributeList {
    method public abstract int getLength();
    method public abstract java.lang.String getName(int);
    method public abstract java.lang.String getType(int);
    method public abstract java.lang.String getType(java.lang.String);
    method public abstract java.lang.String getValue(int);
    method public abstract java.lang.String getValue(java.lang.String);
  }

  public abstract interface Attributes {
    method public abstract int getIndex(java.lang.String, java.lang.String);
    method public abstract int getIndex(java.lang.String);
    method public abstract int getLength();
    method public abstract java.lang.String getLocalName(int);
    method public abstract java.lang.String getQName(int);
    method public abstract java.lang.String getType(int);
    method public abstract java.lang.String getType(java.lang.String, java.lang.String);
    method public abstract java.lang.String getType(java.lang.String);
    method public abstract java.lang.String getURI(int);
    method public abstract java.lang.String getValue(int);
    method public abstract java.lang.String getValue(java.lang.String, java.lang.String);
    method public abstract java.lang.String getValue(java.lang.String);
  }

  public abstract interface ContentHandler {
    method public abstract void characters(char[], int, int) throws org.xml.sax.SAXException;
    method public abstract void endDocument() throws org.xml.sax.SAXException;
    method public abstract void endElement(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void endPrefixMapping(java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
    method public abstract void processingInstruction(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void setDocumentLocator(org.xml.sax.Locator);
    method public abstract void skippedEntity(java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void startDocument() throws org.xml.sax.SAXException;
    method public abstract void startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
    method public abstract void startPrefixMapping(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
  }

  public abstract interface DTDHandler {
    method public abstract void notationDecl(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
  }

  public abstract deprecated interface DocumentHandler {
    method public abstract void characters(char[], int, int) throws org.xml.sax.SAXException;
    method public abstract void endDocument() throws org.xml.sax.SAXException;
    method public abstract void endElement(java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
    method public abstract void processingInstruction(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void setDocumentLocator(org.xml.sax.Locator);
    method public abstract void startDocument() throws org.xml.sax.SAXException;
    method public abstract void startElement(java.lang.String, org.xml.sax.AttributeList) throws org.xml.sax.SAXException;
  }

  public abstract interface EntityResolver {
    method public abstract org.xml.sax.InputSource resolveEntity(java.lang.String, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
  }

  public abstract interface ErrorHandler {
    method public abstract void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public abstract void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public abstract void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
  }

  public deprecated class HandlerBase implements org.xml.sax.DTDHandler org.xml.sax.DocumentHandler org.xml.sax.EntityResolver org.xml.sax.ErrorHandler {
    ctor public HandlerBase();
    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
    method public void endDocument() throws org.xml.sax.SAXException;
    method public void endElement(java.lang.String) throws org.xml.sax.SAXException;
    method public void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
    method public void notationDecl(java.lang.String, java.lang.String, java.lang.String);
    method public void processingInstruction(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public org.xml.sax.InputSource resolveEntity(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void setDocumentLocator(org.xml.sax.Locator);
    method public void startDocument() throws org.xml.sax.SAXException;
    method public void startElement(java.lang.String, org.xml.sax.AttributeList) throws org.xml.sax.SAXException;
    method public void unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
  }

  public class InputSource {
    ctor public InputSource();
    ctor public InputSource(java.lang.String);
    ctor public InputSource(java.io.InputStream);
    ctor public InputSource(java.io.Reader);
    method public java.io.InputStream getByteStream();
    method public java.io.Reader getCharacterStream();
    method public java.lang.String getEncoding();
    method public java.lang.String getPublicId();
    method public java.lang.String getSystemId();
    method public void setByteStream(java.io.InputStream);
    method public void setCharacterStream(java.io.Reader);
    method public void setEncoding(java.lang.String);
    method public void setPublicId(java.lang.String);
    method public void setSystemId(java.lang.String);
  }

  public abstract interface Locator {
    method public abstract int getColumnNumber();
    method public abstract int getLineNumber();
    method public abstract java.lang.String getPublicId();
    method public abstract java.lang.String getSystemId();
  }

  public abstract deprecated interface Parser {
    method public abstract void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
    method public abstract void parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public abstract void setDTDHandler(org.xml.sax.DTDHandler);
    method public abstract void setDocumentHandler(org.xml.sax.DocumentHandler);
    method public abstract void setEntityResolver(org.xml.sax.EntityResolver);
    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
    method public abstract void setLocale(java.util.Locale) throws org.xml.sax.SAXException;
  }

  public class SAXException extends java.lang.Exception {
    ctor public SAXException();
    ctor public SAXException(java.lang.String);
    ctor public SAXException(java.lang.Exception);
    ctor public SAXException(java.lang.String, java.lang.Exception);
    method public java.lang.Exception getException();
  }

  public class SAXNotRecognizedException extends org.xml.sax.SAXException {
    ctor public SAXNotRecognizedException();
    ctor public SAXNotRecognizedException(java.lang.String);
  }

  public class SAXNotSupportedException extends org.xml.sax.SAXException {
    ctor public SAXNotSupportedException();
    ctor public SAXNotSupportedException(java.lang.String);
  }

  public class SAXParseException extends org.xml.sax.SAXException {
    ctor public SAXParseException(java.lang.String, org.xml.sax.Locator);
    ctor public SAXParseException(java.lang.String, org.xml.sax.Locator, java.lang.Exception);
    ctor public SAXParseException(java.lang.String, java.lang.String, java.lang.String, int, int);
    ctor public SAXParseException(java.lang.String, java.lang.String, java.lang.String, int, int, java.lang.Exception);
    method public int getColumnNumber();
    method public int getLineNumber();
    method public java.lang.String getPublicId();
    method public java.lang.String getSystemId();
  }

  public abstract interface XMLFilter implements org.xml.sax.XMLReader {
    method public abstract org.xml.sax.XMLReader getParent();
    method public abstract void setParent(org.xml.sax.XMLReader);
  }

  public abstract interface XMLReader {
    method public abstract org.xml.sax.ContentHandler getContentHandler();
    method public abstract org.xml.sax.DTDHandler getDTDHandler();
    method public abstract org.xml.sax.EntityResolver getEntityResolver();
    method public abstract org.xml.sax.ErrorHandler getErrorHandler();
    method public abstract boolean getFeature(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
    method public abstract void parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public abstract void setContentHandler(org.xml.sax.ContentHandler);
    method public abstract void setDTDHandler(org.xml.sax.DTDHandler);
    method public abstract void setEntityResolver(org.xml.sax.EntityResolver);
    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
    method public abstract void setFeature(java.lang.String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public abstract void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
  }

}

package org.xml.sax.ext {

  public abstract interface Attributes2 implements org.xml.sax.Attributes {
    method public abstract boolean isDeclared(int);
    method public abstract boolean isDeclared(java.lang.String);
    method public abstract boolean isDeclared(java.lang.String, java.lang.String);
    method public abstract boolean isSpecified(int);
    method public abstract boolean isSpecified(java.lang.String, java.lang.String);
    method public abstract boolean isSpecified(java.lang.String);
  }

  public class Attributes2Impl extends org.xml.sax.helpers.AttributesImpl implements org.xml.sax.ext.Attributes2 {
    ctor public Attributes2Impl();
    ctor public Attributes2Impl(org.xml.sax.Attributes);
    method public boolean isDeclared(int);
    method public boolean isDeclared(java.lang.String, java.lang.String);
    method public boolean isDeclared(java.lang.String);
    method public boolean isSpecified(int);
    method public boolean isSpecified(java.lang.String, java.lang.String);
    method public boolean isSpecified(java.lang.String);
    method public void setDeclared(int, boolean);
    method public void setSpecified(int, boolean);
  }

  public abstract interface DeclHandler {
    method public abstract void attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void elementDecl(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void externalEntityDecl(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void internalEntityDecl(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
  }

  public class DefaultHandler2 extends org.xml.sax.helpers.DefaultHandler implements org.xml.sax.ext.DeclHandler org.xml.sax.ext.EntityResolver2 org.xml.sax.ext.LexicalHandler {
    ctor public DefaultHandler2();
    method public void attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void comment(char[], int, int) throws org.xml.sax.SAXException;
    method public void elementDecl(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void endCDATA() throws org.xml.sax.SAXException;
    method public void endDTD() throws org.xml.sax.SAXException;
    method public void endEntity(java.lang.String) throws org.xml.sax.SAXException;
    method public void externalEntityDecl(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public org.xml.sax.InputSource getExternalSubset(java.lang.String, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void internalEntityDecl(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public org.xml.sax.InputSource resolveEntity(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void startCDATA() throws org.xml.sax.SAXException;
    method public void startDTD(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void startEntity(java.lang.String) throws org.xml.sax.SAXException;
  }

  public abstract interface EntityResolver2 implements org.xml.sax.EntityResolver {
    method public abstract org.xml.sax.InputSource getExternalSubset(java.lang.String, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public abstract org.xml.sax.InputSource resolveEntity(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
  }

  public abstract interface LexicalHandler {
    method public abstract void comment(char[], int, int) throws org.xml.sax.SAXException;
    method public abstract void endCDATA() throws org.xml.sax.SAXException;
    method public abstract void endDTD() throws org.xml.sax.SAXException;
    method public abstract void endEntity(java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void startCDATA() throws org.xml.sax.SAXException;
    method public abstract void startDTD(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public abstract void startEntity(java.lang.String) throws org.xml.sax.SAXException;
  }

  public abstract interface Locator2 implements org.xml.sax.Locator {
    method public abstract java.lang.String getEncoding();
    method public abstract java.lang.String getXMLVersion();
  }

  public class Locator2Impl extends org.xml.sax.helpers.LocatorImpl implements org.xml.sax.ext.Locator2 {
    ctor public Locator2Impl();
    ctor public Locator2Impl(org.xml.sax.Locator);
    method public java.lang.String getEncoding();
    method public java.lang.String getXMLVersion();
    method public void setEncoding(java.lang.String);
    method public void setXMLVersion(java.lang.String);
  }

}

package org.xml.sax.helpers {

  public deprecated class AttributeListImpl implements org.xml.sax.AttributeList {
    ctor public AttributeListImpl();
    ctor public AttributeListImpl(org.xml.sax.AttributeList);
    method public void addAttribute(java.lang.String, java.lang.String, java.lang.String);
    method public void clear();
    method public int getLength();
    method public java.lang.String getName(int);
    method public java.lang.String getType(int);
    method public java.lang.String getType(java.lang.String);
    method public java.lang.String getValue(int);
    method public java.lang.String getValue(java.lang.String);
    method public void removeAttribute(java.lang.String);
    method public void setAttributeList(org.xml.sax.AttributeList);
  }

  public class AttributesImpl implements org.xml.sax.Attributes {
    ctor public AttributesImpl();
    ctor public AttributesImpl(org.xml.sax.Attributes);
    method public void addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public void clear();
    method public int getIndex(java.lang.String, java.lang.String);
    method public int getIndex(java.lang.String);
    method public int getLength();
    method public java.lang.String getLocalName(int);
    method public java.lang.String getQName(int);
    method public java.lang.String getType(int);
    method public java.lang.String getType(java.lang.String, java.lang.String);
    method public java.lang.String getType(java.lang.String);
    method public java.lang.String getURI(int);
    method public java.lang.String getValue(int);
    method public java.lang.String getValue(java.lang.String, java.lang.String);
    method public java.lang.String getValue(java.lang.String);
    method public void removeAttribute(int);
    method public void setAttribute(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public void setAttributes(org.xml.sax.Attributes);
    method public void setLocalName(int, java.lang.String);
    method public void setQName(int, java.lang.String);
    method public void setType(int, java.lang.String);
    method public void setURI(int, java.lang.String);
    method public void setValue(int, java.lang.String);
  }

  public class DefaultHandler implements org.xml.sax.ContentHandler org.xml.sax.DTDHandler org.xml.sax.EntityResolver org.xml.sax.ErrorHandler {
    ctor public DefaultHandler();
    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
    method public void endDocument() throws org.xml.sax.SAXException;
    method public void endElement(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void endPrefixMapping(java.lang.String) throws org.xml.sax.SAXException;
    method public void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
    method public void notationDecl(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void processingInstruction(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public org.xml.sax.InputSource resolveEntity(java.lang.String, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void setDocumentLocator(org.xml.sax.Locator);
    method public void skippedEntity(java.lang.String) throws org.xml.sax.SAXException;
    method public void startDocument() throws org.xml.sax.SAXException;
    method public void startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
    method public void startPrefixMapping(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
  }

  public class LocatorImpl implements org.xml.sax.Locator {
    ctor public LocatorImpl();
    ctor public LocatorImpl(org.xml.sax.Locator);
    method public int getColumnNumber();
    method public int getLineNumber();
    method public java.lang.String getPublicId();
    method public java.lang.String getSystemId();
    method public void setColumnNumber(int);
    method public void setLineNumber(int);
    method public void setPublicId(java.lang.String);
    method public void setSystemId(java.lang.String);
  }

  public class NamespaceSupport {
    ctor public NamespaceSupport();
    method public boolean declarePrefix(java.lang.String, java.lang.String);
    method public java.util.Enumeration getDeclaredPrefixes();
    method public java.lang.String getPrefix(java.lang.String);
    method public java.util.Enumeration getPrefixes();
    method public java.util.Enumeration getPrefixes(java.lang.String);
    method public java.lang.String getURI(java.lang.String);
    method public boolean isNamespaceDeclUris();
    method public void popContext();
    method public java.lang.String[] processName(java.lang.String, java.lang.String[], boolean);
    method public void pushContext();
    method public void reset();
    method public void setNamespaceDeclUris(boolean);
    field public static final java.lang.String NSDECL = "http://www.w3.org/xmlns/2000/";
    field public static final java.lang.String XMLNS = "http://www.w3.org/XML/1998/namespace";
  }

  public class ParserAdapter implements org.xml.sax.DocumentHandler org.xml.sax.XMLReader {
    ctor public ParserAdapter() throws org.xml.sax.SAXException;
    ctor public ParserAdapter(org.xml.sax.Parser);
    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
    method public void endDocument() throws org.xml.sax.SAXException;
    method public void endElement(java.lang.String) throws org.xml.sax.SAXException;
    method public org.xml.sax.ContentHandler getContentHandler();
    method public org.xml.sax.DTDHandler getDTDHandler();
    method public org.xml.sax.EntityResolver getEntityResolver();
    method public org.xml.sax.ErrorHandler getErrorHandler();
    method public boolean getFeature(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
    method public void parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
    method public void processingInstruction(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void setContentHandler(org.xml.sax.ContentHandler);
    method public void setDTDHandler(org.xml.sax.DTDHandler);
    method public void setDocumentLocator(org.xml.sax.Locator);
    method public void setEntityResolver(org.xml.sax.EntityResolver);
    method public void setErrorHandler(org.xml.sax.ErrorHandler);
    method public void setFeature(java.lang.String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void startDocument() throws org.xml.sax.SAXException;
    method public void startElement(java.lang.String, org.xml.sax.AttributeList) throws org.xml.sax.SAXException;
  }

  public deprecated class ParserFactory {
    method public static org.xml.sax.Parser makeParser() throws java.lang.ClassCastException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.NullPointerException;
    method public static org.xml.sax.Parser makeParser(java.lang.String) throws java.lang.ClassCastException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
  }

  public class XMLFilterImpl implements org.xml.sax.ContentHandler org.xml.sax.DTDHandler org.xml.sax.EntityResolver org.xml.sax.ErrorHandler org.xml.sax.XMLFilter {
    ctor public XMLFilterImpl();
    ctor public XMLFilterImpl(org.xml.sax.XMLReader);
    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
    method public void endDocument() throws org.xml.sax.SAXException;
    method public void endElement(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void endPrefixMapping(java.lang.String) throws org.xml.sax.SAXException;
    method public void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
    method public org.xml.sax.ContentHandler getContentHandler();
    method public org.xml.sax.DTDHandler getDTDHandler();
    method public org.xml.sax.EntityResolver getEntityResolver();
    method public org.xml.sax.ErrorHandler getErrorHandler();
    method public boolean getFeature(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public org.xml.sax.XMLReader getParent();
    method public java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
    method public void notationDecl(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void processingInstruction(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public org.xml.sax.InputSource resolveEntity(java.lang.String, java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void setContentHandler(org.xml.sax.ContentHandler);
    method public void setDTDHandler(org.xml.sax.DTDHandler);
    method public void setDocumentLocator(org.xml.sax.Locator);
    method public void setEntityResolver(org.xml.sax.EntityResolver);
    method public void setErrorHandler(org.xml.sax.ErrorHandler);
    method public void setFeature(java.lang.String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void setParent(org.xml.sax.XMLReader);
    method public void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void skippedEntity(java.lang.String) throws org.xml.sax.SAXException;
    method public void startDocument() throws org.xml.sax.SAXException;
    method public void startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
    method public void startPrefixMapping(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
  }

  public class XMLReaderAdapter implements org.xml.sax.ContentHandler org.xml.sax.Parser {
    ctor public XMLReaderAdapter() throws org.xml.sax.SAXException;
    ctor public XMLReaderAdapter(org.xml.sax.XMLReader);
    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
    method public void endDocument() throws org.xml.sax.SAXException;
    method public void endElement(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void endPrefixMapping(java.lang.String);
    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
    method public void parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
    method public void processingInstruction(java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    method public void setDTDHandler(org.xml.sax.DTDHandler);
    method public void setDocumentHandler(org.xml.sax.DocumentHandler);
    method public void setDocumentLocator(org.xml.sax.Locator);
    method public void setEntityResolver(org.xml.sax.EntityResolver);
    method public void setErrorHandler(org.xml.sax.ErrorHandler);
    method public void setLocale(java.util.Locale) throws org.xml.sax.SAXException;
    method public void skippedEntity(java.lang.String) throws org.xml.sax.SAXException;
    method public void startDocument() throws org.xml.sax.SAXException;
    method public void startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
    method public void startPrefixMapping(java.lang.String, java.lang.String);
  }

  public final class XMLReaderFactory {
    method public static org.xml.sax.XMLReader createXMLReader() throws org.xml.sax.SAXException;
    method public static org.xml.sax.XMLReader createXMLReader(java.lang.String) throws org.xml.sax.SAXException;
  }

}

package org.xmlpull.v1 {

  public abstract interface XmlPullParser {
    method public abstract void defineEntityReplacementText(java.lang.String, java.lang.String) throws org.xmlpull.v1.XmlPullParserException;
    method public abstract int getAttributeCount();
    method public abstract java.lang.String getAttributeName(int);
    method public abstract java.lang.String getAttributeNamespace(int);
    method public abstract java.lang.String getAttributePrefix(int);
    method public abstract java.lang.String getAttributeType(int);
    method public abstract java.lang.String getAttributeValue(int);
    method public abstract java.lang.String getAttributeValue(java.lang.String, java.lang.String);
    method public abstract int getColumnNumber();
    method public abstract int getDepth();
    method public abstract int getEventType() throws org.xmlpull.v1.XmlPullParserException;
    method public abstract boolean getFeature(java.lang.String);
    method public abstract java.lang.String getInputEncoding();
    method public abstract int getLineNumber();
    method public abstract java.lang.String getName();
    method public abstract java.lang.String getNamespace(java.lang.String);
    method public abstract java.lang.String getNamespace();
    method public abstract int getNamespaceCount(int) throws org.xmlpull.v1.XmlPullParserException;
    method public abstract java.lang.String getNamespacePrefix(int) throws org.xmlpull.v1.XmlPullParserException;
    method public abstract java.lang.String getNamespaceUri(int) throws org.xmlpull.v1.XmlPullParserException;
    method public abstract java.lang.String getPositionDescription();
    method public abstract java.lang.String getPrefix();
    method public abstract java.lang.Object getProperty(java.lang.String);
    method public abstract java.lang.String getText();
    method public abstract char[] getTextCharacters(int[]);
    method public abstract boolean isAttributeDefault(int);
    method public abstract boolean isEmptyElementTag() throws org.xmlpull.v1.XmlPullParserException;
    method public abstract boolean isWhitespace() throws org.xmlpull.v1.XmlPullParserException;
    method public abstract int next() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public abstract int nextTag() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public abstract java.lang.String nextText() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public abstract int nextToken() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public abstract void require(int, java.lang.String, java.lang.String) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public abstract void setFeature(java.lang.String, boolean) throws org.xmlpull.v1.XmlPullParserException;
    method public abstract void setInput(java.io.Reader) throws org.xmlpull.v1.XmlPullParserException;
    method public abstract void setInput(java.io.InputStream, java.lang.String) throws org.xmlpull.v1.XmlPullParserException;
    method public abstract void setProperty(java.lang.String, java.lang.Object) throws org.xmlpull.v1.XmlPullParserException;
    field public static final int CDSECT = 5; // 0x5
    field public static final int COMMENT = 9; // 0x9
    field public static final int DOCDECL = 10; // 0xa
    field public static final int END_DOCUMENT = 1; // 0x1
    field public static final int END_TAG = 3; // 0x3
    field public static final int ENTITY_REF = 6; // 0x6
    field public static final java.lang.String FEATURE_PROCESS_DOCDECL = "http://xmlpull.org/v1/doc/features.html#process-docdecl";
    field public static final java.lang.String FEATURE_PROCESS_NAMESPACES = "http://xmlpull.org/v1/doc/features.html#process-namespaces";
    field public static final java.lang.String FEATURE_REPORT_NAMESPACE_ATTRIBUTES = "http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes";
    field public static final java.lang.String FEATURE_VALIDATION = "http://xmlpull.org/v1/doc/features.html#validation";
    field public static final int IGNORABLE_WHITESPACE = 7; // 0x7
    field public static final java.lang.String NO_NAMESPACE = "";
    field public static final int PROCESSING_INSTRUCTION = 8; // 0x8
    field public static final int START_DOCUMENT = 0; // 0x0
    field public static final int START_TAG = 2; // 0x2
    field public static final int TEXT = 4; // 0x4
    field public static final java.lang.String[] TYPES;
  }

  public class XmlPullParserException extends java.lang.Exception {
    ctor public XmlPullParserException(java.lang.String);
    ctor public XmlPullParserException(java.lang.String, org.xmlpull.v1.XmlPullParser, java.lang.Throwable);
    method public int getColumnNumber();
    method public java.lang.Throwable getDetail();
    method public int getLineNumber();
    field protected int column;
    field protected java.lang.Throwable detail;
    field protected int row;
  }

  public class XmlPullParserFactory {
    ctor protected XmlPullParserFactory();
    method public boolean getFeature(java.lang.String);
    method public boolean isNamespaceAware();
    method public boolean isValidating();
    method public static org.xmlpull.v1.XmlPullParserFactory newInstance() throws org.xmlpull.v1.XmlPullParserException;
    method public static org.xmlpull.v1.XmlPullParserFactory newInstance(java.lang.String, java.lang.Class) throws org.xmlpull.v1.XmlPullParserException;
    method public org.xmlpull.v1.XmlPullParser newPullParser() throws org.xmlpull.v1.XmlPullParserException;
    method public org.xmlpull.v1.XmlSerializer newSerializer() throws org.xmlpull.v1.XmlPullParserException;
    method public void setFeature(java.lang.String, boolean) throws org.xmlpull.v1.XmlPullParserException;
    method public void setNamespaceAware(boolean);
    method public void setValidating(boolean);
    field public static final java.lang.String PROPERTY_NAME = "org.xmlpull.v1.XmlPullParserFactory";
    field protected java.lang.String classNamesLocation;
    field protected java.util.HashMap<java.lang.String, java.lang.Boolean> features;
    field protected java.util.ArrayList parserClasses;
    field protected java.util.ArrayList serializerClasses;
  }

  public abstract interface XmlSerializer {
    method public abstract org.xmlpull.v1.XmlSerializer attribute(java.lang.String, java.lang.String, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void cdsect(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void comment(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void docdecl(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void endDocument() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract org.xmlpull.v1.XmlSerializer endTag(java.lang.String, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void entityRef(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void flush() throws java.io.IOException;
    method public abstract int getDepth();
    method public abstract boolean getFeature(java.lang.String);
    method public abstract java.lang.String getName();
    method public abstract java.lang.String getNamespace();
    method public abstract java.lang.String getPrefix(java.lang.String, boolean) throws java.lang.IllegalArgumentException;
    method public abstract java.lang.Object getProperty(java.lang.String);
    method public abstract void ignorableWhitespace(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void processingInstruction(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void setFeature(java.lang.String, boolean) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void setOutput(java.io.OutputStream, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void setOutput(java.io.Writer) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void setPrefix(java.lang.String, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void setProperty(java.lang.String, java.lang.Object) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract void startDocument(java.lang.String, java.lang.Boolean) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract org.xmlpull.v1.XmlSerializer startTag(java.lang.String, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract org.xmlpull.v1.XmlSerializer text(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    method public abstract org.xmlpull.v1.XmlSerializer text(char[], int, int) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
  }

}

package org.xmlpull.v1.sax2 {

  public class Driver implements org.xml.sax.Attributes org.xml.sax.Locator org.xml.sax.XMLReader {
    ctor public Driver() throws org.xmlpull.v1.XmlPullParserException;
    ctor public Driver(org.xmlpull.v1.XmlPullParser) throws org.xmlpull.v1.XmlPullParserException;
    method public int getColumnNumber();
    method public org.xml.sax.ContentHandler getContentHandler();
    method public org.xml.sax.DTDHandler getDTDHandler();
    method public org.xml.sax.EntityResolver getEntityResolver();
    method public org.xml.sax.ErrorHandler getErrorHandler();
    method public boolean getFeature(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public int getIndex(java.lang.String, java.lang.String);
    method public int getIndex(java.lang.String);
    method public int getLength();
    method public int getLineNumber();
    method public java.lang.String getLocalName(int);
    method public java.lang.Object getProperty(java.lang.String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public java.lang.String getPublicId();
    method public java.lang.String getQName(int);
    method public java.lang.String getSystemId();
    method public java.lang.String getType(int);
    method public java.lang.String getType(java.lang.String, java.lang.String);
    method public java.lang.String getType(java.lang.String);
    method public java.lang.String getURI(int);
    method public java.lang.String getValue(int);
    method public java.lang.String getValue(java.lang.String, java.lang.String);
    method public java.lang.String getValue(java.lang.String);
    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException;
    method public void parseSubTree(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xml.sax.SAXException;
    method public void setContentHandler(org.xml.sax.ContentHandler);
    method public void setDTDHandler(org.xml.sax.DTDHandler);
    method public void setEntityResolver(org.xml.sax.EntityResolver);
    method public void setErrorHandler(org.xml.sax.ErrorHandler);
    method public void setFeature(java.lang.String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method public void setProperty(java.lang.String, java.lang.Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
    method protected void startElement(java.lang.String, java.lang.String, java.lang.String) throws org.xml.sax.SAXException;
    field protected static final java.lang.String APACHE_DYNAMIC_VALIDATION_FEATURE = "http://apache.org/xml/features/validation/dynamic";
    field protected static final java.lang.String APACHE_SCHEMA_VALIDATION_FEATURE = "http://apache.org/xml/features/validation/schema";
    field protected static final java.lang.String DECLARATION_HANDLER_PROPERTY = "http://xml.org/sax/properties/declaration-handler";
    field protected static final java.lang.String LEXICAL_HANDLER_PROPERTY = "http://xml.org/sax/properties/lexical-handler";
    field protected static final java.lang.String NAMESPACES_FEATURE = "http://xml.org/sax/features/namespaces";
    field protected static final java.lang.String NAMESPACE_PREFIXES_FEATURE = "http://xml.org/sax/features/namespace-prefixes";
    field protected static final java.lang.String VALIDATION_FEATURE = "http://xml.org/sax/features/validation";
    field protected org.xml.sax.ContentHandler contentHandler;
    field protected org.xml.sax.ErrorHandler errorHandler;
    field protected org.xmlpull.v1.XmlPullParser pp;
    field protected java.lang.String systemId;
  }

}

