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C;KAC9E;IACD,OAAO,kBAAkB,CAAC,aAAa,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { UnavailabilityError } from '@unimodules/core';\n\nimport ExpoIntentLauncher from './ExpoIntentLauncher';\n\n/**\n * Constants are from the source code of Settings:\n * https://developer.android.com/reference/android/provider/Settings.html\n */\n\nexport const ACTION_ACCESSIBILITY_SETTINGS = 'android.settings.ACCESSIBILITY_SETTINGS';\nexport const ACTION_APP_NOTIFICATION_REDACTION =\n 'android.settings.ACTION_APP_NOTIFICATION_REDACTION';\nexport const ACTION_CONDITION_PROVIDER_SETTINGS =\n 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS';\nexport const ACTION_NOTIFICATION_LISTENER_SETTINGS =\n 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS';\nexport const ACTION_PRINT_SETTINGS = 'android.settings.ACTION_PRINT_SETTINGS';\nexport const ACTION_ADD_ACCOUNT_SETTINGS = 'android.settings.ADD_ACCOUNT_SETTINGS';\nexport const ACTION_AIRPLANE_MODE_SETTINGS = 'android.settings.AIRPLANE_MODE_SETTINGS';\nexport const ACTION_APN_SETTINGS = 'android.settings.APN_SETTINGS';\nexport const ACTION_APPLICATION_DETAILS_SETTINGS = 'android.settings.APPLICATION_DETAILS_SETTINGS';\nexport const ACTION_APPLICATION_DEVELOPMENT_SETTINGS =\n 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS';\nexport const ACTION_APPLICATION_SETTINGS = 'android.settings.APPLICATION_SETTINGS';\nexport const ACTION_APP_NOTIFICATION_SETTINGS = 'android.settings.APP_NOTIFICATION_SETTINGS';\nexport const ACTION_APP_OPS_SETTINGS = 'android.settings.APP_OPS_SETTINGS';\nexport const ACTION_BATTERY_SAVER_SETTINGS = 'android.settings.BATTERY_SAVER_SETTINGS';\nexport const ACTION_BLUETOOTH_SETTINGS = 'android.settings.BLUETOOTH_SETTINGS';\nexport const ACTION_CAPTIONING_SETTINGS = 'android.settings.CAPTIONING_SETTINGS';\nexport const ACTION_CAST_SETTINGS = 'android.settings.CAST_SETTINGS';\nexport const ACTION_DATA_ROAMING_SETTINGS = 'android.settings.DATA_ROAMING_SETTINGS';\nexport const ACTION_DATE_SETTINGS = 'android.settings.DATE_SETTINGS';\nexport const ACTION_DEVICE_INFO_SETTINGS = 'android.settings.DEVICE_INFO_SETTINGS';\nexport const ACTION_DEVICE_NAME = 'android.settings.DEVICE_NAME';\nexport const ACTION_DISPLAY_SETTINGS = 'android.settings.DISPLAY_SETTINGS';\nexport const ACTION_DREAM_SETTINGS = 'android.settings.DREAM_SETTINGS';\nexport const ACTION_HARD_KEYBOARD_SETTINGS = 'android.settings.HARD_KEYBOARD_SETTINGS';\nexport const ACTION_HOME_SETTINGS = 'android.settings.HOME_SETTINGS';\nexport const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS =\n 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS';\nexport const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS =\n 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS';\nexport const ACTION_INPUT_METHOD_SETTINGS = 'android.settings.INPUT_METHOD_SETTINGS';\nexport const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS =\n 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS';\nexport const ACTION_INTERNAL_STORAGE_SETTINGS = 'android.settings.INTERNAL_STORAGE_SETTINGS';\nexport const ACTION_LOCALE_SETTINGS = 'android.settings.LOCALE_SETTINGS';\nexport const ACTION_LOCATION_SOURCE_SETTINGS = 'android.settings.LOCATION_SOURCE_SETTINGS';\nexport const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS =\n 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS';\nexport const ACTION_MANAGE_APPLICATIONS_SETTINGS = 'android.settings.MANAGE_APPLICATIONS_SETTINGS';\nexport const ACTION_MANAGE_DEFAULT_APPS_SETTINGS = 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS';\nexport const ACTION_MEMORY_CARD_SETTINGS = 'android.settings.MEMORY_CARD_SETTINGS';\nexport const ACTION_MONITORING_CERT_INFO = 'android.settings.MONITORING_CERT_INFO';\nexport const ACTION_NETWORK_OPERATOR_SETTINGS = 'android.settings.NETWORK_OPERATOR_SETTINGS';\nexport const ACTION_NFCSHARING_SETTINGS = 'android.settings.NFCSHARING_SETTINGS';\nexport const ACTION_NFC_PAYMENT_SETTINGS = 'android.settings.NFC_PAYMENT_SETTINGS';\nexport const ACTION_NFC_SETTINGS = 'android.settings.NFC_SETTINGS';\nexport const ACTION_NIGHT_DISPLAY_SETTINGS = 'android.settings.NIGHT_DISPLAY_SETTINGS';\nexport const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS =\n 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS';\nexport const ACTION_NOTIFICATION_SETTINGS = 'android.settings.NOTIFICATION_SETTINGS';\nexport const ACTION_PAIRING_SETTINGS = 'android.settings.PAIRING_SETTINGS';\nexport const ACTION_PRIVACY_SETTINGS = 'android.settings.PRIVACY_SETTINGS';\nexport const ACTION_QUICK_LAUNCH_SETTINGS = 'android.settings.QUICK_LAUNCH_SETTINGS';\nexport const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS =\n 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS';\nexport const ACTION_SECURITY_SETTINGS = 'android.settings.SECURITY_SETTINGS';\nexport const ACTION_SETTINGS = 'android.settings.SETTINGS';\nexport const ACTION_SHOW_ADMIN_SUPPORT_DETAILS = 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS';\nexport const ACTION_SHOW_INPUT_METHOD_PICKER = 'android.settings.SHOW_INPUT_METHOD_PICKER';\nexport const ACTION_SHOW_REGULATORY_INFO = 'android.settings.SHOW_REGULATORY_INFO';\nexport const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG = 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG';\nexport const ACTION_SOUND_SETTINGS = 'android.settings.SOUND_SETTINGS';\nexport const ACTION_STORAGE_MANAGER_SETTINGS = 'android.settings.STORAGE_MANAGER_SETTINGS';\nexport const ACTION_SYNC_SETTINGS = 'android.settings.SYNC_SETTINGS';\nexport const ACTION_SYSTEM_UPDATE_SETTINGS = 'android.settings.SYSTEM_UPDATE_SETTINGS';\nexport const ACTION_TETHER_PROVISIONING_UI = 'android.settings.TETHER_PROVISIONING_UI';\nexport const ACTION_TRUSTED_CREDENTIALS_USER = 'android.settings.TRUSTED_CREDENTIALS_USER';\nexport const ACTION_USAGE_ACCESS_SETTINGS = 'android.settings.USAGE_ACCESS_SETTINGS';\nexport const ACTION_USER_DICTIONARY_INSERT = 'android.settings.USER_DICTIONARY_INSERT';\nexport const ACTION_USER_DICTIONARY_SETTINGS = 'android.settings.USER_DICTIONARY_SETTINGS';\nexport const ACTION_USER_SETTINGS = 'android.settings.USER_SETTINGS';\nexport const ACTION_VOICE_CONTROL_AIRPLANE_MODE = 'android.settings.VOICE_CONTROL_AIRPLANE_MODE';\nexport const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE =\n 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE';\nexport const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE =\n 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE';\nexport const ACTION_VOICE_INPUT_SETTINGS = 'android.settings.VOICE_INPUT_SETTINGS';\nexport const ACTION_VPN_SETTINGS = 'android.settings.VPN_SETTINGS';\nexport const ACTION_VR_LISTENER_SETTINGS = 'android.settings.VR_LISTENER_SETTINGS';\nexport const ACTION_WEBVIEW_SETTINGS = 'android.settings.WEBVIEW_SETTINGS';\nexport const ACTION_WIFI_IP_SETTINGS = 'android.settings.WIFI_IP_SETTINGS';\nexport const ACTION_WIFI_SETTINGS = 'android.settings.WIFI_SETTINGS';\nexport const ACTION_WIRELESS_SETTINGS = 'android.settings.WIRELESS_SETTINGS';\nexport const ACTION_ZEN_MODE_AUTOMATION_SETTINGS = 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS';\nexport const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS = 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS';\nexport const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS =\n 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS';\nexport const ACTION_ZEN_MODE_PRIORITY_SETTINGS = 'android.settings.ZEN_MODE_PRIORITY_SETTINGS';\nexport const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS =\n 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS';\nexport const ACTION_ZEN_MODE_SETTINGS = 'android.settings.ZEN_MODE_SETTINGS';\n\nexport interface IntentLauncherParams {\n type?: string;\n category?: string;\n extra?: object;\n data?: string;\n flags?: number;\n packageName?: string;\n className?: string;\n}\n\nexport interface IntentLauncherResult {\n resultCode: number;\n data?: string;\n extra?: object;\n}\n\nexport enum ResultCode {\n Success = -1,\n Canceled = 0,\n FirstUser = 1,\n}\n\nexport async function startActivityAsync(\n activityAction: string,\n params: IntentLauncherParams = {}\n): Promise<IntentLauncherResult> {\n if (!ExpoIntentLauncher.startActivity) {\n throw new UnavailabilityError('IntentLauncher', 'startActivityAsync');\n }\n if (typeof activityAction !== 'string' || !activityAction) {\n throw new TypeError(`'activityAction' argument must be a non-empty string!`);\n }\n return ExpoIntentLauncher.startActivity(activityAction, params);\n}\n"]}
\No newline at end of file