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_NETWORK_STATE = "android.permission.ACCESS_NETWORK_STATE";
    field public static final java.lang.String ACCESS_NOTIFICATION_POLICY = "android.permission.ACCESS_NOTIFICATION_POLICY";
    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 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 deprecated java.lang.String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
    field public static final java.lang.String BIND_CARRIER_SERVICES = "android.permission.BIND_CARRIER_SERVICES";
    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_CONDITION_PROVIDER_SERVICE = "android.permission.BIND_CONDITION_PROVIDER_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_INCALL_SERVICE = "android.permission.BIND_INCALL_SERVICE";
    field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
    field public static final java.lang.String BIND_MIDI_DEVICE_SERVICE = "android.permission.BIND_MIDI_DEVICE_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_QUICK_SETTINGS_TILE = "android.permission.BIND_QUICK_SETTINGS_TILE";
    field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
    field public static final java.lang.String BIND_SCREENING_SERVICE = "android.permission.BIND_SCREENING_SERVICE";
    field public static final java.lang.String BIND_TELECOM_CONNECTION_SERVICE = "android.permission.BIND_TELECOM_CONNECTION_SERVICE";
    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_VR_LISTENER_SERVICE = "android.permission.BIND_VR_LISTENER_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 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 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 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 GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
    field public static final java.lang.String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
    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 GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH";
    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 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_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 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_SMS = "android.permission.READ_SMS";
    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_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_EMERGENCY_BROADCAST = "android.permission.RECEIVE_EMERGENCY_BROADCAST";
    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 java.lang.String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
    field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES";
    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 SEND_SMS_NO_CONFIRMATION = "android.permission.SEND_SMS_NO_CONFIRMATION";
    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 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_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_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_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
    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 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 STORAGE = "android.permission-group.STORAGE";
  }

  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 = 16843999; // 0x10104df
    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 = 16844014; // 0x10104ee
    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 backupInForeground = 16844059; // 0x101051b
    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 bitmap = 16844055; // 0x1010517
    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 = 16843997; // 0x10104dd
    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 buttonGravity = 16844031; // 0x10104ff
    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 canControlMagnification = 16844040; // 0x1010508
    field public static final int canPerformGestures = 16844046; // 0x101050e
    field public static final int canRecord = 16844061; // 0x101051d
    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 collapseIcon = 16844032; // 0x1010500
    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 = 16844002; // 0x10104e2
    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 contextClickable = 16844007; // 0x10104e7
    field public static final int contextPopupMenuStyle = 16844034; // 0x1010502
    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 countDown = 16844060; // 0x101051c
    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 defaultHeight = 16844021; // 0x10104f5
    field public static final int defaultValue = 16843245; // 0x10101ed
    field public static final int defaultWidth = 16844020; // 0x10104f4
    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 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 encryptionAware = 16844038; // 0x1010506
    field public static final int end = 16843996; // 0x10104dc
    field public static final int endColor = 16843166; // 0x101019e
    field public static final int endX = 16844051; // 0x1010513
    field public static final int endY = 16844052; // 0x1010514
    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 externalService = 16844047; // 0x101050f
    field public static final int extraTension = 16843371; // 0x101026b
    field public static final int extractNativeLibs = 16844010; // 0x10104ea
    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 fingerprintAuthDrawable = 16844008; // 0x10104e8
    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 forceDeviceEncrypted = 16844037; // 0x1010505
    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 fullBackupContent = 16844011; // 0x10104eb
    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 hotSpotX = 16844056; // 0x1010518
    field public static final int hotSpotY = 16844057; // 0x1010519
    field public static final int hyphenationFrequency = 16843998; // 0x10104de
    field public static final int icon = 16842754; // 0x1010002
    field public static final int iconPreview = 16843337; // 0x1010249
    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 languageTag = 16844041; // 0x1010509
    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 level = 16844033; // 0x1010501
    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 listMenuViewStyle = 16844018; // 0x10104f2
    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 lockTaskMode = 16844013; // 0x10104ed
    field public static final int logo = 16843454; // 0x10102be
    field public static final int logoDescription = 16844009; // 0x10104e9
    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 maxButtonHeight = 16844030; // 0x10104fe
    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 minimalSize = 16844022; // 0x10104f6
    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 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 nfcAntennaPositionDrawable = 16844063; // 0x101051f
    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 = 16844001; // 0x10104e1
    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 offset = 16844053; // 0x1010515
    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 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 pointerShape = 16844042; // 0x101050a
    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 preferenceFragmentStyle = 16844039; // 0x1010507
    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 = 16844023; // 0x10104f7
    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 scrollIndicators = 16844006; // 0x10104e6
    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 showForAllUsers = 16844015; // 0x10104ef
    field public static final deprecated 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 = 16843995; // 0x10104db
    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 int startX = 16844049; // 0x1010511
    field public static final int startY = 16844050; // 0x1010512
    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 subMenuArrow = 16844019; // 0x10104f3
    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 subtitleTextColor = 16844004; // 0x10104e4
    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 supportsAssist = 16844016; // 0x10104f0
    field public static final int supportsLaunchVoiceAssistFromKeyguard = 16844017; // 0x10104f1
    field public static final int supportsLocalInteraction = 16844048; // 0x1010510
    field public static final int supportsPictureInPicture = 16844024; // 0x10104f8
    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 textAppearancePopupMenuHeader = 16844035; // 0x1010503
    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 = 16844005; // 0x10104e5
    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 tickMark = 16844043; // 0x101050b
    field public static final int tickMarkTint = 16844044; // 0x101050c
    field public static final int tickMarkTintMode = 16844045; // 0x101050d
    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 titleMargin = 16844025; // 0x10104f9
    field public static final int titleMarginBottom = 16844029; // 0x10104fd
    field public static final int titleMarginEnd = 16844027; // 0x10104fb
    field public static final int titleMarginStart = 16844026; // 0x10104fa
    field public static final int titleMarginTop = 16844028; // 0x10104fc
    field public static final int titleTextAppearance = 16843822; // 0x101042e
    field public static final int titleTextColor = 16844003; // 0x10104e3
    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 tunerCount = 16844062; // 0x101051e
    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 use32bitAbi = 16844054; // 0x1010516
    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 = 16844012; // 0x10104ec
    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 version = 16844058; // 0x101051a
    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 windowBackgroundFallback = 16844036; // 0x1010504
    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 windowHideAnimation = 16842935; // 0x10100b7
    field public static final int windowIsFloating = 16842839; // 0x1010057
    field public static final int windowIsTranslucent = 16842840; // 0x1010058
    field public static final int windowLightStatusBar = 16844000; // 0x10104e0
    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 accessibilityActionContextClick = 16908348; // 0x102003c
    field public static final int accessibilityActionScrollDown = 16908346; // 0x102003a
    field public static final int accessibilityActionScrollLeft = 16908345; // 0x1020039
    field public static final int accessibilityActionScrollRight = 16908347; // 0x102003b
    field public static final int accessibilityActionScrollToPosition = 16908343; // 0x1020037
    field public static final int accessibilityActionScrollUp = 16908344; // 0x1020038
    field public static final int accessibilityActionSetProgress = 16908349; // 0x102003d
    field public static final int accessibilityActionShowOnScreen = 16908342; // 0x1020036
    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 icon_frame = 16908350; // 0x102003e
    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 list_container = 16908351; // 0x102003f
    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 shareText = 16908341; // 0x1020035
    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 switch_widget = 16908352; // 0x1020040
    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 fingerprint_icon_content_description = 17039384; // 0x1040018
    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_Button_Inverse = 16974548; // 0x10302d4
    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 = 16974550; // 0x10302d6
    field public static final int ThemeOverlay_Material_Dialog_Alert = 16974551; // 0x10302d7
    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_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_DarkActionBar = 16974552; // 0x10302d8
    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 = 16974549; // 0x10302d5
    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_SeekBar_Discrete = 16974553; // 0x10302d9
    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 final void disableSelf();
    method public final boolean dispatchGesture(android.accessibilityservice.GestureDescription, android.accessibilityservice.AccessibilityService.GestureResultCallback, android.os.Handler);
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
    method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
    method public final android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
    method public final android.accessibilityservice.AccessibilityService.SoftKeyboardController getSoftKeyboardController();
    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 int GLOBAL_ACTION_TOGGLE_SPLIT_SCREEN = 7; // 0x7
    field public static final java.lang.String SERVICE_INTERFACE = "android.accessibilityservice.AccessibilityService";
    field public static final java.lang.String SERVICE_META_DATA = "android.accessibilityservice";
    field public static final int SHOW_MODE_AUTO = 0; // 0x0
    field public static final int SHOW_MODE_HIDDEN = 1; // 0x1
  }

  public static abstract class AccessibilityService.GestureResultCallback {
    ctor public AccessibilityService.GestureResultCallback();
    method public void onCancelled(android.accessibilityservice.GestureDescription);
    method public void onCompleted(android.accessibilityservice.GestureDescription);
  }

  public static final class AccessibilityService.MagnificationController {
    method public void addListener(android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener);
    method public void addListener(android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener, android.os.Handler);
    method public float getCenterX();
    method public float getCenterY();
    method public android.graphics.Region getMagnifiedRegion();
    method public float getScale();
    method public boolean removeListener(android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener);
    method public boolean reset(boolean);
    method public boolean setCenter(float, float, boolean);
    method public boolean setScale(float, boolean);
  }

  public static abstract interface AccessibilityService.MagnificationController.OnMagnificationChangedListener {
    method public abstract void onMagnificationChanged(android.accessibilityservice.AccessibilityService.MagnificationController, android.graphics.Region, float, float, float);
  }

  public static final class AccessibilityService.SoftKeyboardController {
    method public void addOnShowModeChangedListener(android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener);
    method public void addOnShowModeChangedListener(android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener, android.os.Handler);
    method public int getShowMode();
    method public boolean removeOnShowModeChangedListener(android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener);
    method public boolean setShowMode(int);
  }

  public static abstract interface AccessibilityService.SoftKeyboardController.OnShowModeChangedListener {
    method public abstract void onShowModeChanged(android.accessibilityservice.AccessibilityService.SoftKeyboardController, int);
  }

  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_CONTROL_MAGNIFICATION = 16; // 0x10
    field public static final int CAPABILITY_CAN_PERFORM_GESTURES = 32; // 0x20
    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;
  }

  public final class GestureDescription {
    method public static android.accessibilityservice.GestureDescription createClick(int, int);
    method public static android.accessibilityservice.GestureDescription createLongClick(int, int);
    method public static android.accessibilityservice.GestureDescription createPinch(int, int, int, int, float, long);
    method public static android.accessibilityservice.GestureDescription createSwipe(int, int, int, int, long);
    method public android.accessibilityservice.GestureDescription.StrokeDescription getStroke(int);
    method public int getStrokeCount();
    field public static final long MAX_GESTURE_DURATION_MS = 60000L; // 0xea60L
    field public static final int MAX_STROKE_COUNT = 10; // 0xa
  }

  public static class GestureDescription.Builder {
    ctor public GestureDescription.Builder();
    method public android.accessibilityservice.GestureDescription.Builder addStroke(android.accessibilityservice.GestureDescription.StrokeDescription);
    method public android.accessibilityservice.GestureDescription build();
  }

  public static class GestureDescription.StrokeDescription {
    ctor public GestureDescription.StrokeDescription(android.graphics.Path, long, long);
    method public long getDuration();
    method public android.graphics.Path getPath();
    method public long getStartTime();
  }

}

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;
    field public static final java.lang.String KEY_CUSTOM_TOKEN_EXPIRY = "android.accounts.expiry";
  }

  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 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 deprecated 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 static android.content.Intent newChooseAccountIntent(android.accounts.Account, java.util.List<android.accounts.Account>, java.lang.String[], java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle);
    method public boolean notifyAccountAuthenticated(android.accounts.Account);
    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_AUTHENTICATED_TIME = "lastAuthenticatedTime";
    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 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 long getTotalDuration();
    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 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 long DURATION_INFINITE = -1L; // 0xffffffffffffffffL
  }

  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 void enterPictureInPicture();
    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 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 boolean inMultiWindow();
    method public boolean inPictureInPicture();
    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 isLocalVoiceInteractionSupported();
    method public boolean isTaskRoot();
    method public boolean isVoiceInteraction();
    method public boolean isVoiceInteractionRoot();
    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 onLocalVoiceInteractionStarted();
    method public void onLocalVoiceInteractionStopped();
    method public void onLowMemory();
    method public boolean onMenuItemSelected(int, android.view.MenuItem);
    method public boolean onMenuOpened(int, android.view.Menu);
    method public void onMultiWindowChanged(boolean);
    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 public void onPictureInPictureChanged(boolean);
    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.assist.AssistContent);
    method public void onProvideAssistData(android.os.Bundle);
    method public void onProvideKeyboardShortcuts(java.util.List<android.view.KeyboardShortcutGroup>, android.view.Menu);
    method public android.net.Uri onProvideReferrer();
    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 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 public void onStateNotSaved();
    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 overlayWithDecorCaption(boolean);
    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 android.view.DropPermissions requestDropPermissions(android.view.DragEvent);
    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 deprecated void setProgress(int);
    method public final deprecated void setProgressBarIndeterminate(boolean);
    method public final deprecated void setProgressBarIndeterminateVisibility(boolean);
    method public final deprecated 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 deprecated 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 void setVrModeEnabled(boolean, android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
    method public boolean shouldShowRequestPermissionRationale(java.lang.String);
    method public boolean shouldUpRecreateTask(android.content.Intent);
    method public boolean showAssist(android.os.Bundle);
    method public final deprecated void showDialog(int);
    method public final deprecated boolean showDialog(int, android.os.Bundle);
    method public void showLockTaskEscapeMessage();
    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 startLocalVoiceInteraction(android.os.Bundle);
    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 stopLocalVoiceInteraction();
    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.ComponentName baseActivity;
    field public android.content.Intent baseIntent;
    field public java.lang.CharSequence description;
    field public int id;
    field public int numActivities;
    field public android.content.ComponentName origActivity;
    field public int persistentId;
    field public android.app.ActivityManager.TaskDescription taskDescription;
    field public android.content.ComponentName topActivity;
  }

  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_FOREGROUND_SERVICE = 125; // 0x7d
    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_TOP_SLEEPING = 150; // 0x96
    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 android.graphics.Rect getLaunchBounds();
    method public static android.app.ActivityOptions makeBasic();
    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 void requestUsageTimeReport(android.app.PendingIntent);
    method public android.app.ActivityOptions setLaunchBounds(android.graphics.Rect);
    method public android.os.Bundle toBundle();
    method public void update(android.app.ActivityOptions);
    field public static final java.lang.String EXTRA_USAGE_TIME_REPORT = "android.activity.usage_time";
    field public static final java.lang.String EXTRA_USAGE_TIME_REPORT_PACKAGES = "android.usage_time_packages";
  }

  public class AlarmManager {
    method public void cancel(android.app.PendingIntent);
    method public void cancel(android.app.AlarmManager.OnAlarmListener);
    method public android.app.AlarmManager.AlarmClockInfo getNextAlarmClock();
    method public void set(int, long, android.app.PendingIntent);
    method public void set(int, long, java.lang.String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
    method public void setAlarmClock(android.app.AlarmManager.AlarmClockInfo, android.app.PendingIntent);
    method public void setAndAllowWhileIdle(int, long, android.app.PendingIntent);
    method public void setExact(int, long, android.app.PendingIntent);
    method public void setExact(int, long, java.lang.String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
    method public void setExactAndAllowWhileIdle(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);
    method public void setWindow(int, long, long, java.lang.String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
    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 static abstract interface AlarmManager.OnAlarmListener {
    method public abstract void onAlarm();
  }

  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 noteProxyOp(java.lang.String, java.lang.String);
    method public int noteProxyOpNoThrow(java.lang.String, java.lang.String);
    method public static java.lang.String permissionToOp(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_ADD_VOICEMAIL = "android:add_voicemail";
    field public static final java.lang.String OPSTR_BODY_SENSORS = "android:body_sensors";
    field public static final java.lang.String OPSTR_CALL_PHONE = "android:call_phone";
    field public static final java.lang.String OPSTR_CAMERA = "android:camera";
    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_MOCK_LOCATION = "android:mock_location";
    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";
    field public static final java.lang.String OPSTR_READ_CALENDAR = "android:read_calendar";
    field public static final java.lang.String OPSTR_READ_CALL_LOG = "android:read_call_log";
    field public static final java.lang.String OPSTR_READ_CELL_BROADCASTS = "android:read_cell_broadcasts";
    field public static final java.lang.String OPSTR_READ_CONTACTS = "android:read_contacts";
    field public static final java.lang.String OPSTR_READ_EXTERNAL_STORAGE = "android:read_external_storage";
    field public static final java.lang.String OPSTR_READ_PHONE_STATE = "android:read_phone_state";
    field public static final java.lang.String OPSTR_READ_SMS = "android:read_sms";
    field public static final java.lang.String OPSTR_RECEIVE_MMS = "android:receive_mms";
    field public static final java.lang.String OPSTR_RECEIVE_SMS = "android:receive_sms";
    field public static final java.lang.String OPSTR_RECEIVE_WAP_PUSH = "android:receive_wap_push";
    field public static final java.lang.String OPSTR_RECORD_AUDIO = "android:record_audio";
    field public static final java.lang.String OPSTR_SEND_SMS = "android:send_sms";
    field public static final java.lang.String OPSTR_SYSTEM_ALERT_WINDOW = "android:system_alert_window";
    field public static final java.lang.String OPSTR_USE_FINGERPRINT = "android:use_fingerprint";
    field public static final java.lang.String OPSTR_USE_SIP = "android:use_sip";
    field public static final java.lang.String OPSTR_WRITE_CALENDAR = "android:write_calendar";
    field public static final java.lang.String OPSTR_WRITE_CALL_LOG = "android:write_call_log";
    field public static final java.lang.String OPSTR_WRITE_CONTACTS = "android:write_contacts";
    field public static final java.lang.String OPSTR_WRITE_EXTERNAL_STORAGE = "android:write_external_storage";
    field public static final java.lang.String OPSTR_WRITE_SETTINGS = "android:write_settings";
  }

  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 AutomaticZenRule implements android.os.Parcelable {
    ctor public AutomaticZenRule(java.lang.String, android.content.ComponentName, android.net.Uri, int, boolean);
    ctor public AutomaticZenRule(android.os.Parcel);
    method public int describeContents();
    method public android.net.Uri getConditionId();
    method public long getCreationTime();
    method public int getInterruptionFilter();
    method public java.lang.String getName();
    method public android.content.ComponentName getOwner();
    method public boolean isEnabled();
    method public void setConditionId(android.net.Uri);
    method public void setEnabled(boolean);
    method public void setInterruptionFilter(int);
    method public void setName(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.AutomaticZenRule> CREATOR;
  }

  public class DatePickerDialog extends android.app.AlertDialog implements android.widget.DatePicker.OnDateChangedListener android.content.DialogInterface.OnClickListener {
    ctor public DatePickerDialog(android.content.Context);
    ctor public DatePickerDialog(android.content.Context, int);
    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 setOnDateSetListener(android.app.DatePickerDialog.OnDateSetListener);
    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 onProvideKeyboardShortcuts(java.util.List<android.view.KeyboardShortcutGroup>, 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 deprecated 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.content.Context getContext();
    method public android.transition.Transition getEnterTransition();
    method public android.transition.Transition getExitTransition();
    method public final android.app.FragmentManager getFragmentManager();
    method public final java.lang.Object getHost();
    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.content.Context);
    method public deprecated 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.content.Context, android.util.AttributeSet, android.os.Bundle);
    method public deprecated void onInflate(android.app.Activity, android.util.AttributeSet, android.os.Bundle);
    method public void onLowMemory();
    method public void onMultiWindowChanged(boolean);
    method public boolean onOptionsItemSelected(android.view.MenuItem);
    method public void onOptionsMenuClosed(android.view.Menu);
    method public void onPause();
    method public void onPictureInPictureChanged(boolean);
    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 boolean shouldShowRequestPermissionRationale(java.lang.String);
    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 FragmentContainer {
    ctor public FragmentContainer();
    method public abstract android.view.View onFindViewById(int);
    method public abstract boolean onHasView();
  }

  public class FragmentController {
    method public void attachHost(android.app.Fragment);
    method public static final android.app.FragmentController createController(android.app.FragmentHostCallback<?>);
    method public void dispatchActivityCreated();
    method public void dispatchConfigurationChanged(android.content.res.Configuration);
    method public boolean dispatchContextItemSelected(android.view.MenuItem);
    method public void dispatchCreate();
    method public boolean dispatchCreateOptionsMenu(android.view.Menu, android.view.MenuInflater);
    method public void dispatchDestroy();
    method public void dispatchDestroyView();
    method public void dispatchLowMemory();
    method public void dispatchMultiWindowChanged(boolean);
    method public boolean dispatchOptionsItemSelected(android.view.MenuItem);
    method public void dispatchOptionsMenuClosed(android.view.Menu);
    method public void dispatchPause();
    method public void dispatchPictureInPictureChanged(boolean);
    method public boolean dispatchPrepareOptionsMenu(android.view.Menu);
    method public void dispatchResume();
    method public void dispatchStart();
    method public void dispatchStop();
    method public void dispatchTrimMemory(int);
    method public void doLoaderDestroy();
    method public void doLoaderStart();
    method public void doLoaderStop(boolean);
    method public void dumpLoaders(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public boolean execPendingActions();
    method public android.app.Fragment findFragmentByWho(java.lang.String);
    method public android.app.FragmentManager getFragmentManager();
    method public android.app.LoaderManager getLoaderManager();
    method public void noteStateNotSaved();
    method public android.view.View onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet);
    method public void reportLoaderStart();
    method public deprecated void restoreAllState(android.os.Parcelable, java.util.List<android.app.Fragment>);
    method public void restoreAllState(android.os.Parcelable, android.app.FragmentManagerNonConfig);
    method public void restoreLoaderNonConfig(android.util.ArrayMap<java.lang.String, android.app.LoaderManager>);
    method public android.util.ArrayMap<java.lang.String, android.app.LoaderManager> retainLoaderNonConfig();
    method public android.app.FragmentManagerNonConfig retainNestedNonConfig();
    method public deprecated java.util.List<android.app.Fragment> retainNonConfig();
    method public android.os.Parcelable saveAllState();
  }

  public abstract class FragmentHostCallback extends android.app.FragmentContainer {
    ctor public FragmentHostCallback(android.content.Context, android.os.Handler, int);
    method public void onAttachFragment(android.app.Fragment);
    method public void onDump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public android.view.View onFindViewById(int);
    method public abstract E onGetHost();
    method public android.view.LayoutInflater onGetLayoutInflater();
    method public int onGetWindowAnimations();
    method public boolean onHasView();
    method public boolean onHasWindowAnimations();
    method public void onInvalidateOptionsMenu();
    method public void onRequestPermissionsFromFragment(android.app.Fragment, java.lang.String[], int);
    method public boolean onShouldSaveFragmentState(android.app.Fragment);
    method public void onStartActivityFromFragment(android.app.Fragment, android.content.Intent, int, android.os.Bundle);
    method public boolean onUseFragmentManagerInflaterFactory();
  }

  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 class FragmentManagerNonConfig {
  }

  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 void commitNow();
    method public abstract void commitNowAllowingStateLoss();
    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 android.app.UiAutomation getUiAutomation(int);
    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 android.graphics.drawable.Icon getLargeIcon();
    method public android.graphics.drawable.Icon getSmallIcon();
    method public java.lang.String getSortKey();
    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_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
    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_REMOTE_INPUT_HISTORY = "android.remoteInputHistory";
    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 deprecated android.widget.RemoteViews bigContentView;
    field public java.lang.String category;
    field public int color;
    field public android.app.PendingIntent contentIntent;
    field public deprecated 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 deprecated android.widget.RemoteViews headsUpContentView;
    field public deprecated int icon;
    field public int iconLevel;
    field public deprecated 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 deprecated 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.graphics.drawable.Icon getIcon();
    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 deprecated int icon;
    field public java.lang.CharSequence title;
  }

  public static final class Notification.Action.Builder {
    ctor public deprecated Notification.Action.Builder(int, java.lang.CharSequence, android.app.PendingIntent);
    ctor public Notification.Action.Builder(android.graphics.drawable.Icon, 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 bigLargeIcon(android.graphics.drawable.Icon);
    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 deprecated 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.widget.RemoteViews createBigContentView();
    method public android.widget.RemoteViews createContentView();
    method public android.widget.RemoteViews createHeadsUpContentView();
    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 static android.app.Notification.Builder recoverBuilder(android.content.Context, android.app.Notification);
    method public android.app.Notification.Builder setActions(android.app.Notification.Action...);
    method public android.app.Notification.Builder setAutoCancel(boolean);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setChronometerCountsDown(boolean);
    method public android.app.Notification.Builder setColor(int);
    method public deprecated 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 setCustomBigContentView(android.widget.RemoteViews);
    method public android.app.Notification.Builder setCustomContentView(android.widget.RemoteViews);
    method public android.app.Notification.Builder setCustomHeadsUpContentView(android.widget.RemoteViews);
    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 setLargeIcon(android.graphics.drawable.Icon);
    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 setRemoteInputHistory(java.lang.CharSequence[]);
    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 setSmallIcon(android.graphics.drawable.Icon);
    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 class Notification.DecoratedCustomViewStyle extends android.app.Notification.Style {
    ctor public Notification.DecoratedCustomViewStyle();
    ctor public Notification.DecoratedCustomViewStyle(android.app.Notification.Builder);
  }

  public static class Notification.DecoratedMediaCustomViewStyle extends android.app.Notification.MediaStyle {
    ctor public Notification.DecoratedMediaCustomViewStyle();
    ctor public Notification.DecoratedMediaCustomViewStyle(android.app.Notification.Builder);
  }

  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 java.lang.String addAutomaticZenRule(android.app.AutomaticZenRule);
    method public boolean areNotificationsEnabled();
    method public void cancel(int);
    method public void cancel(java.lang.String, int);
    method public void cancelAll();
    method public android.service.notification.StatusBarNotification[] getActiveNotifications();
    method public android.app.AutomaticZenRule getAutomaticZenRule(java.lang.String);
    method public java.util.Map<java.lang.String, android.app.AutomaticZenRule> getAutomaticZenRules();
    method public final int getCurrentInterruptionFilter();
    method public int getImportance();
    method public android.app.NotificationManager.Policy getNotificationPolicy();
    method public boolean isNotificationPolicyAccessGranted();
    method public void notify(int, android.app.Notification);
    method public void notify(java.lang.String, int, android.app.Notification);
    method public boolean removeAutomaticZenRule(java.lang.String);
    method public final void setInterruptionFilter(int);
    method public void setNotificationPolicy(android.app.NotificationManager.Policy);
    method public boolean updateAutomaticZenRule(java.lang.String, android.app.AutomaticZenRule);
    field public static final java.lang.String ACTION_INTERRUPTION_FILTER_CHANGED = "android.app.action.INTERRUPTION_FILTER_CHANGED";
    field public static final java.lang.String ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED = "android.app.action.NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED";
    field public static final java.lang.String ACTION_NOTIFICATION_POLICY_CHANGED = "android.app.action.NOTIFICATION_POLICY_CHANGED";
    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
  }

  public static class NotificationManager.Policy implements android.os.Parcelable {
    ctor public NotificationManager.Policy(int, int, int);
    ctor public NotificationManager.Policy(int, int, int, int);
    method public int describeContents();
    method public static java.lang.String priorityCategoriesToString(int);
    method public static java.lang.String prioritySendersToString(int);
    method public static java.lang.String suppressedEffectsToString(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.NotificationManager.Policy> CREATOR;
    field public static final int PRIORITY_CATEGORY_CALLS = 8; // 0x8
    field public static final int PRIORITY_CATEGORY_EVENTS = 2; // 0x2
    field public static final int PRIORITY_CATEGORY_MESSAGES = 4; // 0x4
    field public static final int PRIORITY_CATEGORY_REMINDERS = 1; // 0x1
    field public static final int PRIORITY_CATEGORY_REPEAT_CALLERS = 16; // 0x10
    field public static final int PRIORITY_SENDERS_ANY = 0; // 0x0
    field public static final int PRIORITY_SENDERS_CONTACTS = 1; // 0x1
    field public static final int PRIORITY_SENDERS_STARRED = 2; // 0x2
    field public static final int SUPPRESSED_EFFECT_SCREEN_OFF = 1; // 0x1
    field public static final int SUPPRESSED_EFFECT_SCREEN_ON = 2; // 0x2
    field public final int priorityCallSenders;
    field public final int priorityCategories;
    field public final int priorityMessageSenders;
    field public final int suppressedVisualEffects;
  }

  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 void send(android.content.Context, int, android.content.Intent, android.app.PendingIntent.OnFinished, android.os.Handler, java.lang.String, android.os.Bundle) 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 void destroy();
    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 FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES = 1; // 0x1
    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 final class VoiceInteractor {
    method public android.app.VoiceInteractor.Request getActiveRequest(java.lang.String);
    method public android.app.VoiceInteractor.Request[] getActiveRequests();
    method public boolean submitRequest(android.app.VoiceInteractor.Request);
    method public boolean submitRequest(android.app.VoiceInteractor.Request, java.lang.String);
    method public boolean[] supportsCommands(java.lang.String[]);
  }

  public static class VoiceInteractor.AbortVoiceRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.AbortVoiceRequest(android.app.VoiceInteractor.Prompt, 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(android.app.VoiceInteractor.Prompt, android.os.Bundle);
    method public void onCompleteResult(android.os.Bundle);
  }

  public static class VoiceInteractor.ConfirmationRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.ConfirmationRequest(android.app.VoiceInteractor.Prompt, 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(android.app.VoiceInteractor.Prompt, 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, 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 class VoiceInteractor.Prompt implements android.os.Parcelable {
    ctor public VoiceInteractor.Prompt(java.lang.CharSequence[], java.lang.CharSequence);
    ctor public VoiceInteractor.Prompt(java.lang.CharSequence);
    method public int countVoicePrompts();
    method public int describeContents();
    method public java.lang.CharSequence getVisualPrompt();
    method public java.lang.CharSequence getVoicePromptAt(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.VoiceInteractor.Prompt> 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 java.lang.String getName();
    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 clear(int) 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.os.ParcelFileDescriptor getWallpaperFile(int);
    method public android.app.WallpaperInfo getWallpaperInfo();
    method public boolean hasResourceWallpaper(int);
    method public boolean isWallpaperSettingAllowed();
    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 int setBitmap(android.graphics.Bitmap, android.graphics.Rect, boolean) throws java.io.IOException;
    method public int setBitmap(android.graphics.Bitmap, android.graphics.Rect, boolean, int) throws java.io.IOException;
    method public void setResource(int) throws java.io.IOException;
    method public int setResource(int, int) throws java.io.IOException;
    method public void setStream(java.io.InputStream) throws java.io.IOException;
    method public int setStream(java.io.InputStream, android.graphics.Rect, boolean) throws java.io.IOException;
    method public int setStream(java.io.InputStream, android.graphics.Rect, boolean, int) 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 int FLAG_SET_LOCK = 2; // 0x2
    field public static final int FLAG_SET_SYSTEM = 1; // 0x1
    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 void onBugreportFailed(android.content.Context, android.content.Intent, int);
    method public void onBugreportShared(android.content.Context, android.content.Intent, java.lang.String);
    method public void onBugreportSharingDeclined(android.content.Context, android.content.Intent);
    method public java.lang.String onChoosePrivateKeyAlias(android.content.Context, android.content.Intent, int, android.net.Uri, 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 deprecated void onReadyForUserInitialization(android.content.Context, android.content.Intent);
    method public void onReceive(android.content.Context, android.content.Intent);
    method public void onSecurityLogsAvailable(android.content.Context, android.content.Intent);
    method public void onSystemUpdatePending(android.content.Context, android.content.Intent, long);
    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 int BUGREPORT_FAILURE_FAILED_COMPLETING = 0; // 0x0
    field public static final int BUGREPORT_FAILURE_FILE_NO_LONGER_AVAILABLE = 1; // 0x1
    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 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 clearDeviceOwnerApp(java.lang.String);
    method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
    method public void clearProfileOwner(android.content.ComponentName);
    method public void clearUserRestriction(android.content.ComponentName, java.lang.String);
    method public android.os.UserHandle createAndManageUser(android.content.ComponentName, java.lang.String, android.content.ComponentName, android.os.PersistableBundle, int);
    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 java.lang.String getAlwaysOnVpnPackage(android.content.ComponentName);
    method public android.os.Bundle getApplicationRestrictions(android.content.ComponentName, java.lang.String);
    method public java.lang.String getApplicationRestrictionsManagingPackage(android.content.ComponentName);
    method public boolean getAutoTimeRequired();
    method public boolean getBluetoothContactSharingDisabled(android.content.ComponentName);
    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 boolean getCrossProfileContactsSearchDisabled(android.content.ComponentName);
    method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName);
    method public int getCurrentFailedPasswordAttempts();
    method public boolean getDeviceLoggingEnabled(android.content.ComponentName);
    method public java.lang.String getDeviceOwnerLockScreenInfo();
    method public java.util.List<byte[]> getInstalledCaCerts(android.content.ComponentName);
    method public int getKeyguardDisabledFeatures(android.content.ComponentName);
    method public java.lang.String getLongSupportMessage(android.content.ComponentName);
    method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName);
    method public long getMaximumTimeToLock(android.content.ComponentName);
    method public int getOrganizationColor(android.content.ComponentName);
    method public java.lang.String getOrganizationName(android.content.ComponentName);
    method public boolean getPackageSuspended(android.content.ComponentName, java.lang.String);
    method public android.app.admin.DevicePolicyManager getParentProfileInstance(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 int getPermissionGrantState(android.content.ComponentName, java.lang.String, java.lang.String);
    method public int getPermissionPolicy(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 java.lang.String getShortSupportMessage(android.content.ComponentName);
    method public boolean getStorageEncryption(android.content.ComponentName);
    method public int getStorageEncryptionStatus();
    method public android.app.admin.SystemUpdatePolicy getSystemUpdatePolicy();
    method public java.util.List<android.os.PersistableBundle> getTrustAgentConfiguration(android.content.ComponentName, android.content.ComponentName);
    method public android.os.Bundle getUserRestrictions(android.content.ComponentName);
    method public java.lang.String getWifiMacAddress(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 installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String, boolean);
    method public boolean isActivePasswordSufficient();
    method public boolean isAdminActive(android.content.ComponentName);
    method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String);
    method public boolean isCallerApplicationRestrictionsManagingPackage();
    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 isProvisioningAllowed(java.lang.String);
    method public boolean isUninstallBlocked(android.content.ComponentName, java.lang.String);
    method public void lockNow();
    method public void reboot(android.content.ComponentName);
    method public void removeActiveAdmin(android.content.ComponentName);
    method public boolean removeCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
    method public boolean removeKeyPair(android.content.ComponentName, java.lang.String);
    method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
    method public boolean requestBugreport(android.content.ComponentName);
    method public boolean resetPassword(java.lang.String, int);
    method public java.util.List<android.auditing.SecurityLog.SecurityEvent> retrieveDeviceLogs(android.content.ComponentName);
    method public java.util.List<android.auditing.SecurityLog.SecurityEvent> retrievePreviousDeviceLogs(android.content.ComponentName);
    method public void setAccountManagementDisabled(android.content.ComponentName, java.lang.String, boolean);
    method public boolean setAlwaysOnVpnPackage(android.content.ComponentName, java.lang.String);
    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 setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String);
    method public void setAutoTimeRequired(android.content.ComponentName, boolean);
    method public void setBluetoothContactSharingDisabled(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 void setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean);
    method public void setDeviceLoggingEnabled(android.content.ComponentName, boolean);
    method public boolean setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.String);
    method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String);
    method public boolean setKeyguardDisabled(android.content.ComponentName, boolean);
    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 setLongSupportMessage(android.content.ComponentName, java.lang.String);
    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 setOrganizationColor(android.content.ComponentName, int);
    method public void setOrganizationName(android.content.ComponentName, java.lang.String);
    method public java.lang.String[] setPackagesSuspended(android.content.ComponentName, java.lang.String[], boolean);
    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 setPermissionGrantState(android.content.ComponentName, java.lang.String, java.lang.String, int);
    method public void setPermissionPolicy(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 void setShortSupportMessage(android.content.ComponentName, java.lang.String);
    method public boolean setStatusBarDisabled(android.content.ComponentName, boolean);
    method public int setStorageEncryption(android.content.ComponentName, boolean);
    method public void setSystemUpdatePolicy(android.content.ComponentName, android.app.admin.SystemUpdatePolicy);
    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 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_DEVICE_OWNER_CHANGED = "android.app.action.DEVICE_OWNER_CHANGED";
    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_DEVICE = "android.app.action.PROVISION_MANAGED_DEVICE";
    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_PARENT_PROFILE_PASSWORD = "android.app.action.SET_NEW_PARENT_PROFILE_PASSWORD";
    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 java.lang.String ACTION_SYSTEM_UPDATE_POLICY_CHANGED = "android.app.action.SYSTEM_UPDATE_POLICY_CHANGED";
    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_ACTIVE_PER_USER = 5; // 0x5
    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_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_ADMIN_SIGNATURE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM";
    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_LOGO_URI = "android.app.extra.PROVISIONING_LOGO_URI";
    field public static final java.lang.String EXTRA_PROVISIONING_MAIN_COLOR = "android.app.extra.PROVISIONING_MAIN_COLOR";
    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 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 PERMISSION_GRANT_STATE_DEFAULT = 0; // 0x0
    field public static final int PERMISSION_GRANT_STATE_DENIED = 2; // 0x2
    field public static final int PERMISSION_GRANT_STATE_GRANTED = 1; // 0x1
    field public static final int PERMISSION_POLICY_AUTO_DENY = 2; // 0x2
    field public static final int PERMISSION_POLICY_AUTO_GRANT = 1; // 0x1
    field public static final int PERMISSION_POLICY_PROMPT = 0; // 0x0
    field public static final int RESET_PASSWORD_DO_NOT_ASK_CREDENTIALS_ON_BOOT = 2; // 0x2
    field public static final int RESET_PASSWORD_REQUIRE_ENTRY = 1; // 0x1
    field public static final int SKIP_SETUP_WIZARD = 1; // 0x1
    field public static final int WIPE_EXTERNAL_STORAGE = 1; // 0x1
    field public static final int WIPE_RESET_PROTECTION_DATA = 2; // 0x2
  }

  public class SystemUpdatePolicy implements android.os.Parcelable {
    method public static android.app.admin.SystemUpdatePolicy createAutomaticInstallPolicy();
    method public static android.app.admin.SystemUpdatePolicy createPostponeInstallPolicy();
    method public static android.app.admin.SystemUpdatePolicy createWindowedInstallPolicy(int, int);
    method public int describeContents();
    method public int getInstallWindowEnd();
    method public int getInstallWindowStart();
    method public int getPolicyType();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.admin.SystemUpdatePolicy> CREATOR;
    field public static final int TYPE_INSTALL_AUTOMATIC = 1; // 0x1
    field public static final int TYPE_INSTALL_WINDOWED = 2; // 0x2
    field public static final int TYPE_POSTPONE = 3; // 0x3
  }

}

package android.app.assist {

  public class AssistContent implements android.os.Parcelable {
    ctor public AssistContent();
    method public int describeContents();
    method public android.content.ClipData getClipData();
    method public android.os.Bundle getExtras();
    method public android.content.Intent getIntent();
    method public java.lang.String getStructuredData();
    method public android.net.Uri getWebUri();
    method public boolean isAppProvidedIntent();
    method public boolean isAppProvidedWebUri();
    method public void setClipData(android.content.ClipData);
    method public void setIntent(android.content.Intent);
    method public void setStructuredData(java.lang.String);
    method public void setWebUri(android.net.Uri);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.assist.AssistContent> CREATOR;
  }

  public class AssistStructure implements android.os.Parcelable {
    ctor public AssistStructure();
    method public int describeContents();
    method public android.content.ComponentName getActivityComponent();
    method public android.app.assist.AssistStructure.WindowNode getWindowNodeAt(int);
    method public int getWindowNodeCount();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.assist.AssistStructure> CREATOR;
  }

  public static class AssistStructure.ViewNode {
    method public float getAlpha();
    method public android.app.assist.AssistStructure.ViewNode getChildAt(int);
    method public int getChildCount();
    method public java.lang.String getClassName();
    method public java.lang.CharSequence getContentDescription();
    method public float getElevation();
    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[] getTextLineBaselines();
    method public int[] getTextLineCharOffsets();
    method public int getTextSelectionEnd();
    method public int getTextSelectionStart();
    method public float getTextSize();
    method public int getTextStyle();
    method public int getTop();
    method public android.graphics.Matrix getTransformation();
    method public int getVisibility();
    method public int getWidth();
    method public boolean isAccessibilityFocused();
    method public boolean isActivated();
    method public boolean isAssistBlocked();
    method public boolean isCheckable();
    method public boolean isChecked();
    method public boolean isClickable();
    method public boolean isContextClickable();
    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 getDisplayId();
    method public int getHeight();
    method public int getLeft();
    method public android.app.assist.AssistStructure.ViewNode getRootViewNode();
    method public java.lang.CharSequence getTitle();
    method public int getTop();
    method public int getWidth();
  }

}

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 void onQuotaExceeded(long, long);
    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 long getFlexMillis();
    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 android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris();
    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 long MIN_FLEX_MILLIS = 300000L; // 0x493e0L
    field public static final long MIN_PERIOD_MILLIS = 3600000L; // 0x36ee80L
    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.Builder addTriggerContentUri(android.app.job.JobInfo.TriggerContentUri);
    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 setPeriodic(long, 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 static final class JobInfo.TriggerContentUri implements android.os.Parcelable {
    ctor public JobInfo.TriggerContentUri(android.net.Uri, int);
    method public int describeContents();
    method public int getFlags();
    method public android.net.Uri getUri();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.job.JobInfo.TriggerContentUri> CREATOR;
    field public static final int FLAG_NOTIFY_FOR_DESCENDANTS = 1; // 0x1
  }

  public class JobParameters implements android.os.Parcelable {
    method public int describeContents();
    method public android.os.PersistableBundle getExtras();
    method public int getJobId();
    method public java.lang.String[] getTriggeredContentAuthorities();
    method public android.net.Uri[] getTriggeredContentUris();
    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 DataUsagePolicy {
    field public final int networkType;
    field public final java.lang.String[] subscriberIds;
    field public final long thresholdInBytes;
    field public final int[] uids;
  }

  public static class DataUsagePolicy.Builder {
    ctor public DataUsagePolicy.Builder();
    method public android.app.usage.DataUsagePolicy.Builder addSubscriberId(java.lang.String);
    method public android.app.usage.DataUsagePolicy.Builder addUid(int);
    method public android.app.usage.DataUsagePolicy build();
    method public android.app.usage.DataUsagePolicy.Builder setNetworkType(int);
    method public android.app.usage.DataUsagePolicy.Builder setThreshold(long);
  }

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

  public static class NetworkStats.Bucket {
    ctor public NetworkStats.Bucket();
    method public long getEndTimeStamp();
    method public int getRoaming();
    method public long getRxBytes();
    method public long getRxPackets();
    method public long getStartTimeStamp();
    method public int getState();
    method public int getTag();
    method public long getTxBytes();
    method public long getTxPackets();
    method public int getUid();
    field public static final int ROAMING_ALL = -1; // 0xffffffff
    field public static final int ROAMING_NO = 1; // 0x1
    field public static final int ROAMING_YES = 2; // 0x2
    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 TAG_ALL = 0; // 0x0
    field public static final int TAG_ANY = -1; // 0xffffffff
    field public static final int UID_ALL = -1; // 0xffffffff
    field public static final int UID_REMOVED = -4; // 0xfffffffc
    field public static final int UID_TETHERING = -5; // 0xfffffffb
  }

  public class NetworkStatsManager {
    method public android.app.usage.NetworkStats queryDetails(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkStats queryDetailsForUid(int, java.lang.String, long, long, int) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkStats queryDetailsForUidTag(int, java.lang.String, long, long, int, int) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkStats querySummary(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkStats querySummary(int, java.lang.String, long, long, boolean) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkStats.Bucket querySummaryForDevice(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkStats.Bucket querySummaryForUser(int, java.lang.String, long, long) throws android.os.RemoteException, java.lang.SecurityException;
    method public android.app.usage.NetworkStats.Bucket querySummaryForUser(int, java.lang.String, long, long, boolean) throws android.os.RemoteException, java.lang.SecurityException;
    method public void registerDataUsageCallback(android.app.usage.DataUsagePolicy, android.app.usage.NetworkStatsManager.DataUsageCallback);
    method public void registerDataUsageCallback(android.app.usage.DataUsagePolicy, android.app.usage.NetworkStatsManager.DataUsageCallback, android.os.Handler);
    method public void unregisterDataUsageCallback(android.app.usage.NetworkStatsManager.DataUsageCallback);
  }

  public static class NetworkStatsManager.DataUsageCallback {
    ctor public NetworkStatsManager.DataUsageCallback();
    method public void onLimitReached();
  }

  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 MOVE_TO_BACKGROUND = 2; // 0x2
    field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
    field public static final int NONE = 0; // 0x0
    field public static final int USER_INTERACTION = 7; // 0x7
  }

  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 boolean isAppInactive(java.lang.String);
    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.auditing {

  public class SecurityLog {
    ctor public SecurityLog();
    field public static final int TAG_ADB_SHELL_CMD = 210002; // 0x33452
    field public static final int TAG_ADB_SHELL_INTERACTIVE = 210001; // 0x33451
    field public static final int TAG_APP_PROCESS_START = 210005; // 0x33455
    field public static final int TAG_KEYGUARD_DISMISSED = 210006; // 0x33456
    field public static final int TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT = 210007; // 0x33457
    field public static final int TAG_KEYGUARD_SECURED = 210008; // 0x33458
    field public static final int TAG_SYNC_RECV_FILE = 210003; // 0x33453
    field public static final int TAG_SYNC_SEND_FILE = 210004; // 0x33454
  }

  public static final class SecurityLog.SecurityEvent implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.Object getData();
    method public int getTag();
    method public long getTimeNanos();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.auditing.SecurityLog.SecurityEvent> CREATOR;
  }

}

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 android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int);
    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
    field public static final int TRANSPORT_AUTO = 0; // 0x0
    field public static final int TRANSPORT_BREDR = 1; // 0x1
    field public static final int TRANSPORT_LE = 2; // 0x2
  }

  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 SAP = 10; // 0xa
    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 int getConnectionType();
    method public java.io.InputStream getInputStream() throws java.io.IOException;
    method public int getMaxReceivePacketSize();
    method public int getMaxTransmitPacketSize();
    method public java.io.OutputStream getOutputStream() throws java.io.IOException;
    method public android.bluetooth.BluetoothDevice getRemoteDevice();
    method public boolean isConnected();
    field public static final int TYPE_L2CAP = 3; // 0x3
    field public static final int TYPE_RFCOMM = 1; // 0x1
    field public static final int TYPE_SCO = 2; // 0x2
  }

}

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 int CALLBACK_TYPE_FIRST_MATCH = 2; // 0x2
    field public static final int CALLBACK_TYPE_MATCH_LOST = 4; // 0x4
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR;
    field public static final int MATCH_MODE_AGGRESSIVE = 1; // 0x1
    field public static final int MATCH_MODE_STICKY = 2; // 0x2
    field public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; // 0x2
    field public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; // 0x3
    field public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; // 0x1
    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 setCallbackType(int);
    method public android.bluetooth.le.ScanSettings.Builder setMatchMode(int);
    method public android.bluetooth.le.ScanSettings.Builder setNumOfMatches(int);
    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 onSecurityException(android.accounts.Account, android.os.Bundle, java.lang.String, 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 android.os.PersistableBundle getExtras();
    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 setExtras(android.os.PersistableBundle);
    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 EXTRA_TARGET_COMPONENT_NAME = "android.content.extra.TARGET_COMPONENT_NAME";
    field public static final java.lang.String EXTRA_USER_SERIAL_NUMBER = "android.content.extra.USER_SERIAL_NUMBER";
    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 static android.content.ComponentName createRelative(java.lang.String, java.lang.String);
    method public static android.content.ComponentName createRelative(android.content.Context, java.lang.String);
    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 implements java.lang.AutoCloseable {
    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 void close();
    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 deprecated 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_REQUIRE_CHARGING = "require_charging";
    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 createDeviceEncryptedStorageContext();
    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 boolean deleteSharedPreferences(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 getDataDir();
    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 abstract android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public abstract java.io.File getSharedPreferencesPath(java.lang.String);
    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 abstract java.lang.String getSystemServiceName(java.lang.Class<?>);
    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 abstract boolean isDeviceEncryptedStorage();
    method public boolean isRestricted();
    method public abstract boolean migrateDatabaseFrom(android.content.Context, java.lang.String);
    method public abstract boolean migrateSharedPreferencesFrom(android.content.Context, java.lang.String);
    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_EXTERNAL_SERVICE = -2147483648; // 0x80000000
    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 CARRIER_CONFIG_SERVICE = "carrier_config";
    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 HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
    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 java.lang.String MIDI_SERVICE = "midi";
    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 deprecated int MODE_MULTI_PROCESS = 4; // 0x4
    field public static final int MODE_NO_LOCALIZED_COLLATORS = 16; // 0x10
    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 SHORTCUT_SERVICE = "shortcut";
    field public static final java.lang.String STORAGE_SERVICE = "storage";
    field public static final java.lang.String SYSTEM_HEALTH_SERVICE = "systemhealth";
    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 createDeviceEncryptedStorageContext();
    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 boolean deleteSharedPreferences(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 getDataDir();
    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 android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    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 boolean isDeviceEncryptedStorage();
    method public boolean migrateDatabaseFrom(android.content.Context, java.lang.String);
    method public boolean migrateSharedPreferencesFrom(android.content.Context, java.lang.String);
    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_PREFERENCES = "android.intent.action.APPLICATION_PREFERENCES";
    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_LOCKED_BOOT_COMPLETED = "android.intent.action.LOCKED_BOOT_COMPLETED";
    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_AVAILABILITY_CHANGED = "android.intent.action.MANAGED_PROFILE_AVAILABILITY_CHANGED";
    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_MANAGED_PROFILE_UNLOCKED = "android.intent.action.MANAGED_PROFILE_UNLOCKED";
    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_PACKAGES_SUSPENDED = "android.intent.action.PACKAGES_SUSPENDED";
    field public static final java.lang.String ACTION_PACKAGES_UNSUSPENDED = "android.intent.action.PACKAGES_UNSUSPENDED";
    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_QUICK_VIEW = "android.intent.action.QUICK_VIEW";
    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_USER_UNLOCKED = "android.intent.action.USER_UNLOCKED";
    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_ALTERNATE_INTENTS = "android.intent.extra.ALTERNATE_INTENTS";
    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_DEVICE_ID = "android.intent.extra.ASSIST_INPUT_DEVICE_ID";
    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_REFINEMENT_INTENT_SENDER = "android.intent.extra.CHOOSER_REFINEMENT_INTENT_SENDER";
    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_INDEX = "android.intent.extra.INDEX";
    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_QUIET_MODE = "android.intent.extra.QUIET_MODE";
    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_RESULT_RECEIVER = "android.intent.extra.RESULT_RECEIVER";
    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_LAUNCH_ADJACENT = 4096; // 0x1000
    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 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(android.os.Parcel);
    method public static android.content.RestrictionEntry createBundleArrayEntry(java.lang.String, android.content.RestrictionEntry[]);
    method public static android.content.RestrictionEntry createBundleEntry(java.lang.String, android.content.RestrictionEntry[]);
    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 setRequiresCharging(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_ENABLE_VR_MODE = 32768; // 0x8000
    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 android.content.pm.ActivityInfo.Layout layout;
    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 static final class ActivityInfo.Layout {
    ctor public ActivityInfo.Layout(int, float, int, float, int, int);
    field public final int gravity;
    field public final int height;
    field public final float heightFraction;
    field public final int minimalSize;
    field public final int width;
    field public final float widthFraction;
  }

  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_HARDWARE_ACCELERATED = 536870912; // 0x20000000
    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_SUSPENDED = 1073741824; // 0x40000000
    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 credentialEncryptedDataDir;
    field public java.lang.String dataDir;
    field public int descriptionRes;
    field public java.lang.String deviceEncryptedDataDir;
    field public boolean enabled;
    field public int flags;
    field public int largestWidthLimitDp;
    field public java.lang.String manageSpaceActivityName;
    field public java.lang.String minSdkVersion;
    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 encryptionAware;
    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;
    field public int version;
  }

  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 android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String, int, android.os.UserHandle);
    method public android.os.ParcelFileDescriptor getShortcutIconFd(android.content.pm.ShortcutInfo, android.os.UserHandle);
    method public int getShortcutIconResId(android.content.pm.ShortcutInfo, android.os.UserHandle);
    method public java.util.List<android.content.pm.ShortcutInfo> getShortcutInfo(java.lang.String, java.util.List<java.lang.String>, android.os.UserHandle);
    method public java.util.List<android.content.pm.ShortcutInfo> getShortcuts(android.content.pm.LauncherApps.ShortcutQuery, android.os.UserHandle);
    method public boolean hasShortcutHostPermission();
    method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
    method public boolean isPackageEnabled(java.lang.String, android.os.UserHandle);
    method public void pinShortcuts(java.lang.String, java.util.List<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 boolean startShortcut(java.lang.String, java.lang.String, android.graphics.Rect, android.os.Bundle, android.os.UserHandle);
    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 void onPackagesSuspended(java.lang.String[], android.os.UserHandle);
    method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
    method public void onPackagesUnsuspended(java.lang.String[], android.os.UserHandle);
    method public void onShortcutsChanged(java.lang.String, java.util.List<android.content.pm.ShortcutInfo>, android.os.UserHandle);
  }

  public static class LauncherApps.ShortcutQuery {
    ctor public LauncherApps.ShortcutQuery();
    method public void setActivity(android.content.ComponentName);
    method public void setChangedSince(long);
    method public void setPackage(java.lang.String);
    method public void setQueryFlags(int);
    field public static final int FLAG_GET_DYNAMIC = 1; // 0x1
    field public static final int FLAG_GET_KEY_FIELDS_ONLY = 4; // 0x4
    field public static final int FLAG_GET_PINNED = 2; // 0x2
  }

  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 removeSplit(java.lang.String) 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 setOriginatingUid(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 int[] getPackageGids(java.lang.String, int) 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 int getPackageUid(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    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 hasSystemFeature(java.lang.String, int);
    method public abstract boolean isPermissionRevokedByPolicy(java.lang.String, 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_AUDIO_PRO = "android.hardware.audio.pro";
    field public static final java.lang.String FEATURE_AUTOMOTIVE = "android.hardware.type.automotive";
    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_ETHERNET = "android.hardware.ethernet";
    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_FINGERPRINT = "android.hardware.fingerprint";
    field public static final java.lang.String FEATURE_FREEFORM_WINDOW_MANAGEMENT = "android.software.freeform_window_management";
    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_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
    field public static final java.lang.String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
    field public static final java.lang.String FEATURE_PICTURE_IN_PICTURE = "android.software.picture_in_picture";
    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_VR_MODE = "android.software.vr.mode";
    field public static final java.lang.String FEATURE_VR_MODE_HIGH_PERFORMANCE = "android.hardware.vr.high_performance";
    field public static final java.lang.String FEATURE_VULKAN_HARDWARE_LEVEL = "android.hardware.vulkan.level";
    field public static final java.lang.String FEATURE_VULKAN_HARDWARE_VERSION = "android.hardware.vulkan.version";
    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 deprecated int GET_DISABLED_COMPONENTS = 512; // 0x200
    field public static final deprecated 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 deprecated int GET_UNINSTALLED_PACKAGES = 8192; // 0x2000
    field public static final int GET_URI_PERMISSION_PATTERNS = 2048; // 0x800
    field public static final int MATCH_ALL = 131072; // 0x20000
    field public static final int MATCH_DEFAULT_ONLY = 65536; // 0x10000
    field public static final int MATCH_DISABLED_COMPONENTS = 512; // 0x200
    field public static final int MATCH_DISABLED_UNTIL_USED_COMPONENTS = 32768; // 0x8000
    field public static final int MATCH_ENCRYPTION_AWARE = 524288; // 0x80000
    field public static final int MATCH_ENCRYPTION_AWARE_AND_UNAWARE = 786432; // 0xc0000
    field public static final int MATCH_ENCRYPTION_UNAWARE = 262144; // 0x40000
    field public static final int MATCH_SYSTEM_ONLY = 1048576; // 0x100000
    field public static final int MATCH_UNINSTALLED_PACKAGES = 8192; // 0x2000
    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 FLAG_INSTALLED = 1073741824; // 0x40000000
    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_INSTALLER = 256; // 0x100
    field public static final int PROTECTION_FLAG_PRE23 = 128; // 0x80
    field public static final int PROTECTION_FLAG_PREINSTALLED = 1024; // 0x400
    field public static final int PROTECTION_FLAG_PRIVILEGED = 16; // 0x10
    field public static final deprecated int PROTECTION_FLAG_SYSTEM = 16; // 0x10
    field public static final int PROTECTION_FLAG_VERIFIER = 512; // 0x200
    field public static final int PROTECTION_MASK_BASE = 15; // 0xf
    field public static final int PROTECTION_MASK_FLAGS = 4080; // 0xff0
    field public static final int PROTECTION_NORMAL = 0; // 0x0
    field public static final int PROTECTION_SIGNATURE = 2; // 0x2
    field public static final deprecated 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_EXTERNAL_SERVICE = 4; // 0x4
    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 ShortcutInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.content.ComponentName getActivityComponent();
    method public android.os.PersistableBundle getExtras();
    method public java.lang.String getId();
    method public android.content.Intent getIntent();
    method public long getLastChangedTimestamp();
    method public java.lang.String getPackageName();
    method public java.lang.String getTitle();
    method public int getWeight();
    method public boolean hasIconFile();
    method public boolean hasIconResource();
    method public boolean hasKeyFieldsOnly();
    method public boolean isDynamic();
    method public boolean isPinned();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CLONE_REMOVE_FOR_CREATOR = 1; // 0x1
    field public static final int CLONE_REMOVE_FOR_LAUNCHER = 3; // 0x3
    field public static final int CLONE_REMOVE_NON_KEY_INFO = 4; // 0x4
    field public static final android.os.Parcelable.Creator<android.content.pm.ShortcutInfo> CREATOR;
    field public static final int FLAG_DYNAMIC = 1; // 0x1
    field public static final int FLAG_HAS_ICON_FILE = 8; // 0x8
    field public static final int FLAG_HAS_ICON_RES = 4; // 0x4
    field public static final int FLAG_KEY_FIELDS_ONLY = 16; // 0x10
    field public static final int FLAG_PINNED = 2; // 0x2
  }

  public static class ShortcutInfo.Builder {
    ctor public ShortcutInfo.Builder(android.content.Context);
    method public android.content.pm.ShortcutInfo build();
    method public android.content.pm.ShortcutInfo.Builder setActivityComponent(android.content.ComponentName);
    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
    method public android.content.pm.ShortcutInfo.Builder setId(java.lang.String);
    method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent);
    method public android.content.pm.ShortcutInfo.Builder setTitle(java.lang.String);
    method public android.content.pm.ShortcutInfo.Builder setWeight(int);
  }

  public class ShortcutManager {
    method public boolean addDynamicShortcut(android.content.pm.ShortcutInfo);
    method public void deleteAllDynamicShortcuts();
    method public void deleteDynamicShortcut(java.lang.String);
    method public java.util.List<android.content.pm.ShortcutInfo> getDynamicShortcuts();
    method public int getIconMaxDimensions();
    method public int getMaxDynamicShortcutCount();
    method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
    method public long getRateLimitResetTime();
    method public int getRemainingCallCount();
    method public boolean setDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
    method public boolean updateShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
  }

  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 extends android.content.res.ComplexColor 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 getColorForState(int[], int);
    method public int getDefaultColor();
    method public boolean isOpaque();
    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 abstract class ComplexColor {
    ctor public ComplexColor();
    method public int getChangingConfigurations();
    method public abstract int getDefaultColor();
    method public boolean isStateful();
  }

  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 android.util.LocaleList getLocales();
    method public boolean isLayoutSizeAtLeast(int);
    method public boolean isScreenRound();
    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 setLocales(android.util.LocaleList);
    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_ROUND_MASK = 768; // 0x300
    field public static final int SCREENLAYOUT_ROUND_NO = 256; // 0x100
    field public static final int SCREENLAYOUT_ROUND_UNDEFINED = 0; // 0x0
    field public static final int SCREENLAYOUT_ROUND_YES = 512; // 0x200
    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 deprecated 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 GradientColor extends android.content.res.ComplexColor {
    method public static android.content.res.GradientColor createFromXml(android.content.res.Resources, android.content.res.XmlResourceParser, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public int getDefaultColor();
  }

  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 android.content.res.ComplexColor loadComplexColor(android.util.TypedValue, int, android.content.res.Resources.Theme);
    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);
    ctor public Resources.NotFoundException(java.lang.String, java.lang.Exception);
  }

  public final class Resources.Theme {
    method public void applyStyle(int, boolean);
    method public void dump(int, java.lang.String, java.lang.String);
    method public int getChangingConfigurations();
    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 android.content.res.ComplexColor getComplexColor(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();
  }

  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 void validateSql(java.lang.String, android.os.CancellationSignal);
    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 implements java.lang.AutoCloseable {
    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 void close();
    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 deprecated 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 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 deprecated void requestCancelDecode();
    field public android.graphics.Bitmap inBitmap;
    field public int inDensity;
    field public deprecated boolean inDither;
    field public deprecated boolean inInputShareable;
    field public boolean inJustDecodeBounds;
    field public boolean inMutable;
    field public deprecated 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 deprecated 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 drawTextRun(char[], int, int, int, int, float, float, boolean, android.graphics.Paint);
    method public void drawTextRun(java.lang.CharSequence, int, int, int, int, float, float, boolean, 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 float luminance(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 FLEX_RGBA_8888 = 42; // 0x2a
    field public static final int FLEX_RGB_888 = 41; // 0x29
    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_PRIVATE = 36; // 0x24
    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 YUV_422_888 = 39; // 0x27
    field public static final int YUV_444_888 = 40; // 0x28
    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 float getRadius();
    method public boolean getRect(android.graphics.Rect);
    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 int getOffsetForAdvance(char[], int, int, int, int, boolean, float);
    method public int getOffsetForAdvance(java.lang.CharSequence, int, int, int, int, boolean, float);
    method public android.graphics.PathEffect getPathEffect();
    method public deprecated android.graphics.Rasterizer getRasterizer();
    method public float getRunAdvance(char[], int, int, int, int, boolean, int);
    method public float getRunAdvance(java.lang.CharSequence, int, int, int, int, boolean, int);
    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 android.util.LocaleList getTextLocales();
    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 setTextLocales(android.util.LocaleList);
    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 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 abstract interface Animatable2 implements android.graphics.drawable.Animatable {
    method public abstract void clearAnimationCallbacks();
    method public abstract void registerAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
    method public abstract boolean unregisterAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
  }

  public static abstract class Animatable2.AnimationCallback {
    ctor public Animatable2.AnimationCallback();
    method public void onAnimationEnd(android.graphics.drawable.Drawable);
    method public void onAnimationStart(android.graphics.drawable.Drawable);
  }

  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.Animatable2 {
    ctor public AnimatedVectorDrawable();
    method public void clearAnimationCallbacks();
    method public void draw(android.graphics.Canvas);
    method public int getOpacity();
    method public boolean isRunning();
    method public void registerAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
    method public void reset();
    method public void setAlpha(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void start();
    method public void stop();
    method public boolean unregisterAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
  }

  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 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 isFilterBitmap();
    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 onLayoutDirectionChanged(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 deprecated 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 android.content.res.ColorStateList getColor();
    method public int[] getColors();
    method public float[] getCornerRadii();
    method public float getCornerRadius();
    method public float getGradientCenterX();
    method public float getGradientCenterY();
    method public float getGradientRadius();
    method public int getGradientType();
    method public int getOpacity();
    method public android.graphics.drawable.GradientDrawable.Orientation getOrientation();
    method public int getShape();
    method public boolean getUseLevel();
    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 final class Icon implements android.os.Parcelable {
    method public static android.graphics.drawable.Icon createWithBitmap(android.graphics.Bitmap);
    method public static android.graphics.drawable.Icon createWithContentUri(java.lang.String);
    method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri);
    method public static android.graphics.drawable.Icon createWithData(byte[], int, int);
    method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String);
    method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int);
    method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int);
    method public int describeContents();
    method public android.graphics.drawable.Drawable loadDrawable(android.content.Context);
    method public void loadDrawableAsync(android.content.Context, android.os.Message);
    method public void loadDrawableAsync(android.content.Context, android.graphics.drawable.Icon.OnDrawableLoadedListener, android.os.Handler);
    method public android.graphics.drawable.Icon setTint(int);
    method public android.graphics.drawable.Icon setTintList(android.content.res.ColorStateList);
    method public android.graphics.drawable.Icon setTintMode(android.graphics.PorterDuff.Mode);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.graphics.drawable.Icon> CREATOR;
  }

  public static abstract interface Icon.OnDrawableLoadedListener {
    method public abstract void onDrawableLoaded(android.graphics.drawable.Drawable);
  }

  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 int getBottomPadding();
    method public android.graphics.drawable.Drawable getDrawable(int);
    method public int getEndPadding();
    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 getLeftPadding();
    method public int getNumberOfLayers();
    method public int getOpacity();
    method public int getPaddingMode();
    method public int getRightPadding();
    method public int getStartPadding();
    method public int getTopPadding();
    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 setPadding(int, int, int, int);
    method public void setPaddingMode(int);
    method public void setPaddingRelative(int, int, int, int);
    method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
    field public static final int INSET_UNDEFINED = -2147483648; // 0x80000000
    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 deprecated java.lang.String ACTION_NEW_PICTURE = "android.hardware.action.NEW_PICTURE";
    field public static final deprecated java.lang.String ACTION_NEW_VIDEO = "android.hardware.action.NEW_VIDEO";
    field public static final int CAMERA_ERROR_EVICTED = 2; // 0x2
    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.util.UUID getUuid();
    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_BEAT = "android.sensor.heart_beat";
    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 java.lang.String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
    field public static final deprecated java.lang.String STRING_TYPE_ORIENTATION = "android.sensor.orientation";
    field public static final java.lang.String STRING_TYPE_POSE_6DOF = "android.sensor.pose_6dof";
    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_STATIONARY_DETECT = "android.sensor.stationary_detect";
    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_BEAT = 31; // 0x1f
    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 int TYPE_MOTION_DETECT = 30; // 0x1e
    field public static final deprecated int TYPE_ORIENTATION = 3; // 0x3
    field public static final int TYPE_POSE_6DOF = 28; // 0x1c
    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_STATIONARY_DETECT = 29; // 0x1d
    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 SensorAdditionalInfo {
    field public static final int TYPE_FRAME_BEGIN = 0; // 0x0
    field public static final int TYPE_FRAME_END = 1; // 0x1
    field public static final int TYPE_INTERNAL_TEMPERATURE = 65537; // 0x10001
    field public static final int TYPE_SAMPLING = 65540; // 0x10004
    field public static final int TYPE_SENSOR_PLACEMENT = 65539; // 0x10003
    field public static final int TYPE_UNTRACKED_DELAY = 65536; // 0x10000
    field public static final int TYPE_VEC3_CALIBRATION = 65538; // 0x10002
    field public final float[] floatValues;
    field public final int[] intValues;
    field public final android.hardware.Sensor sensor;
    field public final int serial;
    field public final int type;
  }

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

  public abstract class SensorEventCallback implements android.hardware.SensorEventListener2 {
    ctor public SensorEventCallback();
    method public void onAccuracyChanged(android.hardware.Sensor, int);
    method public void onFlushCompleted(android.hardware.Sensor);
    method public void onSensorAdditionalInfo(android.hardware.SensorAdditionalInfo);
    method public void onSensorChanged(android.hardware.SensorEvent);
  }

  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 java.util.List<android.hardware.Sensor> getDynamicSensorList(int);
    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 void registerDynamicSensorCallback(android.hardware.SensorManager.DynamicSensorConnectionCallback);
    method public void registerDynamicSensorCallback(android.hardware.SensorManager.DynamicSensorConnectionCallback, android.os.Handler);
    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 void unregisterDynamicSensorCallback(android.hardware.SensorManager.DynamicSensorConnectionCallback);
    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 static abstract class SensorManager.DynamicSensorConnectionCallback {
    ctor public SensorManager.DynamicSensorConnectionCallback();
    method public void onDynamicSensorConnected(android.hardware.Sensor);
    method public void onDynamicSensorDisconnected(android.hardware.Sensor);
  }

  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 android.view.Surface getInputSurface();
    method public abstract boolean isReprocessable();
    method public abstract void prepare(android.view.Surface) throws android.hardware.camera2.CameraAccessException;
    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 onCaptureBufferLost(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.view.Surface, long);
    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);
    method public void onSurfacePrepared(android.hardware.camera2.CameraCaptureSession, android.view.Surface);
  }

  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<android.util.Range<java.lang.Integer>> CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Boolean> DEPTH_DEPTH_IS_EXCLUSIVE;
    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<java.lang.Integer> REPROCESS_MAX_CAPTURE_STALL;
    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.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_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<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS;
    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<int[]> 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 CameraConstrainedHighSpeedCaptureSession extends android.hardware.camera2.CameraCaptureSession {
    ctor public CameraConstrainedHighSpeedCaptureSession();
    method public abstract java.util.List<android.hardware.camera2.CaptureRequest> createHighSpeedRequestList(android.hardware.camera2.CaptureRequest) throws android.hardware.camera2.CameraAccessException;
  }

  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 void createCaptureSessionByOutputConfiguration(java.util.List<android.hardware.camera2.params.OutputConfiguration>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract void createConstrainedHighSpeedCaptureSession(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract android.hardware.camera2.CaptureRequest.Builder createReprocessCaptureRequest(android.hardware.camera2.TotalCaptureResult) throws android.hardware.camera2.CameraAccessException;
    method public abstract void createReprocessableCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract void createReprocessableCaptureSessionWithConfigurations(android.hardware.camera2.params.InputConfiguration, java.util.List<android.hardware.camera2.params.OutputConfiguration>, 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 deprecated 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 EDGE_MODE_ZERO_SHUTTER_LAG = 3; // 0x3
    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_3 = 3; // 0x3
    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 NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4; // 0x4
    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_CONSTRAINED_HIGH_SPEED_VIDEO = 9; // 0x9
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8; // 0x8
    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_PRIVATE_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 boolean isReprocess();
    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_POST_RAW_SENSITIVITY_BOOST;
    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_POST_RAW_SENSITIVITY_BOOST;
    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<float[]> SENSOR_DYNAMIC_BLACK_LEVEL;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> SENSOR_DYNAMIC_WHITE_LEVEL;
    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 InputConfiguration {
    ctor public InputConfiguration(int, int, int);
    method public int getFormat();
    method public int getHeight();
    method public int getWidth();
  }

  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 OutputConfiguration implements android.os.Parcelable {
    ctor public OutputConfiguration(android.view.Surface);
    method public int describeContents();
    method public android.view.Surface getSurface();
    method public int getSurfaceSetId();
    method public void setSurfaceSetId(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.camera2.params.OutputConfiguration> CREATOR;
    field public static final int SURFACE_SET_ID_INVALID = -1; // 0xffffffff
  }

  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.Size[] getHighResolutionOutputSizes(int);
    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 class FingerprintManager {
    method public void authenticate(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.CancellationSignal, int, android.hardware.fingerprint.FingerprintManager.AuthenticationCallback, android.os.Handler);
    method public boolean hasEnrolledFingerprints();
    method public boolean isHardwareDetected();
    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_ERROR_CANCELED = 5; // 0x5
    field public static final int FINGERPRINT_ERROR_HW_UNAVAILABLE = 1; // 0x1
    field public static final int FINGERPRINT_ERROR_LOCKOUT = 7; // 0x7
    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
  }

  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 class FingerprintManager.AuthenticationResult {
    method public android.hardware.fingerprint.FingerprintManager.CryptoObject getCryptoObject();
  }

  public static final class FingerprintManager.CryptoObject {
    ctor public FingerprintManager.CryptoObject(java.security.Signature);
    ctor public FingerprintManager.CryptoObject(javax.crypto.Cipher);
    ctor public FingerprintManager.CryptoObject(javax.crypto.Mac);
    method public javax.crypto.Cipher getCipher();
    method public javax.crypto.Mac getMac();
    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 java.lang.String getVersion();
    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.icu.lang {

  public final class UCharacter implements android.icu.lang.UCharacterEnums.ECharacterCategory android.icu.lang.UCharacterEnums.ECharacterDirection {
    method public static int charCount(int);
    method public static final int codePointAt(java.lang.CharSequence, int);
    method public static final int codePointAt(char[], int);
    method public static final int codePointAt(char[], int, int);
    method public static final int codePointBefore(java.lang.CharSequence, int);
    method public static final int codePointBefore(char[], int);
    method public static final 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 digit(int, int);
    method public static int digit(int);
    method public static int foldCase(int, boolean);
    method public static java.lang.String foldCase(java.lang.String, boolean);
    method public static int foldCase(int, int);
    method public static final java.lang.String foldCase(java.lang.String, int);
    method public static char forDigit(int, int);
    method public static android.icu.util.VersionInfo getAge(int);
    method public static int getBidiPairedBracket(int);
    method public static int getCharFromExtendedName(java.lang.String);
    method public static int getCharFromName(java.lang.String);
    method public static int getCharFromNameAlias(java.lang.String);
    method public static int getCodePoint(char, char);
    method public static int getCodePoint(char);
    method public static int getCombiningClass(int);
    method public static int getDirection(int);
    method public static byte getDirectionality(int);
    method public static java.lang.String getExtendedName(int);
    method public static android.icu.util.ValueIterator getExtendedNameIterator();
    method public static int getHanNumericValue(int);
    method public static int getIntPropertyMaxValue(int);
    method public static int getIntPropertyMinValue(int);
    method public static int getIntPropertyValue(int, int);
    method public static int getMirror(int);
    method public static java.lang.String getName(int);
    method public static java.lang.String getName(java.lang.String, java.lang.String);
    method public static java.lang.String getNameAlias(int);
    method public static android.icu.util.ValueIterator getNameIterator();
    method public static int getNumericValue(int);
    method public static int getPropertyEnum(java.lang.CharSequence);
    method public static java.lang.String getPropertyName(int, int);
    method public static int getPropertyValueEnum(int, java.lang.CharSequence);
    method public static java.lang.String getPropertyValueName(int, int, int);
    method public static int getType(int);
    method public static android.icu.util.RangeValueIterator getTypeIterator();
    method public static double getUnicodeNumericValue(int);
    method public static android.icu.util.VersionInfo getUnicodeVersion();
    method public static boolean hasBinaryProperty(int, int);
    method public static boolean isBMP(int);
    method public static boolean isBaseForm(int);
    method public static boolean isDefined(int);
    method public static boolean isDigit(int);
    method public static boolean isHighSurrogate(char);
    method public static boolean isISOControl(int);
    method public static boolean isIdentifierIgnorable(int);
    method public static boolean isJavaIdentifierPart(int);
    method public static boolean isJavaIdentifierStart(int);
    method public static boolean isLegal(int);
    method public static boolean isLegal(java.lang.String);
    method public static boolean isLetter(int);
    method public static boolean isLetterOrDigit(int);
    method public static boolean isLowSurrogate(char);
    method public static boolean isLowerCase(int);
    method public static boolean isMirrored(int);
    method public static boolean isPrintable(int);
    method public static boolean isSpaceChar(int);
    method public static boolean isSupplementary(int);
    method public static final boolean isSupplementaryCodePoint(int);
    method public static final boolean isSurrogatePair(char, char);
    method public static boolean isTitleCase(int);
    method public static boolean isUAlphabetic(int);
    method public static boolean isULowercase(int);
    method public static boolean isUUppercase(int);
    method public static boolean isUWhiteSpace(int);
    method public static boolean isUnicodeIdentifierPart(int);
    method public static boolean isUnicodeIdentifierStart(int);
    method public static boolean isUpperCase(int);
    method public static final boolean isValidCodePoint(int);
    method public static boolean isWhitespace(int);
    method public static int offsetByCodePoints(java.lang.CharSequence, int, int);
    method public static int offsetByCodePoints(char[], int, int, int, int);
    method public static final int toChars(int, char[], int);
    method public static final char[] toChars(int);
    method public static final int toCodePoint(char, char);
    method public static int toLowerCase(int);
    method public static java.lang.String toLowerCase(java.lang.String);
    method public static java.lang.String toLowerCase(java.util.Locale, java.lang.String);
    method public static java.lang.String toLowerCase(android.icu.util.ULocale, java.lang.String);
    method public static java.lang.String toString(int);
    method public static int toTitleCase(int);
    method public static java.lang.String toTitleCase(java.lang.String, android.icu.text.BreakIterator);
    method public static java.lang.String toTitleCase(java.util.Locale, java.lang.String, android.icu.text.BreakIterator);
    method public static java.lang.String toTitleCase(android.icu.util.ULocale, java.lang.String, android.icu.text.BreakIterator);
    method public static java.lang.String toTitleCase(android.icu.util.ULocale, java.lang.String, android.icu.text.BreakIterator, int);
    method public static java.lang.String toTitleCase(java.util.Locale, java.lang.String, android.icu.text.BreakIterator, int);
    method public static int toUpperCase(int);
    method public static java.lang.String toUpperCase(java.lang.String);
    method public static java.lang.String toUpperCase(java.util.Locale, java.lang.String);
    method public static java.lang.String toUpperCase(android.icu.util.ULocale, java.lang.String);
    field public static final int FOLD_CASE_DEFAULT = 0; // 0x0
    field public static final int FOLD_CASE_EXCLUDE_SPECIAL_I = 1; // 0x1
    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 int MAX_VALUE = 1114111; // 0x10ffff
    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 int MIN_VALUE = 0; // 0x0
    field public static final double NO_NUMERIC_VALUE = -1.23456789E8;
    field public static final int REPLACEMENT_CHAR = 65533; // 0xfffd
    field public static final int SUPPLEMENTARY_MIN_VALUE = 65536; // 0x10000
    field public static final int TITLECASE_NO_BREAK_ADJUSTMENT = 512; // 0x200
    field public static final int TITLECASE_NO_LOWERCASE = 256; // 0x100
  }

  public static abstract interface UCharacter.BidiPairedBracketType {
    field public static final int CLOSE = 2; // 0x2
    field public static final int COUNT = 3; // 0x3
    field public static final int NONE = 0; // 0x0
    field public static final int OPEN = 1; // 0x1
  }

  public static abstract interface UCharacter.DecompositionType {
    field public static final int CANONICAL = 1; // 0x1
    field public static final int CIRCLE = 3; // 0x3
    field public static final int COMPAT = 2; // 0x2
    field public static final int COUNT = 18; // 0x12
    field public static final int FINAL = 4; // 0x4
    field public static final int FONT = 5; // 0x5
    field public static final int FRACTION = 6; // 0x6
    field public static final int INITIAL = 7; // 0x7
    field public static final int ISOLATED = 8; // 0x8
    field public static final int MEDIAL = 9; // 0x9
    field public static final int NARROW = 10; // 0xa
    field public static final int NOBREAK = 11; // 0xb
    field public static final int NONE = 0; // 0x0
    field public static final int SMALL = 12; // 0xc
    field public static final int SQUARE = 13; // 0xd
    field public static final int SUB = 14; // 0xe
    field public static final int SUPER = 15; // 0xf
    field public static final int VERTICAL = 16; // 0x10
    field public static final int WIDE = 17; // 0x11
  }

  public static abstract interface UCharacter.EastAsianWidth {
    field public static final int AMBIGUOUS = 1; // 0x1
    field public static final int COUNT = 6; // 0x6
    field public static final int FULLWIDTH = 3; // 0x3
    field public static final int HALFWIDTH = 2; // 0x2
    field public static final int NARROW = 4; // 0x4
    field public static final int NEUTRAL = 0; // 0x0
    field public static final int WIDE = 5; // 0x5
  }

  public static abstract interface UCharacter.GraphemeClusterBreak {
    field public static final int CONTROL = 1; // 0x1
    field public static final int COUNT = 13; // 0xd
    field public static final int CR = 2; // 0x2
    field public static final int EXTEND = 3; // 0x3
    field public static final int L = 4; // 0x4
    field public static final int LF = 5; // 0x5
    field public static final int LV = 6; // 0x6
    field public static final int LVT = 7; // 0x7
    field public static final int OTHER = 0; // 0x0
    field public static final int PREPEND = 11; // 0xb
    field public static final int REGIONAL_INDICATOR = 12; // 0xc
    field public static final int SPACING_MARK = 10; // 0xa
    field public static final int T = 8; // 0x8
    field public static final int V = 9; // 0x9
  }

  public static abstract interface UCharacter.HangulSyllableType {
    field public static final int COUNT = 6; // 0x6
    field public static final int LEADING_JAMO = 1; // 0x1
    field public static final int LVT_SYLLABLE = 5; // 0x5
    field public static final int LV_SYLLABLE = 4; // 0x4
    field public static final int NOT_APPLICABLE = 0; // 0x0
    field public static final int TRAILING_JAMO = 3; // 0x3
    field public static final int VOWEL_JAMO = 2; // 0x2
  }

  public static abstract interface UCharacter.JoiningGroup {
    field public static final int AIN = 1; // 0x1
    field public static final int ALAPH = 2; // 0x2
    field public static final int ALEF = 3; // 0x3
    field public static final int BEH = 4; // 0x4
    field public static final int BETH = 5; // 0x5
    field public static final int BURUSHASKI_YEH_BARREE = 54; // 0x36
    field public static final int COUNT = 86; // 0x56
    field public static final int DAL = 6; // 0x6
    field public static final int DALATH_RISH = 7; // 0x7
    field public static final int E = 8; // 0x8
    field public static final int FARSI_YEH = 55; // 0x37
    field public static final int FE = 51; // 0x33
    field public static final int FEH = 9; // 0x9
    field public static final int FINAL_SEMKATH = 10; // 0xa
    field public static final int GAF = 11; // 0xb
    field public static final int GAMAL = 12; // 0xc
    field public static final int HAH = 13; // 0xd
    field public static final int HAMZA_ON_HEH_GOAL = 14; // 0xe
    field public static final int HE = 15; // 0xf
    field public static final int HEH = 16; // 0x10
    field public static final int HEH_GOAL = 17; // 0x11
    field public static final int HETH = 18; // 0x12
    field public static final int KAF = 19; // 0x13
    field public static final int KAPH = 20; // 0x14
    field public static final int KHAPH = 52; // 0x34
    field public static final int KNOTTED_HEH = 21; // 0x15
    field public static final int LAM = 22; // 0x16
    field public static final int LAMADH = 23; // 0x17
    field public static final int MANICHAEAN_ALEPH = 58; // 0x3a
    field public static final int MANICHAEAN_AYIN = 59; // 0x3b
    field public static final int MANICHAEAN_BETH = 60; // 0x3c
    field public static final int MANICHAEAN_DALETH = 61; // 0x3d
    field public static final int MANICHAEAN_DHAMEDH = 62; // 0x3e
    field public static final int MANICHAEAN_FIVE = 63; // 0x3f
    field public static final int MANICHAEAN_GIMEL = 64; // 0x40
    field public static final int MANICHAEAN_HETH = 65; // 0x41
    field public static final int MANICHAEAN_HUNDRED = 66; // 0x42
    field public static final int MANICHAEAN_KAPH = 67; // 0x43
    field public static final int MANICHAEAN_LAMEDH = 68; // 0x44
    field public static final int MANICHAEAN_MEM = 69; // 0x45
    field public static final int MANICHAEAN_NUN = 70; // 0x46
    field public static final int MANICHAEAN_ONE = 71; // 0x47
    field public static final int MANICHAEAN_PE = 72; // 0x48
    field public static final int MANICHAEAN_QOPH = 73; // 0x49
    field public static final int MANICHAEAN_RESH = 74; // 0x4a
    field public static final int MANICHAEAN_SADHE = 75; // 0x4b
    field public static final int MANICHAEAN_SAMEKH = 76; // 0x4c
    field public static final int MANICHAEAN_TAW = 77; // 0x4d
    field public static final int MANICHAEAN_TEN = 78; // 0x4e
    field public static final int MANICHAEAN_TETH = 79; // 0x4f
    field public static final int MANICHAEAN_THAMEDH = 80; // 0x50
    field public static final int MANICHAEAN_TWENTY = 81; // 0x51
    field public static final int MANICHAEAN_WAW = 82; // 0x52
    field public static final int MANICHAEAN_YODH = 83; // 0x53
    field public static final int MANICHAEAN_ZAYIN = 84; // 0x54
    field public static final int MEEM = 24; // 0x18
    field public static final int MIM = 25; // 0x19
    field public static final int NOON = 26; // 0x1a
    field public static final int NO_JOINING_GROUP = 0; // 0x0
    field public static final int NUN = 27; // 0x1b
    field public static final int NYA = 56; // 0x38
    field public static final int PE = 28; // 0x1c
    field public static final int QAF = 29; // 0x1d
    field public static final int QAPH = 30; // 0x1e
    field public static final int REH = 31; // 0x1f
    field public static final int REVERSED_PE = 32; // 0x20
    field public static final int ROHINGYA_YEH = 57; // 0x39
    field public static final int SAD = 33; // 0x21
    field public static final int SADHE = 34; // 0x22
    field public static final int SEEN = 35; // 0x23
    field public static final int SEMKATH = 36; // 0x24
    field public static final int SHIN = 37; // 0x25
    field public static final int STRAIGHT_WAW = 85; // 0x55
    field public static final int SWASH_KAF = 38; // 0x26
    field public static final int SYRIAC_WAW = 39; // 0x27
    field public static final int TAH = 40; // 0x28
    field public static final int TAW = 41; // 0x29
    field public static final int TEH_MARBUTA = 42; // 0x2a
    field public static final int TEH_MARBUTA_GOAL = 14; // 0xe
    field public static final int TETH = 43; // 0x2b
    field public static final int WAW = 44; // 0x2c
    field public static final int YEH = 45; // 0x2d
    field public static final int YEH_BARREE = 46; // 0x2e
    field public static final int YEH_WITH_TAIL = 47; // 0x2f
    field public static final int YUDH = 48; // 0x30
    field public static final int YUDH_HE = 49; // 0x31
    field public static final int ZAIN = 50; // 0x32
    field public static final int ZHAIN = 53; // 0x35
  }

  public static abstract interface UCharacter.JoiningType {
    field public static final int COUNT = 6; // 0x6
    field public static final int DUAL_JOINING = 2; // 0x2
    field public static final int JOIN_CAUSING = 1; // 0x1
    field public static final int LEFT_JOINING = 3; // 0x3
    field public static final int NON_JOINING = 0; // 0x0
    field public static final int RIGHT_JOINING = 4; // 0x4
    field public static final int TRANSPARENT = 5; // 0x5
  }

  public static abstract interface UCharacter.LineBreak {
    field public static final int ALPHABETIC = 2; // 0x2
    field public static final int AMBIGUOUS = 1; // 0x1
    field public static final int BREAK_AFTER = 4; // 0x4
    field public static final int BREAK_BEFORE = 5; // 0x5
    field public static final int BREAK_BOTH = 3; // 0x3
    field public static final int BREAK_SYMBOLS = 27; // 0x1b
    field public static final int CARRIAGE_RETURN = 10; // 0xa
    field public static final int CLOSE_PARENTHESIS = 36; // 0x24
    field public static final int CLOSE_PUNCTUATION = 8; // 0x8
    field public static final int COMBINING_MARK = 9; // 0x9
    field public static final int COMPLEX_CONTEXT = 24; // 0x18
    field public static final int CONDITIONAL_JAPANESE_STARTER = 37; // 0x25
    field public static final int CONTINGENT_BREAK = 7; // 0x7
    field public static final int COUNT = 40; // 0x28
    field public static final int EXCLAMATION = 11; // 0xb
    field public static final int GLUE = 12; // 0xc
    field public static final int H2 = 31; // 0x1f
    field public static final int H3 = 32; // 0x20
    field public static final int HEBREW_LETTER = 38; // 0x26
    field public static final int HYPHEN = 13; // 0xd
    field public static final int IDEOGRAPHIC = 14; // 0xe
    field public static final int INFIX_NUMERIC = 16; // 0x10
    field public static final int INSEPARABLE = 15; // 0xf
    field public static final int INSEPERABLE = 15; // 0xf
    field public static final int JL = 33; // 0x21
    field public static final int JT = 34; // 0x22
    field public static final int JV = 35; // 0x23
    field public static final int LINE_FEED = 17; // 0x11
    field public static final int MANDATORY_BREAK = 6; // 0x6
    field public static final int NEXT_LINE = 29; // 0x1d
    field public static final int NONSTARTER = 18; // 0x12
    field public static final int NUMERIC = 19; // 0x13
    field public static final int OPEN_PUNCTUATION = 20; // 0x14
    field public static final int POSTFIX_NUMERIC = 21; // 0x15
    field public static final int PREFIX_NUMERIC = 22; // 0x16
    field public static final int QUOTATION = 23; // 0x17
    field public static final int REGIONAL_INDICATOR = 39; // 0x27
    field public static final int SPACE = 26; // 0x1a
    field public static final int SURROGATE = 25; // 0x19
    field public static final int UNKNOWN = 0; // 0x0
    field public static final int WORD_JOINER = 30; // 0x1e
    field public static final int ZWSPACE = 28; // 0x1c
  }

  public static abstract interface UCharacter.NumericType {
    field public static final int COUNT = 4; // 0x4
    field public static final int DECIMAL = 1; // 0x1
    field public static final int DIGIT = 2; // 0x2
    field public static final int NONE = 0; // 0x0
    field public static final int NUMERIC = 3; // 0x3
  }

  public static abstract interface UCharacter.SentenceBreak {
    field public static final int ATERM = 1; // 0x1
    field public static final int CLOSE = 2; // 0x2
    field public static final int COUNT = 15; // 0xf
    field public static final int CR = 11; // 0xb
    field public static final int EXTEND = 12; // 0xc
    field public static final int FORMAT = 3; // 0x3
    field public static final int LF = 13; // 0xd
    field public static final int LOWER = 4; // 0x4
    field public static final int NUMERIC = 5; // 0x5
    field public static final int OLETTER = 6; // 0x6
    field public static final int OTHER = 0; // 0x0
    field public static final int SCONTINUE = 14; // 0xe
    field public static final int SEP = 7; // 0x7
    field public static final int SP = 8; // 0x8
    field public static final int STERM = 9; // 0x9
    field public static final int UPPER = 10; // 0xa
  }

  public static final class UCharacter.UnicodeBlock extends java.lang.Character.Subset {
    method public static final android.icu.lang.UCharacter.UnicodeBlock forName(java.lang.String);
    method public int getID();
    method public static android.icu.lang.UCharacter.UnicodeBlock getInstance(int);
    method public static android.icu.lang.UCharacter.UnicodeBlock of(int);
    field public static final android.icu.lang.UCharacter.UnicodeBlock AEGEAN_NUMBERS;
    field public static final int AEGEAN_NUMBERS_ID = 119; // 0x77
    field public static final android.icu.lang.UCharacter.UnicodeBlock AHOM;
    field public static final int AHOM_ID = 253; // 0xfd
    field public static final android.icu.lang.UCharacter.UnicodeBlock ALCHEMICAL_SYMBOLS;
    field public static final int ALCHEMICAL_SYMBOLS_ID = 208; // 0xd0
    field public static final android.icu.lang.UCharacter.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS;
    field public static final int ALPHABETIC_PRESENTATION_FORMS_ID = 80; // 0x50
    field public static final android.icu.lang.UCharacter.UnicodeBlock ANATOLIAN_HIEROGLYPHS;
    field public static final int ANATOLIAN_HIEROGLYPHS_ID = 254; // 0xfe
    field public static final android.icu.lang.UCharacter.UnicodeBlock ANCIENT_GREEK_MUSICAL_NOTATION;
    field public static final int ANCIENT_GREEK_MUSICAL_NOTATION_ID = 126; // 0x7e
    field public static final android.icu.lang.UCharacter.UnicodeBlock ANCIENT_GREEK_NUMBERS;
    field public static final int ANCIENT_GREEK_NUMBERS_ID = 127; // 0x7f
    field public static final android.icu.lang.UCharacter.UnicodeBlock ANCIENT_SYMBOLS;
    field public static final int ANCIENT_SYMBOLS_ID = 165; // 0xa5
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC;
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_EXTENDED_A;
    field public static final int ARABIC_EXTENDED_A_ID = 210; // 0xd2
    field public static final int ARABIC_ID = 12; // 0xc
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS;
    field public static final int ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS_ID = 211; // 0xd3
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_PRESENTATION_FORMS_A;
    field public static final int ARABIC_PRESENTATION_FORMS_A_ID = 81; // 0x51
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_PRESENTATION_FORMS_B;
    field public static final int ARABIC_PRESENTATION_FORMS_B_ID = 85; // 0x55
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARABIC_SUPPLEMENT;
    field public static final int ARABIC_SUPPLEMENT_ID = 128; // 0x80
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARMENIAN;
    field public static final int ARMENIAN_ID = 10; // 0xa
    field public static final android.icu.lang.UCharacter.UnicodeBlock ARROWS;
    field public static final int ARROWS_ID = 46; // 0x2e
    field public static final android.icu.lang.UCharacter.UnicodeBlock AVESTAN;
    field public static final int AVESTAN_ID = 188; // 0xbc
    field public static final android.icu.lang.UCharacter.UnicodeBlock BALINESE;
    field public static final int BALINESE_ID = 147; // 0x93
    field public static final android.icu.lang.UCharacter.UnicodeBlock BAMUM;
    field public static final int BAMUM_ID = 177; // 0xb1
    field public static final android.icu.lang.UCharacter.UnicodeBlock BAMUM_SUPPLEMENT;
    field public static final int BAMUM_SUPPLEMENT_ID = 202; // 0xca
    field public static final android.icu.lang.UCharacter.UnicodeBlock BASIC_LATIN;
    field public static final int BASIC_LATIN_ID = 1; // 0x1
    field public static final android.icu.lang.UCharacter.UnicodeBlock BASSA_VAH;
    field public static final int BASSA_VAH_ID = 221; // 0xdd
    field public static final android.icu.lang.UCharacter.UnicodeBlock BATAK;
    field public static final int BATAK_ID = 199; // 0xc7
    field public static final android.icu.lang.UCharacter.UnicodeBlock BENGALI;
    field public static final int BENGALI_ID = 16; // 0x10
    field public static final android.icu.lang.UCharacter.UnicodeBlock BLOCK_ELEMENTS;
    field public static final int BLOCK_ELEMENTS_ID = 53; // 0x35
    field public static final android.icu.lang.UCharacter.UnicodeBlock BOPOMOFO;
    field public static final android.icu.lang.UCharacter.UnicodeBlock BOPOMOFO_EXTENDED;
    field public static final int BOPOMOFO_EXTENDED_ID = 67; // 0x43
    field public static final int BOPOMOFO_ID = 64; // 0x40
    field public static final android.icu.lang.UCharacter.UnicodeBlock BOX_DRAWING;
    field public static final int BOX_DRAWING_ID = 52; // 0x34
    field public static final android.icu.lang.UCharacter.UnicodeBlock BRAHMI;
    field public static final int BRAHMI_ID = 201; // 0xc9
    field public static final android.icu.lang.UCharacter.UnicodeBlock BRAILLE_PATTERNS;
    field public static final int BRAILLE_PATTERNS_ID = 57; // 0x39
    field public static final android.icu.lang.UCharacter.UnicodeBlock BUGINESE;
    field public static final int BUGINESE_ID = 129; // 0x81
    field public static final android.icu.lang.UCharacter.UnicodeBlock BUHID;
    field public static final int BUHID_ID = 100; // 0x64
    field public static final android.icu.lang.UCharacter.UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS;
    field public static final int BYZANTINE_MUSICAL_SYMBOLS_ID = 91; // 0x5b
    field public static final android.icu.lang.UCharacter.UnicodeBlock CARIAN;
    field public static final int CARIAN_ID = 168; // 0xa8
    field public static final android.icu.lang.UCharacter.UnicodeBlock CAUCASIAN_ALBANIAN;
    field public static final int CAUCASIAN_ALBANIAN_ID = 222; // 0xde
    field public static final android.icu.lang.UCharacter.UnicodeBlock CHAKMA;
    field public static final int CHAKMA_ID = 212; // 0xd4
    field public static final android.icu.lang.UCharacter.UnicodeBlock CHAM;
    field public static final int CHAM_ID = 164; // 0xa4
    field public static final android.icu.lang.UCharacter.UnicodeBlock CHEROKEE;
    field public static final int CHEROKEE_ID = 32; // 0x20
    field public static final android.icu.lang.UCharacter.UnicodeBlock CHEROKEE_SUPPLEMENT;
    field public static final int CHEROKEE_SUPPLEMENT_ID = 255; // 0xff
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY;
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY_FORMS;
    field public static final int CJK_COMPATIBILITY_FORMS_ID = 83; // 0x53
    field public static final int CJK_COMPATIBILITY_ID = 69; // 0x45
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS;
    field public static final int CJK_COMPATIBILITY_IDEOGRAPHS_ID = 79; // 0x4f
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT;
    field public static final int CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT_ID = 95; // 0x5f
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_RADICALS_SUPPLEMENT;
    field public static final int CJK_RADICALS_SUPPLEMENT_ID = 58; // 0x3a
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_STROKES;
    field public static final int CJK_STROKES_ID = 130; // 0x82
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION;
    field public static final int CJK_SYMBOLS_AND_PUNCTUATION_ID = 61; // 0x3d
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS;
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A;
    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A_ID = 70; // 0x46
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B;
    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B_ID = 94; // 0x5e
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C;
    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C_ID = 197; // 0xc5
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D;
    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D_ID = 209; // 0xd1
    field public static final android.icu.lang.UCharacter.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E;
    field public static final int CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E_ID = 256; // 0x100
    field public static final int CJK_UNIFIED_IDEOGRAPHS_ID = 71; // 0x47
    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_DIACRITICAL_MARKS;
    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_DIACRITICAL_MARKS_EXTENDED;
    field public static final int COMBINING_DIACRITICAL_MARKS_EXTENDED_ID = 224; // 0xe0
    field public static final int COMBINING_DIACRITICAL_MARKS_ID = 7; // 0x7
    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_DIACRITICAL_MARKS_SUPPLEMENT;
    field public static final int COMBINING_DIACRITICAL_MARKS_SUPPLEMENT_ID = 131; // 0x83
    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_HALF_MARKS;
    field public static final int COMBINING_HALF_MARKS_ID = 82; // 0x52
    field public static final android.icu.lang.UCharacter.UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS;
    field public static final int COMBINING_MARKS_FOR_SYMBOLS_ID = 43; // 0x2b
    field public static final android.icu.lang.UCharacter.UnicodeBlock COMMON_INDIC_NUMBER_FORMS;
    field public static final int COMMON_INDIC_NUMBER_FORMS_ID = 178; // 0xb2
    field public static final android.icu.lang.UCharacter.UnicodeBlock CONTROL_PICTURES;
    field public static final int CONTROL_PICTURES_ID = 49; // 0x31
    field public static final android.icu.lang.UCharacter.UnicodeBlock COPTIC;
    field public static final android.icu.lang.UCharacter.UnicodeBlock COPTIC_EPACT_NUMBERS;
    field public static final int COPTIC_EPACT_NUMBERS_ID = 223; // 0xdf
    field public static final int COPTIC_ID = 132; // 0x84
    field public static final int COUNT = 263; // 0x107
    field public static final android.icu.lang.UCharacter.UnicodeBlock COUNTING_ROD_NUMERALS;
    field public static final int COUNTING_ROD_NUMERALS_ID = 154; // 0x9a
    field public static final android.icu.lang.UCharacter.UnicodeBlock CUNEIFORM;
    field public static final int CUNEIFORM_ID = 152; // 0x98
    field public static final android.icu.lang.UCharacter.UnicodeBlock CUNEIFORM_NUMBERS_AND_PUNCTUATION;
    field public static final int CUNEIFORM_NUMBERS_AND_PUNCTUATION_ID = 153; // 0x99
    field public static final android.icu.lang.UCharacter.UnicodeBlock CURRENCY_SYMBOLS;
    field public static final int CURRENCY_SYMBOLS_ID = 42; // 0x2a
    field public static final android.icu.lang.UCharacter.UnicodeBlock CYPRIOT_SYLLABARY;
    field public static final int CYPRIOT_SYLLABARY_ID = 123; // 0x7b
    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC;
    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_EXTENDED_A;
    field public static final int CYRILLIC_EXTENDED_A_ID = 158; // 0x9e
    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_EXTENDED_B;
    field public static final int CYRILLIC_EXTENDED_B_ID = 160; // 0xa0
    field public static final int CYRILLIC_ID = 9; // 0x9
    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_SUPPLEMENT;
    field public static final android.icu.lang.UCharacter.UnicodeBlock CYRILLIC_SUPPLEMENTARY;
    field public static final int CYRILLIC_SUPPLEMENTARY_ID = 97; // 0x61
    field public static final int CYRILLIC_SUPPLEMENT_ID = 97; // 0x61
    field public static final android.icu.lang.UCharacter.UnicodeBlock DESERET;
    field public static final int DESERET_ID = 90; // 0x5a
    field public static final android.icu.lang.UCharacter.UnicodeBlock DEVANAGARI;
    field public static final android.icu.lang.UCharacter.UnicodeBlock DEVANAGARI_EXTENDED;
    field public static final int DEVANAGARI_EXTENDED_ID = 179; // 0xb3
    field public static final int DEVANAGARI_ID = 15; // 0xf
    field public static final android.icu.lang.UCharacter.UnicodeBlock DINGBATS;
    field public static final int DINGBATS_ID = 56; // 0x38
    field public static final android.icu.lang.UCharacter.UnicodeBlock DOMINO_TILES;
    field public static final int DOMINO_TILES_ID = 171; // 0xab
    field public static final android.icu.lang.UCharacter.UnicodeBlock DUPLOYAN;
    field public static final int DUPLOYAN_ID = 225; // 0xe1
    field public static final android.icu.lang.UCharacter.UnicodeBlock EARLY_DYNASTIC_CUNEIFORM;
    field public static final int EARLY_DYNASTIC_CUNEIFORM_ID = 257; // 0x101
    field public static final android.icu.lang.UCharacter.UnicodeBlock EGYPTIAN_HIEROGLYPHS;
    field public static final int EGYPTIAN_HIEROGLYPHS_ID = 194; // 0xc2
    field public static final android.icu.lang.UCharacter.UnicodeBlock ELBASAN;
    field public static final int ELBASAN_ID = 226; // 0xe2
    field public static final android.icu.lang.UCharacter.UnicodeBlock EMOTICONS;
    field public static final int EMOTICONS_ID = 206; // 0xce
    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_ALPHANUMERICS;
    field public static final int ENCLOSED_ALPHANUMERICS_ID = 51; // 0x33
    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_ALPHANUMERIC_SUPPLEMENT;
    field public static final int ENCLOSED_ALPHANUMERIC_SUPPLEMENT_ID = 195; // 0xc3
    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS;
    field public static final int ENCLOSED_CJK_LETTERS_AND_MONTHS_ID = 68; // 0x44
    field public static final android.icu.lang.UCharacter.UnicodeBlock ENCLOSED_IDEOGRAPHIC_SUPPLEMENT;
    field public static final int ENCLOSED_IDEOGRAPHIC_SUPPLEMENT_ID = 196; // 0xc4
    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC;
    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC_EXTENDED;
    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC_EXTENDED_A;
    field public static final int ETHIOPIC_EXTENDED_A_ID = 200; // 0xc8
    field public static final int ETHIOPIC_EXTENDED_ID = 133; // 0x85
    field public static final int ETHIOPIC_ID = 31; // 0x1f
    field public static final android.icu.lang.UCharacter.UnicodeBlock ETHIOPIC_SUPPLEMENT;
    field public static final int ETHIOPIC_SUPPLEMENT_ID = 134; // 0x86
    field public static final android.icu.lang.UCharacter.UnicodeBlock GENERAL_PUNCTUATION;
    field public static final int GENERAL_PUNCTUATION_ID = 40; // 0x28
    field public static final android.icu.lang.UCharacter.UnicodeBlock GEOMETRIC_SHAPES;
    field public static final android.icu.lang.UCharacter.UnicodeBlock GEOMETRIC_SHAPES_EXTENDED;
    field public static final int GEOMETRIC_SHAPES_EXTENDED_ID = 227; // 0xe3
    field public static final int GEOMETRIC_SHAPES_ID = 54; // 0x36
    field public static final android.icu.lang.UCharacter.UnicodeBlock GEORGIAN;
    field public static final int GEORGIAN_ID = 29; // 0x1d
    field public static final android.icu.lang.UCharacter.UnicodeBlock GEORGIAN_SUPPLEMENT;
    field public static final int GEORGIAN_SUPPLEMENT_ID = 135; // 0x87
    field public static final android.icu.lang.UCharacter.UnicodeBlock GLAGOLITIC;
    field public static final int GLAGOLITIC_ID = 136; // 0x88
    field public static final android.icu.lang.UCharacter.UnicodeBlock GOTHIC;
    field public static final int GOTHIC_ID = 89; // 0x59
    field public static final android.icu.lang.UCharacter.UnicodeBlock GRANTHA;
    field public static final int GRANTHA_ID = 228; // 0xe4
    field public static final android.icu.lang.UCharacter.UnicodeBlock GREEK;
    field public static final android.icu.lang.UCharacter.UnicodeBlock GREEK_EXTENDED;
    field public static final int GREEK_EXTENDED_ID = 39; // 0x27
    field public static final int GREEK_ID = 8; // 0x8
    field public static final android.icu.lang.UCharacter.UnicodeBlock GUJARATI;
    field public static final int GUJARATI_ID = 18; // 0x12
    field public static final android.icu.lang.UCharacter.UnicodeBlock GURMUKHI;
    field public static final int GURMUKHI_ID = 17; // 0x11
    field public static final android.icu.lang.UCharacter.UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS;
    field public static final int HALFWIDTH_AND_FULLWIDTH_FORMS_ID = 87; // 0x57
    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_COMPATIBILITY_JAMO;
    field public static final int HANGUL_COMPATIBILITY_JAMO_ID = 65; // 0x41
    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_JAMO;
    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_JAMO_EXTENDED_A;
    field public static final int HANGUL_JAMO_EXTENDED_A_ID = 180; // 0xb4
    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_JAMO_EXTENDED_B;
    field public static final int HANGUL_JAMO_EXTENDED_B_ID = 185; // 0xb9
    field public static final int HANGUL_JAMO_ID = 30; // 0x1e
    field public static final android.icu.lang.UCharacter.UnicodeBlock HANGUL_SYLLABLES;
    field public static final int HANGUL_SYLLABLES_ID = 74; // 0x4a
    field public static final android.icu.lang.UCharacter.UnicodeBlock HANUNOO;
    field public static final int HANUNOO_ID = 99; // 0x63
    field public static final android.icu.lang.UCharacter.UnicodeBlock HATRAN;
    field public static final int HATRAN_ID = 258; // 0x102
    field public static final android.icu.lang.UCharacter.UnicodeBlock HEBREW;
    field public static final int HEBREW_ID = 11; // 0xb
    field public static final android.icu.lang.UCharacter.UnicodeBlock HIGH_PRIVATE_USE_SURROGATES;
    field public static final int HIGH_PRIVATE_USE_SURROGATES_ID = 76; // 0x4c
    field public static final android.icu.lang.UCharacter.UnicodeBlock HIGH_SURROGATES;
    field public static final int HIGH_SURROGATES_ID = 75; // 0x4b
    field public static final android.icu.lang.UCharacter.UnicodeBlock HIRAGANA;
    field public static final int HIRAGANA_ID = 62; // 0x3e
    field public static final android.icu.lang.UCharacter.UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS;
    field public static final int IDEOGRAPHIC_DESCRIPTION_CHARACTERS_ID = 60; // 0x3c
    field public static final android.icu.lang.UCharacter.UnicodeBlock IMPERIAL_ARAMAIC;
    field public static final int IMPERIAL_ARAMAIC_ID = 186; // 0xba
    field public static final android.icu.lang.UCharacter.UnicodeBlock INSCRIPTIONAL_PAHLAVI;
    field public static final int INSCRIPTIONAL_PAHLAVI_ID = 190; // 0xbe
    field public static final android.icu.lang.UCharacter.UnicodeBlock INSCRIPTIONAL_PARTHIAN;
    field public static final int INSCRIPTIONAL_PARTHIAN_ID = 189; // 0xbd
    field public static final android.icu.lang.UCharacter.UnicodeBlock INVALID_CODE;
    field public static final int INVALID_CODE_ID = -1; // 0xffffffff
    field public static final android.icu.lang.UCharacter.UnicodeBlock IPA_EXTENSIONS;
    field public static final int IPA_EXTENSIONS_ID = 5; // 0x5
    field public static final android.icu.lang.UCharacter.UnicodeBlock JAVANESE;
    field public static final int JAVANESE_ID = 181; // 0xb5
    field public static final android.icu.lang.UCharacter.UnicodeBlock KAITHI;
    field public static final int KAITHI_ID = 193; // 0xc1
    field public static final android.icu.lang.UCharacter.UnicodeBlock KANA_SUPPLEMENT;
    field public static final int KANA_SUPPLEMENT_ID = 203; // 0xcb
    field public static final android.icu.lang.UCharacter.UnicodeBlock KANBUN;
    field public static final int KANBUN_ID = 66; // 0x42
    field public static final android.icu.lang.UCharacter.UnicodeBlock KANGXI_RADICALS;
    field public static final int KANGXI_RADICALS_ID = 59; // 0x3b
    field public static final android.icu.lang.UCharacter.UnicodeBlock KANNADA;
    field public static final int KANNADA_ID = 22; // 0x16
    field public static final android.icu.lang.UCharacter.UnicodeBlock KATAKANA;
    field public static final int KATAKANA_ID = 63; // 0x3f
    field public static final android.icu.lang.UCharacter.UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS;
    field public static final int KATAKANA_PHONETIC_EXTENSIONS_ID = 107; // 0x6b
    field public static final android.icu.lang.UCharacter.UnicodeBlock KAYAH_LI;
    field public static final int KAYAH_LI_ID = 162; // 0xa2
    field public static final android.icu.lang.UCharacter.UnicodeBlock KHAROSHTHI;
    field public static final int KHAROSHTHI_ID = 137; // 0x89
    field public static final android.icu.lang.UCharacter.UnicodeBlock KHMER;
    field public static final int KHMER_ID = 36; // 0x24
    field public static final android.icu.lang.UCharacter.UnicodeBlock KHMER_SYMBOLS;
    field public static final int KHMER_SYMBOLS_ID = 113; // 0x71
    field public static final android.icu.lang.UCharacter.UnicodeBlock KHOJKI;
    field public static final int KHOJKI_ID = 229; // 0xe5
    field public static final android.icu.lang.UCharacter.UnicodeBlock KHUDAWADI;
    field public static final int KHUDAWADI_ID = 230; // 0xe6
    field public static final android.icu.lang.UCharacter.UnicodeBlock LAO;
    field public static final int LAO_ID = 26; // 0x1a
    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_1_SUPPLEMENT;
    field public static final int LATIN_1_SUPPLEMENT_ID = 2; // 0x2
    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_A;
    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_ADDITIONAL;
    field public static final int LATIN_EXTENDED_ADDITIONAL_ID = 38; // 0x26
    field public static final int LATIN_EXTENDED_A_ID = 3; // 0x3
    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_B;
    field public static final int LATIN_EXTENDED_B_ID = 4; // 0x4
    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_C;
    field public static final int LATIN_EXTENDED_C_ID = 148; // 0x94
    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_D;
    field public static final int LATIN_EXTENDED_D_ID = 149; // 0x95
    field public static final android.icu.lang.UCharacter.UnicodeBlock LATIN_EXTENDED_E;
    field public static final int LATIN_EXTENDED_E_ID = 231; // 0xe7
    field public static final android.icu.lang.UCharacter.UnicodeBlock LEPCHA;
    field public static final int LEPCHA_ID = 156; // 0x9c
    field public static final android.icu.lang.UCharacter.UnicodeBlock LETTERLIKE_SYMBOLS;
    field public static final int LETTERLIKE_SYMBOLS_ID = 44; // 0x2c
    field public static final android.icu.lang.UCharacter.UnicodeBlock LIMBU;
    field public static final int LIMBU_ID = 111; // 0x6f
    field public static final android.icu.lang.UCharacter.UnicodeBlock LINEAR_A;
    field public static final int LINEAR_A_ID = 232; // 0xe8
    field public static final android.icu.lang.UCharacter.UnicodeBlock LINEAR_B_IDEOGRAMS;
    field public static final int LINEAR_B_IDEOGRAMS_ID = 118; // 0x76
    field public static final android.icu.lang.UCharacter.UnicodeBlock LINEAR_B_SYLLABARY;
    field public static final int LINEAR_B_SYLLABARY_ID = 117; // 0x75
    field public static final android.icu.lang.UCharacter.UnicodeBlock LISU;
    field public static final int LISU_ID = 176; // 0xb0
    field public static final android.icu.lang.UCharacter.UnicodeBlock LOW_SURROGATES;
    field public static final int LOW_SURROGATES_ID = 77; // 0x4d
    field public static final android.icu.lang.UCharacter.UnicodeBlock LYCIAN;
    field public static final int LYCIAN_ID = 167; // 0xa7
    field public static final android.icu.lang.UCharacter.UnicodeBlock LYDIAN;
    field public static final int LYDIAN_ID = 169; // 0xa9
    field public static final android.icu.lang.UCharacter.UnicodeBlock MAHAJANI;
    field public static final int MAHAJANI_ID = 233; // 0xe9
    field public static final android.icu.lang.UCharacter.UnicodeBlock MAHJONG_TILES;
    field public static final int MAHJONG_TILES_ID = 170; // 0xaa
    field public static final android.icu.lang.UCharacter.UnicodeBlock MALAYALAM;
    field public static final int MALAYALAM_ID = 23; // 0x17
    field public static final android.icu.lang.UCharacter.UnicodeBlock MANDAIC;
    field public static final int MANDAIC_ID = 198; // 0xc6
    field public static final android.icu.lang.UCharacter.UnicodeBlock MANICHAEAN;
    field public static final int MANICHAEAN_ID = 234; // 0xea
    field public static final android.icu.lang.UCharacter.UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS;
    field public static final int MATHEMATICAL_ALPHANUMERIC_SYMBOLS_ID = 93; // 0x5d
    field public static final android.icu.lang.UCharacter.UnicodeBlock MATHEMATICAL_OPERATORS;
    field public static final int MATHEMATICAL_OPERATORS_ID = 47; // 0x2f
    field public static final android.icu.lang.UCharacter.UnicodeBlock MEETEI_MAYEK;
    field public static final android.icu.lang.UCharacter.UnicodeBlock MEETEI_MAYEK_EXTENSIONS;
    field public static final int MEETEI_MAYEK_EXTENSIONS_ID = 213; // 0xd5
    field public static final int MEETEI_MAYEK_ID = 184; // 0xb8
    field public static final android.icu.lang.UCharacter.UnicodeBlock MENDE_KIKAKUI;
    field public static final int MENDE_KIKAKUI_ID = 235; // 0xeb
    field public static final android.icu.lang.UCharacter.UnicodeBlock MEROITIC_CURSIVE;
    field public static final int MEROITIC_CURSIVE_ID = 214; // 0xd6
    field public static final android.icu.lang.UCharacter.UnicodeBlock MEROITIC_HIEROGLYPHS;
    field public static final int MEROITIC_HIEROGLYPHS_ID = 215; // 0xd7
    field public static final android.icu.lang.UCharacter.UnicodeBlock MIAO;
    field public static final int MIAO_ID = 216; // 0xd8
    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A;
    field public static final int MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A_ID = 102; // 0x66
    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B;
    field public static final int MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B_ID = 105; // 0x69
    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_SYMBOLS;
    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS;
    field public static final int MISCELLANEOUS_SYMBOLS_AND_ARROWS_ID = 115; // 0x73
    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS;
    field public static final int MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS_ID = 205; // 0xcd
    field public static final int MISCELLANEOUS_SYMBOLS_ID = 55; // 0x37
    field public static final android.icu.lang.UCharacter.UnicodeBlock MISCELLANEOUS_TECHNICAL;
    field public static final int MISCELLANEOUS_TECHNICAL_ID = 48; // 0x30
    field public static final android.icu.lang.UCharacter.UnicodeBlock MODI;
    field public static final android.icu.lang.UCharacter.UnicodeBlock MODIFIER_TONE_LETTERS;
    field public static final int MODIFIER_TONE_LETTERS_ID = 138; // 0x8a
    field public static final int MODI_ID = 236; // 0xec
    field public static final android.icu.lang.UCharacter.UnicodeBlock MONGOLIAN;
    field public static final int MONGOLIAN_ID = 37; // 0x25
    field public static final android.icu.lang.UCharacter.UnicodeBlock MRO;
    field public static final int MRO_ID = 237; // 0xed
    field public static final android.icu.lang.UCharacter.UnicodeBlock MULTANI;
    field public static final int MULTANI_ID = 259; // 0x103
    field public static final android.icu.lang.UCharacter.UnicodeBlock MUSICAL_SYMBOLS;
    field public static final int MUSICAL_SYMBOLS_ID = 92; // 0x5c
    field public static final android.icu.lang.UCharacter.UnicodeBlock MYANMAR;
    field public static final android.icu.lang.UCharacter.UnicodeBlock MYANMAR_EXTENDED_A;
    field public static final int MYANMAR_EXTENDED_A_ID = 182; // 0xb6
    field public static final android.icu.lang.UCharacter.UnicodeBlock MYANMAR_EXTENDED_B;
    field public static final int MYANMAR_EXTENDED_B_ID = 238; // 0xee
    field public static final int MYANMAR_ID = 28; // 0x1c
    field public static final android.icu.lang.UCharacter.UnicodeBlock NABATAEAN;
    field public static final int NABATAEAN_ID = 239; // 0xef
    field public static final android.icu.lang.UCharacter.UnicodeBlock NEW_TAI_LUE;
    field public static final int NEW_TAI_LUE_ID = 139; // 0x8b
    field public static final android.icu.lang.UCharacter.UnicodeBlock NKO;
    field public static final int NKO_ID = 146; // 0x92
    field public static final android.icu.lang.UCharacter.UnicodeBlock NO_BLOCK;
    field public static final android.icu.lang.UCharacter.UnicodeBlock NUMBER_FORMS;
    field public static final int NUMBER_FORMS_ID = 45; // 0x2d
    field public static final android.icu.lang.UCharacter.UnicodeBlock OGHAM;
    field public static final int OGHAM_ID = 34; // 0x22
    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_HUNGARIAN;
    field public static final int OLD_HUNGARIAN_ID = 260; // 0x104
    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_ITALIC;
    field public static final int OLD_ITALIC_ID = 88; // 0x58
    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_NORTH_ARABIAN;
    field public static final int OLD_NORTH_ARABIAN_ID = 240; // 0xf0
    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_PERMIC;
    field public static final int OLD_PERMIC_ID = 241; // 0xf1
    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_PERSIAN;
    field public static final int OLD_PERSIAN_ID = 140; // 0x8c
    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_SOUTH_ARABIAN;
    field public static final int OLD_SOUTH_ARABIAN_ID = 187; // 0xbb
    field public static final android.icu.lang.UCharacter.UnicodeBlock OLD_TURKIC;
    field public static final int OLD_TURKIC_ID = 191; // 0xbf
    field public static final android.icu.lang.UCharacter.UnicodeBlock OL_CHIKI;
    field public static final int OL_CHIKI_ID = 157; // 0x9d
    field public static final android.icu.lang.UCharacter.UnicodeBlock OPTICAL_CHARACTER_RECOGNITION;
    field public static final int OPTICAL_CHARACTER_RECOGNITION_ID = 50; // 0x32
    field public static final android.icu.lang.UCharacter.UnicodeBlock ORIYA;
    field public static final int ORIYA_ID = 19; // 0x13
    field public static final android.icu.lang.UCharacter.UnicodeBlock ORNAMENTAL_DINGBATS;
    field public static final int ORNAMENTAL_DINGBATS_ID = 242; // 0xf2
    field public static final android.icu.lang.UCharacter.UnicodeBlock OSMANYA;
    field public static final int OSMANYA_ID = 122; // 0x7a
    field public static final android.icu.lang.UCharacter.UnicodeBlock PAHAWH_HMONG;
    field public static final int PAHAWH_HMONG_ID = 243; // 0xf3
    field public static final android.icu.lang.UCharacter.UnicodeBlock PALMYRENE;
    field public static final int PALMYRENE_ID = 244; // 0xf4
    field public static final android.icu.lang.UCharacter.UnicodeBlock PAU_CIN_HAU;
    field public static final int PAU_CIN_HAU_ID = 245; // 0xf5
    field public static final android.icu.lang.UCharacter.UnicodeBlock PHAGS_PA;
    field public static final int PHAGS_PA_ID = 150; // 0x96
    field public static final android.icu.lang.UCharacter.UnicodeBlock PHAISTOS_DISC;
    field public static final int PHAISTOS_DISC_ID = 166; // 0xa6
    field public static final android.icu.lang.UCharacter.UnicodeBlock PHOENICIAN;
    field public static final int PHOENICIAN_ID = 151; // 0x97
    field public static final android.icu.lang.UCharacter.UnicodeBlock PHONETIC_EXTENSIONS;
    field public static final int PHONETIC_EXTENSIONS_ID = 114; // 0x72
    field public static final android.icu.lang.UCharacter.UnicodeBlock PHONETIC_EXTENSIONS_SUPPLEMENT;
    field public static final int PHONETIC_EXTENSIONS_SUPPLEMENT_ID = 141; // 0x8d
    field public static final android.icu.lang.UCharacter.UnicodeBlock PLAYING_CARDS;
    field public static final int PLAYING_CARDS_ID = 204; // 0xcc
    field public static final android.icu.lang.UCharacter.UnicodeBlock PRIVATE_USE;
    field public static final android.icu.lang.UCharacter.UnicodeBlock PRIVATE_USE_AREA;
    field public static final int PRIVATE_USE_AREA_ID = 78; // 0x4e
    field public static final int PRIVATE_USE_ID = 78; // 0x4e
    field public static final android.icu.lang.UCharacter.UnicodeBlock PSALTER_PAHLAVI;
    field public static final int PSALTER_PAHLAVI_ID = 246; // 0xf6
    field public static final android.icu.lang.UCharacter.UnicodeBlock REJANG;
    field public static final int REJANG_ID = 163; // 0xa3
    field public static final android.icu.lang.UCharacter.UnicodeBlock RUMI_NUMERAL_SYMBOLS;
    field public static final int RUMI_NUMERAL_SYMBOLS_ID = 192; // 0xc0
    field public static final android.icu.lang.UCharacter.UnicodeBlock RUNIC;
    field public static final int RUNIC_ID = 35; // 0x23
    field public static final android.icu.lang.UCharacter.UnicodeBlock SAMARITAN;
    field public static final int SAMARITAN_ID = 172; // 0xac
    field public static final android.icu.lang.UCharacter.UnicodeBlock SAURASHTRA;
    field public static final int SAURASHTRA_ID = 161; // 0xa1
    field public static final android.icu.lang.UCharacter.UnicodeBlock SHARADA;
    field public static final int SHARADA_ID = 217; // 0xd9
    field public static final android.icu.lang.UCharacter.UnicodeBlock SHAVIAN;
    field public static final int SHAVIAN_ID = 121; // 0x79
    field public static final android.icu.lang.UCharacter.UnicodeBlock SHORTHAND_FORMAT_CONTROLS;
    field public static final int SHORTHAND_FORMAT_CONTROLS_ID = 247; // 0xf7
    field public static final android.icu.lang.UCharacter.UnicodeBlock SIDDHAM;
    field public static final int SIDDHAM_ID = 248; // 0xf8
    field public static final android.icu.lang.UCharacter.UnicodeBlock SINHALA;
    field public static final android.icu.lang.UCharacter.UnicodeBlock SINHALA_ARCHAIC_NUMBERS;
    field public static final int SINHALA_ARCHAIC_NUMBERS_ID = 249; // 0xf9
    field public static final int SINHALA_ID = 24; // 0x18
    field public static final android.icu.lang.UCharacter.UnicodeBlock SMALL_FORM_VARIANTS;
    field public static final int SMALL_FORM_VARIANTS_ID = 84; // 0x54
    field public static final android.icu.lang.UCharacter.UnicodeBlock SORA_SOMPENG;
    field public static final int SORA_SOMPENG_ID = 218; // 0xda
    field public static final android.icu.lang.UCharacter.UnicodeBlock SPACING_MODIFIER_LETTERS;
    field public static final int SPACING_MODIFIER_LETTERS_ID = 6; // 0x6
    field public static final android.icu.lang.UCharacter.UnicodeBlock SPECIALS;
    field public static final int SPECIALS_ID = 86; // 0x56
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUNDANESE;
    field public static final int SUNDANESE_ID = 155; // 0x9b
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUNDANESE_SUPPLEMENT;
    field public static final int SUNDANESE_SUPPLEMENT_ID = 219; // 0xdb
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS;
    field public static final int SUPERSCRIPTS_AND_SUBSCRIPTS_ID = 41; // 0x29
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_ARROWS_A;
    field public static final int SUPPLEMENTAL_ARROWS_A_ID = 103; // 0x67
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_ARROWS_B;
    field public static final int SUPPLEMENTAL_ARROWS_B_ID = 104; // 0x68
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_ARROWS_C;
    field public static final int SUPPLEMENTAL_ARROWS_C_ID = 250; // 0xfa
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS;
    field public static final int SUPPLEMENTAL_MATHEMATICAL_OPERATORS_ID = 106; // 0x6a
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_PUNCTUATION;
    field public static final int SUPPLEMENTAL_PUNCTUATION_ID = 142; // 0x8e
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS;
    field public static final int SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS_ID = 261; // 0x105
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A;
    field public static final int SUPPLEMENTARY_PRIVATE_USE_AREA_A_ID = 109; // 0x6d
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B;
    field public static final int SUPPLEMENTARY_PRIVATE_USE_AREA_B_ID = 110; // 0x6e
    field public static final android.icu.lang.UCharacter.UnicodeBlock SUTTON_SIGNWRITING;
    field public static final int SUTTON_SIGNWRITING_ID = 262; // 0x106
    field public static final android.icu.lang.UCharacter.UnicodeBlock SYLOTI_NAGRI;
    field public static final int SYLOTI_NAGRI_ID = 143; // 0x8f
    field public static final android.icu.lang.UCharacter.UnicodeBlock SYRIAC;
    field public static final int SYRIAC_ID = 13; // 0xd
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAGALOG;
    field public static final int TAGALOG_ID = 98; // 0x62
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAGBANWA;
    field public static final int TAGBANWA_ID = 101; // 0x65
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAGS;
    field public static final int TAGS_ID = 96; // 0x60
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_LE;
    field public static final int TAI_LE_ID = 112; // 0x70
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_THAM;
    field public static final int TAI_THAM_ID = 174; // 0xae
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_VIET;
    field public static final int TAI_VIET_ID = 183; // 0xb7
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAI_XUAN_JING_SYMBOLS;
    field public static final int TAI_XUAN_JING_SYMBOLS_ID = 124; // 0x7c
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAKRI;
    field public static final int TAKRI_ID = 220; // 0xdc
    field public static final android.icu.lang.UCharacter.UnicodeBlock TAMIL;
    field public static final int TAMIL_ID = 20; // 0x14
    field public static final android.icu.lang.UCharacter.UnicodeBlock TELUGU;
    field public static final int TELUGU_ID = 21; // 0x15
    field public static final android.icu.lang.UCharacter.UnicodeBlock THAANA;
    field public static final int THAANA_ID = 14; // 0xe
    field public static final android.icu.lang.UCharacter.UnicodeBlock THAI;
    field public static final int THAI_ID = 25; // 0x19
    field public static final android.icu.lang.UCharacter.UnicodeBlock TIBETAN;
    field public static final int TIBETAN_ID = 27; // 0x1b
    field public static final android.icu.lang.UCharacter.UnicodeBlock TIFINAGH;
    field public static final int TIFINAGH_ID = 144; // 0x90
    field public static final android.icu.lang.UCharacter.UnicodeBlock TIRHUTA;
    field public static final int TIRHUTA_ID = 251; // 0xfb
    field public static final android.icu.lang.UCharacter.UnicodeBlock TRANSPORT_AND_MAP_SYMBOLS;
    field public static final int TRANSPORT_AND_MAP_SYMBOLS_ID = 207; // 0xcf
    field public static final android.icu.lang.UCharacter.UnicodeBlock UGARITIC;
    field public static final int UGARITIC_ID = 120; // 0x78
    field public static final android.icu.lang.UCharacter.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS;
    field public static final android.icu.lang.UCharacter.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED;
    field public static final int UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_ID = 173; // 0xad
    field public static final int UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_ID = 33; // 0x21
    field public static final android.icu.lang.UCharacter.UnicodeBlock VAI;
    field public static final int VAI_ID = 159; // 0x9f
    field public static final android.icu.lang.UCharacter.UnicodeBlock VARIATION_SELECTORS;
    field public static final int VARIATION_SELECTORS_ID = 108; // 0x6c
    field public static final android.icu.lang.UCharacter.UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT;
    field public static final int VARIATION_SELECTORS_SUPPLEMENT_ID = 125; // 0x7d
    field public static final android.icu.lang.UCharacter.UnicodeBlock VEDIC_EXTENSIONS;
    field public static final int VEDIC_EXTENSIONS_ID = 175; // 0xaf
    field public static final android.icu.lang.UCharacter.UnicodeBlock VERTICAL_FORMS;
    field public static final int VERTICAL_FORMS_ID = 145; // 0x91
    field public static final android.icu.lang.UCharacter.UnicodeBlock WARANG_CITI;
    field public static final int WARANG_CITI_ID = 252; // 0xfc
    field public static final android.icu.lang.UCharacter.UnicodeBlock YIJING_HEXAGRAM_SYMBOLS;
    field public static final int YIJING_HEXAGRAM_SYMBOLS_ID = 116; // 0x74
    field public static final android.icu.lang.UCharacter.UnicodeBlock YI_RADICALS;
    field public static final int YI_RADICALS_ID = 73; // 0x49
    field public static final android.icu.lang.UCharacter.UnicodeBlock YI_SYLLABLES;
    field public static final int YI_SYLLABLES_ID = 72; // 0x48
  }

  public static abstract interface UCharacter.WordBreak {
    field public static final int ALETTER = 1; // 0x1
    field public static final int COUNT = 17; // 0x11
    field public static final int CR = 8; // 0x8
    field public static final int DOUBLE_QUOTE = 16; // 0x10
    field public static final int EXTEND = 9; // 0x9
    field public static final int EXTENDNUMLET = 7; // 0x7
    field public static final int FORMAT = 2; // 0x2
    field public static final int HEBREW_LETTER = 14; // 0xe
    field public static final int KATAKANA = 3; // 0x3
    field public static final int LF = 10; // 0xa
    field public static final int MIDLETTER = 4; // 0x4
    field public static final int MIDNUM = 5; // 0x5
    field public static final int MIDNUMLET = 11; // 0xb
    field public static final int NEWLINE = 12; // 0xc
    field public static final int NUMERIC = 6; // 0x6
    field public static final int OTHER = 0; // 0x0
    field public static final int REGIONAL_INDICATOR = 13; // 0xd
    field public static final int SINGLE_QUOTE = 15; // 0xf
  }

  public final class UCharacterCategory implements android.icu.lang.UCharacterEnums.ECharacterCategory {
    method public static java.lang.String toString(int);
  }

  public final class UCharacterDirection implements android.icu.lang.UCharacterEnums.ECharacterDirection {
    method public static java.lang.String toString(int);
  }

  public class UCharacterEnums {
  }

  public static abstract interface UCharacterEnums.ECharacterCategory {
    field public static final byte CHAR_CATEGORY_COUNT = 30; // 0x1e
    field public static final byte COMBINING_SPACING_MARK = 8; // 0x8
    field public static final byte CONNECTOR_PUNCTUATION = 22; // 0x16
    field public static final byte CONTROL = 15; // 0xf
    field public static final byte CURRENCY_SYMBOL = 25; // 0x19
    field public static final byte DASH_PUNCTUATION = 19; // 0x13
    field public static final byte DECIMAL_DIGIT_NUMBER = 9; // 0x9
    field public static final byte ENCLOSING_MARK = 7; // 0x7
    field public static final byte END_PUNCTUATION = 21; // 0x15
    field public static final byte FINAL_PUNCTUATION = 29; // 0x1d
    field public static final byte FINAL_QUOTE_PUNCTUATION = 29; // 0x1d
    field public static final byte FORMAT = 16; // 0x10
    field public static final byte GENERAL_OTHER_TYPES = 0; // 0x0
    field public static final byte INITIAL_PUNCTUATION = 28; // 0x1c
    field public static final byte INITIAL_QUOTE_PUNCTUATION = 28; // 0x1c
    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 = 24; // 0x18
    field public static final byte MODIFIER_LETTER = 4; // 0x4
    field public static final byte MODIFIER_SYMBOL = 26; // 0x1a
    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 = 23; // 0x17
    field public static final byte OTHER_SYMBOL = 27; // 0x1b
    field public static final byte PARAGRAPH_SEPARATOR = 14; // 0xe
    field public static final byte PRIVATE_USE = 17; // 0x11
    field public static final byte SPACE_SEPARATOR = 12; // 0xc
    field public static final byte START_PUNCTUATION = 20; // 0x14
    field public static final byte SURROGATE = 18; // 0x12
    field public static final byte TITLECASE_LETTER = 3; // 0x3
    field public static final byte UNASSIGNED = 0; // 0x0
    field public static final byte UPPERCASE_LETTER = 1; // 0x1
  }

  public static abstract interface UCharacterEnums.ECharacterDirection {
    field public static final int ARABIC_NUMBER = 5; // 0x5
    field public static final int BLOCK_SEPARATOR = 7; // 0x7
    field public static final int BOUNDARY_NEUTRAL = 18; // 0x12
    field public static final int CHAR_DIRECTION_COUNT = 23; // 0x17
    field public static final int COMMON_NUMBER_SEPARATOR = 6; // 0x6
    field public static final byte DIRECTIONALITY_ARABIC_NUMBER = 5; // 0x5
    field public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = 18; // 0x12
    field public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 6; // 0x6
    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = 2; // 0x2
    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 3; // 0x3
    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 4; // 0x4
    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = 0; // 0x0
    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 11; // 0xb
    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 12; // 0xc
    field public static final byte DIRECTIONALITY_NONSPACING_MARK = 17; // 0x11
    field public static final byte DIRECTIONALITY_OTHER_NEUTRALS = 10; // 0xa
    field public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 7; // 0x7
    field public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 16; // 0x10
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1; // 0x1
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 13; // 0xd
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 14; // 0xe
    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 15; // 0xf
    field public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = 8; // 0x8
    field public static final byte DIRECTIONALITY_UNDEFINED = -1; // 0xffffffff
    field public static final byte DIRECTIONALITY_WHITESPACE = 9; // 0x9
    field public static final int DIR_NON_SPACING_MARK = 17; // 0x11
    field public static final int EUROPEAN_NUMBER = 2; // 0x2
    field public static final int EUROPEAN_NUMBER_SEPARATOR = 3; // 0x3
    field public static final int EUROPEAN_NUMBER_TERMINATOR = 4; // 0x4
    field public static final byte FIRST_STRONG_ISOLATE = 19; // 0x13
    field public static final int LEFT_TO_RIGHT = 0; // 0x0
    field public static final int LEFT_TO_RIGHT_EMBEDDING = 11; // 0xb
    field public static final byte LEFT_TO_RIGHT_ISOLATE = 20; // 0x14
    field public static final int LEFT_TO_RIGHT_OVERRIDE = 12; // 0xc
    field public static final int OTHER_NEUTRAL = 10; // 0xa
    field public static final int POP_DIRECTIONAL_FORMAT = 16; // 0x10
    field public static final byte POP_DIRECTIONAL_ISOLATE = 22; // 0x16
    field public static final int RIGHT_TO_LEFT = 1; // 0x1
    field public static final int RIGHT_TO_LEFT_ARABIC = 13; // 0xd
    field public static final int RIGHT_TO_LEFT_EMBEDDING = 14; // 0xe
    field public static final byte RIGHT_TO_LEFT_ISOLATE = 21; // 0x15
    field public static final int RIGHT_TO_LEFT_OVERRIDE = 15; // 0xf
    field public static final int SEGMENT_SEPARATOR = 8; // 0x8
    field public static final int WHITE_SPACE_NEUTRAL = 9; // 0x9
  }

  public abstract interface UProperty {
    field public static final int AGE = 16384; // 0x4000
    field public static final int ALPHABETIC = 0; // 0x0
    field public static final int ASCII_HEX_DIGIT = 1; // 0x1
    field public static final int BIDI_CLASS = 4096; // 0x1000
    field public static final int BIDI_CONTROL = 2; // 0x2
    field public static final int BIDI_MIRRORED = 3; // 0x3
    field public static final int BIDI_MIRRORING_GLYPH = 16385; // 0x4001
    field public static final int BIDI_PAIRED_BRACKET = 16397; // 0x400d
    field public static final int BIDI_PAIRED_BRACKET_TYPE = 4117; // 0x1015
    field public static final int BINARY_LIMIT = 57; // 0x39
    field public static final int BINARY_START = 0; // 0x0
    field public static final int BLOCK = 4097; // 0x1001
    field public static final int CANONICAL_COMBINING_CLASS = 4098; // 0x1002
    field public static final int CASED = 49; // 0x31
    field public static final int CASE_FOLDING = 16386; // 0x4002
    field public static final int CASE_IGNORABLE = 50; // 0x32
    field public static final int CASE_SENSITIVE = 34; // 0x22
    field public static final int CHANGES_WHEN_CASEFOLDED = 54; // 0x36
    field public static final int CHANGES_WHEN_CASEMAPPED = 55; // 0x37
    field public static final int CHANGES_WHEN_LOWERCASED = 51; // 0x33
    field public static final int CHANGES_WHEN_NFKC_CASEFOLDED = 56; // 0x38
    field public static final int CHANGES_WHEN_TITLECASED = 53; // 0x35
    field public static final int CHANGES_WHEN_UPPERCASED = 52; // 0x34
    field public static final int DASH = 4; // 0x4
    field public static final int DECOMPOSITION_TYPE = 4099; // 0x1003
    field public static final int DEFAULT_IGNORABLE_CODE_POINT = 5; // 0x5
    field public static final int DEPRECATED = 6; // 0x6
    field public static final int DIACRITIC = 7; // 0x7
    field public static final int DOUBLE_LIMIT = 12289; // 0x3001
    field public static final int DOUBLE_START = 12288; // 0x3000
    field public static final int EAST_ASIAN_WIDTH = 4100; // 0x1004
    field public static final int EXTENDER = 8; // 0x8
    field public static final int FULL_COMPOSITION_EXCLUSION = 9; // 0x9
    field public static final int GENERAL_CATEGORY = 4101; // 0x1005
    field public static final int GENERAL_CATEGORY_MASK = 8192; // 0x2000
    field public static final int GRAPHEME_BASE = 10; // 0xa
    field public static final int GRAPHEME_CLUSTER_BREAK = 4114; // 0x1012
    field public static final int GRAPHEME_EXTEND = 11; // 0xb
    field public static final int GRAPHEME_LINK = 12; // 0xc
    field public static final int HANGUL_SYLLABLE_TYPE = 4107; // 0x100b
    field public static final int HEX_DIGIT = 13; // 0xd
    field public static final int HYPHEN = 14; // 0xe
    field public static final int IDEOGRAPHIC = 17; // 0x11
    field public static final int IDS_BINARY_OPERATOR = 18; // 0x12
    field public static final int IDS_TRINARY_OPERATOR = 19; // 0x13
    field public static final int ID_CONTINUE = 15; // 0xf
    field public static final int ID_START = 16; // 0x10
    field public static final int INT_LIMIT = 4118; // 0x1016
    field public static final int INT_START = 4096; // 0x1000
    field public static final int JOINING_GROUP = 4102; // 0x1006
    field public static final int JOINING_TYPE = 4103; // 0x1007
    field public static final int JOIN_CONTROL = 20; // 0x14
    field public static final int LEAD_CANONICAL_COMBINING_CLASS = 4112; // 0x1010
    field public static final int LINE_BREAK = 4104; // 0x1008
    field public static final int LOGICAL_ORDER_EXCEPTION = 21; // 0x15
    field public static final int LOWERCASE = 22; // 0x16
    field public static final int LOWERCASE_MAPPING = 16388; // 0x4004
    field public static final int MASK_LIMIT = 8193; // 0x2001
    field public static final int MASK_START = 8192; // 0x2000
    field public static final int MATH = 23; // 0x17
    field public static final int NAME = 16389; // 0x4005
    field public static final int NFC_INERT = 39; // 0x27
    field public static final int NFC_QUICK_CHECK = 4110; // 0x100e
    field public static final int NFD_INERT = 37; // 0x25
    field public static final int NFD_QUICK_CHECK = 4108; // 0x100c
    field public static final int NFKC_INERT = 40; // 0x28
    field public static final int NFKC_QUICK_CHECK = 4111; // 0x100f
    field public static final int NFKD_INERT = 38; // 0x26
    field public static final int NFKD_QUICK_CHECK = 4109; // 0x100d
    field public static final int NONCHARACTER_CODE_POINT = 24; // 0x18
    field public static final int NUMERIC_TYPE = 4105; // 0x1009
    field public static final int NUMERIC_VALUE = 12288; // 0x3000
    field public static final int OTHER_PROPERTY_LIMIT = 28673; // 0x7001
    field public static final int OTHER_PROPERTY_START = 28672; // 0x7000
    field public static final int PATTERN_SYNTAX = 42; // 0x2a
    field public static final int PATTERN_WHITE_SPACE = 43; // 0x2b
    field public static final int POSIX_ALNUM = 44; // 0x2c
    field public static final int POSIX_BLANK = 45; // 0x2d
    field public static final int POSIX_GRAPH = 46; // 0x2e
    field public static final int POSIX_PRINT = 47; // 0x2f
    field public static final int POSIX_XDIGIT = 48; // 0x30
    field public static final int QUOTATION_MARK = 25; // 0x19
    field public static final int RADICAL = 26; // 0x1a
    field public static final int SCRIPT = 4106; // 0x100a
    field public static final int SCRIPT_EXTENSIONS = 28672; // 0x7000
    field public static final int SEGMENT_STARTER = 41; // 0x29
    field public static final int SENTENCE_BREAK = 4115; // 0x1013
    field public static final int SIMPLE_CASE_FOLDING = 16390; // 0x4006
    field public static final int SIMPLE_LOWERCASE_MAPPING = 16391; // 0x4007
    field public static final int SIMPLE_TITLECASE_MAPPING = 16392; // 0x4008
    field public static final int SIMPLE_UPPERCASE_MAPPING = 16393; // 0x4009
    field public static final int SOFT_DOTTED = 27; // 0x1b
    field public static final int STRING_LIMIT = 16398; // 0x400e
    field public static final int STRING_START = 16384; // 0x4000
    field public static final int S_TERM = 35; // 0x23
    field public static final int TERMINAL_PUNCTUATION = 28; // 0x1c
    field public static final int TITLECASE_MAPPING = 16394; // 0x400a
    field public static final int TRAIL_CANONICAL_COMBINING_CLASS = 4113; // 0x1011
    field public static final int UNIFIED_IDEOGRAPH = 29; // 0x1d
    field public static final int UPPERCASE = 30; // 0x1e
    field public static final int UPPERCASE_MAPPING = 16396; // 0x400c
    field public static final int VARIATION_SELECTOR = 36; // 0x24
    field public static final int WHITE_SPACE = 31; // 0x1f
    field public static final int WORD_BREAK = 4116; // 0x1014
    field public static final int XID_CONTINUE = 32; // 0x20
    field public static final int XID_START = 33; // 0x21
  }

  public static abstract interface UProperty.NameChoice {
    field public static final int COUNT = 2; // 0x2
    field public static final int LONG = 1; // 0x1
    field public static final int SHORT = 0; // 0x0
  }

  public final class UScript {
    method public static final boolean breaksBetweenLetters(int);
    method public static final int[] getCode(java.util.Locale);
    method public static final int[] getCode(android.icu.util.ULocale);
    method public static final int[] getCode(java.lang.String);
    method public static final int getCodeFromName(java.lang.String);
    method public static final java.lang.String getName(int);
    method public static final java.lang.String getSampleString(int);
    method public static final int getScript(int);
    method public static final int getScriptExtensions(int, java.util.BitSet);
    method public static final java.lang.String getShortName(int);
    method public static final android.icu.lang.UScript.ScriptUsage getUsage(int);
    method public static final boolean hasScript(int, int);
    method public static final boolean isCased(int);
    method public static final boolean isRightToLeft(int);
    field public static final int AFAKA = 147; // 0x93
    field public static final int AHOM = 161; // 0xa1
    field public static final int ANATOLIAN_HIEROGLYPHS = 156; // 0x9c
    field public static final int ARABIC = 2; // 0x2
    field public static final int ARMENIAN = 3; // 0x3
    field public static final int AVESTAN = 117; // 0x75
    field public static final int BALINESE = 62; // 0x3e
    field public static final int BAMUM = 130; // 0x82
    field public static final int BASSA_VAH = 134; // 0x86
    field public static final int BATAK = 63; // 0x3f
    field public static final int BENGALI = 4; // 0x4
    field public static final int BLISSYMBOLS = 64; // 0x40
    field public static final int BOOK_PAHLAVI = 124; // 0x7c
    field public static final int BOPOMOFO = 5; // 0x5
    field public static final int BRAHMI = 65; // 0x41
    field public static final int BRAILLE = 46; // 0x2e
    field public static final int BUGINESE = 55; // 0x37
    field public static final int BUHID = 44; // 0x2c
    field public static final int CANADIAN_ABORIGINAL = 40; // 0x28
    field public static final int CARIAN = 104; // 0x68
    field public static final int CAUCASIAN_ALBANIAN = 159; // 0x9f
    field public static final int CHAKMA = 118; // 0x76
    field public static final int CHAM = 66; // 0x42
    field public static final int CHEROKEE = 6; // 0x6
    field public static final int CIRTH = 67; // 0x43
    field public static final int CODE_LIMIT = 167; // 0xa7
    field public static final int COMMON = 0; // 0x0
    field public static final int COPTIC = 7; // 0x7
    field public static final int CUNEIFORM = 101; // 0x65
    field public static final int CYPRIOT = 47; // 0x2f
    field public static final int CYRILLIC = 8; // 0x8
    field public static final int DEMOTIC_EGYPTIAN = 69; // 0x45
    field public static final int DESERET = 9; // 0x9
    field public static final int DEVANAGARI = 10; // 0xa
    field public static final int DUPLOYAN = 135; // 0x87
    field public static final int EASTERN_SYRIAC = 97; // 0x61
    field public static final int EGYPTIAN_HIEROGLYPHS = 71; // 0x47
    field public static final int ELBASAN = 136; // 0x88
    field public static final int ESTRANGELO_SYRIAC = 95; // 0x5f
    field public static final int ETHIOPIC = 11; // 0xb
    field public static final int GEORGIAN = 12; // 0xc
    field public static final int GLAGOLITIC = 56; // 0x38
    field public static final int GOTHIC = 13; // 0xd
    field public static final int GRANTHA = 137; // 0x89
    field public static final int GREEK = 14; // 0xe
    field public static final int GUJARATI = 15; // 0xf
    field public static final int GURMUKHI = 16; // 0x10
    field public static final int HAN = 17; // 0x11
    field public static final int HANGUL = 18; // 0x12
    field public static final int HANUNOO = 43; // 0x2b
    field public static final int HARAPPAN_INDUS = 77; // 0x4d
    field public static final int HATRAN = 162; // 0xa2
    field public static final int HEBREW = 19; // 0x13
    field public static final int HIERATIC_EGYPTIAN = 70; // 0x46
    field public static final int HIRAGANA = 20; // 0x14
    field public static final int IMPERIAL_ARAMAIC = 116; // 0x74
    field public static final int INHERITED = 1; // 0x1
    field public static final int INSCRIPTIONAL_PAHLAVI = 122; // 0x7a
    field public static final int INSCRIPTIONAL_PARTHIAN = 125; // 0x7d
    field public static final int INVALID_CODE = -1; // 0xffffffff
    field public static final int JAPANESE = 105; // 0x69
    field public static final int JAVANESE = 78; // 0x4e
    field public static final int JURCHEN = 148; // 0x94
    field public static final int KAITHI = 120; // 0x78
    field public static final int KANNADA = 21; // 0x15
    field public static final int KATAKANA = 22; // 0x16
    field public static final int KATAKANA_OR_HIRAGANA = 54; // 0x36
    field public static final int KAYAH_LI = 79; // 0x4f
    field public static final int KHAROSHTHI = 57; // 0x39
    field public static final int KHMER = 23; // 0x17
    field public static final int KHOJKI = 157; // 0x9d
    field public static final int KHUDAWADI = 145; // 0x91
    field public static final int KHUTSURI = 72; // 0x48
    field public static final int KOREAN = 119; // 0x77
    field public static final int KPELLE = 138; // 0x8a
    field public static final int LANNA = 106; // 0x6a
    field public static final int LAO = 24; // 0x18
    field public static final int LATIN = 25; // 0x19
    field public static final int LATIN_FRAKTUR = 80; // 0x50
    field public static final int LATIN_GAELIC = 81; // 0x51
    field public static final int LEPCHA = 82; // 0x52
    field public static final int LIMBU = 48; // 0x30
    field public static final int LINEAR_A = 83; // 0x53
    field public static final int LINEAR_B = 49; // 0x31
    field public static final int LISU = 131; // 0x83
    field public static final int LOMA = 139; // 0x8b
    field public static final int LYCIAN = 107; // 0x6b
    field public static final int LYDIAN = 108; // 0x6c
    field public static final int MAHAJANI = 160; // 0xa0
    field public static final int MALAYALAM = 26; // 0x1a
    field public static final int MANDAEAN = 84; // 0x54
    field public static final int MANDAIC = 84; // 0x54
    field public static final int MANICHAEAN = 121; // 0x79
    field public static final int MATHEMATICAL_NOTATION = 128; // 0x80
    field public static final int MAYAN_HIEROGLYPHS = 85; // 0x55
    field public static final int MEITEI_MAYEK = 115; // 0x73
    field public static final int MENDE = 140; // 0x8c
    field public static final int MEROITIC = 86; // 0x56
    field public static final int MEROITIC_CURSIVE = 141; // 0x8d
    field public static final int MEROITIC_HIEROGLYPHS = 86; // 0x56
    field public static final int MIAO = 92; // 0x5c
    field public static final int MODI = 163; // 0xa3
    field public static final int MONGOLIAN = 27; // 0x1b
    field public static final int MOON = 114; // 0x72
    field public static final int MRO = 149; // 0x95
    field public static final int MULTANI = 164; // 0xa4
    field public static final int MYANMAR = 28; // 0x1c
    field public static final int NABATAEAN = 143; // 0x8f
    field public static final int NAKHI_GEBA = 132; // 0x84
    field public static final int NEW_TAI_LUE = 59; // 0x3b
    field public static final int NKO = 87; // 0x57
    field public static final int NUSHU = 150; // 0x96
    field public static final int OGHAM = 29; // 0x1d
    field public static final int OLD_CHURCH_SLAVONIC_CYRILLIC = 68; // 0x44
    field public static final int OLD_HUNGARIAN = 76; // 0x4c
    field public static final int OLD_ITALIC = 30; // 0x1e
    field public static final int OLD_NORTH_ARABIAN = 142; // 0x8e
    field public static final int OLD_PERMIC = 89; // 0x59
    field public static final int OLD_PERSIAN = 61; // 0x3d
    field public static final int OLD_SOUTH_ARABIAN = 133; // 0x85
    field public static final int OL_CHIKI = 109; // 0x6d
    field public static final int ORIYA = 31; // 0x1f
    field public static final int ORKHON = 88; // 0x58
    field public static final int OSMANYA = 50; // 0x32
    field public static final int PAHAWH_HMONG = 75; // 0x4b
    field public static final int PALMYRENE = 144; // 0x90
    field public static final int PAU_CIN_HAU = 165; // 0xa5
    field public static final int PHAGS_PA = 90; // 0x5a
    field public static final int PHOENICIAN = 91; // 0x5b
    field public static final int PHONETIC_POLLARD = 92; // 0x5c
    field public static final int PSALTER_PAHLAVI = 123; // 0x7b
    field public static final int REJANG = 110; // 0x6e
    field public static final int RONGORONGO = 93; // 0x5d
    field public static final int RUNIC = 32; // 0x20
    field public static final int SAMARITAN = 126; // 0x7e
    field public static final int SARATI = 94; // 0x5e
    field public static final int SAURASHTRA = 111; // 0x6f
    field public static final int SHARADA = 151; // 0x97
    field public static final int SHAVIAN = 51; // 0x33
    field public static final int SIDDHAM = 166; // 0xa6
    field public static final int SIGN_WRITING = 112; // 0x70
    field public static final int SIMPLIFIED_HAN = 73; // 0x49
    field public static final int SINDHI = 145; // 0x91
    field public static final int SINHALA = 33; // 0x21
    field public static final int SORA_SOMPENG = 152; // 0x98
    field public static final int SUNDANESE = 113; // 0x71
    field public static final int SYLOTI_NAGRI = 58; // 0x3a
    field public static final int SYMBOLS = 129; // 0x81
    field public static final int SYRIAC = 34; // 0x22
    field public static final int TAGALOG = 42; // 0x2a
    field public static final int TAGBANWA = 45; // 0x2d
    field public static final int TAI_LE = 52; // 0x34
    field public static final int TAI_VIET = 127; // 0x7f
    field public static final int TAKRI = 153; // 0x99
    field public static final int TAMIL = 35; // 0x23
    field public static final int TANGUT = 154; // 0x9a
    field public static final int TELUGU = 36; // 0x24
    field public static final int TENGWAR = 98; // 0x62
    field public static final int THAANA = 37; // 0x25
    field public static final int THAI = 38; // 0x26
    field public static final int TIBETAN = 39; // 0x27
    field public static final int TIFINAGH = 60; // 0x3c
    field public static final int TIRHUTA = 158; // 0x9e
    field public static final int TRADITIONAL_HAN = 74; // 0x4a
    field public static final int UCAS = 40; // 0x28
    field public static final int UGARITIC = 53; // 0x35
    field public static final int UNKNOWN = 103; // 0x67
    field public static final int UNWRITTEN_LANGUAGES = 102; // 0x66
    field public static final int VAI = 99; // 0x63
    field public static final int VISIBLE_SPEECH = 100; // 0x64
    field public static final int WARANG_CITI = 146; // 0x92
    field public static final int WESTERN_SYRIAC = 96; // 0x60
    field public static final int WOLEAI = 155; // 0x9b
    field public static final int YI = 41; // 0x29
  }

  public static final class UScript.ScriptUsage extends java.lang.Enum {
    method public static android.icu.lang.UScript.ScriptUsage valueOf(java.lang.String);
    method public static final android.icu.lang.UScript.ScriptUsage[] values();
    enum_constant public static final android.icu.lang.UScript.ScriptUsage ASPIRATIONAL;
    enum_constant public static final android.icu.lang.UScript.ScriptUsage EXCLUDED;
    enum_constant public static final android.icu.lang.UScript.ScriptUsage LIMITED_USE;
    enum_constant public static final android.icu.lang.UScript.ScriptUsage NOT_ENCODED;
    enum_constant public static final android.icu.lang.UScript.ScriptUsage RECOMMENDED;
    enum_constant public static final android.icu.lang.UScript.ScriptUsage UNKNOWN;
  }

}

package android.icu.math {

  public class BigDecimal extends java.lang.Number implements java.lang.Comparable java.io.Serializable {
    ctor public BigDecimal(java.math.BigDecimal);
    ctor public BigDecimal(java.math.BigInteger);
    ctor public BigDecimal(java.math.BigInteger, int);
    ctor public BigDecimal(char[]);
    ctor public BigDecimal(char[], int, int);
    ctor public BigDecimal(double);
    ctor public BigDecimal(int);
    ctor public BigDecimal(long);
    ctor public BigDecimal(java.lang.String);
    method public android.icu.math.BigDecimal abs();
    method public android.icu.math.BigDecimal abs(android.icu.math.MathContext);
    method public android.icu.math.BigDecimal add(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal add(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public byte byteValueExact();
    method public int compareTo(android.icu.math.BigDecimal);
    method public int compareTo(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal, int);
    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal, int, int);
    method public android.icu.math.BigDecimal divide(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public android.icu.math.BigDecimal divideInteger(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal divideInteger(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public double doubleValue();
    method public float floatValue();
    method public java.lang.String format(int, int);
    method public java.lang.String format(int, int, int, int, int, int);
    method public int intValue();
    method public int intValueExact();
    method public long longValue();
    method public long longValueExact();
    method public android.icu.math.BigDecimal max(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal max(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public android.icu.math.BigDecimal min(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal min(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public android.icu.math.BigDecimal movePointLeft(int);
    method public android.icu.math.BigDecimal movePointRight(int);
    method public android.icu.math.BigDecimal multiply(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal multiply(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public android.icu.math.BigDecimal negate();
    method public android.icu.math.BigDecimal negate(android.icu.math.MathContext);
    method public android.icu.math.BigDecimal plus();
    method public android.icu.math.BigDecimal plus(android.icu.math.MathContext);
    method public android.icu.math.BigDecimal pow(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal pow(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public android.icu.math.BigDecimal remainder(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal remainder(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public int scale();
    method public android.icu.math.BigDecimal setScale(int);
    method public android.icu.math.BigDecimal setScale(int, int);
    method public short shortValueExact();
    method public int signum();
    method public android.icu.math.BigDecimal subtract(android.icu.math.BigDecimal);
    method public android.icu.math.BigDecimal subtract(android.icu.math.BigDecimal, android.icu.math.MathContext);
    method public java.math.BigDecimal toBigDecimal();
    method public java.math.BigInteger toBigInteger();
    method public java.math.BigInteger toBigIntegerExact();
    method public char[] toCharArray();
    method public java.math.BigInteger unscaledValue();
    method public static android.icu.math.BigDecimal valueOf(double);
    method public static android.icu.math.BigDecimal valueOf(long);
    method public static android.icu.math.BigDecimal valueOf(long, int);
    field public static final android.icu.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 android.icu.math.BigDecimal TEN;
    field public static final android.icu.math.BigDecimal ZERO;
  }

  public final class MathContext implements java.io.Serializable {
    ctor public MathContext(int);
    ctor public MathContext(int, int);
    ctor public MathContext(int, int, boolean);
    ctor public MathContext(int, int, boolean, int);
    method public int getDigits();
    method public int getForm();
    method public boolean getLostDigits();
    method public int getRoundingMode();
    field public static final android.icu.math.MathContext DEFAULT;
    field public static final int ENGINEERING = 2; // 0x2
    field public static final int PLAIN = 0; // 0x0
    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 int SCIENTIFIC = 1; // 0x1
  }

}

package android.icu.text {

  public final class AlphabeticIndex implements java.lang.Iterable {
    ctor public AlphabeticIndex(android.icu.util.ULocale);
    ctor public AlphabeticIndex(java.util.Locale);
    ctor public AlphabeticIndex(android.icu.text.RuleBasedCollator);
    method public android.icu.text.AlphabeticIndex<V> addLabels(android.icu.text.UnicodeSet);
    method public android.icu.text.AlphabeticIndex<V> addLabels(android.icu.util.ULocale...);
    method public android.icu.text.AlphabeticIndex<V> addLabels(java.util.Locale...);
    method public android.icu.text.AlphabeticIndex<V> addRecord(java.lang.CharSequence, V);
    method public android.icu.text.AlphabeticIndex.ImmutableIndex<V> buildImmutableIndex();
    method public android.icu.text.AlphabeticIndex<V> clearRecords();
    method public int getBucketCount();
    method public int getBucketIndex(java.lang.CharSequence);
    method public java.util.List<java.lang.String> getBucketLabels();
    method public android.icu.text.RuleBasedCollator getCollator();
    method public java.lang.String getInflowLabel();
    method public int getMaxLabelCount();
    method public java.lang.String getOverflowLabel();
    method public int getRecordCount();
    method public java.lang.String getUnderflowLabel();
    method public java.util.Iterator<android.icu.text.AlphabeticIndex.Bucket<V>> iterator();
    method public android.icu.text.AlphabeticIndex<V> setInflowLabel(java.lang.String);
    method public android.icu.text.AlphabeticIndex<V> setMaxLabelCount(int);
    method public android.icu.text.AlphabeticIndex<V> setOverflowLabel(java.lang.String);
    method public android.icu.text.AlphabeticIndex<V> setUnderflowLabel(java.lang.String);
  }

  public static class AlphabeticIndex.Bucket implements java.lang.Iterable {
    method public java.lang.String getLabel();
    method public android.icu.text.AlphabeticIndex.Bucket.LabelType getLabelType();
    method public java.util.Iterator<android.icu.text.AlphabeticIndex.Record<V>> iterator();
    method public int size();
  }

  public static final class AlphabeticIndex.Bucket.LabelType extends java.lang.Enum {
    method public static android.icu.text.AlphabeticIndex.Bucket.LabelType valueOf(java.lang.String);
    method public static final android.icu.text.AlphabeticIndex.Bucket.LabelType[] values();
    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType INFLOW;
    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType NORMAL;
    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType OVERFLOW;
    enum_constant public static final android.icu.text.AlphabeticIndex.Bucket.LabelType UNDERFLOW;
  }

  public static final class AlphabeticIndex.ImmutableIndex implements java.lang.Iterable {
    method public android.icu.text.AlphabeticIndex.Bucket<V> getBucket(int);
    method public int getBucketCount();
    method public int getBucketIndex(java.lang.CharSequence);
    method public java.util.Iterator<android.icu.text.AlphabeticIndex.Bucket<V>> iterator();
  }

  public static class AlphabeticIndex.Record {
    method public V getData();
    method public java.lang.CharSequence getName();
  }

  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 synchronized java.util.Locale[] getAvailableLocales();
    method public static android.icu.text.BreakIterator getCharacterInstance();
    method public static android.icu.text.BreakIterator getCharacterInstance(java.util.Locale);
    method public static android.icu.text.BreakIterator getCharacterInstance(android.icu.util.ULocale);
    method public static android.icu.text.BreakIterator getLineInstance();
    method public static android.icu.text.BreakIterator getLineInstance(java.util.Locale);
    method public static android.icu.text.BreakIterator getLineInstance(android.icu.util.ULocale);
    method public int getRuleStatus();
    method public int getRuleStatusVec(int[]);
    method public static android.icu.text.BreakIterator getSentenceInstance();
    method public static android.icu.text.BreakIterator getSentenceInstance(java.util.Locale);
    method public static android.icu.text.BreakIterator getSentenceInstance(android.icu.util.ULocale);
    method public abstract java.text.CharacterIterator getText();
    method public static android.icu.text.BreakIterator getTitleInstance();
    method public static android.icu.text.BreakIterator getTitleInstance(java.util.Locale);
    method public static android.icu.text.BreakIterator getTitleInstance(android.icu.util.ULocale);
    method public static android.icu.text.BreakIterator getWordInstance();
    method public static android.icu.text.BreakIterator getWordInstance(java.util.Locale);
    method public static android.icu.text.BreakIterator getWordInstance(android.icu.util.ULocale);
    method public boolean isBoundary(int);
    method public abstract int last();
    method public abstract int next(int);
    method public abstract int next();
    method public int preceding(int);
    method public abstract int previous();
    method public static java.lang.Object registerInstance(android.icu.text.BreakIterator, java.util.Locale, int);
    method public static java.lang.Object registerInstance(android.icu.text.BreakIterator, android.icu.util.ULocale, int);
    method public void setText(java.lang.String);
    method public abstract void setText(java.text.CharacterIterator);
    method public static boolean unregister(java.lang.Object);
    field public static final int DONE = -1; // 0xffffffff
    field public static final int KIND_CHARACTER = 0; // 0x0
    field public static final int KIND_LINE = 2; // 0x2
    field public static final int KIND_SENTENCE = 3; // 0x3
    field public static final int KIND_TITLE = 4; // 0x4
    field public static final int KIND_WORD = 1; // 0x1
    field public static final int WORD_IDEO = 400; // 0x190
    field public static final int WORD_IDEO_LIMIT = 500; // 0x1f4
    field public static final int WORD_KANA = 300; // 0x12c
    field public static final int WORD_KANA_LIMIT = 400; // 0x190
    field public static final int WORD_LETTER = 200; // 0xc8
    field public static final int WORD_LETTER_LIMIT = 300; // 0x12c
    field public static final int WORD_NONE = 0; // 0x0
    field public static final int WORD_NONE_LIMIT = 100; // 0x64
    field public static final int WORD_NUMBER = 100; // 0x64
    field public static final int WORD_NUMBER_LIMIT = 200; // 0xc8
  }

  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 int secondaryOrder(int);
    method public void setOffset(int);
    method public void setText(java.lang.String);
    method public void setText(android.icu.text.UCharacterIterator);
    method public void setText(java.text.CharacterIterator);
    method public static final int tertiaryOrder(int);
    field public static final int IGNORABLE = 0; // 0x0
    field public static final int NULLORDER = -1; // 0xffffffff
  }

  public final class CollationKey implements java.lang.Comparable {
    ctor public CollationKey(java.lang.String, byte[]);
    ctor public CollationKey(java.lang.String, android.icu.text.RawCollationKey);
    method public int compareTo(android.icu.text.CollationKey);
    method public boolean equals(android.icu.text.CollationKey);
    method public android.icu.text.CollationKey getBound(int, int);
    method public java.lang.String getSourceString();
    method public android.icu.text.CollationKey merge(android.icu.text.CollationKey);
    method public byte[] toByteArray();
  }

  public static final class CollationKey.BoundMode {
    field public static final int COUNT = 3; // 0x3
    field public static final int LOWER = 0; // 0x0
    field public static final int UPPER = 1; // 0x1
    field public static final int UPPER_LONG = 2; // 0x2
  }

  public abstract class Collator implements java.lang.Cloneable java.util.Comparator android.icu.util.Freezable {
    ctor protected Collator();
    method public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method public android.icu.text.Collator cloneAsThawed();
    method public abstract int compare(java.lang.String, java.lang.String);
    method public int compare(java.lang.Object, java.lang.Object);
    method public boolean equals(java.lang.String, java.lang.String);
    method public android.icu.text.Collator freeze();
    method public static java.util.Locale[] getAvailableLocales();
    method public static final android.icu.util.ULocale[] getAvailableULocales();
    method public abstract android.icu.text.CollationKey getCollationKey(java.lang.String);
    method public int getDecomposition();
    method public static java.lang.String getDisplayName(java.util.Locale, java.util.Locale);
    method public static java.lang.String getDisplayName(android.icu.util.ULocale, android.icu.util.ULocale);
    method public static java.lang.String getDisplayName(java.util.Locale);
    method public static java.lang.String getDisplayName(android.icu.util.ULocale);
    method public static int[] getEquivalentReorderCodes(int);
    method public static final android.icu.util.ULocale getFunctionalEquivalent(java.lang.String, android.icu.util.ULocale, boolean[]);
    method public static final android.icu.util.ULocale getFunctionalEquivalent(java.lang.String, android.icu.util.ULocale);
    method public static final android.icu.text.Collator getInstance();
    method public static final android.icu.text.Collator getInstance(android.icu.util.ULocale);
    method public static final android.icu.text.Collator getInstance(java.util.Locale);
    method public static final java.lang.String[] getKeywordValues(java.lang.String);
    method public static final java.lang.String[] getKeywordValuesForLocale(java.lang.String, android.icu.util.ULocale, boolean);
    method public static final java.lang.String[] getKeywords();
    method public int getMaxVariable();
    method public abstract android.icu.text.RawCollationKey getRawCollationKey(java.lang.String, android.icu.text.RawCollationKey);
    method public int[] getReorderCodes();
    method public int getStrength();
    method public android.icu.text.UnicodeSet getTailoredSet();
    method public abstract android.icu.util.VersionInfo getUCAVersion();
    method public abstract int getVariableTop();
    method public abstract android.icu.util.VersionInfo getVersion();
    method public boolean isFrozen();
    method public static final java.lang.Object registerFactory(android.icu.text.Collator.CollatorFactory);
    method public static final java.lang.Object registerInstance(android.icu.text.Collator, android.icu.util.ULocale);
    method public void setDecomposition(int);
    method public android.icu.text.Collator setMaxVariable(int);
    method public void setReorderCodes(int...);
    method public void setStrength(int);
    method public static final boolean unregister(java.lang.Object);
    field public static final int CANONICAL_DECOMPOSITION = 17; // 0x11
    field public static final int FULL_DECOMPOSITION = 15; // 0xf
    field public static final int IDENTICAL = 15; // 0xf
    field public static final int NO_DECOMPOSITION = 16; // 0x10
    field public static final int PRIMARY = 0; // 0x0
    field public static final int QUATERNARY = 3; // 0x3
    field public static final int SECONDARY = 1; // 0x1
    field public static final int TERTIARY = 2; // 0x2
  }

  public static abstract class Collator.CollatorFactory {
    ctor protected Collator.CollatorFactory();
    method public android.icu.text.Collator createCollator(android.icu.util.ULocale);
    method public android.icu.text.Collator createCollator(java.util.Locale);
    method public java.lang.String getDisplayName(java.util.Locale, java.util.Locale);
    method public java.lang.String getDisplayName(android.icu.util.ULocale, android.icu.util.ULocale);
    method public abstract java.util.Set<java.lang.String> getSupportedLocaleIDs();
    method public boolean visible();
  }

  public static abstract interface Collator.ReorderCodes {
    field public static final int CURRENCY = 4099; // 0x1003
    field public static final int DEFAULT = -1; // 0xffffffff
    field public static final int DIGIT = 4100; // 0x1004
    field public static final int FIRST = 4096; // 0x1000
    field public static final int LIMIT = 4101; // 0x1005
    field public static final int NONE = 103; // 0x67
    field public static final int OTHERS = 103; // 0x67
    field public static final int PUNCTUATION = 4097; // 0x1001
    field public static final int SPACE = 4096; // 0x1000
    field public static final int SYMBOL = 4098; // 0x1002
  }

  public class CompactDecimalFormat extends android.icu.text.DecimalFormat {
    method public static android.icu.text.CompactDecimalFormat getInstance(android.icu.util.ULocale, android.icu.text.CompactDecimalFormat.CompactStyle);
    method public static android.icu.text.CompactDecimalFormat getInstance(java.util.Locale, android.icu.text.CompactDecimalFormat.CompactStyle);
  }

  public static final class CompactDecimalFormat.CompactStyle extends java.lang.Enum {
    method public static android.icu.text.CompactDecimalFormat.CompactStyle valueOf(java.lang.String);
    method public static final android.icu.text.CompactDecimalFormat.CompactStyle[] values();
    enum_constant public static final android.icu.text.CompactDecimalFormat.CompactStyle LONG;
    enum_constant public static final android.icu.text.CompactDecimalFormat.CompactStyle SHORT;
  }

  public class CurrencyPluralInfo implements java.lang.Cloneable java.io.Serializable {
    ctor public CurrencyPluralInfo();
    ctor public CurrencyPluralInfo(java.util.Locale);
    ctor public CurrencyPluralInfo(android.icu.util.ULocale);
    method public java.lang.Object clone();
    method public java.lang.String getCurrencyPluralPattern(java.lang.String);
    method public static android.icu.text.CurrencyPluralInfo getInstance();
    method public static android.icu.text.CurrencyPluralInfo getInstance(java.util.Locale);
    method public static android.icu.text.CurrencyPluralInfo getInstance(android.icu.util.ULocale);
    method public android.icu.util.ULocale getLocale();
    method public android.icu.text.PluralRules getPluralRules();
    method public void setCurrencyPluralPattern(java.lang.String, java.lang.String);
    method public void setLocale(android.icu.util.ULocale);
    method public void setPluralRules(java.lang.String);
  }

  public abstract class DateFormat extends android.icu.text.UFormat {
    ctor protected DateFormat();
    method public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public abstract java.lang.StringBuffer format(android.icu.util.Calendar, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String format(java.util.Date);
    method public static java.util.Locale[] getAvailableLocales();
    method public boolean getBooleanAttribute(android.icu.text.DateFormat.BooleanAttribute);
    method public android.icu.util.Calendar getCalendar();
    method public android.icu.text.DisplayContext getContext(android.icu.text.DisplayContext.Type);
    method public static final android.icu.text.DateFormat getDateInstance();
    method public static final android.icu.text.DateFormat getDateInstance(int);
    method public static final android.icu.text.DateFormat getDateInstance(int, java.util.Locale);
    method public static final android.icu.text.DateFormat getDateInstance(int, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getDateInstance(android.icu.util.Calendar, int, java.util.Locale);
    method public static final android.icu.text.DateFormat getDateInstance(android.icu.util.Calendar, int, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getDateInstance(android.icu.util.Calendar, int);
    method public static final android.icu.text.DateFormat getDateTimeInstance();
    method public static final android.icu.text.DateFormat getDateTimeInstance(int, int);
    method public static final android.icu.text.DateFormat getDateTimeInstance(int, int, java.util.Locale);
    method public static final android.icu.text.DateFormat getDateTimeInstance(int, int, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getDateTimeInstance(android.icu.util.Calendar, int, int, java.util.Locale);
    method public static final android.icu.text.DateFormat getDateTimeInstance(android.icu.util.Calendar, int, int, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getDateTimeInstance(android.icu.util.Calendar, int, int);
    method public static final android.icu.text.DateFormat getInstance();
    method public static final android.icu.text.DateFormat getInstance(android.icu.util.Calendar, java.util.Locale);
    method public static final android.icu.text.DateFormat getInstance(android.icu.util.Calendar);
    method public static final android.icu.text.DateFormat getInstanceForSkeleton(java.lang.String);
    method public static final android.icu.text.DateFormat getInstanceForSkeleton(java.lang.String, java.util.Locale);
    method public static final android.icu.text.DateFormat getInstanceForSkeleton(java.lang.String, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getInstanceForSkeleton(android.icu.util.Calendar, java.lang.String, java.util.Locale);
    method public static final android.icu.text.DateFormat getInstanceForSkeleton(android.icu.util.Calendar, java.lang.String, android.icu.util.ULocale);
    method public android.icu.text.NumberFormat getNumberFormat();
    method public static final android.icu.text.DateFormat getPatternInstance(java.lang.String);
    method public static final android.icu.text.DateFormat getPatternInstance(java.lang.String, java.util.Locale);
    method public static final android.icu.text.DateFormat getPatternInstance(java.lang.String, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getPatternInstance(android.icu.util.Calendar, java.lang.String, java.util.Locale);
    method public static final android.icu.text.DateFormat getPatternInstance(android.icu.util.Calendar, java.lang.String, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getTimeInstance();
    method public static final android.icu.text.DateFormat getTimeInstance(int);
    method public static final android.icu.text.DateFormat getTimeInstance(int, java.util.Locale);
    method public static final android.icu.text.DateFormat getTimeInstance(int, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getTimeInstance(android.icu.util.Calendar, int, java.util.Locale);
    method public static final android.icu.text.DateFormat getTimeInstance(android.icu.util.Calendar, int, android.icu.util.ULocale);
    method public static final android.icu.text.DateFormat getTimeInstance(android.icu.util.Calendar, int);
    method public android.icu.util.TimeZone getTimeZone();
    method public boolean isCalendarLenient();
    method public boolean isLenient();
    method public java.util.Date parse(java.lang.String) throws java.text.ParseException;
    method public abstract void parse(java.lang.String, android.icu.util.Calendar, java.text.ParsePosition);
    method public java.util.Date parse(java.lang.String, java.text.ParsePosition);
    method public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public android.icu.text.DateFormat setBooleanAttribute(android.icu.text.DateFormat.BooleanAttribute, boolean);
    method public void setCalendar(android.icu.util.Calendar);
    method public void setCalendarLenient(boolean);
    method public void setContext(android.icu.text.DisplayContext);
    method public void setLenient(boolean);
    method public void setNumberFormat(android.icu.text.NumberFormat);
    method public void setTimeZone(android.icu.util.TimeZone);
    field public static final java.lang.String ABBR_GENERIC_TZ = "v";
    field public static final java.lang.String ABBR_MONTH = "MMM";
    field public static final java.lang.String ABBR_MONTH_DAY = "MMMd";
    field public static final java.lang.String ABBR_MONTH_WEEKDAY_DAY = "MMMEd";
    field public static final java.lang.String ABBR_QUARTER = "QQQ";
    field public static final java.lang.String ABBR_SPECIFIC_TZ = "z";
    field public static final java.lang.String ABBR_UTC_TZ = "ZZZZ";
    field public static final java.lang.String ABBR_WEEKDAY = "E";
    field public static final int AM_PM_FIELD = 14; // 0xe
    field public static final int DATE_FIELD = 3; // 0x3
    field public static final java.lang.String DAY = "d";
    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 DOW_LOCAL_FIELD = 19; // 0x13
    field public static final int ERA_FIELD = 0; // 0x0
    field public static final int EXTENDED_YEAR_FIELD = 20; // 0x14
    field public static final int FIELD_COUNT = 36; // 0x24
    field public static final int FRACTIONAL_SECOND_FIELD = 8; // 0x8
    field public static final int FULL = 0; // 0x0
    field public static final java.lang.String GENERIC_TZ = "vvvv";
    field public static final java.lang.String HOUR = "j";
    field public static final int HOUR0_FIELD = 16; // 0x10
    field public static final int HOUR1_FIELD = 15; // 0xf
    field public static final java.lang.String HOUR24 = "H";
    field public static final java.lang.String HOUR24_MINUTE = "Hm";
    field public static final java.lang.String HOUR24_MINUTE_SECOND = "Hms";
    field public static final java.lang.String HOUR_MINUTE = "jm";
    field public static final java.lang.String HOUR_MINUTE_SECOND = "jms";
    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 JULIAN_DAY_FIELD = 21; // 0x15
    field public static final java.lang.String LOCATION_TZ = "VVVV";
    field public static final int LONG = 1; // 0x1
    field public static final int MEDIUM = 2; // 0x2
    field public static final int MILLISECONDS_IN_DAY_FIELD = 22; // 0x16
    field public static final int MILLISECOND_FIELD = 8; // 0x8
    field public static final java.lang.String MINUTE = "m";
    field public static final int MINUTE_FIELD = 6; // 0x6
    field public static final java.lang.String MINUTE_SECOND = "ms";
    field public static final java.lang.String MONTH = "MMMM";
    field public static final java.lang.String MONTH_DAY = "MMMMd";
    field public static final int MONTH_FIELD = 2; // 0x2
    field public static final java.lang.String MONTH_WEEKDAY_DAY = "MMMMEEEEd";
    field public static final int NONE = -1; // 0xffffffff
    field public static final java.lang.String NUM_MONTH = "M";
    field public static final java.lang.String NUM_MONTH_DAY = "Md";
    field public static final java.lang.String NUM_MONTH_WEEKDAY_DAY = "MEd";
    field public static final java.lang.String QUARTER = "QQQQ";
    field public static final int QUARTER_FIELD = 27; // 0x1b
    field public static final int RELATIVE = 128; // 0x80
    field public static final int RELATIVE_DEFAULT = 130; // 0x82
    field public static final int RELATIVE_FULL = 128; // 0x80
    field public static final int RELATIVE_LONG = 129; // 0x81
    field public static final int RELATIVE_MEDIUM = 130; // 0x82
    field public static final int RELATIVE_SHORT = 131; // 0x83
    field public static final java.lang.String SECOND = "s";
    field public static final int SECOND_FIELD = 7; // 0x7
    field public static final int SHORT = 3; // 0x3
    field public static final java.lang.String SPECIFIC_TZ = "zzzz";
    field public static final int STANDALONE_DAY_FIELD = 25; // 0x19
    field public static final int STANDALONE_MONTH_FIELD = 26; // 0x1a
    field public static final int STANDALONE_QUARTER_FIELD = 28; // 0x1c
    field public static final int TIMEZONE_FIELD = 17; // 0x11
    field public static final int TIMEZONE_GENERIC_FIELD = 24; // 0x18
    field public static final int TIMEZONE_ISO_FIELD = 32; // 0x20
    field public static final int TIMEZONE_ISO_LOCAL_FIELD = 33; // 0x21
    field public static final int TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31; // 0x1f
    field public static final int TIMEZONE_RFC_FIELD = 23; // 0x17
    field public static final int TIMEZONE_SPECIAL_FIELD = 29; // 0x1d
    field public static final java.lang.String WEEKDAY = "EEEE";
    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 java.lang.String YEAR = "y";
    field public static final java.lang.String YEAR_ABBR_MONTH = "yMMM";
    field public static final java.lang.String YEAR_ABBR_MONTH_DAY = "yMMMd";
    field public static final java.lang.String YEAR_ABBR_MONTH_WEEKDAY_DAY = "yMMMEd";
    field public static final java.lang.String YEAR_ABBR_QUARTER = "yQQQ";
    field public static final int YEAR_FIELD = 1; // 0x1
    field public static final java.lang.String YEAR_MONTH = "yMMMM";
    field public static final java.lang.String YEAR_MONTH_DAY = "yMMMMd";
    field public static final java.lang.String YEAR_MONTH_WEEKDAY_DAY = "yMMMMEEEEd";
    field public static final int YEAR_NAME_FIELD = 30; // 0x1e
    field public static final java.lang.String YEAR_NUM_MONTH = "yM";
    field public static final java.lang.String YEAR_NUM_MONTH_DAY = "yMd";
    field public static final java.lang.String YEAR_NUM_MONTH_WEEKDAY_DAY = "yMEd";
    field public static final java.lang.String YEAR_QUARTER = "yQQQQ";
    field public static final int YEAR_WOY_FIELD = 18; // 0x12
    field protected android.icu.util.Calendar calendar;
    field protected android.icu.text.NumberFormat numberFormat;
  }

  public static final class DateFormat.BooleanAttribute extends java.lang.Enum {
    method public static android.icu.text.DateFormat.BooleanAttribute valueOf(java.lang.String);
    method public static final android.icu.text.DateFormat.BooleanAttribute[] values();
    enum_constant public static final android.icu.text.DateFormat.BooleanAttribute PARSE_ALLOW_NUMERIC;
    enum_constant public static final android.icu.text.DateFormat.BooleanAttribute PARSE_ALLOW_WHITESPACE;
  }

  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 android.icu.text.DateFormat.Field ofCalendarField(int);
    field public static final android.icu.text.DateFormat.Field AM_PM;
    field public static final android.icu.text.DateFormat.Field DAY_OF_MONTH;
    field public static final android.icu.text.DateFormat.Field DAY_OF_WEEK;
    field public static final android.icu.text.DateFormat.Field DAY_OF_WEEK_IN_MONTH;
    field public static final android.icu.text.DateFormat.Field DAY_OF_YEAR;
    field public static final android.icu.text.DateFormat.Field DOW_LOCAL;
    field public static final android.icu.text.DateFormat.Field ERA;
    field public static final android.icu.text.DateFormat.Field EXTENDED_YEAR;
    field public static final android.icu.text.DateFormat.Field HOUR0;
    field public static final android.icu.text.DateFormat.Field HOUR1;
    field public static final android.icu.text.DateFormat.Field HOUR_OF_DAY0;
    field public static final android.icu.text.DateFormat.Field HOUR_OF_DAY1;
    field public static final android.icu.text.DateFormat.Field JULIAN_DAY;
    field public static final android.icu.text.DateFormat.Field MILLISECOND;
    field public static final android.icu.text.DateFormat.Field MILLISECONDS_IN_DAY;
    field public static final android.icu.text.DateFormat.Field MINUTE;
    field public static final android.icu.text.DateFormat.Field MONTH;
    field public static final android.icu.text.DateFormat.Field QUARTER;
    field public static final android.icu.text.DateFormat.Field SECOND;
    field public static final android.icu.text.DateFormat.Field TIME_ZONE;
    field public static final android.icu.text.DateFormat.Field WEEK_OF_MONTH;
    field public static final android.icu.text.DateFormat.Field WEEK_OF_YEAR;
    field public static final android.icu.text.DateFormat.Field YEAR;
    field public static final android.icu.text.DateFormat.Field YEAR_WOY;
  }

  public class DateFormatSymbols implements java.lang.Cloneable java.io.Serializable {
    ctor public DateFormatSymbols();
    ctor public DateFormatSymbols(java.util.Locale);
    ctor public DateFormatSymbols(android.icu.util.ULocale);
    ctor public DateFormatSymbols(android.icu.util.Calendar, java.util.Locale);
    ctor public DateFormatSymbols(android.icu.util.Calendar, android.icu.util.ULocale);
    ctor public DateFormatSymbols(java.lang.Class<? extends android.icu.util.Calendar>, java.util.Locale);
    ctor public DateFormatSymbols(java.lang.Class<? extends android.icu.util.Calendar>, android.icu.util.ULocale);
    ctor public DateFormatSymbols(java.util.ResourceBundle, java.util.Locale);
    ctor public DateFormatSymbols(java.util.ResourceBundle, android.icu.util.ULocale);
    method public java.lang.Object clone();
    method public java.lang.String[] getAmPmStrings();
    method public static java.util.Locale[] getAvailableLocales();
    method public java.lang.String[] getEraNames();
    method public java.lang.String[] getEras();
    method public static android.icu.text.DateFormatSymbols getInstance();
    method public static android.icu.text.DateFormatSymbols getInstance(java.util.Locale);
    method public static android.icu.text.DateFormatSymbols getInstance(android.icu.util.ULocale);
    method public java.lang.String getLocalPatternChars();
    method public java.lang.String[] getMonths();
    method public java.lang.String[] getMonths(int, int);
    method public java.lang.String[] getQuarters(int, int);
    method public java.lang.String[] getShortMonths();
    method public java.lang.String[] getShortWeekdays();
    method public java.lang.String[] getWeekdays();
    method public java.lang.String[] getWeekdays(int, int);
    method public java.lang.String[] getYearNames(int, int);
    method public java.lang.String[] getZodiacNames(int, int);
    method public java.lang.String[][] getZoneStrings();
    method protected void initializeData(android.icu.util.ULocale, java.lang.String);
    method public void setAmPmStrings(java.lang.String[]);
    method public void setEraNames(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 setMonths(java.lang.String[], int, int);
    method public void setQuarters(java.lang.String[], int, int);
    method public void setShortMonths(java.lang.String[]);
    method public void setShortWeekdays(java.lang.String[]);
    method public void setWeekdays(java.lang.String[], int, int);
    method public void setWeekdays(java.lang.String[]);
    method public void setYearNames(java.lang.String[], int, int);
    method public void setZodiacNames(java.lang.String[], int, int);
    method public void setZoneStrings(java.lang.String[][]);
    field public static final int ABBREVIATED = 0; // 0x0
    field public static final int FORMAT = 0; // 0x0
    field public static final int NARROW = 2; // 0x2
    field public static final int SHORT = 3; // 0x3
    field public static final int STANDALONE = 1; // 0x1
    field public static final int WIDE = 1; // 0x1
  }

  public class DateIntervalFormat extends android.icu.text.UFormat {
    method public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.StringBuffer format(android.icu.util.DateInterval, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.StringBuffer format(android.icu.util.Calendar, android.icu.util.Calendar, java.lang.StringBuffer, java.text.FieldPosition);
    method public android.icu.text.DateFormat getDateFormat();
    method public android.icu.text.DateIntervalInfo getDateIntervalInfo();
    method public static final android.icu.text.DateIntervalFormat getInstance(java.lang.String);
    method public static final android.icu.text.DateIntervalFormat getInstance(java.lang.String, java.util.Locale);
    method public static final android.icu.text.DateIntervalFormat getInstance(java.lang.String, android.icu.util.ULocale);
    method public static final android.icu.text.DateIntervalFormat getInstance(java.lang.String, android.icu.text.DateIntervalInfo);
    method public static final android.icu.text.DateIntervalFormat getInstance(java.lang.String, java.util.Locale, android.icu.text.DateIntervalInfo);
    method public static final android.icu.text.DateIntervalFormat getInstance(java.lang.String, android.icu.util.ULocale, android.icu.text.DateIntervalInfo);
    method public android.icu.util.TimeZone getTimeZone();
    method public deprecated java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public void setDateIntervalInfo(android.icu.text.DateIntervalInfo);
    method public void setTimeZone(android.icu.util.TimeZone);
  }

  public class DateIntervalInfo implements java.lang.Cloneable android.icu.util.Freezable java.io.Serializable {
    ctor public DateIntervalInfo(android.icu.util.ULocale);
    ctor public DateIntervalInfo(java.util.Locale);
    method public java.lang.Object clone();
    method public android.icu.text.DateIntervalInfo cloneAsThawed();
    method public android.icu.text.DateIntervalInfo freeze();
    method public boolean getDefaultOrder();
    method public java.lang.String getFallbackIntervalPattern();
    method public android.icu.text.DateIntervalInfo.PatternInfo getIntervalPattern(java.lang.String, int);
    method public boolean isFrozen();
    method public void setFallbackIntervalPattern(java.lang.String);
    method public void setIntervalPattern(java.lang.String, int, java.lang.String);
  }

  public static final class DateIntervalInfo.PatternInfo implements java.lang.Cloneable java.io.Serializable {
    ctor public DateIntervalInfo.PatternInfo(java.lang.String, java.lang.String, boolean);
    method public boolean firstDateInPtnIsLaterDate();
    method public java.lang.String getFirstPart();
    method public java.lang.String getSecondPart();
  }

  public class DateTimePatternGenerator implements java.lang.Cloneable android.icu.util.Freezable {
    ctor protected DateTimePatternGenerator();
    method public android.icu.text.DateTimePatternGenerator addPattern(java.lang.String, boolean, android.icu.text.DateTimePatternGenerator.PatternInfo);
    method public java.lang.Object clone();
    method public android.icu.text.DateTimePatternGenerator cloneAsThawed();
    method public android.icu.text.DateTimePatternGenerator freeze();
    method public java.lang.String getAppendItemFormat(int);
    method public java.lang.String getAppendItemName(int);
    method public java.lang.String getBaseSkeleton(java.lang.String);
    method public java.util.Set<java.lang.String> getBaseSkeletons(java.util.Set<java.lang.String>);
    method public java.lang.String getBestPattern(java.lang.String);
    method public java.lang.String getBestPattern(java.lang.String, int);
    method public java.lang.String getDateTimeFormat();
    method public java.lang.String getDecimal();
    method public static android.icu.text.DateTimePatternGenerator getEmptyInstance();
    method public static android.icu.text.DateTimePatternGenerator getInstance();
    method public static android.icu.text.DateTimePatternGenerator getInstance(android.icu.util.ULocale);
    method public static android.icu.text.DateTimePatternGenerator getInstance(java.util.Locale);
    method public java.lang.String getSkeleton(java.lang.String);
    method public java.util.Map<java.lang.String, java.lang.String> getSkeletons(java.util.Map<java.lang.String, java.lang.String>);
    method public boolean isFrozen();
    method public java.lang.String replaceFieldTypes(java.lang.String, java.lang.String);
    method public java.lang.String replaceFieldTypes(java.lang.String, java.lang.String, int);
    method public void setAppendItemFormat(int, java.lang.String);
    method public void setAppendItemName(int, java.lang.String);
    method public void setDateTimeFormat(java.lang.String);
    method public void setDecimal(java.lang.String);
    field public static final int DAY = 7; // 0x7
    field public static final int DAYPERIOD = 10; // 0xa
    field public static final int DAY_OF_WEEK_IN_MONTH = 9; // 0x9
    field public static final int DAY_OF_YEAR = 8; // 0x8
    field public static final int ERA = 0; // 0x0
    field public static final int FRACTIONAL_SECOND = 14; // 0xe
    field public static final int HOUR = 11; // 0xb
    field public static final int MATCH_ALL_FIELDS_LENGTH = 65535; // 0xffff
    field public static final int MATCH_HOUR_FIELD_LENGTH = 2048; // 0x800
    field public static final int MATCH_NO_OPTIONS = 0; // 0x0
    field public static final int MINUTE = 12; // 0xc
    field public static final int MONTH = 3; // 0x3
    field public static final int QUARTER = 2; // 0x2
    field public static final int SECOND = 13; // 0xd
    field public static final int TYPE_LIMIT = 16; // 0x10
    field public static final int WEEKDAY = 6; // 0x6
    field public static final int WEEK_OF_MONTH = 5; // 0x5
    field public static final int WEEK_OF_YEAR = 4; // 0x4
    field public static final int YEAR = 1; // 0x1
    field public static final int ZONE = 15; // 0xf
  }

  public static final class DateTimePatternGenerator.PatternInfo {
    ctor public DateTimePatternGenerator.PatternInfo();
    field public static final int BASE_CONFLICT = 1; // 0x1
    field public static final int CONFLICT = 2; // 0x2
    field public static final int OK = 0; // 0x0
    field public java.lang.String conflictingPattern;
    field public int status;
  }

  public class DecimalFormat extends android.icu.text.NumberFormat {
    ctor public DecimalFormat();
    ctor public DecimalFormat(java.lang.String);
    ctor public DecimalFormat(java.lang.String, android.icu.text.DecimalFormatSymbols);
    ctor public DecimalFormat(java.lang.String, android.icu.text.DecimalFormatSymbols, android.icu.text.CurrencyPluralInfo, int);
    method public void applyLocalizedPattern(java.lang.String);
    method public void applyPattern(java.lang.String);
    method public boolean areSignificantDigitsUsed();
    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.StringBuffer format(java.math.BigInteger, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(java.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(android.icu.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition);
    method public android.icu.text.CurrencyPluralInfo getCurrencyPluralInfo();
    method public android.icu.util.Currency.CurrencyUsage getCurrencyUsage();
    method public android.icu.text.DecimalFormatSymbols getDecimalFormatSymbols();
    method public int getFormatWidth();
    method public int getGroupingSize();
    method public java.math.MathContext getMathContext();
    method public android.icu.math.MathContext getMathContextICU();
    method public int getMaximumSignificantDigits();
    method public byte getMinimumExponentDigits();
    method public int getMinimumSignificantDigits();
    method public int getMultiplier();
    method public java.lang.String getNegativePrefix();
    method public java.lang.String getNegativeSuffix();
    method public char getPadCharacter();
    method public int getPadPosition();
    method public int getParseMaxDigits();
    method public java.lang.String getPositivePrefix();
    method public java.lang.String getPositiveSuffix();
    method public java.math.BigDecimal getRoundingIncrement();
    method public int getSecondaryGroupingSize();
    method public boolean isDecimalPatternMatchRequired();
    method public boolean isDecimalSeparatorAlwaysShown();
    method public boolean isExponentSignAlwaysShown();
    method public boolean isParseBigDecimal();
    method public boolean isScientificNotation();
    method public java.lang.Number parse(java.lang.String, java.text.ParsePosition);
    method public void setCurrencyPluralInfo(android.icu.text.CurrencyPluralInfo);
    method public void setCurrencyUsage(android.icu.util.Currency.CurrencyUsage);
    method public void setDecimalFormatSymbols(android.icu.text.DecimalFormatSymbols);
    method public void setDecimalPatternMatchRequired(boolean);
    method public void setDecimalSeparatorAlwaysShown(boolean);
    method public void setExponentSignAlwaysShown(boolean);
    method public void setFormatWidth(int);
    method public void setGroupingSize(int);
    method public void setMathContext(java.math.MathContext);
    method public void setMathContextICU(android.icu.math.MathContext);
    method public void setMaximumSignificantDigits(int);
    method public void setMinimumExponentDigits(byte);
    method public void setMinimumSignificantDigits(int);
    method public void setMultiplier(int);
    method public void setNegativePrefix(java.lang.String);
    method public void setNegativeSuffix(java.lang.String);
    method public void setPadCharacter(char);
    method public void setPadPosition(int);
    method public void setParseBigDecimal(boolean);
    method public void setParseMaxDigits(int);
    method public void setPositivePrefix(java.lang.String);
    method public void setPositiveSuffix(java.lang.String);
    method public void setRoundingIncrement(java.math.BigDecimal);
    method public void setRoundingIncrement(android.icu.math.BigDecimal);
    method public void setRoundingIncrement(double);
    method public void setScientificNotation(boolean);
    method public void setSecondaryGroupingSize(int);
    method public void setSignificantDigitsUsed(boolean);
    method public java.lang.String toLocalizedPattern();
    method public java.lang.String toPattern();
    field public static final int PAD_AFTER_PREFIX = 1; // 0x1
    field public static final int PAD_AFTER_SUFFIX = 3; // 0x3
    field public static final int PAD_BEFORE_PREFIX = 0; // 0x0
    field public static final int PAD_BEFORE_SUFFIX = 2; // 0x2
  }

  public class DecimalFormatSymbols implements java.lang.Cloneable java.io.Serializable {
    ctor public DecimalFormatSymbols();
    ctor public DecimalFormatSymbols(java.util.Locale);
    ctor public DecimalFormatSymbols(android.icu.util.ULocale);
    method public java.lang.Object clone();
    method public static java.util.Locale[] getAvailableLocales();
    method public android.icu.util.Currency getCurrency();
    method public java.lang.String getCurrencySymbol();
    method public char getDecimalSeparator();
    method public char getDigit();
    method public char[] getDigits();
    method public java.lang.String getExponentMultiplicationSign();
    method public java.lang.String getExponentSeparator();
    method public char getGroupingSeparator();
    method public java.lang.String getInfinity();
    method public static android.icu.text.DecimalFormatSymbols getInstance();
    method public static android.icu.text.DecimalFormatSymbols getInstance(java.util.Locale);
    method public static android.icu.text.DecimalFormatSymbols getInstance(android.icu.util.ULocale);
    method public java.lang.String getInternationalCurrencySymbol();
    method public java.util.Locale getLocale();
    method public char getMinusSign();
    method public char getMonetaryDecimalSeparator();
    method public char getMonetaryGroupingSeparator();
    method public java.lang.String getNaN();
    method public char getPadEscape();
    method public java.lang.String getPatternForCurrencySpacing(int, boolean);
    method public char getPatternSeparator();
    method public char getPerMill();
    method public char getPercent();
    method public char getPlusSign();
    method public char getSignificantDigit();
    method public android.icu.util.ULocale getULocale();
    method public char getZeroDigit();
    method public void setCurrency(android.icu.util.Currency);
    method public void setCurrencySymbol(java.lang.String);
    method public void setDecimalSeparator(char);
    method public void setDigit(char);
    method public void setExponentMultiplicationSign(java.lang.String);
    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 setMonetaryGroupingSeparator(char);
    method public void setNaN(java.lang.String);
    method public void setPadEscape(char);
    method public void setPatternForCurrencySpacing(int, boolean, java.lang.String);
    method public void setPatternSeparator(char);
    method public void setPerMill(char);
    method public void setPercent(char);
    method public void setPlusSign(char);
    method public void setSignificantDigit(char);
    method public void setZeroDigit(char);
    field public static final int CURRENCY_SPC_CURRENCY_MATCH = 0; // 0x0
    field public static final int CURRENCY_SPC_INSERT = 2; // 0x2
    field public static final int CURRENCY_SPC_SURROUNDING_MATCH = 1; // 0x1
  }

  public final class DisplayContext extends java.lang.Enum {
    method public android.icu.text.DisplayContext.Type type();
    method public int value();
    method public static android.icu.text.DisplayContext valueOf(java.lang.String);
    method public static final android.icu.text.DisplayContext[] values();
    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE;
    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE;
    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_STANDALONE;
    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_FOR_UI_LIST_OR_MENU;
    enum_constant public static final android.icu.text.DisplayContext CAPITALIZATION_NONE;
    enum_constant public static final android.icu.text.DisplayContext DIALECT_NAMES;
    enum_constant public static final android.icu.text.DisplayContext LENGTH_FULL;
    enum_constant public static final android.icu.text.DisplayContext LENGTH_SHORT;
    enum_constant public static final android.icu.text.DisplayContext STANDARD_NAMES;
  }

  public static final class DisplayContext.Type extends java.lang.Enum {
    method public static android.icu.text.DisplayContext.Type valueOf(java.lang.String);
    method public static final android.icu.text.DisplayContext.Type[] values();
    enum_constant public static final android.icu.text.DisplayContext.Type CAPITALIZATION;
    enum_constant public static final android.icu.text.DisplayContext.Type DIALECT_HANDLING;
    enum_constant public static final android.icu.text.DisplayContext.Type DISPLAY_LENGTH;
  }

  public abstract class IDNA {
    method public static android.icu.text.IDNA getUTS46Instance(int);
    method public abstract java.lang.StringBuilder labelToASCII(java.lang.CharSequence, java.lang.StringBuilder, android.icu.text.IDNA.Info);
    method public abstract java.lang.StringBuilder labelToUnicode(java.lang.CharSequence, java.lang.StringBuilder, android.icu.text.IDNA.Info);
    method public abstract java.lang.StringBuilder nameToASCII(java.lang.CharSequence, java.lang.StringBuilder, android.icu.text.IDNA.Info);
    method public abstract java.lang.StringBuilder nameToUnicode(java.lang.CharSequence, java.lang.StringBuilder, android.icu.text.IDNA.Info);
    field public static final int CHECK_BIDI = 4; // 0x4
    field public static final int CHECK_CONTEXTJ = 8; // 0x8
    field public static final int CHECK_CONTEXTO = 64; // 0x40
    field public static final int DEFAULT = 0; // 0x0
    field public static final int NONTRANSITIONAL_TO_ASCII = 16; // 0x10
    field public static final int NONTRANSITIONAL_TO_UNICODE = 32; // 0x20
    field public static final int USE_STD3_RULES = 2; // 0x2
  }

  public static final class IDNA.Error extends java.lang.Enum {
    method public static android.icu.text.IDNA.Error valueOf(java.lang.String);
    method public static final android.icu.text.IDNA.Error[] values();
    enum_constant public static final android.icu.text.IDNA.Error BIDI;
    enum_constant public static final android.icu.text.IDNA.Error CONTEXTJ;
    enum_constant public static final android.icu.text.IDNA.Error CONTEXTO_DIGITS;
    enum_constant public static final android.icu.text.IDNA.Error CONTEXTO_PUNCTUATION;
    enum_constant public static final android.icu.text.IDNA.Error DISALLOWED;
    enum_constant public static final android.icu.text.IDNA.Error DOMAIN_NAME_TOO_LONG;
    enum_constant public static final android.icu.text.IDNA.Error EMPTY_LABEL;
    enum_constant public static final android.icu.text.IDNA.Error HYPHEN_3_4;
    enum_constant public static final android.icu.text.IDNA.Error INVALID_ACE_LABEL;
    enum_constant public static final android.icu.text.IDNA.Error LABEL_HAS_DOT;
    enum_constant public static final android.icu.text.IDNA.Error LABEL_TOO_LONG;
    enum_constant public static final android.icu.text.IDNA.Error LEADING_COMBINING_MARK;
    enum_constant public static final android.icu.text.IDNA.Error LEADING_HYPHEN;
    enum_constant public static final android.icu.text.IDNA.Error PUNYCODE;
    enum_constant public static final android.icu.text.IDNA.Error TRAILING_HYPHEN;
  }

  public static final class IDNA.Info {
    ctor public IDNA.Info();
    method public java.util.Set<android.icu.text.IDNA.Error> getErrors();
    method public boolean hasErrors();
    method public boolean isTransitionalDifferent();
  }

  public abstract class LocaleDisplayNames {
    method public abstract android.icu.text.DisplayContext getContext(android.icu.text.DisplayContext.Type);
    method public abstract android.icu.text.LocaleDisplayNames.DialectHandling getDialectHandling();
    method public static android.icu.text.LocaleDisplayNames getInstance(android.icu.util.ULocale);
    method public static android.icu.text.LocaleDisplayNames getInstance(java.util.Locale);
    method public static android.icu.text.LocaleDisplayNames getInstance(android.icu.util.ULocale, android.icu.text.LocaleDisplayNames.DialectHandling);
    method public static android.icu.text.LocaleDisplayNames getInstance(android.icu.util.ULocale, android.icu.text.DisplayContext...);
    method public static android.icu.text.LocaleDisplayNames getInstance(java.util.Locale, android.icu.text.DisplayContext...);
    method public abstract android.icu.util.ULocale getLocale();
    method public abstract java.lang.String keyDisplayName(java.lang.String);
    method public abstract java.lang.String keyValueDisplayName(java.lang.String, java.lang.String);
    method public abstract java.lang.String languageDisplayName(java.lang.String);
    method public abstract java.lang.String localeDisplayName(android.icu.util.ULocale);
    method public abstract java.lang.String localeDisplayName(java.util.Locale);
    method public abstract java.lang.String localeDisplayName(java.lang.String);
    method public abstract java.lang.String regionDisplayName(java.lang.String);
    method public abstract java.lang.String scriptDisplayName(java.lang.String);
    method public abstract java.lang.String scriptDisplayName(int);
    method public abstract java.lang.String variantDisplayName(java.lang.String);
  }

  public static final class LocaleDisplayNames.DialectHandling extends java.lang.Enum {
    method public static android.icu.text.LocaleDisplayNames.DialectHandling valueOf(java.lang.String);
    method public static final android.icu.text.LocaleDisplayNames.DialectHandling[] values();
    enum_constant public static final android.icu.text.LocaleDisplayNames.DialectHandling DIALECT_NAMES;
    enum_constant public static final android.icu.text.LocaleDisplayNames.DialectHandling STANDARD_NAMES;
  }

  public class MeasureFormat extends android.icu.text.UFormat {
    method public final boolean equals(java.lang.Object);
    method public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String formatMeasures(android.icu.util.Measure...);
    method public java.lang.StringBuilder formatMeasures(java.lang.StringBuilder, java.text.FieldPosition, android.icu.util.Measure...);
    method public static android.icu.text.MeasureFormat getCurrencyFormat(android.icu.util.ULocale);
    method public static android.icu.text.MeasureFormat getCurrencyFormat(java.util.Locale);
    method public static android.icu.text.MeasureFormat getCurrencyFormat();
    method public static android.icu.text.MeasureFormat getInstance(android.icu.util.ULocale, android.icu.text.MeasureFormat.FormatWidth);
    method public static android.icu.text.MeasureFormat getInstance(java.util.Locale, android.icu.text.MeasureFormat.FormatWidth);
    method public static android.icu.text.MeasureFormat getInstance(android.icu.util.ULocale, android.icu.text.MeasureFormat.FormatWidth, android.icu.text.NumberFormat);
    method public static android.icu.text.MeasureFormat getInstance(java.util.Locale, android.icu.text.MeasureFormat.FormatWidth, android.icu.text.NumberFormat);
    method public final android.icu.util.ULocale getLocale();
    method public android.icu.text.NumberFormat getNumberFormat();
    method public android.icu.text.MeasureFormat.FormatWidth getWidth();
    method public final int hashCode();
    method public android.icu.util.Measure parseObject(java.lang.String, java.text.ParsePosition);
  }

  public static final class MeasureFormat.FormatWidth extends java.lang.Enum {
    method public static android.icu.text.MeasureFormat.FormatWidth valueOf(java.lang.String);
    method public static final android.icu.text.MeasureFormat.FormatWidth[] values();
    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth NARROW;
    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth NUMERIC;
    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth SHORT;
    enum_constant public static final android.icu.text.MeasureFormat.FormatWidth WIDE;
  }

  public class MessageFormat extends android.icu.text.UFormat {
    ctor public MessageFormat(java.lang.String);
    ctor public MessageFormat(java.lang.String, java.util.Locale);
    ctor public MessageFormat(java.lang.String, android.icu.util.ULocale);
    method public void applyPattern(java.lang.String);
    method public void applyPattern(java.lang.String, android.icu.text.MessagePattern.ApostropheMode);
    method public static java.lang.String autoQuoteApostrophe(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.util.Map<java.lang.String, java.lang.Object>, java.lang.StringBuffer, java.text.FieldPosition);
    method public static java.lang.String format(java.lang.String, java.lang.Object...);
    method public static java.lang.String format(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>);
    method public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public android.icu.text.MessagePattern.ApostropheMode getApostropheMode();
    method public java.util.Set<java.lang.String> getArgumentNames();
    method public java.text.Format getFormatByArgumentName(java.lang.String);
    method public java.text.Format[] getFormats();
    method public java.text.Format[] getFormatsByArgumentIndex();
    method public java.util.Locale getLocale();
    method public android.icu.util.ULocale getULocale();
    method public java.lang.Object[] parse(java.lang.String, java.text.ParsePosition);
    method public java.lang.Object[] parse(java.lang.String) throws java.text.ParseException;
    method public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public java.util.Map<java.lang.String, java.lang.Object> parseToMap(java.lang.String, java.text.ParsePosition);
    method public java.util.Map<java.lang.String, java.lang.Object> parseToMap(java.lang.String) throws java.text.ParseException;
    method public void setFormat(int, java.text.Format);
    method public void setFormatByArgumentIndex(int, java.text.Format);
    method public void setFormatByArgumentName(java.lang.String, java.text.Format);
    method public void setFormats(java.text.Format[]);
    method public void setFormatsByArgumentIndex(java.text.Format[]);
    method public void setFormatsByArgumentName(java.util.Map<java.lang.String, java.text.Format>);
    method public void setLocale(java.util.Locale);
    method public void setLocale(android.icu.util.ULocale);
    method public java.lang.String toPattern();
    method public boolean usesNamedArguments();
  }

  public static class MessageFormat.Field extends java.text.Format.Field {
    ctor protected MessageFormat.Field(java.lang.String);
    field public static final android.icu.text.MessageFormat.Field ARGUMENT;
  }

  public final class MessagePattern implements java.lang.Cloneable android.icu.util.Freezable {
    ctor public MessagePattern();
    ctor public MessagePattern(android.icu.text.MessagePattern.ApostropheMode);
    ctor public MessagePattern(java.lang.String);
    method public java.lang.String autoQuoteApostropheDeep();
    method public void clear();
    method public void clearPatternAndSetApostropheMode(android.icu.text.MessagePattern.ApostropheMode);
    method public java.lang.Object clone();
    method public android.icu.text.MessagePattern cloneAsThawed();
    method public int countParts();
    method public android.icu.text.MessagePattern freeze();
    method public android.icu.text.MessagePattern.ApostropheMode getApostropheMode();
    method public int getLimitPartIndex(int);
    method public double getNumericValue(android.icu.text.MessagePattern.Part);
    method public android.icu.text.MessagePattern.Part getPart(int);
    method public android.icu.text.MessagePattern.Part.Type getPartType(int);
    method public int getPatternIndex(int);
    method public java.lang.String getPatternString();
    method public double getPluralOffset(int);
    method public java.lang.String getSubstring(android.icu.text.MessagePattern.Part);
    method public boolean hasNamedArguments();
    method public boolean hasNumberedArguments();
    method public boolean isFrozen();
    method public android.icu.text.MessagePattern parse(java.lang.String);
    method public android.icu.text.MessagePattern parseChoiceStyle(java.lang.String);
    method public android.icu.text.MessagePattern parsePluralStyle(java.lang.String);
    method public android.icu.text.MessagePattern parseSelectStyle(java.lang.String);
    method public boolean partSubstringMatches(android.icu.text.MessagePattern.Part, java.lang.String);
    method public static int validateArgumentName(java.lang.String);
    field public static final int ARG_NAME_NOT_NUMBER = -1; // 0xffffffff
    field public static final int ARG_NAME_NOT_VALID = -2; // 0xfffffffe
    field public static final double NO_NUMERIC_VALUE = -1.23456789E8;
  }

  public static final class MessagePattern.ApostropheMode extends java.lang.Enum {
    method public static android.icu.text.MessagePattern.ApostropheMode valueOf(java.lang.String);
    method public static final android.icu.text.MessagePattern.ApostropheMode[] values();
    enum_constant public static final android.icu.text.MessagePattern.ApostropheMode DOUBLE_OPTIONAL;
    enum_constant public static final android.icu.text.MessagePattern.ApostropheMode DOUBLE_REQUIRED;
  }

  public static final class MessagePattern.ArgType extends java.lang.Enum {
    method public boolean hasPluralStyle();
    method public static android.icu.text.MessagePattern.ArgType valueOf(java.lang.String);
    method public static final android.icu.text.MessagePattern.ArgType[] values();
    enum_constant public static final android.icu.text.MessagePattern.ArgType CHOICE;
    enum_constant public static final android.icu.text.MessagePattern.ArgType NONE;
    enum_constant public static final android.icu.text.MessagePattern.ArgType PLURAL;
    enum_constant public static final android.icu.text.MessagePattern.ArgType SELECT;
    enum_constant public static final android.icu.text.MessagePattern.ArgType SELECTORDINAL;
    enum_constant public static final android.icu.text.MessagePattern.ArgType SIMPLE;
  }

  public static final class MessagePattern.Part {
    method public android.icu.text.MessagePattern.ArgType getArgType();
    method public int getIndex();
    method public int getLength();
    method public int getLimit();
    method public android.icu.text.MessagePattern.Part.Type getType();
    method public int getValue();
  }

  public static final class MessagePattern.Part.Type extends java.lang.Enum {
    method public boolean hasNumericValue();
    method public static android.icu.text.MessagePattern.Part.Type valueOf(java.lang.String);
    method public static final android.icu.text.MessagePattern.Part.Type[] values();
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_DOUBLE;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_INT;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_LIMIT;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_NAME;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_NUMBER;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_SELECTOR;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_START;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_STYLE;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type ARG_TYPE;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type INSERT_CHAR;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type MSG_LIMIT;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type MSG_START;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type REPLACE_NUMBER;
    enum_constant public static final android.icu.text.MessagePattern.Part.Type SKIP_SYNTAX;
  }

  public final class Normalizer implements java.lang.Cloneable {
    method public static int compare(char[], int, int, char[], int, int, int);
    method public static int compare(java.lang.String, java.lang.String, int);
    method public static int compare(char[], char[], int);
    method public static int compare(int, int, int);
    method public static int compare(int, java.lang.String, int);
    field public static final int COMPARE_CODE_POINT_ORDER = 32768; // 0x8000
    field public static final int COMPARE_IGNORE_CASE = 65536; // 0x10000
    field public static final int FOLD_CASE_DEFAULT = 0; // 0x0
    field public static final int FOLD_CASE_EXCLUDE_SPECIAL_I = 1; // 0x1
    field public static final int INPUT_IS_FCD = 131072; // 0x20000
    field public static final android.icu.text.Normalizer.QuickCheckResult MAYBE;
    field public static final android.icu.text.Normalizer.QuickCheckResult NO;
    field public static final android.icu.text.Normalizer.QuickCheckResult YES;
  }

  public static final class Normalizer.QuickCheckResult {
  }

  public abstract class Normalizer2 {
    method public abstract java.lang.StringBuilder append(java.lang.StringBuilder, java.lang.CharSequence);
    method public int composePair(int, int);
    method public int getCombiningClass(int);
    method public abstract java.lang.String getDecomposition(int);
    method public static android.icu.text.Normalizer2 getInstance(java.io.InputStream, java.lang.String, android.icu.text.Normalizer2.Mode);
    method public static android.icu.text.Normalizer2 getNFCInstance();
    method public static android.icu.text.Normalizer2 getNFDInstance();
    method public static android.icu.text.Normalizer2 getNFKCCasefoldInstance();
    method public static android.icu.text.Normalizer2 getNFKCInstance();
    method public static android.icu.text.Normalizer2 getNFKDInstance();
    method public java.lang.String getRawDecomposition(int);
    method public abstract boolean hasBoundaryAfter(int);
    method public abstract boolean hasBoundaryBefore(int);
    method public abstract boolean isInert(int);
    method public abstract boolean isNormalized(java.lang.CharSequence);
    method public java.lang.String normalize(java.lang.CharSequence);
    method public abstract java.lang.StringBuilder normalize(java.lang.CharSequence, java.lang.StringBuilder);
    method public abstract java.lang.Appendable normalize(java.lang.CharSequence, java.lang.Appendable);
    method public abstract java.lang.StringBuilder normalizeSecondAndAppend(java.lang.StringBuilder, java.lang.CharSequence);
    method public abstract android.icu.text.Normalizer.QuickCheckResult quickCheck(java.lang.CharSequence);
    method public abstract int spanQuickCheckYes(java.lang.CharSequence);
  }

  public static final class Normalizer2.Mode extends java.lang.Enum {
    method public static android.icu.text.Normalizer2.Mode valueOf(java.lang.String);
    method public static final android.icu.text.Normalizer2.Mode[] values();
    enum_constant public static final android.icu.text.Normalizer2.Mode COMPOSE;
    enum_constant public static final android.icu.text.Normalizer2.Mode COMPOSE_CONTIGUOUS;
    enum_constant public static final android.icu.text.Normalizer2.Mode DECOMPOSE;
    enum_constant public static final android.icu.text.Normalizer2.Mode FCD;
  }

  public abstract class NumberFormat extends android.icu.text.UFormat {
    ctor public NumberFormat();
    method public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String format(double);
    method public final java.lang.String format(long);
    method public final java.lang.String format(java.math.BigInteger);
    method public final java.lang.String format(java.math.BigDecimal);
    method public final java.lang.String format(android.icu.math.BigDecimal);
    method public final java.lang.String format(android.icu.util.CurrencyAmount);
    method public abstract java.lang.StringBuffer format(double, java.lang.StringBuffer, java.text.FieldPosition);
    method public abstract java.lang.StringBuffer format(long, java.lang.StringBuffer, java.text.FieldPosition);
    method public abstract java.lang.StringBuffer format(java.math.BigInteger, java.lang.StringBuffer, java.text.FieldPosition);
    method public abstract java.lang.StringBuffer format(java.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition);
    method public abstract java.lang.StringBuffer format(android.icu.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(android.icu.util.CurrencyAmount, java.lang.StringBuffer, java.text.FieldPosition);
    method public static java.util.Locale[] getAvailableLocales();
    method public android.icu.text.DisplayContext getContext(android.icu.text.DisplayContext.Type);
    method public android.icu.util.Currency getCurrency();
    method public static final android.icu.text.NumberFormat getCurrencyInstance();
    method public static android.icu.text.NumberFormat getCurrencyInstance(java.util.Locale);
    method public static android.icu.text.NumberFormat getCurrencyInstance(android.icu.util.ULocale);
    method public static final android.icu.text.NumberFormat getInstance();
    method public static android.icu.text.NumberFormat getInstance(java.util.Locale);
    method public static android.icu.text.NumberFormat getInstance(android.icu.util.ULocale);
    method public static final android.icu.text.NumberFormat getInstance(int);
    method public static android.icu.text.NumberFormat getInstance(java.util.Locale, int);
    method public static android.icu.text.NumberFormat getInstance(android.icu.util.ULocale, int);
    method public static final android.icu.text.NumberFormat getIntegerInstance();
    method public static android.icu.text.NumberFormat getIntegerInstance(java.util.Locale);
    method public static android.icu.text.NumberFormat getIntegerInstance(android.icu.util.ULocale);
    method public int getMaximumFractionDigits();
    method public int getMaximumIntegerDigits();
    method public int getMinimumFractionDigits();
    method public int getMinimumIntegerDigits();
    method public static final android.icu.text.NumberFormat getNumberInstance();
    method public static android.icu.text.NumberFormat getNumberInstance(java.util.Locale);
    method public static android.icu.text.NumberFormat getNumberInstance(android.icu.util.ULocale);
    method protected static java.lang.String getPattern(android.icu.util.ULocale, int);
    method public static final android.icu.text.NumberFormat getPercentInstance();
    method public static android.icu.text.NumberFormat getPercentInstance(java.util.Locale);
    method public static android.icu.text.NumberFormat getPercentInstance(android.icu.util.ULocale);
    method public int getRoundingMode();
    method public static final android.icu.text.NumberFormat getScientificInstance();
    method public static android.icu.text.NumberFormat getScientificInstance(java.util.Locale);
    method public static android.icu.text.NumberFormat getScientificInstance(android.icu.util.ULocale);
    method public boolean isGroupingUsed();
    method public boolean isParseIntegerOnly();
    method public boolean isParseStrict();
    method public abstract java.lang.Number parse(java.lang.String, java.text.ParsePosition);
    method public java.lang.Number parse(java.lang.String) throws java.text.ParseException;
    method public android.icu.util.CurrencyAmount parseCurrency(java.lang.CharSequence, java.text.ParsePosition);
    method public final java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public static java.lang.Object registerFactory(android.icu.text.NumberFormat.NumberFormatFactory);
    method public void setContext(android.icu.text.DisplayContext);
    method public void setCurrency(android.icu.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 setParseStrict(boolean);
    method public void setRoundingMode(int);
    method public static boolean unregister(java.lang.Object);
    field public static final int ACCOUNTINGCURRENCYSTYLE = 7; // 0x7
    field public static final int CASHCURRENCYSTYLE = 8; // 0x8
    field public static final int CURRENCYSTYLE = 1; // 0x1
    field public static final int FRACTION_FIELD = 1; // 0x1
    field public static final int INTEGERSTYLE = 4; // 0x4
    field public static final int INTEGER_FIELD = 0; // 0x0
    field public static final int ISOCURRENCYSTYLE = 5; // 0x5
    field public static final int NUMBERSTYLE = 0; // 0x0
    field public static final int PERCENTSTYLE = 2; // 0x2
    field public static final int PLURALCURRENCYSTYLE = 6; // 0x6
    field public static final int SCIENTIFICSTYLE = 3; // 0x3
  }

  public static class NumberFormat.Field extends java.text.Format.Field {
    ctor protected NumberFormat.Field(java.lang.String);
    field public static final android.icu.text.NumberFormat.Field CURRENCY;
    field public static final android.icu.text.NumberFormat.Field DECIMAL_SEPARATOR;
    field public static final android.icu.text.NumberFormat.Field EXPONENT;
    field public static final android.icu.text.NumberFormat.Field EXPONENT_SIGN;
    field public static final android.icu.text.NumberFormat.Field EXPONENT_SYMBOL;
    field public static final android.icu.text.NumberFormat.Field FRACTION;
    field public static final android.icu.text.NumberFormat.Field GROUPING_SEPARATOR;
    field public static final android.icu.text.NumberFormat.Field INTEGER;
    field public static final android.icu.text.NumberFormat.Field PERCENT;
    field public static final android.icu.text.NumberFormat.Field PERMILLE;
    field public static final android.icu.text.NumberFormat.Field SIGN;
  }

  public static abstract class NumberFormat.NumberFormatFactory {
    ctor protected NumberFormat.NumberFormatFactory();
    method public android.icu.text.NumberFormat createFormat(android.icu.util.ULocale, int);
    method public android.icu.text.NumberFormat createFormat(java.util.Locale, int);
    method public abstract java.util.Set<java.lang.String> getSupportedLocaleNames();
    method public boolean visible();
    field public static final int FORMAT_CURRENCY = 1; // 0x1
    field public static final int FORMAT_INTEGER = 4; // 0x4
    field public static final int FORMAT_NUMBER = 0; // 0x0
    field public static final int FORMAT_PERCENT = 2; // 0x2
    field public static final int FORMAT_SCIENTIFIC = 3; // 0x3
  }

  public static abstract class NumberFormat.SimpleNumberFormatFactory extends android.icu.text.NumberFormat.NumberFormatFactory {
    ctor public NumberFormat.SimpleNumberFormatFactory(java.util.Locale);
    ctor public NumberFormat.SimpleNumberFormatFactory(java.util.Locale, boolean);
    ctor public NumberFormat.SimpleNumberFormatFactory(android.icu.util.ULocale);
    ctor public NumberFormat.SimpleNumberFormatFactory(android.icu.util.ULocale, boolean);
    method public final java.util.Set<java.lang.String> getSupportedLocaleNames();
    method public final boolean visible();
  }

  public class NumberingSystem {
    ctor public NumberingSystem();
    method public static java.lang.String[] getAvailableNames();
    method public java.lang.String getDescription();
    method public static android.icu.text.NumberingSystem getInstance(int, boolean, java.lang.String);
    method public static android.icu.text.NumberingSystem getInstance(java.util.Locale);
    method public static android.icu.text.NumberingSystem getInstance(android.icu.util.ULocale);
    method public static android.icu.text.NumberingSystem getInstance();
    method public static android.icu.text.NumberingSystem getInstanceByName(java.lang.String);
    method public java.lang.String getName();
    method public int getRadix();
    method public boolean isAlgorithmic();
    method public static boolean isValidDigitString(java.lang.String);
  }

  public class PluralFormat extends android.icu.text.UFormat {
    ctor public PluralFormat();
    ctor public PluralFormat(android.icu.util.ULocale);
    ctor public PluralFormat(java.util.Locale);
    ctor public PluralFormat(android.icu.text.PluralRules);
    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules);
    ctor public PluralFormat(java.util.Locale, android.icu.text.PluralRules);
    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules.PluralType);
    ctor public PluralFormat(java.util.Locale, android.icu.text.PluralRules.PluralType);
    ctor public PluralFormat(java.lang.String);
    ctor public PluralFormat(android.icu.util.ULocale, java.lang.String);
    ctor public PluralFormat(android.icu.text.PluralRules, java.lang.String);
    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules, java.lang.String);
    ctor public PluralFormat(android.icu.util.ULocale, android.icu.text.PluralRules.PluralType, java.lang.String);
    method public void applyPattern(java.lang.String);
    method public boolean equals(android.icu.text.PluralFormat);
    method public final java.lang.String format(double);
    method public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.Number parse(java.lang.String, java.text.ParsePosition);
    method public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public void setNumberFormat(android.icu.text.NumberFormat);
    method public java.lang.String toPattern();
  }

  public class PluralRules implements java.io.Serializable {
    method public static android.icu.text.PluralRules createRules(java.lang.String);
    method public boolean equals(android.icu.text.PluralRules);
    method public static android.icu.text.PluralRules forLocale(android.icu.util.ULocale);
    method public static android.icu.text.PluralRules forLocale(java.util.Locale);
    method public static android.icu.text.PluralRules forLocale(android.icu.util.ULocale, android.icu.text.PluralRules.PluralType);
    method public static android.icu.text.PluralRules forLocale(java.util.Locale, android.icu.text.PluralRules.PluralType);
    method public java.util.Collection<java.lang.Double> getAllKeywordValues(java.lang.String);
    method public java.util.Set<java.lang.String> getKeywords();
    method public java.util.Collection<java.lang.Double> getSamples(java.lang.String);
    method public double getUniqueKeywordValue(java.lang.String);
    method public static android.icu.text.PluralRules parseDescription(java.lang.String) throws java.text.ParseException;
    method public java.lang.String select(double);
    field public static final android.icu.text.PluralRules DEFAULT;
    field public static final java.lang.String KEYWORD_FEW = "few";
    field public static final java.lang.String KEYWORD_MANY = "many";
    field public static final java.lang.String KEYWORD_ONE = "one";
    field public static final java.lang.String KEYWORD_OTHER = "other";
    field public static final java.lang.String KEYWORD_TWO = "two";
    field public static final java.lang.String KEYWORD_ZERO = "zero";
    field public static final double NO_UNIQUE_VALUE = -0.00123456777;
  }

  public static final class PluralRules.PluralType extends java.lang.Enum {
    method public static android.icu.text.PluralRules.PluralType valueOf(java.lang.String);
    method public static final android.icu.text.PluralRules.PluralType[] values();
    enum_constant public static final android.icu.text.PluralRules.PluralType CARDINAL;
    enum_constant public static final android.icu.text.PluralRules.PluralType ORDINAL;
  }

  public final class RawCollationKey extends android.icu.util.ByteArrayWrapper {
    ctor public RawCollationKey();
    ctor public RawCollationKey(int);
    ctor public RawCollationKey(byte[]);
    ctor public RawCollationKey(byte[], int);
    method public int compareTo(android.icu.text.RawCollationKey);
  }

  public final class RelativeDateTimeFormatter {
    method public java.lang.String combineDateAndTime(java.lang.String, java.lang.String);
    method public java.lang.String format(double, android.icu.text.RelativeDateTimeFormatter.Direction, android.icu.text.RelativeDateTimeFormatter.RelativeUnit);
    method public java.lang.String format(android.icu.text.RelativeDateTimeFormatter.Direction, android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit);
    method public android.icu.text.DisplayContext getCapitalizationContext();
    method public android.icu.text.RelativeDateTimeFormatter.Style getFormatStyle();
    method public static android.icu.text.RelativeDateTimeFormatter getInstance();
    method public static android.icu.text.RelativeDateTimeFormatter getInstance(android.icu.util.ULocale);
    method public static android.icu.text.RelativeDateTimeFormatter getInstance(java.util.Locale);
    method public static android.icu.text.RelativeDateTimeFormatter getInstance(android.icu.util.ULocale, android.icu.text.NumberFormat);
    method public static android.icu.text.RelativeDateTimeFormatter getInstance(android.icu.util.ULocale, android.icu.text.NumberFormat, android.icu.text.RelativeDateTimeFormatter.Style, android.icu.text.DisplayContext);
    method public static android.icu.text.RelativeDateTimeFormatter getInstance(java.util.Locale, android.icu.text.NumberFormat);
    method public android.icu.text.NumberFormat getNumberFormat();
  }

  public static final class RelativeDateTimeFormatter.AbsoluteUnit extends java.lang.Enum {
    method public static android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit valueOf(java.lang.String);
    method public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit[] values();
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit DAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit FRIDAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit MONDAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit MONTH;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit NOW;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit SATURDAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit SUNDAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit THURSDAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit TUESDAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit WEDNESDAY;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit WEEK;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.AbsoluteUnit YEAR;
  }

  public static final class RelativeDateTimeFormatter.Direction extends java.lang.Enum {
    method public static android.icu.text.RelativeDateTimeFormatter.Direction valueOf(java.lang.String);
    method public static final android.icu.text.RelativeDateTimeFormatter.Direction[] values();
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction LAST;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction LAST_2;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction NEXT;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction NEXT_2;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction PLAIN;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Direction THIS;
  }

  public static final class RelativeDateTimeFormatter.RelativeUnit extends java.lang.Enum {
    method public static android.icu.text.RelativeDateTimeFormatter.RelativeUnit valueOf(java.lang.String);
    method public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit[] values();
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit DAYS;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit HOURS;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit MINUTES;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit MONTHS;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit SECONDS;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit WEEKS;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.RelativeUnit YEARS;
  }

  public static final class RelativeDateTimeFormatter.Style extends java.lang.Enum {
    method public static android.icu.text.RelativeDateTimeFormatter.Style valueOf(java.lang.String);
    method public static final android.icu.text.RelativeDateTimeFormatter.Style[] values();
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Style LONG;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Style NARROW;
    enum_constant public static final android.icu.text.RelativeDateTimeFormatter.Style SHORT;
  }

  public abstract interface Replaceable {
    method public abstract int char32At(int);
    method public abstract char charAt(int);
    method public abstract void copy(int, int, int);
    method public abstract void getChars(int, int, char[], int);
    method public abstract boolean hasMetaData();
    method public abstract int length();
    method public abstract void replace(int, int, java.lang.String);
    method public abstract void replace(int, int, char[], int, int);
  }

  public final class RuleBasedCollator extends android.icu.text.Collator {
    ctor public RuleBasedCollator(java.lang.String) throws java.lang.Exception;
    method public int compare(java.lang.String, java.lang.String);
    method public android.icu.text.CollationElementIterator getCollationElementIterator(java.lang.String);
    method public android.icu.text.CollationElementIterator getCollationElementIterator(java.text.CharacterIterator);
    method public android.icu.text.CollationElementIterator getCollationElementIterator(android.icu.text.UCharacterIterator);
    method public android.icu.text.CollationKey getCollationKey(java.lang.String);
    method public void getContractionsAndExpansions(android.icu.text.UnicodeSet, android.icu.text.UnicodeSet, boolean) throws java.lang.Exception;
    method public boolean getNumericCollation();
    method public android.icu.text.RawCollationKey getRawCollationKey(java.lang.String, android.icu.text.RawCollationKey);
    method public java.lang.String getRules();
    method public java.lang.String getRules(boolean);
    method public android.icu.util.VersionInfo getUCAVersion();
    method public int getVariableTop();
    method public android.icu.util.VersionInfo getVersion();
    method public boolean isAlternateHandlingShifted();
    method public boolean isCaseLevel();
    method public boolean isFrenchCollation();
    method public boolean isLowerCaseFirst();
    method public boolean isUpperCaseFirst();
    method public void setAlternateHandlingDefault();
    method public void setAlternateHandlingShifted(boolean);
    method public final void setCaseFirstDefault();
    method public void setCaseLevel(boolean);
    method public void setCaseLevelDefault();
    method public void setDecompositionDefault();
    method public void setFrenchCollation(boolean);
    method public void setFrenchCollationDefault();
    method public void setLowerCaseFirst(boolean);
    method public void setNumericCollation(boolean);
    method public void setNumericCollationDefault();
    method public void setStrengthDefault();
    method public void setUpperCaseFirst(boolean);
  }

  public abstract class SearchIterator {
    ctor protected SearchIterator(java.text.CharacterIterator, android.icu.text.BreakIterator);
    method public final int first();
    method public final int following(int);
    method public android.icu.text.BreakIterator getBreakIterator();
    method public android.icu.text.SearchIterator.ElementComparisonType getElementComparisonType();
    method public abstract int getIndex();
    method public int getMatchLength();
    method public int getMatchStart();
    method public java.lang.String getMatchedText();
    method public java.text.CharacterIterator getTarget();
    method protected abstract int handleNext(int);
    method protected abstract int handlePrevious(int);
    method public boolean isOverlapping();
    method public final int last();
    method public int next();
    method public final int preceding(int);
    method public int previous();
    method public void reset();
    method public void setBreakIterator(android.icu.text.BreakIterator);
    method public void setElementComparisonType(android.icu.text.SearchIterator.ElementComparisonType);
    method public void setIndex(int);
    method protected void setMatchLength(int);
    method public void setOverlapping(boolean);
    method public void setTarget(java.text.CharacterIterator);
    field public static final int DONE = -1; // 0xffffffff
    field protected android.icu.text.BreakIterator breakIterator;
    field protected int matchLength;
    field protected java.text.CharacterIterator targetText;
  }

  public static final class SearchIterator.ElementComparisonType extends java.lang.Enum {
    method public static android.icu.text.SearchIterator.ElementComparisonType valueOf(java.lang.String);
    method public static final android.icu.text.SearchIterator.ElementComparisonType[] values();
    enum_constant public static final android.icu.text.SearchIterator.ElementComparisonType ANY_BASE_WEIGHT_IS_WILDCARD;
    enum_constant public static final android.icu.text.SearchIterator.ElementComparisonType PATTERN_BASE_WEIGHT_IS_WILDCARD;
    enum_constant public static final android.icu.text.SearchIterator.ElementComparisonType STANDARD_ELEMENT_COMPARISON;
  }

  public class SelectFormat extends java.text.Format {
    ctor public SelectFormat(java.lang.String);
    method public void applyPattern(java.lang.String);
    method public final java.lang.String format(java.lang.String);
    method public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public java.lang.String toPattern();
  }

  public class SimpleDateFormat extends android.icu.text.DateFormat {
    ctor public SimpleDateFormat();
    ctor public SimpleDateFormat(java.lang.String);
    ctor public SimpleDateFormat(java.lang.String, java.util.Locale);
    ctor public SimpleDateFormat(java.lang.String, android.icu.util.ULocale);
    ctor public SimpleDateFormat(java.lang.String, java.lang.String, android.icu.util.ULocale);
    ctor public SimpleDateFormat(java.lang.String, android.icu.text.DateFormatSymbols);
    method public void applyLocalizedPattern(java.lang.String);
    method public void applyPattern(java.lang.String);
    method public java.lang.StringBuffer format(android.icu.util.Calendar, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.util.Date get2DigitYearStart();
    method public android.icu.text.DateFormatSymbols getDateFormatSymbols();
    method public android.icu.text.NumberFormat getNumberFormat(char);
    method protected android.icu.text.DateFormatSymbols getSymbols();
    method public android.icu.text.TimeZoneFormat getTimeZoneFormat();
    method protected int matchQuarterString(java.lang.String, int, int, java.lang.String[], android.icu.util.Calendar);
    method protected int matchString(java.lang.String, int, int, java.lang.String[], android.icu.util.Calendar);
    method public void parse(java.lang.String, android.icu.util.Calendar, java.text.ParsePosition);
    method protected android.icu.text.DateFormat.Field patternCharToDateFormatField(char);
    method public void set2DigitYearStart(java.util.Date);
    method public void setDateFormatSymbols(android.icu.text.DateFormatSymbols);
    method public void setNumberFormat(java.lang.String, android.icu.text.NumberFormat);
    method public void setTimeZoneFormat(android.icu.text.TimeZoneFormat);
    method protected java.lang.String subFormat(char, int, int, java.text.FieldPosition, android.icu.text.DateFormatSymbols, android.icu.util.Calendar) throws java.lang.IllegalArgumentException;
    method protected int subParse(java.lang.String, int, char, int, boolean, boolean, boolean[], android.icu.util.Calendar);
    method public java.lang.String toLocalizedPattern();
    method public java.lang.String toPattern();
    method protected java.lang.String zeroPaddingNumber(long, int, int);
  }

  public class StringPrepParseException extends java.text.ParseException {
    ctor public StringPrepParseException(java.lang.String, int);
    ctor public StringPrepParseException(java.lang.String, int, java.lang.String, int);
    ctor public StringPrepParseException(java.lang.String, int, java.lang.String, int, int);
    method public int getError();
    field public static final int ACE_PREFIX_ERROR = 6; // 0x6
    field public static final int BUFFER_OVERFLOW_ERROR = 9; // 0x9
    field public static final int CHECK_BIDI_ERROR = 4; // 0x4
    field public static final int DOMAIN_NAME_TOO_LONG_ERROR = 11; // 0xb
    field public static final int ILLEGAL_CHAR_FOUND = 1; // 0x1
    field public static final int INVALID_CHAR_FOUND = 0; // 0x0
    field public static final int LABEL_TOO_LONG_ERROR = 8; // 0x8
    field public static final int PROHIBITED_ERROR = 2; // 0x2
    field public static final int STD3_ASCII_RULES_ERROR = 5; // 0x5
    field public static final int UNASSIGNED_ERROR = 3; // 0x3
    field public static final int VERIFICATION_ERROR = 7; // 0x7
    field public static final int ZERO_LENGTH_LABEL = 10; // 0xa
  }

  public final class StringSearch extends android.icu.text.SearchIterator {
    ctor public StringSearch(java.lang.String, java.text.CharacterIterator, android.icu.text.RuleBasedCollator, android.icu.text.BreakIterator);
    ctor public StringSearch(java.lang.String, java.text.CharacterIterator, android.icu.text.RuleBasedCollator);
    ctor public StringSearch(java.lang.String, java.text.CharacterIterator, java.util.Locale);
    ctor public StringSearch(java.lang.String, java.text.CharacterIterator, android.icu.util.ULocale);
    ctor public StringSearch(java.lang.String, java.lang.String);
    method public android.icu.text.RuleBasedCollator getCollator();
    method public int getIndex();
    method public java.lang.String getPattern();
    method protected int handleNext(int);
    method protected int handlePrevious(int);
    method public boolean isCanonical();
    method public void setCanonical(boolean);
    method public void setCollator(android.icu.text.RuleBasedCollator);
    method public void setPattern(java.lang.String);
  }

  public abstract interface SymbolTable {
    method public abstract char[] lookup(java.lang.String);
    method public abstract android.icu.text.UnicodeMatcher lookupMatcher(int);
    method public abstract java.lang.String parseReference(java.lang.String, java.text.ParsePosition, int);
    field public static final char SYMBOL_REF = 36; // 0x0024 '$'
  }

  public class TimeZoneFormat extends android.icu.text.UFormat implements android.icu.util.Freezable java.io.Serializable {
    ctor protected TimeZoneFormat(android.icu.util.ULocale);
    method public android.icu.text.TimeZoneFormat cloneAsThawed();
    method public final java.lang.String format(android.icu.text.TimeZoneFormat.Style, android.icu.util.TimeZone, long);
    method public java.lang.String format(android.icu.text.TimeZoneFormat.Style, android.icu.util.TimeZone, long, android.icu.util.Output<android.icu.text.TimeZoneFormat.TimeType>);
    method public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String formatOffsetISO8601Basic(int, boolean, boolean, boolean);
    method public final java.lang.String formatOffsetISO8601Extended(int, boolean, boolean, boolean);
    method public java.lang.String formatOffsetLocalizedGMT(int);
    method public java.lang.String formatOffsetShortLocalizedGMT(int);
    method public android.icu.text.TimeZoneFormat freeze();
    method public java.util.EnumSet<android.icu.text.TimeZoneFormat.ParseOption> getDefaultParseOptions();
    method public java.lang.String getGMTOffsetDigits();
    method public java.lang.String getGMTOffsetPattern(android.icu.text.TimeZoneFormat.GMTOffsetPatternType);
    method public java.lang.String getGMTPattern();
    method public java.lang.String getGMTZeroFormat();
    method public static android.icu.text.TimeZoneFormat getInstance(android.icu.util.ULocale);
    method public static android.icu.text.TimeZoneFormat getInstance(java.util.Locale);
    method public android.icu.text.TimeZoneNames getTimeZoneNames();
    method public boolean isFrozen();
    method public android.icu.util.TimeZone parse(android.icu.text.TimeZoneFormat.Style, java.lang.String, java.text.ParsePosition, java.util.EnumSet<android.icu.text.TimeZoneFormat.ParseOption>, android.icu.util.Output<android.icu.text.TimeZoneFormat.TimeType>);
    method public android.icu.util.TimeZone parse(android.icu.text.TimeZoneFormat.Style, java.lang.String, java.text.ParsePosition, android.icu.util.Output<android.icu.text.TimeZoneFormat.TimeType>);
    method public final android.icu.util.TimeZone parse(java.lang.String, java.text.ParsePosition);
    method public final android.icu.util.TimeZone parse(java.lang.String) throws java.text.ParseException;
    method public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public final int parseOffsetISO8601(java.lang.String, java.text.ParsePosition);
    method public int parseOffsetLocalizedGMT(java.lang.String, java.text.ParsePosition);
    method public int parseOffsetShortLocalizedGMT(java.lang.String, java.text.ParsePosition);
    method public android.icu.text.TimeZoneFormat setDefaultParseOptions(java.util.EnumSet<android.icu.text.TimeZoneFormat.ParseOption>);
    method public android.icu.text.TimeZoneFormat setGMTOffsetDigits(java.lang.String);
    method public android.icu.text.TimeZoneFormat setGMTOffsetPattern(android.icu.text.TimeZoneFormat.GMTOffsetPatternType, java.lang.String);
    method public android.icu.text.TimeZoneFormat setGMTPattern(java.lang.String);
    method public android.icu.text.TimeZoneFormat setGMTZeroFormat(java.lang.String);
    method public android.icu.text.TimeZoneFormat setTimeZoneNames(android.icu.text.TimeZoneNames);
  }

  public static final class TimeZoneFormat.GMTOffsetPatternType extends java.lang.Enum {
    method public static android.icu.text.TimeZoneFormat.GMTOffsetPatternType valueOf(java.lang.String);
    method public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType[] values();
    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType NEGATIVE_H;
    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType NEGATIVE_HM;
    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType NEGATIVE_HMS;
    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType POSITIVE_H;
    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType POSITIVE_HM;
    enum_constant public static final android.icu.text.TimeZoneFormat.GMTOffsetPatternType POSITIVE_HMS;
  }

  public static final class TimeZoneFormat.ParseOption extends java.lang.Enum {
    method public static android.icu.text.TimeZoneFormat.ParseOption valueOf(java.lang.String);
    method public static final android.icu.text.TimeZoneFormat.ParseOption[] values();
    enum_constant public static final android.icu.text.TimeZoneFormat.ParseOption ALL_STYLES;
    enum_constant public static final android.icu.text.TimeZoneFormat.ParseOption TZ_DATABASE_ABBREVIATIONS;
  }

  public static final class TimeZoneFormat.Style extends java.lang.Enum {
    method public static android.icu.text.TimeZoneFormat.Style valueOf(java.lang.String);
    method public static final android.icu.text.TimeZoneFormat.Style[] values();
    enum_constant public static final android.icu.text.TimeZoneFormat.Style EXEMPLAR_LOCATION;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style GENERIC_LOCATION;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style GENERIC_LONG;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style GENERIC_SHORT;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_FIXED;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_FULL;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_LOCAL_FIXED;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_LOCAL_FULL;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_LOCAL_SHORT;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_BASIC_SHORT;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_FIXED;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_FULL;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_LOCAL_FIXED;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ISO_EXTENDED_LOCAL_FULL;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style LOCALIZED_GMT;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style LOCALIZED_GMT_SHORT;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style SPECIFIC_LONG;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style SPECIFIC_SHORT;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ZONE_ID;
    enum_constant public static final android.icu.text.TimeZoneFormat.Style ZONE_ID_SHORT;
  }

  public static final class TimeZoneFormat.TimeType extends java.lang.Enum {
    method public static android.icu.text.TimeZoneFormat.TimeType valueOf(java.lang.String);
    method public static final android.icu.text.TimeZoneFormat.TimeType[] values();
    enum_constant public static final android.icu.text.TimeZoneFormat.TimeType DAYLIGHT;
    enum_constant public static final android.icu.text.TimeZoneFormat.TimeType STANDARD;
    enum_constant public static final android.icu.text.TimeZoneFormat.TimeType UNKNOWN;
  }

  public abstract class TimeZoneNames implements java.io.Serializable {
    method public abstract java.util.Set<java.lang.String> getAvailableMetaZoneIDs();
    method public abstract java.util.Set<java.lang.String> getAvailableMetaZoneIDs(java.lang.String);
    method public final java.lang.String getDisplayName(java.lang.String, android.icu.text.TimeZoneNames.NameType, long);
    method public java.lang.String getExemplarLocationName(java.lang.String);
    method public static android.icu.text.TimeZoneNames getInstance(android.icu.util.ULocale);
    method public static android.icu.text.TimeZoneNames getInstance(java.util.Locale);
    method public abstract java.lang.String getMetaZoneDisplayName(java.lang.String, android.icu.text.TimeZoneNames.NameType);
    method public abstract java.lang.String getMetaZoneID(java.lang.String, long);
    method public abstract java.lang.String getReferenceZoneID(java.lang.String, java.lang.String);
    method public static android.icu.text.TimeZoneNames getTZDBInstance(android.icu.util.ULocale);
    method public abstract java.lang.String getTimeZoneDisplayName(java.lang.String, android.icu.text.TimeZoneNames.NameType);
  }

  public static final class TimeZoneNames.NameType extends java.lang.Enum {
    method public static android.icu.text.TimeZoneNames.NameType valueOf(java.lang.String);
    method public static final android.icu.text.TimeZoneNames.NameType[] values();
    enum_constant public static final android.icu.text.TimeZoneNames.NameType EXEMPLAR_LOCATION;
    enum_constant public static final android.icu.text.TimeZoneNames.NameType LONG_DAYLIGHT;
    enum_constant public static final android.icu.text.TimeZoneNames.NameType LONG_GENERIC;
    enum_constant public static final android.icu.text.TimeZoneNames.NameType LONG_STANDARD;
    enum_constant public static final android.icu.text.TimeZoneNames.NameType SHORT_DAYLIGHT;
    enum_constant public static final android.icu.text.TimeZoneNames.NameType SHORT_GENERIC;
    enum_constant public static final android.icu.text.TimeZoneNames.NameType SHORT_STANDARD;
  }

  public abstract class UCharacterIterator implements java.lang.Cloneable {
    ctor protected UCharacterIterator();
    method public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
    method public abstract int current();
    method public int currentCodePoint();
    method public java.text.CharacterIterator getCharacterIterator();
    method public abstract int getIndex();
    method public static final android.icu.text.UCharacterIterator getInstance(android.icu.text.Replaceable);
    method public static final android.icu.text.UCharacterIterator getInstance(java.lang.String);
    method public static final android.icu.text.UCharacterIterator getInstance(char[]);
    method public static final android.icu.text.UCharacterIterator getInstance(char[], int, int);
    method public static final android.icu.text.UCharacterIterator getInstance(java.lang.StringBuffer);
    method public static final android.icu.text.UCharacterIterator getInstance(java.text.CharacterIterator);
    method public abstract int getLength();
    method public abstract int getText(char[], int);
    method public final int getText(char[]);
    method public java.lang.String getText();
    method public int moveCodePointIndex(int);
    method public int moveIndex(int);
    method public abstract int next();
    method public int nextCodePoint();
    method public abstract int previous();
    method public int previousCodePoint();
    method public abstract void setIndex(int);
    method public void setToLimit();
    method public void setToStart();
    field public static final int DONE = -1; // 0xffffffff
  }

  public abstract class UFormat extends java.text.Format {
    ctor public UFormat();
  }

  public abstract class UnicodeFilter implements android.icu.text.UnicodeMatcher {
    method public abstract boolean contains(int);
    method public int matches(android.icu.text.Replaceable, int[], int, boolean);
  }

  public abstract interface UnicodeMatcher {
    method public abstract void addMatchSetTo(android.icu.text.UnicodeSet);
    method public abstract int matches(android.icu.text.Replaceable, int[], int, boolean);
    method public abstract boolean matchesIndexValue(int);
    method public abstract java.lang.String toPattern(boolean);
    field public static final char ETHER = 65535; // 0xffff '\uffff'
    field public static final int U_MATCH = 2; // 0x2
    field public static final int U_MISMATCH = 0; // 0x0
    field public static final int U_PARTIAL_MATCH = 1; // 0x1
  }

  public class UnicodeSet extends android.icu.text.UnicodeFilter implements java.lang.Comparable android.icu.util.Freezable java.lang.Iterable {
    ctor public UnicodeSet();
    ctor public UnicodeSet(android.icu.text.UnicodeSet);
    ctor public UnicodeSet(int, int);
    ctor public UnicodeSet(int...);
    ctor public UnicodeSet(java.lang.String);
    ctor public UnicodeSet(java.lang.String, boolean);
    ctor public UnicodeSet(java.lang.String, int);
    ctor public UnicodeSet(java.lang.String, java.text.ParsePosition, android.icu.text.SymbolTable);
    ctor public UnicodeSet(java.lang.String, java.text.ParsePosition, android.icu.text.SymbolTable, int);
    method public java.lang.StringBuffer _generatePattern(java.lang.StringBuffer, boolean);
    method public java.lang.StringBuffer _generatePattern(java.lang.StringBuffer, boolean, boolean);
    method public android.icu.text.UnicodeSet add(int, int);
    method public final android.icu.text.UnicodeSet add(int);
    method public final android.icu.text.UnicodeSet add(java.lang.CharSequence);
    method public android.icu.text.UnicodeSet add(java.lang.Iterable<?>);
    method public android.icu.text.UnicodeSet addAll(int, int);
    method public final android.icu.text.UnicodeSet addAll(java.lang.CharSequence);
    method public android.icu.text.UnicodeSet addAll(android.icu.text.UnicodeSet);
    method public android.icu.text.UnicodeSet addAll(java.lang.Iterable<?>);
    method public android.icu.text.UnicodeSet addAll(T...);
    method public T addAllTo(T);
    method public java.lang.String[] addAllTo(java.lang.String[]);
    method public static U addAllTo(java.lang.Iterable<T>, U);
    method public static T[] addAllTo(java.lang.Iterable<T>, T[]);
    method public void addMatchSetTo(android.icu.text.UnicodeSet);
    method public android.icu.text.UnicodeSet applyIntPropertyValue(int, int);
    method public final android.icu.text.UnicodeSet applyPattern(java.lang.String);
    method public android.icu.text.UnicodeSet applyPattern(java.lang.String, boolean);
    method public android.icu.text.UnicodeSet applyPattern(java.lang.String, int);
    method public android.icu.text.UnicodeSet applyPropertyAlias(java.lang.String, java.lang.String);
    method public android.icu.text.UnicodeSet applyPropertyAlias(java.lang.String, java.lang.String, android.icu.text.SymbolTable);
    method public int charAt(int);
    method public android.icu.text.UnicodeSet clear();
    method public java.lang.Object clone();
    method public android.icu.text.UnicodeSet cloneAsThawed();
    method public android.icu.text.UnicodeSet closeOver(int);
    method public android.icu.text.UnicodeSet compact();
    method public static int compare(java.lang.CharSequence, int);
    method public static int compare(int, java.lang.CharSequence);
    method public static int compare(java.lang.Iterable<T>, java.lang.Iterable<T>);
    method public static int compare(java.util.Collection<T>, java.util.Collection<T>, android.icu.text.UnicodeSet.ComparisonStyle);
    method public int compareTo(android.icu.text.UnicodeSet);
    method public int compareTo(android.icu.text.UnicodeSet, android.icu.text.UnicodeSet.ComparisonStyle);
    method public int compareTo(java.lang.Iterable<java.lang.String>);
    method public android.icu.text.UnicodeSet complement(int, int);
    method public final android.icu.text.UnicodeSet complement(int);
    method public android.icu.text.UnicodeSet complement();
    method public final android.icu.text.UnicodeSet complement(java.lang.CharSequence);
    method public final android.icu.text.UnicodeSet complementAll(java.lang.CharSequence);
    method public android.icu.text.UnicodeSet complementAll(android.icu.text.UnicodeSet);
    method public boolean contains(int);
    method public boolean contains(int, int);
    method public final boolean contains(java.lang.CharSequence);
    method public boolean containsAll(android.icu.text.UnicodeSet);
    method public boolean containsAll(java.lang.String);
    method public boolean containsAll(java.lang.Iterable<T>);
    method public boolean containsNone(int, int);
    method public boolean containsNone(android.icu.text.UnicodeSet);
    method public boolean containsNone(java.lang.CharSequence);
    method public boolean containsNone(java.lang.Iterable<T>);
    method public final boolean containsSome(int, int);
    method public final boolean containsSome(android.icu.text.UnicodeSet);
    method public final boolean containsSome(java.lang.CharSequence);
    method public final boolean containsSome(java.lang.Iterable<T>);
    method public android.icu.text.UnicodeSet freeze();
    method public static android.icu.text.UnicodeSet from(java.lang.CharSequence);
    method public static android.icu.text.UnicodeSet fromAll(java.lang.CharSequence);
    method public int getRangeCount();
    method public int getRangeEnd(int);
    method public int getRangeStart(int);
    method public int indexOf(int);
    method public boolean isEmpty();
    method public boolean isFrozen();
    method public java.util.Iterator<java.lang.String> iterator();
    method public boolean matchesIndexValue(int);
    method public java.lang.Iterable<android.icu.text.UnicodeSet.EntryRange> ranges();
    method public android.icu.text.UnicodeSet remove(int, int);
    method public final android.icu.text.UnicodeSet remove(int);
    method public final android.icu.text.UnicodeSet remove(java.lang.CharSequence);
    method public final android.icu.text.UnicodeSet removeAll(java.lang.CharSequence);
    method public android.icu.text.UnicodeSet removeAll(android.icu.text.UnicodeSet);
    method public android.icu.text.UnicodeSet removeAll(java.lang.Iterable<T>);
    method public final android.icu.text.UnicodeSet removeAllStrings();
    method public static boolean resemblesPattern(java.lang.String, int);
    method public android.icu.text.UnicodeSet retain(int, int);
    method public final android.icu.text.UnicodeSet retain(int);
    method public final android.icu.text.UnicodeSet retain(java.lang.CharSequence);
    method public final android.icu.text.UnicodeSet retainAll(java.lang.CharSequence);
    method public android.icu.text.UnicodeSet retainAll(android.icu.text.UnicodeSet);
    method public android.icu.text.UnicodeSet retainAll(java.lang.Iterable<T>);
    method public android.icu.text.UnicodeSet set(int, int);
    method public android.icu.text.UnicodeSet set(android.icu.text.UnicodeSet);
    method public int size();
    method public int span(java.lang.CharSequence, android.icu.text.UnicodeSet.SpanCondition);
    method public int span(java.lang.CharSequence, int, android.icu.text.UnicodeSet.SpanCondition);
    method public int spanBack(java.lang.CharSequence, android.icu.text.UnicodeSet.SpanCondition);
    method public int spanBack(java.lang.CharSequence, int, android.icu.text.UnicodeSet.SpanCondition);
    method public java.util.Collection<java.lang.String> strings();
    method public static java.lang.String[] toArray(android.icu.text.UnicodeSet);
    method public java.lang.String toPattern(boolean);
    field public static final int ADD_CASE_MAPPINGS = 4; // 0x4
    field public static final android.icu.text.UnicodeSet ALL_CODE_POINTS;
    field public static final int CASE = 2; // 0x2
    field public static final int CASE_INSENSITIVE = 2; // 0x2
    field public static final android.icu.text.UnicodeSet EMPTY;
    field public static final int IGNORE_SPACE = 1; // 0x1
    field public static final int MAX_VALUE = 1114111; // 0x10ffff
    field public static final int MIN_VALUE = 0; // 0x0
  }

  public static final class UnicodeSet.ComparisonStyle extends java.lang.Enum {
    method public static android.icu.text.UnicodeSet.ComparisonStyle valueOf(java.lang.String);
    method public static final android.icu.text.UnicodeSet.ComparisonStyle[] values();
    enum_constant public static final android.icu.text.UnicodeSet.ComparisonStyle LEXICOGRAPHIC;
    enum_constant public static final android.icu.text.UnicodeSet.ComparisonStyle LONGER_FIRST;
    enum_constant public static final android.icu.text.UnicodeSet.ComparisonStyle SHORTER_FIRST;
  }

  public static class UnicodeSet.EntryRange {
    field public int codepoint;
    field public int codepointEnd;
  }

  public static final class UnicodeSet.SpanCondition extends java.lang.Enum {
    method public static android.icu.text.UnicodeSet.SpanCondition valueOf(java.lang.String);
    method public static final android.icu.text.UnicodeSet.SpanCondition[] values();
    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition CONDITION_COUNT;
    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition CONTAINED;
    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition NOT_CONTAINED;
    enum_constant public static final android.icu.text.UnicodeSet.SpanCondition SIMPLE;
  }

  public class UnicodeSetIterator {
    ctor public UnicodeSetIterator(android.icu.text.UnicodeSet);
    ctor public UnicodeSetIterator();
    method public java.lang.String getString();
    method public boolean next();
    method public boolean nextRange();
    method public void reset(android.icu.text.UnicodeSet);
    method public void reset();
    field public static int IS_STRING;
    field public int codepoint;
    field public int codepointEnd;
    field public java.lang.String string;
  }

  public class UnicodeSetSpanner {
    ctor public UnicodeSetSpanner(android.icu.text.UnicodeSet);
    method public int countIn(java.lang.CharSequence);
    method public int countIn(java.lang.CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod);
    method public int countIn(java.lang.CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod, android.icu.text.UnicodeSet.SpanCondition);
    method public java.lang.String deleteFrom(java.lang.CharSequence);
    method public java.lang.String deleteFrom(java.lang.CharSequence, android.icu.text.UnicodeSet.SpanCondition);
    method public android.icu.text.UnicodeSet getUnicodeSet();
    method public java.lang.String replaceFrom(java.lang.CharSequence, java.lang.CharSequence);
    method public java.lang.String replaceFrom(java.lang.CharSequence, java.lang.CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod);
    method public java.lang.String replaceFrom(java.lang.CharSequence, java.lang.CharSequence, android.icu.text.UnicodeSetSpanner.CountMethod, android.icu.text.UnicodeSet.SpanCondition);
    method public java.lang.CharSequence trim(java.lang.CharSequence);
    method public java.lang.CharSequence trim(java.lang.CharSequence, android.icu.text.UnicodeSetSpanner.TrimOption);
    method public java.lang.CharSequence trim(java.lang.CharSequence, android.icu.text.UnicodeSetSpanner.TrimOption, android.icu.text.UnicodeSet.SpanCondition);
  }

  public static final class UnicodeSetSpanner.CountMethod extends java.lang.Enum {
    method public static android.icu.text.UnicodeSetSpanner.CountMethod valueOf(java.lang.String);
    method public static final android.icu.text.UnicodeSetSpanner.CountMethod[] values();
    enum_constant public static final android.icu.text.UnicodeSetSpanner.CountMethod MIN_ELEMENTS;
    enum_constant public static final android.icu.text.UnicodeSetSpanner.CountMethod WHOLE_SPAN;
  }

  public static final class UnicodeSetSpanner.TrimOption extends java.lang.Enum {
    method public static android.icu.text.UnicodeSetSpanner.TrimOption valueOf(java.lang.String);
    method public static final android.icu.text.UnicodeSetSpanner.TrimOption[] values();
    enum_constant public static final android.icu.text.UnicodeSetSpanner.TrimOption BOTH;
    enum_constant public static final android.icu.text.UnicodeSetSpanner.TrimOption LEADING;
    enum_constant public static final android.icu.text.UnicodeSetSpanner.TrimOption TRAILING;
  }

}

package android.icu.util {

  public class BuddhistCalendar extends android.icu.util.GregorianCalendar {
    ctor public BuddhistCalendar();
    ctor public BuddhistCalendar(android.icu.util.TimeZone);
    ctor public BuddhistCalendar(java.util.Locale);
    ctor public BuddhistCalendar(android.icu.util.ULocale);
    ctor public BuddhistCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public BuddhistCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public BuddhistCalendar(java.util.Date);
    ctor public BuddhistCalendar(int, int, int);
    ctor public BuddhistCalendar(int, int, int, int, int, int);
    field public static final int BE = 0; // 0x0
  }

  public class ByteArrayWrapper implements java.lang.Comparable {
    ctor public ByteArrayWrapper();
    ctor public ByteArrayWrapper(byte[], int);
    ctor public ByteArrayWrapper(java.nio.ByteBuffer);
    method public final android.icu.util.ByteArrayWrapper append(byte[], int, int);
    method public int compareTo(android.icu.util.ByteArrayWrapper);
    method public android.icu.util.ByteArrayWrapper ensureCapacity(int);
    method public final byte[] releaseBytes();
    method public final android.icu.util.ByteArrayWrapper set(byte[], int, int);
    field public byte[] bytes;
    field public int size;
  }

   abstract class CECalendar extends android.icu.util.Calendar {
    ctor protected CECalendar();
    ctor protected CECalendar(android.icu.util.TimeZone);
    ctor protected CECalendar(java.util.Locale);
    ctor protected CECalendar(android.icu.util.ULocale);
    ctor protected CECalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor protected CECalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor protected CECalendar(int, int, int);
    ctor protected CECalendar(java.util.Date);
    ctor protected CECalendar(int, int, int, int, int, int);
    method public static int ceToJD(long, int, int, int);
    method protected abstract int getJDEpochOffset();
    method protected int handleComputeMonthStart(int, int, boolean);
    method protected int handleGetLimit(int, int);
    method public static void jdToCE(int, int, int[]);
  }

  public abstract class Calendar implements java.lang.Cloneable java.lang.Comparable java.io.Serializable {
    ctor protected Calendar();
    ctor protected Calendar(android.icu.util.TimeZone, java.util.Locale);
    ctor protected Calendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    method public 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(android.icu.util.Calendar);
    method protected void complete();
    method protected void computeFields();
    method protected final void computeGregorianFields(int);
    method protected int computeGregorianMonthStart(int, int);
    method protected int computeJulianDay();
    method protected int computeMillisInDay();
    method protected void computeTime();
    method protected int computeZoneOffset(long, int);
    method public int fieldDifference(java.util.Date, int);
    method protected java.lang.String fieldName(int);
    method protected static final long floorDivide(long, long);
    method protected static final int floorDivide(int, int);
    method protected static final int floorDivide(int, int, int[]);
    method protected static final int floorDivide(long, int, int[]);
    method public final int get(int);
    method public int getActualMaximum(int);
    method public int getActualMinimum(int);
    method public static java.util.Locale[] getAvailableLocales();
    method public android.icu.text.DateFormat getDateTimeFormat(int, int, java.util.Locale);
    method public android.icu.text.DateFormat getDateTimeFormat(int, int, android.icu.util.ULocale);
    method public java.lang.String getDisplayName(java.util.Locale);
    method public java.lang.String getDisplayName(android.icu.util.ULocale);
    method public final int getFieldCount();
    method protected int[][][] getFieldResolutionTable();
    method public int getFirstDayOfWeek();
    method public final int getGreatestMinimum(int);
    method protected final int getGregorianDayOfMonth();
    method protected final int getGregorianDayOfYear();
    method protected final int getGregorianMonth();
    method protected final int getGregorianYear();
    method public static android.icu.util.Calendar getInstance();
    method public static android.icu.util.Calendar getInstance(android.icu.util.TimeZone);
    method public static android.icu.util.Calendar getInstance(java.util.Locale);
    method public static android.icu.util.Calendar getInstance(android.icu.util.ULocale);
    method public static android.icu.util.Calendar getInstance(android.icu.util.TimeZone, java.util.Locale);
    method public static android.icu.util.Calendar getInstance(android.icu.util.TimeZone, android.icu.util.ULocale);
    method public static final java.lang.String[] getKeywordValuesForLocale(java.lang.String, android.icu.util.ULocale, boolean);
    method public final int getLeastMaximum(int);
    method protected int getLimit(int, int);
    method public final int getMaximum(int);
    method public int getMinimalDaysInFirstWeek();
    method public final int getMinimum(int);
    method public int getRepeatedWallTimeOption();
    method public int getSkippedWallTimeOption();
    method protected final int getStamp(int);
    method public final java.util.Date getTime();
    method public long getTimeInMillis();
    method public android.icu.util.TimeZone getTimeZone();
    method public java.lang.String getType();
    method public android.icu.util.Calendar.WeekData getWeekData();
    method public static android.icu.util.Calendar.WeekData getWeekDataForRegion(java.lang.String);
    method protected static final int gregorianMonthLength(int, int);
    method protected static final int gregorianPreviousMonthLength(int, int);
    method protected void handleComputeFields(int);
    method protected int handleComputeJulianDay(int);
    method protected abstract int handleComputeMonthStart(int, int, boolean);
    method protected int[] handleCreateFields();
    method protected android.icu.text.DateFormat handleGetDateFormat(java.lang.String, java.util.Locale);
    method protected android.icu.text.DateFormat handleGetDateFormat(java.lang.String, java.lang.String, java.util.Locale);
    method protected android.icu.text.DateFormat handleGetDateFormat(java.lang.String, android.icu.util.ULocale);
    method protected abstract int handleGetExtendedYear();
    method protected abstract int handleGetLimit(int, int);
    method protected int handleGetMonthLength(int, int);
    method protected int handleGetYearLength(int);
    method protected final int internalGet(int);
    method protected final int internalGet(int, int);
    method protected final long internalGetTimeInMillis();
    method protected final void internalSet(int, int);
    method public boolean isEquivalentTo(android.icu.util.Calendar);
    method protected static final boolean isGregorianLeapYear(int);
    method public boolean isLenient();
    method public final boolean isSet(int);
    method public boolean isWeekend(java.util.Date);
    method public boolean isWeekend();
    method protected static final int julianDayToDayOfWeek(int);
    method protected static final long julianDayToMillis(int);
    method protected static final int millisToJulianDay(long);
    method protected int newerField(int, int);
    method protected int newestStamp(int, int, int);
    method protected void pinField(int);
    method protected void prepareGetActual(int, boolean);
    method protected int resolveFields(int[][][]);
    method public final void roll(int, boolean);
    method public void roll(int, int);
    method public final 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 void setRepeatedWallTimeOption(int);
    method public void setSkippedWallTimeOption(int);
    method public final void setTime(java.util.Date);
    method public void setTimeInMillis(long);
    method public void setTimeZone(android.icu.util.TimeZone);
    method public android.icu.util.Calendar setWeekData(android.icu.util.Calendar.WeekData);
    method protected void validateField(int);
    method protected final void validateField(int, int, int);
    method protected void validateFields();
    method protected int weekNumber(int, int, int);
    method protected final int weekNumber(int, int);
    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 protected static final int BASE_FIELD_COUNT = 23; // 0x17
    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 DOW_LOCAL = 18; // 0x12
    field public static final int DST_OFFSET = 16; // 0x10
    field protected static final int EPOCH_JULIAN_DAY = 2440588; // 0x253d8c
    field public static final int ERA = 0; // 0x0
    field public static final int EXTENDED_YEAR = 19; // 0x13
    field public static final int FEBRUARY = 1; // 0x1
    field public static final int FRIDAY = 6; // 0x6
    field protected static final int GREATEST_MINIMUM = 1; // 0x1
    field public static final int HOUR = 10; // 0xa
    field public static final int HOUR_OF_DAY = 11; // 0xb
    field protected static final int INTERNALLY_SET = 1; // 0x1
    field public static final int IS_LEAP_MONTH = 22; // 0x16
    field public static final int JANUARY = 0; // 0x0
    field protected static final int JAN_1_1_JULIAN_DAY = 1721426; // 0x1a4452
    field public static final int JULIAN_DAY = 20; // 0x14
    field public static final int JULY = 6; // 0x6
    field public static final int JUNE = 5; // 0x5
    field protected static final int LEAST_MAXIMUM = 2; // 0x2
    field public static final int MARCH = 2; // 0x2
    field protected static final int MAXIMUM = 3; // 0x3
    field protected static final java.util.Date MAX_DATE;
    field protected static final int MAX_FIELD_COUNT = 32; // 0x20
    field protected static final int MAX_JULIAN = 2130706432; // 0x7f000000
    field protected static final long MAX_MILLIS = 183882168921600000L; // 0x28d47dbbf19b000L
    field public static final int MAY = 4; // 0x4
    field public static final int MILLISECOND = 14; // 0xe
    field public static final int MILLISECONDS_IN_DAY = 21; // 0x15
    field protected static final int MINIMUM = 0; // 0x0
    field protected static final int MINIMUM_USER_STAMP = 2; // 0x2
    field public static final int MINUTE = 12; // 0xc
    field protected static final java.util.Date MIN_DATE;
    field protected static final int MIN_JULIAN = -2130706432; // 0x81000000
    field protected static final long MIN_MILLIS = -184303902528000000L; // 0xfd713893bf19b000L
    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 protected static final long ONE_DAY = 86400000L; // 0x5265c00L
    field protected static final int ONE_HOUR = 3600000; // 0x36ee80
    field protected static final int ONE_MINUTE = 60000; // 0xea60
    field protected static final int ONE_SECOND = 1000; // 0x3e8
    field protected static final long ONE_WEEK = 604800000L; // 0x240c8400L
    field public static final int PM = 1; // 0x1
    field protected static final int RESOLVE_REMAP = 32; // 0x20
    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 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 protected static final int UNSET = 0; // 0x0
    field public static final int WALLTIME_FIRST = 1; // 0x1
    field public static final int WALLTIME_LAST = 0; // 0x0
    field public static final int WALLTIME_NEXT_VALID = 2; // 0x2
    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 YEAR_WOY = 17; // 0x11
    field public static final int ZONE_OFFSET = 15; // 0xf
  }

  public static final class Calendar.WeekData {
    ctor public Calendar.WeekData(int, int, int, int, int, int);
    field public final int firstDayOfWeek;
    field public final int minimalDaysInFirstWeek;
    field public final int weekendCease;
    field public final int weekendCeaseMillis;
    field public final int weekendOnset;
    field public final int weekendOnsetMillis;
  }

  public class ChineseCalendar extends android.icu.util.Calendar {
    ctor public ChineseCalendar();
    ctor public ChineseCalendar(java.util.Date);
    ctor public ChineseCalendar(int, int, int, int);
    ctor public ChineseCalendar(int, int, int, int, int, int, int);
    ctor public ChineseCalendar(int, int, int, int, int);
    ctor public ChineseCalendar(int, int, int, int, int, int, int, int);
    ctor public ChineseCalendar(java.util.Locale);
    ctor public ChineseCalendar(android.icu.util.TimeZone);
    ctor public ChineseCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public ChineseCalendar(android.icu.util.ULocale);
    ctor public ChineseCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    method protected int handleComputeMonthStart(int, int, boolean);
    method protected android.icu.text.DateFormat handleGetDateFormat(java.lang.String, java.lang.String, android.icu.util.ULocale);
    method protected int handleGetExtendedYear();
    method protected int handleGetLimit(int, int);
  }

  public final class CopticCalendar extends android.icu.util.CECalendar {
    ctor public CopticCalendar();
    ctor public CopticCalendar(android.icu.util.TimeZone);
    ctor public CopticCalendar(java.util.Locale);
    ctor public CopticCalendar(android.icu.util.ULocale);
    ctor public CopticCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public CopticCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public CopticCalendar(int, int, int);
    ctor public CopticCalendar(java.util.Date);
    ctor public CopticCalendar(int, int, int, int, int, int);
    method protected deprecated int getJDEpochOffset();
    method protected deprecated int handleGetExtendedYear();
    field public static final int AMSHIR = 5; // 0x5
    field public static final int BABA = 1; // 0x1
    field public static final int BARAMHAT = 6; // 0x6
    field public static final int BARAMOUDA = 7; // 0x7
    field public static final int BASHANS = 8; // 0x8
    field public static final int EPEP = 10; // 0xa
    field public static final int HATOR = 2; // 0x2
    field public static final int KIAHK = 3; // 0x3
    field public static final int MESRA = 11; // 0xb
    field public static final int NASIE = 12; // 0xc
    field public static final int PAONA = 9; // 0x9
    field public static final int TOBA = 4; // 0x4
    field public static final int TOUT = 0; // 0x0
  }

  public class Currency extends android.icu.util.MeasureUnit {
    ctor protected Currency(java.lang.String);
    method public static java.util.Set<android.icu.util.Currency> getAvailableCurrencies();
    method public static java.lang.String[] getAvailableCurrencyCodes(android.icu.util.ULocale, java.util.Date);
    method public static java.lang.String[] getAvailableCurrencyCodes(java.util.Locale, java.util.Date);
    method public static java.util.Locale[] getAvailableLocales();
    method public static android.icu.util.ULocale[] getAvailableULocales();
    method public java.lang.String getCurrencyCode();
    method public int getDefaultFractionDigits();
    method public int getDefaultFractionDigits(android.icu.util.Currency.CurrencyUsage);
    method public java.lang.String getDisplayName();
    method public java.lang.String getDisplayName(java.util.Locale);
    method public static android.icu.util.Currency getInstance(java.util.Locale);
    method public static android.icu.util.Currency getInstance(android.icu.util.ULocale);
    method public static android.icu.util.Currency getInstance(java.lang.String);
    method public static final java.lang.String[] getKeywordValuesForLocale(java.lang.String, android.icu.util.ULocale, boolean);
    method public java.lang.String getName(java.util.Locale, int, boolean[]);
    method public java.lang.String getName(android.icu.util.ULocale, int, boolean[]);
    method public java.lang.String getName(java.util.Locale, int, java.lang.String, boolean[]);
    method public java.lang.String getName(android.icu.util.ULocale, int, java.lang.String, boolean[]);
    method public int getNumericCode();
    method public double getRoundingIncrement();
    method public double getRoundingIncrement(android.icu.util.Currency.CurrencyUsage);
    method public java.lang.String getSymbol();
    method public java.lang.String getSymbol(java.util.Locale);
    method public java.lang.String getSymbol(android.icu.util.ULocale);
    method public static boolean isAvailable(java.lang.String, java.util.Date, java.util.Date);
    method public static java.lang.Object registerInstance(android.icu.util.Currency, android.icu.util.ULocale);
    method public static boolean unregister(java.lang.Object);
    field public static final int LONG_NAME = 1; // 0x1
    field public static final int PLURAL_LONG_NAME = 2; // 0x2
    field public static final int SYMBOL_NAME = 0; // 0x0
  }

  public static final class Currency.CurrencyUsage extends java.lang.Enum {
    method public static android.icu.util.Currency.CurrencyUsage valueOf(java.lang.String);
    method public static final android.icu.util.Currency.CurrencyUsage[] values();
    enum_constant public static final android.icu.util.Currency.CurrencyUsage CASH;
    enum_constant public static final android.icu.util.Currency.CurrencyUsage STANDARD;
  }

  public class CurrencyAmount extends android.icu.util.Measure {
    ctor public CurrencyAmount(java.lang.Number, android.icu.util.Currency);
    ctor public CurrencyAmount(double, android.icu.util.Currency);
    method public android.icu.util.Currency getCurrency();
  }

  public final class DateInterval implements java.io.Serializable {
    ctor public DateInterval(long, long);
    method public long getFromDate();
    method public long getToDate();
  }

  public abstract interface Freezable implements java.lang.Cloneable {
    method public abstract T cloneAsThawed();
    method public abstract T freeze();
    method public abstract boolean isFrozen();
  }

  public class GregorianCalendar extends android.icu.util.Calendar {
    ctor public GregorianCalendar();
    ctor public GregorianCalendar(android.icu.util.TimeZone);
    ctor public GregorianCalendar(java.util.Locale);
    ctor public GregorianCalendar(android.icu.util.ULocale);
    ctor public GregorianCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public GregorianCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public GregorianCalendar(int, int, int);
    ctor public GregorianCalendar(int, int, int, int, int);
    ctor public GregorianCalendar(int, int, int, int, int, int);
    method public final java.util.Date getGregorianChange();
    method protected int handleComputeMonthStart(int, int, boolean);
    method protected int handleGetExtendedYear();
    method protected int handleGetLimit(int, int);
    method public boolean isLeapYear(int);
    method public void setGregorianChange(java.util.Date);
    field public static final int AD = 1; // 0x1
    field public static final int BC = 0; // 0x0
    field protected transient boolean invertGregorian;
    field protected transient boolean isGregorian;
  }

  public class HebrewCalendar extends android.icu.util.Calendar {
    ctor public HebrewCalendar();
    ctor public HebrewCalendar(android.icu.util.TimeZone);
    ctor public HebrewCalendar(java.util.Locale);
    ctor public HebrewCalendar(android.icu.util.ULocale);
    ctor public HebrewCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public HebrewCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public HebrewCalendar(int, int, int);
    ctor public HebrewCalendar(java.util.Date);
    ctor public HebrewCalendar(int, int, int, int, int, int);
    method protected int handleComputeMonthStart(int, int, boolean);
    method protected int handleGetExtendedYear();
    method protected int handleGetLimit(int, int);
    field public static final int ADAR = 6; // 0x6
    field public static final int ADAR_1 = 5; // 0x5
    field public static final int AV = 11; // 0xb
    field public static final int ELUL = 12; // 0xc
    field public static final int HESHVAN = 1; // 0x1
    field public static final int IYAR = 8; // 0x8
    field public static final int KISLEV = 2; // 0x2
    field public static final int NISAN = 7; // 0x7
    field public static final int SHEVAT = 4; // 0x4
    field public static final int SIVAN = 9; // 0x9
    field public static final int TAMUZ = 10; // 0xa
    field public static final int TEVET = 3; // 0x3
    field public static final int TISHRI = 0; // 0x0
  }

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

  public class IndianCalendar extends android.icu.util.Calendar {
    ctor public IndianCalendar();
    ctor public IndianCalendar(android.icu.util.TimeZone);
    ctor public IndianCalendar(java.util.Locale);
    ctor public IndianCalendar(android.icu.util.ULocale);
    ctor public IndianCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public IndianCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public IndianCalendar(java.util.Date);
    ctor public IndianCalendar(int, int, int);
    ctor public IndianCalendar(int, int, int, int, int, int);
    method protected int handleComputeMonthStart(int, int, boolean);
    method protected int handleGetExtendedYear();
    method protected int handleGetLimit(int, int);
    field public static final int AGRAHAYANA = 8; // 0x8
    field public static final int ASADHA = 3; // 0x3
    field public static final int ASVINA = 6; // 0x6
    field public static final int BHADRA = 5; // 0x5
    field public static final int CHAITRA = 0; // 0x0
    field public static final int IE = 0; // 0x0
    field public static final int JYAISTHA = 2; // 0x2
    field public static final int KARTIKA = 7; // 0x7
    field public static final int MAGHA = 10; // 0xa
    field public static final int PAUSA = 9; // 0x9
    field public static final int PHALGUNA = 11; // 0xb
    field public static final int SRAVANA = 4; // 0x4
    field public static final int VAISAKHA = 1; // 0x1
  }

  public class IslamicCalendar extends android.icu.util.Calendar {
    ctor public IslamicCalendar();
    ctor public IslamicCalendar(android.icu.util.TimeZone);
    ctor public IslamicCalendar(java.util.Locale);
    ctor public IslamicCalendar(android.icu.util.ULocale);
    ctor public IslamicCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public IslamicCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public IslamicCalendar(java.util.Date);
    ctor public IslamicCalendar(int, int, int);
    ctor public IslamicCalendar(int, int, int, int, int, int);
    method protected int handleComputeMonthStart(int, int, boolean);
    method protected int handleGetExtendedYear();
    method protected int handleGetLimit(int, int);
    method public boolean isCivil();
    method public void setCivil(boolean);
    field public static final int DHU_AL_HIJJAH = 11; // 0xb
    field public static final int DHU_AL_QIDAH = 10; // 0xa
    field public static final int JUMADA_1 = 4; // 0x4
    field public static final int JUMADA_2 = 5; // 0x5
    field public static final int MUHARRAM = 0; // 0x0
    field public static final int RABI_1 = 2; // 0x2
    field public static final int RABI_2 = 3; // 0x3
    field public static final int RAJAB = 6; // 0x6
    field public static final int RAMADAN = 8; // 0x8
    field public static final int SAFAR = 1; // 0x1
    field public static final int SHABAN = 7; // 0x7
    field public static final int SHAWWAL = 9; // 0x9
  }

  public static final class IslamicCalendar.CalculationType extends java.lang.Enum {
    method public static android.icu.util.IslamicCalendar.CalculationType valueOf(java.lang.String);
    method public static final android.icu.util.IslamicCalendar.CalculationType[] values();
    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC;
    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC_CIVIL;
    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC_TBLA;
    enum_constant public static final android.icu.util.IslamicCalendar.CalculationType ISLAMIC_UMALQURA;
  }

  public class JapaneseCalendar extends android.icu.util.GregorianCalendar {
    ctor public JapaneseCalendar();
    ctor public JapaneseCalendar(android.icu.util.TimeZone);
    ctor public JapaneseCalendar(java.util.Locale);
    ctor public JapaneseCalendar(android.icu.util.ULocale);
    ctor public JapaneseCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public JapaneseCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public JapaneseCalendar(java.util.Date);
    ctor public JapaneseCalendar(int, int, int, int);
    ctor public JapaneseCalendar(int, int, int);
    ctor public JapaneseCalendar(int, int, int, int, int, int);
    field public static final int CURRENT_ERA;
    field public static final int HEISEI;
    field public static final int MEIJI;
    field public static final int SHOWA;
    field public static final int TAISHO;
  }

  public class Measure {
    ctor public Measure(java.lang.Number, android.icu.util.MeasureUnit);
    method public java.lang.Number getNumber();
    method public android.icu.util.MeasureUnit getUnit();
  }

  public class MeasureUnit implements java.io.Serializable {
    method public static synchronized java.util.Set<android.icu.util.MeasureUnit> getAvailable(java.lang.String);
    method public static synchronized java.util.Set<android.icu.util.MeasureUnit> getAvailable();
    method public static synchronized java.util.Set<java.lang.String> getAvailableTypes();
    method public java.lang.String getSubtype();
    method public java.lang.String getType();
    field public static final android.icu.util.MeasureUnit ACRE;
    field public static final android.icu.util.MeasureUnit ACRE_FOOT;
    field public static final android.icu.util.MeasureUnit AMPERE;
    field public static final android.icu.util.MeasureUnit ARC_MINUTE;
    field public static final android.icu.util.MeasureUnit ARC_SECOND;
    field public static final android.icu.util.MeasureUnit ASTRONOMICAL_UNIT;
    field public static final android.icu.util.MeasureUnit BIT;
    field public static final android.icu.util.MeasureUnit BUSHEL;
    field public static final android.icu.util.MeasureUnit BYTE;
    field public static final android.icu.util.MeasureUnit CALORIE;
    field public static final android.icu.util.MeasureUnit CARAT;
    field public static final android.icu.util.MeasureUnit CELSIUS;
    field public static final android.icu.util.MeasureUnit CENTILITER;
    field public static final android.icu.util.MeasureUnit CENTIMETER;
    field public static final android.icu.util.MeasureUnit CUBIC_CENTIMETER;
    field public static final android.icu.util.MeasureUnit CUBIC_FOOT;
    field public static final android.icu.util.MeasureUnit CUBIC_INCH;
    field public static final android.icu.util.MeasureUnit CUBIC_KILOMETER;
    field public static final android.icu.util.MeasureUnit CUBIC_METER;
    field public static final android.icu.util.MeasureUnit CUBIC_MILE;
    field public static final android.icu.util.MeasureUnit CUBIC_YARD;
    field public static final android.icu.util.MeasureUnit CUP;
    field public static final android.icu.util.TimeUnit DAY;
    field public static final android.icu.util.MeasureUnit DECILITER;
    field public static final android.icu.util.MeasureUnit DECIMETER;
    field public static final android.icu.util.MeasureUnit DEGREE;
    field public static final android.icu.util.MeasureUnit FAHRENHEIT;
    field public static final android.icu.util.MeasureUnit FATHOM;
    field public static final android.icu.util.MeasureUnit FLUID_OUNCE;
    field public static final android.icu.util.MeasureUnit FOODCALORIE;
    field public static final android.icu.util.MeasureUnit FOOT;
    field public static final android.icu.util.MeasureUnit FURLONG;
    field public static final android.icu.util.MeasureUnit GALLON;
    field public static final android.icu.util.MeasureUnit GIGABIT;
    field public static final android.icu.util.MeasureUnit GIGABYTE;
    field public static final android.icu.util.MeasureUnit GIGAHERTZ;
    field public static final android.icu.util.MeasureUnit GIGAWATT;
    field public static final android.icu.util.MeasureUnit GRAM;
    field public static final android.icu.util.MeasureUnit G_FORCE;
    field public static final android.icu.util.MeasureUnit HECTARE;
    field public static final android.icu.util.MeasureUnit HECTOLITER;
    field public static final android.icu.util.MeasureUnit HECTOPASCAL;
    field public static final android.icu.util.MeasureUnit HERTZ;
    field public static final android.icu.util.MeasureUnit HORSEPOWER;
    field public static final android.icu.util.TimeUnit HOUR;
    field public static final android.icu.util.MeasureUnit INCH;
    field public static final android.icu.util.MeasureUnit INCH_HG;
    field public static final android.icu.util.MeasureUnit JOULE;
    field public static final android.icu.util.MeasureUnit KARAT;
    field public static final android.icu.util.MeasureUnit KELVIN;
    field public static final android.icu.util.MeasureUnit KILOBIT;
    field public static final android.icu.util.MeasureUnit KILOBYTE;
    field public static final android.icu.util.MeasureUnit KILOCALORIE;
    field public static final android.icu.util.MeasureUnit KILOGRAM;
    field public static final android.icu.util.MeasureUnit KILOHERTZ;
    field public static final android.icu.util.MeasureUnit KILOJOULE;
    field public static final android.icu.util.MeasureUnit KILOMETER;
    field public static final android.icu.util.MeasureUnit KILOMETER_PER_HOUR;
    field public static final android.icu.util.MeasureUnit KILOWATT;
    field public static final android.icu.util.MeasureUnit KILOWATT_HOUR;
    field public static final android.icu.util.MeasureUnit LIGHT_YEAR;
    field public static final android.icu.util.MeasureUnit LITER;
    field public static final android.icu.util.MeasureUnit LITER_PER_KILOMETER;
    field public static final android.icu.util.MeasureUnit LUX;
    field public static final android.icu.util.MeasureUnit MEGABIT;
    field public static final android.icu.util.MeasureUnit MEGABYTE;
    field public static final android.icu.util.MeasureUnit MEGAHERTZ;
    field public static final android.icu.util.MeasureUnit MEGALITER;
    field public static final android.icu.util.MeasureUnit MEGAWATT;
    field public static final android.icu.util.MeasureUnit METER;
    field public static final android.icu.util.MeasureUnit METER_PER_SECOND;
    field public static final android.icu.util.MeasureUnit METER_PER_SECOND_SQUARED;
    field public static final android.icu.util.MeasureUnit METRIC_TON;
    field public static final android.icu.util.MeasureUnit MICROGRAM;
    field public static final android.icu.util.MeasureUnit MICROMETER;
    field public static final android.icu.util.MeasureUnit MICROSECOND;
    field public static final android.icu.util.MeasureUnit MILE;
    field public static final android.icu.util.MeasureUnit MILE_PER_GALLON;
    field public static final android.icu.util.MeasureUnit MILE_PER_HOUR;
    field public static final android.icu.util.MeasureUnit MILLIAMPERE;
    field public static final android.icu.util.MeasureUnit MILLIBAR;
    field public static final android.icu.util.MeasureUnit MILLIGRAM;
    field public static final android.icu.util.MeasureUnit MILLILITER;
    field public static final android.icu.util.MeasureUnit MILLIMETER;
    field public static final android.icu.util.MeasureUnit MILLIMETER_OF_MERCURY;
    field public static final android.icu.util.MeasureUnit MILLISECOND;
    field public static final android.icu.util.MeasureUnit MILLIWATT;
    field public static final android.icu.util.TimeUnit MINUTE;
    field public static final android.icu.util.TimeUnit MONTH;
    field public static final android.icu.util.MeasureUnit NANOMETER;
    field public static final android.icu.util.MeasureUnit NANOSECOND;
    field public static final android.icu.util.MeasureUnit NAUTICAL_MILE;
    field public static final android.icu.util.MeasureUnit OHM;
    field public static final android.icu.util.MeasureUnit OUNCE;
    field public static final android.icu.util.MeasureUnit OUNCE_TROY;
    field public static final android.icu.util.MeasureUnit PARSEC;
    field public static final android.icu.util.MeasureUnit PICOMETER;
    field public static final android.icu.util.MeasureUnit PINT;
    field public static final android.icu.util.MeasureUnit POUND;
    field public static final android.icu.util.MeasureUnit POUND_PER_SQUARE_INCH;
    field public static final android.icu.util.MeasureUnit QUART;
    field public static final android.icu.util.MeasureUnit RADIAN;
    field public static final android.icu.util.TimeUnit SECOND;
    field public static final android.icu.util.MeasureUnit SQUARE_CENTIMETER;
    field public static final android.icu.util.MeasureUnit SQUARE_FOOT;
    field public static final android.icu.util.MeasureUnit SQUARE_INCH;
    field public static final android.icu.util.MeasureUnit SQUARE_KILOMETER;
    field public static final android.icu.util.MeasureUnit SQUARE_METER;
    field public static final android.icu.util.MeasureUnit SQUARE_MILE;
    field public static final android.icu.util.MeasureUnit SQUARE_YARD;
    field public static final android.icu.util.MeasureUnit STONE;
    field public static final android.icu.util.MeasureUnit TABLESPOON;
    field public static final android.icu.util.MeasureUnit TEASPOON;
    field public static final android.icu.util.MeasureUnit TERABIT;
    field public static final android.icu.util.MeasureUnit TERABYTE;
    field public static final android.icu.util.MeasureUnit TON;
    field public static final android.icu.util.MeasureUnit VOLT;
    field public static final android.icu.util.MeasureUnit WATT;
    field public static final android.icu.util.TimeUnit WEEK;
    field public static final android.icu.util.MeasureUnit YARD;
    field public static final android.icu.util.TimeUnit YEAR;
  }

  public class Output {
    ctor public Output();
    ctor public Output(T);
    field public T value;
  }

  public abstract interface RangeValueIterator {
    method public abstract boolean next(android.icu.util.RangeValueIterator.Element);
    method public abstract void reset();
  }

  public static class RangeValueIterator.Element {
    ctor public RangeValueIterator.Element();
    field public int limit;
    field public int start;
    field public int value;
  }

  public class TaiwanCalendar extends android.icu.util.GregorianCalendar {
    ctor public TaiwanCalendar();
    ctor public TaiwanCalendar(android.icu.util.TimeZone);
    ctor public TaiwanCalendar(java.util.Locale);
    ctor public TaiwanCalendar(android.icu.util.ULocale);
    ctor public TaiwanCalendar(android.icu.util.TimeZone, java.util.Locale);
    ctor public TaiwanCalendar(android.icu.util.TimeZone, android.icu.util.ULocale);
    ctor public TaiwanCalendar(java.util.Date);
    ctor public TaiwanCalendar(int, int, int);
    ctor public TaiwanCalendar(int, int, int, int, int, int);
    field public static final int BEFORE_MINGUO = 0; // 0x0
    field public static final int MINGUO = 1; // 0x1
  }

  public class TimeUnit extends android.icu.util.MeasureUnit {
    method public static android.icu.util.TimeUnit[] values();
  }

  public abstract class TimeZone implements java.lang.Cloneable android.icu.util.Freezable java.io.Serializable {
    ctor public TimeZone();
    method public java.lang.Object clone();
    method public android.icu.util.TimeZone cloneAsThawed();
    method public static int countEquivalentIDs(java.lang.String);
    method public android.icu.util.TimeZone freeze();
    method public static java.util.Set<java.lang.String> getAvailableIDs(android.icu.util.TimeZone.SystemTimeZoneType, java.lang.String, java.lang.Integer);
    method public static java.lang.String[] getAvailableIDs(int);
    method public static java.lang.String[] getAvailableIDs(java.lang.String);
    method public static java.lang.String[] getAvailableIDs();
    method public static java.lang.String getCanonicalID(java.lang.String);
    method public static java.lang.String getCanonicalID(java.lang.String, boolean[]);
    method public int getDSTSavings();
    method public static android.icu.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(android.icu.util.ULocale);
    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 getDisplayName(boolean, int, android.icu.util.ULocale);
    method public static java.lang.String getEquivalentID(java.lang.String, int);
    method public static android.icu.util.TimeZone getFrozenTimeZone(java.lang.String);
    method public java.lang.String getID();
    method public static java.lang.String getIDForWindowsID(java.lang.String, java.lang.String);
    method public abstract int getOffset(int, int, int, int, int, int);
    method public int getOffset(long);
    method public void getOffset(long, boolean, int[]);
    method public abstract int getRawOffset();
    method public static java.lang.String getRegion(java.lang.String);
    method public static java.lang.String getTZDataVersion();
    method public static android.icu.util.TimeZone getTimeZone(java.lang.String);
    method public static android.icu.util.TimeZone getTimeZone(java.lang.String, int);
    method public static java.lang.String getWindowsID(java.lang.String);
    method public boolean hasSameRules(android.icu.util.TimeZone);
    method public abstract boolean inDaylightTime(java.util.Date);
    method public boolean isFrozen();
    method public boolean observesDaylightTime();
    method public void setID(java.lang.String);
    method public abstract void setRawOffset(int);
    method public abstract boolean useDaylightTime();
    field public static final int GENERIC_LOCATION = 7; // 0x7
    field public static final android.icu.util.TimeZone GMT_ZONE;
    field public static final int LONG = 1; // 0x1
    field public static final int LONG_GENERIC = 3; // 0x3
    field public static final int LONG_GMT = 5; // 0x5
    field public static final int SHORT = 0; // 0x0
    field public static final int SHORT_COMMONLY_USED = 6; // 0x6
    field public static final int SHORT_GENERIC = 2; // 0x2
    field public static final int SHORT_GMT = 4; // 0x4
    field public static final android.icu.util.TimeZone UNKNOWN_ZONE;
    field public static final java.lang.String UNKNOWN_ZONE_ID = "Etc/Unknown";
  }

  public static final class TimeZone.SystemTimeZoneType extends java.lang.Enum {
    method public static android.icu.util.TimeZone.SystemTimeZoneType valueOf(java.lang.String);
    method public static final android.icu.util.TimeZone.SystemTimeZoneType[] values();
  }

  public final class ULocale implements java.lang.Comparable java.io.Serializable {
    ctor public ULocale(java.lang.String);
    ctor public ULocale(java.lang.String, java.lang.String);
    ctor public ULocale(java.lang.String, java.lang.String, java.lang.String);
    method public static android.icu.util.ULocale acceptLanguage(java.lang.String, android.icu.util.ULocale[], boolean[]);
    method public static android.icu.util.ULocale acceptLanguage(android.icu.util.ULocale[], android.icu.util.ULocale[], boolean[]);
    method public static android.icu.util.ULocale acceptLanguage(java.lang.String, boolean[]);
    method public static android.icu.util.ULocale acceptLanguage(android.icu.util.ULocale[], boolean[]);
    method public static android.icu.util.ULocale addLikelySubtags(android.icu.util.ULocale);
    method public static java.lang.String canonicalize(java.lang.String);
    method public java.lang.Object clone();
    method public int compareTo(android.icu.util.ULocale);
    method public static android.icu.util.ULocale createCanonical(java.lang.String);
    method public static android.icu.util.ULocale forLanguageTag(java.lang.String);
    method public static android.icu.util.ULocale forLocale(java.util.Locale);
    method public static android.icu.util.ULocale[] getAvailableLocales();
    method public java.lang.String getBaseName();
    method public static java.lang.String getBaseName(java.lang.String);
    method public java.lang.String getCharacterOrientation();
    method public java.lang.String getCountry();
    method public static java.lang.String getCountry(java.lang.String);
    method public static android.icu.util.ULocale getDefault();
    method public static android.icu.util.ULocale getDefault(android.icu.util.ULocale.Category);
    method public java.lang.String getDisplayCountry();
    method public java.lang.String getDisplayCountry(android.icu.util.ULocale);
    method public static java.lang.String getDisplayCountry(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayCountry(java.lang.String, android.icu.util.ULocale);
    method public static java.lang.String getDisplayKeyword(java.lang.String);
    method public static java.lang.String getDisplayKeyword(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayKeyword(java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getDisplayKeywordValue(java.lang.String);
    method public java.lang.String getDisplayKeywordValue(java.lang.String, android.icu.util.ULocale);
    method public static java.lang.String getDisplayKeywordValue(java.lang.String, java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayKeywordValue(java.lang.String, java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getDisplayLanguage();
    method public java.lang.String getDisplayLanguage(android.icu.util.ULocale);
    method public static java.lang.String getDisplayLanguage(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayLanguage(java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getDisplayLanguageWithDialect();
    method public java.lang.String getDisplayLanguageWithDialect(android.icu.util.ULocale);
    method public static java.lang.String getDisplayLanguageWithDialect(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayLanguageWithDialect(java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getDisplayName();
    method public java.lang.String getDisplayName(android.icu.util.ULocale);
    method public static java.lang.String getDisplayName(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayName(java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getDisplayNameWithDialect();
    method public java.lang.String getDisplayNameWithDialect(android.icu.util.ULocale);
    method public static java.lang.String getDisplayNameWithDialect(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayNameWithDialect(java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getDisplayScript();
    method public java.lang.String getDisplayScript(android.icu.util.ULocale);
    method public static java.lang.String getDisplayScript(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayScript(java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getDisplayVariant();
    method public java.lang.String getDisplayVariant(android.icu.util.ULocale);
    method public static java.lang.String getDisplayVariant(java.lang.String, java.lang.String);
    method public static java.lang.String getDisplayVariant(java.lang.String, android.icu.util.ULocale);
    method public java.lang.String getExtension(char);
    method public java.util.Set<java.lang.Character> getExtensionKeys();
    method public static java.lang.String getFallback(java.lang.String);
    method public android.icu.util.ULocale getFallback();
    method public java.lang.String getISO3Country();
    method public static java.lang.String getISO3Country(java.lang.String);
    method public java.lang.String getISO3Language();
    method public static java.lang.String getISO3Language(java.lang.String);
    method public static java.lang.String[] getISOCountries();
    method public static java.lang.String[] getISOLanguages();
    method public java.lang.String getKeywordValue(java.lang.String);
    method public static java.lang.String getKeywordValue(java.lang.String, java.lang.String);
    method public java.util.Iterator<java.lang.String> getKeywords();
    method public static java.util.Iterator<java.lang.String> getKeywords(java.lang.String);
    method public java.lang.String getLanguage();
    method public static java.lang.String getLanguage(java.lang.String);
    method public java.lang.String getLineOrientation();
    method public java.lang.String getName();
    method public static java.lang.String getName(java.lang.String);
    method public java.lang.String getScript();
    method public static java.lang.String getScript(java.lang.String);
    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 java.lang.String getVariant(java.lang.String);
    method public boolean isRightToLeft();
    method public static android.icu.util.ULocale minimizeSubtags(android.icu.util.ULocale);
    method public android.icu.util.ULocale setKeywordValue(java.lang.String, java.lang.String);
    method public static java.lang.String setKeywordValue(java.lang.String, java.lang.String, java.lang.String);
    method public java.lang.String toLanguageTag();
    method public static java.lang.String toLegacyKey(java.lang.String);
    method public static java.lang.String toLegacyType(java.lang.String, java.lang.String);
    method public java.util.Locale toLocale();
    method public static java.lang.String toUnicodeLocaleKey(java.lang.String);
    method public static java.lang.String toUnicodeLocaleType(java.lang.String, java.lang.String);
    field public static final android.icu.util.ULocale CANADA;
    field public static final android.icu.util.ULocale CANADA_FRENCH;
    field public static final android.icu.util.ULocale CHINA;
    field public static final android.icu.util.ULocale CHINESE;
    field public static final android.icu.util.ULocale ENGLISH;
    field public static final android.icu.util.ULocale FRANCE;
    field public static final android.icu.util.ULocale FRENCH;
    field public static final android.icu.util.ULocale GERMAN;
    field public static final android.icu.util.ULocale GERMANY;
    field public static final android.icu.util.ULocale ITALIAN;
    field public static final android.icu.util.ULocale ITALY;
    field public static final android.icu.util.ULocale JAPAN;
    field public static final android.icu.util.ULocale JAPANESE;
    field public static final android.icu.util.ULocale KOREA;
    field public static final android.icu.util.ULocale KOREAN;
    field public static final android.icu.util.ULocale PRC;
    field public static final char PRIVATE_USE_EXTENSION = 120; // 0x0078 'x'
    field public static final android.icu.util.ULocale ROOT;
    field public static final android.icu.util.ULocale SIMPLIFIED_CHINESE;
    field public static final android.icu.util.ULocale TAIWAN;
    field public static final android.icu.util.ULocale TRADITIONAL_CHINESE;
    field public static final android.icu.util.ULocale UK;
    field public static final char UNICODE_LOCALE_EXTENSION = 117; // 0x0075 'u'
    field public static final android.icu.util.ULocale US;
  }

  public static final class ULocale.Builder {
    ctor public ULocale.Builder();
    method public android.icu.util.ULocale.Builder addUnicodeLocaleAttribute(java.lang.String);
    method public android.icu.util.ULocale build();
    method public android.icu.util.ULocale.Builder clear();
    method public android.icu.util.ULocale.Builder clearExtensions();
    method public android.icu.util.ULocale.Builder removeUnicodeLocaleAttribute(java.lang.String);
    method public android.icu.util.ULocale.Builder setExtension(char, java.lang.String);
    method public android.icu.util.ULocale.Builder setLanguage(java.lang.String);
    method public android.icu.util.ULocale.Builder setLanguageTag(java.lang.String);
    method public android.icu.util.ULocale.Builder setLocale(android.icu.util.ULocale);
    method public android.icu.util.ULocale.Builder setRegion(java.lang.String);
    method public android.icu.util.ULocale.Builder setScript(java.lang.String);
    method public android.icu.util.ULocale.Builder setUnicodeLocaleKeyword(java.lang.String, java.lang.String);
    method public android.icu.util.ULocale.Builder setVariant(java.lang.String);
  }

  public static final class ULocale.Category extends java.lang.Enum {
    method public static android.icu.util.ULocale.Category valueOf(java.lang.String);
    method public static final android.icu.util.ULocale.Category[] values();
    enum_constant public static final android.icu.util.ULocale.Category DISPLAY;
    enum_constant public static final android.icu.util.ULocale.Category FORMAT;
  }

  public abstract interface ValueIterator {
    method public abstract boolean next(android.icu.util.ValueIterator.Element);
    method public abstract void reset();
    method public abstract void setRange(int, int);
  }

  public static final class ValueIterator.Element {
    ctor public ValueIterator.Element();
    field public int integer;
    field public java.lang.Object value;
  }

  public final class VersionInfo implements java.lang.Comparable {
    method public int compareTo(android.icu.util.VersionInfo);
    method public static android.icu.util.VersionInfo getInstance(java.lang.String);
    method public static android.icu.util.VersionInfo getInstance(int, int, int, int);
    method public static android.icu.util.VersionInfo getInstance(int, int, int);
    method public static android.icu.util.VersionInfo getInstance(int, int);
    method public static android.icu.util.VersionInfo getInstance(int);
    method public int getMajor();
    method public int getMicro();
    method public int getMilli();
    method public int getMinor();
    method public static void main(java.lang.String[]);
    field public static final android.icu.util.VersionInfo ICU_VERSION;
    field public static final android.icu.util.VersionInfo UCOL_BUILDER_VERSION;
    field public static final android.icu.util.VersionInfo UCOL_RUNTIME_VERSION;
    field public static final android.icu.util.VersionInfo UNICODE_1_0;
    field public static final android.icu.util.VersionInfo UNICODE_1_0_1;
    field public static final android.icu.util.VersionInfo UNICODE_1_1_0;
    field public static final android.icu.util.VersionInfo UNICODE_1_1_5;
    field public static final android.icu.util.VersionInfo UNICODE_2_0;
    field public static final android.icu.util.VersionInfo UNICODE_2_1_2;
    field public static final android.icu.util.VersionInfo UNICODE_2_1_5;
    field public static final android.icu.util.VersionInfo UNICODE_2_1_8;
    field public static final android.icu.util.VersionInfo UNICODE_2_1_9;
    field public static final android.icu.util.VersionInfo UNICODE_3_0;
    field public static final android.icu.util.VersionInfo UNICODE_3_0_1;
    field public static final android.icu.util.VersionInfo UNICODE_3_1_0;
    field public static final android.icu.util.VersionInfo UNICODE_3_1_1;
    field public static final android.icu.util.VersionInfo UNICODE_3_2;
    field public static final android.icu.util.VersionInfo UNICODE_4_0;
    field public static final android.icu.util.VersionInfo UNICODE_4_0_1;
    field public static final android.icu.util.VersionInfo UNICODE_4_1;
    field public static final android.icu.util.VersionInfo UNICODE_5_0;
    field public static final android.icu.util.VersionInfo UNICODE_5_1;
    field public static final android.icu.util.VersionInfo UNICODE_5_2;
    field public static final android.icu.util.VersionInfo UNICODE_6_0;
    field public static final android.icu.util.VersionInfo UNICODE_6_1;
    field public static final android.icu.util.VersionInfo UNICODE_6_2;
    field public static final android.icu.util.VersionInfo UNICODE_6_3;
    field public static final android.icu.util.VersionInfo UNICODE_7_0;
    field public static final android.icu.util.VersionInfo UNICODE_8_0;
  }

}

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 GnssClock implements android.os.Parcelable {
    method public int describeContents();
    method public double getBiasNanos();
    method public double getBiasUncertaintyNanos();
    method public double getDriftNanosPerSecond();
    method public double getDriftUncertaintyNanosPerSecond();
    method public long getFullBiasNanos();
    method public int getHardwareClockDiscontinuityCount();
    method public int getLeapSecond();
    method public long getTimeNanos();
    method public double getTimeUncertaintyNanos();
    method public boolean hasBiasNanos();
    method public boolean hasBiasUncertaintyNanos();
    method public boolean hasDriftNanosPerSecond();
    method public boolean hasDriftUncertaintyNanosPerSecond();
    method public boolean hasFullBiasNanos();
    method public boolean hasLeapSecond();
    method public boolean hasTimeUncertaintyNanos();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.GnssClock> CREATOR;
  }

  public final class GnssMeasurement implements android.os.Parcelable {
    method public int describeContents();
    method public double getAccumulatedDeltaRangeMeters();
    method public int getAccumulatedDeltaRangeState();
    method public double getAccumulatedDeltaRangeUncertaintyMeters();
    method public long getCarrierCycles();
    method public float getCarrierFrequencyHz();
    method public double getCarrierPhase();
    method public double getCarrierPhaseUncertainty();
    method public double getCn0DbHz();
    method public int getConstellationType();
    method public int getMultipathIndicator();
    method public double getPseudorangeRateMetersPerSecond();
    method public double getPseudorangeRateUncertaintyMetersPerSecond();
    method public long getReceivedSvTimeNanos();
    method public long getReceivedSvTimeUncertaintyNanos();
    method public double getSnrInDb();
    method public int getState();
    method public int getSvid();
    method public double getTimeOffsetNanos();
    method public boolean hasCarrierCycles();
    method public boolean hasCarrierFrequencyHz();
    method public boolean hasCarrierPhase();
    method public boolean hasCarrierPhaseUncertainty();
    method public boolean hasSnrInDb();
    method public boolean isPseudorangeRateCorrected();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ADR_STATE_CYCLE_SLIP = 4; // 0x4
    field public static final int ADR_STATE_RESET = 2; // 0x2
    field public static final int ADR_STATE_UNKNOWN = 0; // 0x0
    field public static final int ADR_STATE_VALID = 1; // 0x1
    field public static final android.os.Parcelable.Creator<android.location.GnssMeasurement> CREATOR;
    field public static final int MULTIPATH_INDICATOR_DETECTED = 1; // 0x1
    field public static final int MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2
    field public static final int MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0
    field public static final int STATE_BIT_SYNC = 2; // 0x2
    field public static final int STATE_CODE_LOCK = 1; // 0x1
    field public static final int STATE_MSEC_AMBIGUOUS = 16; // 0x10
    field public static final int STATE_SUBFRAME_SYNC = 4; // 0x4
    field public static final int STATE_TOW_DECODED = 8; // 0x8
    field public static final int STATE_UNKNOWN = 0; // 0x0
  }

  public static abstract class GnssMeasurement.MultipathIndicator implements java.lang.annotation.Annotation {
  }

  public final class GnssMeasurementsEvent implements android.os.Parcelable {
    ctor public GnssMeasurementsEvent(android.location.GnssClock, android.location.GnssMeasurement[]);
    method public int describeContents();
    method public android.location.GnssClock getClock();
    method public java.util.Collection<android.location.GnssMeasurement> getMeasurements();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.GnssMeasurementsEvent> CREATOR;
    field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
    field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
    field public static final int STATUS_READY = 1; // 0x1
  }

  public static abstract class GnssMeasurementsEvent.Callback {
    ctor public GnssMeasurementsEvent.Callback();
    method public void onGnssMeasurementsReceived(android.location.GnssMeasurementsEvent);
    method public void onStatusChanged(int);
  }

  public static abstract class GnssMeasurementsEvent.GnssMeasurementsStatus implements java.lang.annotation.Annotation {
  }

  public final class GnssNavigationMessage implements android.os.Parcelable {
    method public int describeContents();
    method public byte[] getData();
    method public int getMessageId();
    method public int getStatus();
    method public int getSubmessageId();
    method public int getSvid();
    method public int getType();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
    field public static final int STATUS_PARITY_PASSED = 1; // 0x1
    field public static final int STATUS_PARITY_REBUILT = 2; // 0x2
    field public static final int STATUS_UNKNOWN = 0; // 0x0
    field public static final int TYPE_BDS_D1 = 1281; // 0x501
    field public static final int TYPE_BDS_D2 = 1282; // 0x502
    field public static final int TYPE_GAL_F = 1538; // 0x602
    field public static final int TYPE_GAL_I = 1537; // 0x601
    field public static final int TYPE_GLO_L1CA = 769; // 0x301
    field public static final int TYPE_GPS_CNAV2 = 260; // 0x104
    field public static final int TYPE_GPS_L1CA = 257; // 0x101
    field public static final int TYPE_GPS_L2CNAV = 258; // 0x102
    field public static final int TYPE_GPS_L5CNAV = 259; // 0x103
    field public static final int TYPE_UNKNOWN = 0; // 0x0
  }

  public static abstract class GnssNavigationMessage.GnssNavigationMessageType implements java.lang.annotation.Annotation {
  }

  public final class GnssNavigationMessageEvent implements android.os.Parcelable {
    ctor public GnssNavigationMessageEvent(android.location.GnssNavigationMessage);
    method public int describeContents();
    method public android.location.GnssNavigationMessage getNavigationMessage();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessageEvent> CREATOR;
    field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
    field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
    field public static final int STATUS_READY = 1; // 0x1
  }

  public static abstract class GnssNavigationMessageEvent.Callback {
    ctor public GnssNavigationMessageEvent.Callback();
    method public void onGnssNavigationMessageReceived(android.location.GnssNavigationMessageEvent);
    method public void onStatusChanged(int);
  }

  public static abstract class GnssNavigationMessageEvent.GnssNavigationMessageStatus implements java.lang.annotation.Annotation {
  }

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

  public final class GnssStatus {
    method public float getAzimuthDegrees(int);
    method public float getCn0DbHz(int);
    method public int getConstellationType(int);
    method public float getElevationDegrees(int);
    method public int getNumSatellites();
    method public int getSvid(int);
    method public boolean hasAlmanac(int);
    method public boolean hasEphemeris(int);
    method public boolean usedInFix(int);
    field public static final int CONSTELLATION_BEIDOU = 5; // 0x5
    field public static final int CONSTELLATION_GALILEO = 6; // 0x6
    field public static final int CONSTELLATION_GLONASS = 3; // 0x3
    field public static final int CONSTELLATION_GPS = 1; // 0x1
    field public static final int CONSTELLATION_QZSS = 4; // 0x4
    field public static final int CONSTELLATION_SBAS = 2; // 0x2
    field public static final int CONSTELLATION_UNKNOWN = 0; // 0x0
  }

  public static abstract class GnssStatus.ConstellationType implements java.lang.annotation.Annotation {
  }

  public abstract class GnssStatusCallback {
    ctor public GnssStatusCallback();
    method public void onFirstFix(int);
    method public void onSatelliteStatusChanged(android.location.GnssStatus);
    method public void onStarted();
    method public void onStopped();
  }

  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 deprecated boolean addGpsStatusListener(android.location.GpsStatus.Listener);
    method public deprecated boolean addNmeaListener(android.location.GpsStatus.NmeaListener);
    method public boolean addNmeaListener(android.location.GnssNmeaListener);
    method public boolean addNmeaListener(android.location.GnssNmeaListener, android.os.Handler);
    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 deprecated 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 boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
    method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
    method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
    method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback, android.os.Handler);
    method public boolean registerGnssStatusCallback(android.location.GnssStatusCallback);
    method public boolean registerGnssStatusCallback(android.location.GnssStatusCallback, android.os.Handler);
    method public deprecated void removeGpsStatusListener(android.location.GpsStatus.Listener);
    method public deprecated void removeNmeaListener(android.location.GpsStatus.NmeaListener);
    method public void removeNmeaListener(android.location.GnssNmeaListener);
    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);
    method public void unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
    method public void unregisterGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
    method public void unregisterGnssStatusCallback(android.location.GnssStatusCallback);
    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 FLAG_LOW_LATENCY = 256; // 0x100
    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 abstract class AudioDeviceCallback {
    ctor public AudioDeviceCallback();
    method public void onAudioDevicesAdded(android.media.AudioDeviceInfo[]);
    method public void onAudioDevicesRemoved(android.media.AudioDeviceInfo[]);
  }

  public final class AudioDeviceInfo {
    method public int[] getChannelCounts();
    method public int[] getChannelIndexMasks();
    method public int[] getChannelMasks();
    method public int[] getEncodings();
    method public int getId();
    method public java.lang.CharSequence getProductName();
    method public int[] getSampleRates();
    method public int getType();
    method public boolean isSink();
    method public boolean isSource();
    field public static final int TYPE_AUX_LINE = 19; // 0x13
    field public static final int TYPE_BLUETOOTH_A2DP = 8; // 0x8
    field public static final int TYPE_BLUETOOTH_SCO = 7; // 0x7
    field public static final int TYPE_BUILTIN_EARPIECE = 1; // 0x1
    field public static final int TYPE_BUILTIN_MIC = 15; // 0xf
    field public static final int TYPE_BUILTIN_SPEAKER = 2; // 0x2
    field public static final int TYPE_BUS = 21; // 0x15
    field public static final int TYPE_DOCK = 13; // 0xd
    field public static final int TYPE_FM = 14; // 0xe
    field public static final int TYPE_FM_TUNER = 16; // 0x10
    field public static final int TYPE_HDMI = 9; // 0x9
    field public static final int TYPE_HDMI_ARC = 10; // 0xa
    field public static final int TYPE_IP = 20; // 0x14
    field public static final int TYPE_LINE_ANALOG = 5; // 0x5
    field public static final int TYPE_LINE_DIGITAL = 6; // 0x6
    field public static final int TYPE_TELEPHONY = 18; // 0x12
    field public static final int TYPE_TV_TUNER = 17; // 0x11
    field public static final int TYPE_UNKNOWN = 0; // 0x0
    field public static final int TYPE_USB_ACCESSORY = 12; // 0xc
    field public static final int TYPE_USB_DEVICE = 11; // 0xb
    field public static final int TYPE_WIRED_HEADPHONES = 4; // 0x4
    field public static final int TYPE_WIRED_HEADSET = 3; // 0x3
  }

  public final class AudioFormat implements android.os.Parcelable {
    method public int describeContents();
    method public int getChannelCount();
    method public int getChannelIndexMask();
    method public int getChannelMask();
    method public int getEncoding();
    method public int getSampleRate();
    method public void writeToParcel(android.os.Parcel, int);
    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 deprecated int CHANNEL_OUT_7POINT1 = 1020; // 0x3fc
    field public static final int CHANNEL_OUT_7POINT1_SURROUND = 6396; // 0x18fc
    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 android.os.Parcelable.Creator<android.media.AudioFormat> CREATOR;
    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_IEC61937 = 13; // 0xd
    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
    field public static final int SAMPLE_RATE_UNSPECIFIED = 0; // 0x0
  }

  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);
    method public android.media.AudioFormat.Builder setChannelMask(int);
    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 android.media.AudioRecordingConfiguration[] getActiveRecordingConfigurations();
    method public android.media.AudioDeviceInfo[] getDevices(int);
    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 void registerAudioDeviceCallback(android.media.AudioDeviceCallback, android.os.Handler);
    method public void registerAudioRecordingCallback(android.media.AudioManager.AudioRecordingCallback, android.os.Handler);
    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 void unregisterAudioDeviceCallback(android.media.AudioDeviceCallback);
    method public void unregisterAudioRecordingCallback(android.media.AudioManager.AudioRecordingCallback);
    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 GET_DEVICES_ALL = 3; // 0x3
    field public static final int GET_DEVICES_INPUTS = 1; // 0x1
    field public static final int GET_DEVICES_OUTPUTS = 2; // 0x2
    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 PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED = "android.media.property.SUPPORT_AUDIO_SOURCE_UNPROCESSED";
    field public static final java.lang.String PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND = "android.media.property.SUPPORT_MIC_NEAR_ULTRASOUND";
    field public static final java.lang.String PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND = "android.media.property.SUPPORT_SPEAKER_NEAR_ULTRASOUND";
    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 class AudioManager.AudioRecordingCallback {
    ctor public AudioManager.AudioRecordingCallback();
    method public void onRecordConfigChanged(android.media.AudioRecordingConfiguration[]);
  }

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

  public class AudioRecord implements android.media.AudioRouting {
    ctor public AudioRecord(int, int, int, int, int) throws java.lang.IllegalArgumentException;
    method public deprecated void addOnRoutingChangedListener(android.media.AudioRecord.OnRoutingChangedListener, android.os.Handler);
    method public void addOnRoutingListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler);
    method public int getAudioFormat();
    method public int getAudioSessionId();
    method public int getAudioSource();
    method public int getBufferSizeInFrames();
    method public int getChannelConfiguration();
    method public int getChannelCount();
    method public android.media.AudioFormat getFormat();
    method public static int getMinBufferSize(int, int, int);
    method public int getNotificationMarkerPosition();
    method public int getPositionNotificationPeriod();
    method public android.media.AudioDeviceInfo getPreferredDevice();
    method public int getRecordingState();
    method public android.media.AudioDeviceInfo getRoutedDevice();
    method public int getSampleRate();
    method public int getState();
    method public int getTimestamp(android.media.AudioTimestamp, int);
    method public int read(byte[], int, int);
    method public int read(byte[], int, int, int);
    method public int read(short[], int, int);
    method public int read(short[], int, int, int);
    method public int read(float[], int, int, int);
    method public int read(java.nio.ByteBuffer, int);
    method public int read(java.nio.ByteBuffer, int, int);
    method public void release();
    method public deprecated void removeOnRoutingChangedListener(android.media.AudioRecord.OnRoutingChangedListener);
    method public void removeOnRoutingListener(android.media.AudioRouting.OnRoutingChangedListener);
    method public int setNotificationMarkerPosition(int);
    method public int setPositionNotificationPeriod(int);
    method public boolean setPreferredDevice(android.media.AudioDeviceInfo);
    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 setAudioSource(int) throws java.lang.IllegalArgumentException;
    method public android.media.AudioRecord.Builder setBufferSizeInBytes(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 static abstract interface AudioRecord.OnRoutingChangedListener {
    method public abstract void onRoutingChanged(android.media.AudioRecord);
  }

  public final class AudioRecordingConfiguration implements android.os.Parcelable {
    method public int describeContents();
    method public android.media.AudioDeviceInfo getAudioDevice();
    method public int getClientAudioSessionId();
    method public int getClientAudioSource();
    method public android.media.AudioFormat getClientFormat();
    method public android.media.AudioFormat getFormat();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.media.AudioRecordingConfiguration> CREATOR;
  }

  public abstract interface AudioRouting {
    method public abstract void addOnRoutingListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler);
    method public abstract android.media.AudioDeviceInfo getPreferredDevice();
    method public abstract android.media.AudioDeviceInfo getRoutedDevice();
    method public abstract void removeOnRoutingListener(android.media.AudioRouting.OnRoutingChangedListener);
    method public abstract boolean setPreferredDevice(android.media.AudioDeviceInfo);
  }

  public static abstract interface AudioRouting.OnRoutingChangedListener {
    method public abstract void onRoutingChanged(android.media.AudioRouting);
  }

  public final class AudioTimestamp {
    ctor public AudioTimestamp();
    field public static final int TIMEBASE_BOOTTIME = 1; // 0x1
    field public static final int TIMEBASE_MONOTONIC = 0; // 0x0
    field public long framePosition;
    field public long nanoTime;
  }

  public class AudioTrack implements android.media.AudioRouting {
    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 deprecated void addOnRoutingChangedListener(android.media.AudioTrack.OnRoutingChangedListener, android.os.Handler);
    method public void addOnRoutingListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler);
    method public int attachAuxEffect(int);
    method public void flush();
    method public int getAudioFormat();
    method public int getAudioSessionId();
    method public int getBufferCapacityInFrames();
    method public int getBufferSizeInFrames();
    method public int getChannelConfiguration();
    method public int getChannelCount();
    method public android.media.AudioFormat getFormat();
    method public static float getMaxVolume();
    method public static int getMinBufferSize(int, int, int);
    method public static float getMinVolume();
    method protected deprecated int getNativeFrameCount();
    method public static int getNativeOutputSampleRate(int);
    method public int getNotificationMarkerPosition();
    method public int getPlayState();
    method public int getPlaybackHeadPosition();
    method public android.media.PlaybackParams getPlaybackParams();
    method public int getPlaybackRate();
    method public int getPositionNotificationPeriod();
    method public android.media.AudioDeviceInfo getPreferredDevice();
    method public android.media.AudioDeviceInfo getRoutedDevice();
    method public int getSampleRate();
    method public int getState();
    method public int getStreamType();
    method public boolean getTimestamp(android.media.AudioTimestamp);
    method public int getUnderrunCount();
    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 deprecated void removeOnRoutingChangedListener(android.media.AudioTrack.OnRoutingChangedListener);
    method public void removeOnRoutingListener(android.media.AudioRouting.OnRoutingChangedListener);
    method public int setAuxEffectSendLevel(float);
    method public int setBufferSizeInFrames(int);
    method public int setLoopPoints(int, int, int);
    method public int setNotificationMarkerPosition(int);
    method public int setPlaybackHeadPosition(int);
    method public void setPlaybackParams(android.media.PlaybackParams);
    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 public boolean setPreferredDevice(android.media.AudioDeviceInfo);
    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(byte[], int, int, int);
    method public int write(short[], int, int);
    method public int write(short[], int, int, int);
    method public int write(float[], int, int, int);
    method public int write(java.nio.ByteBuffer, int, int);
    method public int write(java.nio.ByteBuffer, int, int, long);
    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 static abstract deprecated interface AudioTrack.OnRoutingChangedListener {
    method public abstract deprecated void onRoutingChanged(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 abstract class DrmInitData {
    ctor public DrmInitData();
    method public abstract android.media.DrmInitData.SchemeInitData get(java.util.UUID);
  }

  public static final class DrmInitData.SchemeInitData {
    field public final byte[] data;
    field public final java.lang.String mimeType;
  }

  public class ExifInterface {
    ctor public ExifInterface(java.lang.String) throws java.io.IOException;
    ctor public ExifInterface(java.io.FileDescriptor) throws java.io.IOException;
    ctor public ExifInterface(java.io.InputStream) 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_APERTURE_VALUE = "ApertureValue";
    field public static final java.lang.String TAG_ARTIST = "Artist";
    field public static final java.lang.String TAG_BITS_PER_SAMPLE = "BitsPerSample";
    field public static final java.lang.String TAG_BRIGHTNESS_VALUE = "BrightnessValue";
    field public static final java.lang.String TAG_CFA_PATTERN = "CFAPattern";
    field public static final java.lang.String TAG_COLOR_SPACE = "ColorSpace";
    field public static final java.lang.String TAG_COMPONENTS_CONFIGURATION = "ComponentsConfiguration";
    field public static final java.lang.String TAG_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel";
    field public static final java.lang.String TAG_COMPRESSION = "Compression";
    field public static final java.lang.String TAG_CONTRAST = "Contrast";
    field public static final java.lang.String TAG_COPYRIGHT = "Copyright";
    field public static final java.lang.String TAG_CUSTOM_RENDERED = "CustomRendered";
    field public static final java.lang.String TAG_DATETIME = "DateTime";
    field public static final java.lang.String TAG_DATETIME_DIGITIZED = "DateTimeDigitized";
    field public static final java.lang.String TAG_DATETIME_ORIGINAL = "DateTimeOriginal";
    field public static final java.lang.String TAG_DEVICE_SETTING_DESCRIPTION = "DeviceSettingDescription";
    field public static final java.lang.String TAG_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio";
    field public static final java.lang.String TAG_EXIF_VERSION = "ExifVersion";
    field public static final java.lang.String TAG_EXPOSURE_BIAS_VALUE = "ExposureBiasValue";
    field public static final java.lang.String TAG_EXPOSURE_INDEX = "ExposureIndex";
    field public static final java.lang.String TAG_EXPOSURE_MODE = "ExposureMode";
    field public static final java.lang.String TAG_EXPOSURE_PROGRAM = "ExposureProgram";
    field public static final java.lang.String TAG_EXPOSURE_TIME = "ExposureTime";
    field public static final java.lang.String TAG_FILE_SOURCE = "FileSource";
    field public static final java.lang.String TAG_FLASH = "Flash";
    field public static final java.lang.String TAG_FLASHPIX_VERSION = "FlashpixVersion";
    field public static final java.lang.String TAG_FLASH_ENERGY = "FlashEnergy";
    field public static final java.lang.String TAG_FOCAL_LENGTH = "FocalLength";
    field public static final java.lang.String TAG_FOCAL_LENGTH_IN_35MM_FILM = "FocalLengthIn35mmFilm";
    field public static final java.lang.String TAG_FOCAL_PLANE_RESOLUTION_UNIT = "FocalPlaneResolutionUnit";
    field public static final java.lang.String TAG_FOCAL_PLANE_X_RESOLUTION = "FocalPlaneXResolution";
    field public static final java.lang.String TAG_FOCAL_PLANE_Y_RESOLUTION = "FocalPlaneYResolution";
    field public static final java.lang.String TAG_F_NUMBER = "FNumber";
    field public static final java.lang.String TAG_GAIN_CONTROL = "GainControl";
    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_AREA_INFORMATION = "GPSAreaInformation";
    field public static final java.lang.String TAG_GPS_DATESTAMP = "GPSDateStamp";
    field public static final java.lang.String TAG_GPS_DEST_BEARING = "GPSDestBearing";
    field public static final java.lang.String TAG_GPS_DEST_BEARING_REF = "GPSDestBearingRef";
    field public static final java.lang.String TAG_GPS_DEST_DISTANCE = "GPSDestDistance";
    field public static final java.lang.String TAG_GPS_DEST_DISTANCE_REF = "GPSDestDistanceRef";
    field public static final java.lang.String TAG_GPS_DEST_LATITUDE = "GPSDestLatitude";
    field public static final java.lang.String TAG_GPS_DEST_LATITUDE_REF = "GPSDestLatitudeRef";
    field public static final java.lang.String TAG_GPS_DEST_LONGITUDE = "GPSDestLongitude";
    field public static final java.lang.String TAG_GPS_DEST_LONGITUDE_REF = "GPSDestLongitudeRef";
    field public static final java.lang.String TAG_GPS_DIFFERENTIAL = "GPSDifferential";
    field public static final java.lang.String TAG_GPS_DOP = "GPSDOP";
    field public static final java.lang.String TAG_GPS_IMG_DIRECTION = "GPSImgDirection";
    field public static final java.lang.String TAG_GPS_IMG_DIRECTION_REF = "GPSImgDirectionRef";
    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_MAP_DATUM = "GPSMapDatum";
    field public static final java.lang.String TAG_GPS_MEASURE_MODE = "GPSMeasureMode";
    field public static final java.lang.String TAG_GPS_PROCESSING_METHOD = "GPSProcessingMethod";
    field public static final java.lang.String TAG_GPS_SATELLITES = "GPSSatellites";
    field public static final java.lang.String TAG_GPS_SPEED = "GPSSpeed";
    field public static final java.lang.String TAG_GPS_SPEED_REF = "GPSSpeedRef";
    field public static final java.lang.String TAG_GPS_STATUS = "GPSStatus";
    field public static final java.lang.String TAG_GPS_TIMESTAMP = "GPSTimeStamp";
    field public static final java.lang.String TAG_GPS_TRACK = "GPSTrack";
    field public static final java.lang.String TAG_GPS_TRACK_REF = "GPSTrackRef";
    field public static final java.lang.String TAG_GPS_VERSION_ID = "GPSVersionID";
    field public static final java.lang.String TAG_IMAGE_DESCRIPTION = "ImageDescription";
    field public static final java.lang.String TAG_IMAGE_LENGTH = "ImageLength";
    field public static final java.lang.String TAG_IMAGE_UNIQUE_ID = "ImageUniqueID";
    field public static final java.lang.String TAG_IMAGE_WIDTH = "ImageWidth";
    field public static final java.lang.String TAG_INTEROPERABILITY_INDEX = "InteroperabilityIndex";
    field public static final java.lang.String TAG_ISO = "ISOSpeedRatings";
    field public static final java.lang.String TAG_ISO_SPEED_RATINGS = "ISOSpeedRatings";
    field public static final java.lang.String TAG_JPEG_INTERCHANGE_FORMAT = "JPEGInterchangeFormat";
    field public static final java.lang.String TAG_JPEG_INTERCHANGE_FORMAT_LENGTH = "JPEGInterchangeFormatLength";
    field public static final java.lang.String TAG_LIGHT_SOURCE = "LightSource";
    field public static final java.lang.String TAG_MAKE = "Make";
    field public static final java.lang.String TAG_MAKER_NOTE = "MakerNote";
    field public static final java.lang.String TAG_MAX_APERTURE_VALUE = "MaxApertureValue";
    field public static final java.lang.String TAG_METERING_MODE = "MeteringMode";
    field public static final java.lang.String TAG_MODEL = "Model";
    field public static final java.lang.String TAG_OECF = "OECF";
    field public static final java.lang.String TAG_ORIENTATION = "Orientation";
    field public static final java.lang.String TAG_PHOTOMETRIC_INTERPRETATION = "PhotometricInterpretation";
    field public static final java.lang.String TAG_PIXEL_X_DIMENSION = "PixelXDimension";
    field public static final java.lang.String TAG_PIXEL_Y_DIMENSION = "PixelYDimension";
    field public static final java.lang.String TAG_PLANAR_CONFIGURATION = "PlanarConfiguration";
    field public static final java.lang.String TAG_PRIMARY_CHROMATICITIES = "PrimaryChromaticities";
    field public static final java.lang.String TAG_REFERENCE_BLACK_WHITE = "ReferenceBlackWhite";
    field public static final java.lang.String TAG_RELATED_SOUND_FILE = "RelatedSoundFile";
    field public static final java.lang.String TAG_RESOLUTION_UNIT = "ResolutionUnit";
    field public static final java.lang.String TAG_ROWS_PER_STRIP = "RowsPerStrip";
    field public static final java.lang.String TAG_SAMPLES_PER_PIXEL = "SamplesPerPixel";
    field public static final java.lang.String TAG_SATURATION = "Saturation";
    field public static final java.lang.String TAG_SCENE_CAPTURE_TYPE = "SceneCaptureType";
    field public static final java.lang.String TAG_SCENE_TYPE = "SceneType";
    field public static final java.lang.String TAG_SENSING_METHOD = "SensingMethod";
    field public static final java.lang.String TAG_SHARPNESS = "Sharpness";
    field public static final java.lang.String TAG_SHUTTER_SPEED_VALUE = "ShutterSpeedValue";
    field public static final java.lang.String TAG_SOFTWARE = "Software";
    field public static final java.lang.String TAG_SPATIAL_FREQUENCY_RESPONSE = "SpatialFrequencyResponse";
    field public static final java.lang.String TAG_SPECTRAL_SENSITIVITY = "SpectralSensitivity";
    field public static final java.lang.String TAG_STRIP_BYTE_COUNTS = "StripByteCounts";
    field public static final java.lang.String TAG_STRIP_OFFSETS = "StripOffsets";
    field public static final java.lang.String TAG_SUBJECT_AREA = "SubjectArea";
    field public static final java.lang.String TAG_SUBJECT_DISTANCE = "SubjectDistance";
    field public static final java.lang.String TAG_SUBJECT_DISTANCE_RANGE = "SubjectDistanceRange";
    field public static final java.lang.String TAG_SUBJECT_LOCATION = "SubjectLocation";
    field public static final java.lang.String TAG_SUBSEC_TIME = "SubSecTime";
    field public static final java.lang.String TAG_SUBSEC_TIME_DIG = "SubSecTimeDigitized";
    field public static final java.lang.String TAG_SUBSEC_TIME_DIGITIZED = "SubSecTimeDigitized";
    field public static final java.lang.String TAG_SUBSEC_TIME_ORIG = "SubSecTimeOriginal";
    field public static final java.lang.String TAG_SUBSEC_TIME_ORIGINAL = "SubSecTimeOriginal";
    field public static final java.lang.String TAG_THUMBNAIL_IMAGE_LENGTH = "ThumbnailImageLength";
    field public static final java.lang.String TAG_THUMBNAIL_IMAGE_WIDTH = "ThumbnailImageWidth";
    field public static final java.lang.String TAG_TRANSFER_FUNCTION = "TransferFunction";
    field public static final java.lang.String TAG_USER_COMMENT = "UserComment";
    field public static final java.lang.String TAG_WHITE_BALANCE = "WhiteBalance";
    field public static final java.lang.String TAG_WHITE_POINT = "WhitePoint";
    field public static final java.lang.String TAG_X_RESOLUTION = "XResolution";
    field public static final java.lang.String TAG_Y_CB_CR_COEFFICIENTS = "YCbCrCoefficients";
    field public static final java.lang.String TAG_Y_CB_CR_POSITIONING = "YCbCrPositioning";
    field public static final java.lang.String TAG_Y_CB_CR_SUB_SAMPLING = "YCbCrSubSampling";
    field public static final java.lang.String TAG_Y_RESOLUTION = "YResolution";
    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 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 static android.media.ImageReader newInstance(int, 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 setOnImageReleasedListener(android.media.ImageWriter.OnImageReleasedListener, android.os.Handler);
  }

  public static abstract interface ImageWriter.OnImageReleasedListener {
    method public abstract void onImageReleased(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 static android.view.Surface createPersistentInputSurface();
    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, android.os.Handler);
    method public void setCallback(android.media.MediaCodec.Callback);
    method public void setInputSurface(android.view.Surface);
    method public void setOnFrameRenderedListener(android.media.MediaCodec.OnFrameRenderedListener, android.os.Handler);
    method public void setOutputSurface(android.view.Surface);
    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_CBC = 2; // 0x2
    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 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 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 getErrorCode();
    method public boolean isRecoverable();
    method public boolean isTransient();
    field public static final int ERROR_INSUFFICIENT_RESOURCE = 1100; // 0x44c
    field public static final int ERROR_RECLAIMED = 1101; // 0x44d
  }

  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
    field public static final int ERROR_SESSION_NOT_OPENED = 5; // 0x5
    field public static final int ERROR_UNSUPPORTED_OPERATION = 6; // 0x6
  }

  public static final class MediaCodec.CryptoInfo {
    ctor public MediaCodec.CryptoInfo();
    method public void set(int, int[], int[], byte[], byte[], int);
    method public void setPattern(android.media.MediaCodec.CryptoInfo.Pattern);
    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 static final class MediaCodec.CryptoInfo.Pattern {
    ctor public MediaCodec.CryptoInfo.Pattern(int, int);
    method public int getEncryptBlocks();
    method public int getSkipBlocks();
    method public void set(int, int);
  }

  public static abstract interface MediaCodec.OnFrameRenderedListener {
    method public abstract void onFrameRendered(android.media.MediaCodec, long, long);
  }

  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 deprecated int COLOR_Format12bitRGB444 = 3; // 0x3
    field public static final deprecated int COLOR_Format16bitARGB1555 = 5; // 0x5
    field public static final deprecated int COLOR_Format16bitARGB4444 = 4; // 0x4
    field public static final deprecated int COLOR_Format16bitBGR565 = 7; // 0x7
    field public static final int COLOR_Format16bitRGB565 = 6; // 0x6
    field public static final deprecated int COLOR_Format18BitBGR666 = 41; // 0x29
    field public static final deprecated int COLOR_Format18bitARGB1665 = 9; // 0x9
    field public static final deprecated int COLOR_Format18bitRGB666 = 8; // 0x8
    field public static final deprecated int COLOR_Format19bitARGB1666 = 10; // 0xa
    field public static final deprecated int COLOR_Format24BitABGR6666 = 43; // 0x2b
    field public static final deprecated int COLOR_Format24BitARGB6666 = 42; // 0x2a
    field public static final deprecated int COLOR_Format24bitARGB1887 = 13; // 0xd
    field public static final int COLOR_Format24bitBGR888 = 12; // 0xc
    field public static final deprecated int COLOR_Format24bitRGB888 = 11; // 0xb
    field public static final deprecated int COLOR_Format25bitARGB1888 = 14; // 0xe
    field public static final int COLOR_Format32bitABGR8888 = 2130747392; // 0x7f00a000
    field public static final deprecated int COLOR_Format32bitARGB8888 = 16; // 0x10
    field public static final deprecated int COLOR_Format32bitBGRA8888 = 15; // 0xf
    field public static final deprecated int COLOR_Format8bitRGB332 = 2; // 0x2
    field public static final deprecated int COLOR_FormatCbYCrY = 27; // 0x1b
    field public static final deprecated int COLOR_FormatCrYCbY = 28; // 0x1c
    field public static final int COLOR_FormatL16 = 36; // 0x24
    field public static final deprecated int COLOR_FormatL2 = 33; // 0x21
    field public static final deprecated int COLOR_FormatL24 = 37; // 0x25
    field public static final deprecated int COLOR_FormatL32 = 38; // 0x26
    field public static final deprecated int COLOR_FormatL4 = 34; // 0x22
    field public static final int COLOR_FormatL8 = 35; // 0x23
    field public static final deprecated int COLOR_FormatMonochrome = 1; // 0x1
    field public static final int COLOR_FormatRGBAFlexible = 2134288520; // 0x7f36a888
    field public static final int COLOR_FormatRGBFlexible = 2134292616; // 0x7f36b888
    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 deprecated int COLOR_FormatYCbYCr = 25; // 0x19
    field public static final deprecated int COLOR_FormatYCrYCb = 26; // 0x1a
    field public static final deprecated int COLOR_FormatYUV411PackedPlanar = 18; // 0x12
    field public static final deprecated int COLOR_FormatYUV411Planar = 17; // 0x11
    field public static final int COLOR_FormatYUV420Flexible = 2135033992; // 0x7f420888
    field public static final deprecated int COLOR_FormatYUV420PackedPlanar = 20; // 0x14
    field public static final deprecated int COLOR_FormatYUV420PackedSemiPlanar = 39; // 0x27
    field public static final deprecated int COLOR_FormatYUV420Planar = 19; // 0x13
    field public static final deprecated int COLOR_FormatYUV420SemiPlanar = 21; // 0x15
    field public static final int COLOR_FormatYUV422Flexible = 2135042184; // 0x7f422888
    field public static final deprecated int COLOR_FormatYUV422PackedPlanar = 23; // 0x17
    field public static final deprecated int COLOR_FormatYUV422PackedSemiPlanar = 40; // 0x28
    field public static final deprecated int COLOR_FormatYUV422Planar = 22; // 0x16
    field public static final deprecated int COLOR_FormatYUV422SemiPlanar = 24; // 0x18
    field public static final int COLOR_FormatYUV444Flexible = 2135181448; // 0x7f444888
    field public static final deprecated int COLOR_FormatYUV444Interleaved = 29; // 0x1d
    field public static final deprecated int COLOR_QCOM_FormatYUV420SemiPlanar = 2141391872; // 0x7fa30c00
    field public static final deprecated 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_IntraRefresh = "intra-refresh";
    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 DolbyVisionLevelFhd24 = 4; // 0x4
    field public static final int DolbyVisionLevelFhd30 = 8; // 0x8
    field public static final int DolbyVisionLevelFhd60 = 16; // 0x10
    field public static final int DolbyVisionLevelHd24 = 1; // 0x1
    field public static final int DolbyVisionLevelHd30 = 2; // 0x2
    field public static final int DolbyVisionLevelUhd24 = 32; // 0x20
    field public static final int DolbyVisionLevelUhd30 = 64; // 0x40
    field public static final int DolbyVisionLevelUhd48 = 128; // 0x80
    field public static final int DolbyVisionLevelUhd60 = 256; // 0x100
    field public static final int DolbyVisionProfileDvavDen = 2; // 0x2
    field public static final int DolbyVisionProfileDvavDer = 1; // 0x1
    field public static final int DolbyVisionProfileDvheDen = 4; // 0x4
    field public static final int DolbyVisionProfileDvheDer = 3; // 0x3
    field public static final int DolbyVisionProfileDvheDtr = 5; // 0x5
    field public static final int DolbyVisionProfileDvheStn = 6; // 0x6
    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 HEVCProfileMain10HDR10 = 4096; // 0x1000
    field public static final int MPEG2LevelH14 = 2; // 0x2
    field public static final int MPEG2LevelHL = 3; // 0x3
    field public static final int MPEG2LevelLL = 0; // 0x0
    field public static final int MPEG2LevelML = 1; // 0x1
    field public static final int MPEG2Profile422 = 2; // 0x2
    field public static final int MPEG2ProfileHigh = 5; // 0x5
    field public static final int MPEG2ProfileMain = 1; // 0x1
    field public static final int MPEG2ProfileSNR = 3; // 0x3
    field public static final int MPEG2ProfileSimple = 0; // 0x0
    field public static final int MPEG2ProfileSpatial = 4; // 0x4
    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 static final int VP9Level1 = 0; // 0x0
    field public static final int VP9Level11 = 1; // 0x1
    field public static final int VP9Level2 = 2; // 0x2
    field public static final int VP9Level21 = 4; // 0x4
    field public static final int VP9Level3 = 8; // 0x8
    field public static final int VP9Level31 = 16; // 0x10
    field public static final int VP9Level4 = 32; // 0x20
    field public static final int VP9Level41 = 64; // 0x40
    field public static final int VP9Level5 = 128; // 0x80
    field public static final int VP9Level51 = 256; // 0x100
    field public static final int VP9Level52 = 512; // 0x200
    field public static final int VP9Level6 = 1024; // 0x400
    field public static final int VP9Level61 = 2048; // 0x800
    field public static final int VP9Level62 = 4096; // 0x1000
    field public static final int VP9Profile0 = 0; // 0x0
    field public static final int VP9Profile1 = 1; // 0x1
    field public static final int VP9Profile2 = 2; // 0x2
    field public static final int VP9Profile3 = 3; // 0x3
    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.Double> getAchievableFrameRatesFor(int, int);
    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 abstract class MediaDataSource implements java.io.Closeable {
    ctor public MediaDataSource();
    method public abstract long getSize() throws java.io.IOException;
    method public abstract int readAt(long, byte[], int, int) throws java.io.IOException;
  }

  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 setOnKeyStatusChangeListener(android.media.MediaDrm.OnKeyStatusChangeListener, 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_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";
  }

  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();
    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 static final class MediaDrm.KeyStatus {
    method public byte[] getKeyId();
    method public int getStatusCode();
    field public static final int STATUS_EXPIRED = 1; // 0x1
    field public static final int STATUS_INTERNAL_ERROR = 4; // 0x4
    field public static final int STATUS_OUTPUT_NOT_ALLOWED = 2; // 0x2
    field public static final int STATUS_PENDING = 3; // 0x3
    field public static final int STATUS_USABLE = 0; // 0x0
  }

  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.OnKeyStatusChangeListener {
    method public abstract void onKeyStatusChange(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 class MediaDrmResetException extends java.lang.IllegalStateException {
    ctor public MediaDrmResetException(java.lang.String);
  }

  public final class MediaExtractor {
    ctor public MediaExtractor();
    method public boolean advance();
    method public long getCachedDuration();
    method public android.media.DrmInitData getDrmInitData();
    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.media.MediaDataSource) throws java.io.IOException;
    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(android.content.res.AssetFileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    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 int COLOR_RANGE_FULL = 1; // 0x1
    field public static final int COLOR_RANGE_LIMITED = 2; // 0x2
    field public static final int COLOR_STANDARD_BT2020 = 6; // 0x6
    field public static final int COLOR_STANDARD_BT601_NTSC = 4; // 0x4
    field public static final int COLOR_STANDARD_BT601_PAL = 2; // 0x2
    field public static final int COLOR_STANDARD_BT709 = 1; // 0x1
    field public static final int COLOR_TRANSFER_HLG = 7; // 0x7
    field public static final int COLOR_TRANSFER_LINEAR = 1; // 0x1
    field public static final int COLOR_TRANSFER_SDR_VIDEO = 3; // 0x3
    field public static final int COLOR_TRANSFER_ST2084 = 6; // 0x6
    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_COLOR_RANGE = "color-range";
    field public static final java.lang.String KEY_COLOR_STANDARD = "color-standard";
    field public static final java.lang.String KEY_COLOR_TRANSFER = "color-transfer";
    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_HDR_STATIC_INFO = "hdr-static-info";
    field public static final java.lang.String KEY_HEIGHT = "height";
    field public static final java.lang.String KEY_INTRA_REFRESH_PERIOD = "intra-refresh-period";
    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_LEVEL = "level";
    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_PCM_ENCODING = "pcm-encoding";
    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_ROTATION = "rotation-degrees";
    field public static final java.lang.String KEY_SAMPLE_RATE = "sample-rate";
    field public static final java.lang.String KEY_SLICE_HEIGHT = "slice-height";
    field public static final java.lang.String KEY_STRIDE = "stride";
    field public static final java.lang.String KEY_TEMPORAL_LAYERING = "ts-schema";
    field public static final java.lang.String KEY_TRACK_ID = "track-id";
    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_EAC3 = "audio/eac3";
    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_DOLBY_VISION = "video/dolby-vision";
    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;
    method public void setDataSource(android.media.MediaDataSource) throws java.lang.IllegalArgumentException;
    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 android.media.PlaybackParams getPlaybackParams();
    method public int getSelectedTrack(int) throws java.lang.IllegalStateException;
    method public android.media.SyncParams getSyncParams();
    method public android.media.MediaTimestamp getTimestamp();
    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(android.content.res.AssetFileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
    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 setDataSource(android.media.MediaDataSource) throws 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 setOnTimedMetaDataAvailableListener(android.media.MediaPlayer.OnTimedMetaDataAvailableListener);
    method public void setOnTimedTextListener(android.media.MediaPlayer.OnTimedTextListener);
    method public void setOnVideoSizeChangedListener(android.media.MediaPlayer.OnVideoSizeChangedListener);
    method public void setPlaybackParams(android.media.PlaybackParams);
    method public void setScreenOnWhilePlaying(boolean);
    method public void setSurface(android.view.Surface);
    method public void setSyncParams(android.media.SyncParams);
    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 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.OnTimedMetaDataAvailableListener {
    method public abstract void onTimedMetaDataAvailable(android.media.MediaPlayer, android.media.TimedMetaData);
  }

  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_METADATA = 5; // 0x5
    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 pause() throws java.lang.IllegalStateException;
    method public void prepare() throws java.io.IOException, java.lang.IllegalStateException;
    method public void release();
    method public void reset();
    method public void resume() throws java.lang.IllegalStateException;
    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 setInputSurface(android.view.Surface);
    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 UNPROCESSED = 9; // 0x9
    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 HEVC = 5; // 0x5
    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 int getDeviceType();
    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 DEVICE_TYPE_BLUETOOTH = 3; // 0x3
    field public static final int DEVICE_TYPE_SPEAKER = 2; // 0x2
    field public static final int DEVICE_TYPE_TV = 1; // 0x1
    field public static final int DEVICE_TYPE_UNKNOWN = 0; // 0x0
    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 final android.view.Surface createInputSurface();
    method public void flush();
    method public android.media.PlaybackParams getPlaybackParams();
    method public android.media.SyncParams getSyncParams();
    method public android.media.MediaTimestamp getTimestamp();
    method public void queueAudio(java.nio.ByteBuffer, int, long);
    method public final void release();
    method public void setAudioTrack(android.media.AudioTrack);
    method public void setCallback(android.media.MediaSync.Callback, android.os.Handler);
    method public void setOnErrorListener(android.media.MediaSync.OnErrorListener, android.os.Handler);
    method public void setPlaybackParams(android.media.PlaybackParams);
    method public void setSurface(android.view.Surface);
    method public void setSyncParams(android.media.SyncParams);
    field public static final int MEDIASYNC_ERROR_AUDIOTRACK_FAIL = 1; // 0x1
    field public static final int MEDIASYNC_ERROR_SURFACE_FAIL = 2; // 0x2
  }

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

  public static abstract interface MediaSync.OnErrorListener {
    method public abstract void onError(android.media.MediaSync, int, 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 {
    method public long getAnchorMediaTimeUs();
    method public long getAnchorSytemNanoTime();
    method public float getMediaClockRate();
  }

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

  public final class PlaybackParams implements android.os.Parcelable {
    ctor public PlaybackParams();
    method public android.media.PlaybackParams allowDefaults();
    method public int describeContents();
    method public int getAudioFallbackMode();
    method public float getPitch();
    method public float getSpeed();
    method public android.media.PlaybackParams setAudioFallbackMode(int);
    method public android.media.PlaybackParams setPitch(float);
    method public android.media.PlaybackParams setSpeed(float);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int AUDIO_FALLBACK_MODE_DEFAULT = 0; // 0x0
    field public static final int AUDIO_FALLBACK_MODE_FAIL = 2; // 0x2
    field public static final int AUDIO_FALLBACK_MODE_MUTE = 1; // 0x1
    field public static final android.os.Parcelable.Creator<android.media.PlaybackParams> CREATOR;
  }

  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 final class SyncParams {
    ctor public SyncParams();
    method public android.media.SyncParams allowDefaults();
    method public int getAudioAdjustMode();
    method public float getFrameRate();
    method public int getSyncSource();
    method public float getTolerance();
    method public android.media.SyncParams setAudioAdjustMode(int);
    method public android.media.SyncParams setFrameRate(float);
    method public android.media.SyncParams setSyncSource(int);
    method public android.media.SyncParams setTolerance(float);
    field public static final int AUDIO_ADJUST_MODE_DEFAULT = 0; // 0x0
    field public static final int AUDIO_ADJUST_MODE_RESAMPLE = 2; // 0x2
    field public static final int AUDIO_ADJUST_MODE_STRETCH = 1; // 0x1
    field public static final int SYNC_SOURCE_AUDIO = 2; // 0x2
    field public static final int SYNC_SOURCE_DEFAULT = 0; // 0x0
    field public static final int SYNC_SOURCE_SYSTEM_CLOCK = 1; // 0x1
    field public static final int SYNC_SOURCE_VSYNC = 3; // 0x3
  }

  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 TimedMetaData {
    method public byte[] getMetaData();
    method public long getTimestamp();
  }

  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 getItem(java.lang.String, android.media.browse.MediaBrowser.ItemCallback);
    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 subscribe(java.lang.String, android.os.Bundle, android.media.browse.MediaBrowser.SubscriptionCallback);
    method public void unsubscribe(java.lang.String);
    method public void unsubscribe(java.lang.String, android.os.Bundle);
    field public static final java.lang.String EXTRA_PAGE = "android.media.browse.extra.PAGE";
    field public static final java.lang.String EXTRA_PAGE_SIZE = "android.media.browse.extra.PAGE_SIZE";
  }

  public static class MediaBrowser.ConnectionCallback {
    ctor public MediaBrowser.ConnectionCallback();
    method public void onConnected();
    method public void onConnectionFailed();
    method public void onConnectionSuspended();
  }

  public static abstract class MediaBrowser.ItemCallback {
    ctor public MediaBrowser.ItemCallback();
    method public void onError(java.lang.String);
    method public void onItemLoaded(android.media.browse.MediaBrowser.MediaItem);
  }

  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.SubscriptionCallback {
    ctor public MediaBrowser.SubscriptionCallback();
    method public void onChildrenLoaded(java.lang.String, java.util.List<android.media.browse.MediaBrowser.MediaItem>);
    method public void onChildrenLoaded(java.lang.String, java.util.List<android.media.browse.MediaBrowser.MediaItem>, android.os.Bundle);
    method public void onError(java.lang.String);
    method public void onError(java.lang.String, android.os.Bundle);
  }

}

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[] getPorts();
    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 java.lang.String PROPERTY_VERSION = "version";
    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 onClose();
    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 onSend(byte[], int, int, long) throws java.io.IOException;
  }

  public final class MidiManager {
    method public android.media.midi.MidiDeviceInfo[] getDevices();
    method public void openBluetoothDevice(android.bluetooth.BluetoothDevice, android.media.midi.MidiManager.OnDeviceOpenedListener, android.os.Handler);
    method public void openDevice(android.media.midi.MidiDeviceInfo, android.media.midi.MidiManager.OnDeviceOpenedListener, 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 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 interface MidiManager.OnDeviceOpenedListener {
    method public abstract void onDeviceOpened(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 final int getPortNumber();
    method public void onConnect(android.media.midi.MidiReceiver);
    method public void onDisconnect(android.media.midi.MidiReceiver);
  }

  public abstract class MidiReceiver {
    ctor public MidiReceiver();
    ctor public MidiReceiver(int);
    method public void flush() throws java.io.IOException;
    method public final int getMaxMessageSize();
    method public void onFlush() throws java.io.IOException;
    method public abstract void onSend(byte[], int, int, long) throws java.io.IOException;
    method public void send(byte[], int, int) throws java.io.IOException;
    method public void send(byte[], int, int, long) throws java.io.IOException;
  }

  public abstract class MidiSender {
    ctor public MidiSender();
    method public void connect(android.media.midi.MidiReceiver);
    method public void disconnect(android.media.midi.MidiReceiver);
    method public abstract void onConnect(android.media.midi.MidiReceiver);
    method public abstract void onDisconnect(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.session {

  public final class MediaController {
    ctor public MediaController(android.content.Context, android.media.session.MediaSession.Token);
    method public void adjustVolume(int, int);
    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 prepare();
    method public void prepareFromMediaId(java.lang.String, android.os.Bundle);
    method public void prepareFromSearch(java.lang.String, android.os.Bundle);
    method public void prepareFromUri(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 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 onPrepare();
    method public void onPrepareFromMediaId(java.lang.String, android.os.Bundle);
    method public void onPrepareFromSearch(java.lang.String, android.os.Bundle);
    method public void onPrepareFromUri(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_PREPARE = 16384L; // 0x4000L
    field public static final long ACTION_PREPARE_FROM_MEDIA_ID = 32768L; // 0x8000L
    field public static final long ACTION_PREPARE_FROM_SEARCH = 65536L; // 0x10000L
    field public static final long ACTION_PREPARE_FROM_URI = 131072L; // 0x20000L
    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 final boolean contains(android.media.tv.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);
    field public static final android.media.tv.TvContentRating UNRATED;
  }

  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);
    method public static final android.net.Uri buildRecordedProgramUri(long);
    method public static final boolean isChannelUri(android.net.Uri);
    method public static final boolean isChannelUriForPassthroughInput(android.net.Uri);
    method public static final boolean isChannelUriForTunerInput(android.net.Uri);
    method public static final boolean isProgramUri(android.net.Uri);
    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_APP_LINK_COLOR = "app_link_color";
    field public static final java.lang.String COLUMN_APP_LINK_ICON_URI = "app_link_icon_uri";
    field public static final java.lang.String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri";
    field public static final java.lang.String COLUMN_APP_LINK_POSTER_ART_URI = "app_link_poster_art_uri";
    field public static final java.lang.String COLUMN_APP_LINK_TEXT = "app_link_text";
    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_DISPLAY_NUMBER = "episode_display_number";
    field public static final deprecated 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_SEARCHABLE = "searchable";
    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
    field public static final deprecated java.lang.String COLUMN_SEASON_NUMBER = "season_number";
    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
    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...);
    method public static boolean isCanonical(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 static final class TvContract.RecordedPrograms 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_DISPLAY_NUMBER = "episode_display_number";
    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
    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_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_RECORDING_DATA_BYTES = "recording_data_bytes";
    field public static final java.lang.String COLUMN_RECORDING_DATA_URI = "recording_data_uri";
    field public static final java.lang.String COLUMN_RECORDING_DURATION_MILLIS = "recording_duration_millis";
    field public static final java.lang.String COLUMN_RECORDING_EXPIRE_TIME_UTC_MILLIS = "recording_expire_time_utc_millis";
    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
    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/recorded_program";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/recorded_program";
    field public static final android.net.Uri CONTENT_URI;
  }

  public final class TvInputInfo implements android.os.Parcelable {
    method public boolean canRecord();
    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 getTunerCount();
    method public int getType();
    method public boolean isHidden(android.content.Context);
    method public boolean isPassthroughInput();
    method public java.lang.CharSequence loadCustomLabel(android.content.Context);
    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 static final class TvInputInfo.Builder {
    ctor public TvInputInfo.Builder(android.content.Context, android.content.ComponentName);
    method public android.media.tv.TvInputInfo build() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method public android.media.tv.TvInputInfo.Builder setCanRecord(boolean);
    method public android.media.tv.TvInputInfo.Builder setTunerCount(int);
  }

  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 java.lang.String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
    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 int RECORDING_ERROR_INSUFFICIENT_SPACE = 1; // 0x1
    field public static final int RECORDING_ERROR_RESOURCE_BUSY = 2; // 0x2
    field public static final int RECORDING_ERROR_UNKNOWN = 0; // 0x0
    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);
    method public void onInputUpdated(java.lang.String);
    method public void onTvInputInfoUpdated(android.media.tv.TvInputInfo);
  }

  public abstract class TvInputService extends android.app.Service {
    ctor public TvInputService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public android.media.tv.TvInputService.RecordingSession onCreateRecordingSession(java.lang.String);
    method public abstract android.media.tv.TvInputService.Session onCreateSession(java.lang.String);
    method public static final void updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo);
    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.RecordingSession {
    ctor public TvInputService.RecordingSession(android.content.Context);
    method public void notifyError(int);
    method public void notifyRecordingStopped(android.net.Uri);
    method public void notifyTuned(android.net.Uri);
    method public abstract void onRelease();
    method public abstract void onStartRecording(android.net.Uri);
    method public abstract void onStopRecording();
    method public abstract void onTune(android.net.Uri);
  }

  public static abstract class TvInputService.Session implements android.view.KeyEvent.Callback {
    ctor public TvInputService.Session(android.content.Context);
    method public void layoutSurface(int, int, int, int);
    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 void onOverlayViewSizeChanged(int, int);
    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 onTimeShiftPlay(android.net.Uri);
    method public void onTimeShiftResume();
    method public void onTimeShiftSeekTo(long);
    method public void onTimeShiftSetPlaybackParams(android.media.PlaybackParams);
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public boolean onTrackballEvent(android.view.MotionEvent);
    method public abstract boolean onTune(android.net.Uri);
    method public boolean onTune(android.net.Uri, android.os.Bundle);
    method public void onUnblockContent(android.media.tv.TvContentRating);
    method public void setOverlayViewEnabled(boolean);
  }

  public class TvRecordingClient {
    ctor public TvRecordingClient(android.content.Context, java.lang.String, android.media.tv.TvRecordingClient.RecordingCallback, android.os.Handler);
    method public void release();
    method public void startRecording(android.net.Uri);
    method public void stopRecording();
    method public void tune(java.lang.String, android.net.Uri);
  }

  public static abstract class TvRecordingClient.RecordingCallback {
    ctor public TvRecordingClient.RecordingCallback();
    method public void onConnectionFailed(java.lang.String);
    method public void onDisconnected(java.lang.String);
    method public void onError(int);
    method public void onRecordingStopped(android.net.Uri);
    method public void onTuned(android.net.Uri);
  }

  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.CharSequence 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 byte getVideoActiveFormatDescription();
    method public final float getVideoFrameRate();
    method public final int getVideoHeight();
    method public final float getVideoPixelAspectRatio();
    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.CharSequence);
    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 setVideoActiveFormatDescription(byte);
    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 setVideoPixelAspectRatio(float);
    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 setZOrderMediaOverlay(boolean);
    method public void setZOrderOnTop(boolean);
    method public void timeShiftPause();
    method public void timeShiftPlay(java.lang.String, android.net.Uri);
    method public void timeShiftResume();
    method public void timeShiftSeekTo(long);
    method public void timeShiftSetPlaybackParams(android.media.PlaybackParams);
    method public void tune(java.lang.String, android.net.Uri);
    method public void tune(java.lang.String, android.net.Uri, android.os.Bundle);
  }

  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 EVENT_CANCEL_TRANSACTION = 16385; // 0x4001
    field public static final int EVENT_CAPTURE_COMPLETE = 16397; // 0x400d
    field public static final int EVENT_DEVICE_INFO_CHANGED = 16392; // 0x4008
    field public static final int EVENT_DEVICE_PROP_CHANGED = 16390; // 0x4006
    field public static final int EVENT_DEVICE_RESET = 16395; // 0x400b
    field public static final int EVENT_OBJECT_ADDED = 16386; // 0x4002
    field public static final int EVENT_OBJECT_INFO_CHANGED = 16391; // 0x4007
    field public static final int EVENT_OBJECT_PROP_CHANGED = 51201; // 0xc801
    field public static final int EVENT_OBJECT_PROP_DESC_CHANGED = 51202; // 0xc802
    field public static final int EVENT_OBJECT_REFERENCES_CHANGED = 51203; // 0xc803
    field public static final int EVENT_OBJECT_REMOVED = 16387; // 0x4003
    field public static final int EVENT_REQUEST_OBJECT_TRANSFER = 16393; // 0x4009
    field public static final int EVENT_STORAGE_INFO_CHANGED = 16396; // 0x400c
    field public static final int EVENT_STORE_ADDED = 16388; // 0x4004
    field public static final int EVENT_STORE_FULL = 16394; // 0x400a
    field public static final int EVENT_STORE_REMOVED = 16389; // 0x4005
    field public static final int EVENT_UNDEFINED = 16384; // 0x4000
    field public static final int EVENT_UNREPORTED_STATUS = 16398; // 0x400e
    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_DEFINED = 14336; // 0x3800
    field public static final int FORMAT_DNG = 14353; // 0x3811
    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 OPERATION_CLOSE_SESSION = 4099; // 0x1003
    field public static final int OPERATION_COPY_OBJECT = 4122; // 0x101a
    field public static final int OPERATION_DELETE_OBJECT = 4107; // 0x100b
    field public static final int OPERATION_FORMAT_STORE = 4111; // 0x100f
    field public static final int OPERATION_GET_DEVICE_INFO = 4097; // 0x1001
    field public static final int OPERATION_GET_DEVICE_PROP_DESC = 4116; // 0x1014
    field public static final int OPERATION_GET_DEVICE_PROP_VALUE = 4117; // 0x1015
    field public static final int OPERATION_GET_NUM_OBJECTS = 4102; // 0x1006
    field public static final int OPERATION_GET_OBJECT = 4105; // 0x1009
    field public static final int OPERATION_GET_OBJECT_HANDLES = 4103; // 0x1007
    field public static final int OPERATION_GET_OBJECT_INFO = 4104; // 0x1008
    field public static final int OPERATION_GET_OBJECT_PROPS_SUPPORTED = 38913; // 0x9801
    field public static final int OPERATION_GET_OBJECT_PROP_DESC = 38914; // 0x9802
    field public static final int OPERATION_GET_OBJECT_PROP_VALUE = 38915; // 0x9803
    field public static final int OPERATION_GET_OBJECT_REFERENCES = 38928; // 0x9810
    field public static final int OPERATION_GET_PARTIAL_OBJECT = 4123; // 0x101b
    field public static final int OPERATION_GET_PARTIAL_OBJECT_64 = 38337; // 0x95c1
    field public static final int OPERATION_GET_STORAGE_INFO = 4101; // 0x1005
    field public static final int OPERATION_GET_STORAGE_I_DS = 4100; // 0x1004
    field public static final int OPERATION_GET_THUMB = 4106; // 0x100a
    field public static final int OPERATION_INITIATE_CAPTURE = 4110; // 0x100e
    field public static final int OPERATION_INITIATE_OPEN_CAPTURE = 4124; // 0x101c
    field public static final int OPERATION_MOVE_OBJECT = 4121; // 0x1019
    field public static final int OPERATION_OPEN_SESSION = 4098; // 0x1002
    field public static final int OPERATION_POWER_DOWN = 4115; // 0x1013
    field public static final int OPERATION_RESET_DEVICE = 4112; // 0x1010
    field public static final int OPERATION_RESET_DEVICE_PROP_VALUE = 4119; // 0x1017
    field public static final int OPERATION_SELF_TEST = 4113; // 0x1011
    field public static final int OPERATION_SEND_OBJECT = 4109; // 0x100d
    field public static final int OPERATION_SEND_OBJECT_INFO = 4108; // 0x100c
    field public static final int OPERATION_SET_DEVICE_PROP_VALUE = 4118; // 0x1016
    field public static final int OPERATION_SET_OBJECT_PROP_VALUE = 38916; // 0x9804
    field public static final int OPERATION_SET_OBJECT_PROTECTION = 4114; // 0x1012
    field public static final int OPERATION_SET_OBJECT_REFERENCES = 38929; // 0x9811
    field public static final int OPERATION_SKIP = 38944; // 0x9820
    field public static final int OPERATION_TERMINATE_OPEN_CAPTURE = 4120; // 0x1018
    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 getPartialObject(int, long, long, byte[]) throws java.io.IOException;
    method public long getPartialObject64(int, long, long, byte[]) throws java.io.IOException;
    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 importFile(int, android.os.ParcelFileDescriptor);
    method public boolean open(android.hardware.usb.UsbDeviceConnection);
    method public android.mtp.MtpEvent readEvent(android.os.CancellationSignal);
    method public boolean sendObject(int, long, android.os.ParcelFileDescriptor);
    method public android.mtp.MtpObjectInfo sendObjectInfo(android.mtp.MtpObjectInfo);
  }

  public class MtpDeviceInfo {
    method public final int[] getEventsSupported();
    method public final java.lang.String getManufacturer();
    method public final java.lang.String getModel();
    method public final int[] getOperationsSupported();
    method public final java.lang.String getSerialNumber();
    method public final java.lang.String getVersion();
  }

  public class MtpEvent {
    ctor public MtpEvent();
    method public int getDevicePropCode();
    method public int getEventCode();
    method public int getObjectFormatCode();
    method public int getObjectHandle();
    method public int getObjectPropCode();
    method public int getParameter1();
    method public int getParameter2();
    method public int getParameter3();
    method public int getStorageId();
    method public int getTransactionId();
  }

  public final class MtpObjectInfo {
    method public final int getAssociationDesc();
    method public final int getAssociationType();
    method public final int getCompressedSize();
    method public final long getCompressedSizeLong();
    method public final long getDateCreated();
    method public final long getDateModified();
    method public final int getFormat();
    method public final int getImagePixDepth();
    method public final long getImagePixDepthLong();
    method public final int getImagePixHeight();
    method public final long getImagePixHeightLong();
    method public final int getImagePixWidth();
    method public final long getImagePixWidthLong();
    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 long getSequenceNumberLong();
    method public final int getStorageId();
    method public final int getThumbCompressedSize();
    method public final long getThumbCompressedSizeLong();
    method public final int getThumbFormat();
    method public final int getThumbPixHeight();
    method public final long getThumbPixHeightLong();
    method public final int getThumbPixWidth();
    method public final long getThumbPixWidthLong();
  }

  public static class MtpObjectInfo.Builder {
    ctor public MtpObjectInfo.Builder();
    ctor public MtpObjectInfo.Builder(android.mtp.MtpObjectInfo);
    method public android.mtp.MtpObjectInfo build();
    method public android.mtp.MtpObjectInfo.Builder setAssociationDesc(int);
    method public android.mtp.MtpObjectInfo.Builder setAssociationType(int);
    method public android.mtp.MtpObjectInfo.Builder setCompressedSize(long);
    method public android.mtp.MtpObjectInfo.Builder setDateCreated(long);
    method public android.mtp.MtpObjectInfo.Builder setDateModified(long);
    method public android.mtp.MtpObjectInfo.Builder setFormat(int);
    method public android.mtp.MtpObjectInfo.Builder setImagePixDepth(long);
    method public android.mtp.MtpObjectInfo.Builder setImagePixHeight(long);
    method public android.mtp.MtpObjectInfo.Builder setImagePixWidth(long);
    method public android.mtp.MtpObjectInfo.Builder setKeywords(java.lang.String);
    method public android.mtp.MtpObjectInfo.Builder setName(java.lang.String);
    method public android.mtp.MtpObjectInfo.Builder setObjectHandle(int);
    method public android.mtp.MtpObjectInfo.Builder setParent(int);
    method public android.mtp.MtpObjectInfo.Builder setProtectionStatus(int);
    method public android.mtp.MtpObjectInfo.Builder setSequenceNumber(long);
    method public android.mtp.MtpObjectInfo.Builder setStorageId(int);
    method public android.mtp.MtpObjectInfo.Builder setThumbCompressedSize(long);
    method public android.mtp.MtpObjectInfo.Builder setThumbFormat(int);
    method public android.mtp.MtpObjectInfo.Builder setThumbPixHeight(long);
    method public android.mtp.MtpObjectInfo.Builder setThumbPixWidth(long);
  }

  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 CaptivePortal implements android.os.Parcelable {
    method public int describeContents();
    method public void ignoreNetwork();
    method public void reportCaptivePortalDismissed();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.CaptivePortal> CREATOR;
  }

  public class ConnectivityManager {
    method public void addDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
    method public boolean bindProcessToNetwork(android.net.Network);
    method public android.net.Network getActiveNetwork();
    method public android.net.NetworkInfo getActiveNetworkInfo();
    method public deprecated 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 deprecated 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 int getRestrictBackgroundStatus();
    method public boolean isActiveNetworkMetered();
    method public boolean isDefaultNetworkActive();
    method public static deprecated boolean isNetworkTypeValid(int);
    method public void registerNetworkCallback(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
    method public void registerNetworkCallback(android.net.NetworkRequest, android.app.PendingIntent);
    method public void releaseNetworkRequest(android.app.PendingIntent);
    method public void removeDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
    method public deprecated void reportBadNetwork(android.net.Network);
    method public void reportNetworkConnectivity(android.net.Network, boolean);
    method public boolean requestBandwidthUpdate(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);
    method public void unregisterNetworkCallback(android.app.PendingIntent);
    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 ACTION_CAPTIVE_PORTAL_SIGN_IN = "android.net.conn.CAPTIVE_PORTAL";
    field public static final java.lang.String ACTION_RESTRICT_BACKGROUND_CHANGED = "android.net.conn.RESTRICT_BACKGROUND_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_CAPTIVE_PORTAL = "android.net.extra.CAPTIVE_PORTAL";
    field public static final java.lang.String EXTRA_CAPTIVE_PORTAL_URL = "android.net.extra.CAPTIVE_PORTAL_URL";
    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 RESTRICT_BACKGROUND_STATUS_DISABLED = 1; // 0x1
    field public static final int RESTRICT_BACKGROUND_STATUS_ENABLED = 3; // 0x3
    field public static final int RESTRICT_BACKGROUND_STATUS_WHITELISTED = 2; // 0x2
    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 deprecated int TYPE_MOBILE_HIPRI = 5; // 0x5
    field public static final deprecated int TYPE_MOBILE_MMS = 2; // 0x2
    field public static final deprecated 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 final class DataUsageRequest 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.DataUsageRequest> CREATOR;
  }

  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 boolean contains(java.net.InetAddress);
    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 void bindSocket(java.io.FileDescriptor) 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 long getNetworkHandle();
    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_CAPTIVE_PORTAL = 17; // 0x11
    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_VALIDATED = 16; // 0x10
    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 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 tagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException;
    method public static void tagSocket(java.net.Socket) throws java.net.SocketException;
    method public static void untagDatagramSocket(java.net.DatagramSocket) 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 boolean is80211mcResponder();
    method public boolean isPasspointNetwork();
    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 int level;
    field public java.lang.CharSequence operatorFriendlyName;
    field public long timestamp;
    field public java.lang.CharSequence 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 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 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[] getCaCertificates();
    method public java.security.cert.X509Certificate getClientCertificate();
    method public java.lang.String getDomainSuffixMatch();
    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 setCaCertificates(java.security.cert.X509Certificate[]);
    method public void setClientKeyEntry(java.security.PrivateKey, java.security.cert.X509Certificate);
    method public void setDomainSuffixMatch(java.lang.String);
    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
    field public static final int UNAUTH_TLS = 7; // 0x7
  }

  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_RESULTS_UPDATED = "resultsUpdated";
    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;
    field public final int peerLlcpMajorVersion;
    field public final int peerLlcpMinorVersion;
  }

  public final class NfcManager {
    method public android.nfc.NfcAdapter getDefaultAdapter();
  }

  public final class Tag implements android.os.Parcelable {
    method public int describeContents();
    method public boolean done(int);
    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 HostNfcFService extends android.app.Service {
    ctor public HostNfcFService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract void onDeactivated(int);
    method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle);
    method public final void sendResponsePacket(byte[]);
    field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0
    field public static final java.lang.String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE";
    field public static final java.lang.String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service";
  }

  public final class NfcFCardEmulation {
    method public boolean disableNfcFForegroundService(android.app.Activity);
    method public boolean enableNfcFForegroundService(android.app.Activity, android.content.ComponentName);
    method public static synchronized android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter);
    method public java.lang.String getNfcid2ForService(android.content.ComponentName);
    method public java.lang.String getSystemCodeForService(android.content.ComponentName);
    method public boolean registerSystemCodeForService(android.content.ComponentName, java.lang.String);
    method public boolean removeSystemCodeForService(android.content.ComponentName);
    method public boolean setNfcid2ForService(android.content.ComponentName, java.lang.String);
  }

  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 deprecated void glGetTransformFeedbackVarying(int, int, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, byte);
    method public static void glGetTransformFeedbackVarying(int, int, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.ByteBuffer);
    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 glReadPixels(int, int, int, int, int, int, 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_BARRIER_BITS = -1; // 0xffffffff
    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_ELEMENT_ARRAY_BARRIER_BIT = 2; // 0x2
    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_IMAGE_ACCESS_BARRIER_BIT = 32; // 0x20
    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_ARRAY_BARRIER_BIT = 1; // 0x1
    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 GLES32 extends android.opengl.GLES31 {
    method public static void glBlendBarrier();
    method public static void glBlendEquationSeparatei(int, int, int);
    method public static void glBlendEquationi(int, int);
    method public static void glBlendFuncSeparatei(int, int, int, int, int);
    method public static void glBlendFunci(int, int, int);
    method public static void glColorMaski(int, boolean, boolean, boolean, boolean);
    method public static void glCopyImageSubData(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
    method public static void glDebugMessageCallback(android.opengl.GLES32.DebugProc);
    method public static void glDebugMessageControl(int, int, int, int, int[], int, boolean);
    method public static void glDebugMessageControl(int, int, int, int, java.nio.IntBuffer, boolean);
    method public static void glDebugMessageInsert(int, int, int, int, int, java.lang.String);
    method public static void glDisablei(int, int);
    method public static void glDrawElementsBaseVertex(int, int, int, java.nio.Buffer, int);
    method public static void glDrawElementsInstancedBaseVertex(int, int, int, java.nio.Buffer, int, int);
    method public static void glDrawElementsInstancedBaseVertex(int, int, int, int, int, int);
    method public static void glDrawRangeElementsBaseVertex(int, int, int, int, int, java.nio.Buffer, int);
    method public static void glEnablei(int, int);
    method public static void glFramebufferTexture(int, int, int, int);
    method public static int glGetDebugMessageLog(int, int, int[], int, int[], int, int[], int, int[], int, int[], int, byte[], int);
    method public static int glGetDebugMessageLog(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[] glGetDebugMessageLog(int, int[], int, int[], int, int[], int, int[], int);
    method public static java.lang.String[] glGetDebugMessageLog(int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer);
    method public static int glGetGraphicsResetStatus();
    method public static java.lang.String glGetObjectLabel(int, int);
    method public static java.lang.String glGetObjectPtrLabel(long);
    method public static long glGetPointerv(int);
    method public static void glGetSamplerParameterIiv(int, int, int[], int);
    method public static void glGetSamplerParameterIiv(int, int, java.nio.IntBuffer);
    method public static void glGetSamplerParameterIuiv(int, int, int[], int);
    method public static void glGetSamplerParameterIuiv(int, int, java.nio.IntBuffer);
    method public static void glGetTexParameterIiv(int, int, int[], int);
    method public static void glGetTexParameterIiv(int, int, java.nio.IntBuffer);
    method public static void glGetTexParameterIuiv(int, int, int[], int);
    method public static void glGetTexParameterIuiv(int, int, java.nio.IntBuffer);
    method public static void glGetnUniformfv(int, int, int, float[], int);
    method public static void glGetnUniformfv(int, int, int, java.nio.FloatBuffer);
    method public static void glGetnUniformiv(int, int, int, int[], int);
    method public static void glGetnUniformiv(int, int, int, java.nio.IntBuffer);
    method public static void glGetnUniformuiv(int, int, int, int[], int);
    method public static void glGetnUniformuiv(int, int, int, java.nio.IntBuffer);
    method public static boolean glIsEnabledi(int, int);
    method public static void glMinSampleShading(float);
    method public static void glObjectLabel(int, int, int, java.lang.String);
    method public static void glObjectPtrLabel(long, java.lang.String);
    method public static void glPatchParameteri(int, int);
    method public static void glPopDebugGroup();
    method public static void glPrimitiveBoundingBox(float, float, float, float, float, float, float, float);
    method public static void glPushDebugGroup(int, int, int, java.lang.String);
    method public static void glReadnPixels(int, int, int, int, int, int, int, java.nio.Buffer);
    method public static void glSamplerParameterIiv(int, int, int[], int);
    method public static void glSamplerParameterIiv(int, int, java.nio.IntBuffer);
    method public static void glSamplerParameterIuiv(int, int, int[], int);
    method public static void glSamplerParameterIuiv(int, int, java.nio.IntBuffer);
    method public static void glTexBuffer(int, int, int);
    method public static void glTexBufferRange(int, int, int, int, int);
    method public static void glTexParameterIiv(int, int, int[], int);
    method public static void glTexParameterIiv(int, int, java.nio.IntBuffer);
    method public static void glTexParameterIuiv(int, int, int[], int);
    method public static void glTexParameterIuiv(int, int, java.nio.IntBuffer);
    method public static void glTexStorage3DMultisample(int, int, int, int, int, int, boolean);
    field public static final int GL_BUFFER = 33504; // 0x82e0
    field public static final int GL_CLAMP_TO_BORDER = 33069; // 0x812d
    field public static final int GL_COLORBURN = 37530; // 0x929a
    field public static final int GL_COLORDODGE = 37529; // 0x9299
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x10 = 37819; // 0x93bb
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x5 = 37816; // 0x93b8
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x6 = 37817; // 0x93b9
    field public static final int GL_COMPRESSED_RGBA_ASTC_10x8 = 37818; // 0x93ba
    field public static final int GL_COMPRESSED_RGBA_ASTC_12x10 = 37820; // 0x93bc
    field public static final int GL_COMPRESSED_RGBA_ASTC_12x12 = 37821; // 0x93bd
    field public static final int GL_COMPRESSED_RGBA_ASTC_4x4 = 37808; // 0x93b0
    field public static final int GL_COMPRESSED_RGBA_ASTC_5x4 = 37809; // 0x93b1
    field public static final int GL_COMPRESSED_RGBA_ASTC_5x5 = 37810; // 0x93b2
    field public static final int GL_COMPRESSED_RGBA_ASTC_6x5 = 37811; // 0x93b3
    field public static final int GL_COMPRESSED_RGBA_ASTC_6x6 = 37812; // 0x93b4
    field public static final int GL_COMPRESSED_RGBA_ASTC_8x5 = 37813; // 0x93b5
    field public static final int GL_COMPRESSED_RGBA_ASTC_8x6 = 37814; // 0x93b6
    field public static final int GL_COMPRESSED_RGBA_ASTC_8x8 = 37815; // 0x93b7
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 = 37851; // 0x93db
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 = 37848; // 0x93d8
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 = 37849; // 0x93d9
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 = 37850; // 0x93da
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 = 37852; // 0x93dc
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 = 37853; // 0x93dd
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 = 37840; // 0x93d0
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 = 37841; // 0x93d1
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 = 37842; // 0x93d2
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 = 37843; // 0x93d3
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 = 37844; // 0x93d4
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 = 37845; // 0x93d5
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 = 37846; // 0x93d6
    field public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 = 37847; // 0x93d7
    field public static final int GL_CONTEXT_FLAGS = 33310; // 0x821e
    field public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 2; // 0x2
    field public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 4; // 0x4
    field public static final int GL_CONTEXT_LOST = 1287; // 0x507
    field public static final int GL_DARKEN = 37527; // 0x9297
    field public static final int GL_DEBUG_CALLBACK_FUNCTION = 33348; // 0x8244
    field public static final int GL_DEBUG_CALLBACK_USER_PARAM = 33349; // 0x8245
    field public static final int GL_DEBUG_GROUP_STACK_DEPTH = 33389; // 0x826d
    field public static final int GL_DEBUG_LOGGED_MESSAGES = 37189; // 0x9145
    field public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 33347; // 0x8243
    field public static final int GL_DEBUG_OUTPUT = 37600; // 0x92e0
    field public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS = 33346; // 0x8242
    field public static final int GL_DEBUG_SEVERITY_HIGH = 37190; // 0x9146
    field public static final int GL_DEBUG_SEVERITY_LOW = 37192; // 0x9148
    field public static final int GL_DEBUG_SEVERITY_MEDIUM = 37191; // 0x9147
    field public static final int GL_DEBUG_SEVERITY_NOTIFICATION = 33387; // 0x826b
    field public static final int GL_DEBUG_SOURCE_API = 33350; // 0x8246
    field public static final int GL_DEBUG_SOURCE_APPLICATION = 33354; // 0x824a
    field public static final int GL_DEBUG_SOURCE_OTHER = 33355; // 0x824b
    field public static final int GL_DEBUG_SOURCE_SHADER_COMPILER = 33352; // 0x8248
    field public static final int GL_DEBUG_SOURCE_THIRD_PARTY = 33353; // 0x8249
    field public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM = 33351; // 0x8247
    field public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 33357; // 0x824d
    field public static final int GL_DEBUG_TYPE_ERROR = 33356; // 0x824c
    field public static final int GL_DEBUG_TYPE_MARKER = 33384; // 0x8268
    field public static final int GL_DEBUG_TYPE_OTHER = 33361; // 0x8251
    field public static final int GL_DEBUG_TYPE_PERFORMANCE = 33360; // 0x8250
    field public static final int GL_DEBUG_TYPE_POP_GROUP = 33386; // 0x826a
    field public static final int GL_DEBUG_TYPE_PORTABILITY = 33359; // 0x824f
    field public static final int GL_DEBUG_TYPE_PUSH_GROUP = 33385; // 0x8269
    field public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 33358; // 0x824e
    field public static final int GL_DIFFERENCE = 37534; // 0x929e
    field public static final int GL_EXCLUSION = 37536; // 0x92a0
    field public static final int GL_FIRST_VERTEX_CONVENTION = 36429; // 0x8e4d
    field public static final int GL_FRACTIONAL_EVEN = 36476; // 0x8e7c
    field public static final int GL_FRACTIONAL_ODD = 36475; // 0x8e7b
    field public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 36445; // 0x8e5d
    field public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 36263; // 0x8da7
    field public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = 37650; // 0x9312
    field public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 36264; // 0x8da8
    field public static final int GL_GEOMETRY_INPUT_TYPE = 35095; // 0x8917
    field public static final int GL_GEOMETRY_OUTPUT_TYPE = 35096; // 0x8918
    field public static final int GL_GEOMETRY_SHADER = 36313; // 0x8dd9
    field public static final int GL_GEOMETRY_SHADER_BIT = 4; // 0x4
    field public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 34943; // 0x887f
    field public static final int GL_GEOMETRY_VERTICES_OUT = 35094; // 0x8916
    field public static final int GL_GUILTY_CONTEXT_RESET = 33363; // 0x8253
    field public static final int GL_HARDLIGHT = 37531; // 0x929b
    field public static final int GL_HSL_COLOR = 37551; // 0x92af
    field public static final int GL_HSL_HUE = 37549; // 0x92ad
    field public static final int GL_HSL_LUMINOSITY = 37552; // 0x92b0
    field public static final int GL_HSL_SATURATION = 37550; // 0x92ae
    field public static final int GL_IMAGE_BUFFER = 36945; // 0x9051
    field public static final int GL_IMAGE_CUBE_MAP_ARRAY = 36948; // 0x9054
    field public static final int GL_INNOCENT_CONTEXT_RESET = 33364; // 0x8254
    field public static final int GL_INT_IMAGE_BUFFER = 36956; // 0x905c
    field public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY = 36959; // 0x905f
    field public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37132; // 0x910c
    field public static final int GL_INT_SAMPLER_BUFFER = 36304; // 0x8dd0
    field public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY = 36878; // 0x900e
    field public static final int GL_ISOLINES = 36474; // 0x8e7a
    field public static final int GL_IS_PER_PATCH = 37607; // 0x92e7
    field public static final int GL_LAST_VERTEX_CONVENTION = 36430; // 0x8e4e
    field public static final int GL_LAYER_PROVOKING_VERTEX = 33374; // 0x825e
    field public static final int GL_LIGHTEN = 37528; // 0x9298
    field public static final int GL_LINES_ADJACENCY = 10; // 0xa
    field public static final int GL_LINE_STRIP_ADJACENCY = 11; // 0xb
    field public static final int GL_LOSE_CONTEXT_ON_RESET = 33362; // 0x8252
    field public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 35378; // 0x8a32
    field public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 36382; // 0x8e1e
    field public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 36383; // 0x8e1f
    field public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH = 33388; // 0x826c
    field public static final int GL_MAX_DEBUG_LOGGED_MESSAGES = 37188; // 0x9144
    field public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 37187; // 0x9143
    field public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 36444; // 0x8e5c
    field public static final int GL_MAX_FRAMEBUFFER_LAYERS = 37655; // 0x9317
    field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 37589; // 0x92d5
    field public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 37583; // 0x92cf
    field public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 37069; // 0x90cd
    field public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 37155; // 0x9123
    field public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 37156; // 0x9124
    field public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES = 36320; // 0x8de0
    field public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 36442; // 0x8e5a
    field public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 37079; // 0x90d7
    field public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 35881; // 0x8c29
    field public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 36321; // 0x8de1
    field public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 35372; // 0x8a2c
    field public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 36319; // 0x8ddf
    field public static final int GL_MAX_LABEL_LENGTH = 33512; // 0x82e8
    field public static final int GL_MAX_PATCH_VERTICES = 36477; // 0x8e7d
    field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 37587; // 0x92d3
    field public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 37581; // 0x92cd
    field public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 37067; // 0x90cb
    field public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 34924; // 0x886c
    field public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 36483; // 0x8e83
    field public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 37080; // 0x90d8
    field public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 36481; // 0x8e81
    field public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 36485; // 0x8e85
    field public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 36489; // 0x8e89
    field public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 36479; // 0x8e7f
    field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 37588; // 0x92d4
    field public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 37582; // 0x92ce
    field public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 37068; // 0x90cc
    field public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 34925; // 0x886d
    field public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 36486; // 0x8e86
    field public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 37081; // 0x90d9
    field public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 36482; // 0x8e82
    field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 36490; // 0x8e8a
    field public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 36480; // 0x8e80
    field public static final int GL_MAX_TESS_GEN_LEVEL = 36478; // 0x8e7e
    field public static final int GL_MAX_TESS_PATCH_COMPONENTS = 36484; // 0x8e84
    field public static final int GL_MAX_TEXTURE_BUFFER_SIZE = 35883; // 0x8c2b
    field public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 36443; // 0x8e5b
    field public static final int GL_MIN_SAMPLE_SHADING_VALUE = 35895; // 0x8c37
    field public static final int GL_MULTIPLY = 37524; // 0x9294
    field public static final int GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY = 37762; // 0x9382
    field public static final int GL_MULTISAMPLE_LINE_WIDTH_RANGE = 37761; // 0x9381
    field public static final int GL_NO_RESET_NOTIFICATION = 33377; // 0x8261
    field public static final int GL_OVERLAY = 37526; // 0x9296
    field public static final int GL_PATCHES = 14; // 0xe
    field public static final int GL_PATCH_VERTICES = 36466; // 0x8e72
    field public static final int GL_PRIMITIVES_GENERATED = 35975; // 0x8c87
    field public static final int GL_PRIMITIVE_BOUNDING_BOX = 37566; // 0x92be
    field public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 33313; // 0x8221
    field public static final int GL_PROGRAM = 33506; // 0x82e2
    field public static final int GL_PROGRAM_PIPELINE = 33508; // 0x82e4
    field public static final int GL_QUADS = 7; // 0x7
    field public static final int GL_QUERY = 33507; // 0x82e3
    field public static final int GL_REFERENCED_BY_GEOMETRY_SHADER = 37641; // 0x9309
    field public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER = 37639; // 0x9307
    field public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 37640; // 0x9308
    field public static final int GL_RESET_NOTIFICATION_STRATEGY = 33366; // 0x8256
    field public static final int GL_SAMPLER = 33510; // 0x82e6
    field public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 37131; // 0x910b
    field public static final int GL_SAMPLER_BUFFER = 36290; // 0x8dc2
    field public static final int GL_SAMPLER_CUBE_MAP_ARRAY = 36876; // 0x900c
    field public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 36877; // 0x900d
    field public static final int GL_SAMPLE_SHADING = 35894; // 0x8c36
    field public static final int GL_SCREEN = 37525; // 0x9295
    field public static final int GL_SHADER = 33505; // 0x82e1
    field public static final int GL_SOFTLIGHT = 37532; // 0x929c
    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_TESS_CONTROL_OUTPUT_VERTICES = 36469; // 0x8e75
    field public static final int GL_TESS_CONTROL_SHADER = 36488; // 0x8e88
    field public static final int GL_TESS_CONTROL_SHADER_BIT = 8; // 0x8
    field public static final int GL_TESS_EVALUATION_SHADER = 36487; // 0x8e87
    field public static final int GL_TESS_EVALUATION_SHADER_BIT = 16; // 0x10
    field public static final int GL_TESS_GEN_MODE = 36470; // 0x8e76
    field public static final int GL_TESS_GEN_POINT_MODE = 36473; // 0x8e79
    field public static final int GL_TESS_GEN_SPACING = 36471; // 0x8e77
    field public static final int GL_TESS_GEN_VERTEX_ORDER = 36472; // 0x8e78
    field public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 37122; // 0x9102
    field public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 37125; // 0x9105
    field public static final int GL_TEXTURE_BINDING_BUFFER = 35884; // 0x8c2c
    field public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 36874; // 0x900a
    field public static final int GL_TEXTURE_BORDER_COLOR = 4100; // 0x1004
    field public static final int GL_TEXTURE_BUFFER = 35882; // 0x8c2a
    field public static final int GL_TEXTURE_BUFFER_BINDING = 35882; // 0x8c2a
    field public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 35885; // 0x8c2d
    field public static final int GL_TEXTURE_BUFFER_OFFSET = 37277; // 0x919d
    field public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 37279; // 0x919f
    field public static final int GL_TEXTURE_BUFFER_SIZE = 37278; // 0x919e
    field public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 36873; // 0x9009
    field public static final int GL_TRIANGLES_ADJACENCY = 12; // 0xc
    field public static final int GL_TRIANGLE_STRIP_ADJACENCY = 13; // 0xd
    field public static final int GL_UNDEFINED_VERTEX = 33376; // 0x8260
    field public static final int GL_UNKNOWN_CONTEXT_RESET = 33365; // 0x8255
    field public static final int GL_UNSIGNED_INT_IMAGE_BUFFER = 36967; // 0x9067
    field public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 36970; // 0x906a
    field public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 37133; // 0x910d
    field public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER = 36312; // 0x8dd8
    field public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 36879; // 0x900f
    field public static final int GL_VERTEX_ARRAY = 32884; // 0x8074
  }

  public static abstract interface GLES32.DebugProc {
    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.Callback2 {
    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);
    method public void surfaceRedrawNeeded(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 BASE_OS;
    field public static final java.lang.String CODENAME;
    field public static final java.lang.String INCREMENTAL;
    field public static final int PREVIEW_SDK_INT;
    field public static final java.lang.String RELEASE;
    field public static final deprecated java.lang.String SDK;
    field public static final int SDK_INT;
    field public static final java.lang.String SECURITY_PATCH;
  }

  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 M = 23; // 0x17
    field public static final int N = 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 final class CpuUsageInfo implements android.os.Parcelable {
    method public int describeContents();
    method public long getActive();
    method public long getTotal();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.CpuUsageInfo> CREATOR;
  }

  public class DeadObjectException extends android.os.RemoteException {
    ctor public DeadObjectException();
    ctor public DeadObjectException(java.lang.String);
  }

  public class DeadSystemException extends android.os.DeadObjectException {
    ctor public DeadSystemException();
  }

  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 java.lang.String getRuntimeStat(java.lang.String);
    method public static java.util.Map<java.lang.String, java.lang.String> getRuntimeStats();
    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 java.lang.String getMemoryStat(java.lang.String);
    method public java.util.Map<java.lang.String, java.lang.String> getMemoryStats();
    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 FileUriExposedException extends java.lang.RuntimeException {
    ctor public FileUriExposedException(java.lang.String);
  }

  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 class HardwarePropertiesManager {
    method public android.os.CpuUsageInfo[] getCpuUsages();
    method public float[] getDeviceTemperatures(int);
    method public float[] getFanSpeeds();
    field public static final int DEVICE_TEMPERATURE_BATTERY = 2; // 0x2
    field public static final int DEVICE_TEMPERATURE_CPU = 0; // 0x0
    field public static final int DEVICE_TEMPERATURE_GPU = 1; // 0x1
  }

  public static abstract class HardwarePropertiesManager.DeviceTemperatureType implements java.lang.annotation.Annotation {
  }

  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 void addOnFileDescriptorEventListener(java.io.FileDescriptor, int, android.os.MessageQueue.OnFileDescriptorEventListener);
    method public boolean isIdle();
    method public void removeIdleHandler(android.os.MessageQueue.IdleHandler);
    method public void removeOnFileDescriptorEventListener(java.io.FileDescriptor);
  }

  public static abstract interface MessageQueue.IdleHandler {
    method public abstract boolean queueIdle();
  }

  public static abstract interface MessageQueue.OnFileDescriptorEventListener {
    method public abstract 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 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 T readTypedObject(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 writeTypedObject(T, int);
    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 isIgnoringBatteryOptimizations(java.lang.String);
    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[] getExclusiveCores();
    method public static final int getGidForName(java.lang.String);
    method public static final long getStartElapsedRealtime();
    method public static final long getStartUptimeMillis();
    method public static final int getThreadPriority(int) throws java.lang.IllegalArgumentException;
    method public static final int getUidForName(java.lang.String);
    method public static final boolean is64Bit();
    method public static boolean isApplicationUid(int);
    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 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 {
    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 penaltyDeathOnFileUriExposure();
    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();
    ctor public TransactionTooLargeException(java.lang.String);
  }

  public final class UserHandle implements android.os.Parcelable {
    ctor public UserHandle(android.os.Parcel);
    method public int describeContents();
    method public static android.os.UserHandle getUserHandleForUid(int);
    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 static android.content.Intent createUserCreationIntent(java.lang.String, java.lang.String, java.lang.String, android.os.PersistableBundle);
    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 isQuietModeEnabled(android.os.UserHandle);
    method public boolean isSystemUser();
    method public boolean isUserAGoat();
    method public boolean isUserRunning(android.os.UserHandle);
    method public deprecated boolean isUserRunningAndLocked();
    method public deprecated boolean isUserRunningAndLocked(android.os.UserHandle);
    method public deprecated boolean isUserRunningAndUnlocked();
    method public deprecated boolean isUserRunningAndUnlocked(android.os.UserHandle);
    method public boolean isUserRunningOrStopping(android.os.UserHandle);
    method public boolean isUserUnlocked();
    method public boolean isUserUnlocked(android.os.UserHandle);
    method public deprecated 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 ALLOW_PARENT_PROFILE_APP_LINKING = "allow_parent_profile_app_linking";
    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_DATA_ROAMING = "no_data_roaming";
    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_FUN = "no_fun";
    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_NETWORK_RESET = "no_network_reset";
    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_SET_USER_ICON = "no_set_user_icon";
    field public static final java.lang.String DISALLOW_SET_WALLPAPER = "no_set_wallpaper";
    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";
    field public static final int USER_CREATION_FAILED_NOT_PERMITTED = 1; // 0x1
    field public static final int USER_CREATION_FAILED_NO_MORE_USERS = 2; // 0x2
  }

  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.health {

  public class HealthStats {
    method public java.lang.String getDataType();
    method public long getMeasurement(int);
    method public int getMeasurementKeyAt(int);
    method public int getMeasurementKeyCount();
    method public java.util.Map<java.lang.String, java.lang.Long> getMeasurements(int);
    method public int getMeasurementsKeyAt(int);
    method public int getMeasurementsKeyCount();
    method public java.util.Map<java.lang.String, android.os.health.HealthStats> getStats(int);
    method public int getStatsKeyAt(int);
    method public int getStatsKeyCount();
    method public android.os.health.TimerStat getTimer(int);
    method public int getTimerCount(int);
    method public int getTimerKeyAt(int);
    method public int getTimerKeyCount();
    method public long getTimerTime(int);
    method public java.util.Map<java.lang.String, android.os.health.TimerStat> getTimers(int);
    method public int getTimersKeyAt(int);
    method public int getTimersKeyCount();
    method public boolean hasMeasurement(int);
    method public boolean hasMeasurements(int);
    method public boolean hasStats(int);
    method public boolean hasTimer(int);
    method public boolean hasTimers(int);
  }

  public final class PackageHealthStats {
    field public static final int MEASUREMENTS_WAKEUP_ALARMS_COUNT = 40002; // 0x9c42
    field public static final int STATS_SERVICES = 40001; // 0x9c41
  }

  public final class PidHealthStats {
    field public static final int MEASUREMENT_WAKE_NESTING_COUNT = 20001; // 0x4e21
    field public static final int MEASUREMENT_WAKE_START_MS = 20003; // 0x4e23
    field public static final int MEASUREMENT_WAKE_SUM_MS = 20002; // 0x4e22
  }

  public final class ProcessHealthStats {
    field public static final int MEASUREMENT_ANR_COUNT = 30005; // 0x7535
    field public static final int MEASUREMENT_CRASHES_COUNT = 30004; // 0x7534
    field public static final int MEASUREMENT_FOREGROUND_MS = 30006; // 0x7536
    field public static final int MEASUREMENT_STARTS_COUNT = 30003; // 0x7533
    field public static final int MEASUREMENT_SYSTEM_TIME_MS = 30002; // 0x7532
    field public static final int MEASUREMENT_USER_TIME_MS = 30001; // 0x7531
  }

  public final class ServiceHealthStats {
    field public static final int MEASUREMENT_LAUNCH_COUNT = 50002; // 0xc352
    field public static final int MEASUREMENT_START_SERVICE_COUNT = 50001; // 0xc351
  }

  public class SystemHealthManager {
    method public static android.os.health.SystemHealthManager from(android.content.Context);
    method public android.os.health.HealthStats takeMyUidSnapshot();
    method public android.os.health.HealthStats takeUidSnapshot(int);
    method public android.os.health.HealthStats[] takeUidSnapshots(int[]);
  }

  public class TimerStat implements android.os.Parcelable {
    ctor public TimerStat();
    ctor public TimerStat(int, long);
    ctor public TimerStat(android.os.Parcel);
    method public int describeContents();
    method public int getCount();
    method public long getTime();
    method public void setCount(int);
    method public void setTime(long);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.health.TimerStat> CREATOR;
  }

  public final class UidHealthStats {
    field public static final int MEASUREMENT_BLUETOOTH_IDLE_MS = 10020; // 0x2724
    field public static final int MEASUREMENT_BLUETOOTH_POWER_MAMS = 10023; // 0x2727
    field public static final int MEASUREMENT_BLUETOOTH_RX_BYTES = 10052; // 0x2744
    field public static final int MEASUREMENT_BLUETOOTH_RX_MS = 10021; // 0x2725
    field public static final int MEASUREMENT_BLUETOOTH_RX_PACKETS = 10058; // 0x274a
    field public static final int MEASUREMENT_BLUETOOTH_TX_BYTES = 10053; // 0x2745
    field public static final int MEASUREMENT_BLUETOOTH_TX_MS = 10022; // 0x2726
    field public static final int MEASUREMENT_BLUETOOTH_TX_PACKETS = 10059; // 0x274b
    field public static final int MEASUREMENT_BUTTON_USER_ACTIVITY_COUNT = 10046; // 0x273e
    field public static final int MEASUREMENT_CPU_POWER_MAUS = 10064; // 0x2750
    field public static final int MEASUREMENT_MOBILE_IDLE_MS = 10024; // 0x2728
    field public static final int MEASUREMENT_MOBILE_POWER_MAMS = 10027; // 0x272b
    field public static final int MEASUREMENT_MOBILE_RX_BYTES = 10048; // 0x2740
    field public static final int MEASUREMENT_MOBILE_RX_MS = 10025; // 0x2729
    field public static final int MEASUREMENT_MOBILE_RX_PACKETS = 10054; // 0x2746
    field public static final int MEASUREMENT_MOBILE_TX_BYTES = 10049; // 0x2741
    field public static final int MEASUREMENT_MOBILE_TX_MS = 10026; // 0x272a
    field public static final int MEASUREMENT_MOBILE_TX_PACKETS = 10055; // 0x2747
    field public static final int MEASUREMENT_OTHER_USER_ACTIVITY_COUNT = 10045; // 0x273d
    field public static final int MEASUREMENT_REALTIME_BATTERY_MS = 10001; // 0x2711
    field public static final int MEASUREMENT_REALTIME_SCREEN_OFF_BATTERY_MS = 10003; // 0x2713
    field public static final int MEASUREMENT_SYSTEM_CPU_TIME_US = 10063; // 0x274f
    field public static final int MEASUREMENT_TOUCH_USER_ACTIVITY_COUNT = 10047; // 0x273f
    field public static final int MEASUREMENT_UPTIME_BATTERY_MS = 10002; // 0x2712
    field public static final int MEASUREMENT_UPTIME_SCREEN_OFF_BATTERY_MS = 10004; // 0x2714
    field public static final int MEASUREMENT_USER_CPU_TIME_US = 10062; // 0x274e
    field public static final int MEASUREMENT_WIFI_FULL_LOCK_MS = 10029; // 0x272d
    field public static final int MEASUREMENT_WIFI_IDLE_MS = 10016; // 0x2720
    field public static final int MEASUREMENT_WIFI_MULTICAST_MS = 10031; // 0x272f
    field public static final int MEASUREMENT_WIFI_POWER_MAMS = 10019; // 0x2723
    field public static final int MEASUREMENT_WIFI_RUNNING_MS = 10028; // 0x272c
    field public static final int MEASUREMENT_WIFI_RX_BYTES = 10050; // 0x2742
    field public static final int MEASUREMENT_WIFI_RX_MS = 10017; // 0x2721
    field public static final int MEASUREMENT_WIFI_RX_PACKETS = 10056; // 0x2748
    field public static final int MEASUREMENT_WIFI_TX_BYTES = 10051; // 0x2743
    field public static final int MEASUREMENT_WIFI_TX_MS = 10018; // 0x2722
    field public static final int MEASUREMENT_WIFI_TX_PACKETS = 10057; // 0x2749
    field public static final int STATS_PACKAGES = 10015; // 0x271f
    field public static final int STATS_PIDS = 10013; // 0x271d
    field public static final int STATS_PROCESSES = 10014; // 0x271e
    field public static final int TIMERS_JOBS = 10010; // 0x271a
    field public static final int TIMERS_SENSORS = 10012; // 0x271c
    field public static final int TIMERS_SYNCS = 10009; // 0x2719
    field public static final int TIMERS_WAKELOCKS_DRAW = 10008; // 0x2718
    field public static final int TIMERS_WAKELOCKS_FULL = 10005; // 0x2715
    field public static final int TIMERS_WAKELOCKS_PARTIAL = 10006; // 0x2716
    field public static final int TIMERS_WAKELOCKS_WINDOW = 10007; // 0x2717
    field public static final int TIMER_AUDIO = 10032; // 0x2730
    field public static final int TIMER_BLUETOOTH_SCAN = 10037; // 0x2735
    field public static final int TIMER_CAMERA = 10035; // 0x2733
    field public static final int TIMER_FLASHLIGHT = 10034; // 0x2732
    field public static final int TIMER_FOREGROUND_ACTIVITY = 10036; // 0x2734
    field public static final int TIMER_GPS_SENSOR = 10011; // 0x271b
    field public static final int TIMER_MOBILE_RADIO_ACTIVE = 10061; // 0x274d
    field public static final int TIMER_PROCESS_STATE_BACKGROUND_MS = 10042; // 0x273a
    field public static final int TIMER_PROCESS_STATE_CACHED_MS = 10043; // 0x273b
    field public static final int TIMER_PROCESS_STATE_FOREGROUND_MS = 10041; // 0x2739
    field public static final int TIMER_PROCESS_STATE_FOREGROUND_SERVICE_MS = 10039; // 0x2737
    field public static final int TIMER_PROCESS_STATE_TOP_MS = 10038; // 0x2736
    field public static final int TIMER_PROCESS_STATE_TOP_SLEEPING_MS = 10040; // 0x2738
    field public static final int TIMER_VIBRATOR = 10044; // 0x273c
    field public static final int TIMER_VIDEO = 10033; // 0x2731
    field public static final int TIMER_WIFI_SCAN = 10030; // 0x272e
  }

}

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 android.os.storage.StorageVolume getPrimaryVolume();
    method public android.os.storage.StorageVolume[] getVolumeList();
    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);
  }

  public final class StorageVolume implements android.os.Parcelable {
    method public android.content.Intent createAccessIntent(java.lang.String);
    method public int describeContents();
    method public java.lang.String getDescription(android.content.Context);
    method public java.lang.String getState();
    method public java.lang.String getUuid();
    method public boolean isEmulated();
    method public boolean isPrimary();
    method public boolean isRemovable();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.storage.StorageVolume> CREATOR;
    field public static final java.lang.String EXTRA_STORAGE_VOLUME = "android.os.storage.extra.STORAGE_VOLUME";
  }

}

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 java.util.Set<java.lang.String> getPersistedStringSet(java.util.Set<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 void onDetachedFromActivity();
    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 boolean persistStringSet(java.util.Set<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 static java.lang.String getDefaultSharedPreferencesName(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);
    method public void setStorageDefault();
    method public void setStorageDeviceEncrypted();
    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 setHasCustomPrinterIcon();
    method public android.print.PrinterInfo.Builder setIconResourceId(int);
    method public android.print.PrinterInfo.Builder setInfoIntent(android.app.PendingIntent);
    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 class CustomPrinterIconCallback {
    method public boolean onCustomPrinterIconLoaded(android.graphics.drawable.Icon);
  }

  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 void setProgress(float);
    method public void setStatus(java.lang.CharSequence);
    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_DOCUMENT_INFO = "android.printservice.extra.PRINT_DOCUMENT_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 void onRequestCustomPrinterIcon(android.print.PrinterId, android.printservice.CustomPrinterIconCallback);
    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_DISMISS_ALARM = "android.intent.action.DISMISS_ALARM";
    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_SNOOZE_ALARM = "android.intent.action.SNOOZE_ALARM";
    field public static final java.lang.String ALARM_SEARCH_MODE_ALL = "android.all";
    field public static final java.lang.String ALARM_SEARCH_MODE_LABEL = "android.label";
    field public static final java.lang.String ALARM_SEARCH_MODE_NEXT = "android.next";
    field public static final java.lang.String ALARM_SEARCH_MODE_TIME = "android.time";
    field public static final java.lang.String EXTRA_ALARM_SEARCH_MODE = "android.intent.extra.alarm.SEARCH_MODE";
    field public static final java.lang.String EXTRA_ALARM_SNOOZE_DURATION = "android.intent.extra.alarm.SNOOZE_DURATION";
    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 BlockedNumberContract {
    method public static boolean canCurrentUserBlockNumbers(android.content.Context);
    method public static boolean isBlocked(android.content.Context, java.lang.String);
    field public static final java.lang.String AUTHORITY = "com.android.blockednumber";
    field public static final android.net.Uri AUTHORITY_URI;
  }

  public static class BlockedNumberContract.BlockedNumbers {
    field public static final java.lang.String COLUMN_E164_NUMBER = "e164_number";
    field public static final java.lang.String COLUMN_ID = "_id";
    field public static final java.lang.String COLUMN_ORIGINAL_NUMBER = "original_number";
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/blocked_number";
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/blocked_number";
    field public static final android.net.Uri CONTENT_URI;
  }

  public class Browser {
    ctor public Browser();
    method public static final void sendString(android.content.Context, java.lang.String);
    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 INITIAL_ZOOM_LEVEL = "browser.initialZoomLevel";
  }

  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 int ANSWERED_EXTERNALLY_TYPE = 7; // 0x7
    field public static final int BLOCKED_TYPE = 6; // 0x6
    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_PULLED_EXTERNALLY = 2; // 0x2
    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 LAST_MODIFIED = "last_modified";
    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 java.lang.String POST_DIAL_DIGITS = "post_dial_digits";
    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 int REJECTED_TYPE = 5; // 0x5
    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
  }

  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 android.net.Uri ENTERPRISE_CONTENT_FILTER_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_FILTER_URI;
    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 PHONETIC_NAME_STYLE = "data10";
    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 android.net.Uri ENTERPRISE_CONTENT_FILTER_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 PHONETIC_NAME_STYLE = "data11";
    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 android.net.Uri ENTERPRISE_CONTENT_FILTER_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";
  }

  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 CARRIER_PRESENCE = "carrier_presence";
    field public static final int CARRIER_PRESENCE_VT_CAPABLE = 1; // 0x1
    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 boolean isEnterpriseDirectoryId(long);
    method public static boolean isRemoteDirectory(long);
    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 android.net.Uri ENTERPRISE_CONTENT_URI;
    field public static final long ENTERPRISE_DEFAULT = 1000000000L; // 0x3b9aca00L
    field public static final long ENTERPRISE_LOCAL_INVISIBLE = 1000000001L; // 0x3b9aca01L
    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 ACTION_VOICE_SEND_MESSAGE_TO_CONTACTS = "android.provider.action.VOICE_SEND_MESSAGE_TO_CONTACTS";
    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 EXTRA_RECIPIENT_CONTACT_CHAT_ID = "android.provider.extra.RECIPIENT_CONTACT_CHAT_ID";
    field public static final java.lang.String EXTRA_RECIPIENT_CONTACT_NAME = "android.provider.extra.RECIPIENT_CONTACT_NAME";
    field public static final java.lang.String EXTRA_RECIPIENT_CONTACT_URI = "android.provider.extra.RECIPIENT_CONTACT_URI";
    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 CONTACT_ID = "contact_id";
    field public static final java.lang.String DATA_ID = "data_id";
    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_BUSY = 1; // 0x1
    field public static final int STATUS_EMPTY = 2; // 0x2
    field public static final int STATUS_NORMAL = 0; // 0x0
  }

  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";
  }

  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 BACKUP_ID = "backup_id";
    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 METADATA_DIRTY = "metadata_dirty";
    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;
  }

  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 copyDocument(android.content.ContentResolver, android.net.Uri, android.net.Uri);
    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 boolean isTreeUri(android.net.Uri);
    method public static android.net.Uri moveDocument(android.content.ContentResolver, android.net.Uri, android.net.Uri, android.net.Uri);
    method public static boolean removeDocument(android.content.ContentResolver, android.net.Uri, 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_EXCLUDE_SELF = "android.provider.extra.EXCLUDE_SELF";
    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 EXTRA_PROMPT = "android.provider.extra.PROMPT";
    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_COPY = 128; // 0x80
    field public static final int FLAG_SUPPORTS_DELETE = 4; // 0x4
    field public static final int FLAG_SUPPORTS_MOVE = 256; // 0x100
    field public static final int FLAG_SUPPORTS_REMOVE = 1024; // 0x400
    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 int FLAG_VIRTUAL_DOCUMENT = 512; // 0x200
    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_CAPACITY_BYTES = "capacity_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 copyDocument(java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
    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[] getDocumentStreamTypes(java.lang.String, java.lang.String);
    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 java.lang.String moveDocument(java.lang.String, java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
    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 android.content.res.AssetFileDescriptor openTypedDocument(java.lang.String, 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 void removeDocument(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_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 META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE = "android.media.still_image_camera_preview_service";
    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();
    method public static boolean canDrawOverlays(android.content.Context);
    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_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = "android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS";
    field public static final java.lang.String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS = "android.settings.IGNORE_BATTERY_OPTIMIZATION_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_KEYBOARD_LAYOUT_SETTINGS = "android.settings.KEYBOARD_LAYOUT_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_MANAGE_DEFAULT_APPS_SETTINGS = "android.settings.MANAGE_DEFAULT_APPS_SETTINGS";
    field public static final java.lang.String ACTION_MANAGE_OVERLAY_PERMISSION = "android.settings.action.MANAGE_OVERLAY_PERMISSION";
    field public static final java.lang.String ACTION_MANAGE_WRITE_SETTINGS = "android.settings.action.MANAGE_WRITE_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_NOTIFICATION_POLICY_ACCESS_SETTINGS = "android.settings.NOTIFICATION_POLICY_ACCESS_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_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
    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_VR_LISTENER_SETTINGS = "android.settings.VR_LISTENER_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";
    field public static final java.lang.String INTENT_CATEGORY_USAGE_ACCESS_CONFIG = "android.intent.category.USAGE_ACCESS_CONFIG";
    field public static final java.lang.String METADATA_USAGE_ACCESS_REASON = "android.settings.metadata.USAGE_ACCESS_REASON";
  }

  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 java.lang.String BOOT_COUNT = "boot_count";
    field public static final java.lang.String CONTACT_METADATA_SYNC = "contact_metadata_sync";
    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_DEVICE_OWNER_CONFIGS_LOCKDOWN = "wifi_device_owner_configs_lockdown";
    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 deprecated 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 java.lang.String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES = "enabled_notification_policy_access_packages";
    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 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 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 boolean canWrite(android.content.Context);
    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_TYPE_WHEN_DIALING = "dtmf_tone_type";
    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 java.lang.String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
    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 ACTION_DEFAULT_SMS_PACKAGE_CHANGED = "android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED";
    field public static final java.lang.String ACTION_EXTERNAL_PROVIDER_CHANGE = "android.provider.action.EXTERNAL_PROVIDER_CHANGE";
    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_IS_DEFAULT_SMS_APP = "android.provider.extra.IS_DEFAULT_SMS_APP";
    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 ACTION_SYNC_VOICEMAIL = "android.intent.action.SYNC_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);
    method public static void setQuota(android.content.Context, android.telecom.PhoneAccountHandle, int, int);
    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_BAD_CONFIGURATION = 3; // 0x3
    field public static final int DATA_CHANNEL_STATE_COMMUNICATION_ERROR = 4; // 0x4
    field public static final int DATA_CHANNEL_STATE_NO_CONNECTION = 1; // 0x1
    field public static final int DATA_CHANNEL_STATE_NO_CONNECTION_CELLULAR_REQUIRED = 2; // 0x2
    field public static final int DATA_CHANNEL_STATE_OK = 0; // 0x0
    field public static final int DATA_CHANNEL_STATE_SERVER_CONNECTION_ERROR = 6; // 0x6
    field public static final int DATA_CHANNEL_STATE_SERVER_ERROR = 5; // 0x5
    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 QUOTA_OCCUPIED = "quota_occupied";
    field public static final java.lang.String QUOTA_TOTAL = "quota_total";
    field public static final int QUOTA_UNAVAILABLE = -1; // 0xffffffff
    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 LAST_MODIFIED = "last_modified";
    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 static android.renderscript.Allocation[] createAllocations(android.renderscript.RenderScript, android.renderscript.Type, int, int);
    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 java.nio.ByteBuffer getByteBuffer();
    method public int getBytesSize();
    method public android.renderscript.Element getElement();
    method public long getStride();
    method public android.view.Surface getSurface();
    method public long getTimeStamp();
    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 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 getMinorVersion();
    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 protected void reduce(int, android.renderscript.Allocation[], android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
    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 java.lang.Object[] execute(java.lang.Object...);
    method public deprecated void execute();
    method public deprecated void setInput(android.renderscript.Script.KernelID, android.renderscript.Allocation);
    method public deprecated void setOutput(android.renderscript.Script.KernelID, android.renderscript.Allocation);
  }

  public static final class ScriptGroup.Binding {
    ctor public ScriptGroup.Binding(android.renderscript.Script.FieldID, java.lang.Object);
  }

  public static final deprecated 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 static final class ScriptGroup.Builder2 {
    ctor public ScriptGroup.Builder2(android.renderscript.RenderScript);
    method public android.renderscript.ScriptGroup.Input addInput();
    method public android.renderscript.ScriptGroup.Closure addInvoke(android.renderscript.Script.InvokeID, java.lang.Object...);
    method public android.renderscript.ScriptGroup.Closure addKernel(android.renderscript.Script.KernelID, android.renderscript.Type, java.lang.Object...);
    method public android.renderscript.ScriptGroup create(java.lang.String, android.renderscript.ScriptGroup.Future...);
  }

  public static final class ScriptGroup.Closure extends android.renderscript.BaseObj {
    method public android.renderscript.ScriptGroup.Future getGlobal(android.renderscript.Script.FieldID);
    method public android.renderscript.ScriptGroup.Future getReturn();
  }

  public static final class ScriptGroup.Future {
  }

  public static final class ScriptGroup.Input {
  }

  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 final class ScriptIntrinsicBLAS extends android.renderscript.ScriptIntrinsic {
    method public void BNNM(android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation, int, int);
    method public void CGBMV(int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Float2, android.renderscript.Allocation, int);
    method public void CGEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
    method public void CGEMV(int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Float2, android.renderscript.Allocation, int);
    method public void CGERC(android.renderscript.Float2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void CGERU(android.renderscript.Float2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void CHBMV(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Float2, android.renderscript.Allocation, int);
    method public void CHEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
    method public void CHEMV(int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Float2, android.renderscript.Allocation, int);
    method public void CHER(int, float, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void CHER2(int, android.renderscript.Float2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void CHER2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
    method public void CHERK(int, int, float, android.renderscript.Allocation, float, android.renderscript.Allocation);
    method public void CHPMV(int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Float2, android.renderscript.Allocation, int);
    method public void CHPR(int, float, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void CHPR2(int, android.renderscript.Float2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void CSYMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
    method public void CSYR2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
    method public void CSYRK(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
    method public void CTBMV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void CTBSV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void CTPMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void CTPSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void CTRMM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void CTRMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void CTRSM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void CTRSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void DGBMV(int, int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, int, double, android.renderscript.Allocation, int);
    method public void DGEMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
    method public void DGEMV(int, double, android.renderscript.Allocation, android.renderscript.Allocation, int, double, android.renderscript.Allocation, int);
    method public void DGER(double, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void DSBMV(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, int, double, android.renderscript.Allocation, int);
    method public void DSPMV(int, double, android.renderscript.Allocation, android.renderscript.Allocation, int, double, android.renderscript.Allocation, int);
    method public void DSPR(int, double, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void DSPR2(int, double, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void DSYMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
    method public void DSYMV(int, double, android.renderscript.Allocation, android.renderscript.Allocation, int, double, android.renderscript.Allocation, int);
    method public void DSYR(int, double, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void DSYR2(int, double, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void DSYR2K(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
    method public void DSYRK(int, int, double, android.renderscript.Allocation, double, android.renderscript.Allocation);
    method public void DTBMV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void DTBSV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void DTPMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void DTPSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void DTRMM(int, int, int, int, double, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void DTRMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void DTRSM(int, int, int, int, double, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void DTRSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void SGBMV(int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation, int, float, android.renderscript.Allocation, int);
    method public void SGEMM(int, int, float, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
    method public void SGEMV(int, float, android.renderscript.Allocation, android.renderscript.Allocation, int, float, android.renderscript.Allocation, int);
    method public void SGER(float, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void SSBMV(int, int, float, android.renderscript.Allocation, android.renderscript.Allocation, int, float, android.renderscript.Allocation, int);
    method public void SSPMV(int, float, android.renderscript.Allocation, android.renderscript.Allocation, int, float, android.renderscript.Allocation, int);
    method public void SSPR(int, float, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void SSPR2(int, float, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void SSYMM(int, int, float, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
    method public void SSYMV(int, float, android.renderscript.Allocation, android.renderscript.Allocation, int, float, android.renderscript.Allocation, int);
    method public void SSYR(int, float, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void SSYR2(int, float, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void SSYR2K(int, int, float, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
    method public void SSYRK(int, int, float, android.renderscript.Allocation, float, android.renderscript.Allocation);
    method public void STBMV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void STBSV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void STPMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void STPSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void STRMM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void STRMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void STRSM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void STRSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void ZGBMV(int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Double2, android.renderscript.Allocation, int);
    method public void ZGEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
    method public void ZGEMV(int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Double2, android.renderscript.Allocation, int);
    method public void ZGERC(android.renderscript.Double2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void ZGERU(android.renderscript.Double2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void ZHBMV(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Double2, android.renderscript.Allocation, int);
    method public void ZHEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
    method public void ZHEMV(int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Double2, android.renderscript.Allocation, int);
    method public void ZHER(int, double, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void ZHER2(int, android.renderscript.Double2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void ZHER2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
    method public void ZHERK(int, int, double, android.renderscript.Allocation, double, android.renderscript.Allocation);
    method public void ZHPMV(int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, int, android.renderscript.Double2, android.renderscript.Allocation, int);
    method public void ZHPR(int, double, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void ZHPR2(int, android.renderscript.Double2, android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation);
    method public void ZSYMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
    method public void ZSYR2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
    method public void ZSYRK(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
    method public void ZTBMV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void ZTBSV(int, int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void ZTPMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void ZTPSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void ZTRMM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void ZTRMV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public void ZTRSM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
    method public void ZTRSV(int, int, int, android.renderscript.Allocation, android.renderscript.Allocation, int);
    method public static android.renderscript.ScriptIntrinsicBLAS create(android.renderscript.RenderScript);
    field public static final int CONJ_TRANSPOSE = 113; // 0x71
    field public static final int LEFT = 141; // 0x8d
    field public static final int LOWER = 122; // 0x7a
    field public static final int NON_UNIT = 131; // 0x83
    field public static final int NO_TRANSPOSE = 111; // 0x6f
    field public static final int RIGHT = 142; // 0x8e
    field public static final int TRANSPOSE = 112; // 0x70
    field public static final int UNIT = 132; // 0x84
    field public static final int UPPER = 121; // 0x79
  }

  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 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 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 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[], android.net.Uri, 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 deprecated 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 final deprecated class KeyPairGeneratorSpec implements java.security.spec.AlgorithmParameterSpec {
    method public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec();
    method public android.content.Context getContext();
    method public java.util.Date getEndDate();
    method public int getKeySize();
    method public java.lang.String getKeyType();
    method public java.lang.String getKeystoreAlias();
    method public java.math.BigInteger getSerialNumber();
    method public java.util.Date getStartDate();
    method public javax.security.auth.x500.X500Principal getSubjectDN();
    method public boolean isEncryptionRequired();
  }

  public static final deprecated 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 setEncryptionRequired();
    method public android.security.KeyPairGeneratorSpec.Builder setEndDate(java.util.Date);
    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 setSerialNumber(java.math.BigInteger);
    method public android.security.KeyPairGeneratorSpec.Builder setStartDate(java.util.Date);
    method public android.security.KeyPairGeneratorSpec.Builder setSubject(javax.security.auth.x500.X500Principal);
  }

  public final deprecated class KeyStoreParameter implements java.security.KeyStore.ProtectionParameter {
    method public boolean isEncryptionRequired();
  }

  public static final deprecated class KeyStoreParameter.Builder {
    ctor public KeyStoreParameter.Builder(android.content.Context);
    method public android.security.KeyStoreParameter build();
    method public android.security.KeyStoreParameter.Builder setEncryptionRequired(boolean);
  }

  public class NetworkSecurityPolicy {
    method public static android.security.NetworkSecurityPolicy getInstance();
    method public boolean isCleartextTrafficPermitted();
    method public boolean isCleartextTrafficPermitted(java.lang.String);
  }

}

package android.security.keystore {

  public class KeyExpiredException extends java.security.InvalidKeyException {
    ctor public KeyExpiredException();
    ctor public KeyExpiredException(java.lang.String);
    ctor public KeyExpiredException(java.lang.String, java.lang.Throwable);
  }

  public final class KeyGenParameterSpec implements java.security.spec.AlgorithmParameterSpec {
    method public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec();
    method public byte[] getAttestationChallenge();
    method public java.lang.String[] getBlockModes();
    method public java.util.Date getCertificateNotAfter();
    method public java.util.Date getCertificateNotBefore();
    method public java.math.BigInteger getCertificateSerialNumber();
    method public javax.security.auth.x500.X500Principal getCertificateSubject();
    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 getPurposes();
    method public java.lang.String[] getSignaturePaddings();
    method public int getUserAuthenticationValidityDurationSeconds();
    method public boolean isDigestsSpecified();
    method public boolean isInvalidatedByBiometricEnrollment();
    method public boolean isRandomizedEncryptionRequired();
    method public boolean isUserAuthenticationRequired();
    method public boolean isUserAuthenticationValidWhileOnBody();
  }

  public static final class KeyGenParameterSpec.Builder {
    ctor public KeyGenParameterSpec.Builder(java.lang.String, int);
    method public android.security.keystore.KeyGenParameterSpec build();
    method public android.security.keystore.KeyGenParameterSpec.Builder setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec);
    method public android.security.keystore.KeyGenParameterSpec.Builder setAttestationChallenge(byte[]);
    method public android.security.keystore.KeyGenParameterSpec.Builder setBlockModes(java.lang.String...);
    method public android.security.keystore.KeyGenParameterSpec.Builder setCertificateNotAfter(java.util.Date);
    method public android.security.keystore.KeyGenParameterSpec.Builder setCertificateNotBefore(java.util.Date);
    method public android.security.keystore.KeyGenParameterSpec.Builder setCertificateSerialNumber(java.math.BigInteger);
    method public android.security.keystore.KeyGenParameterSpec.Builder setCertificateSubject(javax.security.auth.x500.X500Principal);
    method public android.security.keystore.KeyGenParameterSpec.Builder setDigests(java.lang.String...);
    method public android.security.keystore.KeyGenParameterSpec.Builder setEncryptionPaddings(java.lang.String...);
    method public android.security.keystore.KeyGenParameterSpec.Builder setInvalidatedByBiometricEnrollment(boolean);
    method public android.security.keystore.KeyGenParameterSpec.Builder setKeySize(int);
    method public android.security.keystore.KeyGenParameterSpec.Builder setKeyValidityEnd(java.util.Date);
    method public android.security.keystore.KeyGenParameterSpec.Builder setKeyValidityForConsumptionEnd(java.util.Date);
    method public android.security.keystore.KeyGenParameterSpec.Builder setKeyValidityForOriginationEnd(java.util.Date);
    method public android.security.keystore.KeyGenParameterSpec.Builder setKeyValidityStart(java.util.Date);
    method public android.security.keystore.KeyGenParameterSpec.Builder setRandomizedEncryptionRequired(boolean);
    method public android.security.keystore.KeyGenParameterSpec.Builder setSignaturePaddings(java.lang.String...);
    method public android.security.keystore.KeyGenParameterSpec.Builder setUserAuthenticationRequired(boolean);
    method public android.security.keystore.KeyGenParameterSpec.Builder setUserAuthenticationValidWhileOnBody(boolean);
    method public android.security.keystore.KeyGenParameterSpec.Builder setUserAuthenticationValidityDurationSeconds(int);
  }

  public class KeyInfo 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 getUserAuthenticationValidityDurationSeconds();
    method public boolean isInsideSecureHardware();
    method public boolean isInvalidatedByBiometricEnrollment();
    method public boolean isUserAuthenticationRequired();
    method public boolean isUserAuthenticationRequirementEnforcedBySecureHardware();
    method public boolean isUserAuthenticationValidWhileOnBody();
  }

  public class KeyNotYetValidException extends java.security.InvalidKeyException {
    ctor public KeyNotYetValidException();
    ctor public KeyNotYetValidException(java.lang.String);
    ctor public KeyNotYetValidException(java.lang.String, java.lang.Throwable);
  }

  public class KeyPermanentlyInvalidatedException extends java.security.InvalidKeyException {
    ctor public KeyPermanentlyInvalidatedException();
    ctor public KeyPermanentlyInvalidatedException(java.lang.String);
    ctor public KeyPermanentlyInvalidatedException(java.lang.String, java.lang.Throwable);
  }

  public abstract class KeyProperties {
    field public static final java.lang.String BLOCK_MODE_CBC = "CBC";
    field public static final java.lang.String BLOCK_MODE_CTR = "CTR";
    field public static final java.lang.String BLOCK_MODE_ECB = "ECB";
    field public static final java.lang.String BLOCK_MODE_GCM = "GCM";
    field public static final java.lang.String DIGEST_MD5 = "MD5";
    field public static final java.lang.String DIGEST_NONE = "NONE";
    field public static final java.lang.String DIGEST_SHA1 = "SHA-1";
    field public static final java.lang.String DIGEST_SHA224 = "SHA-224";
    field public static final java.lang.String DIGEST_SHA256 = "SHA-256";
    field public static final java.lang.String DIGEST_SHA384 = "SHA-384";
    field public static final java.lang.String DIGEST_SHA512 = "SHA-512";
    field public static final java.lang.String ENCRYPTION_PADDING_NONE = "NoPadding";
    field public static final java.lang.String ENCRYPTION_PADDING_PKCS7 = "PKCS7Padding";
    field public static final java.lang.String ENCRYPTION_PADDING_RSA_OAEP = "OAEPPadding";
    field public static final java.lang.String ENCRYPTION_PADDING_RSA_PKCS1 = "PKCS1Padding";
    field public static final java.lang.String KEY_ALGORITHM_AES = "AES";
    field public static final java.lang.String KEY_ALGORITHM_EC = "EC";
    field public static final java.lang.String KEY_ALGORITHM_HMAC_SHA1 = "HmacSHA1";
    field public static final java.lang.String KEY_ALGORITHM_HMAC_SHA224 = "HmacSHA224";
    field public static final java.lang.String KEY_ALGORITHM_HMAC_SHA256 = "HmacSHA256";
    field public static final java.lang.String KEY_ALGORITHM_HMAC_SHA384 = "HmacSHA384";
    field public static final java.lang.String KEY_ALGORITHM_HMAC_SHA512 = "HmacSHA512";
    field public static final java.lang.String KEY_ALGORITHM_RSA = "RSA";
    field public static final int ORIGIN_GENERATED = 1; // 0x1
    field public static final int ORIGIN_IMPORTED = 2; // 0x2
    field public static final int ORIGIN_UNKNOWN = 4; // 0x4
    field public static final int PURPOSE_DECRYPT = 2; // 0x2
    field public static final int PURPOSE_ENCRYPT = 1; // 0x1
    field public static final int PURPOSE_SIGN = 4; // 0x4
    field public static final int PURPOSE_VERIFY = 8; // 0x8
    field public static final java.lang.String SIGNATURE_PADDING_RSA_PKCS1 = "PKCS1";
    field public static final java.lang.String SIGNATURE_PADDING_RSA_PSS = "PSS";
  }

  public final class KeyProtection 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 boolean isDigestsSpecified();
    method public boolean isInvalidatedByBiometricEnrollment();
    method public boolean isRandomizedEncryptionRequired();
    method public boolean isUserAuthenticationRequired();
    method public boolean isUserAuthenticationValidWhileOnBody();
  }

  public static final class KeyProtection.Builder {
    ctor public KeyProtection.Builder(int);
    method public android.security.keystore.KeyProtection build();
    method public android.security.keystore.KeyProtection.Builder setBlockModes(java.lang.String...);
    method public android.security.keystore.KeyProtection.Builder setDigests(java.lang.String...);
    method public android.security.keystore.KeyProtection.Builder setEncryptionPaddings(java.lang.String...);
    method public android.security.keystore.KeyProtection.Builder setInvalidatedByBiometricEnrollment(boolean);
    method public android.security.keystore.KeyProtection.Builder setKeyValidityEnd(java.util.Date);
    method public android.security.keystore.KeyProtection.Builder setKeyValidityForConsumptionEnd(java.util.Date);
    method public android.security.keystore.KeyProtection.Builder setKeyValidityForOriginationEnd(java.util.Date);
    method public android.security.keystore.KeyProtection.Builder setKeyValidityStart(java.util.Date);
    method public android.security.keystore.KeyProtection.Builder setRandomizedEncryptionRequired(boolean);
    method public android.security.keystore.KeyProtection.Builder setSignaturePaddings(java.lang.String...);
    method public android.security.keystore.KeyProtection.Builder setUserAuthenticationRequired(boolean);
    method public android.security.keystore.KeyProtection.Builder setUserAuthenticationValidWhileOnBody(boolean);
    method public android.security.keystore.KeyProtection.Builder setUserAuthenticationValidityDurationSeconds(int);
  }

  public class UserNotAuthenticatedException extends java.security.InvalidKeyException {
    ctor public UserNotAuthenticatedException();
    ctor public UserNotAuthenticatedException(java.lang.String);
    ctor public UserNotAuthenticatedException(java.lang.String, java.lang.Throwable);
  }

}

package android.service.carrier {

  public class CarrierIdentifier implements android.os.Parcelable {
    ctor public CarrierIdentifier(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public int describeContents();
    method public java.lang.String getGid1();
    method public java.lang.String getGid2();
    method public java.lang.String getImsi();
    method public java.lang.String getMcc();
    method public java.lang.String getMnc();
    method public java.lang.String getSpn();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.carrier.CarrierIdentifier> CREATOR;
  }

  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 deprecated void onFilterSms(android.service.carrier.MessagePdu, java.lang.String, int, int, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Boolean>);
    method public void onReceiveTextSms(android.service.carrier.MessagePdu, java.lang.String, int, int, android.service.carrier.CarrierMessagingService.ResultCallback<java.lang.Integer>);
    method public deprecated void onSendDataSms(byte[], int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>);
    method public void onSendDataSms(byte[], int, java.lang.String, int, 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 deprecated 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 onSendMultipartTextSms(java.util.List<java.lang.String>, int, java.lang.String, int, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendMultipartSmsResult>);
    method public deprecated void onSendTextSms(java.lang.String, int, java.lang.String, android.service.carrier.CarrierMessagingService.ResultCallback<android.service.carrier.CarrierMessagingService.SendSmsResult>);
    method public void onSendTextSms(java.lang.String, int, java.lang.String, int, 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 RECEIVE_OPTIONS_DEFAULT = 0; // 0x0
    field public static final int RECEIVE_OPTIONS_DROP = 1; // 0x1
    field public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE = 2; // 0x2
    field public static final int SEND_FLAG_REQUEST_DELIVERY_STATUS = 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 abstract class CarrierService extends android.app.Service {
    ctor public CarrierService();
    method public final void notifyCarrierNetworkChange(boolean);
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract android.os.PersistableBundle onLoadConfig(android.service.carrier.CarrierIdentifier);
    field public static final java.lang.String CARRIER_SERVICE_INTERFACE = "android.service.carrier.CarrierService";
  }

  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.drawable.Icon, float, android.content.ComponentName, android.os.Bundle);
    method public int describeContents();
    method public android.content.ComponentName getComponentName();
    method public android.graphics.drawable.Icon getIcon();
    method public android.os.Bundle getIntentExtras();
    method public float getScore();
    method public java.lang.CharSequence getTitle();
    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 void onProvideKeyboardShortcuts(java.util.List<android.view.KeyboardShortcutGroup>, 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 CameraPrewarmService extends android.app.Service {
    ctor public CameraPrewarmService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract void onCooldown(boolean);
    method public abstract void onPrewarm();
  }

  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 android.media.session.MediaSession.Token getSessionToken();
    method public void notifyChildrenChanged(java.lang.String);
    method public void notifyChildrenChanged(java.lang.String, android.os.Bundle);
    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 onLoadChildren(java.lang.String, android.service.media.MediaBrowserService.Result<java.util.List<android.media.browse.MediaBrowser.MediaItem>>, android.os.Bundle);
    method public void onLoadItem(java.lang.String, android.service.media.MediaBrowserService.Result<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();
    field public static final java.lang.String EXTRA_OFFLINE = "android.service.media.extra.OFFLINE";
    field public static final java.lang.String EXTRA_RECENT = "android.service.media.extra.RECENT";
    field public static final java.lang.String EXTRA_SUGGESTED = "android.service.media.extra.SUGGESTED";
  }

  public class MediaBrowserService.Result {
    method public void detach();
    method public void sendResult(T);
  }

}

package android.service.notification {

  public class Condition implements android.os.Parcelable {
    ctor public Condition(android.net.Uri, java.lang.String, int);
    ctor public Condition(android.net.Uri, java.lang.String, java.lang.String, java.lang.String, int, int, int);
    ctor public Condition(android.os.Parcel);
    method public android.service.notification.Condition copy();
    method public int describeContents();
    method public static boolean isValidId(android.net.Uri, java.lang.String);
    method public static android.net.Uri.Builder newId(android.content.Context);
    method public static java.lang.String relevanceToString(int);
    method public static java.lang.String stateToString(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.notification.Condition> CREATOR;
    field public static final int FLAG_RELEVANT_ALWAYS = 2; // 0x2
    field public static final int FLAG_RELEVANT_NOW = 1; // 0x1
    field public static final java.lang.String SCHEME = "condition";
    field public static final int STATE_ERROR = 3; // 0x3
    field public static final int STATE_FALSE = 0; // 0x0
    field public static final int STATE_TRUE = 1; // 0x1
    field public static final int STATE_UNKNOWN = 2; // 0x2
    field public final int flags;
    field public final int icon;
    field public final android.net.Uri id;
    field public final java.lang.String line1;
    field public final java.lang.String line2;
    field public final int state;
    field public final java.lang.String summary;
  }

  public abstract class ConditionProviderService extends android.app.Service {
    ctor public ConditionProviderService();
    method public final void notifyCondition(android.service.notification.Condition);
    method public final void notifyConditions(android.service.notification.Condition...);
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract void onConnected();
    method public void onRequestConditions(int);
    method public abstract void onSubscribe(android.net.Uri);
    method public abstract void onUnsubscribe(android.net.Uri);
    field public static final java.lang.String EXTRA_RULE_ID = "android.content.automatic.ruleId";
    field public static final java.lang.String META_DATA_CONFIGURATION_ACTIVITY = "android.service.zen.automatic.configurationActivity";
    field public static final java.lang.String META_DATA_RULE_INSTANCE_LIMIT = "android.service.zen.automatic.ruleInstanceLimit";
    field public static final java.lang.String META_DATA_RULE_TYPE = "android.service.zen.automatic.ruleType";
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.ConditionProviderService";
  }

  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);
    method public static void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
    method public final void requestUnbind() throws android.os.RemoteException;
    method public final void setNotificationsShown(java.lang.String[]);
    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";
    field public static final int SUPPRESSED_EFFECT_SCREEN_OFF = 1; // 0x1
    field public static final int SUPPRESSED_EFFECT_SCREEN_ON = 2; // 0x2
  }

  public static class NotificationListenerService.Ranking {
    ctor public NotificationListenerService.Ranking();
    method public int getImportance();
    method public java.lang.CharSequence getImportanceExplanation();
    method public java.lang.String getKey();
    method public int getRank();
    method public int getSuppressedVisualEffects();
    method public boolean isAmbient();
    method public boolean matchesInterruptionFilter();
    field public static final int IMPORTANCE_DEFAULT = 3; // 0x3
    field public static final int IMPORTANCE_HIGH = 4; // 0x4
    field public static final int IMPORTANCE_LOW = 2; // 0x2
    field public static final int IMPORTANCE_MAX = 5; // 0x5
    field public static final int IMPORTANCE_MIN = 1; // 0x1
    field public static final int IMPORTANCE_NONE = 0; // 0x0
    field public static final int IMPORTANCE_UNSPECIFIED = -1000; // 0xfffffc18
  }

  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.quicksettings {

  public final class Tile implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.CharSequence getContentDescription();
    method public android.graphics.drawable.Icon getIcon();
    method public java.lang.CharSequence getLabel();
    method public int getState();
    method public void setContentDescription(java.lang.CharSequence);
    method public void setIcon(android.graphics.drawable.Icon);
    method public void setLabel(java.lang.CharSequence);
    method public void setState(int);
    method public void updateTile();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.quicksettings.Tile> CREATOR;
    field public static final int STATE_ACTIVE = 2; // 0x2
    field public static final int STATE_INACTIVE = 1; // 0x1
    field public static final int STATE_UNAVAILABLE = 0; // 0x0
  }

  public class TileService extends android.app.Service {
    ctor public TileService();
    method public final android.service.quicksettings.Tile getQsTile();
    method public final boolean isLocked();
    method public final boolean isSecure();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onClick();
    method public void onStartListening();
    method public void onStopListening();
    method public int onTileAdded();
    method public void onTileRemoved();
    method public static final void requestListeningState(android.content.Context, android.content.ComponentName);
    method public final void showDialog(android.app.Dialog);
    method public final void startActivityAndCollapse(android.content.Intent);
    method public final void unlockAndRun(java.lang.Runnable);
    field public static final java.lang.String ACTION_QS_TILE = "android.service.quicksettings.action.QS_TILE";
    field public static final java.lang.String ACTION_QS_TILE_PREFERENCES = "android.service.quicksettings.action.QS_TILE_PREFERENCES";
    field public static final int TILE_MODE_ACTIVE = 2; // 0x2
    field public static final int TILE_MODE_PASSIVE = 1; // 0x1
  }

}

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 int getDisabledShowContext();
    method public static boolean isActiveService(android.content.Context, android.content.ComponentName);
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onLaunchVoiceAssistFromKeyguard();
    method public void onReady();
    method public void onShutdown();
    method public void setDisabledShowContext(int);
    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";
  }

  public class VoiceInteractionSession implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback {
    ctor public VoiceInteractionSession(android.content.Context);
    ctor public VoiceInteractionSession(android.content.Context, android.os.Handler);
    method public void closeSystemDialogs();
    method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public void finish();
    method public android.content.Context getContext();
    method public int getDisabledShowContext();
    method public android.view.LayoutInflater getLayoutInflater();
    method public int getUserDisabledShowContext();
    method public android.app.Dialog getWindow();
    method public void hide();
    method public void onAssistStructureFailure(java.lang.Throwable);
    method public void onBackPressed();
    method public void onCancelRequest(android.service.voice.VoiceInteractionSession.Request);
    method public void onCloseSystemDialogs();
    method public void onComputeInsets(android.service.voice.VoiceInteractionSession.Insets);
    method public void onConfigurationChanged(android.content.res.Configuration);
    method public void onCreate();
    method public android.view.View onCreateContentView();
    method public void onDestroy();
    method public boolean[] onGetSupportedCommands(java.lang.String[]);
    method public void onHandleAssist(android.os.Bundle, android.app.assist.AssistStructure, android.app.assist.AssistContent);
    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 void onLockscreenShown();
    method public void onLowMemory();
    method public void onRequestAbortVoice(android.service.voice.VoiceInteractionSession.AbortVoiceRequest);
    method public void onRequestCommand(android.service.voice.VoiceInteractionSession.CommandRequest);
    method public void onRequestCompleteVoice(android.service.voice.VoiceInteractionSession.CompleteVoiceRequest);
    method public void onRequestConfirmation(android.service.voice.VoiceInteractionSession.ConfirmationRequest);
    method public void onRequestPickOption(android.service.voice.VoiceInteractionSession.PickOptionRequest);
    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 onTrimMemory(int);
    method public void setContentView(android.view.View);
    method public void setDisabledShowContext(int);
    method public void setKeepAwake(boolean);
    method public void setTheme(int);
    method public void show(android.os.Bundle, int);
    method public void startVoiceActivity(android.content.Intent);
    field public static final int SHOW_SOURCE_ACTIVITY = 16; // 0x10
    field public static final int SHOW_SOURCE_APPLICATION = 8; // 0x8
    field public static final int SHOW_SOURCE_ASSIST_GESTURE = 4; // 0x4
    field public static final int SHOW_WITH_ASSIST = 1; // 0x1
    field public static final int SHOW_WITH_SCREENSHOT = 2; // 0x2
  }

  public static final class VoiceInteractionSession.AbortVoiceRequest extends android.service.voice.VoiceInteractionSession.Request {
    method public deprecated java.lang.CharSequence getMessage();
    method public android.app.VoiceInteractor.Prompt getVoicePrompt();
    method public void sendAbortResult(android.os.Bundle);
  }

  public static final class VoiceInteractionSession.CommandRequest extends android.service.voice.VoiceInteractionSession.Request {
    method public java.lang.String getCommand();
    method public void sendIntermediateResult(android.os.Bundle);
    method public void sendResult(android.os.Bundle);
  }

  public static final class VoiceInteractionSession.CompleteVoiceRequest extends android.service.voice.VoiceInteractionSession.Request {
    method public deprecated java.lang.CharSequence getMessage();
    method public android.app.VoiceInteractor.Prompt getVoicePrompt();
    method public void sendCompleteResult(android.os.Bundle);
  }

  public static final class VoiceInteractionSession.ConfirmationRequest extends android.service.voice.VoiceInteractionSession.Request {
    method public deprecated java.lang.CharSequence getPrompt();
    method public android.app.VoiceInteractor.Prompt getVoicePrompt();
    method public void sendConfirmationResult(boolean, android.os.Bundle);
  }

  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 final class VoiceInteractionSession.PickOptionRequest extends android.service.voice.VoiceInteractionSession.Request {
    method public android.app.VoiceInteractor.PickOptionRequest.Option[] getOptions();
    method public deprecated java.lang.CharSequence getPrompt();
    method public android.app.VoiceInteractor.Prompt getVoicePrompt();
    method public void sendIntermediatePickOptionResult(android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void sendPickOptionResult(android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }

  public static class VoiceInteractionSession.Request {
    method public void cancel();
    method public java.lang.String getCallingPackage();
    method public int getCallingUid();
    method public android.os.Bundle getExtras();
    method public boolean isActive();
  }

  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.vr {

  public abstract class VrListenerService extends android.app.Service {
    ctor public VrListenerService();
    method public static final boolean isVrModePackageEnabled(android.content.Context, android.content.ComponentName);
    method public android.os.IBinder onBind(android.content.Intent);
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.vr.VrListenerService";
  }

}

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 int getCallingUid();
    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_PREFER_OFFLINE = "android.speech.extra.PREFER_OFFLINE";
    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 void onAudioAvailable(java.lang.String, byte[]);
    method public void onBeginSynthesis(java.lang.String, int, int, int);
    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 final class Call {
    method public void answer(int);
    method public void conference(android.telecom.Call);
    method public void disconnect();
    method public java.util.List<java.lang.String> getCannedTextResponses();
    method public java.util.List<android.telecom.Call> getChildren();
    method public java.util.List<android.telecom.Call> getConferenceableCalls();
    method public android.telecom.Call.Details getDetails();
    method public android.telecom.Call getParent();
    method public java.lang.String getRemainingPostDialSequence();
    method public int getState();
    method public android.telecom.InCallService.VideoCall getVideoCall();
    method public void hold();
    method public void mergeConference();
    method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
    method public void playDtmfTone(char);
    method public void postDialContinue(boolean);
    method public void pullExternalCall();
    method public void registerCallback(android.telecom.Call.Callback);
    method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
    method public void reject(boolean, java.lang.String);
    method public void sendCallEvent(java.lang.String, android.os.Bundle);
    method public void splitFromConference();
    method public void stopDtmfTone();
    method public void swapConference();
    method public void unhold();
    method public void unregisterCallback(android.telecom.Call.Callback);
    field public static final java.lang.String AVAILABLE_PHONE_ACCOUNTS = "selectPhoneAccountAccounts";
    field public static final int STATE_ACTIVE = 4; // 0x4
    field public static final int STATE_CONNECTING = 9; // 0x9
    field public static final int STATE_DIALING = 1; // 0x1
    field public static final int STATE_DISCONNECTED = 7; // 0x7
    field public static final int STATE_DISCONNECTING = 10; // 0xa
    field public static final int STATE_HOLDING = 3; // 0x3
    field public static final int STATE_NEW = 0; // 0x0
    field public static final int STATE_PULLING_CALL = 11; // 0xb
    field public static final int STATE_RINGING = 2; // 0x2
    field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
  }

  public static abstract class Call.Callback {
    ctor public Call.Callback();
    method public void onCallDestroyed(android.telecom.Call);
    method public void onCannedTextResponsesLoaded(android.telecom.Call, java.util.List<java.lang.String>);
    method public void onChildrenChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
    method public void onConferenceableCallsChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
    method public void onDetailsChanged(android.telecom.Call, android.telecom.Call.Details);
    method public void onParentChanged(android.telecom.Call, android.telecom.Call);
    method public void onPostDialWait(android.telecom.Call, java.lang.String);
    method public void onStateChanged(android.telecom.Call, int);
    method public void onVideoCallChanged(android.telecom.Call, android.telecom.InCallService.VideoCall);
  }

  public static class Call.Details {
    method public static boolean can(int, int);
    method public boolean can(int);
    method public static java.lang.String capabilitiesToString(int);
    method public android.telecom.PhoneAccountHandle getAccountHandle();
    method public int getCallCapabilities();
    method public int getCallProperties();
    method public java.lang.String getCallerDisplayName();
    method public int getCallerDisplayNamePresentation();
    method public final long getConnectTimeMillis();
    method public android.telecom.DisconnectCause getDisconnectCause();
    method public android.os.Bundle getExtras();
    method public android.telecom.GatewayInfo getGatewayInfo();
    method public android.net.Uri getHandle();
    method public int getHandlePresentation();
    method public android.os.Bundle getIntentExtras();
    method public android.telecom.StatusHints getStatusHints();
    method public int getVideoState();
    method public static boolean hasProperty(int, int);
    method public boolean hasProperty(int);
    method public static java.lang.String propertiesToString(int);
    field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 4194304; // 0x400000
    field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
    field public static final int CAPABILITY_CAN_PULL_CALL = 8388608; // 0x800000
    field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
    field public static final int CAPABILITY_HOLD = 1; // 0x1
    field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
    field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
    field public static final int CAPABILITY_MUTE = 64; // 0x40
    field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20
    field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
    field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300
    field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100
    field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = 3072; // 0xc00
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX = 1024; // 0x400
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
    field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
    field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
    field public static final int PROPERTY_CONFERENCE = 1; // 0x1
    field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
    field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
    field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
    field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
    field public static final int PROPERTY_WIFI = 8; // 0x8
    field public static final int PROPERTY_WORK_CALL = 32; // 0x20
  }

  public final class CallAudioState implements android.os.Parcelable {
    ctor public CallAudioState(boolean, int, int);
    method public static java.lang.String audioRouteToString(int);
    method public int describeContents();
    method public int getRoute();
    method public int getSupportedRouteMask();
    method public boolean isMuted();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.CallAudioState> CREATOR;
    field public static final int ROUTE_BLUETOOTH = 2; // 0x2
    field public static final int ROUTE_EARPIECE = 1; // 0x1
    field public static final int ROUTE_SPEAKER = 8; // 0x8
    field public static final int ROUTE_WIRED_HEADSET = 4; // 0x4
    field public static final int ROUTE_WIRED_OR_EARPIECE = 5; // 0x5
  }

  public abstract class CallScreeningService extends android.app.Service {
    ctor public CallScreeningService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract void onScreenCall(android.telecom.Call.Details);
    method public final void respondToCall(android.telecom.Call.Details, android.telecom.CallScreeningService.CallResponse);
    field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.CallScreeningService";
  }

  public static class CallScreeningService.CallResponse {
    method public boolean getDisallowCall();
    method public boolean getRejectCall();
    method public boolean getSkipCallLog();
    method public boolean getSkipNotification();
  }

  public static class CallScreeningService.CallResponse.Builder {
    ctor public CallScreeningService.CallResponse.Builder();
    method public android.telecom.CallScreeningService.CallResponse build();
    method public android.telecom.CallScreeningService.CallResponse.Builder setDisallowCall(boolean);
    method public android.telecom.CallScreeningService.CallResponse.Builder setRejectCall(boolean);
    method public android.telecom.CallScreeningService.CallResponse.Builder setSkipCallLog(boolean);
    method public android.telecom.CallScreeningService.CallResponse.Builder setSkipNotification(boolean);
  }

  public abstract class Conference extends android.telecom.Conferenceable {
    ctor public Conference(android.telecom.PhoneAccountHandle);
    method public final boolean addConnection(android.telecom.Connection);
    method public final void destroy();
    method public final android.telecom.CallAudioState getCallAudioState();
    method public final java.util.List<android.telecom.Connection> getConferenceableConnections();
    method public final int getConnectionCapabilities();
    method public final long getConnectionTime();
    method public final java.util.List<android.telecom.Connection> getConnections();
    method public final android.telecom.DisconnectCause getDisconnectCause();
    method public final android.os.Bundle getExtras();
    method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle();
    method public final int getState();
    method public final android.telecom.StatusHints getStatusHints();
    method public android.telecom.Connection.VideoProvider getVideoProvider();
    method public int getVideoState();
    method public void onCallAudioStateChanged(android.telecom.CallAudioState);
    method public void onConnectionAdded(android.telecom.Connection);
    method public void onDisconnect();
    method public void onHold();
    method public void onMerge(android.telecom.Connection);
    method public void onMerge();
    method public void onPlayDtmfTone(char);
    method public void onSeparate(android.telecom.Connection);
    method public void onStopDtmfTone();
    method public void onSwap();
    method public void onUnhold();
    method public final void removeConnection(android.telecom.Connection);
    method public final void setActive();
    method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
    method public final void setConnectionCapabilities(int);
    method public final void setConnectionTime(long);
    method public final void setDialing();
    method public final void setDisconnected(android.telecom.DisconnectCause);
    method public final void setExtras(android.os.Bundle);
    method public final void setOnHold();
    method public final void setStatusHints(android.telecom.StatusHints);
    method public final void setVideoProvider(android.telecom.Connection, android.telecom.Connection.VideoProvider);
    method public final void setVideoState(android.telecom.Connection, int);
    field public static final long CONNECT_TIME_NOT_SPECIFIED = 0L; // 0x0L
  }

  public abstract class Conferenceable {
  }

  public abstract class Connection extends android.telecom.Conferenceable {
    ctor public Connection();
    method public static java.lang.String capabilitiesToString(int);
    method public static android.telecom.Connection createCanceledConnection();
    method public static android.telecom.Connection createFailedConnection(android.telecom.DisconnectCause);
    method public final void destroy();
    method public final android.net.Uri getAddress();
    method public final int getAddressPresentation();
    method public final boolean getAudioModeIsVoip();
    method public final android.telecom.CallAudioState getCallAudioState();
    method public final java.lang.String getCallerDisplayName();
    method public final int getCallerDisplayNamePresentation();
    method public final android.telecom.Conference getConference();
    method public final java.util.List<android.telecom.Conferenceable> getConferenceables();
    method public final int getConnectionCapabilities();
    method public final android.telecom.DisconnectCause getDisconnectCause();
    method public final android.os.Bundle getExtras();
    method public final int getState();
    method public final android.telecom.StatusHints getStatusHints();
    method public final android.telecom.Connection.VideoProvider getVideoProvider();
    method public final boolean isRingbackRequested();
    method public void onAbort();
    method public void onAnswer(int);
    method public void onAnswer();
    method public void onCallAudioStateChanged(android.telecom.CallAudioState);
    method public void onCallEvent(java.lang.String, android.os.Bundle);
    method public void onDisconnect();
    method public void onHold();
    method public void onPlayDtmfTone(char);
    method public void onPostDialContinue(boolean);
    method public void onPullExternalCall();
    method public void onReject();
    method public void onReject(java.lang.String);
    method public void onSeparate();
    method public void onStateChanged(int);
    method public void onStopDtmfTone();
    method public void onUnhold();
    method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
    method public final void setActive();
    method public final void setAddress(android.net.Uri, int);
    method public final void setAudioModeIsVoip(boolean);
    method public final void setCallerDisplayName(java.lang.String, int);
    method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
    method public final void setConferenceables(java.util.List<android.telecom.Conferenceable>);
    method public final void setConnectionCapabilities(int);
    method public final void setDialing();
    method public final void setDisconnected(android.telecom.DisconnectCause);
    method public final void setExtras(android.os.Bundle);
    method public final void setInitialized();
    method public final void setInitializing();
    method public final void setNextPostDialChar(char);
    method public final void setOnHold();
    method public final void setPostDialWait(java.lang.String);
    method public final void setRingbackRequested(boolean);
    method public final void setRinging();
    method public final void setStatusHints(android.telecom.StatusHints);
    method public final void setVideoProvider(android.telecom.Connection.VideoProvider);
    method public final void setVideoState(int);
    method public static java.lang.String stateToString(int);
    field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 8388608; // 0x800000
    field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
    field public static final int CAPABILITY_CAN_PULL_CALL = 33554432; // 0x2000000
    field public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION = 4194304; // 0x400000
    field public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 524288; // 0x80000
    field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
    field public static final int CAPABILITY_HOLD = 1; // 0x1
    field public static final int CAPABILITY_IS_EXTERNAL_CALL = 16777216; // 0x1000000
    field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
    field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
    field public static final int CAPABILITY_MUTE = 64; // 0x40
    field public static final int CAPABILITY_RESPOND_VIA_TEXT = 32; // 0x20
    field public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
    field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL = 768; // 0x300
    field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX = 256; // 0x100
    field public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX = 512; // 0x200
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = 3072; // 0xc00
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX = 1024; // 0x400
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
    field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
    field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
    field public static final java.lang.String EVENT_CALL_PULL_FAILED = "android.telecom.event.CALL_PULL_FAILED";
    field public static final java.lang.String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
    field public static final java.lang.String EXTRA_CHILD_ADDRESS = "android.telecom.extra.CHILD_ADDRESS";
    field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
    field public static final int STATE_ACTIVE = 4; // 0x4
    field public static final int STATE_DIALING = 3; // 0x3
    field public static final int STATE_DISCONNECTED = 6; // 0x6
    field public static final int STATE_HOLDING = 5; // 0x5
    field public static final int STATE_INITIALIZING = 0; // 0x0
    field public static final int STATE_NEW = 1; // 0x1
    field public static final int STATE_PULLING_CALL = 7; // 0x7
    field public static final int STATE_RINGING = 2; // 0x2
  }

  public static abstract class Connection.VideoProvider {
    ctor public Connection.VideoProvider();
    method public void changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities);
    method public void changePeerDimensions(int, int);
    method public void changeVideoQuality(int);
    method public void handleCallSessionEvent(int);
    method public abstract void onRequestCameraCapabilities();
    method public abstract void onRequestConnectionDataUsage();
    method public abstract void onSendSessionModifyRequest(android.telecom.VideoProfile, android.telecom.VideoProfile);
    method public abstract void onSendSessionModifyResponse(android.telecom.VideoProfile);
    method public abstract void onSetCamera(java.lang.String);
    method public abstract void onSetDeviceOrientation(int);
    method public abstract void onSetDisplaySurface(android.view.Surface);
    method public abstract void onSetPauseImage(android.net.Uri);
    method public abstract void onSetPreviewSurface(android.view.Surface);
    method public abstract void onSetZoom(float);
    method public void receiveSessionModifyRequest(android.telecom.VideoProfile);
    method public void receiveSessionModifyResponse(int, android.telecom.VideoProfile, android.telecom.VideoProfile);
    method public void setCallDataUsage(long);
    field public static final int SESSION_EVENT_CAMERA_FAILURE = 5; // 0x5
    field public static final int SESSION_EVENT_CAMERA_READY = 6; // 0x6
    field public static final int SESSION_EVENT_RX_PAUSE = 1; // 0x1
    field public static final int SESSION_EVENT_RX_RESUME = 2; // 0x2
    field public static final int SESSION_EVENT_TX_START = 3; // 0x3
    field public static final int SESSION_EVENT_TX_STOP = 4; // 0x4
    field public static final int SESSION_MODIFY_REQUEST_FAIL = 2; // 0x2
    field public static final int SESSION_MODIFY_REQUEST_INVALID = 3; // 0x3
    field public static final int SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE = 5; // 0x5
    field public static final int SESSION_MODIFY_REQUEST_SUCCESS = 1; // 0x1
    field public static final int SESSION_MODIFY_REQUEST_TIMED_OUT = 4; // 0x4
  }

  public final class ConnectionRequest implements android.os.Parcelable {
    ctor public ConnectionRequest(android.telecom.PhoneAccountHandle, android.net.Uri, android.os.Bundle);
    ctor public ConnectionRequest(android.telecom.PhoneAccountHandle, android.net.Uri, android.os.Bundle, int);
    method public int describeContents();
    method public android.telecom.PhoneAccountHandle getAccountHandle();
    method public android.net.Uri getAddress();
    method public android.os.Bundle getExtras();
    method public int getVideoState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.ConnectionRequest> CREATOR;
  }

  public abstract class ConnectionService extends android.app.Service {
    ctor public ConnectionService();
    method public final void addConference(android.telecom.Conference);
    method public final void addExistingConnection(android.telecom.PhoneAccountHandle, android.telecom.Connection);
    method public final void conferenceRemoteConnections(android.telecom.RemoteConnection, android.telecom.RemoteConnection);
    method public final android.telecom.RemoteConnection createRemoteIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
    method public final android.telecom.RemoteConnection createRemoteOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
    method public final java.util.Collection<android.telecom.Conference> getAllConferences();
    method public final java.util.Collection<android.telecom.Connection> getAllConnections();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public void onConference(android.telecom.Connection, android.telecom.Connection);
    method public android.telecom.Connection onCreateIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
    method public android.telecom.Connection onCreateOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
    method public void onRemoteConferenceAdded(android.telecom.RemoteConference);
    method public void onRemoteExistingConnectionAdded(android.telecom.RemoteConnection);
    field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.ConnectionService";
  }

  public final class DisconnectCause implements android.os.Parcelable {
    ctor public DisconnectCause(int);
    ctor public DisconnectCause(int, java.lang.String);
    ctor public DisconnectCause(int, java.lang.CharSequence, java.lang.CharSequence, java.lang.String);
    ctor public DisconnectCause(int, java.lang.CharSequence, java.lang.CharSequence, java.lang.String, int);
    method public int describeContents();
    method public int getCode();
    method public java.lang.CharSequence getDescription();
    method public java.lang.CharSequence getLabel();
    method public java.lang.String getReason();
    method public int getTone();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ANSWERED_ELSEWHERE = 11; // 0xb
    field public static final int BUSY = 7; // 0x7
    field public static final int CALL_PULLED = 12; // 0xc
    field public static final int CANCELED = 4; // 0x4
    field public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10; // 0xa
    field public static final android.os.Parcelable.Creator<android.telecom.DisconnectCause> CREATOR;
    field public static final int ERROR = 1; // 0x1
    field public static final int LOCAL = 2; // 0x2
    field public static final int MISSED = 5; // 0x5
    field public static final int OTHER = 9; // 0x9
    field public static final int REJECTED = 6; // 0x6
    field public static final int REMOTE = 3; // 0x3
    field public static final int RESTRICTED = 8; // 0x8
    field public static final int UNKNOWN = 0; // 0x0
  }

  public class GatewayInfo implements android.os.Parcelable {
    ctor public GatewayInfo(java.lang.String, android.net.Uri, android.net.Uri);
    method public int describeContents();
    method public android.net.Uri getGatewayAddress();
    method public java.lang.String getGatewayProviderPackageName();
    method public android.net.Uri getOriginalAddress();
    method public boolean isEmpty();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.GatewayInfo> CREATOR;
  }

  public abstract class InCallService extends android.app.Service {
    ctor public InCallService();
    method public final boolean canAddCall();
    method public final android.telecom.CallAudioState getCallAudioState();
    method public final java.util.List<android.telecom.Call> getCalls();
    method public android.os.IBinder onBind(android.content.Intent);
    method public void onBringToForeground(boolean);
    method public void onCallAdded(android.telecom.Call);
    method public void onCallAudioStateChanged(android.telecom.CallAudioState);
    method public void onCallRemoved(android.telecom.Call);
    method public void onCanAddCallChanged(boolean);
    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
    method public void onSilenceRinger();
    method public final void setAudioRoute(int);
    method public final void setMuted(boolean);
    field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.InCallService";
  }

  public static abstract class InCallService.VideoCall {
    ctor public InCallService.VideoCall();
    method public abstract void registerCallback(android.telecom.InCallService.VideoCall.Callback);
    method public abstract void registerCallback(android.telecom.InCallService.VideoCall.Callback, android.os.Handler);
    method public abstract void requestCallDataUsage();
    method public abstract void requestCameraCapabilities();
    method public abstract void sendSessionModifyRequest(android.telecom.VideoProfile);
    method public abstract void sendSessionModifyResponse(android.telecom.VideoProfile);
    method public abstract void setCamera(java.lang.String);
    method public abstract void setDeviceOrientation(int);
    method public abstract void setDisplaySurface(android.view.Surface);
    method public abstract void setPauseImage(android.net.Uri);
    method public abstract void setPreviewSurface(android.view.Surface);
    method public abstract void setZoom(float);
    method public abstract void unregisterCallback(android.telecom.InCallService.VideoCall.Callback);
  }

  public static abstract class InCallService.VideoCall.Callback {
    ctor public InCallService.VideoCall.Callback();
    method public abstract void onCallDataUsageChanged(long);
    method public abstract void onCallSessionEvent(int);
    method public abstract void onCameraCapabilitiesChanged(android.telecom.VideoProfile.CameraCapabilities);
    method public abstract void onPeerDimensionsChanged(int, int);
    method public abstract void onSessionModifyRequestReceived(android.telecom.VideoProfile);
    method public abstract void onSessionModifyResponseReceived(int, android.telecom.VideoProfile, android.telecom.VideoProfile);
    method public abstract void onVideoQualityChanged(int);
  }

  public final class PhoneAccount implements android.os.Parcelable {
    method public static android.telecom.PhoneAccount.Builder builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
    method public int describeContents();
    method public android.telecom.PhoneAccountHandle getAccountHandle();
    method public android.net.Uri getAddress();
    method public int getCapabilities();
    method public android.os.Bundle getExtras();
    method public int getHighlightColor();
    method public android.graphics.drawable.Icon getIcon();
    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 isEnabled();
    method public boolean supportsUriScheme(java.lang.String);
    method public android.telecom.PhoneAccount.Builder toBuilder();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CAPABILITY_CALL_PROVIDER = 2; // 0x2
    field public static final int CAPABILITY_CALL_SUBJECT = 64; // 0x40
    field public static final int CAPABILITY_CONNECTION_MANAGER = 1; // 0x1
    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 int CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE = 256; // 0x100
    field public static final android.os.Parcelable.Creator<android.telecom.PhoneAccount> CREATOR;
    field public static final java.lang.String EXTRA_CALL_SUBJECT_CHARACTER_ENCODING = "android.telecom.extra.CALL_SUBJECT_CHARACTER_ENCODING";
    field public static final java.lang.String EXTRA_CALL_SUBJECT_MAX_LENGTH = "android.telecom.extra.CALL_SUBJECT_MAX_LENGTH";
    field public static final int NO_HIGHLIGHT_COLOR = 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.Builder addSupportedUriScheme(java.lang.String);
    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 setExtras(android.os.Bundle);
    method public android.telecom.PhoneAccount.Builder setHighlightColor(int);
    method public android.telecom.PhoneAccount.Builder setIcon(android.graphics.drawable.Icon);
    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 final class PhoneAccountHandle implements android.os.Parcelable {
    ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String);
    ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String, android.os.UserHandle);
    method public int describeContents();
    method public android.content.ComponentName getComponentName();
    method public java.lang.String getId();
    method public android.os.UserHandle getUserHandle();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.PhoneAccountHandle> CREATOR;
  }

  public final class RemoteConference {
    method public void disconnect();
    method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
    method public final int getConnectionCapabilities();
    method public final java.util.List<android.telecom.RemoteConnection> getConnections();
    method public android.telecom.DisconnectCause getDisconnectCause();
    method public final android.os.Bundle getExtras();
    method public final int getState();
    method public void hold();
    method public void merge();
    method public void playDtmfTone(char);
    method public final void registerCallback(android.telecom.RemoteConference.Callback);
    method public final void registerCallback(android.telecom.RemoteConference.Callback, android.os.Handler);
    method public void separate(android.telecom.RemoteConnection);
    method public void setCallAudioState(android.telecom.CallAudioState);
    method public void stopDtmfTone();
    method public void swap();
    method public void unhold();
    method public final void unregisterCallback(android.telecom.RemoteConference.Callback);
  }

  public static abstract class RemoteConference.Callback {
    ctor public RemoteConference.Callback();
    method public void onConferenceableConnectionsChanged(android.telecom.RemoteConference, java.util.List<android.telecom.RemoteConnection>);
    method public void onConnectionAdded(android.telecom.RemoteConference, android.telecom.RemoteConnection);
    method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConference, int);
    method public void onConnectionRemoved(android.telecom.RemoteConference, android.telecom.RemoteConnection);
    method public void onDestroyed(android.telecom.RemoteConference);
    method public void onDisconnected(android.telecom.RemoteConference, android.telecom.DisconnectCause);
    method public void onExtrasChanged(android.telecom.RemoteConference, android.os.Bundle);
    method public void onStateChanged(android.telecom.RemoteConference, int, int);
  }

  public final class RemoteConnection {
    method public void abort();
    method public void answer();
    method public void disconnect();
    method public android.net.Uri getAddress();
    method public int getAddressPresentation();
    method public java.lang.CharSequence getCallerDisplayName();
    method public int getCallerDisplayNamePresentation();
    method public android.telecom.RemoteConference getConference();
    method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
    method public int getConnectionCapabilities();
    method public android.telecom.DisconnectCause getDisconnectCause();
    method public final android.os.Bundle getExtras();
    method public int getState();
    method public android.telecom.StatusHints getStatusHints();
    method public final android.telecom.RemoteConnection.VideoProvider getVideoProvider();
    method public int getVideoState();
    method public void hold();
    method public boolean isRingbackRequested();
    method public boolean isVoipAudioMode();
    method public void playDtmfTone(char);
    method public void postDialContinue(boolean);
    method public void pullExternalCall();
    method public void registerCallback(android.telecom.RemoteConnection.Callback);
    method public void registerCallback(android.telecom.RemoteConnection.Callback, android.os.Handler);
    method public void reject();
    method public void setCallAudioState(android.telecom.CallAudioState);
    method public void stopDtmfTone();
    method public void unhold();
    method public void unregisterCallback(android.telecom.RemoteConnection.Callback);
  }

  public static abstract class RemoteConnection.Callback {
    ctor public RemoteConnection.Callback();
    method public void onAddressChanged(android.telecom.RemoteConnection, android.net.Uri, int);
    method public void onCallerDisplayNameChanged(android.telecom.RemoteConnection, java.lang.String, int);
    method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
    method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
    method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConnection, int);
    method public void onConnectionEvent(android.telecom.RemoteConnection, java.lang.String, android.os.Bundle);
    method public void onDestroyed(android.telecom.RemoteConnection);
    method public void onDisconnected(android.telecom.RemoteConnection, android.telecom.DisconnectCause);
    method public void onExtrasChanged(android.telecom.RemoteConnection, android.os.Bundle);
    method public void onPostDialChar(android.telecom.RemoteConnection, char);
    method public void onPostDialWait(android.telecom.RemoteConnection, java.lang.String);
    method public void onRingbackRequested(android.telecom.RemoteConnection, boolean);
    method public void onStateChanged(android.telecom.RemoteConnection, int);
    method public void onStatusHintsChanged(android.telecom.RemoteConnection, android.telecom.StatusHints);
    method public void onVideoProviderChanged(android.telecom.RemoteConnection, android.telecom.RemoteConnection.VideoProvider);
    method public void onVideoStateChanged(android.telecom.RemoteConnection, int);
    method public void onVoipAudioChanged(android.telecom.RemoteConnection, boolean);
  }

  public static class RemoteConnection.VideoProvider {
    method public void registerCallback(android.telecom.RemoteConnection.VideoProvider.Callback);
    method public void requestCallDataUsage();
    method public void requestCameraCapabilities();
    method public void sendSessionModifyRequest(android.telecom.VideoProfile, android.telecom.VideoProfile);
    method public void sendSessionModifyResponse(android.telecom.VideoProfile);
    method public void setCamera(java.lang.String);
    method public void setDeviceOrientation(int);
    method public void setDisplaySurface(android.view.Surface);
    method public void setPauseImage(android.net.Uri);
    method public void setPreviewSurface(android.view.Surface);
    method public void setZoom(float);
    method public void unregisterCallback(android.telecom.RemoteConnection.VideoProvider.Callback);
  }

  public static abstract class RemoteConnection.VideoProvider.Callback {
    ctor public RemoteConnection.VideoProvider.Callback();
    method public void onCallDataUsageChanged(android.telecom.RemoteConnection.VideoProvider, long);
    method public void onCallSessionEvent(android.telecom.RemoteConnection.VideoProvider, int);
    method public void onCameraCapabilitiesChanged(android.telecom.RemoteConnection.VideoProvider, android.telecom.VideoProfile.CameraCapabilities);
    method public void onPeerDimensionsChanged(android.telecom.RemoteConnection.VideoProvider, int, int);
    method public void onSessionModifyRequestReceived(android.telecom.RemoteConnection.VideoProvider, android.telecom.VideoProfile);
    method public void onSessionModifyResponseReceived(android.telecom.RemoteConnection.VideoProvider, int, android.telecom.VideoProfile, android.telecom.VideoProfile);
    method public void onVideoQualityChanged(android.telecom.RemoteConnection.VideoProvider, int);
  }

  public final class StatusHints implements android.os.Parcelable {
    ctor public StatusHints(java.lang.CharSequence, android.graphics.drawable.Icon, android.os.Bundle);
    method public int describeContents();
    method public android.os.Bundle getExtras();
    method public android.graphics.drawable.Icon getIcon();
    method public java.lang.CharSequence getLabel();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.StatusHints> CREATOR;
  }

  public class TelecomManager {
    method public void addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle);
    method public void cancelMissedCallsNotification();
    method public android.content.Intent createManageBlockedNumbersIntent();
    method public android.net.Uri getAdnUriForPhoneAccount(android.telecom.PhoneAccountHandle);
    method public java.util.List<android.telecom.PhoneAccountHandle> getCallCapablePhoneAccounts();
    method public java.lang.String getDefaultDialerPackage();
    method public android.telecom.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
    method public java.lang.String getLine1Number(android.telecom.PhoneAccountHandle);
    method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle);
    method public android.telecom.PhoneAccountHandle getSimCallManager();
    method public java.lang.String getVoiceMailNumber(android.telecom.PhoneAccountHandle);
    method public boolean handleMmi(java.lang.String);
    method public boolean handleMmi(java.lang.String, android.telecom.PhoneAccountHandle);
    method public boolean isInCall();
    method public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, java.lang.String);
    method public deprecated void launchManageBlockedNumbersActivity();
    method public void placeCall(android.net.Uri, android.os.Bundle);
    method public void registerPhoneAccount(android.telecom.PhoneAccount);
    method public void showInCallScreen(boolean);
    method public void silenceRinger();
    method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
    field public static final java.lang.String ACTION_CHANGE_DEFAULT_DIALER = "android.telecom.action.CHANGE_DEFAULT_DIALER";
    field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
    field public static final java.lang.String ACTION_CONFIGURE_PHONE_ACCOUNT = "android.telecom.action.CONFIGURE_PHONE_ACCOUNT";
    field public static final java.lang.String ACTION_DEFAULT_DIALER_CHANGED = "android.telecom.action.DEFAULT_DIALER_CHANGED";
    field public static final java.lang.String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL";
    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_MISSED_CALLS_NOTIFICATION = "android.telecom.action.SHOW_MISSED_CALLS_NOTIFICATION";
    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_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
    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_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
    field public static final java.lang.String EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME = "android.telecom.extra.CHANGE_DEFAULT_DIALER_PACKAGE_NAME";
    field public static final java.lang.String EXTRA_INCOMING_CALL_ADDRESS = "android.telecom.extra.INCOMING_CALL_ADDRESS";
    field public static final java.lang.String EXTRA_INCOMING_CALL_EXTRAS = "android.telecom.extra.INCOMING_CALL_EXTRAS";
    field public static final java.lang.String EXTRA_NOTIFICATION_COUNT = "android.telecom.extra.NOTIFICATION_COUNT";
    field public static final java.lang.String EXTRA_NOTIFICATION_PHONE_NUMBER = "android.telecom.extra.NOTIFICATION_PHONE_NUMBER";
    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 java.lang.String METADATA_INCLUDE_EXTERNAL_CALLS = "android.telecom.INCLUDE_EXTERNAL_CALLS";
    field public static final java.lang.String METADATA_IN_CALL_SERVICE_RINGING = "android.telecom.IN_CALL_SERVICE_RINGING";
    field public static final java.lang.String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
    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 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);
    method public static boolean isVideo(int);
    method public static java.lang.String videoStateToString(int);
    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
    field public static final int STATE_AUDIO_ONLY = 0; // 0x0
    field public static final int STATE_BIDIRECTIONAL = 3; // 0x3
    field public static final int STATE_PAUSED = 4; // 0x4
    field public static final int STATE_RX_ENABLED = 2; // 0x2
    field public static final int STATE_TX_ENABLED = 1; // 0x1
  }

  public static final class VideoProfile.CameraCapabilities implements android.os.Parcelable {
    ctor public VideoProfile.CameraCapabilities(int, int);
    method public int describeContents();
    method public int getHeight();
    method public int getWidth();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.VideoProfile.CameraCapabilities> CREATOR;
  }

}

package android.telephony {

  public class CarrierConfigManager {
    method public android.os.PersistableBundle getConfig(int);
    method public android.os.PersistableBundle getConfig();
    method public deprecated android.os.PersistableBundle getConfigForSubId(int);
    method public void notifyConfigChanged(int);
    method public deprecated void notifyConfigChangedForSubId(int);
    field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
    field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls";
    field public static final java.lang.String BOOL_ALLOW_VIDEO_PAUSE = "bool_allow_video_pause";
    field public static final java.lang.String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
    field public static final java.lang.String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
    field public static final java.lang.String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool";
    field public static final java.lang.String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
    field public static final java.lang.String KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL = "allow_non_emergency_calls_in_ecm_bool";
    field public static final java.lang.String KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL = "always_show_emergency_alert_onoff_bool";
    field public static final java.lang.String KEY_APN_EXPAND_BOOL = "apn_expand_bool";
    field public static final java.lang.String KEY_AUTO_RETRY_ENABLED_BOOL = "auto_retry_enabled_bool";
    field public static final java.lang.String KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL = "carrier_allow_turnoff_ims_bool";
    field public static final java.lang.String KEY_CARRIER_FORCE_DISABLE_ETWS_CMAS_TEST_BOOL = "carrier_force_disable_etws_cmas_test_bool";
    field public static final java.lang.String KEY_CARRIER_IMS_GBA_REQUIRED_BOOL = "carrier_ims_gba_required_bool";
    field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL = "carrier_instant_lettering_available_bool";
    field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_ENCODING_STRING = "carrier_instant_lettering_encoding_string";
    field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING = "carrier_instant_lettering_escaped_chars_string";
    field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING = "carrier_instant_lettering_invalid_chars_string";
    field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_LENGTH_LIMIT_INT = "carrier_instant_lettering_length_limit_int";
    field public static final java.lang.String KEY_CARRIER_SETTINGS_ENABLE_BOOL = "carrier_settings_enable_bool";
    field public static final java.lang.String KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL = "carrier_use_ims_first_for_emergency_bool";
    field public static final java.lang.String KEY_CARRIER_VOLTE_AVAILABLE_BOOL = "carrier_volte_available_bool";
    field public static final java.lang.String KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL = "carrier_volte_provisioning_required_bool";
    field public static final java.lang.String KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL = "carrier_volte_tty_supported_bool";
    field public static final java.lang.String KEY_CARRIER_VT_AVAILABLE_BOOL = "carrier_vt_available_bool";
    field public static final java.lang.String KEY_CARRIER_VVM_PACKAGE_NAME_STRING = "carrier_vvm_package_name_string";
    field public static final java.lang.String KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL = "carrier_wfc_ims_available_bool";
    field public static final java.lang.String KEY_CDMA_DTMF_TONE_DELAY_INT = "cdma_dtmf_tone_delay_int";
    field public static final java.lang.String KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY = "cdma_nonroaming_networks_string_array";
    field public static final java.lang.String KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY = "cdma_roaming_networks_string_array";
    field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_BOOL = "ci_action_on_sys_update_bool";
    field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING = "ci_action_on_sys_update_extra_string";
    field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING = "ci_action_on_sys_update_extra_val_string";
    field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING = "ci_action_on_sys_update_intent_string";
    field public static final java.lang.String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool";
    field public static final java.lang.String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string";
    field public static final java.lang.String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool";
    field public static final java.lang.String KEY_DTMF_TYPE_ENABLED_BOOL = "dtmf_type_enabled_bool";
    field public static final java.lang.String KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT = "duration_blocking_disabled_after_emergency_int";
    field public static final java.lang.String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool";
    field public static final java.lang.String KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL = "enable_dialer_key_vibration_bool";
    field public static final java.lang.String KEY_FORCE_HOME_NETWORK_BOOL = "force_home_network_bool";
    field public static final java.lang.String KEY_GSM_DTMF_TONE_DELAY_INT = "gsm_dtmf_tone_delay_int";
    field public static final java.lang.String KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY = "gsm_nonroaming_networks_string_array";
    field public static final java.lang.String KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY = "gsm_roaming_networks_string_array";
    field public static final java.lang.String KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL = "has_in_call_noise_suppression_bool";
    field public static final java.lang.String KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL = "hide_carrier_network_settings_bool";
    field public static final java.lang.String KEY_HIDE_IMS_APN_BOOL = "hide_ims_apn_bool";
    field public static final java.lang.String KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL = "hide_preferred_network_type_bool";
    field public static final java.lang.String KEY_HIDE_SIM_LOCK_SETTINGS_BOOL = "hide_sim_lock_settings_bool";
    field public static final java.lang.String KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL = "ignore_sim_network_locked_events_bool";
    field public static final java.lang.String KEY_IMS_DTMF_TONE_DELAY_INT = "ims_dtmf_tone_delay_int";
    field public static final java.lang.String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
    field public static final java.lang.String KEY_MMS_ALIAS_MAX_CHARS_INT = "aliasMaxChars";
    field public static final java.lang.String KEY_MMS_ALIAS_MIN_CHARS_INT = "aliasMinChars";
    field public static final java.lang.String KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL = "allowAttachAudio";
    field public static final java.lang.String KEY_MMS_APPEND_TRANSACTION_ID_BOOL = "enabledTransID";
    field public static final java.lang.String KEY_MMS_EMAIL_GATEWAY_NUMBER_STRING = "emailGatewayNumber";
    field public static final java.lang.String KEY_MMS_GROUP_MMS_ENABLED_BOOL = "enableGroupMms";
    field public static final java.lang.String KEY_MMS_HTTP_PARAMS_STRING = "httpParams";
    field public static final java.lang.String KEY_MMS_HTTP_SOCKET_TIMEOUT_INT = "httpSocketTimeout";
    field public static final java.lang.String KEY_MMS_MAX_IMAGE_HEIGHT_INT = "maxImageHeight";
    field public static final java.lang.String KEY_MMS_MAX_IMAGE_WIDTH_INT = "maxImageWidth";
    field public static final java.lang.String KEY_MMS_MAX_MESSAGE_SIZE_INT = "maxMessageSize";
    field public static final java.lang.String KEY_MMS_MESSAGE_TEXT_MAX_SIZE_INT = "maxMessageTextSize";
    field public static final java.lang.String KEY_MMS_MMS_DELIVERY_REPORT_ENABLED_BOOL = "enableMMSDeliveryReports";
    field public static final java.lang.String KEY_MMS_MMS_ENABLED_BOOL = "enabledMMS";
    field public static final java.lang.String KEY_MMS_MMS_READ_REPORT_ENABLED_BOOL = "enableMMSReadReports";
    field public static final java.lang.String KEY_MMS_MULTIPART_SMS_ENABLED_BOOL = "enableMultipartSMS";
    field public static final java.lang.String KEY_MMS_NAI_SUFFIX_STRING = "naiSuffix";
    field public static final java.lang.String KEY_MMS_NOTIFY_WAP_MMSC_ENABLED_BOOL = "enabledNotifyWapMMSC";
    field public static final java.lang.String KEY_MMS_RECIPIENT_LIMIT_INT = "recipientLimit";
    field public static final java.lang.String KEY_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_BOOL = "sendMultipartSmsAsSeparateMessages";
    field public static final java.lang.String KEY_MMS_SHOW_CELL_BROADCAST_APP_LINKS_BOOL = "config_cellBroadcastAppLinks";
    field public static final java.lang.String KEY_MMS_SMS_DELIVERY_REPORT_ENABLED_BOOL = "enableSMSDeliveryReports";
    field public static final java.lang.String KEY_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_INT = "smsToMmsTextLengthThreshold";
    field public static final java.lang.String KEY_MMS_SMS_TO_MMS_TEXT_THRESHOLD_INT = "smsToMmsTextThreshold";
    field public static final java.lang.String KEY_MMS_SUBJECT_MAX_LENGTH_INT = "maxSubjectLength";
    field public static final java.lang.String KEY_MMS_SUPPORT_HTTP_CHARSET_HEADER_BOOL = "supportHttpCharsetHeader";
    field public static final java.lang.String KEY_MMS_SUPPORT_MMS_CONTENT_DISPOSITION_BOOL = "supportMmsContentDisposition";
    field public static final java.lang.String KEY_MMS_UA_PROF_TAG_NAME_STRING = "uaProfTagName";
    field public static final java.lang.String KEY_MMS_UA_PROF_URL_STRING = "uaProfUrl";
    field public static final java.lang.String KEY_MMS_USER_AGENT_STRING = "userAgent";
    field public static final java.lang.String KEY_OPERATOR_SELECTION_EXPAND_BOOL = "operator_selection_expand_bool";
    field public static final java.lang.String KEY_PREFER_2G_BOOL = "prefer_2g_bool";
    field public static final java.lang.String KEY_REQUIRE_ENTITLEMENT_CHECKS_BOOL = "require_entitlement_checks_bool";
    field public static final java.lang.String KEY_SHOW_APN_SETTING_CDMA_BOOL = "show_apn_setting_cdma_bool";
    field public static final java.lang.String KEY_SHOW_CDMA_CHOICES_BOOL = "show_cdma_choices_bool";
    field public static final java.lang.String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL = "show_onscreen_dial_button_bool";
    field public static final java.lang.String KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL = "sim_network_unlock_allow_dismiss_bool";
    field public static final java.lang.String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
    field public static final java.lang.String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
    field public static final java.lang.String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
    field public static final java.lang.String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
    field public static final java.lang.String KEY_USE_OTASP_FOR_PROVISIONING_BOOL = "use_otasp_for_provisioning_bool";
    field public static final java.lang.String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
    field public static final java.lang.String KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL = "voicemail_notification_persistent_bool";
    field public static final java.lang.String KEY_VOICE_PRIVACY_DISABLE_UI_BOOL = "voice_privacy_disable_ui_bool";
    field public static final java.lang.String KEY_VOLTE_REPLACEMENT_RAT_INT = "volte_replacement_rat_int";
    field public static final java.lang.String KEY_VVM_CELLULAR_DATA_REQUIRED_BOOLEAN = "vvm_cellular_data_required";
    field public static final java.lang.String KEY_VVM_DESTINATION_NUMBER_STRING = "vvm_destination_number_string";
    field public static final java.lang.String KEY_VVM_PORT_NUMBER_INT = "vvm_port_number_int";
    field public static final java.lang.String KEY_VVM_PREFETCH_BOOLEAN = "vvm_prefetch";
    field public static final java.lang.String KEY_VVM_TYPE_STRING = "vvm_type_string";
    field public static final java.lang.String KEY_WORLD_PHONE_BOOL = "world_phone_bool";
  }

  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 getArfcn();
    method public int getBsic();
    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 getEarfcn();
    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 int getUarfcn();
    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();
    field public static final int SIGNAL_STRENGTH_GOOD = 3; // 0x3
    field public static final int SIGNAL_STRENGTH_GREAT = 4; // 0x4
    field public static final int SIGNAL_STRENGTH_MODERATE = 2; // 0x2
    field public static final int SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0; // 0x0
    field public static final int SIGNAL_STRENGTH_POOR = 1; // 0x1
  }

  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 addTtsSpan(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 android.text.style.TtsSpan createTtsSpan(java.lang.String);
    method public static java.lang.CharSequence createTtsSpannable(java.lang.CharSequence);
    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 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 int getLevel();
    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_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader";
    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 deprecated android.telephony.SmsMessage createFromPdu(byte[]);
    method public static android.telephony.SmsMessage createFromPdu(byte[], java.lang.String);
    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 static int getDefaultDataSubscriptionId();
    method public static int getDefaultSmsSubscriptionId();
    method public static int getDefaultSubscriptionId();
    method public static int getDefaultVoiceSubscriptionId();
    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
    field public static final int INVALID_SUBSCRIPTION_ID = -1; // 0xffffffff
  }

  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 int getCallState(int);
    method public android.telephony.CellLocation getCellLocation();
    method public int getDataActivity();
    method public int getDataNetworkType(int);
    method public int getDataState();
    method public java.lang.String getDeviceId();
    method public java.lang.String getDeviceId(int);
    method public java.lang.String getDeviceSoftwareVersion();
    method public java.lang.String getGroupIdLevel1();
    method public java.lang.String getGroupIdLevel1(int);
    method public java.lang.String getIccSimChallengeResponse(int, java.lang.String);
    method public java.lang.String getLine1AlphaTag(int);
    method public java.lang.String getLine1Number();
    method public java.lang.String getLine1Number(int);
    method public java.lang.String getMmsUAProfUrl();
    method public java.lang.String getMmsUserAgent();
    method public deprecated java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
    method public java.lang.String getNetworkCountryIso();
    method public java.lang.String getNetworkCountryIso(int);
    method public java.lang.String getNetworkOperator();
    method public java.lang.String getNetworkOperator(int);
    method public java.lang.String getNetworkOperatorName();
    method public java.lang.String getNetworkOperatorName(int);
    method public int getNetworkType();
    method public int getNetworkType(int);
    method public int getPhoneCount();
    method public int getPhoneType();
    method public java.lang.String getSimCountryIso();
    method public java.lang.String getSimCountryIso(int);
    method public java.lang.String getSimOperator();
    method public java.lang.String getSimOperator(int);
    method public java.lang.String getSimOperatorName();
    method public java.lang.String getSimOperatorName(int);
    method public java.lang.String getSimSerialNumber();
    method public java.lang.String getSimSerialNumber(int);
    method public int getSimState();
    method public java.lang.String getSubscriberId();
    method public java.lang.String getSubscriberId(int);
    method public java.lang.String getVoiceMailAlphaTag();
    method public java.lang.String getVoiceMailAlphaTag(int);
    method public java.lang.String getVoiceMailNumber();
    method public java.lang.String getVoiceMailNumber(int);
    method public int getVoiceNetworkType(int);
    method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle);
    method public boolean hasCarrierPrivileges();
    method public boolean hasCarrierPrivileges(int);
    method public boolean hasIccCard();
    method public boolean iccCloseLogicalChannel(int);
    method public boolean iccCloseLogicalChannel(int, int);
    method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
    method public byte[] iccExchangeSimIO(int, int, int, int, int, int, java.lang.String);
    method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
    method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(int, java.lang.String);
    method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
    method public java.lang.String iccTransmitApduBasicChannel(int, 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 java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, int, java.lang.String);
    method public boolean isHearingAidCompatibilitySupported();
    method public boolean isNetworkRoaming();
    method public boolean isNetworkRoaming(int);
    method public boolean isSmsCapable();
    method public boolean isTtyModeSupported();
    method public boolean isVoiceCapable();
    method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
    method public boolean isWorldPhone();
    method public void listen(android.telephony.PhoneStateListener, int);
    method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
    method public java.lang.String sendEnvelopeWithStatus(int, java.lang.String);
    method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
    method public boolean setLine1NumberForDisplay(int, java.lang.String, java.lang.String);
    method public boolean setOperatorBrandOverride(java.lang.String);
    method public boolean setOperatorBrandOverride(int, java.lang.String);
    method public boolean setPreferredNetworkTypeToGlobal();
    method public boolean setPreferredNetworkTypeToGlobal(int);
    method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
    method public boolean setVoiceMailNumber(int, java.lang.String, java.lang.String);
    field public static final java.lang.String ACTION_CONFIGURE_VOICEMAIL = "android.telephony.action.CONFIGURE_VOICEMAIL";
    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
    field public static final java.lang.String VVM_TYPE_CVVM = "vvm_type_cvvm";
    field public static final java.lang.String VVM_TYPE_OMTP = "vvm_type_omtp";
  }

}

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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated class FlakyTest implements java.lang.annotation.Annotation {
  }

  public deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated 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 deprecated interface TestSuiteProvider {
    method public abstract junit.framework.TestSuite getTestSuite();
  }

  public deprecated 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 deprecated class UiThreadTest implements java.lang.annotation.Annotation {
  }

  public deprecated 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 deprecated class MockApplication extends android.app.Application {
    ctor public MockApplication();
  }

  public deprecated 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 deprecated 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 deprecated 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 createDeviceEncryptedStorageContext();
    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 boolean deleteSharedPreferences(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 getDataDir();
    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 android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    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 boolean isDeviceEncryptedStorage();
    method public boolean migrateDatabaseFrom(android.content.Context, java.lang.String);
    method public boolean migrateSharedPreferencesFrom(android.content.Context, java.lang.String);
    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 deprecated 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 deprecated class MockDialogInterface implements android.content.DialogInterface {
    ctor public MockDialogInterface();
    method public void cancel();
    method public void dismiss();
  }

  public deprecated 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 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 int[] getPackageGids(java.lang.String, int) 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 int getPackageUid(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    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 hasSystemFeature(java.lang.String, int);
    method public boolean isPermissionRevokedByPolicy(java.lang.String, 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 void setInstallerPackageName(java.lang.String, java.lang.String);
    method public void verifyPendingInstall(int, int);
  }

  public deprecated 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 deprecated class LargeTest implements java.lang.annotation.Annotation {
  }

  public abstract deprecated class MediumTest implements java.lang.annotation.Annotation {
  }

  public abstract deprecated class SmallTest implements java.lang.annotation.Annotation {
  }

  public abstract deprecated class Smoke implements java.lang.annotation.Annotation {
  }

  public abstract deprecated 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 deprecated android.text.Spanned fromHtml(java.lang.String);
    method public static android.text.Spanned fromHtml(java.lang.String, int);
    method public static deprecated android.text.Spanned fromHtml(java.lang.String, android.text.Html.ImageGetter, android.text.Html.TagHandler);
    method public static android.text.Spanned fromHtml(java.lang.String, int, android.text.Html.ImageGetter, android.text.Html.TagHandler);
    method public static deprecated java.lang.String toHtml(android.text.Spanned);
    method public static java.lang.String toHtml(android.text.Spanned, int);
    field public static final int FROM_HTML_MODE_COMPACT = 63; // 0x3f
    field public static final int FROM_HTML_MODE_LEGACY = 0; // 0x0
    field public static final int FROM_HTML_OPTION_USE_CSS_COLORS = 256; // 0x100
    field public static final int FROM_HTML_SEPARATOR_LINE_BREAK_BLOCKQUOTE = 32; // 0x20
    field public static final int FROM_HTML_SEPARATOR_LINE_BREAK_DIV = 16; // 0x10
    field public static final int FROM_HTML_SEPARATOR_LINE_BREAK_HEADING = 2; // 0x2
    field public static final int FROM_HTML_SEPARATOR_LINE_BREAK_LIST = 8; // 0x8
    field public static final int FROM_HTML_SEPARATOR_LINE_BREAK_LIST_ITEM = 4; // 0x4
    field public static final int FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH = 1; // 0x1
    field public static final int TO_HTML_PARAGRAPH_LINES_CONSECUTIVE = 0; // 0x0
    field public static final int TO_HTML_PARAGRAPH_LINES_INDIVIDUAL = 1; // 0x1
  }

  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
    field public static final int HYPHENATION_FREQUENCY_FULL = 2; // 0x2
    field public static final int HYPHENATION_FREQUENCY_NONE = 0; // 0x0
    field public static final int HYPHENATION_FREQUENCY_NORMAL = 1; // 0x1
  }

  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 static final class StaticLayout.Builder {
    method public android.text.StaticLayout build();
    method public static android.text.StaticLayout.Builder obtain(java.lang.CharSequence, int, int, android.text.TextPaint, int);
    method public android.text.StaticLayout.Builder setAlignment(android.text.Layout.Alignment);
    method public android.text.StaticLayout.Builder setBreakStrategy(int);
    method public android.text.StaticLayout.Builder setEllipsize(android.text.TextUtils.TruncateAt);
    method public android.text.StaticLayout.Builder setEllipsizedWidth(int);
    method public android.text.StaticLayout.Builder setHyphenationFrequency(int);
    method public android.text.StaticLayout.Builder setIncludePad(boolean);
    method public android.text.StaticLayout.Builder setIndents(int[], int[]);
    method public android.text.StaticLayout.Builder setLineSpacing(float, float);
    method public android.text.StaticLayout.Builder setMaxLines(int);
    method public android.text.StaticLayout.Builder setText(java.lang.CharSequence);
    method public android.text.StaticLayout.Builder setTextDirection(android.text.TextDirectionHeuristic);
  }

  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 deprecated 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 deprecated 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 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.util.LocaleList);
    ctor public LocaleSpan(android.os.Parcel);
    method public int describeContents();
    method public java.util.Locale getLocale();
    method public android.util.LocaleList getLocales();
    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 deprecated java.lang.String getLocale();
    method public java.util.Locale getLocaleObject();
    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 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 boolean isTransitionRequired(android.transition.TransitionValues, android.transition.TransitionValues);
    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<K, V>);
    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 final class ArraySet implements java.util.Collection java.util.Set {
    ctor public ArraySet();
    ctor public ArraySet(int);
    ctor public ArraySet(android.util.ArraySet<E>);
    method public boolean add(E);
    method public void addAll(android.util.ArraySet<? extends 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 void ensureCapacity(int);
    method public int indexOf(java.lang.Object);
    method public boolean isEmpty();
    method public java.util.Iterator<E> iterator();
    method public boolean remove(java.lang.Object);
    method public boolean removeAll(android.util.ArraySet<? extends E>);
    method public boolean removeAll(java.util.Collection<?>);
    method public E removeAt(int);
    method public boolean retainAll(java.util.Collection<?>);
    method public int size();
    method public java.lang.Object[] toArray();
    method public T[] toArray(T[]);
    method public E valueAt(int);
  }

  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_360 = 360; // 0x168
    field public static final int DENSITY_400 = 400; // 0x190
    field public static final int DENSITY_420 = 420; // 0x1a4
    field public static final int DENSITY_560 = 560; // 0x230
    field public static final int DENSITY_DEFAULT = 160; // 0xa0
    field public static final int DENSITY_DEVICE_STABLE;
    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, float);
    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 {
  }

  public abstract class FloatProperty extends android.util.Property {
    ctor public FloatProperty(java.lang.String);
    method public final void set(T, java.lang.Float);
    method public abstract void setValue(T, float);
  }

  public abstract class IntProperty extends android.util.Property {
    ctor public IntProperty(java.lang.String);
    method public final void set(T, java.lang.Integer);
    method public abstract void setValue(T, int);
  }

  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 LocaleList implements android.os.Parcelable {
    ctor public LocaleList();
    ctor public LocaleList(java.util.Locale);
    ctor public LocaleList(java.util.Locale[]);
    method public int describeContents();
    method public static android.util.LocaleList forLanguageTags(java.lang.String);
    method public java.util.Locale get(int);
    method public static android.util.LocaleList getAdjustedDefault();
    method public static android.util.LocaleList getDefault();
    method public static android.util.LocaleList getEmptyLocaleList();
    method public java.util.Locale getFirstMatch(java.lang.String[]);
    method public int indexOf(java.util.Locale);
    method public boolean isEmpty();
    method public static void setDefault(android.util.LocaleList);
    method public int size();
    method public java.lang.String toLanguageTags();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.util.LocaleList> CREATOR;
  }

  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 deprecated 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 void hide(long);
    method public abstract void invalidate();
    method public void invalidateContentRect();
    method public boolean isTitleOptional();
    method public void onWindowFocusChanged(boolean);
    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 DEFAULT_HIDE_DURATION = -1; // 0xffffffff
    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 android.view.Display.Mode getMode();
    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 android.view.Display.Mode[] getSupportedModes();
    method public deprecated 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_ROUND = 16; // 0x10
    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 INVALID_DISPLAY = -1; // 0xffffffff
    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 static final class Display.Mode implements android.os.Parcelable {
    method public int describeContents();
    method public int getModeId();
    method public int getPhysicalHeight();
    method public int getPhysicalWidth();
    method public float getRefreshRate();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.Display.Mode> CREATOR;
  }

  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 final class DropPermissions {
    method public void release();
  }

  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 final class FrameMetrics {
    ctor public FrameMetrics(android.view.FrameMetrics);
    method public long getMetric(int);
    field public static final int ANIMATION_DURATION = 2; // 0x2
    field public static final int COMMAND_ISSUE_DURATION = 6; // 0x6
    field public static final int DRAW_DURATION = 4; // 0x4
    field public static final int FIRST_DRAW_FRAME = 9; // 0x9
    field public static final int INPUT_HANDLING_DURATION = 1; // 0x1
    field public static final int LAYOUT_MEASURE_DURATION = 3; // 0x3
    field public static final int SWAP_BUFFERS_DURATION = 7; // 0x7
    field public static final int SYNC_DURATION = 5; // 0x5
    field public static final int TOTAL_DURATION = 8; // 0x8
    field public static final int UNKNOWN_DELAY_DURATION = 0; // 0x0
  }

  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 onGenericMotionEvent(android.view.MotionEvent);
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public void setContextClickListener(android.view.GestureDetector.OnContextClickListener);
    method public void setIsLongpressEnabled(boolean);
    method public void setOnDoubleTapListener(android.view.GestureDetector.OnDoubleTapListener);
  }

  public static abstract interface GestureDetector.OnContextClickListener {
    method public abstract boolean onContextClick(android.view.MotionEvent);
  }

  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.OnContextClickListener android.view.GestureDetector.OnDoubleTapListener android.view.GestureDetector.OnGestureListener {
    ctor public GestureDetector.SimpleOnGestureListener();
    method public boolean onContextClick(android.view.MotionEvent);
    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 CONTEXT_CLICK = 6; // 0x6
    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 hasMicrophone();
    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_BLUETOOTH_STYLUS = 49154; // 0xc002
    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_COPY = 278; // 0x116
    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_CUT = 277; // 0x115
    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_DOWN_LEFT = 269; // 0x10d
    field public static final int KEYCODE_DPAD_DOWN_RIGHT = 271; // 0x10f
    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_DPAD_UP_LEFT = 268; // 0x10c
    field public static final int KEYCODE_DPAD_UP_RIGHT = 270; // 0x10e
    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_SKIP_BACKWARD = 273; // 0x111
    field public static final int KEYCODE_MEDIA_SKIP_FORWARD = 272; // 0x110
    field public static final int KEYCODE_MEDIA_STEP_BACKWARD = 275; // 0x113
    field public static final int KEYCODE_MEDIA_STEP_FORWARD = 274; // 0x112
    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_NAVIGATE_IN = 262; // 0x106
    field public static final int KEYCODE_NAVIGATE_NEXT = 261; // 0x105
    field public static final int KEYCODE_NAVIGATE_OUT = 263; // 0x107
    field public static final int KEYCODE_NAVIGATE_PREVIOUS = 260; // 0x104
    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_PASTE = 279; // 0x117
    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_SOFT_SLEEP = 276; // 0x114
    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_STEM_1 = 265; // 0x109
    field public static final int KEYCODE_STEM_2 = 266; // 0x10a
    field public static final int KEYCODE_STEM_3 = 267; // 0x10b
    field public static final int KEYCODE_STEM_PRIMARY = 264; // 0x108
    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 final class KeyboardShortcutGroup implements android.os.Parcelable {
    ctor public KeyboardShortcutGroup(java.lang.CharSequence, java.util.List<android.view.KeyboardShortcutInfo>);
    ctor public KeyboardShortcutGroup(java.lang.CharSequence);
    method public void addItem(android.view.KeyboardShortcutInfo);
    method public int describeContents();
    method public java.util.List<android.view.KeyboardShortcutInfo> getItems();
    method public java.lang.CharSequence getLabel();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.KeyboardShortcutGroup> CREATOR;
  }

  public final class KeyboardShortcutInfo implements android.os.Parcelable {
    ctor public KeyboardShortcutInfo(java.lang.CharSequence, char, int);
    method public int describeContents();
    method public char getBaseCharacter();
    method public java.lang.CharSequence getLabel();
    method public int getModifiers();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.KeyboardShortcutInfo> CREATOR;
  }

  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 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 getActionButton();
    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_BUTTON_PRESS = 11; // 0xb
    field public static final int ACTION_BUTTON_RELEASE = 12; // 0xc
    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_RELATIVE_X = 27; // 0x1b
    field public static final int AXIS_RELATIVE_Y = 28; // 0x1c
    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_STYLUS_PRIMARY = 32; // 0x20
    field public static final int BUTTON_STYLUS_SECONDARY = 64; // 0x40
    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 final class PointerIcon implements android.os.Parcelable {
    method public static android.view.PointerIcon createCustomIcon(android.graphics.Bitmap, float, float);
    method public int describeContents();
    method public static android.view.PointerIcon getSystemIcon(android.content.Context, int);
    method public static android.view.PointerIcon loadCustomIcon(android.content.res.Resources, int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.PointerIcon> CREATOR;
    field public static final int STYLE_ALIAS = 1010; // 0x3f2
    field public static final int STYLE_ALL_SCROLL = 1013; // 0x3f5
    field public static final int STYLE_ARROW = 1000; // 0x3e8
    field public static final int STYLE_CELL = 1006; // 0x3ee
    field public static final int STYLE_CONTEXT_MENU = 1001; // 0x3e9
    field public static final int STYLE_COPY = 1011; // 0x3f3
    field public static final int STYLE_CROSSHAIR = 1007; // 0x3ef
    field public static final int STYLE_DEFAULT = 1000; // 0x3e8
    field public static final int STYLE_GRAB = 1020; // 0x3fc
    field public static final int STYLE_GRABBING = 1021; // 0x3fd
    field public static final int STYLE_HAND = 1002; // 0x3ea
    field public static final int STYLE_HELP = 1003; // 0x3eb
    field public static final int STYLE_HORIZONTAL_DOUBLE_ARROW = 1014; // 0x3f6
    field public static final int STYLE_NO_DROP = 1012; // 0x3f4
    field public static final int STYLE_NULL = 0; // 0x0
    field public static final int STYLE_TEXT = 1008; // 0x3f0
    field public static final int STYLE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW = 1017; // 0x3f9
    field public static final int STYLE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW = 1016; // 0x3f8
    field public static final int STYLE_VERTICAL_DOUBLE_ARROW = 1015; // 0x3f7
    field public static final int STYLE_VERTICAL_TEXT = 1009; // 0x3f1
    field public static final int STYLE_WAIT = 1004; // 0x3ec
    field public static final int STYLE_ZOOM_IN = 1018; // 0x3fa
    field public static final int STYLE_ZOOM_OUT = 1019; // 0x3fb
  }

  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 isStylusScaleEnabled();
    method public boolean onTouchEvent(android.view.MotionEvent);
    method public void setQuickScaleEnabled(boolean);
    method public void setStylusScaleEnabled(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 {
    ctor public SearchEvent(android.view.InputDevice);
    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 final void cancelDragAndDrop();
    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 dispatchProvideStructure(android.view.ViewStructure);
    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 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 boolean getClipBounds(android.graphics.Rect);
    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.view.PointerIcon getPointerIcon(android.view.MotionEvent, float, float);
    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 int getScrollIndicators();
    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 hasPointerCapture();
    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 isContextClickable();
    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 onProvideStructure(android.view.ViewStructure);
    method public void onProvideVirtualStructure(android.view.ViewStructure);
    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 public void onVisibilityAggregated(android.view.View, int);
    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 performContextClick();
    method public boolean performHapticFeedback(int);
    method public boolean performHapticFeedback(int, int);
    method public boolean performLongClick();
    method public boolean performLongClick(float, float);
    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 void releasePointerCapture();
    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 setContextClickable(boolean);
    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 setOnContextClickListener(android.view.View.OnContextClickListener);
    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 setPointerCapture();
    method public void setPointerIcon(android.view.PointerIcon);
    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 setScrollIndicators(int);
    method public void setScrollIndicators(int, int);
    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 boolean showContextMenu(float, float);
    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 deprecated boolean startDrag(android.content.ClipData, android.view.View.DragShadowBuilder, java.lang.Object, int);
    method public final boolean startDragAndDrop(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 public final void updateDragShadow(android.view.View.DragShadowBuilder);
    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 DRAG_FLAG_GLOBAL = 256; // 0x100
    field public static final int DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION = 64; // 0x40
    field public static final int DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION = 128; // 0x80
    field public static final int DRAG_FLAG_GLOBAL_URI_READ = 1; // 0x1
    field public static final int DRAG_FLAG_GLOBAL_URI_WRITE = 2; // 0x2
    field public static final int DRAG_FLAG_OPAQUE = 512; // 0x200
    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 public static final int SCROLL_INDICATOR_BOTTOM = 2; // 0x2
    field public static final int SCROLL_INDICATOR_END = 32; // 0x20
    field public static final int SCROLL_INDICATOR_LEFT = 4; // 0x4
    field public static final int SCROLL_INDICATOR_RIGHT = 8; // 0x8
    field public static final int SCROLL_INDICATOR_START = 16; // 0x10
    field public static final int SCROLL_INDICATOR_TOP = 1; // 0x1
    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_FIRST_STRONG_LTR = 6; // 0x6
    field public static final int TEXT_DIRECTION_FIRST_STRONG_RTL = 7; // 0x7
    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.OnContextClickListener {
    method public abstract boolean onContextClick(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 class ViewConfiguration {
    ctor public deprecated ViewConfiguration();
    method public static android.view.ViewConfiguration get(android.content.Context);
    method public static long getDefaultActionModeHideDuration();
    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 onViewAdded(android.view.View);
    method public void onViewRemoved(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 boolean showContextMenuForChild(android.view.View, float, float);
    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 boolean showContextMenuForChild(android.view.View, float, float);
    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 abstract class ViewStructure {
    ctor public ViewStructure();
    method public abstract int addChildCount(int);
    method public abstract void asyncCommit();
    method public abstract android.view.ViewStructure asyncNewChild(int);
    method public abstract int getChildCount();
    method public abstract android.os.Bundle getExtras();
    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 boolean hasExtras();
    method public abstract android.view.ViewStructure newChild(int);
    method public abstract void setAccessibilityFocused(boolean);
    method public abstract void setActivated(boolean);
    method public abstract void setAlpha(float);
    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 setContextClickable(boolean);
    method public abstract void setDimens(int, int, int, int, int, int);
    method public abstract void setElevation(float);
    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 setTextLines(int[], int[]);
    method public abstract void setTextStyle(float, int, int, int);
    method public abstract void setTransformation(android.graphics.Matrix);
    method public abstract void setVisibility(int);
  }

  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 final void addFrameMetricsListener(android.view.Window.FrameMetricsListener, android.os.Handler);
    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 final void removeFrameMetricsListener(android.view.Window.FrameMetricsListener);
    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 public abstract void setDecorCaptionShade(int);
    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 abstract void setResizingCaptionDrawable(android.graphics.drawable.Drawable);
    method public final void setRestrictedCaptionAreaListener(android.view.Window.OnRestrictedCaptionAreaChangedListener);
    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 public static final int DECOR_CAPTION_SHADE_AUTO = 0; // 0x0
    field public static final int DECOR_CAPTION_SHADE_DARK = 2; // 0x2
    field public static final int DECOR_CAPTION_SHADE_LIGHT = 1; // 0x1
    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 deprecated 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 deprecated 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 deprecated int PROGRESS_END = 10000; // 0x2710
    field public static final deprecated int PROGRESS_INDETERMINATE_OFF = -4; // 0xfffffffc
    field public static final deprecated int PROGRESS_INDETERMINATE_ON = -3; // 0xfffffffd
    field public static final deprecated int PROGRESS_SECONDARY_END = 30000; // 0x7530
    field public static final deprecated int PROGRESS_SECONDARY_START = 20000; // 0x4e20
    field public static final deprecated int PROGRESS_START = 0; // 0x0
    field public static final deprecated int PROGRESS_VISIBILITY_OFF = -2; // 0xfffffffe
    field public static final deprecated 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 void onProvideKeyboardShortcuts(java.util.List<android.view.KeyboardShortcutGroup>, 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 static abstract interface Window.FrameMetricsListener {
    method public abstract void onMetricsAvailable(android.view.Window, android.view.FrameMetrics, int);
  }

  public static abstract interface Window.OnRestrictedCaptionAreaChangedListener {
    method public abstract void onRestrictedCaptionAreaChanged(android.graphics.Rect);
  }

  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 int preferredDisplayModeId;
    field public deprecated 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_ASSIST_READING_CONTEXT = 16777216; // 0x1000000
    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_CONTEXT_CLICKED = 8388608; // 0x800000
    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 int getDrawingOrder();
    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 isContextClickable();
    method public boolean isDismissable();
    method public boolean isEditable();
    method public boolean isEnabled();
    method public boolean isFocusable();
    method public boolean isFocused();
    method public boolean isImportantForAccessibility();
    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 setContextClickable(boolean);
    method public void setDismissable(boolean);
    method public void setDrawingOrder(int);
    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 setImportantForAccessibility(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_CLICK_CHARACTER_INDEX_INT = "android.view.accessibility.action.ARGUMENT_CLICK_CHARACTER_INDEX_INT";
    field public static final java.lang.String ACTION_ARGUMENT_CLICK_SPAN_INDEX_INT = "android.view.accessibility.action.ARGUMENT_CLICK_SPAN_INDEX_INT";
    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_PROGRESS_VALUE = "android.view.accessibility.action.ARGUMENT_PROGRESS_VALUE";
    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_CONTEXT_CLICK;
    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_DOWN;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_FORWARD;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_LEFT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_RIGHT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_TO_POSITION;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_UP;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SELECT;
    field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SET_PROGRESS;
    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_SPLIT_SCREEN_DIVIDER = 5; // 0x5
    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 deleteSurroundingTextInCodePoints(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 android.os.Handler getHandler();
    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 android.util.LocaleList hintLocales;
    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 deleteSurroundingTextInCodePoints(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 android.os.Handler getHandler();
    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 deleteSurroundingTextInCodePoints(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 android.os.Handler getHandler();
    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 dispatchKeyEventFromInputMethod(android.view.View, android.view.KeyEvent);
    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 getLanguageTag();
    method public deprecated 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 setLanguageTag(java.lang.String);
    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 deprecated 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 getLanguageTag();
    method public deprecated 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_MIDI_SYSEX = "android.webkit.resource.MIDI_SYSEX";
    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 ServiceWorkerClient {
    ctor public ServiceWorkerClient();
    method public android.webkit.WebResourceResponse shouldInterceptRequest(android.webkit.WebResourceRequest);
  }

  public abstract class ServiceWorkerController {
    ctor public ServiceWorkerController();
    method public static android.webkit.ServiceWorkerController getInstance();
    method public abstract android.webkit.ServiceWorkerWebSettings getServiceWorkerWebSettings();
    method public abstract void setServiceWorkerClient(android.webkit.ServiceWorkerClient);
  }

  public abstract class ServiceWorkerWebSettings {
    ctor public ServiceWorkerWebSettings();
    method public abstract boolean getAllowContentAccess();
    method public abstract boolean getAllowFileAccess();
    method public abstract boolean getBlockNetworkLoads();
    method public abstract int getCacheMode();
    method public abstract void setAllowContentAccess(boolean);
    method public abstract void setAllowFileAccess(boolean);
    method public abstract void setBlockNetworkLoads(boolean);
    method public abstract void setCacheMode(int);
  }

  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 {
    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 {
    method public abstract java.lang.CharSequence 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();
    method public abstract boolean isRedirect();
  }

  public class WebResourceResponse {
    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 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 int getDisabledActionModeMenuItems();
    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 setDisabledActionModeMenuItems(int);
    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 deprecated 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 MENU_ITEM_NONE = 0; // 0x0
    field public static final int MENU_ITEM_PROCESS_TEXT = 4; // 0x4
    field public static final int MENU_ITEM_SHARE = 1; // 0x1
    field public static final int MENU_ITEM_WEB_SEARCH = 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 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 deprecated boolean overlayHorizontalScrollbar();
    method public deprecated boolean overlayVerticalScrollbar();
    method public boolean pageDown(boolean);
    method public boolean pageUp(boolean);
    method public void pauseTimers();
    method public void postUrl(java.lang.String, byte[]);
    method public void postVisualStateCallback(long, android.webkit.WebView.VisualStateCallback);
    method public void postWebMessage(android.webkit.WebMessage, android.net.Uri);
    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 deprecated 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 deprecated 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.WebResourceResponse);
    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 deprecated boolean shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String);
    method public boolean shouldOverrideUrlLoading(android.webkit.WebView, android.webkit.WebResourceRequest);
    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 android.graphics.drawable.Drawable getTickMark();
    method public android.content.res.ColorStateList getTickMarkTintList();
    method public android.graphics.PorterDuff.Mode getTickMarkTintMode();
    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);
    method public void setTickMark(android.graphics.drawable.Drawable);
    method public void setTickMarkTintList(android.content.res.ColorStateList);
    method public void setTickMarkTintMode(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 android.graphics.drawable.Drawable getOverflowIcon();
    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 setOverflowIcon(android.graphics.drawable.Drawable);
    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.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);
    ctor public AutoCompleteTextView(android.content.Context, android.util.AttributeSet, int, int, android.content.res.Resources.Theme);
    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 boolean isCountDown();
    method public void setBase(long);
    method public void setCountDown(boolean);
    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.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 setImageIcon(android.graphics.drawable.Icon);
    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 getGravity();
    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 setWindowLayoutType(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 int getMaxAvailableHeight(android.view.View, int, boolean);
    method public boolean getOverlapAnchor();
    method public int getSoftInputMode();
    method public int getWidth();
    method public int getWindowLayoutType();
    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 setWindowLayoutType(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 setProgress(int, boolean);
    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 setChronometerCountsDown(int, 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 setIcon(int, java.lang.String, android.graphics.drawable.Icon);
    method public void setImageViewBitmap(int, android.graphics.Bitmap);
    method public void setImageViewIcon(int, android.graphics.drawable.Icon);
    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.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.res.Resources.Theme);
    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 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 android.graphics.drawable.Drawable getLeftStripDrawable();
    method public android.graphics.drawable.Drawable getRightStripDrawable();
    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 getCustomInsertionActionModeCallback();
    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 getHyphenationFrequency();
    method public int getImeActionId();
    method public java.lang.CharSequence getImeActionLabel();
    method public android.util.LocaleList getImeHintLocales();
    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 android.util.LocaleList getTextLocales();
    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 setCustomInsertionActionModeCallback(android.view.ActionMode.Callback);
    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 setHyphenationFrequency(int);
    method public void setImeActionLabel(java.lang.CharSequence, int);
    method public void setImeHintLocales(android.util.LocaleList);
    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 setTextLocales(android.util.LocaleList);
    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 abstract interface ThemedSpinnerAdapter implements android.widget.SpinnerAdapter {
    method public abstract android.content.res.Resources.Theme getDropDownViewTheme();
    method public abstract void setDropDownViewTheme(android.content.res.Resources.Theme);
  }

  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 android.graphics.drawable.Drawable getOverflowIcon();
    method public int getPopupTheme();
    method public java.lang.CharSequence getSubtitle();
    method public java.lang.CharSequence getTitle();
    method public int getTitleMarginBottom();
    method public int getTitleMarginEnd();
    method public int getTitleMarginStart();
    method public int getTitleMarginTop();
    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 setOnMenuItemClickListener(android.widget.Toolbar.OnMenuItemClickListener);
    method public void setOverflowIcon(android.graphics.drawable.Drawable);
    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 setTitleMargin(int, int, int, int);
    method public void setTitleMarginBottom(int);
    method public void setTitleMarginEnd(int);
    method public void setTitleMarginStart(int);
    method public void setTitleMarginTop(int);
    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);
    method public static java.awt.font.NumericShaper getContextualShaper(java.util.Set<java.awt.font.NumericShaper.Range>);
    method public static java.awt.font.NumericShaper getContextualShaper(int, int);
    method public static java.awt.font.NumericShaper getContextualShaper(java.util.Set<java.awt.font.NumericShaper.Range>, java.awt.font.NumericShaper.Range);
    method public java.util.Set<java.awt.font.NumericShaper.Range> getRangeSet();
    method public int getRanges();
    method public static java.awt.font.NumericShaper getShaper(int);
    method public static java.awt.font.NumericShaper getShaper(java.awt.font.NumericShaper.Range);
    method public boolean isContextual();
    method public void shape(char[], int, int);
    method public void shape(char[], int, int, int);
    method public void shape(char[], int, int, java.awt.font.NumericShaper.Range);
    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 static class NumericShaper.Range extends java.lang.Enum {
    method public static java.awt.font.NumericShaper.Range valueOf(java.lang.String);
    method public static final java.awt.font.NumericShaper.Range[] values();
    enum_constant public static final java.awt.font.NumericShaper.Range ARABIC;
    enum_constant public static final java.awt.font.NumericShaper.Range BALINESE;
    enum_constant public static final java.awt.font.NumericShaper.Range BENGALI;
    enum_constant public static final java.awt.font.NumericShaper.Range CHAM;
    enum_constant public static final java.awt.font.NumericShaper.Range DEVANAGARI;
    enum_constant public static final java.awt.font.NumericShaper.Range EASTERN_ARABIC;
    enum_constant public static final java.awt.font.NumericShaper.Range ETHIOPIC;
    enum_constant public static final java.awt.font.NumericShaper.Range EUROPEAN;
    enum_constant public static final java.awt.font.NumericShaper.Range GUJARATI;
    enum_constant public static final java.awt.font.NumericShaper.Range GURMUKHI;
    enum_constant public static final java.awt.font.NumericShaper.Range JAVANESE;
    enum_constant public static final java.awt.font.NumericShaper.Range KANNADA;
    enum_constant public static final java.awt.font.NumericShaper.Range KAYAH_LI;
    enum_constant public static final java.awt.font.NumericShaper.Range KHMER;
    enum_constant public static final java.awt.font.NumericShaper.Range LAO;
    enum_constant public static final java.awt.font.NumericShaper.Range LEPCHA;
    enum_constant public static final java.awt.font.NumericShaper.Range LIMBU;
    enum_constant public static final java.awt.font.NumericShaper.Range MALAYALAM;
    enum_constant public static final java.awt.font.NumericShaper.Range MEETEI_MAYEK;
    enum_constant public static final java.awt.font.NumericShaper.Range MONGOLIAN;
    enum_constant public static final java.awt.font.NumericShaper.Range MYANMAR;
    enum_constant public static final java.awt.font.NumericShaper.Range MYANMAR_SHAN;
    enum_constant public static final java.awt.font.NumericShaper.Range NEW_TAI_LUE;
    enum_constant public static final java.awt.font.NumericShaper.Range NKO;
    enum_constant public static final java.awt.font.NumericShaper.Range OL_CHIKI;
    enum_constant public static final java.awt.font.NumericShaper.Range ORIYA;
    enum_constant public static final java.awt.font.NumericShaper.Range SAURASHTRA;
    enum_constant public static final java.awt.font.NumericShaper.Range SUNDANESE;
    enum_constant public static final java.awt.font.NumericShaper.Range TAI_THAM_HORA;
    enum_constant public static final java.awt.font.NumericShaper.Range TAI_THAM_THAM;
    enum_constant public static final java.awt.font.NumericShaper.Range TAMIL;
    enum_constant public static final java.awt.font.NumericShaper.Range TELUGU;
    enum_constant public static final java.awt.font.NumericShaper.Range THAI;
    enum_constant public static final java.awt.font.NumericShaper.Range TIBETAN;
    enum_constant public static final java.awt.font.NumericShaper.Range VAI;
  }

  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.beans.PropertyChangeListener);
    method public void addPropertyChangeListener(java.lang.String, 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, int, int);
    method public void fireIndexedPropertyChange(java.lang.String, int, boolean, boolean);
    method public void firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object);
    method public void firePropertyChange(java.lang.String, int, int);
    method public void firePropertyChange(java.lang.String, boolean, boolean);
    method public void firePropertyChange(java.beans.PropertyChangeEvent);
    method public java.beans.PropertyChangeListener[] getPropertyChangeListeners();
    method public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String);
    method public boolean hasListeners(java.lang.String);
    method public void removePropertyChangeListener(java.beans.PropertyChangeListener);
    method public void removePropertyChangeListener(java.lang.String, 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, int);
    ctor public BufferedReader(java.io.Reader);
    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 synchronized int size();
    method public synchronized byte[] toByteArray();
    method public synchronized java.lang.String toString(java.lang.String) throws java.io.UnsupportedEncodingException;
    method public deprecated synchronized java.lang.String toString(int);
    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(java.lang.String, java.lang.Object...);
    method public java.lang.String readLine();
    method public char[] readPassword(java.lang.String, java.lang.Object...);
    method public char[] readPassword();
    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(int) 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 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.lang.String);
    ctor public File(java.lang.String, java.lang.String);
    ctor public File(java.io.File, 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, java.io.File) throws java.io.IOException;
    method public static java.io.File createTempFile(java.lang.String, java.lang.String) 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.lang.String) throws java.io.FileNotFoundException;
    ctor public FileInputStream(java.io.File) throws java.io.FileNotFoundException;
    ctor public FileInputStream(java.io.FileDescriptor);
    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.lang.String) throws java.io.FileNotFoundException;
    ctor public FileOutputStream(java.lang.String, boolean) throws java.io.FileNotFoundException;
    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);
    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 boolean equals(java.lang.Object);
    method public java.lang.String getActions();
    method public int hashCode();
    method public boolean implies(java.security.Permission);
  }

  public class FileReader extends java.io.InputStreamReader {
    ctor public FileReader(java.lang.String) throws java.io.FileNotFoundException;
    ctor public FileReader(java.io.File) throws java.io.FileNotFoundException;
    ctor public FileReader(java.io.FileDescriptor);
  }

  public class FileWriter extends java.io.OutputStreamWriter {
    ctor public FileWriter(java.lang.String) throws java.io.IOException;
    ctor public FileWriter(java.lang.String, boolean) throws java.io.IOException;
    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);
  }

  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 synchronized 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.Charset);
    ctor public InputStreamReader(java.io.InputStream, java.nio.charset.CharsetDecoder);
    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(java.lang.String);
    ctor public NotActiveException();
  }

  public class NotSerializableException extends java.io.ObjectStreamException {
    ctor public NotSerializableException(java.lang.String);
    ctor public NotSerializableException();
  }

  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 public ObjectInputStream(java.io.InputStream) throws java.io.IOException;
    ctor protected ObjectInputStream() throws java.io.IOException, java.lang.SecurityException;
    method public void defaultReadObject() throws java.lang.ClassNotFoundException, java.io.IOException;
    method protected boolean enableResolveObject(boolean) throws java.lang.SecurityException;
    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;
    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;
    method protected java.lang.Object readObjectOverride() throws java.lang.ClassNotFoundException, java.io.IOException;
    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 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;
    method public abstract boolean get(java.lang.String, boolean) throws java.io.IOException;
    method public abstract byte get(java.lang.String, byte) throws java.io.IOException;
    method public abstract char get(java.lang.String, char) throws java.io.IOException;
    method public abstract short get(java.lang.String, short) throws java.io.IOException;
    method public abstract int get(java.lang.String, int) throws java.io.IOException;
    method public abstract long get(java.lang.String, long) throws java.io.IOException;
    method public abstract float get(java.lang.String, float) throws java.io.IOException;
    method public abstract double get(java.lang.String, double) throws java.io.IOException;
    method public abstract java.lang.Object get(java.lang.String, java.lang.Object) throws java.io.IOException;
    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(int) 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 writeObject(java.lang.Object) throws java.io.IOException;
  }

  public class ObjectOutputStream extends java.io.OutputStream implements java.io.ObjectOutput java.io.ObjectStreamConstants {
    ctor public ObjectOutputStream(java.io.OutputStream) throws java.io.IOException;
    ctor protected ObjectOutputStream() throws java.io.IOException, java.lang.SecurityException;
    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) throws java.lang.SecurityException;
    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, byte);
    method public abstract void put(java.lang.String, char);
    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(java.lang.String);
    ctor protected ObjectStreamException();
  }

  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 abstract void write(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;
  }

  public class OutputStreamWriter extends java.io.Writer {
    ctor public OutputStreamWriter(java.io.OutputStream, java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public OutputStreamWriter(java.io.OutputStream);
    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(java.io.PipedOutputStream) throws java.io.IOException;
    ctor public PipedInputStream(java.io.PipedOutputStream, int) throws java.io.IOException;
    ctor public PipedInputStream();
    ctor public PipedInputStream(int);
    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(java.io.PipedInputStream) throws java.io.IOException;
    ctor public PipedOutputStream();
    method public synchronized 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(java.io.PipedWriter) throws java.io.IOException;
    ctor public PipedReader(java.io.PipedWriter, int) throws java.io.IOException;
    ctor public PipedReader();
    ctor public PipedReader(int);
    method public 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(java.io.PipedReader) throws java.io.IOException;
    ctor public PipedWriter();
    method public void close() throws java.io.IOException;
    method public synchronized void connect(java.io.PipedReader) throws java.io.IOException;
    method public synchronized 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.lang.String) throws java.io.FileNotFoundException;
    ctor public PrintStream(java.lang.String, java.lang.String) throws java.io.FileNotFoundException, 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;
    method public java.io.PrintStream append(java.lang.CharSequence);
    method public java.io.PrintStream append(java.lang.CharSequence, int, int);
    method public java.io.PrintStream append(char);
    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(boolean);
    method public void print(char);
    method public void print(int);
    method public void print(long);
    method public void print(float);
    method public void print(double);
    method public void print(char[]);
    method public void print(java.lang.String);
    method public void print(java.lang.Object);
    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(boolean);
    method public void println(char);
    method public void println(int);
    method public void println(long);
    method public void println(float);
    method public void println(double);
    method public void println(char[]);
    method public void println(java.lang.String);
    method public void println(java.lang.Object);
    method protected void setError();
  }

  public class PrintWriter extends java.io.Writer {
    ctor public PrintWriter(java.io.Writer);
    ctor public PrintWriter(java.io.Writer, boolean);
    ctor public PrintWriter(java.io.OutputStream);
    ctor public PrintWriter(java.io.OutputStream, boolean);
    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;
    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;
    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(boolean);
    method public void print(char);
    method public void print(int);
    method public void print(long);
    method public void print(float);
    method public void print(double);
    method public void print(char[]);
    method public void print(java.lang.String);
    method public void print(java.lang.Object);
    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(boolean);
    method public void println(char);
    method public void println(int);
    method public void println(long);
    method public void println(float);
    method public void println(double);
    method public void println(char[]);
    method public void println(java.lang.String);
    method public void println(java.lang.Object);
    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, int);
    ctor public PushbackInputStream(java.io.InputStream);
    method public void unread(int) throws java.io.IOException;
    method public void unread(byte[], int, int) throws java.io.IOException;
    method public void unread(byte[]) 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, int);
    ctor public PushbackReader(java.io.Reader);
    method public void unread(int) throws java.io.IOException;
    method public void unread(char[], int, int) throws java.io.IOException;
    method public void unread(char[]) throws java.io.IOException;
  }

  public class RandomAccessFile implements java.io.Closeable java.io.DataInput java.io.DataOutput {
    ctor public RandomAccessFile(java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
    ctor public RandomAccessFile(java.io.File, java.lang.String) throws java.io.FileNotFoundException;
    method public void close() throws java.io.IOException;
    method public final 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[], int, int) throws java.io.IOException;
    method public int read(byte[]) 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(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 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(java.nio.CharBuffer) throws java.io.IOException;
    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 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.util.Enumeration<? extends java.io.InputStream>);
    ctor public SequenceInputStream(java.io.InputStream, 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(java.lang.String);
    ctor public StreamCorruptedException();
  }

  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(java.lang.CharSequence) throws java.io.IOException;
    method public java.io.Writer append(java.lang.CharSequence, int, int) throws java.io.IOException;
    method public java.io.Writer append(char) 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(int) 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(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 implements java.lang.Appendable java.lang.CharSequence {
    method public java.lang.AbstractStringBuilder append(java.lang.Object);
    method public java.lang.AbstractStringBuilder append(java.lang.String);
    method public java.lang.AbstractStringBuilder append(java.lang.StringBuffer);
    method public java.lang.AbstractStringBuilder append(java.lang.CharSequence);
    method public java.lang.AbstractStringBuilder append(java.lang.CharSequence, int, int);
    method public java.lang.AbstractStringBuilder append(char[]);
    method public java.lang.AbstractStringBuilder append(char[], int, int);
    method public java.lang.AbstractStringBuilder append(boolean);
    method public java.lang.AbstractStringBuilder append(char);
    method public java.lang.AbstractStringBuilder append(int);
    method public java.lang.AbstractStringBuilder append(long);
    method public java.lang.AbstractStringBuilder append(float);
    method public java.lang.AbstractStringBuilder append(double);
    method public java.lang.AbstractStringBuilder appendCodePoint(int);
    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 java.lang.AbstractStringBuilder delete(int, int);
    method public java.lang.AbstractStringBuilder deleteCharAt(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 java.lang.AbstractStringBuilder insert(int, char[], int, int);
    method public java.lang.AbstractStringBuilder insert(int, java.lang.Object);
    method public java.lang.AbstractStringBuilder insert(int, java.lang.String);
    method public java.lang.AbstractStringBuilder insert(int, char[]);
    method public java.lang.AbstractStringBuilder insert(int, java.lang.CharSequence);
    method public java.lang.AbstractStringBuilder insert(int, java.lang.CharSequence, int, int);
    method public java.lang.AbstractStringBuilder insert(int, boolean);
    method public java.lang.AbstractStringBuilder insert(int, char);
    method public java.lang.AbstractStringBuilder insert(int, int);
    method public java.lang.AbstractStringBuilder insert(int, long);
    method public java.lang.AbstractStringBuilder insert(int, float);
    method public java.lang.AbstractStringBuilder insert(int, double);
    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 java.lang.AbstractStringBuilder replace(int, int, java.lang.String);
    method public java.lang.AbstractStringBuilder reverse();
    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 abstract java.lang.String toString();
    method public void trimToSize();
  }

  public abstract interface Appendable {
    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;
    method public abstract java.lang.Appendable append(char) 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.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);
    ctor public AssertionError(java.lang.String, java.lang.Throwable);
  }

  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(boolean);
    ctor public Boolean(java.lang.String);
    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(boolean);
    method public static java.lang.Boolean valueOf(java.lang.String);
    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, int) throws java.lang.NumberFormatException;
    method public static byte parseByte(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.String toString(byte);
    method public static java.lang.Byte valueOf(byte);
    method public static java.lang.Byte valueOf(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.Byte valueOf(java.lang.String) throws java.lang.NumberFormatException;
    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 final 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 static final class Character.UnicodeScript extends java.lang.Enum {
    method public static final java.lang.Character.UnicodeScript forName(java.lang.String);
    method public static java.lang.Character.UnicodeScript of(int);
    method public static java.lang.Character.UnicodeScript valueOf(java.lang.String);
    method public static final java.lang.Character.UnicodeScript[] values();
    enum_constant public static final java.lang.Character.UnicodeScript ARABIC;
    enum_constant public static final java.lang.Character.UnicodeScript ARMENIAN;
    enum_constant public static final java.lang.Character.UnicodeScript AVESTAN;
    enum_constant public static final java.lang.Character.UnicodeScript BALINESE;
    enum_constant public static final java.lang.Character.UnicodeScript BAMUM;
    enum_constant public static final java.lang.Character.UnicodeScript BATAK;
    enum_constant public static final java.lang.Character.UnicodeScript BENGALI;
    enum_constant public static final java.lang.Character.UnicodeScript BOPOMOFO;
    enum_constant public static final java.lang.Character.UnicodeScript BRAHMI;
    enum_constant public static final java.lang.Character.UnicodeScript BRAILLE;
    enum_constant public static final java.lang.Character.UnicodeScript BUGINESE;
    enum_constant public static final java.lang.Character.UnicodeScript BUHID;
    enum_constant public static final java.lang.Character.UnicodeScript CANADIAN_ABORIGINAL;
    enum_constant public static final java.lang.Character.UnicodeScript CARIAN;
    enum_constant public static final java.lang.Character.UnicodeScript CHAM;
    enum_constant public static final java.lang.Character.UnicodeScript CHEROKEE;
    enum_constant public static final java.lang.Character.UnicodeScript COMMON;
    enum_constant public static final java.lang.Character.UnicodeScript COPTIC;
    enum_constant public static final java.lang.Character.UnicodeScript CUNEIFORM;
    enum_constant public static final java.lang.Character.UnicodeScript CYPRIOT;
    enum_constant public static final java.lang.Character.UnicodeScript CYRILLIC;
    enum_constant public static final java.lang.Character.UnicodeScript DESERET;
    enum_constant public static final java.lang.Character.UnicodeScript DEVANAGARI;
    enum_constant public static final java.lang.Character.UnicodeScript EGYPTIAN_HIEROGLYPHS;
    enum_constant public static final java.lang.Character.UnicodeScript ETHIOPIC;
    enum_constant public static final java.lang.Character.UnicodeScript GEORGIAN;
    enum_constant public static final java.lang.Character.UnicodeScript GLAGOLITIC;
    enum_constant public static final java.lang.Character.UnicodeScript GOTHIC;
    enum_constant public static final java.lang.Character.UnicodeScript GREEK;
    enum_constant public static final java.lang.Character.UnicodeScript GUJARATI;
    enum_constant public static final java.lang.Character.UnicodeScript GURMUKHI;
    enum_constant public static final java.lang.Character.UnicodeScript HAN;
    enum_constant public static final java.lang.Character.UnicodeScript HANGUL;
    enum_constant public static final java.lang.Character.UnicodeScript HANUNOO;
    enum_constant public static final java.lang.Character.UnicodeScript HEBREW;
    enum_constant public static final java.lang.Character.UnicodeScript HIRAGANA;
    enum_constant public static final java.lang.Character.UnicodeScript IMPERIAL_ARAMAIC;
    enum_constant public static final java.lang.Character.UnicodeScript INHERITED;
    enum_constant public static final java.lang.Character.UnicodeScript INSCRIPTIONAL_PAHLAVI;
    enum_constant public static final java.lang.Character.UnicodeScript INSCRIPTIONAL_PARTHIAN;
    enum_constant public static final java.lang.Character.UnicodeScript JAVANESE;
    enum_constant public static final java.lang.Character.UnicodeScript KAITHI;
    enum_constant public static final java.lang.Character.UnicodeScript KANNADA;
    enum_constant public static final java.lang.Character.UnicodeScript KATAKANA;
    enum_constant public static final java.lang.Character.UnicodeScript KAYAH_LI;
    enum_constant public static final java.lang.Character.UnicodeScript KHAROSHTHI;
    enum_constant public static final java.lang.Character.UnicodeScript KHMER;
    enum_constant public static final java.lang.Character.UnicodeScript LAO;
    enum_constant public static final java.lang.Character.UnicodeScript LATIN;
    enum_constant public static final java.lang.Character.UnicodeScript LEPCHA;
    enum_constant public static final java.lang.Character.UnicodeScript LIMBU;
    enum_constant public static final java.lang.Character.UnicodeScript LINEAR_B;
    enum_constant public static final java.lang.Character.UnicodeScript LISU;
    enum_constant public static final java.lang.Character.UnicodeScript LYCIAN;
    enum_constant public static final java.lang.Character.UnicodeScript LYDIAN;
    enum_constant public static final java.lang.Character.UnicodeScript MALAYALAM;
    enum_constant public static final java.lang.Character.UnicodeScript MANDAIC;
    enum_constant public static final java.lang.Character.UnicodeScript MEETEI_MAYEK;
    enum_constant public static final java.lang.Character.UnicodeScript MONGOLIAN;
    enum_constant public static final java.lang.Character.UnicodeScript MYANMAR;
    enum_constant public static final java.lang.Character.UnicodeScript NEW_TAI_LUE;
    enum_constant public static final java.lang.Character.UnicodeScript NKO;
    enum_constant public static final java.lang.Character.UnicodeScript OGHAM;
    enum_constant public static final java.lang.Character.UnicodeScript OLD_ITALIC;
    enum_constant public static final java.lang.Character.UnicodeScript OLD_PERSIAN;
    enum_constant public static final java.lang.Character.UnicodeScript OLD_SOUTH_ARABIAN;
    enum_constant public static final java.lang.Character.UnicodeScript OLD_TURKIC;
    enum_constant public static final java.lang.Character.UnicodeScript OL_CHIKI;
    enum_constant public static final java.lang.Character.UnicodeScript ORIYA;
    enum_constant public static final java.lang.Character.UnicodeScript OSMANYA;
    enum_constant public static final java.lang.Character.UnicodeScript PHAGS_PA;
    enum_constant public static final java.lang.Character.UnicodeScript PHOENICIAN;
    enum_constant public static final java.lang.Character.UnicodeScript REJANG;
    enum_constant public static final java.lang.Character.UnicodeScript RUNIC;
    enum_constant public static final java.lang.Character.UnicodeScript SAMARITAN;
    enum_constant public static final java.lang.Character.UnicodeScript SAURASHTRA;
    enum_constant public static final java.lang.Character.UnicodeScript SHAVIAN;
    enum_constant public static final java.lang.Character.UnicodeScript SINHALA;
    enum_constant public static final java.lang.Character.UnicodeScript SUNDANESE;
    enum_constant public static final java.lang.Character.UnicodeScript SYLOTI_NAGRI;
    enum_constant public static final java.lang.Character.UnicodeScript SYRIAC;
    enum_constant public static final java.lang.Character.UnicodeScript TAGALOG;
    enum_constant public static final java.lang.Character.UnicodeScript TAGBANWA;
    enum_constant public static final java.lang.Character.UnicodeScript TAI_LE;
    enum_constant public static final java.lang.Character.UnicodeScript TAI_THAM;
    enum_constant public static final java.lang.Character.UnicodeScript TAI_VIET;
    enum_constant public static final java.lang.Character.UnicodeScript TAMIL;
    enum_constant public static final java.lang.Character.UnicodeScript TELUGU;
    enum_constant public static final java.lang.Character.UnicodeScript THAANA;
    enum_constant public static final java.lang.Character.UnicodeScript THAI;
    enum_constant public static final java.lang.Character.UnicodeScript TIBETAN;
    enum_constant public static final java.lang.Character.UnicodeScript TIFINAGH;
    enum_constant public static final java.lang.Character.UnicodeScript UGARITIC;
    enum_constant public static final java.lang.Character.UnicodeScript UNKNOWN;
    enum_constant public static final java.lang.Character.UnicodeScript VAI;
    enum_constant public static final java.lang.Character.UnicodeScript YI;
  }

  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 T[] getAnnotationsByType(java.lang.Class<T>);
    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, java.lang.SecurityException;
    method public java.lang.reflect.Constructor<?>[] getConstructors() throws java.lang.SecurityException;
    method public T getDeclaredAnnotation(java.lang.Class<T>);
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public T[] getDeclaredAnnotationsByType(java.lang.Class<T>);
    method public java.lang.Class<?>[] getDeclaredClasses();
    method public java.lang.reflect.Constructor<T> getDeclaredConstructor(java.lang.Class<?>...) throws java.lang.NoSuchMethodException, java.lang.SecurityException;
    method public java.lang.reflect.Constructor<?>[] getDeclaredConstructors() throws java.lang.SecurityException;
    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, java.lang.SecurityException;
    method public java.lang.reflect.Method[] getDeclaredMethods() throws java.lang.SecurityException;
    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() throws java.lang.SecurityException;
    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, java.lang.SecurityException;
    method public java.lang.reflect.Method[] getMethods() throws java.lang.SecurityException;
    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(java.lang.ClassLoader);
    ctor protected 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 static boolean registerAsParallelCapable();
    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 static int hashCode(double);
    method public int intValue();
    method public static boolean isInfinite(double);
    method public boolean isInfinite();
    method public static boolean isNaN(double);
    method public boolean isNaN();
    method public static double longBitsToDouble(long);
    method public long longValue();
    method public static double max(double, double);
    method public static double min(double, double);
    method public static double parseDouble(java.lang.String) throws java.lang.NumberFormatException;
    method public static double sum(double, double);
    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 BYTES = 8; // 0x8
    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);
    ctor protected Error(java.lang.String, java.lang.Throwable, boolean, boolean);
  }

  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);
    ctor protected Exception(java.lang.String, java.lang.Throwable, boolean, boolean);
  }

  public class ExceptionInInitializerError extends java.lang.LinkageError {
    ctor public ExceptionInInitializerError();
    ctor public ExceptionInInitializerError(java.lang.Throwable);
    ctor public ExceptionInInitializerError(java.lang.String);
    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 static boolean isInfinite(float);
    method public boolean isInfinite();
    method public static boolean isNaN(float);
    method public boolean isNaN();
    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 abstract class FunctionalInterface implements java.lang.annotation.Annotation {
  }

  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 hashCode(int);
    method public static int highestOneBit(int);
    method public int intValue();
    method public long longValue();
    method public static int lowestOneBit(int);
    method public static int max(int, int);
    method public static int min(int, int);
    method public static int numberOfLeadingZeros(int);
    method public static int numberOfTrailingZeros(int);
    method public static int parseInt(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static int parseInt(java.lang.String) 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 int sum(int, 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, int);
    method public static java.lang.String toString(int);
    method public static java.lang.Integer valueOf(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.Integer valueOf(java.lang.String) throws java.lang.NumberFormatException;
    method public static java.lang.Integer valueOf(int);
    field public static final int BYTES = 4; // 0x4
    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);
    ctor public InternalError(java.lang.String, java.lang.Throwable);
    ctor public InternalError(java.lang.Throwable);
  }

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

  public abstract interface Iterable {
    method public default void forEach(java.util.function.Consumer<? super T>);
    method public abstract java.util.Iterator<T> iterator();
    method public default java.util.Spliterator<T> spliterator();
  }

  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 int hashCode(long);
    method public static long highestOneBit(long);
    method public int intValue();
    method public long longValue();
    method public static long lowestOneBit(long);
    method public static long max(long, long);
    method public static long min(long, long);
    method public static int numberOfLeadingZeros(long);
    method public static int numberOfTrailingZeros(long);
    method public static long parseLong(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static long parseLong(java.lang.String) 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 long sum(long, 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, int);
    method public static java.lang.String toString(long);
    method public static java.lang.Long valueOf(java.lang.String, int) throws java.lang.NumberFormatException;
    method public static java.lang.Long valueOf(java.lang.String) 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 int abs(int);
    method public static long abs(long);
    method public static float abs(float);
    method public static double abs(double);
    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 int max(int, int);
    method public static long max(long, long);
    method public static float max(float, float);
    method public static double max(double, double);
    method public static int min(int, int);
    method public static long min(long, long);
    method public static float min(float, float);
    method public static double min(double, double);
    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 int round(float);
    method public static long round(double);
    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(long) throws java.lang.InterruptedException;
    method public final void wait(long, int) throws java.lang.InterruptedException;
    method public final void wait() 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 T[] getAnnotationsByType(java.lang.Class<T>);
    method public java.lang.annotation.Annotation getDeclaredAnnotation(java.lang.Class<T>);
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public T[] getDeclaredAnnotationsByType(java.lang.Class<T>);
    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.util.List<java.lang.String>);
    ctor public ProcessBuilder(java.lang.String...);
    method public java.lang.ProcessBuilder command(java.util.List<java.lang.String>);
    method public java.lang.ProcessBuilder command(java.lang.String...);
    method public java.util.List<java.lang.String> command();
    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 java.lang.ProcessBuilder inheritIO();
    method public java.lang.ProcessBuilder redirectError(java.lang.ProcessBuilder.Redirect);
    method public java.lang.ProcessBuilder redirectError(java.io.File);
    method public java.lang.ProcessBuilder.Redirect redirectError();
    method public boolean redirectErrorStream();
    method public java.lang.ProcessBuilder redirectErrorStream(boolean);
    method public java.lang.ProcessBuilder redirectInput(java.lang.ProcessBuilder.Redirect);
    method public java.lang.ProcessBuilder redirectInput(java.io.File);
    method public java.lang.ProcessBuilder.Redirect redirectInput();
    method public java.lang.ProcessBuilder redirectOutput(java.lang.ProcessBuilder.Redirect);
    method public java.lang.ProcessBuilder redirectOutput(java.io.File);
    method public java.lang.ProcessBuilder.Redirect redirectOutput();
    method public java.lang.Process start() throws java.io.IOException;
  }

  public static abstract class ProcessBuilder.Redirect {
    method public static java.lang.ProcessBuilder.Redirect appendTo(java.io.File);
    method public java.io.File file();
    method public static java.lang.ProcessBuilder.Redirect from(java.io.File);
    method public static java.lang.ProcessBuilder.Redirect to(java.io.File);
    method public abstract java.lang.ProcessBuilder.Redirect.Type type();
    field public static final java.lang.ProcessBuilder.Redirect INHERIT;
    field public static final java.lang.ProcessBuilder.Redirect PIPE;
  }

  public static final class ProcessBuilder.Redirect.Type extends java.lang.Enum {
    method public static java.lang.ProcessBuilder.Redirect.Type valueOf(java.lang.String);
    method public static final java.lang.ProcessBuilder.Redirect.Type[] values();
    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type APPEND;
    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type INHERIT;
    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type PIPE;
    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type READ;
    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type WRITE;
  }

  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.String, java.lang.Throwable);
    ctor public ReflectiveOperationException(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);
    ctor protected RuntimeException(java.lang.String, java.lang.Throwable, boolean, boolean);
  }

  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(short);
    ctor public Short(java.lang.String) throws java.lang.NumberFormatException;
    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, int) throws java.lang.NumberFormatException;
    method public static short parseShort(java.lang.String) 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, int) throws java.lang.NumberFormatException;
    method public static java.lang.Short valueOf(java.lang.String) 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 int abs(int);
    method public static long abs(long);
    method public static float abs(float);
    method public static double abs(double);
    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 int max(int, int);
    method public static long max(long, long);
    method public static float max(float, float);
    method public static double max(double, double);
    method public static int min(int, int);
    method public static long min(long, long);
    method public static float min(float, float);
    method public static double min(double, double);
    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 int round(float);
    method public static long round(double);
    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(java.lang.String);
    ctor public String(char[]);
    ctor public String(char[], int, int);
    ctor public String(int[], int, int);
    ctor public deprecated String(byte[], int, int, int);
    ctor public deprecated String(byte[], int);
    ctor public String(byte[], int, int, java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public String(byte[], int, int, java.nio.charset.Charset);
    ctor public String(byte[], java.lang.String) throws java.io.UnsupportedEncodingException;
    ctor public String(byte[], java.nio.charset.Charset);
    ctor public String(byte[], int, int);
    ctor public String(byte[]);
    ctor public String(java.lang.StringBuffer);
    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[], int, int);
    method public static java.lang.String copyValueOf(char[]);
    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(java.lang.String) throws java.io.UnsupportedEncodingException;
    method public byte[] getBytes(java.nio.charset.Charset);
    method public byte[] getBytes();
    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, int);
    method public java.lang.String[] split(java.lang.String);
    method public boolean startsWith(java.lang.String, int);
    method public boolean startsWith(java.lang.String);
    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(java.util.Locale);
    method public java.lang.String toLowerCase();
    method public java.lang.String toUpperCase(java.util.Locale);
    method public java.lang.String toUpperCase();
    method public java.lang.String trim();
    method public static java.lang.String valueOf(java.lang.Object);
    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(boolean);
    method public static java.lang.String valueOf(char);
    method public static java.lang.String valueOf(int);
    method public static java.lang.String valueOf(long);
    method public static java.lang.String valueOf(float);
    method public static java.lang.String valueOf(double);
    field public static final java.util.Comparator<java.lang.String> CASE_INSENSITIVE_ORDER;
  }

  public final class StringBuffer extends java.lang.AbstractStringBuilder implements 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 synchronized java.lang.String toString();
  }

  public final class StringBuilder extends java.lang.AbstractStringBuilder implements java.lang.CharSequence java.io.Serializable {
    ctor public StringBuilder();
    ctor public StringBuilder(int);
    ctor public StringBuilder(java.lang.String);
    ctor public StringBuilder(java.lang.CharSequence);
    method public java.lang.String toString();
  }

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

  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.ThreadGroup, java.lang.Runnable);
    ctor public Thread(java.lang.String);
    ctor public Thread(java.lang.ThreadGroup, java.lang.String);
    ctor public Thread(java.lang.Runnable, java.lang.String);
    ctor public Thread(java.lang.ThreadGroup, java.lang.Runnable, 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(long) throws java.lang.InterruptedException;
    method public final void join(long, int) throws java.lang.InterruptedException;
    method public final void join() 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 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 synchronized void addSuppressed(java.lang.Throwable);
    method public synchronized java.lang.Throwable fillInStackTrace();
    method public synchronized 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 synchronized java.lang.Throwable[] getSuppressed();
    method public synchronized 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);
    ctor public VirtualMachineError(java.lang.String, java.lang.Throwable);
    ctor public VirtualMachineError(java.lang.Throwable);
  }

  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 Repeatable 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 java.lang.ref.Reference<? extends T> poll();
    method public java.lang.ref.Reference<? extends T> remove(long) throws java.lang.IllegalArgumentException, java.lang.InterruptedException;
    method public java.lang.ref.Reference<? extends T> remove() 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 T[] getAnnotationsByType(java.lang.Class<T>);
    method public java.lang.annotation.Annotation getDeclaredAnnotation(java.lang.Class<T>);
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public T[] getDeclaredAnnotationsByType(java.lang.Class<T>);
    method public boolean isAccessible();
    method public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>);
    method public static void setAccessible(java.lang.reflect.AccessibleObject[], boolean) throws java.lang.SecurityException;
    method public void setAccessible(boolean) throws java.lang.SecurityException;
  }

  public abstract interface AnnotatedElement {
    method public abstract T getAnnotation(java.lang.Class<T>);
    method public abstract java.lang.annotation.Annotation[] getAnnotations();
    method public abstract T[] getAnnotationsByType(java.lang.Class<T>);
    method public abstract java.lang.annotation.Annotation getDeclaredAnnotation(java.lang.Class<T>);
    method public abstract java.lang.annotation.Annotation[] getDeclaredAnnotations();
    method public abstract T[] getDeclaredAnnotationsByType(java.lang.Class<T>);
    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.NegativeArraySizeException;
    method public static java.lang.Object newInstance(java.lang.Class<?>, int...) throws java.lang.IllegalArgumentException, 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 boolean equals(java.lang.Object);
    method public A getAnnotation(java.lang.Class<A>);
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    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 isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>);
    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 boolean equals(java.lang.Object);
    method public A getAnnotation(java.lang.Class<A>);
    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
    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 isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>);
    method public boolean isBridge();
    method public boolean isDefault();
    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 java.net.PasswordAuthentication requestPasswordAuthentication(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);
    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 synchronized 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(java.lang.String);
    ctor public BindException();
  }

  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(java.lang.String);
    ctor public ConnectException();
  }

  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 synchronized 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 synchronized 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, int);
    ctor public DatagramPacket(byte[], int);
    ctor public DatagramPacket(byte[], int, int, java.net.InetAddress, int);
    ctor public DatagramPacket(byte[], int, int, java.net.SocketAddress) throws java.net.SocketException;
    ctor public DatagramPacket(byte[], int, java.net.InetAddress, int);
    ctor public DatagramPacket(byte[], 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 protected DatagramSocket(java.net.DatagramSocketImpl);
    ctor public DatagramSocket(java.net.SocketAddress) throws java.net.SocketException;
    ctor public DatagramSocket(int) throws java.net.SocketException;
    ctor public DatagramSocket(int, java.net.InetAddress) throws java.net.SocketException;
    method public synchronized void bind(java.net.SocketAddress) throws java.net.SocketException;
    method public void close();
    method public void connect(java.net.InetAddress, int);
    method public void connect(java.net.SocketAddress) throws java.net.SocketException;
    method public void disconnect();
    method public synchronized 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 synchronized 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 synchronized 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 synchronized 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 synchronized 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 synchronized 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 boolean isHttpOnly();
    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 setHttpOnly(boolean);
    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(int);
    method public void setFixedLengthStreamingMode(long);
    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[], java.net.NetworkInterface) throws java.net.UnknownHostException;
    method public static java.net.Inet6Address getByAddress(java.lang.String, byte[], int) 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(java.lang.String, byte[]) throws java.net.UnknownHostException;
    method public static java.net.InetAddress getByAddress(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(java.lang.String);
    ctor public NoRouteToHostException();
  }

  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(java.lang.String);
    ctor public PortUnreachableException();
  }

  public class ProtocolException extends java.io.IOException {
    ctor public ProtocolException(java.lang.String);
    ctor public ProtocolException();
  }

  public abstract interface ProtocolFamily {
    method public abstract java.lang.String name();
  }

  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 synchronized java.net.ResponseCache getDefault();
    method public abstract java.net.CacheRequest put(java.net.URI, java.net.URLConnection) throws java.io.IOException;
    method public static synchronized 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 synchronized 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 synchronized 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 protected Socket(java.net.SocketImpl) throws java.net.SocketException;
    ctor public Socket(java.lang.String, int) throws java.io.IOException, java.net.UnknownHostException;
    ctor public Socket(java.net.InetAddress, int) throws java.io.IOException;
    ctor public Socket(java.lang.String, int, 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.lang.String, int, boolean) throws java.io.IOException;
    ctor public deprecated Socket(java.net.InetAddress, int, boolean) throws java.io.IOException;
    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(java.lang.String);
    ctor public SocketException();
  }

  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 SocketOption {
    method public abstract java.lang.String name();
    method public abstract java.lang.Class<T> type();
  }

  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 boolean equals(java.lang.Object);
    method public java.lang.String getActions();
    method public int hashCode();
    method public boolean implies(java.security.Permission);
  }

  public class SocketTimeoutException extends java.io.InterruptedIOException {
    ctor public SocketTimeoutException(java.lang.String);
    ctor public SocketTimeoutException();
  }

  public final class StandardProtocolFamily extends java.lang.Enum implements java.net.ProtocolFamily {
    method public static java.net.StandardProtocolFamily valueOf(java.lang.String);
    method public static final java.net.StandardProtocolFamily[] values();
    enum_constant public static final java.net.StandardProtocolFamily INET;
    enum_constant public static final java.net.StandardProtocolFamily INET6;
  }

  public final class StandardSocketOptions {
    field public static final java.net.SocketOption<java.net.NetworkInterface> IP_MULTICAST_IF;
    field public static final java.net.SocketOption<java.lang.Boolean> IP_MULTICAST_LOOP;
    field public static final java.net.SocketOption<java.lang.Integer> IP_MULTICAST_TTL;
    field public static final java.net.SocketOption<java.lang.Integer> IP_TOS;
    field public static final java.net.SocketOption<java.lang.Boolean> SO_BROADCAST;
    field public static final java.net.SocketOption<java.lang.Boolean> SO_KEEPALIVE;
    field public static final java.net.SocketOption<java.lang.Integer> SO_LINGER;
    field public static final java.net.SocketOption<java.lang.Integer> SO_RCVBUF;
    field public static final java.net.SocketOption<java.lang.Boolean> SO_REUSEADDR;
    field public static final java.net.SocketOption<java.lang.Integer> SO_SNDBUF;
    field public static final java.net.SocketOption<java.lang.Boolean> TCP_NODELAY;
  }

  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, 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, 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) 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, java.lang.String, int, java.lang.String) 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, java.net.URLStreamHandler) throws java.net.MalformedURLException;
    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;
    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 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 implements java.io.Closeable {
    ctor public URLClassLoader(java.net.URL[], java.lang.ClassLoader);
    ctor public URLClassLoader(java.net.URL[]);
    ctor public URLClassLoader(java.net.URL[], java.lang.ClassLoader, java.net.URLStreamHandlerFactory);
    method protected void addURL(java.net.URL);
    method public void close() throws java.io.IOException;
    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[], java.lang.ClassLoader);
    method public static java.net.URLClassLoader newInstance(java.net.URL[]);
  }

  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 long getContentLengthLong();
    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 synchronized java.net.FileNameMap getFileNameMap();
    method public java.lang.String getHeaderField(java.lang.String);
    method public java.lang.String getHeaderField(int);
    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 long getHeaderFieldLong(java.lang.String, long);
    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 synchronized 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 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 deprecated void setURL(java.net.URL, java.lang.String, java.lang.String, int, 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(java.lang.String);
    ctor public UnknownHostException();
  }

  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 abstract byte get(int);
    method public java.nio.ByteBuffer get(byte[], int, int);
    method public java.nio.ByteBuffer get(byte[]);
    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 abstract java.nio.ByteBuffer put(int, byte);
    method public java.nio.ByteBuffer put(java.nio.ByteBuffer);
    method public java.nio.ByteBuffer put(byte[], int, int);
    method public final java.nio.ByteBuffer put(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[], int, int);
    method public static java.nio.ByteBuffer wrap(byte[]);
  }

  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(java.lang.CharSequence);
    method public java.nio.CharBuffer append(java.lang.CharSequence, int, int);
    method public java.nio.CharBuffer append(char);
    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 abstract char get(int);
    method public java.nio.CharBuffer get(char[], int, int);
    method public java.nio.CharBuffer get(char[]);
    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 abstract java.nio.CharBuffer put(int, char);
    method public java.nio.CharBuffer put(java.nio.CharBuffer);
    method public java.nio.CharBuffer put(char[], int, int);
    method public final java.nio.CharBuffer put(char[]);
    method public java.nio.CharBuffer put(java.lang.String, int, int);
    method public final java.nio.CharBuffer put(java.lang.String);
    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[], int, int);
    method public static java.nio.CharBuffer wrap(char[]);
    method public static java.nio.CharBuffer wrap(java.lang.CharSequence, int, int);
    method public static java.nio.CharBuffer wrap(java.lang.CharSequence);
  }

  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 abstract double get(int);
    method public java.nio.DoubleBuffer get(double[], int, int);
    method public java.nio.DoubleBuffer get(double[]);
    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 abstract java.nio.DoubleBuffer put(int, double);
    method public java.nio.DoubleBuffer put(java.nio.DoubleBuffer);
    method public java.nio.DoubleBuffer put(double[], int, int);
    method public final java.nio.DoubleBuffer put(double[]);
    method public abstract java.nio.DoubleBuffer slice();
    method public static java.nio.DoubleBuffer wrap(double[], int, int);
    method public static java.nio.DoubleBuffer wrap(double[]);
  }

  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 abstract float get(int);
    method public java.nio.FloatBuffer get(float[], int, int);
    method public java.nio.FloatBuffer get(float[]);
    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 abstract java.nio.FloatBuffer put(int, float);
    method public java.nio.FloatBuffer put(java.nio.FloatBuffer);
    method public java.nio.FloatBuffer put(float[], int, int);
    method public final java.nio.FloatBuffer put(float[]);
    method public abstract java.nio.FloatBuffer slice();
    method public static java.nio.FloatBuffer wrap(float[], int, int);
    method public static java.nio.FloatBuffer wrap(float[]);
  }

  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 abstract int get(int);
    method public java.nio.IntBuffer get(int[], int, int);
    method public java.nio.IntBuffer 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 abstract java.nio.IntBuffer put(int, int);
    method public java.nio.IntBuffer put(java.nio.IntBuffer);
    method public java.nio.IntBuffer put(int[], int, int);
    method public final java.nio.IntBuffer put(int[]);
    method public abstract java.nio.IntBuffer slice();
    method public static java.nio.IntBuffer wrap(int[], int, int);
    method public static java.nio.IntBuffer wrap(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 abstract long get(int);
    method public java.nio.LongBuffer get(long[], int, int);
    method public java.nio.LongBuffer get(long[]);
    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 abstract java.nio.LongBuffer put(int, long);
    method public java.nio.LongBuffer put(java.nio.LongBuffer);
    method public java.nio.LongBuffer put(long[], int, int);
    method public final java.nio.LongBuffer put(long[]);
    method public abstract java.nio.LongBuffer slice();
    method public static java.nio.LongBuffer wrap(long[], int, int);
    method public static java.nio.LongBuffer wrap(long[]);
  }

  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 abstract short get(int);
    method public java.nio.ShortBuffer get(short[], int, int);
    method public java.nio.ShortBuffer get(short[]);
    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 abstract java.nio.ShortBuffer put(int, short);
    method public java.nio.ShortBuffer put(java.nio.ShortBuffer);
    method public java.nio.ShortBuffer put(short[], int, int);
    method public final java.nio.ShortBuffer put(short[]);
    method public abstract java.nio.ShortBuffer slice();
    method public static java.nio.ShortBuffer wrap(short[], int, int);
    method public static java.nio.ShortBuffer wrap(short[]);
  }

}

package java.nio.channels {

  public class AlreadyBoundException extends java.lang.IllegalStateException {
    ctor public AlreadyBoundException();
  }

  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.NetworkChannel java.nio.channels.ScatteringByteChannel {
    ctor protected DatagramChannel(java.nio.channels.spi.SelectorProvider);
    method public abstract java.nio.channels.DatagramChannel bind(java.net.SocketAddress) throws java.io.IOException;
    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 java.net.SocketAddress getRemoteAddress() throws java.io.IOException;
    method public abstract boolean isConnected();
    method public static java.nio.channels.DatagramChannel open() throws java.io.IOException;
    method public static java.nio.channels.DatagramChannel open(java.net.ProtocolFamily) 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 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.nio.channels.DatagramChannel setOption(java.net.SocketOption<T>, T) 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 long write(java.nio.ByteBuffer[]) throws java.io.IOException;
  }

  public abstract class FileChannel extends java.nio.channels.spi.AbstractInterruptibleChannel implements java.nio.channels.GatheringByteChannel java.nio.channels.ScatteringByteChannel java.nio.channels.SeekableByteChannel {
    ctor protected FileChannel();
    method public abstract void force(boolean) throws java.io.IOException;
    method public abstract java.nio.channels.FileLock lock(long, long, boolean) throws java.io.IOException;
    method public final java.nio.channels.FileLock lock() 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 long read(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
    method public final long read(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract int read(java.nio.ByteBuffer, long) 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 abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOException;
    method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
    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 long write(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract int write(java.nio.ByteBuffer, long) 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 java.nio.channels.Channel acquiredBy();
    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[], int, int) throws java.io.IOException;
    method public abstract long write(java.nio.ByteBuffer[]) 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 abstract interface NetworkChannel implements java.nio.channels.Channel {
    method public abstract java.nio.channels.NetworkChannel bind(java.net.SocketAddress) throws java.io.IOException;
    method public abstract java.net.SocketAddress getLocalAddress() throws java.io.IOException;
    method public abstract T getOption(java.net.SocketOption<T>) throws java.io.IOException;
    method public abstract java.nio.channels.NetworkChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
    method public abstract java.util.Set<java.net.SocketOption<?>> supportedOptions();
  }

  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[], int, int) throws java.io.IOException;
    method public abstract long read(java.nio.ByteBuffer[]) throws java.io.IOException;
  }

  public abstract interface SeekableByteChannel implements java.nio.channels.ByteChannel {
    method public abstract long position() throws java.io.IOException;
    method public abstract java.nio.channels.SeekableByteChannel position(long) throws java.io.IOException;
    method public abstract int read(java.nio.ByteBuffer) throws java.io.IOException;
    method public abstract long size() throws java.io.IOException;
    method public abstract java.nio.channels.SeekableByteChannel truncate(long) throws java.io.IOException;
    method public abstract int write(java.nio.ByteBuffer) 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 abstract java.nio.channels.SelectionKey register(java.nio.channels.Selector, int, java.lang.Object) throws java.nio.channels.ClosedChannelException;
    method public final java.nio.channels.SelectionKey register(java.nio.channels.Selector, int) 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(long) throws java.io.IOException;
    method public abstract int select() 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 implements java.nio.channels.NetworkChannel {
    ctor protected ServerSocketChannel(java.nio.channels.spi.SelectorProvider);
    method public abstract java.nio.channels.SocketChannel accept() throws java.io.IOException;
    method public final java.nio.channels.ServerSocketChannel bind(java.net.SocketAddress) throws java.io.IOException;
    method public abstract java.nio.channels.ServerSocketChannel bind(java.net.SocketAddress, int) throws java.io.IOException;
    method public static java.nio.channels.ServerSocketChannel open() throws java.io.IOException;
    method public abstract java.nio.channels.ServerSocketChannel setOption(java.net.SocketOption<T>, T) 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.NetworkChannel java.nio.channels.ScatteringByteChannel {
    ctor protected SocketChannel(java.nio.channels.spi.SelectorProvider);
    method public abstract java.nio.channels.SocketChannel bind(java.net.SocketAddress) throws java.io.IOException;
    method public abstract boolean connect(java.net.SocketAddress) throws java.io.IOException;
    method public abstract boolean finishConnect() throws java.io.IOException;
    method public abstract java.net.SocketAddress getRemoteAddress() 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 long read(java.nio.ByteBuffer[]) throws java.io.IOException;
    method public abstract java.nio.channels.SocketChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
    method public abstract java.nio.channels.SocketChannel shutdownInput() throws java.io.IOException;
    method public abstract java.nio.channels.SocketChannel shutdownOutput() 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 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 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 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 boolean isRegistered();
    method public final 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.DatagramChannel openDatagramChannel(java.net.ProtocolFamily) 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 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.charset.CoderResult decode(java.nio.ByteBuffer, java.nio.CharBuffer, boolean);
    method public final java.nio.CharBuffer decode(java.nio.ByteBuffer) throws java.nio.charset.CharacterCodingException;
    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, byte[]);
    ctor protected CharsetEncoder(java.nio.charset.Charset, float, float);
    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.charset.CoderResult encode(java.nio.CharBuffer, java.nio.ByteBuffer, boolean);
    method public final java.nio.ByteBuffer encode(java.nio.CharBuffer) throws java.nio.charset.CharacterCodingException;
    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();
    method public static java.nio.charset.CoderResult malformedForLength(int);
    method public void throwException() throws java.nio.charset.CharacterCodingException;
    method public static java.nio.charset.CoderResult unmappableForLength(int);
    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.ProtectionDomain[]);
    ctor public AccessControlContext(java.security.AccessControlContext, java.security.DomainCombiner);
    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 abstract interface AlgorithmConstraints {
    method public abstract boolean permits(java.util.Set<java.security.CryptoPrimitive>, java.lang.String, java.security.AlgorithmParameters);
    method public abstract boolean permits(java.util.Set<java.security.CryptoPrimitive>, java.security.Key);
    method public abstract boolean permits(java.util.Set<java.security.CryptoPrimitive>, java.lang.String, java.security.Key, java.security.AlgorithmParameters);
  }

  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();
    ctor public AllPermission(java.lang.String, java.lang.String);
    method public boolean equals(java.lang.Object);
    method public java.lang.String getActions();
    method public int hashCode();
    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 boolean equals(java.lang.Object);
    method public java.lang.String getActions();
    method public int hashCode();
    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 final class CryptoPrimitive extends java.lang.Enum {
    method public static java.security.CryptoPrimitive valueOf(java.lang.String);
    method public static final java.security.CryptoPrimitive[] values();
    enum_constant public static final java.security.CryptoPrimitive BLOCK_CIPHER;
    enum_constant public static final java.security.CryptoPrimitive KEY_AGREEMENT;
    enum_constant public static final java.security.CryptoPrimitive KEY_ENCAPSULATION;
    enum_constant public static final java.security.CryptoPrimitive KEY_WRAP;
    enum_constant public static final java.security.CryptoPrimitive MAC;
    enum_constant public static final java.security.CryptoPrimitive MESSAGE_DIGEST;
    enum_constant public static final java.security.CryptoPrimitive PUBLIC_KEY_ENCRYPTION;
    enum_constant public static final java.security.CryptoPrimitive SECURE_RANDOM;
    enum_constant public static final java.security.CryptoPrimitive SIGNATURE;
    enum_constant public static final java.security.CryptoPrimitive STREAM_CIPHER;
  }

  public class DigestException extends java.security.GeneralSecurityException {
    ctor public DigestException();
    ctor public DigestException(java.lang.String);
    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();
    ctor public GeneralSecurityException(java.lang.String);
    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, java.security.IdentityScope) throws java.security.KeyManagementException;
    ctor public Identity(java.lang.String);
    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();
    ctor public InvalidAlgorithmParameterException(java.lang.String);
    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();
    ctor public InvalidKeyException(java.lang.String);
    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();
    ctor public InvalidParameterException(java.lang.String);
  }

  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();
    ctor public KeyException(java.lang.String);
    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();
    ctor public KeyManagementException(java.lang.String);
    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(int, java.security.SecureRandom);
    method public void initialize(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
  }

  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();
    ctor public KeyStoreException(java.lang.String);
    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();
    ctor public NoSuchAlgorithmException(java.lang.String);
    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();
    ctor public NoSuchProviderException(java.lang.String);
  }

  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 boolean equals(java.lang.Object);
    method public abstract java.lang.String getActions();
    method public final java.lang.String getName();
    method public abstract int hashCode();
    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 synchronized void forEach(java.util.function.BiConsumer<? super java.lang.Object, ? super java.lang.Object>);
    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();
    ctor public ProviderException(java.lang.String);
    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(java.lang.ClassLoader);
    ctor protected SecureClassLoader();
    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 java.security.Provider getProvider(java.lang.String);
    method public static java.security.Provider[] getProviders();
    method public static java.security.Provider[] getProviders(java.lang.String);
    method public static 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();
    ctor public SignatureException(java.lang.String);
    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();
    ctor public UnrecoverableKeyException(java.lang.String);
  }

  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 boolean equals(java.lang.Object);
    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 int hashCode();
    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();
    ctor public CRLException(java.lang.String);
    ctor public CRLException(java.lang.String, java.lang.Throwable);
    ctor public CRLException(java.lang.Throwable);
  }

  public final class CRLReason extends java.lang.Enum {
    method public static java.security.cert.CRLReason valueOf(java.lang.String);
    method public static final java.security.cert.CRLReason[] values();
    enum_constant public static final java.security.cert.CRLReason AA_COMPROMISE;
    enum_constant public static final java.security.cert.CRLReason AFFILIATION_CHANGED;
    enum_constant public static final java.security.cert.CRLReason CA_COMPROMISE;
    enum_constant public static final java.security.cert.CRLReason CERTIFICATE_HOLD;
    enum_constant public static final java.security.cert.CRLReason CESSATION_OF_OPERATION;
    enum_constant public static final java.security.cert.CRLReason KEY_COMPROMISE;
    enum_constant public static final java.security.cert.CRLReason PRIVILEGE_WITHDRAWN;
    enum_constant public static final java.security.cert.CRLReason REMOVE_FROM_CRL;
    enum_constant public static final java.security.cert.CRLReason SUPERSEDED;
    enum_constant public static final java.security.cert.CRLReason UNSPECIFIED;
    enum_constant public static final java.security.cert.CRLReason UNUSED;
  }

  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();
    method public final java.security.cert.CertPathChecker getRevocationChecker();
  }

  public class CertPathBuilderException extends java.security.GeneralSecurityException {
    ctor public CertPathBuilderException();
    ctor public CertPathBuilderException(java.lang.String);
    ctor public CertPathBuilderException(java.lang.Throwable);
    ctor public CertPathBuilderException(java.lang.String, java.lang.Throwable);
  }

  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;
    method public java.security.cert.CertPathChecker engineGetRevocationChecker();
  }

  public abstract interface CertPathChecker {
    method public abstract void check(java.security.cert.Certificate) throws java.security.cert.CertPathValidatorException;
    method public abstract void init(boolean) throws java.security.cert.CertPathValidatorException;
    method public abstract boolean isForwardCheckingSupported();
  }

  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.CertPathChecker getRevocationChecker();
    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();
    ctor public CertPathValidatorException(java.lang.String);
    ctor public CertPathValidatorException(java.lang.Throwable);
    ctor public CertPathValidatorException(java.lang.String, java.lang.Throwable);
    ctor public CertPathValidatorException(java.lang.String, java.lang.Throwable, java.security.cert.CertPath, int);
    ctor public CertPathValidatorException(java.lang.String, java.lang.Throwable, java.security.cert.CertPath, int, java.security.cert.CertPathValidatorException.Reason);
    method public java.security.cert.CertPath getCertPath();
    method public int getIndex();
    method public java.security.cert.CertPathValidatorException.Reason getReason();
  }

  public static final class CertPathValidatorException.BasicReason extends java.lang.Enum implements java.security.cert.CertPathValidatorException.Reason {
    method public static java.security.cert.CertPathValidatorException.BasicReason valueOf(java.lang.String);
    method public static final java.security.cert.CertPathValidatorException.BasicReason[] values();
    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason ALGORITHM_CONSTRAINED;
    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason EXPIRED;
    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason INVALID_SIGNATURE;
    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason NOT_YET_VALID;
    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason REVOKED;
    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason UNDETERMINED_REVOCATION_STATUS;
    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason UNSPECIFIED;
  }

  public static abstract interface CertPathValidatorException.Reason implements java.io.Serializable {
  }

  public abstract interface CertPathValidatorResult implements java.lang.Cloneable {
    method public abstract java.lang.Object clone();
  }

  public abstract class CertPathValidatorSpi {
    ctor public CertPathValidatorSpi();
    method public java.security.cert.CertPathChecker engineGetRevocationChecker();
    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();
    ctor public CertStoreException(java.lang.String);
    ctor public CertStoreException(java.lang.Throwable);
    ctor public CertStoreException(java.lang.String, java.lang.Throwable);
  }

  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();
    ctor public CertificateEncodingException(java.lang.String);
    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();
    ctor public CertificateException(java.lang.String);
    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();
    ctor public CertificateExpiredException(java.lang.String);
  }

  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();
    ctor public CertificateNotYetValidException(java.lang.String);
  }

  public class CertificateParsingException extends java.security.cert.CertificateException {
    ctor public CertificateParsingException();
    ctor public CertificateParsingException(java.lang.String);
    ctor public CertificateParsingException(java.lang.String, java.lang.Throwable);
    ctor public CertificateParsingException(java.lang.Throwable);
  }

  public class CertificateRevokedException extends java.security.cert.CertificateException {
    ctor public CertificateRevokedException(java.util.Date, java.security.cert.CRLReason, javax.security.auth.x500.X500Principal, java.util.Map<java.lang.String, java.security.cert.Extension>);
    method public javax.security.auth.x500.X500Principal getAuthorityName();
    method public java.util.Map<java.lang.String, java.security.cert.Extension> getExtensions();
    method public java.util.Date getInvalidityDate();
    method public java.util.Date getRevocationDate();
    method public java.security.cert.CRLReason getRevocationReason();
  }

  public class CollectionCertStoreParameters implements java.security.cert.CertStoreParameters {
    ctor public CollectionCertStoreParameters(java.util.Collection<?>);
    ctor public CollectionCertStoreParameters();
    method public java.lang.Object clone();
    method public java.util.Collection<?> getCollection();
  }

  public abstract interface Extension {
    method public abstract void encode(java.io.OutputStream) throws java.io.IOException;
    method public abstract java.lang.String getId();
    method public abstract byte[] getValue();
    method public abstract boolean isCritical();
  }

  public class LDAPCertStoreParameters implements java.security.cert.CertStoreParameters {
    ctor public LDAPCertStoreParameters(java.lang.String, int);
    ctor public LDAPCertStoreParameters(java.lang.String);
    ctor public LDAPCertStoreParameters();
    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.security.cert.CertPathChecker 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 void check(java.security.cert.Certificate) 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 final class PKIXReason extends java.lang.Enum implements java.security.cert.CertPathValidatorException.Reason {
    method public static java.security.cert.PKIXReason valueOf(java.lang.String);
    method public static final java.security.cert.PKIXReason[] values();
    enum_constant public static final java.security.cert.PKIXReason INVALID_KEY_USAGE;
    enum_constant public static final java.security.cert.PKIXReason INVALID_NAME;
    enum_constant public static final java.security.cert.PKIXReason INVALID_POLICY;
    enum_constant public static final java.security.cert.PKIXReason NAME_CHAINING;
    enum_constant public static final java.security.cert.PKIXReason NOT_CA_CERT;
    enum_constant public static final java.security.cert.PKIXReason NO_TRUST_ANCHOR;
    enum_constant public static final java.security.cert.PKIXReason PATH_TOO_LONG;
    enum_constant public static final java.security.cert.PKIXReason UNRECOGNIZED_CRIT_EXT;
  }

  public abstract class PKIXRevocationChecker extends java.security.cert.PKIXCertPathChecker {
    ctor protected PKIXRevocationChecker();
    method public java.util.List<java.security.cert.Extension> getOcspExtensions();
    method public java.net.URI getOcspResponder();
    method public java.security.cert.X509Certificate getOcspResponderCert();
    method public java.util.Map<java.security.cert.X509Certificate, byte[]> getOcspResponses();
    method public java.util.Set<java.security.cert.PKIXRevocationChecker.Option> getOptions();
    method public abstract java.util.List<java.security.cert.CertPathValidatorException> getSoftFailExceptions();
    method public void setOcspExtensions(java.util.List<java.security.cert.Extension>);
    method public void setOcspResponder(java.net.URI);
    method public void setOcspResponderCert(java.security.cert.X509Certificate);
    method public void setOcspResponses(java.util.Map<java.security.cert.X509Certificate, byte[]>);
    method public void setOptions(java.util.Set<java.security.cert.PKIXRevocationChecker.Option>);
  }

  public static final class PKIXRevocationChecker.Option extends java.lang.Enum {
    method public static java.security.cert.PKIXRevocationChecker.Option valueOf(java.lang.String);
    method public static final java.security.cert.PKIXRevocationChecker.Option[] values();
    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option NO_FALLBACK;
    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option ONLY_END_ENTITY;
    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option PREFER_CRLS;
    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option SOFT_FAIL;
  }

  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(javax.security.auth.x500.X500Principal, java.security.PublicKey, byte[]);
    ctor public TrustAnchor(java.lang.String, 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 java.security.cert.CRLReason getRevocationReason();
    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();
    method public void verify(java.security.PublicKey, java.security.Provider) throws java.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.SignatureException;
  }

  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);
    ctor public EllipticCurve(java.security.spec.ECField, java.math.BigInteger, java.math.BigInteger, byte[]);
    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();
    ctor public InvalidKeySpecException(java.lang.String);
    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();
    ctor public InvalidParameterSpecException(java.lang.String);
  }

  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(java.lang.String, java.lang.String, java.security.spec.AlgorithmParameterSpec, int, int);
    ctor public PSSParameterSpec(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(java.util.Map<java.lang.String, java.lang.Class<?>>) 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 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(java.util.Map<java.lang.String, java.lang.Class<?>>) 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;
  }

  public class BatchUpdateException extends java.sql.SQLException {
    ctor public BatchUpdateException(java.lang.String, java.lang.String, int, int[]);
    ctor public BatchUpdateException(java.lang.String, java.lang.String, int[]);
    ctor public BatchUpdateException(java.lang.String, int[]);
    ctor public BatchUpdateException(int[]);
    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);
    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(byte[], long) throws java.sql.SQLException;
    method public abstract long position(java.sql.Blob, 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 deprecated java.math.BigDecimal getBigDecimal(int, int) throws java.sql.SQLException;
    method public abstract java.math.BigDecimal getBigDecimal(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, int, int) 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) 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.lang.String, long) throws java.sql.SQLException;
    method public abstract long position(java.sql.Clob, 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, 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, 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, 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 {
    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 synchronized void deregisterDriver(java.sql.Driver) 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.Connection getConnection(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 synchronized 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, int) 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, 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(java.util.Map<java.lang.String, java.lang.Class<?>>) throws java.sql.SQLException;
    method public abstract java.lang.Object getObject() 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 deprecated java.math.BigDecimal getBigDecimal(int, int) throws java.sql.SQLException;
    method public abstract deprecated java.math.BigDecimal getBigDecimal(java.lang.String, int) throws java.sql.SQLException;
    method public abstract java.math.BigDecimal getBigDecimal(int) throws java.sql.SQLException;
    method public abstract java.math.BigDecimal getBigDecimal(java.lang.String) 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(java.lang.String) 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, 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(java.lang.String) 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, 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(java.lang.String) 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, 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(java.lang.String) 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, 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, int) throws java.sql.SQLException;
    method public abstract void updateObject(int, 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 updateObject(java.lang.String, java.lang.Object) 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, 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);
    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);
    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 {
    ctor public SQLException(java.lang.String, java.lang.String, int);
    ctor public SQLException(java.lang.String, java.lang.String);
    ctor public SQLException(java.lang.String);
    ctor public SQLException();
    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 {
    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 {
    ctor public SQLWarning(java.lang.String, java.lang.String, int);
    ctor public SQLWarning(java.lang.String, java.lang.String);
    ctor public SQLWarning(java.lang.String);
    ctor public SQLWarning();
    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);
    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);
    method public static java.sql.Timestamp valueOf(java.lang.String);
  }

  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.lang.String);
    ctor public AttributedString(java.lang.String, java.util.Map<? extends java.text.AttributedCharacterIterator.Attribute, ?>);
    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[]);
    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.lang.String, int);
    ctor public Bidi(java.text.AttributedCharacterIterator);
    ctor public Bidi(char[], int, byte[], int, int, 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 synchronized 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(int);
    method public abstract int next();
    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(java.lang.String);
    ctor public ChoiceFormat(double[], java.lang.String[]);
    method public void applyPattern(java.lang.String);
    method public java.lang.StringBuffer format(long, java.lang.StringBuffer, java.text.FieldPosition);
    method public java.lang.StringBuffer format(double, 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.lang.String);
    method public void setText(java.text.CharacterIterator);
    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 abstract int compare(java.lang.String, java.lang.String);
    method public int compare(java.lang.Object, java.lang.Object);
    method public boolean equals(java.lang.String, java.lang.String);
    method public static synchronized java.util.Locale[] getAvailableLocales();
    method public abstract java.text.CollationKey getCollationKey(java.lang.String);
    method public synchronized int getDecomposition();
    method public static synchronized java.text.Collator getInstance();
    method public static synchronized java.text.Collator getInstance(java.util.Locale);
    method public synchronized int getStrength();
    method public abstract int hashCode();
    method public synchronized void setDecomposition(int);
    method public synchronized 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 abstract java.lang.StringBuffer format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String format(java.util.Date);
    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 final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    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.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 final java.text.DecimalFormatSymbols getInstance();
    method public static final 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 abstract java.lang.Object parseObject(java.lang.String, java.text.ParsePosition);
    method public java.lang.Object parseObject(java.lang.String) throws java.text.ParseException;
  }

  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);
    ctor public MessageFormat(java.lang.String, java.util.Locale);
    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 static java.lang.String format(java.lang.String, java.lang.Object...);
    method public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    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, java.text.ParsePosition);
    method public java.lang.Object[] parse(java.lang.String) throws java.text.ParseException;
    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 java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition);
    method public final java.lang.String format(double);
    method public final java.lang.String format(long);
    method public abstract java.lang.StringBuffer format(double, java.lang.StringBuffer, java.text.FieldPosition);
    method public abstract java.lang.StringBuffer format(long, 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 abstract java.lang.Number parse(java.lang.String, java.text.ParsePosition);
    method public java.lang.Number parse(java.lang.String) throws java.text.ParseException;
    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 synchronized int compare(java.lang.String, java.lang.String);
    method public java.text.CollationElementIterator getCollationElementIterator(java.lang.String);
    method public java.text.CollationElementIterator getCollationElementIterator(java.text.CharacterIterator);
    method public synchronized 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.util.Locale);
    ctor public SimpleDateFormat(java.lang.String, java.text.DateFormatSymbols);
    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();
    method public java.util.Spliterator<E> spliterator();
  }

  public class ArrayList extends java.util.AbstractList implements java.lang.Cloneable java.util.List 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 void forEach(java.util.function.Consumer<? super E>);
    method public E get(int);
    method public boolean removeIf(java.util.function.Predicate<? super E>);
    method public int size();
    method public java.util.Spliterator<E> spliterator();
    method public void trimToSize();
  }

  public class Arrays {
    method public static java.util.List<T> asList(T...);
    method public static int binarySearch(long[], long);
    method public static int binarySearch(long[], int, int, long);
    method public static int binarySearch(int[], int);
    method public static int binarySearch(int[], int, int, int);
    method public static int binarySearch(short[], short);
    method public static int binarySearch(short[], int, int, short);
    method public static int binarySearch(char[], char);
    method public static int binarySearch(char[], int, int, char);
    method public static int binarySearch(byte[], byte);
    method public static int binarySearch(byte[], int, int, byte);
    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(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 T[] copyOf(T[], int);
    method public static T[] copyOf(U[], int, java.lang.Class<? extends T[]>);
    method public static byte[] copyOf(byte[], int);
    method public static short[] copyOf(short[], int);
    method public static int[] copyOf(int[], int);
    method public static long[] copyOf(long[], int);
    method public static char[] copyOf(char[], int);
    method public static float[] copyOf(float[], int);
    method public static double[] copyOf(double[], int);
    method public static boolean[] copyOf(boolean[], 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 byte[] copyOfRange(byte[], int, int);
    method public static short[] copyOfRange(short[], int, int);
    method public static int[] copyOfRange(int[], int, int);
    method public static long[] copyOfRange(long[], int, int);
    method public static char[] copyOfRange(char[], int, int);
    method public static float[] copyOfRange(float[], int, int);
    method public static double[] copyOfRange(double[], int, int);
    method public static boolean[] copyOfRange(boolean[], int, int);
    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(long[], long[]);
    method public static boolean equals(int[], int[]);
    method public static boolean equals(short[], short[]);
    method public static boolean equals(char[], char[]);
    method public static boolean equals(byte[], byte[]);
    method public static boolean equals(boolean[], boolean[]);
    method public static boolean equals(double[], double[]);
    method public static boolean equals(float[], float[]);
    method public static boolean equals(java.lang.Object[], java.lang.Object[]);
    method public static void fill(long[], long);
    method public static void fill(long[], int, int, long);
    method public static void fill(int[], int);
    method public static void fill(int[], int, int, int);
    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(byte[], byte);
    method public static void fill(byte[], int, int, byte);
    method public static void fill(boolean[], boolean);
    method public static void fill(boolean[], int, int, boolean);
    method public static void fill(double[], double);
    method public static void fill(double[], int, int, double);
    method public static void fill(float[], float);
    method public static void fill(float[], int, int, float);
    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(long[]);
    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(boolean[]);
    method public static int hashCode(float[]);
    method public static int hashCode(double[]);
    method public static int hashCode(java.lang.Object[]);
    method public static void parallelSort(byte[]);
    method public static void parallelSort(byte[], int, int);
    method public static void parallelSort(char[]);
    method public static void parallelSort(char[], int, int);
    method public static void parallelSort(short[]);
    method public static void parallelSort(short[], int, int);
    method public static void parallelSort(int[]);
    method public static void parallelSort(int[], int, int);
    method public static void parallelSort(long[]);
    method public static void parallelSort(long[], int, int);
    method public static void parallelSort(float[]);
    method public static void parallelSort(float[], int, int);
    method public static void parallelSort(double[]);
    method public static void parallelSort(double[], int, int);
    method public static void parallelSort(T[]);
    method public static void parallelSort(T[], int, int);
    method public static void parallelSort(T[], java.util.Comparator<? super T>);
    method public static void parallelSort(T[], int, int, java.util.Comparator<? super T>);
    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(char[]);
    method public static void sort(char[], int, int);
    method public static void sort(byte[]);
    method public static void sort(byte[], int, int);
    method public static void sort(float[]);
    method public static void sort(float[], int, int);
    method public static void sort(double[]);
    method public static void sort(double[], 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[], java.util.Comparator<? super T>);
    method public static void sort(T[], int, int, java.util.Comparator<? super T>);
    method public static java.util.Spliterator<T> spliterator(T[]);
    method public static java.util.Spliterator<T> spliterator(T[], int, int);
    method public static java.util.Spliterator.OfInt spliterator(int[]);
    method public static java.util.Spliterator.OfInt spliterator(int[], int, int);
    method public static java.util.Spliterator.OfLong spliterator(long[]);
    method public static java.util.Spliterator.OfLong spliterator(long[], int, int);
    method public static java.util.Spliterator.OfDouble spliterator(double[]);
    method public static java.util.Spliterator.OfDouble spliterator(double[], int, int);
    method public static java.lang.String toString(long[]);
    method public static java.lang.String toString(int[]);
    method public static java.lang.String toString(short[]);
    method public static java.lang.String toString(char[]);
    method public static java.lang.String toString(byte[]);
    method public static java.lang.String toString(boolean[]);
    method public static java.lang.String toString(float[]);
    method public static java.lang.String toString(double[]);
    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(int, int);
    method public void clear();
    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);
    method public void set(int, int, boolean);
    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 java.util.Calendar getInstance();
    method public static java.util.Calendar getInstance(java.util.TimeZone);
    method public static java.util.Calendar getInstance(java.util.Locale);
    method public static 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 public int getWeekYear();
    method public int getWeeksInWeekYear();
    method protected final int internalGet(int);
    method public boolean isLenient();
    method public final boolean isSet(int);
    method public boolean isWeekDateSupported();
    method public abstract void roll(int, boolean);
    method public void roll(int, int);
    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);
    method public void setWeekDate(int, int, int);
    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 default boolean removeIf(java.util.function.Predicate<? super E>);
    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<T> synchronizedSet(java.util.Set<T>);
    method public static java.util.SortedMap<K, V> synchronizedSortedMap(java.util.SortedMap<K, V>);
    method public static java.util.SortedSet<T> synchronizedSortedSet(java.util.SortedSet<T>);
    method public static java.util.Collection<T> unmodifiableCollection(java.util.Collection<? extends T>);
    method public static java.util.List<T> unmodifiableList(java.util.List<? extends T>);
    method public static java.util.Map<K, V> unmodifiableMap(java.util.Map<? extends K, ? extends V>);
    method public static java.util.Set<T> unmodifiableSet(java.util.Set<? extends T>);
    method public static java.util.SortedMap<K, V> unmodifiableSortedMap(java.util.SortedMap<K, ? extends V>);
    method public static java.util.SortedSet<T> unmodifiableSortedSet(java.util.SortedSet<T>);
    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 static java.util.Comparator<T> comparing(java.util.function.Function<? super T, ? extends U>, java.util.Comparator<? super U>);
    method public static java.util.Comparator<T> comparing(java.util.function.Function<? super T, ? extends U>);
    method public static java.util.Comparator<T> comparingDouble(java.util.function.ToDoubleFunction<? super T>);
    method public static java.util.Comparator<T> comparingInt(java.util.function.ToIntFunction<? super T>);
    method public static java.util.Comparator<T> comparingLong(java.util.function.ToLongFunction<? super T>);
    method public abstract boolean equals(java.lang.Object);
    method public static java.util.Comparator<T> naturalOrder();
    method public static java.util.Comparator<T> nullsFirst(java.util.Comparator<? super T>);
    method public static java.util.Comparator<T> nullsLast(java.util.Comparator<? super T>);
    method public static java.util.Comparator<T> reverseOrder();
    method public default java.util.Comparator<T> reversed();
    method public default java.util.Comparator<T> thenComparing(java.util.Comparator<? super T>);
    method public default java.util.Comparator<T> thenComparing(java.util.function.Function<? super T, ? extends U>, java.util.Comparator<? super U>);
    method public default java.util.Comparator<T> thenComparing(java.util.function.Function<? super T, ? extends U>);
    method public default java.util.Comparator<T> thenComparingDouble(java.util.function.ToDoubleFunction<? super T>);
    method public default java.util.Comparator<T> thenComparingInt(java.util.function.ToIntFunction<? super T>);
    method public default java.util.Comparator<T> thenComparingLong(java.util.function.ToLongFunction<? super T>);
  }

  public class ConcurrentModificationException extends java.lang.RuntimeException {
    ctor public ConcurrentModificationException();
    ctor public ConcurrentModificationException(java.lang.String);
    ctor public ConcurrentModificationException(java.lang.Throwable);
    ctor public ConcurrentModificationException(java.lang.String, 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 int getNumericCode();
    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 Date(long);
    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 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 DoubleSummaryStatistics implements java.util.function.DoubleConsumer {
    ctor public DoubleSummaryStatistics();
    method public void accept(double);
    method public void combine(java.util.DoubleSummaryStatistics);
    method public final double getAverage();
    method public final long getCount();
    method public final double getMax();
    method public final double getMin();
    method public final double getSum();
  }

  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.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(T);
    method public T 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 {
    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);
  }

  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.PrintStream);
    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;
    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 {
    ctor public FormatterClosedException();
  }

  public class GregorianCalendar extends java.util.Calendar {
    ctor public GregorianCalendar();
    ctor public GregorianCalendar(java.util.TimeZone);
    ctor public GregorianCalendar(java.util.Locale);
    ctor public GregorianCalendar(java.util.TimeZone, java.util.Locale);
    ctor public GregorianCalendar(int, int, int);
    ctor public GregorianCalendar(int, int, int, int, int);
    ctor public GregorianCalendar(int, int, int, int, int, int);
    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 final boolean isWeekDateSupported();
    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.util.Map java.io.Serializable {
    ctor public HashMap(int, float);
    ctor public HashMap(int);
    ctor public HashMap();
    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();
    method public void forEach(java.util.function.BiConsumer<? super K, ? super V>);
  }

  public class HashSet extends java.util.AbstractSet implements java.lang.Cloneable java.io.Serializable java.util.Set {
    ctor public HashSet();
    ctor public HashSet(java.util.Collection<? extends E>);
    ctor public HashSet(int, float);
    ctor public HashSet(int);
    method public java.lang.Object clone();
    method public java.util.Iterator<E> iterator();
    method public int size();
    method public java.util.Spliterator<E> spliterator();
  }

  public class Hashtable extends java.util.Dictionary implements java.lang.Cloneable java.util.Map java.io.Serializable {
    ctor public Hashtable(int, float);
    ctor public Hashtable(int);
    ctor public Hashtable();
    ctor public Hashtable(java.util.Map<? extends K, ? extends V>);
    method public synchronized void clear();
    method public synchronized java.lang.Object clone();
    method public synchronized boolean contains(java.lang.Object);
    method public synchronized boolean containsKey(java.lang.Object);
    method public boolean containsValue(java.lang.Object);
    method public synchronized java.util.Enumeration<V> elements();
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public synchronized void forEach(java.util.function.BiConsumer<? super K, ? super V>);
    method public synchronized V get(java.lang.Object);
    method public synchronized boolean isEmpty();
    method public 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 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();
    method public void forEach(java.util.function.BiConsumer<? super K, ? super V>);
  }

  public class IllegalFormatCodePointException extends java.util.IllegalFormatException {
    ctor public IllegalFormatCodePointException(int);
    method public int getCodePoint();
  }

  public class IllegalFormatConversionException extends java.util.IllegalFormatException {
    ctor public IllegalFormatConversionException(char, java.lang.Class<?>);
    method public java.lang.Class<?> getArgumentClass();
    method public char getConversion();
  }

  public class IllegalFormatException extends java.lang.IllegalArgumentException {
  }

  public class IllegalFormatFlagsException extends java.util.IllegalFormatException {
    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 {
    ctor public InputMismatchException();
    ctor public InputMismatchException(java.lang.String);
  }

  public class IntSummaryStatistics implements java.util.function.IntConsumer {
    ctor public IntSummaryStatistics();
    method public void accept(int);
    method public void combine(java.util.IntSummaryStatistics);
    method public final double getAverage();
    method public final long getCount();
    method public final int getMax();
    method public final int getMin();
    method public final long getSum();
  }

  public class InvalidPropertiesFormatException extends java.io.IOException {
    ctor public InvalidPropertiesFormatException(java.lang.Throwable);
    ctor public InvalidPropertiesFormatException(java.lang.String);
  }

  public abstract interface Iterator {
    method public default void forEachRemaining(java.util.function.Consumer<? super E>);
    method public abstract boolean hasNext();
    method public abstract E next();
    method public default void remove();
  }

  public class LinkedHashMap extends java.util.HashMap implements java.util.Map {
    ctor public LinkedHashMap(int, float);
    ctor public LinkedHashMap(int);
    ctor public LinkedHashMap();
    ctor public LinkedHashMap(java.util.Map<? extends K, ? extends V>);
    ctor public LinkedHashMap(int, float, boolean);
    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(int, float);
    ctor public LinkedHashSet(int);
    ctor public LinkedHashSet();
    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.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();
    method public java.util.Spliterator<E> spliterator();
  }

  public abstract interface List implements java.util.Collection {
    method public abstract boolean add(E);
    method public abstract void add(int, E);
    method public abstract boolean addAll(java.util.Collection<? extends E>);
    method public abstract boolean addAll(int, 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 boolean remove(java.lang.Object);
    method public abstract E remove(int);
    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, java.lang.String, java.lang.String);
    ctor public Locale(java.lang.String, java.lang.String);
    ctor public Locale(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 static java.util.Locale getDefault(java.util.Locale.Category);
    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() throws java.util.MissingResourceException;
    method public java.lang.String getISO3Language() throws java.util.MissingResourceException;
    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 static synchronized void setDefault(java.util.Locale.Category, 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 static final class Locale.Category extends java.lang.Enum {
    method public static java.util.Locale.Category valueOf(java.lang.String);
    method public static final java.util.Locale.Category[] values();
    enum_constant public static final java.util.Locale.Category DISPLAY;
    enum_constant public static final java.util.Locale.Category FORMAT;
  }

  public class LongSummaryStatistics implements java.util.function.IntConsumer java.util.function.LongConsumer {
    ctor public LongSummaryStatistics();
    method public void accept(int);
    method public void accept(long);
    method public void combine(java.util.LongSummaryStatistics);
    method public final double getAverage();
    method public final long getCount();
    method public final long getMax();
    method public final long getMin();
    method public final long getSum();
  }

  public abstract interface Map {
    method public abstract void clear();
    method public default V compute(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    method public default V computeIfAbsent(K, java.util.function.Function<? super K, ? extends V>);
    method public default V computeIfPresent(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    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 default void forEach(java.util.function.BiConsumer<? super K, ? super V>);
    method public abstract V get(java.lang.Object);
    method public default V getOrDefault(java.lang.Object, V);
    method public abstract int hashCode();
    method public abstract boolean isEmpty();
    method public abstract java.util.Set<K> keySet();
    method public default V merge(K, V, java.util.function.BiFunction<? super V, ? super V, ? extends V>);
    method public abstract V put(K, V);
    method public abstract void putAll(java.util.Map<? extends K, ? extends V>);
    method public default V putIfAbsent(K, V);
    method public abstract V remove(java.lang.Object);
    method public default boolean remove(java.lang.Object, java.lang.Object);
    method public default boolean replace(K, V, V);
    method public default V replace(K, V);
    method public default void replaceAll(java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    method public abstract int size();
    method public abstract java.util.Collection<V> values();
  }

  public static abstract interface Map.Entry {
    method public static java.util.Comparator<java.util.Map.Entry<K, V>> comparingByKey();
    method public static java.util.Comparator<java.util.Map.Entry<K, V>> comparingByKey(java.util.Comparator<? super K>);
    method public static java.util.Comparator<java.util.Map.Entry<K, V>> comparingByValue();
    method public static java.util.Comparator<java.util.Map.Entry<K, V>> comparingByValue(java.util.Comparator<? super V>);
    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 boolean isNull(java.lang.Object);
    method public static boolean nonNull(java.lang.Object);
    method public static T requireNonNull(T);
    method public static T requireNonNull(T, java.lang.String);
    method public static T requireNonNull(T, java.util.function.Supplier<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 synchronized void addObserver(java.util.Observer);
    method protected synchronized void clearChanged();
    method public synchronized int countObservers();
    method public synchronized void deleteObserver(java.util.Observer);
    method public synchronized void deleteObservers();
    method public synchronized boolean hasChanged();
    method public void notifyObservers();
    method public void notifyObservers(java.lang.Object);
    method protected synchronized void setChanged();
  }

  public abstract interface Observer {
    method public abstract void update(java.util.Observable, java.lang.Object);
  }

  public final class Optional {
    method public static java.util.Optional<T> empty();
    method public java.util.Optional<T> filter(java.util.function.Predicate<? super T>);
    method public java.util.Optional<U> flatMap(java.util.function.Function<? super T, java.util.Optional<U>>);
    method public T get();
    method public void ifPresent(java.util.function.Consumer<? super T>);
    method public boolean isPresent();
    method public java.util.Optional<U> map(java.util.function.Function<? super T, ? extends U>);
    method public static java.util.Optional<T> of(T);
    method public static java.util.Optional<T> ofNullable(T);
    method public T orElse(T);
    method public T orElseGet(java.util.function.Supplier<? extends T>);
    method public T orElseThrow(java.util.function.Supplier<? extends X>) throws java.lang.Throwable;
  }

  public final class OptionalDouble {
    method public static java.util.OptionalDouble empty();
    method public double getAsDouble();
    method public void ifPresent(java.util.function.DoubleConsumer);
    method public boolean isPresent();
    method public static java.util.OptionalDouble of(double);
    method public double orElse(double);
    method public double orElseGet(java.util.function.DoubleSupplier);
    method public double orElseThrow(java.util.function.Supplier<X>) throws java.lang.Throwable;
  }

  public final class OptionalInt {
    method public static java.util.OptionalInt empty();
    method public int getAsInt();
    method public void ifPresent(java.util.function.IntConsumer);
    method public boolean isPresent();
    method public static java.util.OptionalInt of(int);
    method public int orElse(int);
    method public int orElseGet(java.util.function.IntSupplier);
    method public int orElseThrow(java.util.function.Supplier<X>) throws java.lang.Throwable;
  }

  public final class OptionalLong {
    method public static java.util.OptionalLong empty();
    method public long getAsLong();
    method public void ifPresent(java.util.function.LongConsumer);
    method public boolean isPresent();
    method public static java.util.OptionalLong of(long);
    method public long orElse(long);
    method public long orElseGet(java.util.function.LongSupplier);
    method public long orElseThrow(java.util.function.Supplier<X>) throws java.lang.Throwable;
  }

  public abstract interface PrimitiveIterator implements java.util.Iterator {
    method public abstract void forEachRemaining(T_CONS);
  }

  public static abstract interface PrimitiveIterator.OfDouble implements java.util.PrimitiveIterator {
    method public default void forEachRemaining(java.util.function.DoubleConsumer);
    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Double>);
    method public default java.lang.Double next();
    method public abstract double nextDouble();
  }

  public static abstract interface PrimitiveIterator.OfInt implements java.util.PrimitiveIterator {
    method public default void forEachRemaining(java.util.function.IntConsumer);
    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Integer>);
    method public default java.lang.Integer next();
    method public abstract int nextInt();
  }

  public static abstract interface PrimitiveIterator.OfLong implements java.util.PrimitiveIterator {
    method public default void forEachRemaining(java.util.function.LongConsumer);
    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Long>);
    method public default java.lang.Long next();
    method public abstract long nextLong();
  }

  public class PriorityQueue extends java.util.AbstractQueue implements java.io.Serializable {
    ctor public PriorityQueue();
    ctor public PriorityQueue(int);
    ctor public PriorityQueue(java.util.Comparator<? super E>);
    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();
    method public final java.util.Spliterator<E> spliterator();
  }

  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.Reader) throws java.io.IOException;
    method public synchronized void load(java.io.InputStream) 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 synchronized java.lang.Object setProperty(java.lang.String, java.lang.String);
    method public void store(java.io.Writer, java.lang.String) throws java.io.IOException;
    method public void store(java.io.OutputStream, java.lang.String) throws java.io.IOException;
    method public void storeToXML(java.io.OutputStream, java.lang.String) throws java.io.IOException;
    method public 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 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 final void clearCache();
    method public static final void clearCache(java.lang.ClassLoader);
    method public boolean containsKey(java.lang.String);
    method public static final java.util.ResourceBundle getBundle(java.lang.String);
    method public static final java.util.ResourceBundle getBundle(java.lang.String, java.util.ResourceBundle.Control);
    method public static final java.util.ResourceBundle getBundle(java.lang.String, java.util.Locale);
    method public static final 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);
    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 final 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 final 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.lang.Readable);
    ctor public Scanner(java.io.InputStream);
    ctor public Scanner(java.io.InputStream, java.lang.String);
    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.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.lang.String);
    method public java.lang.String findInLine(java.util.regex.Pattern);
    method public java.lang.String findWithinHorizon(java.lang.String, int);
    method public java.lang.String findWithinHorizon(java.util.regex.Pattern, int);
    method public boolean hasNext();
    method public boolean hasNext(java.lang.String);
    method public boolean hasNext(java.util.regex.Pattern);
    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.lang.String);
    method public java.lang.String next(java.util.regex.Pattern);
    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 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, int);
    method public void setEndRule(int, int, int);
    method public void setEndRule(int, int, int, int, boolean);
    method public void setRawOffset(int);
    method public void setStartRule(int, int, int, int);
    method public void setStartRule(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 java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public abstract K firstKey();
    method public abstract java.util.SortedMap<K, V> headMap(K);
    method public abstract java.util.Set<K> keySet();
    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);
    method public abstract java.util.Collection<V> values();
  }

  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 abstract interface Spliterator {
    method public abstract int characteristics();
    method public abstract long estimateSize();
    method public default void forEachRemaining(java.util.function.Consumer<? super T>);
    method public default java.util.Comparator<? super T> getComparator();
    method public default long getExactSizeIfKnown();
    method public default boolean hasCharacteristics(int);
    method public abstract boolean tryAdvance(java.util.function.Consumer<? super T>);
    method public abstract java.util.Spliterator<T> trySplit();
    field public static final int CONCURRENT = 4096; // 0x1000
    field public static final int DISTINCT = 1; // 0x1
    field public static final int IMMUTABLE = 1024; // 0x400
    field public static final int NONNULL = 256; // 0x100
    field public static final int ORDERED = 16; // 0x10
    field public static final int SIZED = 64; // 0x40
    field public static final int SORTED = 4; // 0x4
    field public static final int SUBSIZED = 16384; // 0x4000
  }

  public static abstract interface Spliterator.OfDouble implements java.util.Spliterator.OfPrimitive {
    method public default void forEachRemaining(java.util.function.DoubleConsumer);
    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Double>);
    method public abstract boolean tryAdvance(java.util.function.DoubleConsumer);
    method public default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Double>);
    method public abstract java.util.Spliterator.OfDouble trySplit();
  }

  public static abstract interface Spliterator.OfInt implements java.util.Spliterator.OfPrimitive {
    method public default void forEachRemaining(java.util.function.IntConsumer);
    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Integer>);
    method public abstract boolean tryAdvance(java.util.function.IntConsumer);
    method public default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Integer>);
    method public abstract java.util.Spliterator.OfInt trySplit();
  }

  public static abstract interface Spliterator.OfLong implements java.util.Spliterator.OfPrimitive {
    method public default void forEachRemaining(java.util.function.LongConsumer);
    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Long>);
    method public abstract boolean tryAdvance(java.util.function.LongConsumer);
    method public default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Long>);
    method public abstract java.util.Spliterator.OfLong trySplit();
  }

  public static abstract interface Spliterator.OfPrimitive implements java.util.Spliterator {
    method public default void forEachRemaining(T_CONS);
    method public abstract boolean tryAdvance(T_CONS);
    method public abstract T_SPLITR trySplit();
  }

  public final class Spliterators {
    method public static java.util.Spliterator.OfDouble emptyDoubleSpliterator();
    method public static java.util.Spliterator.OfInt emptyIntSpliterator();
    method public static java.util.Spliterator.OfLong emptyLongSpliterator();
    method public static java.util.Spliterator<T> emptySpliterator();
    method public static java.util.Iterator<T> iterator(java.util.Spliterator<? extends T>);
    method public static java.util.PrimitiveIterator.OfInt iterator(java.util.Spliterator.OfInt);
    method public static java.util.PrimitiveIterator.OfLong iterator(java.util.Spliterator.OfLong);
    method public static java.util.PrimitiveIterator.OfDouble iterator(java.util.Spliterator.OfDouble);
    method public static java.util.Spliterator<T> spliterator(java.lang.Object[], int);
    method public static java.util.Spliterator<T> spliterator(java.lang.Object[], int, int, int);
    method public static java.util.Spliterator.OfInt spliterator(int[], int);
    method public static java.util.Spliterator.OfInt spliterator(int[], int, int, int);
    method public static java.util.Spliterator.OfLong spliterator(long[], int);
    method public static java.util.Spliterator.OfLong spliterator(long[], int, int, int);
    method public static java.util.Spliterator.OfDouble spliterator(double[], int);
    method public static java.util.Spliterator.OfDouble spliterator(double[], int, int, int);
    method public static java.util.Spliterator<T> spliterator(java.util.Collection<? extends T>, int);
    method public static java.util.Spliterator<T> spliterator(java.util.Iterator<? extends T>, long, int);
    method public static java.util.Spliterator.OfInt spliterator(java.util.PrimitiveIterator.OfInt, long, int);
    method public static java.util.Spliterator.OfLong spliterator(java.util.PrimitiveIterator.OfLong, long, int);
    method public static java.util.Spliterator.OfDouble spliterator(java.util.PrimitiveIterator.OfDouble, long, int);
    method public static java.util.Spliterator<T> spliteratorUnknownSize(java.util.Iterator<? extends T>, int);
    method public static java.util.Spliterator.OfInt spliteratorUnknownSize(java.util.PrimitiveIterator.OfInt, int);
    method public static java.util.Spliterator.OfLong spliteratorUnknownSize(java.util.PrimitiveIterator.OfLong, int);
    method public static java.util.Spliterator.OfDouble spliteratorUnknownSize(java.util.PrimitiveIterator.OfDouble, int);
  }

  public static abstract class Spliterators.AbstractDoubleSpliterator implements java.util.Spliterator.OfDouble {
    ctor protected Spliterators.AbstractDoubleSpliterator(long, int);
    method public int characteristics();
    method public long estimateSize();
    method public java.util.Spliterator.OfDouble trySplit();
  }

  public static abstract class Spliterators.AbstractIntSpliterator implements java.util.Spliterator.OfInt {
    ctor protected Spliterators.AbstractIntSpliterator(long, int);
    method public int characteristics();
    method public long estimateSize();
    method public java.util.Spliterator.OfInt trySplit();
  }

  public static abstract class Spliterators.AbstractLongSpliterator implements java.util.Spliterator.OfLong {
    ctor protected Spliterators.AbstractLongSpliterator(long, int);
    method public int characteristics();
    method public long estimateSize();
    method public java.util.Spliterator.OfLong trySplit();
  }

  public static abstract class Spliterators.AbstractSpliterator implements java.util.Spliterator {
    ctor protected Spliterators.AbstractSpliterator(long, int);
    method public int characteristics();
    method public long estimateSize();
    method public java.util.Spliterator<T> trySplit();
  }

  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 final class StringJoiner {
    ctor public StringJoiner(java.lang.CharSequence);
    ctor public StringJoiner(java.lang.CharSequence, java.lang.CharSequence, java.lang.CharSequence);
    method public java.util.StringJoiner add(java.lang.CharSequence);
    method public int length();
    method public java.util.StringJoiner merge(java.util.StringJoiner);
    method public java.util.StringJoiner setEmptyValue(java.lang.CharSequence);
  }

  public class StringTokenizer implements java.util.Enumeration {
    ctor public StringTokenizer(java.lang.String, java.lang.String, boolean);
    ctor public StringTokenizer(java.lang.String, java.lang.String);
    ctor public StringTokenizer(java.lang.String);
    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(int);
    method public static synchronized java.lang.String[] getAvailableIDs();
    method public int getDSTSavings();
    method public static 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 abstract int getOffset(int, int, int, int, int, int);
    method public int getOffset(long);
    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 boolean observesDaylightTime();
    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();
    ctor public Timer(boolean);
    ctor public Timer(java.lang.String);
    ctor public Timer(java.lang.String, boolean);
    method public void cancel();
    method public int purge();
    method public void schedule(java.util.TimerTask, long);
    method public void schedule(java.util.TimerTask, java.util.Date);
    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 {
    ctor public TreeMap();
    ctor public TreeMap(java.util.Comparator<? super K>);
    ctor public TreeMap(java.util.Map<? extends K, ? extends V>);
    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 void forEach(java.util.function.BiConsumer<? super K, ? super V>);
    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.Comparator<? super E>);
    ctor public TreeSet(java.util.Collection<? extends 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.Spliterator<E> spliterator();
    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(int, int);
    ctor public Vector(int);
    ctor public Vector();
    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 synchronized void forEach(java.util.function.Consumer<? super E>);
    method public synchronized 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 boolean removeIf(java.util.function.Predicate<? super E>);
    method public synchronized void setElementAt(E, int);
    method public synchronized void setSize(int);
    method public synchronized int size();
    method public java.util.Spliterator<E> spliterator();
    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(int, float);
    ctor public WeakHashMap(int);
    ctor public WeakHashMap();
    ctor public WeakHashMap(java.util.Map<? extends K, ? extends V>);
    method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
    method public void forEach(java.util.function.BiConsumer<? super K, ? super V>);
  }

}

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 java.util.Spliterator<E> spliterator();
    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 class CompletableFuture implements java.util.concurrent.CompletionStage java.util.concurrent.Future {
    ctor public CompletableFuture();
    method public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
    method public static java.util.concurrent.CompletableFuture<java.lang.Void> allOf(java.util.concurrent.CompletableFuture<?>...);
    method public static java.util.concurrent.CompletableFuture<java.lang.Object> anyOf(java.util.concurrent.CompletableFuture<?>...);
    method public java.util.concurrent.CompletableFuture<U> applyToEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T, U>);
    method public java.util.concurrent.CompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T, U>);
    method public java.util.concurrent.CompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T, U>, java.util.concurrent.Executor);
    method public boolean cancel(boolean);
    method public boolean complete(T);
    method public boolean completeExceptionally(java.lang.Throwable);
    method public static java.util.concurrent.CompletableFuture<U> completedFuture(U);
    method public java.util.concurrent.CompletableFuture<T> exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T>);
    method public T get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
    method public T get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
    method public T getNow(T);
    method public int getNumberOfDependents();
    method public java.util.concurrent.CompletableFuture<U> handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>);
    method public java.util.concurrent.CompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>);
    method public java.util.concurrent.CompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>, java.util.concurrent.Executor);
    method public boolean isCancelled();
    method public boolean isCompletedExceptionally();
    method public boolean isDone();
    method public T join();
    method public void obtrudeException(java.lang.Throwable);
    method public void obtrudeValue(T);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBoth(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEither(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable, java.util.concurrent.Executor);
    method public static java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(java.lang.Runnable);
    method public static java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(java.lang.Runnable, java.util.concurrent.Executor);
    method public static java.util.concurrent.CompletableFuture<U> supplyAsync(java.util.function.Supplier<U>);
    method public static java.util.concurrent.CompletableFuture<U> supplyAsync(java.util.function.Supplier<U>, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAccept(java.util.function.Consumer<? super T>);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T, ? super U>);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T, ? super U>);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T, ? super U>, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<U> thenApply(java.util.function.Function<? super T, ? extends U>);
    method public java.util.concurrent.CompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T, ? extends U>);
    method public java.util.concurrent.CompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T, ? extends U>, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<V> thenCombine(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T, ? super U, ? extends V>);
    method public java.util.concurrent.CompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T, ? super U, ? extends V>);
    method public java.util.concurrent.CompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T, ? super U, ? extends V>, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<U> thenCompose(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>>);
    method public java.util.concurrent.CompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>>);
    method public java.util.concurrent.CompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>>, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenRun(java.lang.Runnable);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable);
    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable, java.util.concurrent.Executor);
    method public java.util.concurrent.CompletableFuture<T> toCompletableFuture();
    method public java.util.concurrent.CompletableFuture<T> whenComplete(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable>);
    method public java.util.concurrent.CompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable>);
    method public java.util.concurrent.CompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable>, java.util.concurrent.Executor);
  }

  public static abstract interface CompletableFuture.AsynchronousCompletionTask {
  }

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

  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 abstract interface CompletionStage {
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> acceptEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<U> applyToEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T, U>);
    method public abstract java.util.concurrent.CompletionStage<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T, U>);
    method public abstract java.util.concurrent.CompletionStage<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T, U>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<T> exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T>);
    method public abstract java.util.concurrent.CompletionStage<U> handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>);
    method public abstract java.util.concurrent.CompletionStage<U> handleAsync(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>);
    method public abstract java.util.concurrent.CompletionStage<U> handleAsync(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> runAfterBoth(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> runAfterEither(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, java.lang.Runnable, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenAccept(java.util.function.Consumer<? super T>);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T, ? super U>);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T, ? super U>);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T, ? super U>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<U> thenApply(java.util.function.Function<? super T, ? extends U>);
    method public abstract java.util.concurrent.CompletionStage<U> thenApplyAsync(java.util.function.Function<? super T, ? extends U>);
    method public abstract java.util.concurrent.CompletionStage<U> thenApplyAsync(java.util.function.Function<? super T, ? extends U>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<V> thenCombine(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T, ? super U, ? extends V>);
    method public abstract java.util.concurrent.CompletionStage<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T, ? super U, ? extends V>);
    method public abstract java.util.concurrent.CompletionStage<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T, ? super U, ? extends V>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<U> thenCompose(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>>);
    method public abstract java.util.concurrent.CompletionStage<U> thenComposeAsync(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>>);
    method public abstract java.util.concurrent.CompletionStage<U> thenComposeAsync(java.util.function.Function<? super T, ? extends java.util.concurrent.CompletionStage<U>>, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenRun(java.lang.Runnable);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenRunAsync(java.lang.Runnable);
    method public abstract java.util.concurrent.CompletionStage<java.lang.Void> thenRunAsync(java.lang.Runnable, java.util.concurrent.Executor);
    method public abstract java.util.concurrent.CompletableFuture<T> toCompletableFuture();
    method public abstract java.util.concurrent.CompletionStage<T> whenComplete(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable>);
    method public abstract java.util.concurrent.CompletionStage<T> whenCompleteAsync(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable>);
    method public abstract java.util.concurrent.CompletionStage<T> whenCompleteAsync(java.util.function.BiConsumer<? super T, ? super java.lang.Throwable>, java.util.concurrent.Executor);
  }

  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 V compute(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    method public V computeIfAbsent(K, java.util.function.Function<? super K, ? extends V>);
    method public V computeIfPresent(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    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 void forEach(java.util.function.BiConsumer<? super K, ? super V>);
    method public void forEach(long, java.util.function.BiConsumer<? super K, ? super V>);
    method public void forEach(long, java.util.function.BiFunction<? super K, ? super V, ? extends U>, java.util.function.Consumer<? super U>);
    method public void forEachEntry(long, java.util.function.Consumer<? super java.util.Map.Entry<K, V>>);
    method public void forEachEntry(long, java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U>, java.util.function.Consumer<? super U>);
    method public void forEachKey(long, java.util.function.Consumer<? super K>);
    method public void forEachKey(long, java.util.function.Function<? super K, ? extends U>, java.util.function.Consumer<? super U>);
    method public void forEachValue(long, java.util.function.Consumer<? super V>);
    method public void forEachValue(long, java.util.function.Function<? super V, ? extends U>, java.util.function.Consumer<? super U>);
    method public V getOrDefault(java.lang.Object, V);
    method public java.util.concurrent.ConcurrentHashMap.KeySetView<K, V> keySet(V);
    method public java.util.Enumeration<K> keys();
    method public long mappingCount();
    method public V merge(K, V, java.util.function.BiFunction<? super V, ? super V, ? extends V>);
    method public static java.util.concurrent.ConcurrentHashMap.KeySetView<K, java.lang.Boolean> newKeySet();
    method public static java.util.concurrent.ConcurrentHashMap.KeySetView<K, java.lang.Boolean> newKeySet(int);
    method public V putIfAbsent(K, V);
    method public U reduce(long, java.util.function.BiFunction<? super K, ? super V, ? extends U>, java.util.function.BiFunction<? super U, ? super U, ? extends U>);
    method public java.util.Map.Entry<K, V> reduceEntries(long, java.util.function.BiFunction<java.util.Map.Entry<K, V>, java.util.Map.Entry<K, V>, ? extends java.util.Map.Entry<K, V>>);
    method public U reduceEntries(long, java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U>, java.util.function.BiFunction<? super U, ? super U, ? extends U>);
    method public double reduceEntriesToDouble(long, java.util.function.ToDoubleFunction<java.util.Map.Entry<K, V>>, double, java.util.function.DoubleBinaryOperator);
    method public int reduceEntriesToInt(long, java.util.function.ToIntFunction<java.util.Map.Entry<K, V>>, int, java.util.function.IntBinaryOperator);
    method public long reduceEntriesToLong(long, java.util.function.ToLongFunction<java.util.Map.Entry<K, V>>, long, java.util.function.LongBinaryOperator);
    method public K reduceKeys(long, java.util.function.BiFunction<? super K, ? super K, ? extends K>);
    method public U reduceKeys(long, java.util.function.Function<? super K, ? extends U>, java.util.function.BiFunction<? super U, ? super U, ? extends U>);
    method public double reduceKeysToDouble(long, java.util.function.ToDoubleFunction<? super K>, double, java.util.function.DoubleBinaryOperator);
    method public int reduceKeysToInt(long, java.util.function.ToIntFunction<? super K>, int, java.util.function.IntBinaryOperator);
    method public long reduceKeysToLong(long, java.util.function.ToLongFunction<? super K>, long, java.util.function.LongBinaryOperator);
    method public double reduceToDouble(long, java.util.function.ToDoubleBiFunction<? super K, ? super V>, double, java.util.function.DoubleBinaryOperator);
    method public int reduceToInt(long, java.util.function.ToIntBiFunction<? super K, ? super V>, int, java.util.function.IntBinaryOperator);
    method public long reduceToLong(long, java.util.function.ToLongBiFunction<? super K, ? super V>, long, java.util.function.LongBinaryOperator);
    method public V reduceValues(long, java.util.function.BiFunction<? super V, ? super V, ? extends V>);
    method public U reduceValues(long, java.util.function.Function<? super V, ? extends U>, java.util.function.BiFunction<? super U, ? super U, ? extends U>);
    method public double reduceValuesToDouble(long, java.util.function.ToDoubleFunction<? super V>, double, java.util.function.DoubleBinaryOperator);
    method public int reduceValuesToInt(long, java.util.function.ToIntFunction<? super V>, int, java.util.function.IntBinaryOperator);
    method public long reduceValuesToLong(long, java.util.function.ToLongFunction<? super V>, long, java.util.function.LongBinaryOperator);
    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 void replaceAll(java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    method public U search(long, java.util.function.BiFunction<? super K, ? super V, ? extends U>);
    method public U searchEntries(long, java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U>);
    method public U searchKeys(long, java.util.function.Function<? super K, ? extends U>);
    method public U searchValues(long, java.util.function.Function<? super V, ? extends U>);
  }

   static abstract class ConcurrentHashMap.CollectionView implements java.util.Collection java.io.Serializable {
    method public final void clear();
    method public abstract boolean contains(java.lang.Object);
    method public final boolean containsAll(java.util.Collection<?>);
    method public java.util.concurrent.ConcurrentHashMap<K, V> getMap();
    method public final boolean isEmpty();
    method public abstract java.util.Iterator<E> iterator();
    method public abstract boolean remove(java.lang.Object);
    method public final boolean removeAll(java.util.Collection<?>);
    method public final boolean retainAll(java.util.Collection<?>);
    method public final int size();
    method public final java.lang.Object[] toArray();
    method public final T[] toArray(T[]);
    method public final java.lang.String toString();
  }

  public static class ConcurrentHashMap.KeySetView extends java.util.concurrent.ConcurrentHashMap.CollectionView implements java.io.Serializable java.util.Set {
    method public boolean add(K);
    method public boolean addAll(java.util.Collection<? extends K>);
    method public boolean contains(java.lang.Object);
    method public void forEach(java.util.function.Consumer<? super K>);
    method public V getMappedValue();
    method public java.util.Iterator<K> iterator();
    method public boolean remove(java.lang.Object);
    method public java.util.Spliterator<K> spliterator();
  }

  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();
    method public java.util.Spliterator<E> spliterator();
  }

  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();
    method public java.util.Spliterator<E> spliterator();
  }

  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 V compute(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    method public V computeIfAbsent(K, java.util.function.Function<? super K, ? extends V>);
    method public V computeIfPresent(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>);
    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 void forEach(java.util.function.BiConsumer<? super K, ? super V>);
    method public V getOrDefault(java.lang.Object, V);
    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 V merge(K, V, java.util.function.BiFunction<? super V, ? super V, ? extends V>);
    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 void replaceAll(java.util.function.BiFunction<? super K, ? super V, ? extends 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.Spliterator<E> spliterator();
    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 void forEach(java.util.function.Consumer<? super E>);
    method public java.util.Iterator<E> iterator();
    method public boolean removeIf(java.util.function.Predicate<? super E>);
    method public int size();
    method public java.util.Spliterator<E> spliterator();
  }

  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 abstract class CountedCompleter extends java.util.concurrent.ForkJoinTask {
    ctor protected CountedCompleter(java.util.concurrent.CountedCompleter<?>, int);
    ctor protected CountedCompleter(java.util.concurrent.CountedCompleter<?>);
    ctor protected CountedCompleter();
    method public final void addToPendingCount(int);
    method public final boolean compareAndSetPendingCount(int, int);
    method public void complete(T);
    method public abstract void compute();
    method public final int decrementPendingCountUnlessZero();
    method protected final boolean exec();
    method public final java.util.concurrent.CountedCompleter<?> firstComplete();
    method public final java.util.concurrent.CountedCompleter<?> getCompleter();
    method public final int getPendingCount();
    method public T getRawResult();
    method public final java.util.concurrent.CountedCompleter<?> getRoot();
    method public final void helpComplete(int);
    method public final java.util.concurrent.CountedCompleter<?> nextComplete();
    method public void onCompletion(java.util.concurrent.CountedCompleter<?>);
    method public boolean onExceptionalCompletion(java.lang.Throwable, java.util.concurrent.CountedCompleter<?>);
    method public final void propagateCompletion();
    method public final void quietlyCompleteRoot();
    method public final void setPendingCount(int);
    method protected void setRawResult(T);
    method public final void tryComplete();
  }

  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.ExecutorService newWorkStealingPool(int);
    method public static java.util.concurrent.ExecutorService newWorkStealingPool();
    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 public static java.util.concurrent.ForkJoinPool commonPool();
    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 static int getCommonPoolParallelism();
    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 final boolean compareAndSetForkJoinTaskTag(short, short);
    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 final short getForkJoinTaskTag();
    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 quietlyComplete();
    method public final void quietlyInvoke();
    method public final void quietlyJoin();
    method public void reinitialize();
    method public final short setForkJoinTaskTag(short);
    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 java.util.Spliterator<E> spliterator();
    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 java.util.Spliterator<E> spliterator();
    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 java.util.Spliterator<E> spliterator();
    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 java.util.Spliterator<E> spliterator();
    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 java.util.Spliterator<E> spliterator();
    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 accumulateAndGet(int, java.util.function.IntBinaryOperator);
    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 getAndAccumulate(int, java.util.function.IntBinaryOperator);
    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 getAndUpdate(java.util.function.IntUnaryOperator);
    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 int updateAndGet(java.util.function.IntUnaryOperator);
    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 accumulateAndGet(int, int, java.util.function.IntBinaryOperator);
    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 getAndAccumulate(int, int, java.util.function.IntBinaryOperator);
    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 getAndUpdate(int, java.util.function.IntUnaryOperator);
    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 int updateAndGet(int, java.util.function.IntUnaryOperator);
    method public final boolean weakCompareAndSet(int, int, int);
  }

  public abstract class AtomicIntegerFieldUpdater {
    ctor protected AtomicIntegerFieldUpdater();
    method public final int accumulateAndGet(T, int, java.util.function.IntBinaryOperator);
    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 final int getAndAccumulate(T, int, java.util.function.IntBinaryOperator);
    method public int getAndAdd(T, int);
    method public int getAndDecrement(T);
    method public int getAndIncrement(T);
    method public int getAndSet(T, int);
    method public final int getAndUpdate(T, java.util.function.IntUnaryOperator);
    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 final int updateAndGet(T, java.util.function.IntUnaryOperator);
    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 accumulateAndGet(long, java.util.function.LongBinaryOperator);
    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 getAndAccumulate(long, java.util.function.LongBinaryOperator);
    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 getAndUpdate(java.util.function.LongUnaryOperator);
    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 long updateAndGet(java.util.function.LongUnaryOperator);
    method public final boolean weakCompareAndSet(long, long);
  }

  public class AtomicLongArray implements java.io.Serializable {
    ctor public AtomicLongArray(int);
    ctor public AtomicLongArray(long[]);
    method public final long accumulateAndGet(int, long, java.util.function.LongBinaryOperator);
    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 getAndAccumulate(int, long, java.util.function.LongBinaryOperator);
    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 getAndUpdate(int, java.util.function.LongUnaryOperator);
    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 long updateAndGet(int, java.util.function.LongUnaryOperator);
    method public final boolean weakCompareAndSet(int, long, long);
  }

  public abstract class AtomicLongFieldUpdater {
    ctor protected AtomicLongFieldUpdater();
    method public final long accumulateAndGet(T, long, java.util.function.LongBinaryOperator);
    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 final long getAndAccumulate(T, long, java.util.function.LongBinaryOperator);
    method public long getAndAdd(T, long);
    method public long getAndDecrement(T);
    method public long getAndIncrement(T);
    method public long getAndSet(T, long);
    method public final long getAndUpdate(T, java.util.function.LongUnaryOperator);
    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 final long updateAndGet(T, java.util.function.LongUnaryOperator);
    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 V accumulateAndGet(V, java.util.function.BinaryOperator<V>);
    method public final boolean compareAndSet(V, V);
    method public final V get();
    method public final V getAndAccumulate(V, java.util.function.BinaryOperator<V>);
    method public final V getAndSet(V);
    method public final V getAndUpdate(java.util.function.UnaryOperator<V>);
    method public final void lazySet(V);
    method public final void set(V);
    method public final V updateAndGet(java.util.function.UnaryOperator<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 E accumulateAndGet(int, E, java.util.function.BinaryOperator<E>);
    method public final boolean compareAndSet(int, E, E);
    method public final E get(int);
    method public final E getAndAccumulate(int, E, java.util.function.BinaryOperator<E>);
    method public final E getAndSet(int, E);
    method public final E getAndUpdate(int, java.util.function.UnaryOperator<E>);
    method public final void lazySet(int, E);
    method public final int length();
    method public final void set(int, E);
    method public final E updateAndGet(int, java.util.function.UnaryOperator<E>);
    method public final boolean weakCompareAndSet(int, E, E);
  }

  public abstract class AtomicReferenceFieldUpdater {
    ctor protected AtomicReferenceFieldUpdater();
    method public final V accumulateAndGet(T, V, java.util.function.BinaryOperator<V>);
    method public abstract boolean compareAndSet(T, V, V);
    method public abstract V get(T);
    method public final V getAndAccumulate(T, V, java.util.function.BinaryOperator<V>);
    method public V getAndSet(T, V);
    method public final V getAndUpdate(T, java.util.function.UnaryOperator<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 final V updateAndGet(T, java.util.function.UnaryOperator<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);
  }

  public class DoubleAccumulator extends java.util.concurrent.atomic.Striped64 implements java.io.Serializable {
    ctor public DoubleAccumulator(java.util.function.DoubleBinaryOperator, double);
    method public void accumulate(double);
    method public double doubleValue();
    method public float floatValue();
    method public double get();
    method public double getThenReset();
    method public int intValue();
    method public long longValue();
    method public void reset();
  }

  public class DoubleAdder extends java.util.concurrent.atomic.Striped64 implements java.io.Serializable {
    ctor public DoubleAdder();
    method public void add(double);
    method public double doubleValue();
    method public float floatValue();
    method public int intValue();
    method public long longValue();
    method public void reset();
    method public double sum();
    method public double sumThenReset();
  }

  public class LongAccumulator extends java.util.concurrent.atomic.Striped64 implements java.io.Serializable {
    ctor public LongAccumulator(java.util.function.LongBinaryOperator, long);
    method public void accumulate(long);
    method public double doubleValue();
    method public float floatValue();
    method public long get();
    method public long getThenReset();
    method public int intValue();
    method public long longValue();
    method public void reset();
  }

  public class LongAdder extends java.util.concurrent.atomic.Striped64 implements java.io.Serializable {
    ctor public LongAdder();
    method public void add(long);
    method public void decrement();
    method public double doubleValue();
    method public float floatValue();
    method public void increment();
    method public int intValue();
    method public long longValue();
    method public void reset();
    method public long sum();
    method public long sumThenReset();
  }

   abstract class Striped64 extends java.lang.Number {
  }

}

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();
  }

  public class StampedLock implements java.io.Serializable {
    ctor public StampedLock();
    method public java.util.concurrent.locks.Lock asReadLock();
    method public java.util.concurrent.locks.ReadWriteLock asReadWriteLock();
    method public java.util.concurrent.locks.Lock asWriteLock();
    method public int getReadLockCount();
    method public boolean isReadLocked();
    method public boolean isWriteLocked();
    method public long readLock();
    method public long readLockInterruptibly() throws java.lang.InterruptedException;
    method public long tryConvertToOptimisticRead(long);
    method public long tryConvertToReadLock(long);
    method public long tryConvertToWriteLock(long);
    method public long tryOptimisticRead();
    method public long tryReadLock();
    method public long tryReadLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public boolean tryUnlockRead();
    method public boolean tryUnlockWrite();
    method public long tryWriteLock();
    method public long tryWriteLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
    method public void unlock(long);
    method public void unlockRead(long);
    method public void unlockWrite(long);
    method public boolean validate(long);
    method public long writeLock();
    method public long writeLockInterruptibly() throws java.lang.InterruptedException;
  }

}

package java.util.function {

  public abstract interface BiConsumer {
    method public abstract void accept(T, U);
    method public default java.util.function.BiConsumer<T, U> andThen(java.util.function.BiConsumer<? super T, ? super U>);
  }

  public abstract interface BiFunction {
    method public default java.util.function.BiFunction<T, U, V> andThen(java.util.function.Function<? super R, ? extends V>);
    method public abstract R apply(T, U);
  }

  public abstract interface BiPredicate {
    method public default java.util.function.BiPredicate<T, U> and(java.util.function.BiPredicate<? super T, ? super U>);
    method public default java.util.function.BiPredicate<T, U> negate();
    method public default java.util.function.BiPredicate<T, U> or(java.util.function.BiPredicate<? super T, ? super U>);
    method public abstract boolean test(T, U);
  }

  public abstract interface BinaryOperator implements java.util.function.BiFunction {
    method public static java.util.function.BinaryOperator<T> maxBy(java.util.Comparator<? super T>);
    method public static java.util.function.BinaryOperator<T> minBy(java.util.Comparator<? super T>);
  }

  public abstract interface BooleanSupplier {
    method public abstract boolean getAsBoolean();
  }

  public abstract interface Consumer {
    method public abstract void accept(T);
    method public default java.util.function.Consumer<T> andThen(java.util.function.Consumer<? super T>);
  }

  public abstract interface DoubleBinaryOperator {
    method public abstract double applyAsDouble(double, double);
  }

  public abstract interface DoubleConsumer {
    method public abstract void accept(double);
    method public default java.util.function.DoubleConsumer andThen(java.util.function.DoubleConsumer);
  }

  public abstract interface DoubleFunction {
    method public abstract R apply(double);
  }

  public abstract interface DoublePredicate {
    method public default java.util.function.DoublePredicate and(java.util.function.DoublePredicate);
    method public default java.util.function.DoublePredicate negate();
    method public default java.util.function.DoublePredicate or(java.util.function.DoublePredicate);
    method public abstract boolean test(double);
  }

  public abstract interface DoubleSupplier {
    method public abstract double getAsDouble();
  }

  public abstract interface DoubleToIntFunction {
    method public abstract int applyAsInt(double);
  }

  public abstract interface DoubleToLongFunction {
    method public abstract long applyAsLong(double);
  }

  public abstract interface DoubleUnaryOperator {
    method public default java.util.function.DoubleUnaryOperator andThen(java.util.function.DoubleUnaryOperator);
    method public abstract double applyAsDouble(double);
    method public default java.util.function.DoubleUnaryOperator compose(java.util.function.DoubleUnaryOperator);
    method public static java.util.function.DoubleUnaryOperator identity();
  }

  public abstract interface Function {
    method public default java.util.function.Function<T, V> andThen(java.util.function.Function<? super R, ? extends V>);
    method public abstract R apply(T);
    method public default java.util.function.Function<V, R> compose(java.util.function.Function<? super V, ? extends T>);
    method public static java.util.function.Function<T, T> identity();
  }

  public abstract interface IntBinaryOperator {
    method public abstract int applyAsInt(int, int);
  }

  public abstract interface IntConsumer {
    method public abstract void accept(int);
    method public default java.util.function.IntConsumer andThen(java.util.function.IntConsumer);
  }

  public abstract interface IntFunction {
    method public abstract R apply(int);
  }

  public abstract interface IntPredicate {
    method public default java.util.function.IntPredicate and(java.util.function.IntPredicate);
    method public default java.util.function.IntPredicate negate();
    method public default java.util.function.IntPredicate or(java.util.function.IntPredicate);
    method public abstract boolean test(int);
  }

  public abstract interface IntSupplier {
    method public abstract int getAsInt();
  }

  public abstract interface IntToDoubleFunction {
    method public abstract double applyAsDouble(int);
  }

  public abstract interface IntToLongFunction {
    method public abstract long applyAsLong(int);
  }

  public abstract interface IntUnaryOperator {
    method public default java.util.function.IntUnaryOperator andThen(java.util.function.IntUnaryOperator);
    method public abstract int applyAsInt(int);
    method public default java.util.function.IntUnaryOperator compose(java.util.function.IntUnaryOperator);
    method public static java.util.function.IntUnaryOperator identity();
  }

  public abstract interface LongBinaryOperator {
    method public abstract long applyAsLong(long, long);
  }

  public abstract interface LongConsumer {
    method public abstract void accept(long);
    method public default java.util.function.LongConsumer andThen(java.util.function.LongConsumer);
  }

  public abstract interface LongFunction {
    method public abstract R apply(long);
  }

  public abstract interface LongPredicate {
    method public default java.util.function.LongPredicate and(java.util.function.LongPredicate);
    method public default java.util.function.LongPredicate negate();
    method public default java.util.function.LongPredicate or(java.util.function.LongPredicate);
    method public abstract boolean test(long);
  }

  public abstract interface LongSupplier {
    method public abstract long getAsLong();
  }

  public abstract interface LongToDoubleFunction {
    method public abstract double applyAsDouble(long);
  }

  public abstract interface LongToIntFunction {
    method public abstract int applyAsInt(long);
  }

  public abstract interface LongUnaryOperator {
    method public default java.util.function.LongUnaryOperator andThen(java.util.function.LongUnaryOperator);
    method public abstract long applyAsLong(long);
    method public default java.util.function.LongUnaryOperator compose(java.util.function.LongUnaryOperator);
    method public static java.util.function.LongUnaryOperator identity();
  }

  public abstract interface ObjDoubleConsumer {
    method public abstract void accept(T, double);
  }

  public abstract interface ObjIntConsumer {
    method public abstract void accept(T, int);
  }

  public abstract interface ObjLongConsumer {
    method public abstract void accept(T, long);
  }

  public abstract interface Predicate {
    method public default java.util.function.Predicate<T> and(java.util.function.Predicate<? super T>);
    method public static java.util.function.Predicate<T> isEqual(java.lang.Object);
    method public default java.util.function.Predicate<T> negate();
    method public default java.util.function.Predicate<T> or(java.util.function.Predicate<? super T>);
    method public abstract boolean test(T);
  }

  public abstract interface Supplier {
    method public abstract T get();
  }

  public abstract interface ToDoubleBiFunction {
    method public abstract double applyAsDouble(T, U);
  }

  public abstract interface ToDoubleFunction {
    method public abstract double applyAsDouble(T);
  }

  public abstract interface ToIntBiFunction {
    method public abstract int applyAsInt(T, U);
  }

  public abstract interface ToIntFunction {
    method public abstract int applyAsInt(T);
  }

  public abstract interface ToLongBiFunction {
    method public abstract long applyAsLong(T, U);
  }

  public abstract interface ToLongFunction {
    method public abstract long applyAsLong(T);
  }

  public abstract interface UnaryOperator implements java.util.function.Function {
    method public static java.util.function.UnaryOperator<T> identity();
  }

}

package java.util.jar {

  public class Attributes implements java.lang.Cloneable java.util.Map {
    ctor public Attributes();
    ctor public Attributes(int);
    ctor public Attributes(java.util.jar.Attributes);
    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.lang.String);
    method public java.lang.String getValue(java.util.jar.Attributes.Name);
    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.lang.String) throws java.io.IOException;
    ctor public JarFile(java.lang.String, boolean) throws java.io.IOException;
    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;
    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) throws java.io.IOException;
    ctor public JarInputStream(java.io.InputStream, boolean) 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 synchronized 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 synchronized 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, java.lang.SecurityException;
    ctor public FileHandler(java.lang.String) throws java.io.IOException, java.lang.SecurityException;
    ctor public FileHandler(java.lang.String, boolean) throws java.io.IOException, java.lang.SecurityException;
    ctor public FileHandler(java.lang.String, int, int) throws java.io.IOException, java.lang.SecurityException;
    ctor public FileHandler(java.lang.String, int, int, boolean) throws java.io.IOException, java.lang.SecurityException;
  }

  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 synchronized 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() throws java.lang.SecurityException;
    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 synchronized 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.lang.SecurityException, java.io.UnsupportedEncodingException;
    method public void setErrorManager(java.util.logging.ErrorManager);
    method public void setFilter(java.util.logging.Filter) throws java.lang.SecurityException;
    method public void setFormatter(java.util.logging.Formatter) throws java.lang.SecurityException;
    method public synchronized void setLevel(java.util.logging.Level) throws java.lang.SecurityException;
  }

  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 synchronized 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 boolean addLogger(java.util.logging.Logger);
    method public void addPropertyChangeListener(java.beans.PropertyChangeListener) throws java.lang.SecurityException;
    method public void checkAccess() throws java.lang.SecurityException;
    method public static java.util.logging.LogManager getLogManager();
    method public java.util.logging.Logger getLogger(java.lang.String);
    method public java.util.Enumeration<java.lang.String> getLoggerNames();
    method public static synchronized java.util.logging.LoggingMXBean getLoggingMXBean();
    method public java.lang.String getProperty(java.lang.String);
    method public void readConfiguration() throws java.io.IOException, java.lang.SecurityException;
    method public void readConfiguration(java.io.InputStream) throws java.io.IOException, java.lang.SecurityException;
    method public void removePropertyChangeListener(java.beans.PropertyChangeListener) throws java.lang.SecurityException;
    method public void reset() throws java.lang.SecurityException;
    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) throws java.lang.SecurityException;
    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 final 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.LogRecord);
    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 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) throws java.lang.SecurityException;
    method public void setFilter(java.util.logging.Filter) throws java.lang.SecurityException;
    method public void setLevel(java.util.logging.Level) throws java.lang.SecurityException;
    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 {
    ctor public LoggingPermission(java.lang.String, java.lang.String) throws java.lang.IllegalArgumentException;
  }

  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() throws java.lang.SecurityException;
    method public void flush();
    method public synchronized java.util.logging.Level getPushLevel();
    method public synchronized void publish(java.util.logging.LogRecord);
    method public synchronized void push();
    method public void setPushLevel(java.util.logging.Level) throws java.lang.SecurityException;
  }

  public class SimpleFormatter extends java.util.logging.Formatter {
    ctor public SimpleFormatter();
    method public synchronized 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 synchronized void close() throws java.lang.SecurityException;
    method public synchronized void flush();
    method public synchronized void publish(java.util.logging.LogRecord);
    method protected synchronized void setOutputStream(java.io.OutputStream) throws java.lang.SecurityException;
  }

  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.Throwable);
    ctor public InvalidPreferencesFormatException(java.lang.String);
    ctor public InvalidPreferencesFormatException(java.lang.String, java.lang.Throwable);
  }

  public class NodeChangeEvent extends java.util.EventObject {
    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 {
    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();
    method public boolean find(int);
    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);
    method public static java.util.regex.Pattern compile(java.lang.String, int) throws java.util.regex.PatternSyntaxException;
    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 UNICODE_CHARACTER_CLASS = 256; // 0x100
    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[], int, int);
    method public void update(byte[]);
  }

  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[], int, int);
    method public void update(byte[]);
  }

  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(int);
    method public abstract void update(byte[], int, int);
  }

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

  public class Deflater {
    ctor public Deflater(int, boolean);
    ctor public Deflater(int);
    ctor public Deflater();
    method public int deflate(byte[], int, int);
    method public int deflate(byte[]);
    method public int deflate(byte[], int, int, int);
    method public void end();
    method public void finish();
    method public boolean finished();
    method public int getAdler();
    method public long getBytesRead();
    method public long getBytesWritten();
    method public int getTotalIn();
    method public int getTotalOut();
    method public boolean needsInput();
    method public void reset();
    method public void setDictionary(byte[], int, int);
    method public void setDictionary(byte[]);
    method public void setInput(byte[], int, int);
    method public void setInput(byte[]);
    method public void setLevel(int);
    method public 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, java.util.zip.Deflater, int, boolean);
    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int);
    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, boolean);
    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater);
    ctor public DeflaterOutputStream(java.io.OutputStream, boolean);
    ctor public DeflaterOutputStream(java.io.OutputStream);
    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, int) throws java.io.IOException;
    ctor public GZIPInputStream(java.io.InputStream) 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, int) throws java.io.IOException;
    ctor public GZIPOutputStream(java.io.OutputStream, int, boolean) throws java.io.IOException;
    ctor public GZIPOutputStream(java.io.OutputStream) throws java.io.IOException;
    ctor public GZIPOutputStream(java.io.OutputStream, boolean) throws java.io.IOException;
    field protected java.util.zip.CRC32 crc;
  }

  public class Inflater {
    ctor public Inflater(boolean);
    ctor public Inflater();
    method public void end();
    method public boolean finished();
    method public int getAdler();
    method public long getBytesRead();
    method public long getBytesWritten();
    method public int getRemaining();
    method public int getTotalIn();
    method public int getTotalOut();
    method public int inflate(byte[], int, int) throws java.util.zip.DataFormatException;
    method public int inflate(byte[]) throws java.util.zip.DataFormatException;
    method public boolean needsDictionary();
    method public boolean needsInput();
    method public void reset();
    method public void setDictionary(byte[], int, int);
    method public void setDictionary(byte[]);
    method public void setInput(byte[], int, int);
    method public void setInput(byte[]);
  }

  public class InflaterInputStream extends java.io.FilterInputStream {
    ctor public InflaterInputStream(java.io.InputStream, java.util.zip.Inflater, int);
    ctor public InflaterInputStream(java.io.InputStream, java.util.zip.Inflater);
    ctor public InflaterInputStream(java.io.InputStream);
    method protected void fill() throws java.io.IOException;
    field protected byte[] buf;
    field protected boolean closed;
    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.lang.String) throws java.io.IOException;
    ctor public ZipFile(java.io.File, int) throws java.io.IOException;
    ctor public ZipFile(java.io.File) throws java.io.IOException, java.util.zip.ZipException;
    ctor public ZipFile(java.io.File, int, java.nio.charset.Charset) throws java.io.IOException;
    ctor public ZipFile(java.lang.String, java.nio.charset.Charset) throws java.io.IOException;
    ctor public ZipFile(java.io.File, java.nio.charset.Charset) 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);
    ctor public ZipInputStream(java.io.InputStream, java.nio.charset.Charset);
    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);
    ctor public ZipOutputStream(java.io.OutputStream, java.nio.charset.Charset);
    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();
    ctor public BadPaddingException(java.lang.String);
  }

  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.spec.AlgorithmParameterSpec) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, 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 boolean isCryptoAllowed(java.security.Key) throws javax.crypto.ExemptionMechanismException;
  }

  public class ExemptionMechanismException extends java.security.GeneralSecurityException {
    ctor public ExemptionMechanismException();
    ctor public ExemptionMechanismException(java.lang.String);
  }

  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.spec.AlgorithmParameterSpec) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
    method protected abstract void engineInit(java.security.Key, java.security.AlgorithmParameters) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
  }

  public class IllegalBlockSizeException extends java.security.GeneralSecurityException {
    ctor public IllegalBlockSizeException();
    ctor public IllegalBlockSizeException(java.lang.String);
  }

  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.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;
    method public final void init(int);
    method public final void init(int, java.security.SecureRandom);
  }

  public abstract class KeyGeneratorSpi {
    ctor public KeyGeneratorSpi();
    method protected abstract javax.crypto.SecretKey engineGenerateKey();
    method protected abstract void engineInit(java.security.SecureRandom);
    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);
  }

  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) 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 reset();
    method public final void update(byte) throws java.lang.IllegalStateException;
    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(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();
    ctor public NoSuchPaddingException(java.lang.String);
  }

  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();
    ctor public ShortBufferException(java.lang.String);
  }

}

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 {
    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 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 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 abstract class ExtendedSSLSession implements javax.net.ssl.SSLSession {
    ctor public ExtendedSSLSession();
    method public abstract java.lang.String[] getLocalSupportedSignatureAlgorithms();
    method public abstract java.lang.String[] getPeerSupportedSignatureAlgorithms();
    method public java.util.List<javax.net.ssl.SNIServerName> getRequestedServerNames();
  }

  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 final class SNIHostName extends javax.net.ssl.SNIServerName {
    ctor public SNIHostName(java.lang.String);
    ctor public SNIHostName(byte[]);
    method public static javax.net.ssl.SNIMatcher createSNIMatcher(java.lang.String);
    method public java.lang.String getAsciiName();
  }

  public abstract class SNIMatcher {
    ctor protected SNIMatcher(int);
    method public final int getType();
    method public abstract boolean matches(javax.net.ssl.SNIServerName);
  }

  public abstract class SNIServerName {
    ctor protected SNIServerName(int, byte[]);
    method public final byte[] getEncoded();
    method public final int getType();
  }

  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 synchronized 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 synchronized void setDefault(javax.net.ssl.SSLContext);
  }

  public abstract class SSLContextSpi {
    ctor public SSLContextSpi();
    method protected abstract javax.net.ssl.SSLEngine engineCreateSSLEngine();
    method protected abstract javax.net.ssl.SSLEngine engineCreateSSLEngine(java.lang.String, int);
    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 javax.net.ssl.SSLSession getHandshakeSession();
    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 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 unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer[], int, int) 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;
    method public abstract javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[], int, int, 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.security.AlgorithmConstraints getAlgorithmConstraints();
    method public java.lang.String[] getCipherSuites();
    method public java.lang.String getEndpointIdentificationAlgorithm();
    method public boolean getNeedClientAuth();
    method public java.lang.String[] getProtocols();
    method public final java.util.Collection<javax.net.ssl.SNIMatcher> getSNIMatchers();
    method public final java.util.List<javax.net.ssl.SNIServerName> getServerNames();
    method public final boolean getUseCipherSuitesOrder();
    method public boolean getWantClientAuth();
    method public void setAlgorithmConstraints(java.security.AlgorithmConstraints);
    method public void setCipherSuites(java.lang.String[]);
    method public void setEndpointIdentificationAlgorithm(java.lang.String);
    method public void setNeedClientAuth(boolean);
    method public void setProtocols(java.lang.String[]);
    method public final void setSNIMatchers(java.util.Collection<javax.net.ssl.SNIMatcher>);
    method public final void setServerNames(java.util.List<javax.net.ssl.SNIServerName>);
    method public final void setUseCipherSuitesOrder(boolean);
    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 javax.net.ssl.SSLParameters getSSLParameters();
    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 void setSSLParameters(javax.net.ssl.SSLParameters);
    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 javax.net.ssl.SSLSession getHandshakeSession();
    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 final class StandardConstants {
    field public static final int SNI_HOST_NAME = 0; // 0x0
  }

  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 class X509ExtendedTrustManager implements javax.net.ssl.X509TrustManager {
    ctor public X509ExtendedTrustManager();
    method public abstract void checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String, java.net.Socket) throws java.security.cert.CertificateException;
    method public abstract void checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
    method public abstract void checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.net.Socket) throws java.security.cert.CertificateException;
    method public abstract void checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
  }

  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 boolean equals(java.lang.Object);
    method public java.lang.String getActions();
    method public java.lang.String getCredentialClass();
    method public java.lang.String[][] getPrincipals();
    method public int hashCode();
    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(java.lang.String);
    ctor public X500Principal(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
    ctor public X500Principal(byte[]);
    ctor public X500Principal(java.io.InputStream);
    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();
    ctor public CertificateEncodingException(java.lang.String);
  }

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

  public class CertificateExpiredException extends javax.security.cert.CertificateException {
    ctor public CertificateExpiredException();
    ctor public CertificateExpiredException(java.lang.String);
  }

  public class CertificateNotYetValidException extends javax.security.cert.CertificateException {
    ctor public CertificateNotYetValidException();
    ctor public CertificateNotYetValidException(java.lang.String);
  }

  public class CertificateParsingException extends javax.security.cert.CertificateException {
    ctor public CertificateParsingException();
    ctor public CertificateParsingException(java.lang.String);
  }

  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 java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException;
    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 {
    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(java.lang.String, 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 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(java.lang.String, 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 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 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(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(java.lang.String, 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 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 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 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, 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 setNClob(int, 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 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(java.lang.String, 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, java.lang.String) 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, int, int) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object, int) 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) throws java.sql.SQLException;
    method public abstract void setObject(int, java.lang.Object) 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(java.lang.String, 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, 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 {
    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);
    ctor public StatementEvent(javax.sql.PooledConnection, java.sql.PreparedStatement, java.sql.SQLException);
    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;
  }

}

